update editable to no longer trigger submit on cancel, and to listen to the submit event of its input
This commit is contained in:
parent
76c97f7bdc
commit
b957106624
1 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue