Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/ScrollObjective.js
| Show All 20 Lines | JX.install('ScrollObjective', { | ||||
| members: { | members: { | ||||
| _list: null, | _list: null, | ||||
| _node: null, | _node: null, | ||||
| _anchor: null, | _anchor: null, | ||||
| _visible: false, | _visible: false, | ||||
| _callback: false, | _callback: false, | ||||
| _stack: false, | |||||
| getNode: function() { | getNode: function() { | ||||
| if (!this._node) { | if (!this._node) { | ||||
| var attributes = { | var attributes = { | ||||
| className: 'scroll-objective' | className: 'scroll-objective' | ||||
| }; | }; | ||||
| var content = this._getIconObject().getNode(); | var content = this._getIconObject().getNode(); | ||||
| ▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | setTooltip: function(tip) { | ||||
| var node = this._getIconObject().getNode(); | var node = this._getIconObject().getNode(); | ||||
| JX.Stratcom.addSigil(node, 'has-tooltip'); | JX.Stratcom.addSigil(node, 'has-tooltip'); | ||||
| JX.Stratcom.getData(node).tip = tip; | JX.Stratcom.getData(node).tip = tip; | ||||
| JX.Stratcom.getData(node).align = 'W'; | JX.Stratcom.getData(node).align = 'W'; | ||||
| JX.Stratcom.getData(node).size = 'auto'; | JX.Stratcom.getData(node).size = 'auto'; | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| /** | |||||
| * Should this objective always stack immediately under the previous | |||||
| * objective? | |||||
| * | |||||
| * This allows related objectives (like "comment, reply, reply") to be | |||||
| * rendered in a tight sequence. | |||||
| */ | |||||
| setShouldStack: function(stack) { | |||||
| this._stack = stack; | |||||
| return this; | |||||
| }, | |||||
| shouldStack: function() { | |||||
| return this._stack; | |||||
| }, | |||||
| show: function() { | show: function() { | ||||
| this._visible = true; | this._visible = true; | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| hide: function() { | hide: function() { | ||||
| this._visible = false; | this._visible = false; | ||||
| return this; | return this; | ||||
| Show All 9 Lines | |||||