forked from RallyApps/app-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeamBoardDropController.js
32 lines (29 loc) · 1.29 KB
/
TeamBoardDropController.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function() {
var Ext = window.Ext4 || window.Ext;
Ext.define('Rally.apps.teamboard.TeamBoardDropController', {
alias: 'plugin.rallyteamboarddropcontroller',
extend: 'Rally.ui.cardboard.plugin.ColumnDropController',
handleBeforeCardDroppedSave: function (options) {
options.record.getCollection(options.column.attribute, {
autoLoad: true,
limit: Infinity,
listeners: {
load: function(store){
store.add(options.column.getValue());
store.remove(options.sourceColumn.getValue());
store.sync({
success: function(){
this._onDropSaveSuccess(options.column, options.sourceColumn, options.card, options.record, options.type);
},
failure: function(){
this._onDropSaveFailure(options.column, options.sourceColumn, undefined, options.record, options.card, options.sourceIndex, {});
},
scope: this
});
},
scope: this
}
});
}
});
})();