update editable to no longer trigger submit on cancel, and to listen to the submit event of its input

This commit is contained in:
rlx 2011-11-06 11:50:13 +00:00
parent 76c97f7bdc
commit b957106624

View file

@ -70,9 +70,6 @@ Ox.Editable = function(options, self) {
self.$input.options({value: formatInputValue()}).hide(); self.$input.options({value: formatInputValue()}).hide();
self.$test.html(formatTestValue()); self.$test.html(formatTestValue());
self.$value.html(formatValue()).show(); self.$value.html(formatValue()).show();
that.triggerEvent('submit', {
value: self.options.value
});
} }
function change(event) { function change(event) {
@ -134,8 +131,8 @@ Ox.Editable = function(options, self) {
.bindEvent({ .bindEvent({
blur: submit, blur: submit,
cancel: cancel, cancel: cancel,
change: change change: change,
//submit: submit submit: submit
}) })
.appendTo(that.$element); .appendTo(that.$element);
self.$input.find('input').css(self.css); self.$input.find('input').css(self.css);