Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
f0469911
Commit
f0469911
authored
6 years ago
by
vas
Browse files
Options
Downloads
Patches
Plain Diff
move properTitle to global scope
parent
577474b7
No related branches found
No related tags found
2 merge requests
!2176
Pregmod master ra rework
,
!2047
RA rework
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/js/assayJS.tw
+8
-0
8 additions, 0 deletions
src/js/assayJS.tw
src/js/rulesAssistantOptions.tw
+1
-8
1 addition, 8 deletions
src/js/rulesAssistantOptions.tw
with
9 additions
and
8 deletions
src/js/assayJS.tw
+
8
−
0
View file @
f0469911
...
@@ -224,3 +224,11 @@ window.isLeaderP = function isLeaderP(slave) {
...
@@ -224,3 +224,11 @@ window.isLeaderP = function isLeaderP(slave) {
}
}
return false
return false
};
};
// helper function returning PC's title
window.properTitle = function properTitle() {
const PC = State.variables.PC
if (PC.customTitle) return PC.customTitle;
else if (V.PC.title !== 0) return "Sir";
else return "Ma'am";
};
This diff is collapsed.
Click to expand it.
src/js/rulesAssistantOptions.tw
+
1
−
8
View file @
f0469911
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// uses an object-oriented widget pattern
// uses an object-oriented widget pattern
// wrapped in a closure so as not to polute the global namespace
// wrapped in a closure so as not to polute the global namespace
// the widgets are generic enough to be reusable; if similar user interfaces are ported to JS, we could move the classes to the global scope
// the widgets are generic enough to be reusable; if similar user interfaces are ported to JS, we could move the classes to the global scope
j
window.rulesAssistantOptions = (function() {
window.rulesAssistantOptions = (function() {
"use strict"
"use strict"
...
@@ -26,13 +26,6 @@ window.rulesAssistantOptions = (function() {
...
@@ -26,13 +26,6 @@ window.rulesAssistantOptions = (function() {
root.appendChild(new Element(tmp))
root.appendChild(new Element(tmp))
}
}
// helper function returning PC's title
function properTitle() {
if (V.PC.customTitle) return V.PC.customTitle
else if (V.PC.title !== 0) return "Sir"
else return "Ma'am"
}
// the Element class wraps around a DOM element and adds extra functionality
// the Element class wraps around a DOM element and adds extra functionality
// this is safer than extending DOM objects directly
// this is safer than extending DOM objects directly
// it also turns DOM manipulation into an implementation detail
// it also turns DOM manipulation into an implementation detail
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment