init
This commit is contained in:
32
src/editable-form/editable-form-jqueryui.js
Normal file
32
src/editable-form/editable-form-jqueryui.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Editable-form jQuery UI engine
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
$.extend($.fn.editableform.Constructor.prototype, {
|
||||
initTemplate: function() {
|
||||
this.$form = $($.fn.editableform.template);
|
||||
|
||||
//init 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
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//form template
|
||||
$.fn.editableform.template = '<form class="editableform"><div class="control-group">' +
|
||||
' <button type="submit" style="height: 24px">submit</button> <button type="button" style="height: 24px">cancel</button></div>' +
|
||||
'<div class="editable-error-block"></div>' +
|
||||
'</form>';
|
||||
|
||||
//error classes
|
||||
$.fn.editableform.errorGroupClass = null;
|
||||
$.fn.editableform.errorBlockClass = 'ui-state-error';
|
||||
|
||||
}(window.jQuery));
|
Reference in New Issue
Block a user