Add UI for alternate board ordering rules

Summary:
Ref T4807. This doesn't actually do anything yet, but adds a dropdown menu for choosing an ordering and gets all the UI working correctly.

This also fixes a bug where column hidden state wouldn't persist across filter changes.

(I won't land this until it does something, but the next diff will probably be a mess so this seemed like a clean place to sever things.)

Test Plan:
{F187114}

  - Altered sort ordering.
  - Altered hidden state and filters, verified all states persisted correctly.
  - Added `phlog()` to edit/create and move controllers and verified they receive sort information.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: swisspol, chad, epriestley

Maniphest Tasks: T4807

Differential Revision: https://secure.phabricator.com/D10178
This commit is contained in:
epriestley
2014-08-08 08:10:29 -07:00
parent 12aaa942ac
commit fdf6b56261
6 changed files with 145 additions and 26 deletions

View File

@@ -81,6 +81,8 @@ JX.behavior('project-boards', function(config) {
data.beforePHID = before_phid;
}
data.order = config.order;
var workflow = new JX.Workflow(config.moveURI, data)
.setHandler(function(response) {
onresponse(response, item, list);
@@ -148,11 +150,13 @@ JX.behavior('project-boards', function(config) {
e.kill();
var column = e.getNode('project-column');
var request_data = {
'responseType' : 'card',
'columnPHID' : JX.Stratcom.getData(column).columnPHID };
responseType: 'card',
columnPHID: JX.Stratcom.getData(column).columnPHID,
order: config.order
};
new JX.Workflow(e.getNode('tag:a').href, request_data)
.setHandler(JX.bind(null, onedit, column))
.start();
.setHandler(JX.bind(null, onedit, column))
.start();
});
JX.Stratcom.listen(
@@ -162,9 +166,11 @@ JX.behavior('project-boards', function(config) {
e.kill();
var column_phid = e.getNodeData('column-add-task').columnPHID;
var request_data = {
'responseType' : 'card',
'columnPHID' : column_phid,
'projects' : config.projectPHID };
responseType: 'card',
columnPHID: column_phid,
projects: config.projectPHID,
order: config.order
};
var cols = JX.DOM.scry(JX.$(config.boardID), 'ul', 'project-column');
var ii;
var column;
@@ -175,7 +181,7 @@ JX.behavior('project-boards', function(config) {
}
}
new JX.Workflow(config.createURI, request_data)
.setHandler(JX.bind(null, onedit, column))
.start();
.setHandler(JX.bind(null, onedit, column))
.start();
});
});