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
(parent:
e2693f1
)
The Perpage widget's promotion-function is now anonymous.
author
Mike Taylor
<mike@indexdata.com>
Wed, 26 Mar 2014 17:19:45 +0000
(17:19 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 26 Mar 2014 17:19:45 +0000
(17:19 +0000)
This feels strangely daring. It's very neat and concise, but may be
wandering dangerously close to the line where elegance is bought at
the price of incomprehensibility.
src/mkws-widgets.js
patch
|
blob
|
history
diff --git
a/src/mkws-widgets.js
b/src/mkws-widgets.js
index
b29538e
..
b286705
100644
(file)
--- a/
src/mkws-widgets.js
+++ b/
src/mkws-widgets.js
@@
-289,7
+289,7
@@
function promoteToSort() {
mkws.registerWidgetType('Sort', promoteToSort);
-function promoteToPerpage() {
+mkws.registerWidgetType('Perpage', function() {
var that = this;
$(this.node).change(function() {
@@
-300,5
+300,4
@@
function promoteToPerpage() {
}
return false;
});
-}
-mkws.registerWidgetType('Perpage', promoteToPerpage);
+});