From f8ef335b1e3bf613fc20a83826227d028fe66899 Mon Sep 17 00:00:00 2001 From: Niko Berger Date: Thu, 25 Jul 2013 14:45:34 +0200 Subject: [PATCH] update to 1.0.5 --- ...query.jsForm-1.0.4.js => jquery.jsForm-1.0.5.js} | 13 ++++++++++--- dist/jquery.jsForm.1.0.4.min.js | 6 ------ dist/jquery.jsForm.1.0.5.min.js | 6 ++++++ dist/jquery.jsForm.min.map | 2 +- jsForm.jquery.json | 2 +- package.json | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) rename dist/{jquery.jsForm-1.0.4.js => jquery.jsForm-1.0.5.js} (95%) delete mode 100644 dist/jquery.jsForm.1.0.4.min.js create mode 100644 dist/jquery.jsForm.1.0.5.min.js diff --git a/dist/jquery.jsForm-1.0.4.js b/dist/jquery.jsForm-1.0.5.js similarity index 95% rename from dist/jquery.jsForm-1.0.4.js rename to dist/jquery.jsForm-1.0.5.js index bf83645..1b30359 100644 --- a/dist/jquery.jsForm-1.0.4.js +++ b/dist/jquery.jsForm-1.0.5.js @@ -551,7 +551,8 @@ // skip empty if(name.length < 1) { - return; + pojo = $(this).val(); + return false; } var val = $(this).val(); @@ -631,6 +632,8 @@ // more should not be necessary } }); + + return pojo; }; @@ -895,7 +898,7 @@ } var ele = {}; - that._createPojoFromInput($(this), fieldname, ele); + ele = that._createPojoFromInput($(this), fieldname, ele); // also collect sub-collections that._getCollection($(this), fieldname, ele, ignoreInvalid); @@ -1289,7 +1292,7 @@ /** * Retrieve a value from a given object by using dot-notation * @param obj the object to start with - * @param the child to get (dot notation) + * @param the child to get (dot notation) * @param create set to true and non-existant levels will be created (always returns non-null) * @private */ @@ -1301,6 +1304,10 @@ if (!obj) { return ""; } + // reference the object itself + if(expr === "") + return obj; + ret = obj[expr]; if(!ret) { try { diff --git a/dist/jquery.jsForm.1.0.4.min.js b/dist/jquery.jsForm.1.0.4.min.js deleted file mode 100644 index 82fd0f7..0000000 --- a/dist/jquery.jsForm.1.0.4.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * jQuery.jsForm v1.0.4 | (c) 2013 Niko Berger http://www.gargan.org/ - * Usage: https://github.com/corinis/jsForm - */ -(function(t,e,a){"use strict";function i(e,a){var i=t(e);this.options=t.extend({},{controls:!0,data:null,prefix:"data",validateHidden:!0},a),!i.attr("data-prefix")||"data"!==this.options.prefix&&""!==this.options.prefix||""!==i.attr("data-prefix")&&(this.options.prefix=i.attr("data-prefix")),this.element=e,this._init()}var s={},n={};i.prototype._init=function(){if(this._domInit(),this.options.controls)if(t.jsFormControls)t(this.element).jsFormControls();else try{"undefined"!=typeof console&&console.log("jquery.JsForm.controls not available!")}catch(e){}this._fill(this.element,this.options.data,this.options.prefix)},i.prototype._domInit=function(){var e=t(this.element),a=this,i=this.options.prefix;a._initCollection(e,i)},i.prototype._initCollection=function(e,a){var i={},s=this;t(e).data().collections=i,t(".collection",e).each(function(){var e=t(this).attr("data-field");if(e&&0===e.indexOf(a+".")){var n=t(this),r=i[e];if(r?r.push(n):i[e]=[n],s._initList(n),!n.hasClass("ui-sortable")&&n.hasClass("sortable")&&n.sortable){var o=n.attr("data-sortable");o=o?JSON.parse(o):{},n.sortable(o),n.on("sortstop",function(){s._reorder(n)})}}}),t(".add",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections")||(t(this).data().collections=i[e],t(this).click(function(a){a.preventDefault(),t.each(t(this).data("collections"),function(){var a=t(this).data("template");if(a){var i=a.clone(!0);t(this).append(i),t(i).addClass("POJO"),t(i).data("pojo",{}),s._addCollectionControls(i),t(this).trigger("addCollection",[i,t(i).data().pojo]),s._fillData(i,t(i).data().pojo,e.substring(e.indexOf(".")+1)),s._initCollection(i,e.substring(e.indexOf(".")+1)),t(this).trigger("postAddCollection",[i,t(i).data().pojo])}})})))}),t(".insert",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections")||(t(this).data("collections",i[t(this).attr("data-field")]),t(this).on("insert",function(a,i){if(i||(i=t(this).data().pojo),i){var n=t(this).data("beforeInsert");n&&t.isFunction(n)&&!(i=n(i))||(t.each(t(this).data("collections"),function(){var a=t(this).data("template");if(a){var n=a.clone(!0);n.addClass("POJO"),n.data().pojo=i,s._addCollectionControls(n),s._initCollection(n),t(this).trigger("addCollection",[n,t(n).data().pojo]),s._fillData(n,i,e.substring(e.indexOf(".")+1)),t(this).append(n)}}),t(this).val(""),t(this).data().pojo=null,t(this).focus())}})))}),t(".insertAction",e).each(function(){var e=t(this).attr("data-field");if(e&&!t(this).data("inserter")){var a=t(this).parent().find(".insert");a&&(t(this).data("inserter",a),t(this).click(function(e){return e.preventDefault(),t(this).data("inserter").trigger("insert"),!1}))}}),t("input.object",e).each(function(){t(this).on("update",function(){var e=t(this).data().pojo;e&&t(this).attr("data-display")&&t(this).val(s._renderObject(e,t(this).attr("data-display")))})}),t("input.blob",e).each(function(){if("file"===t(this).attr("type")){var e=t(this);t(this).on("change",function(a){var i=t(this).val().split(/\\/).pop();e.data("name",i);var s=a.target.files;s&&s.length&&t.each(s,function(){var a=new FileReader;a.onload=function(t){e.data("blob",t.target.result)},a.readAsDataURL(this),t(this).trigger("fileChange")})})}}),t(".manage",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections",i[e]),t(this).click(function(){var a=t(this).attr("data-service"),i=t(this).data("collections"),n=t(this),r=t(this).attr("data-display");r&&(r=r.split(",")),DataUtils.run(a,function(a){var o=t('');o.data("collections",i),n.data("select",o),t.each(a,function(){var e=this,a="";if(r)for(var s=0;r.length>s;s++)a+=e[r[s]]+" ";else a=e;var n=t('");t(i).each(function(){t(this).children().each(function(a,i){e.id===t(i).data("pojo").id&&n.attr("selected","selected")})}),o.append(n),n.data("pojo",e)}),n.after(o),n.hide(),o.multiselect({autoOpen:!0,open:function(){t(this).multiselect("widget").css("top",t(o).next().offset().top),t(this).multiselect("widget").css("left",t(o).next().offset().left),t(o).next().hide()},close:function(){n.show(),o.remove(),t(this).multiselect("destroy")}}).multiselectfilter().bind("multiselectclick multiselectcheckall multiselectuncheckall",function(){var a=t.map(t(this).multiselect("getChecked"),function(e){return t("option[value='"+e.value+"']",o).data("pojo")});t.each(t(o).data("collections"),function(){s._fillList(t(this),a,e)}),n.hide(),t(o).next().show(),t(this).multiselect("widget").css("top",t(o).next().offset().top),t(this).multiselect("widget").css("left",t(o).next().offset().left),t(o).next().hide()})})}))})},i.prototype._initList=function(t){if(!t.data("template")){var e=t.children().detach();e.removeAttr("id"),t.data("template",e)}},i.prototype._clear=function(e,a){a||(a=this.options.prefix),t(e).removeData("pojo"),t("input,select,textarea",e).each(function(){var e=t(this).attr("name");e&&0===e.indexOf(a+".")&&(e=e.substring((a+".").length),1>e.length||(t(this).removeData("pojo"),"checkbox"===t(this).attr("type")?t(this).prop("checked",!1):t(this).val(""),t(this).hasClass("blob")&&t(this).removeData("blob"),t(this).is("select")&&(t('option[selected="selected"]',this).removeAttr("selected"),t("option:first",this).attr("selected",!0),t(this).val(t("option:first",this).val()).change()),t(this).change()))}),t(".collection",e).each(function(){var e=t(this).attr("data-field");e&&0===e.indexOf(a+".")&&t(this).empty()})},i.prototype._createPojoFromInput=function(e,i,s){var n=null,r=this;t(e).data("pojo")&&(n=t(e).data("pojo")),n&&t.extend(!0,s,n),t(e).find("input,select,textarea").each(function(){var e=t(this).attr("name");if(e&&!(t(this).hasClass("transient")||0!==e.indexOf(i+".")||(t(this).trigger("validate",!0),e=e.substring((i+".").length),1>e.length))){var n=t(this).val();if(t(this).hasClass("emptynull")?(""===n||""===n.trim())&&(n=null):t(this).hasClass("object")||t(this).hasClass("POJO")?n=t(this).data("pojo"):t(this).hasClass("blob")?n=t(this).data("blob"):""===n&&(t(this).hasClass("number")||t(this).hasClass("dateFilter")||t(this).hasClass("dateTimeFilter"))&&(n=null),t(this).hasClass("percent")&&(n=r._getNumber(n),isNaN(n)?n=0:n/=100),(t(this).hasClass("number")||t(this).hasClass("currency"))&&(n=r._getNumber(n),isNaN(n)&&(n=0)),("checkbox"===t(this).attr("type")||"CHECKBOX"===t(this).attr("type"))&&(n=t(this).is(":checked")),-1===e.indexOf("."))s[e]=n;else{var o,l,h=e.split("."),c=s[h[0]];c&&t.isPlainObject(c)||(s[h[0]]={},c=s[h[0]]),2===h.length?c[h[1]]=n:3===h.length?(o=c[h[1]],o===a&&(o={},c[h[1]]=o),o[h[2]]=n):4===h.length&&(o=c[h[1]],l=o[h[2]],l===a&&(l={},o[h[2]]=l),o[h[2]]=n,l[h[3]]=n)}}})},i.prototype._fillData=function(e,i,s){var n=this,r=t(e);r.find(".field").each(function(){var e=t(this).data("name");if(e||("A"===this.nodeName.toUpperCase()?(e=t(this).attr("href"),t(this).attr("href","#")):"IMG"===this.nodeName.toUpperCase()?(e=t(this).attr("src"),0===e.indexOf("#")&&(e=e.substring(1)),t(this).attr("src","#")):e=t(this).text(),t(this).data("name",e),t(this).show()),!s||e.indexOf(s+".")>=0){var a=e;s&&(a=a.substring(s.length+1));var r=n._get(i,a);r||(r=""),t(this).hasClass("percent")&&!isNaN(r)&&(r=100*Number(r)),t.jsFormControls&&(r=t.jsFormControls.Format.format(this,r)),"A"===this.nodeName.toUpperCase()?t(this).attr("href",r):"IMG"===this.nodeName.toUpperCase()?t(this).attr("src",r):"DIV"===this.nodeName.toUpperCase()?t(this).html(r):t(this).text(r)}}),t("input",r).each(function(){var e=t(this).attr("name");if(e&&"file"!=t(this).attr("type")&&(!s||e.indexOf(s+".")>=0)){var a=e;s&&(a=a.substring(s.length+1));var r=n._get(i,a);t(this).hasClass("percent")&&!isNaN(r)?r=100*Number(r):t.isPlainObject(r)&&(t(this).data().pojo=r,t(this).addClass("POJO"),r=n._renderObject(r,t(this).attr("data-display"))),"checkbox"===t(this).attr("type")?(t(this).prop("checked",r===!0||"true"===r),t(this).change()):(r||(r=""),t.jsFormControls&&(r=t.jsFormControls.Format.format(this,r)),t(this).val(r),t(this).change())}}),t("select",r).each(function(){var e=t(this).attr("name");if(e&&(!s||e.indexOf(s+".")>=0)){var r=e;s&&(r=r.substring(s.length+1)),t(this).children("option").removeAttr("selected");var o=n._get(i,r);if(o.id)return t(this).children("option[value='"+o.id+"']").attr("selected",!0),t(this).val(o.id).change(),a;t(this).children("option[value='"+o+"']").attr("selected",!0),t(this).val(o).change()}}),t("textarea",r).each(function(){var e=t(this).attr("name");if(e&&(!s||e.indexOf(s+".")>=0)){var a=e;s&&(a=a.substring(s.length+1)),t(this).val(n._get(i,a)),t(this).change()}})},i.prototype.get=function(e){var a=t(this.element),i=this,s=this.options.data,n=this.options.prefix,r={};s&&t.isPlainObject(s)&&(r=s),i._createPojoFromInput(a,n,r);var o=!1;return this.options.validateHidden?a.find(".invalid").each(function(){return o=!0,t(this).focus(),!1}):a.find(".invalid").filter(":visible").each(function(){return o=!0,t(this).focus(),!1}),this._getCollection(a,n,r,e)&&(o=!0),!e&&o?null:r},i.prototype._getCollection=function(e,a,i,s){var n=this,r=!1;return e.find(".collection").each(function(){if(s||!r){var e=t(this).attr("data-field");if(e&&0===e.indexOf(a+".")&&(e=e.substring((a+".").length),!(1>e.length))){var o=n._getParent(i,e,!0);-1!==e.indexOf(".")&&(e=e.substring(e.lastIndexOf(".")+1)),o[e]=[],t(this).children().each(function(){if(s||!r){var a={};n._createPojoFromInput(t(this),e,a),n._getCollection(t(this),e,a,s),n._isEmpty(a)?t(".invalid",this).removeClass("invalid"):(t(".invalid",this).length>0&&(r=!0),o[e].push(a))}})}}}),r},i.prototype.getData=function(){return this.options.data||(this.options.data={}),this.options.data},i.prototype.preventEditing=function(e){var i=t(this.element);if(e===a)e=i.data("disabled")?!1:!0;else if(e===i.data("disabled"))return;e?(i.find("input, textarea").each(function(){if(!t(this).closest("span.form")[0]&&"hidden"!=t(this).attr("type")){var e=t(this).val();("null"===e||null===e||"submit"===t(this).attr("type"))&&(e=""),t(this).hasClass("trueFalse")&&(e=t(this).is(":checked")?"X":" "),e=e.replace(//g,">").replace(/\n/g,"
");var a=t(''+e+"");t(this).parent().hasClass("ui-wrapper")?t(this).parent().hide().wrap(a):t(this).hide().wrap(a)}}),i.find("select").each(function(){if(!t(this).closest("span.form")[0]){var e=t(this).children(":selected").html();("null"===e||null===e)&&(e="");var a=t(''+e+"");t(this).hasClass("ui-toggle-switch")?t(this).prev().hide().wrap(a):t(this).hide().wrap(a)}})):i.find("span.form").each(function(){var e=t(this).children("input,select,textarea,.ui-wrapper,.ui-toggle-switch").show().detach();t(this).before(e),t(this).remove()}),i.data("disabled",e)},i.prototype.validate=function(){return t(".required,.regexp,.date,.mandatory,.number,.validate",this.element).change(),t(".invalid",this.element).length>0?!1:!0},i.prototype._fill=function(e,a,i){i||(i=this.config.prefix),this._clear(e,i),t(e).addClass("POJO"),t(e).data("pojo",a),this._fillData(e,a,i),this._fillCollection(e,a,i)},i.prototype._fillCollection=function(e,a,i){var s=this;t(".collection",e).each(function(){var e=t(this),n=t(this).attr("data-field");if(a&&n&&0===n.indexOf(i+".")){var r=null,o=n;i&&(o=o.substring(i.length+1)),r=s._get(a,o),r&&s._fillList(e,r,o)}})},i.prototype._fillList=function(e,a,i,s){var n=e.data("template"),r=this;if(n&&(e.empty(),t.isArray(a))){if(-1!==i.indexOf(".")&&(i=i.substring(i.lastIndexOf(".")+1)),t(e).hasClass("sort")){var o=t(e).attr("data-sort");if(o){switch(t(e).attr("data-sorttype")){case"alpha":a.sort();break;case"alphainsensitiv":a.sort(function(t,e){return t=t[o],e=e[o],t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase()),e>t?-1:t>e?1:0});break;default:a.sort(function(t,e){return t[o]-e[o]})}t(e).attr("data-sortdesc")&&a.reverse()}}s||t.isFunction(i)&&(s=i,i=null);for(var l=0;a.length>l;l++){var h=a[l],c=n.clone(!0);c.data("pojo",h),c.addClass("POJO"),s&&s(c,h)===!1||(r._addCollectionControls(c),i&&(r._fillData(c,h,i),r._initCollection(c,i),r._fillCollection(c,h,i)),e.append(c))}}},i.prototype._addCollectionControls=function(e){var a=this;t.jsFormControls&&t(e).jsFormControls(),t(".delete",e).click(function(){var e=t(this).closest(".POJO");t(this).closest(".collection").trigger("deleteCollection",[e,t(e).data().pojo]),e.remove()}),t(".sortUp",e).click(function(){var e=t(this).closest(".POJO"),i=e.prev(".POJO");0!==i.size()&&(e.detach(),i.before(e),a._reorder(e))}),t(".sortDown",e).click(function(){var e=t(this).closest(".POJO"),i=e.next(".POJO");0!==i.size()&&(e.detach(),i.after(e),a._reorder(e))});var i=t(e).closest(".collection");i.hasClass("sortable")&&t(i).sortable&&i.sortable("refresh")},i.prototype._reorder=function(e){e.attr("data-sort")||(e=e.closest(".collection"));var a=t(e).attr("data-sort");if(!(!a||t(e).attr("data-sorttype")&&"number"!==t(e).attr("data-sorttype")||t(e).attr("data-sortdesc")&&"false"!==t(e).attr("data-sortdesc"))){var i=0;t.each(t(e).children(),function(){var e=t(this).data("pojo");e||(e={},t(this).data("pojo",e)),e[a]=i++})}},i.prototype._renderObject=function(e,a){if(!a||!e)return"";var i=this,s="";return t.each(a.split(","),function(){var t=this.trim();s+=0===t.indexOf("'")||0===t.indexOf('"')?t.substring(1,t.length-1):i._get(e,t)}),s},i.prototype._get=function(t,e,i){var s,n,r,o="";if("function"==typeof e)return e(t);if(!t)return"";if(s=t[e],!s)try{if("string"==typeof e&&(o=e.split(".")),r=o.length)for(s=t;s&&r--;)n=o.shift(),i&&!s[n]&&(s[n]={}),s=s[n]}catch(l){}return(null===s||s===a)&&(s=""),s.trim?s.trim():s},i.prototype._getParent=function(t,e,a){return-1===e.indexOf(".")?t:(e=e.substring(0,e.lastIndexOf(".")),this._get(t,e,a))},i.prototype._getNumber=function(e){return e?t.format?t.format.number(e):((-1!=e.indexOf(",")||e.length-e.indexOf(".")>3)&&(e=e.replace(/\./g,"").replace(",",".")),Number(e)):null},i.prototype._isEmpty=function(e){if(!e)return!0;if(t.isArray(e)){if(0===e.length)return!0;for(var a=0;e.length>a;a++)if(!this._isEmpty())return!1;return!0}if(t.isPlainObject(e)){if(t.isEmptyObject(e))return!0;for(var i in e)if(!this._isEmpty(e[i]))return!1;return!0}return isNaN(e)?""===e||" "===e:0===Number(e)||-1===Number(e)?!0:!1},i.prototype._pojoDifferFromInput=function(e,i,s){var n=!1;return t("input,select,textarea",e).each(function(){if(!n){var e=t(this).attr("name");if(e&&!(t(this).hasClass("transient")||0!==e.indexOf(i+".")||(e=e.substring((i+".").length),1>e.length))){var r=t(this).val();if(""===r&&(t(this).hasClass("number")||t(this).hasClass("dateFilter")||t(this).hasClass("dateTimeFilter"))&&(r=null),(t(this).hasClass("number")||t(this).hasClass("currency"))&&(r=that._getNumber(r),isNaN(r)&&(r=0)),("checkbox"===t(this).attr("type")||"CHECKBOX"===t(this).attr("type"))&&(r=t(this).is(":checked")),-1===e.indexOf("."))s[e]!==r&&(n=!0);else{var o,l,h=e.split("."),c=s[h[0]];if(!c)return n=!0,a;2===h.length?c[h[1]]!==r&&(n=!0):3===h.length?(o=c[h[1]],o[h[2]]!==r&&(n=!0)):4===h.length&&(o=c[h[1]],l=o[h[2]],l[h[3]]!==r&&(n=!0))}}}}),n},i.prototype.equals=function(e){var i=this,s=this.element,n=this.options.prefix;if(this._pojoDifferFromInput(s,n,e))return!1;var r=!1;return t(".invalid",s).length>0?!1:(t(".collection",s).each(function(){if(!r){var s=t(this).attr("data-field");if(s&&0===s.indexOf(n+".")&&(s=s.substring((n+".").length),!(1>s.length))){var o=0;t(this).children().each(function(){if(!r){if(o>=e[s].length)return r=!0,a;var n=e[s][o++];i._pojoDifferFromInput(t(this),s,n)&&(r=!0)}}),e[s].length>o&&(r=!0)}}}),!r)},i.prototype.fill=function(t){this.clear(),this.options.data=t,this._fill(this.element,this.options.data,this.options.prefix)},i.prototype.clear=function(){this._clear(this.element,this.options.prefix)},i.prototype.destroy=function(){return t(this.element).each(function(){t(e).unbind(".jsForm"),t(this).removeData("jsForm")})},t.fn.jsForm=function(e){if("object"!=typeof e&&e){var s,n=Array.prototype.slice.call(arguments,1);if(0===this.length)return null;if(1===this.length&&(s=t(this).data("jsForm"))){if(0!==e.indexOf("_")&&s[e]){var r=s[e].apply(s,n);return r}return t.error("Method "+e+" does not exist on jQuery.jsForm"),!1}return this.each(function(){return s=t.data(this,"jsForm"),s?0!==e.indexOf("_")&&s[e]?s[e].apply(s,n):(t.error("Method "+e+" does not exist on jQuery.jsForm"),!1):a})}return this.each(function(){t(this).data("jsForm")||t(this).data("jsForm",new i(this,e))})},t.jsForm=function(e,a){var i=n[e];if(t.isFunction(a))i&&t.each(i,function(){a(this,t(this.element))}),s[e]=a;else if(i){var r=a,o=Array.prototype.slice.call(arguments,2);t.each(portlets,function(){this[r].apply(this,o)})}}})(jQuery,window),function(t){"use strict";function e(t){this.element=t,this._domInit()}var a={},i={};"undefined"!=typeof Handlebars&&(Handlebars.registerHelper("currency",function(e){return e?t.jsFormControls.Format.currency(e):"0"}),Handlebars.registerHelper("dec",function(e){return e?t.jsFormControls.Format.decimal(e):""}),Handlebars.registerHelper("percent",function(e){return e?t.jsFormControls.Format.decimal(100*e):"0"}),Handlebars.registerHelper("date",function(e){return e?t.jsFormControls.Format.date(e):""}),Handlebars.registerHelper("time",function(e){return e?t.jsFormControls.Format.time(e):""}),Handlebars.registerHelper("datetime",function(e){return e?t.jsFormControls.Format.dateTime(e):""}),Handlebars.registerHelper("dateTime",function(e){return e?t.jsFormControls.Format.dateTime(e):""}),Handlebars.registerHelper("timespan",function(e){return e?t.jsFormControls.Format.humanTime(e):""})),e.prototype._domInit=function(){var e=t(this.element);e.find("input.mandatory,textarea.mandatory").on("keyup",function(){t(this).val().length>0&&"null"!==t(this).val()?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}),e.find("input.mandatory,textarea.mandatory").on("change",function(){return t(this).hasClass("object")?(t(this).data().pojo?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"),undefined):(t(this).val().length>0&&"null"!==t(this).val()?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"),undefined)}).change(),e.find("select.mandatory").change(function(){null!==t(this).val()&&"null"!==t(this).val()&&t(this).val().length>0?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}).change(),e.find("input.date").each(function(){var e=t(this).attr("data-format");t(this).datepicker&&(e?t(this).datepicker({dateFormat:e}):t(this).datepicker())});var a=RegExp("^[0-9]+$");e.find("input.number").keyup(function(){var e=t(this).val();e.length>0&&(t(this).hasClass("autoclean")?t(this).val(e.replace(/[^0-9]/g,"")):a.test(t(this).val())?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"))}).keyup(),e.find("input.regexp").each(function(){t(this).hasClass("autoclean")?t(this).data("regexp",RegExp(t(this).attr("data-regexp"),"g")):t(this).data("regexp",RegExp(t(this).attr("data-regexp"))),t(this).keyup(function(){var e=t(this).val();if(e.length>0){var a=t(this).data("regexp");t(this).hasClass("autoclean")?t(this).val(e.replace(a,"")):a.test(t(this).val())?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}else t(this).hasClass("mandatory")||t(this).removeClass("invalid").addClass("valid")}).keyup(),t(this).change(function(){t(this).keyup()})}),e.find("input.rotatestate").each(function(){var e=t(this).attr("data-state-values"),a=t(this).attr("data-state-class");if(e){try{e=JSON.parse(e)}catch(i){return}var s=t("");t(this).attr("title")&&s.attr("title",t(this).attr("title")),t(this).attr("data-state-style")&&s.attr("style",t(this).attr("data-state-style")),s.data("states",e),s.data("control",this),s.data("activeState",null),t(this).data("control",s),a&&s.addClass(a),s.click(function(){var e=t(this).data().activeState,a=t(this).data().states,i=t(this).data().control,s=null;if(null!==e){for(var n=0;a.length>n;n++)if(a[n].value===e.value){s=n===a.length-1?a[0]:a[n+1];break}}else s=a[0];t(i).attr("value",s.value),t(i).change()}),t(this).change(function(){var e=t(t(this).data().control),a=e.data().activeState,i=e.data().states;null!==a&&e.removeClass(a["class"]);var s=t(this).val();t.each(i,function(){return this.value===s?(e.data().activeState=this,this.title&&e.attr("title",this.title),e.addClass(this["class"]),!1):undefined})}),t(this).change(),t(this).after(s),t(this).hide()}})},e.prototype.validate=function(){return t(".required,.regexp,.date,.mandatory,.number,.validate",this.element).change(),t(".invalid",this.element).length>0?!1:!0},t.fn.jsFormControls=function(a){if("object"!=typeof a&&a){var i=Array.prototype.slice.call(arguments,1);if(1==this.length){var s=t(this).data("jsFormControls");if(s){if(0!==a.indexOf("_")&&s[a]){var n=s[a].apply(s,i);return n}return t.error("Method "+a+" does not exist on jQuery.jsFormControls"),!1}}return this.each(function(){var e=t.data(this,"jsFormControls");return e?0!==a.indexOf("_")&&e[a]?e[a].apply(e,i):(t.error("Method "+a+" does not exist on jQuery.jsFormControls"),!1):undefined})}return this.each(function(){t(this).data("jsFormControls")||t(this).data("jsFormControls",new e(this,a))})},t.jsFormControls=function(e,s){var n;if(t.isFunction(s))n=i[e],n&&t.each(n,function(){s(this,t(this.element))}),a[e]=s;else if(n=i[e]){var r=s,o=Array.prototype.slice.call(arguments,2);t.each(portlets,function(){this[r].apply(this,o)})}},t.jsFormControls.Format={format:function(e,a){return t(e).hasClass("dateTime")?t.jsFormControls.Format.dateTime(a):t(e).hasClass("datetime")?t.jsFormControls.Format.dateTime(a):t(e).hasClass("date")?t.jsFormControls.Format.date(a):t(e).hasClass("currency")?t.jsFormControls.Format.currency(a):t(e).hasClass("number")?t.jsFormControls.Format.decimal(a):a},checkBox:function(t,e,a){return a===undefined&&(a=t,t=null),a?' ':' '},_getNumber:function(e){return e?t.format?t.format.number(e):((-1!==e.indexOf(",")||e.length-e.indexOf(".")>3)&&(e=e.replace(/\./g,"").replace(",",".")),Number(e)):null},_pad:function(t){var e=10>t?"0":"";return e+=t},decimal:function(e){if(""===e||!e||isNaN(e))return e;if(t.format)return t.format.number(e,t(document).data().i18n.number.format);var a=0;Math.abs(e-Math.floor(e))>.001&&(a=2);var i=e,s=isNaN(s=Math.abs(a))?2:a,n=",",r=".",o=parseInt(i=Math.abs(+i||0).toFixed(s),10)+"",l=(l=o.length)>3?l%3:0;return(0>e?"-":"")+(l?o.substr(0,l)+r:"")+o.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+r)+(s?n+Math.abs(i-o).toFixed(s).slice(2):"")},currency:function(e,a,i){return(!i||isNaN(i))&&(i=e,e=null),i?t.jsFormControls.Format.decimal(i):a?" ":""},dateTime:function(t,e,a){return(!a||isNaN(a))&&(a=t,t=null),a?this.date(a)+" "+this.time(a):e?" ":""},date:function(e,a,i){if((!i||isNaN(i))&&(i=e,e=null),!i)return a?" ":"";var s=new Date;s.setTime(i);var n=s.getYear();return 1900>n&&(n+=1900),t.format?t.format.date(s,t(document).data().i18n.date.shortDateFormat):this._pad(s.getDate())+"."+this._pad(s.getMonth()+1)+"."+this._pad(n)},time:function(e,a,i){if(i||(i=e,e=null),!i)return a?" ":"";var s=new Date;return s.setTime(i),t.format?t.format.date(s,t(document).data().i18n.date.timeFormat):this._pad(s.getHours())+":"+this._pad(s.getMinutes())},timespan:function(t,e,a,i,s,n){a||(a=t,n=e,t=null,e=null);for(var r=a.split(":"),o=0;r.length>o;o++){var l=Number(r[o]);l&&"NaN"!==l||(l=0),r[o]=this._pad(l)}return 0>=r.length?"0:00":1==r.length?"0:"+this._pad(allowkomma?r[0]:Math.floor(r[0])):2==r.length?allowkomma?r[0]:Math.floor(r[0])+":"+this._pad(allowkomma?r[1]:Math.floor(r[1])):allowkomma?r[0]:Math.floor(r[0])+":"+this._pad(allowkomma?r[1]:Math.floor(r[1]))+":"+pad(allowkomma?r[2]:Math.floor(r[2]))},humanTime:function(t,e,a){if(a||(a=t,t=null),isNaN(a))return a&&0!==a.length?a:"-";var i=Math.floor(a/36e5);a-=36e5*i;var s=Math.floor(a/6e4);a-=6e4*s;var n=Math.floor(a/1e3);a-=1e3*n;var r="";return i>0&&(r+=i+"h ",n=0,a=0),s>0&&(r+=s+"m ",a=0),n>0&&(r+=n+"s ",a=0),a>0&&(r+=a+"ms"),r.trim()}}}(jQuery,window),String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.startsWith=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length?!1:this.substr(0,t.length)==t?!0:!1},String.prototype.startsWithIgnoreCase=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length?!1:this.substr(0,t.length).toLowerCase()==t.toLowerCase()?!0:!1},String.prototype.endsWith=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length||t.length>this.length?!1:this.substr(this.length-t.length)==t?!0:!1}; -//@ sourceMappingURL=dist/jquery.jsForm.min.map \ No newline at end of file diff --git a/dist/jquery.jsForm.1.0.5.min.js b/dist/jquery.jsForm.1.0.5.min.js new file mode 100644 index 0000000..22f65f1 --- /dev/null +++ b/dist/jquery.jsForm.1.0.5.min.js @@ -0,0 +1,6 @@ +/*! + * jQuery.jsForm v1.0.5 | (c) 2013 Niko Berger http://www.gargan.org/ + * Usage: https://github.com/corinis/jsForm + */ +(function(t,e,a){"use strict";function i(e,a){var i=t(e);this.options=t.extend({},{controls:!0,data:null,prefix:"data",validateHidden:!0},a),!i.attr("data-prefix")||"data"!==this.options.prefix&&""!==this.options.prefix||""!==i.attr("data-prefix")&&(this.options.prefix=i.attr("data-prefix")),this.element=e,this._init()}var s={},n={};i.prototype._init=function(){if(this._domInit(),this.options.controls)if(t.jsFormControls)t(this.element).jsFormControls();else try{"undefined"!=typeof console&&console.log("jquery.JsForm.controls not available!")}catch(e){}this._fill(this.element,this.options.data,this.options.prefix)},i.prototype._domInit=function(){var e=t(this.element),a=this,i=this.options.prefix;a._initCollection(e,i)},i.prototype._initCollection=function(e,a){var i={},s=this;t(e).data().collections=i,t(".collection",e).each(function(){var e=t(this).attr("data-field");if(e&&0===e.indexOf(a+".")){var n=t(this),r=i[e];if(r?r.push(n):i[e]=[n],s._initList(n),!n.hasClass("ui-sortable")&&n.hasClass("sortable")&&n.sortable){var o=n.attr("data-sortable");o=o?JSON.parse(o):{},n.sortable(o),n.on("sortstop",function(){s._reorder(n)})}}}),t(".add",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections")||(t(this).data().collections=i[e],t(this).click(function(a){a.preventDefault(),t.each(t(this).data("collections"),function(){var a=t(this).data("template");if(a){var i=a.clone(!0);t(this).append(i),t(i).addClass("POJO"),t(i).data("pojo",{}),s._addCollectionControls(i),t(this).trigger("addCollection",[i,t(i).data().pojo]),s._fillData(i,t(i).data().pojo,e.substring(e.indexOf(".")+1)),s._initCollection(i,e.substring(e.indexOf(".")+1)),t(this).trigger("postAddCollection",[i,t(i).data().pojo])}})})))}),t(".insert",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections")||(t(this).data("collections",i[t(this).attr("data-field")]),t(this).on("insert",function(a,i){if(i||(i=t(this).data().pojo),i){var n=t(this).data("beforeInsert");n&&t.isFunction(n)&&!(i=n(i))||(t.each(t(this).data("collections"),function(){var a=t(this).data("template");if(a){var n=a.clone(!0);n.addClass("POJO"),n.data().pojo=i,s._addCollectionControls(n),s._initCollection(n),t(this).trigger("addCollection",[n,t(n).data().pojo]),s._fillData(n,i,e.substring(e.indexOf(".")+1)),t(this).append(n)}}),t(this).val(""),t(this).data().pojo=null,t(this).focus())}})))}),t(".insertAction",e).each(function(){var e=t(this).attr("data-field");if(e&&!t(this).data("inserter")){var a=t(this).parent().find(".insert");a&&(t(this).data("inserter",a),t(this).click(function(e){return e.preventDefault(),t(this).data("inserter").trigger("insert"),!1}))}}),t("input.object",e).each(function(){t(this).on("update",function(){var e=t(this).data().pojo;e&&t(this).attr("data-display")&&t(this).val(s._renderObject(e,t(this).attr("data-display")))})}),t("input.blob",e).each(function(){if("file"===t(this).attr("type")){var e=t(this);t(this).on("change",function(a){var i=t(this).val().split(/\\/).pop();e.data("name",i);var s=a.target.files;s&&s.length&&t.each(s,function(){var a=new FileReader;a.onload=function(t){e.data("blob",t.target.result)},a.readAsDataURL(this),t(this).trigger("fileChange")})})}}),t(".manage",e).each(function(){var e=t(this).attr("data-field");e&&(t(this).data("collections",i[e]),t(this).click(function(){var a=t(this).attr("data-service"),i=t(this).data("collections"),n=t(this),r=t(this).attr("data-display");r&&(r=r.split(",")),DataUtils.run(a,function(a){var o=t('');o.data("collections",i),n.data("select",o),t.each(a,function(){var e=this,a="";if(r)for(var s=0;r.length>s;s++)a+=e[r[s]]+" ";else a=e;var n=t('");t(i).each(function(){t(this).children().each(function(a,i){e.id===t(i).data("pojo").id&&n.attr("selected","selected")})}),o.append(n),n.data("pojo",e)}),n.after(o),n.hide(),o.multiselect({autoOpen:!0,open:function(){t(this).multiselect("widget").css("top",t(o).next().offset().top),t(this).multiselect("widget").css("left",t(o).next().offset().left),t(o).next().hide()},close:function(){n.show(),o.remove(),t(this).multiselect("destroy")}}).multiselectfilter().bind("multiselectclick multiselectcheckall multiselectuncheckall",function(){var a=t.map(t(this).multiselect("getChecked"),function(e){return t("option[value='"+e.value+"']",o).data("pojo")});t.each(t(o).data("collections"),function(){s._fillList(t(this),a,e)}),n.hide(),t(o).next().show(),t(this).multiselect("widget").css("top",t(o).next().offset().top),t(this).multiselect("widget").css("left",t(o).next().offset().left),t(o).next().hide()})})}))})},i.prototype._initList=function(t){if(!t.data("template")){var e=t.children().detach();e.removeAttr("id"),t.data("template",e)}},i.prototype._clear=function(e,a){a||(a=this.options.prefix),t(e).removeData("pojo"),t("input,select,textarea",e).each(function(){var e=t(this).attr("name");e&&0===e.indexOf(a+".")&&(e=e.substring((a+".").length),1>e.length||(t(this).removeData("pojo"),"checkbox"===t(this).attr("type")?t(this).prop("checked",!1):t(this).val(""),t(this).hasClass("blob")&&t(this).removeData("blob"),t(this).is("select")&&(t('option[selected="selected"]',this).removeAttr("selected"),t("option:first",this).attr("selected",!0),t(this).val(t("option:first",this).val()).change()),t(this).change()))}),t(".collection",e).each(function(){var e=t(this).attr("data-field");e&&0===e.indexOf(a+".")&&t(this).empty()})},i.prototype._createPojoFromInput=function(e,i,s){var n=null,r=this;return t(e).data("pojo")&&(n=t(e).data("pojo")),n&&t.extend(!0,s,n),t(e).find("input,select,textarea").each(function(){var e=t(this).attr("name");if(e&&!t(this).hasClass("transient")&&0===e.indexOf(i+".")){if(t(this).trigger("validate",!0),e=e.substring((i+".").length),1>e.length)return s=t(this).val(),!1;var n=t(this).val();if(t(this).hasClass("emptynull")?(""===n||""===n.trim())&&(n=null):t(this).hasClass("object")||t(this).hasClass("POJO")?n=t(this).data("pojo"):t(this).hasClass("blob")?n=t(this).data("blob"):""===n&&(t(this).hasClass("number")||t(this).hasClass("dateFilter")||t(this).hasClass("dateTimeFilter"))&&(n=null),t(this).hasClass("percent")&&(n=r._getNumber(n),isNaN(n)?n=0:n/=100),(t(this).hasClass("number")||t(this).hasClass("currency"))&&(n=r._getNumber(n),isNaN(n)&&(n=0)),("checkbox"===t(this).attr("type")||"CHECKBOX"===t(this).attr("type"))&&(n=t(this).is(":checked")),-1===e.indexOf("."))s[e]=n;else{var o,l,h=e.split("."),c=s[h[0]];c&&t.isPlainObject(c)||(s[h[0]]={},c=s[h[0]]),2===h.length?c[h[1]]=n:3===h.length?(o=c[h[1]],o===a&&(o={},c[h[1]]=o),o[h[2]]=n):4===h.length&&(o=c[h[1]],l=o[h[2]],l===a&&(l={},o[h[2]]=l),o[h[2]]=n,l[h[3]]=n)}}}),s},i.prototype._fillData=function(e,i,s){var n=this,r=t(e);r.find(".field").each(function(){var e=t(this).data("name");if(e||("A"===this.nodeName.toUpperCase()?(e=t(this).attr("href"),t(this).attr("href","#")):"IMG"===this.nodeName.toUpperCase()?(e=t(this).attr("src"),0===e.indexOf("#")&&(e=e.substring(1)),t(this).attr("src","#")):e=t(this).text(),t(this).data("name",e),t(this).show()),!s||e.indexOf(s+".")>=0){var a=e;s&&(a=a.substring(s.length+1));var r=n._get(i,a);r||(r=""),t(this).hasClass("percent")&&!isNaN(r)&&(r=100*Number(r)),t.jsFormControls&&(r=t.jsFormControls.Format.format(this,r)),"A"===this.nodeName.toUpperCase()?t(this).attr("href",r):"IMG"===this.nodeName.toUpperCase()?t(this).attr("src",r):"DIV"===this.nodeName.toUpperCase()?t(this).html(r):t(this).text(r)}}),t("input",r).each(function(){var e=t(this).attr("name");if(e&&"file"!=t(this).attr("type")&&(!s||e.indexOf(s+".")>=0)){var a=e;s&&(a=a.substring(s.length+1));var r=n._get(i,a);t(this).hasClass("percent")&&!isNaN(r)?r=100*Number(r):t.isPlainObject(r)&&(t(this).data().pojo=r,t(this).addClass("POJO"),r=n._renderObject(r,t(this).attr("data-display"))),"checkbox"===t(this).attr("type")?(t(this).prop("checked",r===!0||"true"===r),t(this).change()):(r||(r=""),t.jsFormControls&&(r=t.jsFormControls.Format.format(this,r)),t(this).val(r),t(this).change())}}),t("select",r).each(function(){var e=t(this).attr("name");if(e&&(!s||e.indexOf(s+".")>=0)){var r=e;s&&(r=r.substring(s.length+1)),t(this).children("option").removeAttr("selected");var o=n._get(i,r);if(o.id)return t(this).children("option[value='"+o.id+"']").attr("selected",!0),t(this).val(o.id).change(),a;t(this).children("option[value='"+o+"']").attr("selected",!0),t(this).val(o).change()}}),t("textarea",r).each(function(){var e=t(this).attr("name");if(e&&(!s||e.indexOf(s+".")>=0)){var a=e;s&&(a=a.substring(s.length+1)),t(this).val(n._get(i,a)),t(this).change()}})},i.prototype.get=function(e){var a=t(this.element),i=this,s=this.options.data,n=this.options.prefix,r={};s&&t.isPlainObject(s)&&(r=s),i._createPojoFromInput(a,n,r);var o=!1;return this.options.validateHidden?a.find(".invalid").each(function(){return o=!0,t(this).focus(),!1}):a.find(".invalid").filter(":visible").each(function(){return o=!0,t(this).focus(),!1}),this._getCollection(a,n,r,e)&&(o=!0),!e&&o?null:r},i.prototype._getCollection=function(e,a,i,s){var n=this,r=!1;return e.find(".collection").each(function(){if(s||!r){var e=t(this).attr("data-field");if(e&&0===e.indexOf(a+".")&&(e=e.substring((a+".").length),!(1>e.length))){var o=n._getParent(i,e,!0);-1!==e.indexOf(".")&&(e=e.substring(e.lastIndexOf(".")+1)),o[e]=[],t(this).children().each(function(){if(s||!r){var a={};a=n._createPojoFromInput(t(this),e,a),n._getCollection(t(this),e,a,s),n._isEmpty(a)?t(".invalid",this).removeClass("invalid"):(t(".invalid",this).length>0&&(r=!0),o[e].push(a))}})}}}),r},i.prototype.getData=function(){return this.options.data||(this.options.data={}),this.options.data},i.prototype.preventEditing=function(e){var i=t(this.element);if(e===a)e=i.data("disabled")?!1:!0;else if(e===i.data("disabled"))return;e?(i.find("input, textarea").each(function(){if(!t(this).closest("span.form")[0]&&"hidden"!=t(this).attr("type")){var e=t(this).val();("null"===e||null===e||"submit"===t(this).attr("type"))&&(e=""),t(this).hasClass("trueFalse")&&(e=t(this).is(":checked")?"X":" "),e=e.replace(//g,">").replace(/\n/g,"
");var a=t(''+e+"");t(this).parent().hasClass("ui-wrapper")?t(this).parent().hide().wrap(a):t(this).hide().wrap(a)}}),i.find("select").each(function(){if(!t(this).closest("span.form")[0]){var e=t(this).children(":selected").html();("null"===e||null===e)&&(e="");var a=t(''+e+"");t(this).hasClass("ui-toggle-switch")?t(this).prev().hide().wrap(a):t(this).hide().wrap(a)}})):i.find("span.form").each(function(){var e=t(this).children("input,select,textarea,.ui-wrapper,.ui-toggle-switch").show().detach();t(this).before(e),t(this).remove()}),i.data("disabled",e)},i.prototype.validate=function(){return t(".required,.regexp,.date,.mandatory,.number,.validate",this.element).change(),t(".invalid",this.element).length>0?!1:!0},i.prototype._fill=function(e,a,i){i||(i=this.config.prefix),this._clear(e,i),t(e).addClass("POJO"),t(e).data("pojo",a),this._fillData(e,a,i),this._fillCollection(e,a,i)},i.prototype._fillCollection=function(e,a,i){var s=this;t(".collection",e).each(function(){var e=t(this),n=t(this).attr("data-field");if(a&&n&&0===n.indexOf(i+".")){var r=null,o=n;i&&(o=o.substring(i.length+1)),r=s._get(a,o),r&&s._fillList(e,r,o)}})},i.prototype._fillList=function(e,a,i,s){var n=e.data("template"),r=this;if(n&&(e.empty(),t.isArray(a))){if(-1!==i.indexOf(".")&&(i=i.substring(i.lastIndexOf(".")+1)),t(e).hasClass("sort")){var o=t(e).attr("data-sort");if(o){switch(t(e).attr("data-sorttype")){case"alpha":a.sort();break;case"alphainsensitiv":a.sort(function(t,e){return t=t[o],e=e[o],t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase()),e>t?-1:t>e?1:0});break;default:a.sort(function(t,e){return t[o]-e[o]})}t(e).attr("data-sortdesc")&&a.reverse()}}s||t.isFunction(i)&&(s=i,i=null);for(var l=0;a.length>l;l++){var h=a[l],c=n.clone(!0);c.data("pojo",h),c.addClass("POJO"),s&&s(c,h)===!1||(r._addCollectionControls(c),i&&(r._fillData(c,h,i),r._initCollection(c,i),r._fillCollection(c,h,i)),e.append(c))}}},i.prototype._addCollectionControls=function(e){var a=this;t.jsFormControls&&t(e).jsFormControls(),t(".delete",e).click(function(){var e=t(this).closest(".POJO");t(this).closest(".collection").trigger("deleteCollection",[e,t(e).data().pojo]),e.remove()}),t(".sortUp",e).click(function(){var e=t(this).closest(".POJO"),i=e.prev(".POJO");0!==i.size()&&(e.detach(),i.before(e),a._reorder(e))}),t(".sortDown",e).click(function(){var e=t(this).closest(".POJO"),i=e.next(".POJO");0!==i.size()&&(e.detach(),i.after(e),a._reorder(e))});var i=t(e).closest(".collection");i.hasClass("sortable")&&t(i).sortable&&i.sortable("refresh")},i.prototype._reorder=function(e){e.attr("data-sort")||(e=e.closest(".collection"));var a=t(e).attr("data-sort");if(!(!a||t(e).attr("data-sorttype")&&"number"!==t(e).attr("data-sorttype")||t(e).attr("data-sortdesc")&&"false"!==t(e).attr("data-sortdesc"))){var i=0;t.each(t(e).children(),function(){var e=t(this).data("pojo");e||(e={},t(this).data("pojo",e)),e[a]=i++})}},i.prototype._renderObject=function(e,a){if(!a||!e)return"";var i=this,s="";return t.each(a.split(","),function(){var t=this.trim();s+=0===t.indexOf("'")||0===t.indexOf('"')?t.substring(1,t.length-1):i._get(e,t)}),s},i.prototype._get=function(t,e,i){var s,n,r,o="";if("function"==typeof e)return e(t);if(!t)return"";if(""===e)return t;if(s=t[e],!s)try{if("string"==typeof e&&(o=e.split(".")),r=o.length)for(s=t;s&&r--;)n=o.shift(),i&&!s[n]&&(s[n]={}),s=s[n]}catch(l){}return(null===s||s===a)&&(s=""),s.trim?s.trim():s},i.prototype._getParent=function(t,e,a){return-1===e.indexOf(".")?t:(e=e.substring(0,e.lastIndexOf(".")),this._get(t,e,a))},i.prototype._getNumber=function(e){return e?t.format?t.format.number(e):((-1!=e.indexOf(",")||e.length-e.indexOf(".")>3)&&(e=e.replace(/\./g,"").replace(",",".")),Number(e)):null},i.prototype._isEmpty=function(e){if(!e)return!0;if(t.isArray(e)){if(0===e.length)return!0;for(var a=0;e.length>a;a++)if(!this._isEmpty())return!1;return!0}if(t.isPlainObject(e)){if(t.isEmptyObject(e))return!0;for(var i in e)if(!this._isEmpty(e[i]))return!1;return!0}return isNaN(e)?""===e||" "===e:0===Number(e)||-1===Number(e)?!0:!1},i.prototype._pojoDifferFromInput=function(e,i,s){var n=!1;return t("input,select,textarea",e).each(function(){if(!n){var e=t(this).attr("name");if(e&&!(t(this).hasClass("transient")||0!==e.indexOf(i+".")||(e=e.substring((i+".").length),1>e.length))){var r=t(this).val();if(""===r&&(t(this).hasClass("number")||t(this).hasClass("dateFilter")||t(this).hasClass("dateTimeFilter"))&&(r=null),(t(this).hasClass("number")||t(this).hasClass("currency"))&&(r=that._getNumber(r),isNaN(r)&&(r=0)),("checkbox"===t(this).attr("type")||"CHECKBOX"===t(this).attr("type"))&&(r=t(this).is(":checked")),-1===e.indexOf("."))s[e]!==r&&(n=!0);else{var o,l,h=e.split("."),c=s[h[0]];if(!c)return n=!0,a;2===h.length?c[h[1]]!==r&&(n=!0):3===h.length?(o=c[h[1]],o[h[2]]!==r&&(n=!0)):4===h.length&&(o=c[h[1]],l=o[h[2]],l[h[3]]!==r&&(n=!0))}}}}),n},i.prototype.equals=function(e){var i=this,s=this.element,n=this.options.prefix;if(this._pojoDifferFromInput(s,n,e))return!1;var r=!1;return t(".invalid",s).length>0?!1:(t(".collection",s).each(function(){if(!r){var s=t(this).attr("data-field");if(s&&0===s.indexOf(n+".")&&(s=s.substring((n+".").length),!(1>s.length))){var o=0;t(this).children().each(function(){if(!r){if(o>=e[s].length)return r=!0,a;var n=e[s][o++];i._pojoDifferFromInput(t(this),s,n)&&(r=!0)}}),e[s].length>o&&(r=!0)}}}),!r)},i.prototype.fill=function(t){this.clear(),this.options.data=t,this._fill(this.element,this.options.data,this.options.prefix)},i.prototype.clear=function(){this._clear(this.element,this.options.prefix)},i.prototype.destroy=function(){return t(this.element).each(function(){t(e).unbind(".jsForm"),t(this).removeData("jsForm")})},t.fn.jsForm=function(e){if("object"!=typeof e&&e){var s,n=Array.prototype.slice.call(arguments,1);if(0===this.length)return null;if(1===this.length&&(s=t(this).data("jsForm"))){if(0!==e.indexOf("_")&&s[e]){var r=s[e].apply(s,n);return r}return t.error("Method "+e+" does not exist on jQuery.jsForm"),!1}return this.each(function(){return s=t.data(this,"jsForm"),s?0!==e.indexOf("_")&&s[e]?s[e].apply(s,n):(t.error("Method "+e+" does not exist on jQuery.jsForm"),!1):a})}return this.each(function(){t(this).data("jsForm")||t(this).data("jsForm",new i(this,e))})},t.jsForm=function(e,a){var i=n[e];if(t.isFunction(a))i&&t.each(i,function(){a(this,t(this.element))}),s[e]=a;else if(i){var r=a,o=Array.prototype.slice.call(arguments,2);t.each(portlets,function(){this[r].apply(this,o)})}}})(jQuery,window),function(t){"use strict";function e(t){this.element=t,this._domInit()}var a={},i={};"undefined"!=typeof Handlebars&&(Handlebars.registerHelper("currency",function(e){return e?t.jsFormControls.Format.currency(e):"0"}),Handlebars.registerHelper("dec",function(e){return e?t.jsFormControls.Format.decimal(e):""}),Handlebars.registerHelper("percent",function(e){return e?t.jsFormControls.Format.decimal(100*e):"0"}),Handlebars.registerHelper("date",function(e){return e?t.jsFormControls.Format.date(e):""}),Handlebars.registerHelper("time",function(e){return e?t.jsFormControls.Format.time(e):""}),Handlebars.registerHelper("datetime",function(e){return e?t.jsFormControls.Format.dateTime(e):""}),Handlebars.registerHelper("dateTime",function(e){return e?t.jsFormControls.Format.dateTime(e):""}),Handlebars.registerHelper("timespan",function(e){return e?t.jsFormControls.Format.humanTime(e):""})),e.prototype._domInit=function(){var e=t(this.element);e.find("input.mandatory,textarea.mandatory").on("keyup",function(){t(this).val().length>0&&"null"!==t(this).val()?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}),e.find("input.mandatory,textarea.mandatory").on("change",function(){return t(this).hasClass("object")?(t(this).data().pojo?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"),undefined):(t(this).val().length>0&&"null"!==t(this).val()?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"),undefined)}).change(),e.find("select.mandatory").change(function(){null!==t(this).val()&&"null"!==t(this).val()&&t(this).val().length>0?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}).change(),e.find("input.date").each(function(){var e=t(this).attr("data-format");t(this).datepicker&&(e?t(this).datepicker({dateFormat:e}):t(this).datepicker())});var a=RegExp("^[0-9]+$");e.find("input.number").keyup(function(){var e=t(this).val();e.length>0&&(t(this).hasClass("autoclean")?t(this).val(e.replace(/[^0-9]/g,"")):a.test(t(this).val())?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid"))}).keyup(),e.find("input.regexp").each(function(){t(this).hasClass("autoclean")?t(this).data("regexp",RegExp(t(this).attr("data-regexp"),"g")):t(this).data("regexp",RegExp(t(this).attr("data-regexp"))),t(this).keyup(function(){var e=t(this).val();if(e.length>0){var a=t(this).data("regexp");t(this).hasClass("autoclean")?t(this).val(e.replace(a,"")):a.test(t(this).val())?t(this).addClass("valid").removeClass("invalid"):t(this).removeClass("valid").addClass("invalid")}else t(this).hasClass("mandatory")||t(this).removeClass("invalid").addClass("valid")}).keyup(),t(this).change(function(){t(this).keyup()})}),e.find("input.rotatestate").each(function(){var e=t(this).attr("data-state-values"),a=t(this).attr("data-state-class");if(e){try{e=JSON.parse(e)}catch(i){return}var s=t("");t(this).attr("title")&&s.attr("title",t(this).attr("title")),t(this).attr("data-state-style")&&s.attr("style",t(this).attr("data-state-style")),s.data("states",e),s.data("control",this),s.data("activeState",null),t(this).data("control",s),a&&s.addClass(a),s.click(function(){var e=t(this).data().activeState,a=t(this).data().states,i=t(this).data().control,s=null;if(null!==e){for(var n=0;a.length>n;n++)if(a[n].value===e.value){s=n===a.length-1?a[0]:a[n+1];break}}else s=a[0];t(i).attr("value",s.value),t(i).change()}),t(this).change(function(){var e=t(t(this).data().control),a=e.data().activeState,i=e.data().states;null!==a&&e.removeClass(a["class"]);var s=t(this).val();t.each(i,function(){return this.value===s?(e.data().activeState=this,this.title&&e.attr("title",this.title),e.addClass(this["class"]),!1):undefined})}),t(this).change(),t(this).after(s),t(this).hide()}})},e.prototype.validate=function(){return t(".required,.regexp,.date,.mandatory,.number,.validate",this.element).change(),t(".invalid",this.element).length>0?!1:!0},t.fn.jsFormControls=function(a){if("object"!=typeof a&&a){var i=Array.prototype.slice.call(arguments,1);if(1==this.length){var s=t(this).data("jsFormControls");if(s){if(0!==a.indexOf("_")&&s[a]){var n=s[a].apply(s,i);return n}return t.error("Method "+a+" does not exist on jQuery.jsFormControls"),!1}}return this.each(function(){var e=t.data(this,"jsFormControls");return e?0!==a.indexOf("_")&&e[a]?e[a].apply(e,i):(t.error("Method "+a+" does not exist on jQuery.jsFormControls"),!1):undefined})}return this.each(function(){t(this).data("jsFormControls")||t(this).data("jsFormControls",new e(this,a))})},t.jsFormControls=function(e,s){var n;if(t.isFunction(s))n=i[e],n&&t.each(n,function(){s(this,t(this.element))}),a[e]=s;else if(n=i[e]){var r=s,o=Array.prototype.slice.call(arguments,2);t.each(portlets,function(){this[r].apply(this,o)})}},t.jsFormControls.Format={format:function(e,a){return t(e).hasClass("dateTime")?t.jsFormControls.Format.dateTime(a):t(e).hasClass("datetime")?t.jsFormControls.Format.dateTime(a):t(e).hasClass("date")?t.jsFormControls.Format.date(a):t(e).hasClass("currency")?t.jsFormControls.Format.currency(a):t(e).hasClass("number")?t.jsFormControls.Format.decimal(a):a},checkBox:function(t,e,a){return a===undefined&&(a=t,t=null),a?' ':' '},_getNumber:function(e){return e?t.format?t.format.number(e):((-1!==e.indexOf(",")||e.length-e.indexOf(".")>3)&&(e=e.replace(/\./g,"").replace(",",".")),Number(e)):null},_pad:function(t){var e=10>t?"0":"";return e+=t},decimal:function(e){if(""===e||!e||isNaN(e))return e;if(t.format)return t.format.number(e,t(document).data().i18n.number.format);var a=0;Math.abs(e-Math.floor(e))>.001&&(a=2);var i=e,s=isNaN(s=Math.abs(a))?2:a,n=",",r=".",o=parseInt(i=Math.abs(+i||0).toFixed(s),10)+"",l=(l=o.length)>3?l%3:0;return(0>e?"-":"")+(l?o.substr(0,l)+r:"")+o.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+r)+(s?n+Math.abs(i-o).toFixed(s).slice(2):"")},currency:function(e,a,i){return(!i||isNaN(i))&&(i=e,e=null),i?t.jsFormControls.Format.decimal(i):a?" ":""},dateTime:function(t,e,a){return(!a||isNaN(a))&&(a=t,t=null),a?this.date(a)+" "+this.time(a):e?" ":""},date:function(e,a,i){if((!i||isNaN(i))&&(i=e,e=null),!i)return a?" ":"";var s=new Date;s.setTime(i);var n=s.getYear();return 1900>n&&(n+=1900),t.format?t.format.date(s,t(document).data().i18n.date.shortDateFormat):this._pad(s.getDate())+"."+this._pad(s.getMonth()+1)+"."+this._pad(n)},time:function(e,a,i){if(i||(i=e,e=null),!i)return a?" ":"";var s=new Date;return s.setTime(i),t.format?t.format.date(s,t(document).data().i18n.date.timeFormat):this._pad(s.getHours())+":"+this._pad(s.getMinutes())},timespan:function(t,e,a,i,s,n){a||(a=t,n=e,t=null,e=null);for(var r=a.split(":"),o=0;r.length>o;o++){var l=Number(r[o]);l&&"NaN"!==l||(l=0),r[o]=this._pad(l)}return 0>=r.length?"0:00":1==r.length?"0:"+this._pad(allowkomma?r[0]:Math.floor(r[0])):2==r.length?allowkomma?r[0]:Math.floor(r[0])+":"+this._pad(allowkomma?r[1]:Math.floor(r[1])):allowkomma?r[0]:Math.floor(r[0])+":"+this._pad(allowkomma?r[1]:Math.floor(r[1]))+":"+pad(allowkomma?r[2]:Math.floor(r[2]))},humanTime:function(t,e,a){if(a||(a=t,t=null),isNaN(a))return a&&0!==a.length?a:"-";var i=Math.floor(a/36e5);a-=36e5*i;var s=Math.floor(a/6e4);a-=6e4*s;var n=Math.floor(a/1e3);a-=1e3*n;var r="";return i>0&&(r+=i+"h ",n=0,a=0),s>0&&(r+=s+"m ",a=0),n>0&&(r+=n+"s ",a=0),a>0&&(r+=a+"ms"),r.trim()}}}(jQuery,window),String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.startsWith=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length?!1:this.substr(0,t.length)==t?!0:!1},String.prototype.startsWithIgnoreCase=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length?!1:this.substr(0,t.length).toLowerCase()==t.toLowerCase()?!0:!1},String.prototype.endsWith=function(t){return null===this||0>=this.length?!1:null===t||"null"==t||0>=t.length||t.length>this.length?!1:this.substr(this.length-t.length)==t?!0:!1}; +//@ sourceMappingURL=dist/jquery.jsForm.min.map \ No newline at end of file diff --git a/dist/jquery.jsForm.min.map b/dist/jquery.jsForm.min.map index fb4d884..5fa40c4 100644 --- a/dist/jquery.jsForm.min.map +++ b/dist/jquery.jsForm.min.map @@ -1 +1 @@ -{"version":3,"file":"dist/jquery.jsForm.1.0.4.min.js","sources":["dist/jquery.jsForm-1.0.4.js"],"names":["$","window","undefined","JsForm","element","options","$this","this","extend","controls","data","prefix","validateHidden","attr","_init","JSFORM_INIT_FUNCTIONS","JSFORM_MAP","prototype","_domInit","jsFormControls","console","log","ex","_fill","form","that","_initCollection","collectionMap","collections","each","colName","indexOf","container","cols","push","_initList","hasClass","sortable","config","JSON","parse","on","_reorder","fieldName","click","ev","preventDefault","tmpl","line","clone","append","addClass","_addCollectionControls","trigger","pojo","_fillData","substring","beforeInsertCallback","isFunction","val","focus","inserter","parent","find","_renderObject","blobInput","evt","fileName","split","pop","files","target","length","reader","FileReader","onload","e","result","readAsDataURL","dataService","collectionList","btn","display","DataUtils","run","select","cur","optionDisplay","j","option","children","count","ele","id","after","hide","multiselect","autoOpen","open","css","next","offset","top","left","close","show","remove","multiselectfilter","bind","checkedValues","map","input","value","_fillList","detach","removeAttr","_clear","removeData","name","prop","is","change","fieldname","empty","_createPojoFromInput","start","startObj","trim","_getNumber","isNaN","d1","d2","parts","d0","isPlainObject","$parent","nodeName","toUpperCase","text","cname","cdata","_get","Number","Format","format","html","get","ignoreInvalid","originalPojo","invalid","filter","_getCollection","colParent","_getParent","lastIndexOf","_isEmpty","removeClass","getData","preventEditing","prevent","closest","replace","thespan","wrap","prev","before","validate","_fillCollection","colData","lineFunc","isArray","sortField","sort","a","b","toLowerCase","reverse","i","size","prio","obj","skin","ret","expr","create","p","prm","shift","num","number","isEmptyObject","f","_pojoDifferFromInput","differs","equals","childCounter","fill","clear","destroy","unbind","fn","jsForm","method","args","Array","slice","call","arguments","apply","error","initFunc","jsForms","portlets","jQuery","JsFormControls","Handlebars","registerHelper","currency","decimal","date","time","dateTime","humanTime","location","datepicker","dateFormat","numberRegexp","RegExp","keyup","test","regexp","states","defaultClass","stateControl","cState","activeState","cStates","control","newState","title","checkBox","row","cell","_pad","o","document","i18n","comma","Math","abs","floor","n","c","d","t","parseInt","toFixed","substr","cellvalue","Date","setTime","year","getYear","shortDateFormat","getDate","getMonth","timeFormat","getHours","getMinutes","timespan","columnDef","dataContext","allowcomma","tokens","nt","allowkomma","pad","h","m","s","out","String","startsWith","str","startsWithIgnoreCase","endsWith"],"mappings":"CASC,SAAWA,EAAGC,EAAQC,GACtB,YAWA,SAASC,GAAQC,EAASC,GACzB,GAAIC,GAAQN,EAAEI,EAGdG,MAAKF,QAAUL,EAAEQ,WAIhBC,UAAU,EAIVC,KAAM,KAINC,OAAQ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pB,EACI,OAARmN,GAAyB,QAAPA,GAAiC,GAAdA,EAAInN,QACrC,EACLjE,KAAK0P,OAAO,EAAG0B,EAAInN,SAAWmN,GACzB,GACD,GAIRF,OAAOxQ,UAAU2Q,qBAAuB,SAASD,GAChD,MAAa,QAATpR,MAAkC,GAAfA,KAAKiE,QACpB,EACI,OAARmN,GAAyB,QAAPA,GAAiC,GAAdA,EAAInN,QACrC,EACLjE,KAAK0P,OAAO,EAAG0B,EAAInN,QAAQuG,eAAiB4G,EAAI5G,eAC3C,GACD,GAIR0G,OAAOxQ,UAAU4Q,SAAW,SAASF,GACpC,MAAa,QAATpR,MAAkC,GAAfA,KAAKiE,QACpB,EACI,OAARmN,GAAyB,QAAPA,GAAiC,GAAdA,EAAInN,QAAiBmN,EAAInN,OAASjE,KAAKiE,QACxE,EACLjE,KAAK0P,OAAO1P,KAAKiE,OAASmN,EAAInN,SAAWmN,GACpC,GACD"} \ No newline at end of file +{"version":3,"file":"dist/jquery.jsForm.1.0.5.min.js","sources":["dist/jquery.jsForm-1.0.5.js"],"names":["$","window","undefined","JsForm","element","options","$this","this","extend","controls","data","prefix","validateHidden","attr","_init","JSFORM_INIT_FUNCTIONS","JSFORM_MAP","prototype","_domInit","jsFormControls","console","log","ex","_fill","form","that","_initCollection","collectionMap","collections","each","colName","indexOf","container","cols","push","_initList","hasClass","sortable","config","JSON","parse","on","_reorder","fieldName","click","ev","preventDefault","tmpl","line","clone","append","addClass","_addCollectionControls","trigger","pojo","_fillData","substring","beforeInsertCallback","isFunction","val","focus","inserter","parent","find","_renderObject","blobInput","evt","fileName","split","pop","files","target","length","reader","FileReader","onload","e","result","readAsDataURL","dataService","collectionList","btn","display","DataUtils","run","select","cur","optionDisplay","j","option","children","count","ele","id","after","hide","multiselect","autoOpen","open","css","next","offset","top","left","close","show","remove","multiselectfilter","bind","checkedValues","map","input","value","_fillList","detach","removeAttr","_clear","removeData","name","prop","is","change","fieldname","empty","_createPojoFromInput","start","startObj","trim","_getNumber","isNaN","d1","d2","parts","d0","isPlainObject","$parent","nodeName","toUpperCase","text","cname","cdata","_get","Number","Format","format","html","get","ignoreInvalid","originalPojo","invalid","filter","_getCollection","colParent","_getParent","lastIndexOf","_isEmpty","removeClass","getData","preventEditing","prevent","closest","replace","thespan","wrap","prev","before","validate","_fillCollection","colData","lineFunc","isArray","sortField","sort","a","b","toLowerCase","reverse","i","size","prio","obj","skin","ret","expr","create","p","prm","shift","num","number","isEmptyObject","f","_pojoDifferFromInput","differs","equals","childCounter","fill","clear","destroy","unbind","fn","jsForm","method","args","Array","slice","call","arguments","apply","error","initFunc","jsForms","portlets","jQuery","JsFormControls","Handlebars","registerHelper","currency","decimal","date","time","dateTime","humanTime","location","datepicker","dateFormat","numberRegexp","RegExp","keyup","test","regexp","states","defaultClass","stateControl","cState","activeState","cStates","control","newState","title","checkBox","row","cell","_pad","o","document","i18n","comma","Math","abs","floor","n","c","d","t","parseInt","toFixed","substr","cellvalue","Date","setTime","year","getYear","shortDateFormat","getDate","getMonth","timeFormat","getHours","getMinutes","timespan","columnDef","dataContext","allowcomma","tokens","nt","allowkomma","pad","h","m","s","out","String","startsWith","str","startsWithIgnoreCase","endsWith"],"mappings":"CASC,SAAWA,EAAGC,EAAQC,GACtB,YAWA,SAASC,GAAQC,EAASC,GACzB,GAAIC,GAAQN,EAAEI,EAGdG,MAAKF,QAAUL,EAAEQ,WAIhBC,UAAU,EAIVC,KAAM,KAINC,OAAQ,OAKRC,gBAAgB,GACdP,IAGAC,EAAMO,KAAK,gBAA2C,SAAxBN,KAAKF,QAAQM,QAA6C,KAAxBJ,KAAKF,QAAQM,QAC9C,KAA9BL,EAAMO,KAAK,iBACbN,KAAKF,QAAQM,OAASL,EAAMO,KAAK,gBAInCN,KAAKH,QAAUA,EAEfG,KAAKO,QA1CN,GAAIC,MACJC,IAgDAb,GAAOc,UAAUH,MAAQ,WAKxB,GAHAP,KAAKW,WAGFX,KAAKF,QAAQI,SACf,GAAGT,EAAEmB,eACJnB,E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AAdA,EAAInN,QACrC,EACLjE,KAAK0P,OAAO,EAAG0B,EAAInN,QAAQuG,eAAiB4G,EAAI5G,eAC3C,GACD,GAIR0G,OAAOxQ,UAAU4Q,SAAW,SAASF,GACpC,MAAa,QAATpR,MAAkC,GAAfA,KAAKiE,QACpB,EACI,OAARmN,GAAyB,QAAPA,GAAiC,GAAdA,EAAInN,QAAiBmN,EAAInN,OAASjE,KAAKiE,QACxE,EACLjE,KAAK0P,OAAO1P,KAAKiE,OAASmN,EAAInN,SAAWmN,GACpC,GACD"} \ No newline at end of file diff --git a/jsForm.jquery.json b/jsForm.jquery.json index 45dec79..3228fe1 100644 --- a/jsForm.jquery.json +++ b/jsForm.jquery.json @@ -7,7 +7,7 @@ "json", "data" ], - "version": "1.0.4", + "version": "1.0.5", "author": { "name": "Niko Berger" }, diff --git a/package.json b/package.json index 9fd0365..6f312d5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jquery.jsForm", "title": "jQuery JSON Form", "description": "jQuery based form library to handle data in js objects\nIt allows you to handle data within a javascript object (like from a JSON request) with plain html.\n\nThe main features of this library are:\n Full standard html with data available in a js object\n Update an existing js object with changes done within a form\n Provide basic functions for formatting (i.e. date/time, money) using html markup\n Provide form validation functionality\n handle collections (arrays) with subobjects\n provides helper methods to handle array manipulation (add new entry/remove an entry) using only html markup\n Can be used in connection with an autocomplete function to add new array objects", - "version": "1.0.4", + "version": "1.0.5", "homepage": "https://github.com/corinis/jsForm", "author": { "name": "Niko Berger",