fix for editable elements without tooltip

This commit is contained in:
rolux 2012-01-02 11:54:54 +05:30
parent 812d172e23
commit 2f740a972a

View file

@ -158,7 +158,7 @@ Ox.Editable = function(options, self) {
setTimeout(function() {
self.$input.focusInput(false);
}, 0);
that.$tooltip.options({title: ''});
that.$tooltip && that.$tooltip.options({title: ''});
that.triggerEvent('edit', {editing: true});
}
}
@ -194,7 +194,7 @@ Ox.Editable = function(options, self) {
self.$input.value(formatInputValue()).hide();
self.$test.html(formatTestValue());
self.$value.html(formatValue()).show();
that.$tooltip.options({title: self.options.tooltip});
that.$tooltip && that.$tooltip.options({title: self.options.tooltip});
that.triggerEvent('submit', {
value: self.options.value
});