diff --git a/cron/jquery-cron.js b/cron/jquery-cron.js index 02721cc..1d38f3c 100644 --- a/cron/jquery-cron.js +++ b/cron/jquery-cron.js @@ -93,7 +93,8 @@ url_set : undefined, customValues : undefined, onChange: undefined, // callback function each time value changes - useGentleSelect: false + useGentleSelect: false, + formNamespace: '' }; // ------- build some static data ------- @@ -274,6 +275,18 @@ } return [min, hour, day, month, dow].join(" "); } + + + // Can optionally pass in a form namespace + function namespaceWrap(o, value) { + + if( o.formNamespace == '' ) + return value; + else + return o.formNamespace+'['+value+']'; + } + + // ------------------- PUBLIC METHODS ----------------- @@ -306,7 +319,7 @@ } block["period"] = $("" - + "Every " + custom_periods + str_opt_period + " ") .appendTo(this) .data("root", this); @@ -317,7 +330,7 @@ if (o.useGentleSelect) select.gentleSelect(eo); block["dom"] = $("" - + " on the " + str_opt_dom + " ") .appendTo(this) .data("root", this); @@ -326,7 +339,7 @@ if (o.useGentleSelect) select.gentleSelect(o.domOpts); block["month"] = $("" - + " of " + str_opt_month + " ") .appendTo(this) .data("root", this); @@ -335,7 +348,7 @@ if (o.useGentleSelect) select.gentleSelect(o.monthOpts); block["mins"] = $("" - + " at " + str_opt_mih + " minutes past the hour ") .appendTo(this) .data("root", this); @@ -344,7 +357,7 @@ if (o.useGentleSelect) select.gentleSelect(o.minuteOpts); block["dow"] = $("" - + " on " + str_opt_dow + " ") .appendTo(this) .data("root", this); @@ -353,8 +366,8 @@ if (o.useGentleSelect) select.gentleSelect(o.dowOpts); block["time"] = $("" - + " at :" + str_opt_hid + + ":