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:
8ef726f
)
No need to stash the button object in this.button.
author
Mike Taylor
<mike@indexdata.com>
Mon, 11 Aug 2014 13:08:49 +0000
(14:08 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Mon, 11 Aug 2014 13:08:49 +0000
(14:08 +0100)
Just keep it in a local variable.
src/mkws-widget-builder.js
patch
|
blob
|
history
diff --git
a/src/mkws-widget-builder.js
b/src/mkws-widget-builder.js
index
60ee37b
..
6468e86
100644
(file)
--- a/
src/mkws-widget-builder.js
+++ b/
src/mkws-widget-builder.js
@@
-2,12
+2,12
@@
mkws.registerWidgetType('Builder', function() {
var that = this;
var team = this.team;
- this.button = mkws.$('<button/>', {
+ var button = mkws.$('<button/>', {
type: 'button',
text: this.config.text || "Build!"
});
- this.node.append(this.button);
- this.button.click(function() {
+ this.node.append(button);
+ button.click(function() {
var query = team.widget('Query').value();
var sort = team.widget('Sort').value();
var perpage = team.widget('Perpage').value();