/** * jQuery.bsgrid v1.38 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ String.prototype.startWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substr(0,a.length)==a}};String.prototype.endWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substring(this.length-a.length)==a}};String.prototype.replaceAll=function(a,b){return this.replace(new RegExp(a,"gm"),b)};function StringBuilder(){if(arguments.length){this.append.apply(this,arguments)}}StringBuilder.prototype=function(){var c=Array.prototype.join,d=Array.prototype.slice,a=/\{(\d+)\}/g,b=function(){return c.call(this,"")};return{constructor:StringBuilder,length:0,append:Array.prototype.push,appendFormat:function(e){var g=0,f=d.call(arguments,1);this.append(a.test(e)?e.replace(a,function(h,j){return f[j]}):e.replace(/\?/g,function(){return f[g++]}));return this},size:function(){return this.toString().length},toString:b,valueOf:b}}(); $.bsgrid={param:function(c,b){if(b==undefined){b=false}if(!b){return $.param(c)}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){d.append("&"+e.name+"=");d.append(encodeURIComponent(encodeURIComponent(e.value)))})}else{for(var a in c){d.append("&"+a+"=");d.append(encodeURIComponent(encodeURIComponent(c[a])))}}return d.length>0?d.toString().substring(1):""},getKeysString:function(c,a){if(a==undefined){a=","}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){if((d.toString()+a).indexOf(a+e.name+a)==-1){d.append(a+e.name)}})}else{for(var b in c){d.append(a+b)}}return d.length>0?d.toString().substring(1):""},forcePushPropertyInObject:function(b,a,c){if(b.hasOwnProperty(a)){b[a+"_f"]=c}else{b[a]=c}},adaptAttrOrProp:function(b,d,c){var a=parseInt($.fn.jquery.substring(0,$.fn.jquery.indexOf(".",2)).replace(".",""));if(c==undefined){if(a>=16){return b.prop(d)}else{return b.attr(d)}}else{if(a>=16){b.prop(d,c)}else{b.attr(d,c)}}},alert:function(a){alert(a)}}; (function(a){a.fn.bsgrid_form={defaults:{},formObjs:{},init:function(e,d){var c={settings:a.extend(true,{},a.fn.bsgrid_form.defaults,d),formId:e,jqueryObj:a("#"+e),formType:""};var b={options:c,addAssistShowFormTags:function(){a.fn.bsgrid_form.addAssistShowFormTags(c)},showForm:function(f){a.fn.bsgrid_form.showForm(c,f)},showOrHideRequireSpan:function(f){a.fn.bsgrid_form.showOrHideRequireSpan(c,f)},showOrHideAssistForms:function(f){a.fn.bsgrid_form.showOrHideAssistForms(c,f)},showOrHideTag:function(f){a.fn.bsgrid_form.showOrHideTag(c,f)}};a.fn.bsgrid_form.formObjs[e]=b;b.addAssistShowFormTags();return b},getFormObj:function(c){var b=a.fn.bsgrid_form.formObjs[c];return b?b:null},addAssistShowFormTags:function(b){a(".formInput select",b.jqueryObj).each(function(){a(this).before('');var d=a(this).get(0).attributes;for(var e=0;e