Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffPathView.js
Show All 17 Lines | members: { | ||||
_icon: null, | _icon: null, | ||||
_indentNode: null, | _indentNode: null, | ||||
_pathNode: null, | _pathNode: null, | ||||
_changeset: null, | _changeset: null, | ||||
_inlineNode: null, | _inlineNode: null, | ||||
_isDirectory: false, | _isDirectory: false, | ||||
_displayPath: null, | _displayPath: null, | ||||
_isOwned: false, | |||||
_isLowImportance: false, | |||||
getNode: function() { | getNode: function() { | ||||
if (!this._node) { | if (!this._node) { | ||||
var attrs = { | var attrs = { | ||||
className: 'diff-tree-path' | className: 'diff-tree-path' | ||||
}; | }; | ||||
this._node = JX.$N('li', attrs, this._getIndentNode()); | this._node = JX.$N('li', attrs, this._getIndentNode()); | ||||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | setIsFocused: function(focused) { | ||||
this._focused = focused; | this._focused = focused; | ||||
var node = this.getNode(); | var node = this.getNode(); | ||||
JX.DOM.alterClass(node, 'diff-tree-path-focused', this._focused); | JX.DOM.alterClass(node, 'diff-tree-path-focused', this._focused); | ||||
return this; | return this; | ||||
}, | }, | ||||
setIsLowImportance: function(low_importance) { | |||||
this._isLowImportance = low_importance; | |||||
var node = this.getNode(); | |||||
JX.DOM.alterClass( | |||||
node, | |||||
'diff-tree-path-low-importance', | |||||
this._isLowImportance); | |||||
return this; | |||||
}, | |||||
setIsOwned: function(owned) { | |||||
this._isOwned = owned; | |||||
var node = this.getNode(); | |||||
JX.DOM.alterClass(node, 'diff-tree-path-owned', this._isOwned); | |||||
return this; | |||||
}, | |||||
_onclick: function(e) { | _onclick: function(e) { | ||||
if (!e.isNormalClick()) { | if (!e.isNormalClick()) { | ||||
return; | return; | ||||
} | } | ||||
var changeset = this.getChangeset(); | var changeset = this.getChangeset(); | ||||
if (changeset) { | if (changeset) { | ||||
changeset.select(true); | changeset.select(true); | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |