new form template fixes

This commit is contained in:
vitalets
2012-11-26 13:01:04 +04:00
parent c9f2f31add
commit 999bbe25df
4 changed files with 34 additions and 26 deletions

@ -4,26 +4,23 @@ 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
});
this.$form.find('button[type=button]').button({
icons: { primary: "ui-icon-cancel" },
text: false
});
}
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');
}
});
//buttons
$.fn.editableform.buttons = '<button type="submit" style="height: 24px">submit</button><button type="button" style="height: 24px">cancel</button>';
//error classes
$.fn.editableform.errorGroupClass = null;
$.fn.editableform.errorBlockClass = 'ui-state-error';