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.$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);