Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
I am adding CSS classes to the submit and cancel button allowing to style them individually

h3. Changelog

h4. 1.7.2
Expand Down
10 changes: 10 additions & 0 deletions jquery.jeditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
* @param String options[cancel] cancel button value, empty means no button **
* @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. **
* @param String options[style] Style to apply to input form 'inherit' to copy from parent. **
* @param String options[formid] Give an id to the form to allow to style it **
* @param String options[submitcssclass] CSS class to apply to submit button **
* @param String options[cancelcssclass] CSS class to apply to cancel button **
* @param String options[select] true or false, when true text is highlighted ??
* @param String options[placeholder] Placeholder text or html to insert when element is empty. **
* @param String options[onblur] 'cancel', 'submit', 'ignore' or function ??
Expand Down Expand Up @@ -177,6 +180,11 @@
/* Create the form object. */
var form = $('<form />');

/* Assign a DOM Id to the form */
if (settings.formid) {
form.attr('id', settings.formid);
}

/* Apply css or style or both. */
if (settings.cssclass) {
if ('inherit' == settings.cssclass) {
Expand Down Expand Up @@ -423,6 +431,7 @@
} else {
var submit = $('<button type="submit" />');
submit.html(settings.submit);
submit.addClass(settings.submitcssclass);
}
$(this).append(submit);
}
Expand All @@ -434,6 +443,7 @@
} else {
var cancel = $('<button type="cancel" />');
cancel.html(settings.cancel);
cancel.addClass(settings.cancelcssclass);
}
$(this).append(cancel);

Expand Down