comparison web/views/set.tpl @ 191:8318d50d766d

gets current params
author Matt Johnston <matt@ucc.asn.au>
date Tue, 11 Feb 2014 22:10:32 +0800
parents 101c66da848d
children 4fa8cbf31065
comparison
equal deleted inserted replaced
189:101c66da848d 191:8318d50d766d
255 255
256 input.blur(function(e) { 256 input.blur(function(e) {
257 setter.edit(param, Number(this.value)); 257 setter.edit(param, Number(this.value));
258 }); 258 });
259 259
260 $(".button_up", el).on("vmousedown", function() { 260 $(".button_up", el).on("vmousedown", function(e) {
261 e.preventDefault();
261 setter.adjust(param, 1); 262 setter.adjust(param, 1);
262 this.blur() 263 this.blur()
263 }); 264 });
264 $(".button_down", el).on("vmousedown", function() { 265 $(".button_down", el).on("vmousedown", function(e) {
266 e.preventDefault();
265 setter.adjust(param, -1); 267 setter.adjust(param, -1);
266 this.blur() 268 this.blur()
267 }); 269 });
268 270
269 set_text_state(el, param); 271 set_text_state(el, param);
272 { 274 {
273 var el = $($.render(button_template, param)).appendTo(root); 275 var el = $($.render(button_template, param)).appendTo(root);
274 var button_yes = $(".button_yes", el); 276 var button_yes = $(".button_yes", el);
275 var button_no = $(".button_no", el); 277 var button_no = $(".button_no", el);
276 278
277 button_yes.on("vmousedown", function() { 279 button_yes.on("vmousedown", function(e) {
278 setter.edit(param, true); 280 setter.edit(param, true);
279 this.blur() 281 this.blur()
280 }) 282 })
281 283
282 button_no.on("vmousedown", function() { 284 button_no.on("vmousedown", function(e) {
283 setter.edit(param, false); 285 setter.edit(param, false);
284 this.blur() 286 this.blur()
285 }) 287 })
286 288
287 set_button_state(el, param.value); 289 set_button_state(el, param.value);