Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/projects/WorkboardBoard.js
| Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | start: function() { | ||||
| // TODO: This is temporary code to make it easier to debug this workflow | // TODO: This is temporary code to make it easier to debug this workflow | ||||
| // by pressing the "R" key. | // by pressing the "R" key. | ||||
| var on_reload = JX.bind(this, this._reloadCards); | var on_reload = JX.bind(this, this._reloadCards); | ||||
| new JX.KeyboardShortcut('R', 'Reload Card State (Prototype)') | new JX.KeyboardShortcut('R', 'Reload Card State (Prototype)') | ||||
| .setHandler(on_reload) | .setHandler(on_reload) | ||||
| .register(); | .register(); | ||||
| var board_phid = this.getPHID(); | |||||
| JX.Stratcom.listen('aphlict-server-message', null, function(e) { | |||||
| var message = e.getData(); | |||||
| if (message.type != 'workboards') { | |||||
| return; | |||||
| } | |||||
| // Check if this update notification is about the currently visible | |||||
| // board. If it is, update the board state. | |||||
| var found_board = false; | |||||
| for (var ii = 0; ii < message.subscribers.length; ii++) { | |||||
| var subscriber_phid = message.subscribers[ii]; | |||||
| if (subscriber_phid === board_phid) { | |||||
| found_board = true; | |||||
| break; | |||||
| } | |||||
| } | |||||
| if (found_board) { | |||||
| on_reload(); | |||||
| } | |||||
| }); | |||||
| JX.Stratcom.listen('aphlict-reconnect', null, function(e) { | |||||
| on_reload(); | |||||
| }); | |||||
| for (var k in this._columns) { | for (var k in this._columns) { | ||||
| this._columns[k].redraw(); | this._columns[k].redraw(); | ||||
| } | } | ||||
| }, | }, | ||||
| _buildColumns: function() { | _buildColumns: function() { | ||||
| var nodes = JX.DOM.scry(this.getRoot(), 'ul', 'project-column'); | var nodes = JX.DOM.scry(this.getRoot(), 'ul', 'project-column'); | ||||
| ▲ Show 20 Lines • Show All 619 Lines • Show Last 20 Lines | |||||