projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b0396a7
)
Fix Sort and Perpage widgets by yet more that=this.
author
Mike Taylor
<mike@indexdata.com>
Wed, 26 Mar 2014 17:18:18 +0000
(17:18 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 26 Mar 2014 17:18:18 +0000
(17:18 +0000)
src/mkws-widgets.js
patch
|
blob
|
history
diff --git
a/src/mkws-widgets.js
b/src/mkws-widgets.js
index
4173301
..
b29538e
100644
(file)
--- a/
src/mkws-widgets.js
+++ b/
src/mkws-widgets.js
@@
-275,11
+275,13
@@
mkws.registerWidgetType('Navi', promoteToNavi);
// anything, since they produce events rather than consuming them.
//
function promoteToSort() {
// anything, since they produce events rather than consuming them.
//
function promoteToSort() {
+ var that = this;
+
$(this.node).change(function () {
$(this.node).change(function () {
- this.team.set_sortOrder($(node).val());
- if (this.team.submitted()) {
- this.team.resetPage();
- this.team.reShow();
+ that.team.set_sortOrder($(that.node).val());
+ if (that.team.submitted()) {
+ that.team.resetPage();
+ that.team.reShow();
}
return false;
});
}
return false;
});
@@
-288,11
+290,13
@@
mkws.registerWidgetType('Sort', promoteToSort);
function promoteToPerpage() {
function promoteToPerpage() {
+ var that = this;
+
$(this.node).change(function() {
$(this.node).change(function() {
- this.team.set_perpage($(node).val());
- if (this.team.submitted()) {
- this.team.resetPage();
- this.team.reShow();
+ that.team.set_perpage($(that.node).val());
+ if (that.team.submitted()) {
+ that.team.resetPage();
+ that.team.reShow();
}
return false;
});
}
return false;
});