From d3717b55ec9de02877db2417ac3fac5386d1b783 Mon Sep 17 00:00:00 2001 From: Quoc Vu Date: Sat, 22 Sep 2012 00:32:08 +0000 Subject: [PATCH 1/3] allow submit/cancel buttons to be styled. Also assign and ID to the form for easier reference in the css --- jquery.jeditable.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jquery.jeditable.js b/jquery.jeditable.js index eb8a911..16664f9 100644 --- a/jquery.jeditable.js +++ b/jquery.jeditable.js @@ -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 ?? @@ -177,6 +180,11 @@ /* Create the form object. */ var 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) { @@ -423,6 +431,7 @@ } else { var submit = $('