-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (33 loc) · 962 Bytes
/
index.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
33
34
35
36
37
38
/**
* Overrides to allow a store load to the canceled which will abort loading
* any subsequent pages and not invoke the load callback.
*/
Ext.override(Rally.data.PageableStore, {
loadCanceled: false,
cancelLoad: function() {
this.loadCanceled = true;
},
load: function(options) {
this.loadCanceled = false;
this.callParent(arguments);
},
_shouldLoadMorePages: function(operation) {
if (this.loadCanceled) {
return false;
}
else {
return this.callParent(arguments)
}
},
_afterDoneLoadingAllPages: function(operation, success, callback, scope) {
if (this.loadCanceled) {
// Loading canceled. Don't send any events or invoke the callback
this.resumeEvents();
this.currentPage = 1;
this.loading = false;
}
else {
this.callParent(arguments);
}
}
});