Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangeset.js
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | members: { | ||||
| _inlines: null, | _inlines: null, | ||||
| _visible: true, | _visible: true, | ||||
| _undoNode: null, | _undoNode: null, | ||||
| _displayPath: null, | _displayPath: null, | ||||
| _changesetList: null, | _changesetList: null, | ||||
| _icon: null, | _icon: null, | ||||
| _treeNodeID: null, | |||||
| _editorURI: null, | _editorURI: null, | ||||
| _editorConfigureURI: null, | _editorConfigureURI: null, | ||||
| _pathView: null, | _pathView: null, | ||||
| getEditorURI: function() { | getEditorURI: function() { | ||||
| return this._editorURI; | return this._editorURI; | ||||
| }, | }, | ||||
| ▲ Show 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | _rebuildAllInlines: function() { | ||||
| // As a side effect, this builds any missing inline objects and adds | // As a side effect, this builds any missing inline objects and adds | ||||
| // them to this Changeset's list of inlines. | // them to this Changeset's list of inlines. | ||||
| this.getInlineForRow(row); | this.getInlineForRow(row); | ||||
| } | } | ||||
| }, | }, | ||||
| redrawFileTree: function() { | redrawFileTree: function() { | ||||
| var tree; | |||||
| try { | |||||
| tree = JX.$(this._treeNodeID); | |||||
| } catch (e) { | |||||
| return; | |||||
| } | |||||
| var inlines = this._inlines; | var inlines = this._inlines; | ||||
| var done = []; | var done = []; | ||||
| var undone = []; | var undone = []; | ||||
| var inline; | var inline; | ||||
| for (var ii = 0; ii < inlines.length; ii++) { | for (var ii = 0; ii < inlines.length; ii++) { | ||||
| inline = inlines[ii]; | inline = inlines[ii]; | ||||
| Show All 40 Lines | redrawFileTree: function() { | ||||
| is_visible = true; | is_visible = true; | ||||
| is_completed = (done.length == total); | is_completed = (done.length == total); | ||||
| } else { | } else { | ||||
| hint = '-'; | hint = '-'; | ||||
| is_visible = false; | is_visible = false; | ||||
| is_completed = false; | is_completed = false; | ||||
| } | } | ||||
| JX.DOM.setContent(tree, hint); | var node = this.getPathView().getInlineNode(); | ||||
| JX.DOM.alterClass(tree, 'filetree-comments-visible', is_visible); | |||||
| JX.DOM.alterClass(tree, 'filetree-comments-completed', is_completed); | JX.DOM.setContent(node, hint); | ||||
| JX.DOM.alterClass(node, 'diff-tree-path-inlines-visible', is_visible); | |||||
| JX.DOM.alterClass(node, 'diff-tree-path-inlines-completed', is_completed); | |||||
| }, | }, | ||||
| toggleVisibility: function() { | toggleVisibility: function() { | ||||
| this._visible = !this._visible; | this._visible = !this._visible; | ||||
| var diff = JX.DOM.find(this._node, 'table', 'differential-diff'); | var diff = JX.DOM.find(this._node, 'table', 'differential-diff'); | ||||
| var undo = this._getUndoNode(); | var undo = this._getUndoNode(); | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||