diff --git a/src/main/resources/static/js/natural_js/natural.js.min.js b/src/main/resources/static/js/natural_js/natural.js.min.js index 508e54b..fc63f1a 100644 --- a/src/main/resources/static/js/natural_js/natural.js.min.js +++ b/src/main/resources/static/js/natural_js/natural.js.min.js @@ -46,14 +46,14 @@ mergeJsonArray:function(n,k,e){var f=h(n).map(function(){return this[e]}).get(). 96<=f&&105>=f?!0:n.ctrlKey&&-1!==k.indexOf(f)||-1!==navigator.userAgent.indexOf("Firefox")&&(n.ctrlKey&&n.keyCode&&0=f||n.keyCode&&0=f)?!0:-1!==e.indexOf(f)?-1===navigator.userAgent.indexOf("Firefox")||39!=f&&45!=f&&46!=f?!(n.shiftKey&&(35==f||36==f||37==f)):void 0!==n.keyCode&&0=h(this).scrollTop()?!1:!(0>k&&h(this).scrollTop()>=this.scrollHeight-h(this).height())})},getMaxDuration:function(n,k){return!n.css(k)||n.css(k).startsWith("0")?0:Math.max.apply(void 0,h(n.css(k).split(",")).map(function(){return-1t&&(t+=1E3);1===String(t).length&&(t="00"+t);2===String(t).length&&(t="0"+t);return t},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.H()+":"+this.i()+":"+this.s()+this.P()},d:function(){var t=String(this.j());return 1===t.length?"0"+t:t},D:function(){return e[x.getDay()]}, +MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},e;for(e in k)if(k.hasOwnProperty(e)&&void 0!==n.style[e])return k[e];return"nothing"}}})})(d);Date.prototype.formatDate=function(u,n){var k="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),e="Sun Mon Tue Wed Thu Fri Sat".split(" "),f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),p="January February March April May June July August September October November December".split(" "),r={a:function(){return 11< +x.getHours()?"pm":"am"},A:function(){return this.a().toUpperCase()},B:function(){var t=60*(x.getTimezoneOffset()+60);t=3600*x.getHours()+60*x.getMinutes()+x.getSeconds()+t;t=Math.floor(t/86.4);1E3t&&(t+=1E3);1===String(t).length&&(t="00"+t);2===String(t).length&&(t="0"+t);return t},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.H()+":"+this.i()+":"+this.s()+this.P()},d:function(){var t=String(this.j());return 1===t.length?"0"+t:t},D:function(){return e[x.getDay()]}, F:function(){return p[x.getMonth()]},g:function(){return 0===x.getHours()?12:12x.getTimezoneOffset()?"+"+w+t:"-"+w+t},P:function(){var t= this.O();return t.substr(0,3)+":"+t.substr(3,2)},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O()},s:function(){var t=String(x.getSeconds());return 1===t.length?"0"+t:t},S:function(){switch(x.getDate()){case 1:return"st";case 2:return"nd";case 3:return"rd";case 21:return"st";case 22:return"nd";case 23:return"rd";case 31:return"st";default:return"th"}},t:function(){return 1===this.L()&&2===this.n()?29:[null,31,28,31,30,31,30,31, 31,30,31,30,31][this.n()]},U:function(){return Math.round(x.getTime()/1E3)},w:function(){return x.getDay()},W:function(){var t=this.N(),w=this.z(),D=364+this.L()-w;if(2>=D&&t<=3-D)return 1;if(2>=w&&5<=t)return(new Date(this.Y()-1,11,31)).formatDate("W");t=(new Date(this.Y(),0,1)).getDay();t=0!==t?t-1:6;return 3>=t?1+Math.floor((w+t)/7):1+Math.floor((w-(7-t))/7)},y:function(){var t=String(this.Y());return t.substring(t.length-2,t.length)},Y:function(){if(x.getFullYear){var t=(new Date("January 1 2001 00:00:00 +0000")).getFullYear(); if(2001===t)return x.getFullYear()}t=x.getYear();t%=100;return t+(38>t?2E3:1900)},z:function(){var t="January 1 "+this.Y()+" 00:00:00 GMT"+this.O();t=new Date(t);t=x.getTime()-t.getTime();return Math.floor(t/1E3/60/60/24)},Z:function(){return-60*x.getTimezoneOffset()}},x=n?new Date(n):this;u=u.split("");for(n=0;nw.length)break}this.allowPartial&&!e&&(p="");this.allowPartial&&(this.nextValidChar=p.lengththis.options.url.indexOf("?"))return{}; e={};for(var f=this.options.url.split("?")[1].split("&"),p=0;pr?1*f:0}},sort:function(e,f,p){return e.sort(this.sortBy(f,p?-1:1))}};var u=d.ds=function(e,f){if(d.ds.caller!=d.ds.instance)throw Error("[N.datasync]There is no public constructor for N.ds, use instance method"); var p=h(d.context.attr("architecture").page.context);0===p.length&&d.warn('[N.ds]Context element is missing. Please specify the correct Natural-JS\'s main context element selector to "N.context.attr("architecture").page.context" property in "natural.config.js" file');var r=p.find("var#data_sync_temp__");0===r.length&&(r=p.append('').find("var#data_sync_temp__"));this.viewContext=r;p=this.viewContext.instance("ds");void 0!==p?(p.inst=e,void 0!==f&&!0===f&&p.observable.push(e)): (p=this,p.inst=e,p.observable=[],p.observable.push(e),this.viewContext.instance("ds",p));return p};h.extend(u,{instance:function(e,f){return new d.ds(e,f)}});h.extend(u.prototype,{remove:function(){var e=this.inst,f=this.observable;if(e&&f)for(var p=0;pd.string.trimToEmpty(e).length)return e;e=e.replace(/[^0-9*]/g,"");10d.string.trimToEmpty(e).length)return e;e=e.replace(/[^0-9*]/g,"");10f[0])return void 0!==f&&void 0!==f[1]?d.string.trimToEmpty(e.substring(0,r))+f[1]:e.substring(0,r)}return e},replace:function(e,f,p){if(void 0===f||2>f.length)throw d.error("[N.formatter.replace]You must input args[0](target string) and args[1](replace string)");e=e.split(String(f[0])).join(String(f[1]));"undefined"!=typeof f[2]&&"true"==String(f[2])&&(this.vo[p.attr("name")]= e);return e},lpad:function(e,f){if(void 0===f||2>f.length)throw d.error("[N.formatter.lpad]You must input args[0](fill length) and args[1](replace string)");return d.string.lpad(e,Number(f[0]),f[1])},rpad:function(e,f){if(void 0===f||2>f.length)throw d.error("[N.formatter.rpad]You must input args[0](fill length) and args[1](replace string)");return d.string.rpad(e,Number(f[0]),f[1])},mask:function(e,f){if(void 0===f||1>f.length)throw d.error("[N.formatter.rpad]You must input args[0](masking rule)"); var p="*";2!==f.length||d.string.isEmpty(f[1])||(p=f[1]);if("phone"===f[0]){e=d.string.trimToEmpty(e);var r=this.phone(e);e=r.substring(0,r.indexOf("-")+1);f=r.substring(r.lastIndexOf("-"),r.length);r=r.replace(e,"").replace(f,"");return e+r.replace(/\d/g,p)+f}if("email"===f[0]){if(e=d.string.trimToEmpty(e),d.validator.email(e)){f="";for(r=0;3>r;r++)f+=p;return e.replace(/@.*/,"").replace(/.{1,3}$/,f)+e.replace(/.*@/,"@")}}else{if("address"===f[0]){e=d.string.trimToEmpty(e);var x="_\uacbd\uae30_\uac15\uc6d0_\ucda9\ubd81_\ucda9\ub0a8_\uc804\ubd81_\uc804\ub0a8_\uacbd\ubd81_\uacbd\ub0a8_\uc81c\uc8fc_"; e=e.split(" ");var t="",w,D,a;h(e).each(function(){w=d.string.trimToEmpty(this);D=w.substring(0,1);a=w.substring(w.length-1,w.length);if(0>x.indexOf("_"+w+"_")&&0>"_\ub3c4_\uc2dc_\uad70_\uad6c_".indexOf("_"+a+"_")){var b="";if(-1<"_\uc74d_\uba74_\ub3d9_\ub9ac_\ub85c_\uae38_\uac00_".indexOf("_"+a+"_")&&(new RegExp(/[^0-9*]/)).test(D)){for(var c=0;cb&&" "!=this?p:this}).get().join("");x="_\ub0a8\uad81_\uc81c\uac08_\uc120\uc6b0_\ub3c5\uace0_\ud669\ubcf4_\uac15\uc804_\ub3d9\ubc29_\ub9dd\uc808_\uc0ac\uacf5_\uc11c\ubb38_\uc18c\ubd09_\uc7a5\uace1_";f=1;1r;r++)f+=p;return this.rrn(e.replace(/.{1,7}$/,f))}}return e},generic:function(e,f){if(void 0===f||void 0===f[0])throw d.error("[N.formatter.generic]You must input args[0](user format rule)"); -return(new d.Mask(f[0])).setGeneric(String(e))},numeric:function(e,f){if(void 0===f||void 0===f[0])throw d.error("[N.formatter.numeric]You must input args[0](user format rule)");return(new d.Mask(f[0])).setNumeric(String(e),f[1])}});h.extend(n.prototype,{format:function(e){var f=this.options,p=this,r=[],x,t,w;if(void 0!==e)if(ep;p++)f+=Number(e.substr(p,1))*(p%8+2);return((11-f%11)%10+2)%10==Number(e.substr(12,1))?!0:!1},frn_rrn:function(e,f){e=e.replace(/[^0-9*]/g,"");return 13!==d.string.trimToEmpty(e).length?!1:5<=Number(e.charAt(6))&&8>=Number(e.charAt(6))?this.frn():this.rrn()},kbrn:function(e,f){e=e.replace(/[^0-9*]/g,"");var p=[1,3,7,1,3,7,1,3,5,1],r;for(r=f=0;7>=r;r++)f+=p[r]*e.charAt(r);p="0"+p[8]*e.charAt(8); -p=p.substring(p.length-2,p.length);f+=Math.floor(p.charAt(0))+Math.floor(p.charAt(1));f=(10-f%10)%10;return Math.floor(e.charAt(9))===f?!0:!1},kcn:function(e,f){e=e.replace(/[^0-9*]/g,"");if(13!==e.length)return!1;e=e.split("");f=[1,2,1,2,1,2,1,2,1,2,1,2];for(var p=0,r=0;12>r;r++)p+=parseInt(e[r])*f[r];return(10-p%10)%10!==e[12]?!1:!0},date:function(e,f){var p=e.replace(new RegExp("\\"+d.context.attr("data").formatter.date.dateSepa,"gi"),"");e=8===d.string.trimToEmpty(p).length?!0:!1;if(!e)return!1; -e=[31,28,31,30,31,30,31,31,30,31,30,31];f=p.substring(0,4);var r=p.substring(4,6);p=p.substring(6,8);if(0===p)return!1;var x=!1,t=!1;0===f%4&&(t=!0,0===f%100&&(t=!1),0===f%400&&(t=!0));t?2==r?p<=e[r-1]+1&&(x=!0):p<=e[r-1]&&(x=!0):p<=e[r-1]&&(x=!0);return x},time:function(e,f){return(new RegExp(/^([01]\d|2[0-3])([0-5]\d){0,2}$/)).test(e.replace(/[^0-9]/g,""))},accept:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.accept]You must input args[0](accept string)");return(new RegExp("^("+ +zipcode:function(e){return(new RegExp(/^\d{3}-\d{3}$/)).test(e)},decimal:function(e,f){f=void 0!==f&&void 0!==f[0]?f[0]:10;return(new RegExp(/^-?\d+$/)).test(e)||(new RegExp("^-?\\d*\\.\\d{0,"+String(f)+"}$")).test(e)},phone:function(e,f){return void 0!==f&&void 0!==f[0]&&"true"==f[0]?(new RegExp(/^\d{2,3}-\d{3,4}-\w+|"("")"$/)).test(e):(new RegExp(/^\d{2,3}-\d{3,4}-\d{4}$/)).test(e)},rrn:function(e){e=e.replace(/[^0-9*]/g,"");if(13!==d.string.trimToEmpty(e).length)return!1;var f=e.substring(0,1), +p=e.substring(1,2),r=e.substring(2,3),x=e.substring(3,4),t=e.substring(4,5),w=e.substring(5,6);f=2*f+3*p+4*r+5*x+6*t+7*w;p=e.substring(6,7);r=e.substring(7,8);x=e.substring(8,9);t=e.substring(9,10);w=e.substring(10,11);var D=e.substring(11,12);e=e.substring(12,13);f=11-(f+8*p+9*r+2*x+3*t+4*w+5*D)%11;f%=10;return f!==e?!1:!0},ssn:function(e){return(new RegExp(/\d{3}-\d{2}-\d{4}/)).test(e)},frn:function(e){e=e.replace(/[^0-9*]/g,"");if(13!==d.string.trimToEmpty(e).length)return!1;var f=0;if(5!=e.substr(6, +1)&&6!=e.substr(6,1)&&7!=e.substr(6,1)&&8!=e.substr(6,1)||0!==Number(e.substr(7,2))%2)return!1;for(var p=0;12>p;p++)f+=Number(e.substr(p,1))*(p%8+2);return((11-f%11)%10+2)%10==Number(e.substr(12,1))?!0:!1},frn_rrn:function(e){e=e.replace(/[^0-9*]/g,"");return 13!==d.string.trimToEmpty(e).length?!1:5<=Number(e.charAt(6))&&8>=Number(e.charAt(6))?this.frn():this.rrn()},kbrn:function(e){e=e.replace(/[^0-9*]/g,"");var f=[1,3,7,1,3,7,1,3,5,1],p,r=0;for(p=0;7>=p;p++)r+=f[p]*e.charAt(p);f="0"+f[8]*e.charAt(8); +f=f.substring(f.length-2,f.length);r+=Math.floor(f.charAt(0))+Math.floor(f.charAt(1));r=(10-r%10)%10;return Math.floor(e.charAt(9))===r?!0:!1},kcn:function(e){e=e.replace(/[^0-9*]/g,"");if(13!==e.length)return!1;e=e.split("");for(var f=[1,2,1,2,1,2,1,2,1,2,1,2],p=0,r=0;12>r;r++)p+=parseInt(e[r])*f[r];return(10-p%10)%10!==e[12]?!1:!0},date:function(e){var f=e.replace(new RegExp("\\"+d.context.attr("data").formatter.date.dateSepa,"gi"),"");e=8===d.string.trimToEmpty(f).length?!0:!1;if(!e)return!1;e= +[31,28,31,30,31,30,31,31,30,31,30,31];var p=f.substring(0,4),r=f.substring(4,6);f=f.substring(6,8);if(0===f)return!1;var x=!1,t=!1;0===p%4&&(t=!0,0===p%100&&(t=!1),0===p%400&&(t=!0));t?2==r?f<=e[r-1]+1&&(x=!0):f<=e[r-1]&&(x=!0):f<=e[r-1]&&(x=!0);return x},time:function(e){return(new RegExp(/^([01]\d|2[0-3])([0-5]\d){0,2}$/)).test(e.replace(/[^0-9]/g,""))},accept:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.accept]You must input args[0](accept string)");return(new RegExp("^("+ f[0]+")$")).test(e)},match:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.match]You must input args[0](match string)");return(new RegExp(f[0])).test(e)},acceptfileext:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.acceptFileExt]You must input args[0](file extention)");return(new RegExp(".("+f[0]+")$","i")).test(e)},notaccept:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.notAccept]You must input args[0](refused string)");return!(new RegExp("^("+ f[0]+")$")).test(e)},notmatch:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.notMatch]You must input args[0](unmatch String)");return!(new RegExp(f[0])).test(e)},notacceptfileext:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.notAcceptFileExt]You must input args[0](file extention)");return!(new RegExp(".("+f[0]+")$","i")).test(e)},equalTo:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.equalTo]You must input args[0](selector string(:input))"); return null===d.string.trimToNull(h(f[0]).val())?!0:e===h(f[0]).val()},maxlength:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.maxlength]You must input args[0](length)");return d.string.trimToEmpty(e).length<=Number(d.string.trimToZero(f[0]))},minlength:function(e,f){if(void 0===f||void 0===f[0])throw Error("[Validator.minlength]You must input args[0](length)");return Number(d.string.trimToZero(f[0]))<=d.string.trimToEmpty(e).length},rangelength:function(e,f){if(void 0===f||2> @@ -141,22 +141,22 @@ void 0!==d().alert)d(null!==f.targetEle?b:void 0).alert(h(t).map(function(){if(v Copyright 2014 Goldman Kim(bbalganjjm@gmail.com) */ -(function(H,h){N.version["Natural-UI"]="1.0.0";h.fn.extend(h.extend(N.prototype,{alert:function(d,u){return new N.alert(this,d,u)},button:function(d){if(this.is("input[type='button'], button, a"))return this.each(function(){return new N.button(N(this),d)})},select:function(d){return new N.select(this,d)},form:function(d){return new N.form(this,d)},list:function(d){return new N.list(this,d)},grid:function(d){return new N.grid(this,d)},popup:function(d){return new N.popup(this,d)},tab:function(d){return new N.tab(this, -d)},datepicker:function(d){return new N.datepicker(this,d)},tree:function(d){return new N.tree(this,d)},pagination:function(d){return new N.pagination(this,d)}}));(function(d){var u=d.ui={iteration:{render:function(a,b,c,g,l){var m=this.options,q=this,v=q.tempRowEle.clone(!0,!0);m.context.append(v);var y=d(m.data[a]).form({context:v,html:m.html,validate:m.validate,extObj:q,extRow:a,revert:m.revert,unbind:!1,cache:m.cache});null!==m.rowHandlerBeforeBind&&m.rowHandlerBeforeBind.call(q,a,v,m.data[a]); -y.bind();null!==m.rowHandler&&m.rowHandler.call(q,a,v,m.data[a]);0"+g,function(l){var m=h(this),q;if(!h(l.target).is(b.checkAllTarget)&&!h(l.target).is(b.checkSingleTarget)){if(m.hasClass(a+"_selected__")){b.row=-1;var v=!1}else b.row=b.context.find(">"+g).index(m),v=!0;b.multiselect||b.unselect||(b.row=b.context.find(">"+g).index(m),v=!0);null!==b.onBeforeSelect&&(q=b.onBeforeSelect.call(c,b.row,m,b.data,b.beforeRow,l));if(void 0===q||!0===q)v?(b.multiselect||b.context.find("> "+g+":eq("+ -b.beforeRow+")").removeClass(a+"_selected__"),m.addClass(a+"_selected__"),b.beforeRow=b.row):m.removeClass(a+"_selected__");null!==b.onSelect&&b.onSelect.call(c,b.row,m,b.data,b.beforeRow,l)}})},checkAll:function(a){var b=this.options,c=this.contextEle,g="grid"===a?this.thead.find(b.checkAll):h(b.checkAll),l="grid"===a?"tbody > tr > td":"li";g.on("click."+a+".checkAll",function(){h(this).prop("checked")?c.find(l+" "+b.checkAllTarget+":not(':checked')").prop("checked",!0):c.find(l+" "+b.checkAllTarget+ -":checked").removeProp("checked")});c.on("click."+a+".checkAllTarget",l+" "+b.checkAllTarget,function(){c.find(l+" "+b.checkAllTarget).length===c.find(l+" "+b.checkAllTarget+":checked").length?g.prop("checked",!0):g.removeProp("checked")})},checkSingle:function(a){var b=this.options,c=this.contextEle,g="grid"===a?"tbody > tr > td":"li";c.on("click.grid.checkSingleTarget",g+" "+b.checkSingleTarget,function(){c.find(g+" "+b.checkSingleTarget).not(this).removeAttr("checked")})},move:function(a,b,c){if(a!== -b){var g=this.options;if(b>g.data.length-1){var l="after";b=g.data.length-1;g.data.push(g.data.splice(a,1)[0])}else l="before",g.data.splice(ag.data.length-1){var l="after";b=g.data.length-1;g.data.push(g.data[a])}else l= -"before",g.data.splice(b,0,g.data[a]);c="grid"===c?"tbody":"li";g.context.find(c+":eq("+b+")")[l](g.context.find(c+":eq("+a+")").clone(!0,!0))}return this}},draggable:{events:function(a,b,c,g){var l=this;this.on("mousedown"+a+" touchstart"+a,function(m){var q=m.originalEvent.touches?m.originalEvent.touches[0]:m;if(m.originalEvent.touches||1===(m.which||m.button)){var v;void 0!==b&&(v=b.call(this,m,l,q.pageX,q.pageY));!1!==v&&(h(document).on("mousemove"+a+" touchmove"+a,function(y){h(document).on("dragstart"+ -a+" selectstart"+a,function(){return!1});var z=y.originalEvent.touches?y.originalEvent.touches[0]:y;void 0!==c&&c.call(this,y,l,z.pageX,z.pageY);y.originalEvent.touches||y.preventDefault();y.stopImmediatePropagation();y.stopPropagation();if(!y.originalEvent.touches)return!1}),h(document).on("mouseup"+a+" touchend"+a,function(y){h(document).off("dragstart"+a+" selectstart"+a+" mousemove"+a+" touchmove"+a+" mouseup"+a+" touchend"+a);void 0!==g&&g.call(this,y,l);y.originalEvent.touches||y.preventDefault(); -y.stopImmediatePropagation();y.stopPropagation();if(!y.originalEvent.touches)return!1}))}m.originalEvent.touches||m.preventDefault();m.stopImmediatePropagation();m.stopPropagation();if(!m.originalEvent.touches)return!1})},moveX:function(a,b,c){var g=this;if(void 0!==b&&ac)return a=c,!1;h(["-webkit-transform","-ms-transform","transform"]).each(function(){g.css(this,"translateX("+a+"px)")})},moveY:function(a,b,c){var g=this;if(void 0!==b&&ac)return a=c,!1;h(["-webkit-transform","-ms-transform","transform"]).each(function(){g.css(this,"translateY("+a+"px)")})}},scroll:{paging:function(a,b,c,g,l){var m=this.options,q=this;a.on("scroll",function(){if(0=m.context.height()-v.height()&&(c=m.context.find(g).length,-1=m.scrollPaging.idx+b&&(0=m.data.length?m.data.length-m.scrollPaging.idx:b,m.scrollPaging.idx"+g,function(l){var m=h(this),q;if(!h(l.target).is(b.checkAllTarget)&&!h(l.target).is(b.checkSingleTarget)){if(m.hasClass(a+"_selected__")){b.row=-1;var v=!1}else b.row=b.context.find(">"+g).index(m),v=!0;b.multiselect||b.unselect||(b.row=b.context.find(">"+g).index(m),v=!0);null!==b.onBeforeSelect&&(q=b.onBeforeSelect.call(c,b.row,m,b.data,b.beforeRow,l));if(void 0===q||!0===q)v?(b.multiselect||b.context.find("> "+g+":eq("+b.beforeRow+")").removeClass(a+ +"_selected__"),m.addClass(a+"_selected__"),b.beforeRow=b.row):m.removeClass(a+"_selected__");null!==b.onSelect&&b.onSelect.call(c,b.row,m,b.data,b.beforeRow,l)}})},checkAll:function(a){var b=this.options,c=this.contextEle,g="grid"===a?this.thead.find(b.checkAll):h(b.checkAll),l="grid"===a?"tbody > tr > td":"li";g.on("click."+a+".checkAll",function(){h(this).prop("checked")?c.find(l+" "+b.checkAllTarget+":not(':checked')").prop("checked",!0):c.find(l+" "+b.checkAllTarget+":checked").removeProp("checked")}); +c.on("click."+a+".checkAllTarget",l+" "+b.checkAllTarget,function(){c.find(l+" "+b.checkAllTarget).length===c.find(l+" "+b.checkAllTarget+":checked").length?g.prop("checked",!0):g.removeProp("checked")})},checkSingle:function(a){var b=this.options,c=this.contextEle,g="grid"===a?"tbody > tr > td":"li";c.on("click.grid.checkSingleTarget",g+" "+b.checkSingleTarget,function(){c.find(g+" "+b.checkSingleTarget).not(this).removeAttr("checked")})},move:function(a,b,c){if(a!==b){var g=this.options;if(b>g.data.length- +1){var l="after";b=g.data.length-1;g.data.push(g.data.splice(a,1)[0])}else l="before",g.data.splice(ag.data.length-1){var l="after";b=g.data.length-1;g.data.push(g.data[a])}else l="before",g.data.splice(b, +0,g.data[a]);c="grid"===c?"tbody":"li";g.context.find(c+":eq("+b+")")[l](g.context.find(c+":eq("+a+")").clone(!0,!0))}return this}},draggable:{events:function(a,b,c,g){var l=this;this.on("mousedown"+a+" touchstart"+a,function(m){var q=m.originalEvent.touches?m.originalEvent.touches[0]:m;if(m.originalEvent.touches||1===(m.which||m.button)){var v;void 0!==b&&(v=b.call(this,m,l,q.pageX,q.pageY));!1!==v&&(h(document).on("mousemove"+a+" touchmove"+a,function(y){h(document).on("dragstart"+a+" selectstart"+ +a,function(){return!1});var z=y.originalEvent.touches?y.originalEvent.touches[0]:y;void 0!==c&&c.call(this,y,l,z.pageX,z.pageY);y.originalEvent.touches||y.preventDefault();y.stopImmediatePropagation();y.stopPropagation();if(!y.originalEvent.touches)return!1}),h(document).on("mouseup"+a+" touchend"+a,function(y){h(document).off("dragstart"+a+" selectstart"+a+" mousemove"+a+" touchmove"+a+" mouseup"+a+" touchend"+a);void 0!==g&&g.call(this,y,l);y.originalEvent.touches||y.preventDefault();y.stopImmediatePropagation(); +y.stopPropagation();if(!y.originalEvent.touches)return!1}))}m.originalEvent.touches||m.preventDefault();m.stopImmediatePropagation();m.stopPropagation();if(!m.originalEvent.touches)return!1})},moveX:function(a,b,c){var g=this;if(void 0!==b&&ac)return a=c,!1;h(["-webkit-transform","-ms-transform","transform"]).each(function(){g.css(this,"translateX("+a+"px)")})},moveY:function(a,b,c){var g=this;if(void 0!==b&&ac)return a=c,!1;h(["-webkit-transform", +"-ms-transform","transform"]).each(function(){g.css(this,"translateY("+a+"px)")})}},scroll:{paging:function(a,b,c,g,l){var m=this.options,q=this;a.on("scroll",function(){if(0=m.context.height()-v.height()&&(c=m.context.find(g).length,-1=m.scrollPaging.idx+b&&(0=m.data.length? +m.data.length-m.scrollPaging.idx:b,m.scrollPaging.idx').css(b))[a.isWindow? @@ -241,8 +241,8 @@ a.saveMemory&&(this.alert.options.msg=null)},loadContent:function(a){var b=this. arguments)}}else b.onRemove=function(){b.context=null};if(b.opener){var m=b.opener;b.opener=void 0}c.alert=d(H).alert(b);m&&(b.opener=m,m=void 0);c.alert.options.msgContext.addClass("popup_overlay__");c.alert.options.msgContents.addClass("popup__");b.saveMemory&&(c.alert.options.msg=null);this.request.options.target=b.context.parent();g=b.context.filter(".view_context__:last").instance("cont");void 0!==g&&(g.caller=c,null!=b.opener&&(g.opener=b.opener),d.cont.trInit.call(this,g,this.request));a.call(c, g,b.context);null!==b.onLoad&&b.onLoad.call(this,g)})},popOpen:function(a,b){b=this.options;null===b.url&&b.context.show();this.alert.show();if(null!==b.onOpen)if(b.onOpenData=void 0!==a?a:null,void 0!==b.context.filter(".view_context__:last").instance("cont")[b.onOpen])b.context.filter(".view_context__:last").instance("cont")[b.onOpen](a);else d.warn("[N.popup.popOpen]The onOpen event handler("+b.onOpen+") is not defined on the Controller(N.cont) of the Popup.")}});h.extend(f.prototype,{context:function(a){return void 0!== a?this.options.context.find(a):this.options.context},open:function(a){var b=this.options,c=this;void 0===a&&null!==b.onOpenData&&(a=b.onOpenData);null===this.options.url||(b.preload||b.isLoaded)&&b.isLoaded?(f.popOpen.call(this,a),b.preload&&"remove"===b.closeMode&&(b.isLoaded=!1)):(b.isLoaded=!1,f.loadContent.call(this,function(g,l){b.context=l;b.context.instance("popup",this);f.popOpen.call(c,a,g);"remove"!==b.closeMode&&(b.isLoaded=!0)}));return this},close:function(a){var b=this.options;void 0=== -a&&null!==b.onCloseData&&(a=b.onCloseData);null!==b.onClose&&b.onClose.call(this,a);this.alert[b.closeMode]();return this},changeEvent:function(a,b){this.options[a]=b;this.alert.options[a]=this.options[a]},remove:function(){this.alert.remove();return this}});var p=d.tab=function(a,b){this.options={context:0ul>li"):null,tabOpts:[],randomSel:!1,opener:null,onActive:null,onLoad:null,blockOnActiveWhenCreate:!1,contents:0div"):null,tabScroll:!1, -tabScrollCorrection:{tabContainerWidthCorrectionPx:0,tabContainerWidthReCalcDelayTime:0}};var c=!1;if(b&&b.opener){var g=b.opener;b.opener=void 0;c=!0}try{h.extend(!0,this.options,d.context.attr("ui").tab)}catch(q){throw d.error("N.tab",q);}d.isPlainObject(a)&&(u.utils.wrapHandler(b,"tab","onActive"),u.utils.wrapHandler(b,"tab","onLoad"),h.extend(!0,this.options,a),this.options.context=d(a.context));this.options.links=this.options.context.find(">ul>li");this.options.contents=this.options.context.find(">div"); +a&&null!==b.onCloseData&&(a=b.onCloseData);null!==b.onClose&&b.onClose.call(this,a);this.alert[b.closeMode]();return this},changeEvent:function(a,b){this.options[a]=b;this.alert.options[a]=this.options[a];return this},remove:function(){this.alert.remove();return this}});var p=d.tab=function(a,b){this.options={context:0ul>li"):null,tabOpts:[],randomSel:!1,opener:null,onActive:null,onLoad:null,blockOnActiveWhenCreate:!1,contents:0div"):null, +tabScroll:!1,tabScrollCorrection:{tabContainerWidthCorrectionPx:0,tabContainerWidthReCalcDelayTime:0}};var c=!1;if(b&&b.opener){var g=b.opener;b.opener=void 0;c=!0}try{h.extend(!0,this.options,d.context.attr("ui").tab)}catch(q){throw d.error("N.tab",q);}d.isPlainObject(a)&&(u.utils.wrapHandler(b,"tab","onActive"),u.utils.wrapHandler(b,"tab","onLoad"),h.extend(!0,this.options,a),this.options.context=d(a.context));this.options.links=this.options.context.find(">ul>li");this.options.contents=this.options.context.find(">div"); var l=this,m;0===this.options.tabOpts.length&&this.options.links.each(function(q){q=h(this);m=d.element.toOpts(q);void 0===m&&(m={});m.target=q.find("a").attr("href");l.options.tabOpts.push(m)});h.extend(this.options,b);c&&(b.opener=g,this.options.opener=b.opener,g=void 0);this.options.context.addClass("tab__");p.wrapEle.call(this);this.options.context.instance("tab",this)};h.extend(p,{wrapEle:function(){var a=this.options;a.contents.hide();var b=this,c;h(a.tabOpts).each(function(l){this.disable? b.disable(l):b.enable(l);!0===this.active?c=l:a.randomSel?c=Math.floor(Math.random()*a.links.length):0===l&&(c=l);this.preload&&void 0!==this.url&&p.loadContent.call(b,this.url,l,function(m,q){null!==a.onLoad&&a.onLoad.call(b,l,a.links.eq(l),q,m)})});var g;a.links.on("mousedown.tab"+(0ul").css("margin-left"))});a.links.on("click.tab"+(0ul").css("margin-left"))-g)&&!0!==q)return g=void 0,!1;g=void 0;if(!h(this).hasClass("tab_active__")){var v=h(this),y=a.beforeOpenIdx=a.links.index(this),z=a.tabOpts[y],C=a.contents.eq(y);a.links.filter(".tab_active__").removeClass("tab_active__");v.addClass("tab_active__");var G=function(){null!==a.onActive&&(!1===a.blockOnActiveWhenCreate||!0===a.blockOnActiveWhenCreate&&!0!==q)&&a.onActive.call(b,y,v,C,a.links,a.contents)}, @@ -296,10 +296,10 @@ v.events("change","dataSync.form")&&(l[a]=null,this.bind(void 0,void 0,a)),v.val v.text(null===b?"":b)),!1!==c&&d.ds.instance(null!==g.extObj?g.extObj:this).notify(-1 li").clone(!0,!0);this.options.context.addClass("list__");this.options.hover&&this.options.context.addClass("list_hover__");(this.options.select||this.options.multiselect)&&u.iteration.select.call(this,"list");0 .list__"));null!==this.options.checkAll&&null!==this.options.checkAllTarget?u.iteration.checkAll.call(this,"list"):null!==this.options.checkSingleTarget&&u.iteration.checkSingle.call(this,"list");this.options.context.instance("list",this);d.ds.instance(this,!0);return this};h.extend(t,{createScroll:function(){var a=this.options;a.context.css({margin:"0"});d.browser.scrollbarWidth();var b=a.context.wrap('
').parent().css({height:String(a.height)+ +{data:"array"===d.type(a)?d(a):a,row:-1,beforeRow:-1,context:null,height:0,validate:!0,html:!1,addTop:!0,addSelect:!1,vResizable:!1,windowScrollLock:!0,select:!1,selectWithCheck:!1,unselect:!0,multiselect:!1,checkAll:null,checkAllTarget:null,checkSingleTarget:null,hover:!1,revert:!1,createRowDelay:1,scrollPaging:{idx:0,size:100},fRules:null,vRules:null,appendScroll:!0,addScroll:!0,selectScroll:!0,checkScroll:!0,validateScroll:!0,cache:!0,tpBind:!1,rowHandlerBeforeBind:null,rowHandler:null,onBeforeSelect:null, +onSelect:null,onBind:null};try{h.extend(!0,this.options,d.context.attr("ui").list)}catch(c){throw d.error("N.list",c);}d.isPlainObject(b)?(u.utils.wrapHandler(b,"list","onBeforeSelect"),u.utils.wrapHandler(b,"list","onSelect"),u.utils.wrapHandler(b,"list","onBind"),b.data="array"===d.type(b.data)?d(b.data):b.data,h.extend(!0,this.options,b),this.options.scrollPaging.limit=this.options.scrollPaging.size,"string"===d.type(this.options.context)&&(this.options.context=d(this.options.context))):this.options.context= +d(b);this.options.addTop||(this.options.scrollPaging.size=0,this.options.createRowDelay=0);this.options.scrollPaging.defSize=this.options.scrollPaging.size;this.tempRowEle=this.options.context.find("> li").clone(!0,!0);this.options.context.addClass("list__");this.options.hover&&this.options.context.addClass("list_hover__");(this.options.select||this.options.multiselect)&&u.iteration.select.call(this,"list");0 .list__"));null!==this.options.checkAll&&null!==this.options.checkAllTarget?u.iteration.checkAll.call(this,"list"):null!==this.options.checkSingleTarget&&u.iteration.checkSingle.call(this,"list");this.options.context.instance("list",this);d.ds.instance(this,!0);return this};h.extend(t,{createScroll:function(){var a=this.options;a.context.css({margin:"0"});d.browser.scrollbarWidth();var b=a.context.wrap('
').parent().css({height:String(a.height)+ "px","overflow-y":"scroll","margin-left":"-1px"});d.browser.is("ie")&&b.css("overflow-x","hidden");a.windowScrollLock&&d.event.windowScrollLock(b);u.scroll.paging.call(this,b,a.scrollPaging.limit,void 0,"> li","list.bind");a.vResizable&&t.vResize.call(this,b)},vResize:function(a){var b=h('
').css({"text-align":"center",cursor:"n-resize","margin-bottom":a.css("margin-bottom")});a.css("margin-bottom","0");var c,g;u.draggable.events.call(b,".list.vResize",function(l,m, q,v){g=a.offset()},function(l,m,q,v){c=v-g.top+"px";a.css({height:c,"max-height":c})});a.after(b)}});h.extend(t.prototype,{data:function(a){var b=this.options;if(void 0===a)return b.data.get();if(!1===a)return b.data;if("modified"===a)return b.data.datafilter(function(m){return void 0!==m.rowStatus}).get();if("selected"===a){if(b.select||b.multiselect){var c=[],g=Array.prototype.slice.call(arguments,0),l=this.contextEle.find(">li.form__");l.filter(".list_selected__").each(function(){h(this);1li.form__"),l.find(b.checkAllTarget||b.checkSingleTarget).filter(":checked").each(function(){var m=h(this);1.form__:eq("+String(a)+")").instance("form");if(g)g.val(b,c);else if(this.options.data[a])this.options.data[a][b]=c;else throw d.error("[N.list.prototype.val]There is no row data that is "+a+" index");return this},move:function(a,b){u.iteration.move.call(this,a,b,"list");return this},copy:function(a,b){u.iteration.copy.call(this,a,b,"list");return this},update:function(a,b){void 0!==a?void 0!==b?this.options.context.find(">li:eq("+String(a)+")").instance("form").update(0, b):!0!==this.options.data[a]._isRevert&&"insert"===this.options.data[a].rowStatus?"insert"===this.options.data[a].rowStatus?this.bind(void 0,"list.update"):this.add(this.options.data[a]):this.options.context.find(">li:eq("+String(a)+")").instance("form").update(0):this.bind(void 0,"list.update");return this}});var w=d.grid=function(a,b){this.options={data:"array"===d.type(a)?d(a):a,row:-1,beforeRow:-1,context:null,height:0,fixedcol:0,more:!1,validate:!0,html:!1,addTop:!0,addSelect:!1,filter:!1,resizable:!1, -vResizable:!1,sortable:!1,windowScrollLock:!0,select:!1,selectWithCheck:!1,unselect:!0,multiselect:!1,checkAll:null,checkAllTarget:null,checkSingleTarget:null,checkWidthSelect:!1,hover:!1,revert:!1,createRowDelay:1,scrollPaging:{idx:0,size:100},fRules:null,vRules:null,appendScroll:!0,addScroll:!0,selectScroll:!0,checkScroll:!0,validateScroll:!0,cache:!0,tpBind:!1,pastiable:!1,rowHandlerBeforeBind:null,rowHandler:null,onBeforeSelect:null,onSelect:null,onBind:null,misc:{resizableCorrectionWidth:0,resizableLastCellCorrectionWidth:0, +vResizable:!1,sortable:!1,windowScrollLock:!0,select:!1,selectWithCheck:!1,unselect:!0,multiselect:!1,checkAll:null,checkAllTarget:null,checkSingleTarget:null,hover:!1,revert:!1,createRowDelay:1,scrollPaging:{idx:0,size:100},fRules:null,vRules:null,appendScroll:!0,addScroll:!0,selectScroll:!0,checkScroll:!0,validateScroll:!0,cache:!0,tpBind:!1,pastiable:!1,rowHandlerBeforeBind:null,rowHandler:null,onBeforeSelect:null,onSelect:null,onBind:null,misc:{resizableCorrectionWidth:0,resizableLastCellCorrectionWidth:0, resizeBarCorrectionLeft:0,resizeBarCorrectionHeight:0,fixedcolHeadMarginTop:0,fixedcolHeadMarginLeft:0,fixedcolHeadHeight:0,fixedcolBodyMarginTop:0,fixedcolBodyMarginLeft:0,fixedcolBodyBindHeight:0,fixedcolBodyAddHeight:1,fixedcolRootContainer:null},currMoveToRow:-1};try{h.extend(!0,this.options,d.context.attr("ui").grid)}catch(c){throw d.error("N.grid",c);}d.isPlainObject(b)?(u.utils.wrapHandler(b,"grid","onBeforeSelect"),u.utils.wrapHandler(b,"grid","onSelect"),u.utils.wrapHandler(b,"grid","onBind"), b.data="array"===d.type(b.data)?d(b.data):b.data,h.extend(!0,this.options,b),this.options.scrollPaging.limit=this.options.scrollPaging.size,"string"===d.type(this.options.context)&&(this.options.context=d(this.options.context))):this.options.context=d(b);this.options.addTop||(this.options.scrollPaging.size=0,this.options.createRowDelay=0);this.options.scrollPaging.defSize=this.options.scrollPaging.size;this.tempRowEle=this.options.context.find("> tbody").clone(!0,!0);this.options.context.addClass("grid__"); this.options.hover&&this.options.context.addClass("grid_hover__");(this.options.select||this.options.multiselect)&&u.iteration.select.call(this,"grid");this.options.resizable&&w.removeColgroup.call(this);this.options.more&&w.more.call(this);0.thead_wrap__>table>thead"):this.options.context.find(">thead"); @@ -416,8 +416,8 @@ a.parent().addClass("tree_last_node__");a.remove();if(b.checkbox)g.on("click.tre q=q.find(":checked").length;y=y.find("> span.tree_check__ > :checkbox");var G=v.not(":first").find("> span.tree_check__ > :checkbox");z?0 span.tree_check__ > :not(:checked)").prop("checked",!0).addClass("tree_auto_parents_select__"):q===C&&(y.prop("checked",!0).removeClass("tree_auto_parents_select__"),y.trigger("click.tree").trigger("click.tree"))):0 a.tree_key__.tree_active__").removeClass("tree_active__");d(this).addClass("tree_active__")});g.on("click.tree",".tree_icon__"+(b.folderSelectable?"":", li:not('.tree_last_node__') .tree_key__"),function(m){m.preventDefault();m=d(this).parent("li");0 ul > li").length&&(m.hasClass("tree_open__")?m.removeClass("tree_open__").addClass("tree_close__"):m.removeClass("tree_close__").addClass("tree_open__"))});if(b.folderSelectable)g.on("click.tree", -"li:not('.tree_last_node__') .tree_key__",function(m){m.preventDefault()});this.collapse(!0);return this},val:function(a,b,c){return this},select:function(a){var b=this.options;if(void 0!==a)return b.context.find(".tree_"+a+"__ > .tree_key__").trigger("click.tree"),this;a=b.context.find(".tree_key__.tree_active__");if(0 .tree_key__").trigger("click.tree"),this;a=b.context.find(".tree_key__.tree_active__");if(0