1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Conpherence + workboards - fix dragging behavior breaking on subsequent page loads

Summary: Fixes T8155. The former "init_board()" function was aptly named as it needs to be called each time a new board dom piece is downloaded. Ergo, break out a setup() function and call that in the once-only setup place, and use init_board() there as well as when we have a quicksand redraw event with data from the server.

Test Plan: paged about a project and was able to keep dragging and dropping tasks on various loads of the board. verified drops saved correctly from load to load.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8155

Differential Revision: https://secure.phabricator.com/D12798
This commit is contained in:
Bob Trahan 2015-05-12 11:37:55 -07:00
parent 97fbc54d0b
commit 7ef8da8259
2 changed files with 19 additions and 12 deletions

View file

@ -407,7 +407,7 @@ return array(
'rsrc/js/application/policy/behavior-policy-control.js' => '9a340b3d',
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
'rsrc/js/application/ponder/behavior-votebox.js' => '4e9b766b',
'rsrc/js/application/projects/behavior-project-boards.js' => '60292820',
'rsrc/js/application/projects/behavior-project-boards.js' => 'ba4fa35c',
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
@ -637,7 +637,7 @@ return array(
'javelin-behavior-policy-control' => '9a340b3d',
'javelin-behavior-policy-rule-editor' => '5e9f347c',
'javelin-behavior-ponder-votebox' => '4e9b766b',
'javelin-behavior-project-boards' => '60292820',
'javelin-behavior-project-boards' => 'ba4fa35c',
'javelin-behavior-project-create' => '065227cc',
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
'javelin-behavior-refresh-csrf' => '7814b593',
@ -1247,15 +1247,6 @@ return array(
'javelin-workflow',
'javelin-stratcom',
),
60292820 => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-vector',
'javelin-stratcom',
'javelin-workflow',
'phabricator-draggable-list',
),
60479091 => array(
'phabricator-busy',
'javelin-behavior',
@ -1729,6 +1720,15 @@ return array(
'javelin-dom',
'javelin-util',
),
'ba4fa35c' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-vector',
'javelin-stratcom',
'javelin-workflow',
'phabricator-draggable-list',
),
'bba9eedf' => array(
'javelin-behavior',
'javelin-stratcom',

View file

@ -249,6 +249,9 @@ JX.behavior('project-boards', function(config, statics) {
for (ii = 0; ii < lists.length; ii++) {
lists[ii].setGroup(lists);
}
}
function setup() {
JX.Stratcom.listen(
'click',
@ -336,6 +339,9 @@ JX.behavior('project-boards', function(config, statics) {
statics.boardID = new_config.boardID;
}
update_statics(new_config);
if (data.fromServer) {
init_board();
}
});
return true;
}
@ -345,7 +351,8 @@ JX.behavior('project-boards', function(config, statics) {
var current_page_id = JX.Quicksand.getCurrentPageID();
statics.boardConfigCache = {};
statics.boardConfigCache[current_page_id] = config;
statics.setup = init_board();
init_board();
statics.setup = setup();
}
});