Files
x-editable/src/editable-form/editable-form-jqueryui.js
2012-11-26 13:01:04 +04:00

28 lines
858 B
JavaScript

/*
Editableform based on jQuery UI
*/
(function ($) {
$.extend($.fn.editableform.Constructor.prototype, {
initTemplate: function() {
this.$form = $($.fn.editableform.template);
//buttons
this.$form.find('div.editable-buttons').append($.fn.editableform.buttons);
this.$form.find('button[type=submit]').button({
icons: { primary: "ui-icon-check" },
text: false
}).removeAttr('title');
this.$form.find('button[type=button]').button({
icons: { primary: "ui-icon-cancel" },
text: false
}).removeAttr('title');
}
});
//error classes
$.fn.editableform.errorGroupClass = null;
$.fn.editableform.errorBlockClass = 'ui-state-error';
}(window.jQuery));