From b957106624efd2d1e14bf12aabb786756395405b Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 6 Nov 2011 11:50:13 +0000 Subject: [PATCH] update editable to no longer trigger submit on cancel, and to listen to the submit event of its input --- source/Ox.UI/js/Form/Ox.Editable.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/Ox.UI/js/Form/Ox.Editable.js b/source/Ox.UI/js/Form/Ox.Editable.js index 58c4c7c5..d18f9908 100644 --- a/source/Ox.UI/js/Form/Ox.Editable.js +++ b/source/Ox.UI/js/Form/Ox.Editable.js @@ -70,9 +70,6 @@ Ox.Editable = function(options, self) { self.$input.options({value: formatInputValue()}).hide(); self.$test.html(formatTestValue()); self.$value.html(formatValue()).show(); - that.triggerEvent('submit', { - value: self.options.value - }); } function change(event) { @@ -134,8 +131,8 @@ Ox.Editable = function(options, self) { .bindEvent({ blur: submit, cancel: cancel, - change: change - //submit: submit + change: change, + submit: submit }) .appendTo(that.$element); self.$input.find('input').css(self.css);