Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/conpherence/behavior-widget-pane.js
Show All 9 Lines | |||||
* phuix-action-list-view | * phuix-action-list-view | ||||
* phuix-action-view | * phuix-action-view | ||||
* conpherence-thread-manager | * conpherence-thread-manager | ||||
* @provides javelin-behavior-conpherence-widget-pane | * @provides javelin-behavior-conpherence-widget-pane | ||||
*/ | */ | ||||
JX.behavior('conpherence-widget-pane', function(config) { | JX.behavior('conpherence-widget-pane', function(config) { | ||||
/** | /** | ||||
* There can be race conditions around loading the messages or the widgets | * There can be race conditions around loading the messages or the widgets | ||||
* first. Keep track of what widgets we've loaded with this variable. | * first. Keep track of what widgets we've loaded with this variable. | ||||
*/ | */ | ||||
var _loadedWidgetsID = null; | var _loadedWidgetsID = null; | ||||
chad: I did some more debugging then and into this variable. Basically this is one of the race… | |||||
/** | /** | ||||
* At any given time there can be only one selected widget. Keep track of | * At any given time there can be only one selected widget. Keep track of | ||||
* which one it is by the user-facing name for ease of use with | * which one it is by the user-facing name for ease of use with | ||||
* PhabricatorDropdownMenuItems. | * PhabricatorDropdownMenuItems. | ||||
*/ | */ | ||||
var _selectedWidgetName = null; | var _selectedWidgetName = null; | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | for (var widget in widgets) { | ||||
var threadManager = JX.ConpherenceThreadManager.getInstance(); | var threadManager = JX.ConpherenceThreadManager.getInstance(); | ||||
handler = function(e) { | handler = function(e) { | ||||
e.prevent(); | e.prevent(); | ||||
menu.close(); | menu.close(); | ||||
threadManager.runUpdateWorkflowFromLink( | threadManager.runUpdateWorkflowFromLink( | ||||
e.getTarget(), | e.getTarget(), | ||||
{ | { | ||||
action : 'metadata', | action : 'metadata', | ||||
force_ajax : true, | |||||
stage : 'submit' | stage : 'submit' | ||||
}); | }); | ||||
}; | }; | ||||
href = threadManager._getUpdateURI(); | href = '/conpherence/update/' + data.threadID + '/'; | ||||
} else { | } else { | ||||
handler = JX.bind(null, function(widget, e) { | handler = JX.bind(null, function(widget, e) { | ||||
toggleWidget({widget: widget}); | toggleWidget({widget: widget}); | ||||
e.prevent(); | e.prevent(); | ||||
menu.close(); | menu.close(); | ||||
}, widget); | }, widget); | ||||
} | } | ||||
var item = new JX.PHUIXActionView() | var item = new JX.PHUIXActionView() | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |
I did some more debugging then and into this variable. Basically this is one of the race conditions seems expected, which this variable was created for. It just wasn't used in this case.