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:
parent
97fbc54d0b
commit
7ef8da8259
2 changed files with 19 additions and 12 deletions
|
@ -407,7 +407,7 @@ return array(
|
||||||
'rsrc/js/application/policy/behavior-policy-control.js' => '9a340b3d',
|
'rsrc/js/application/policy/behavior-policy-control.js' => '9a340b3d',
|
||||||
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
|
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
|
||||||
'rsrc/js/application/ponder/behavior-votebox.js' => '4e9b766b',
|
'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-project-create.js' => '065227cc',
|
||||||
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
|
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
|
||||||
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
|
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
|
||||||
|
@ -637,7 +637,7 @@ return array(
|
||||||
'javelin-behavior-policy-control' => '9a340b3d',
|
'javelin-behavior-policy-control' => '9a340b3d',
|
||||||
'javelin-behavior-policy-rule-editor' => '5e9f347c',
|
'javelin-behavior-policy-rule-editor' => '5e9f347c',
|
||||||
'javelin-behavior-ponder-votebox' => '4e9b766b',
|
'javelin-behavior-ponder-votebox' => '4e9b766b',
|
||||||
'javelin-behavior-project-boards' => '60292820',
|
'javelin-behavior-project-boards' => 'ba4fa35c',
|
||||||
'javelin-behavior-project-create' => '065227cc',
|
'javelin-behavior-project-create' => '065227cc',
|
||||||
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
|
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
|
||||||
'javelin-behavior-refresh-csrf' => '7814b593',
|
'javelin-behavior-refresh-csrf' => '7814b593',
|
||||||
|
@ -1247,15 +1247,6 @@ return array(
|
||||||
'javelin-workflow',
|
'javelin-workflow',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
),
|
),
|
||||||
60292820 => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-util',
|
|
||||||
'javelin-vector',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-workflow',
|
|
||||||
'phabricator-draggable-list',
|
|
||||||
),
|
|
||||||
60479091 => array(
|
60479091 => array(
|
||||||
'phabricator-busy',
|
'phabricator-busy',
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
|
@ -1729,6 +1720,15 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
),
|
),
|
||||||
|
'ba4fa35c' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-util',
|
||||||
|
'javelin-vector',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-workflow',
|
||||||
|
'phabricator-draggable-list',
|
||||||
|
),
|
||||||
'bba9eedf' => array(
|
'bba9eedf' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
|
|
|
@ -249,6 +249,9 @@ JX.behavior('project-boards', function(config, statics) {
|
||||||
for (ii = 0; ii < lists.length; ii++) {
|
for (ii = 0; ii < lists.length; ii++) {
|
||||||
lists[ii].setGroup(lists);
|
lists[ii].setGroup(lists);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
JX.Stratcom.listen(
|
||||||
'click',
|
'click',
|
||||||
|
@ -336,6 +339,9 @@ JX.behavior('project-boards', function(config, statics) {
|
||||||
statics.boardID = new_config.boardID;
|
statics.boardID = new_config.boardID;
|
||||||
}
|
}
|
||||||
update_statics(new_config);
|
update_statics(new_config);
|
||||||
|
if (data.fromServer) {
|
||||||
|
init_board();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +351,8 @@ JX.behavior('project-boards', function(config, statics) {
|
||||||
var current_page_id = JX.Quicksand.getCurrentPageID();
|
var current_page_id = JX.Quicksand.getCurrentPageID();
|
||||||
statics.boardConfigCache = {};
|
statics.boardConfigCache = {};
|
||||||
statics.boardConfigCache[current_page_id] = config;
|
statics.boardConfigCache[current_page_id] = config;
|
||||||
statics.setup = init_board();
|
init_board();
|
||||||
|
statics.setup = setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue