Produced by Araxis Merge on 6/22/2018 1:28:16 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | v1603_release_60.zip\CRM_solutions\North52BPA_1_0_0_549_managed_2013_2015_2016_Dyn365.zip\WebResources | north52_javascriptalpacabootstrapE08B2205-EF36-E711-B776-00155D011502 | Fri Mar 30 17:17:44 2018 UTC |
| 2 | v1603_release_60.zip\CRM_solutions\North52BPA_1_0_0_549_managed_2013_2015_2016_Dyn365.zip\WebResources | north52_javascriptalpacabootstrapE08B2205-EF36-E711-B776-00155D011502 | Mon Jun 18 14:01:19 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 4 | 176 |
| Changed | 3 | 8 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | !function( e,t){var n =!0;e&&"un defined"!= typeof e.u md&&(n=e.u md),n&&"ob ject"==typ eof export s?module.e xports=t(r equire("jq uery"),req uire("hand lebars"),r equire("bo otstrap")) :n&&"funct ion"==type of define& &define.am d?define(" alpaca",[" jquery","h andlebars" ,"bootstra p"],t):e.A lpaca=t(e. jQuery,e.H andlebars, e.Bootstra p)}(this,f unction($, Handlebars ,Bootstrap ){return t his.Handle barsPrecom piled=this .Handlebar sPrecompil ed||{},thi s.Handleba rsPrecompi led["web-d isplay"]=t his.Handle barsPrecom piled["web -display"] ||{},this. Handlebars Precompile d["web-dis play"]["co ntainer-ar ray-item"] =Handlebar s.template ({1:functi on(e,t,n,i ,a){return ""},compil er:[7,">= 4.0.0"],ma in:functio n(e,t,n,i, a){var r,o ,l,s='<scr ipt type=" text/x-han dlebars-te mplate">\n \n <div >\n ';return o=null!=(o =n.itemFie ld||(null! =t?t.itemF ield:t))?o :n.helperM issing,l={ name:"item Field",has h:{},fn:e. program(1, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(nu ll!=t?t:{} ,l):o,n.it emField||( r=n.blockH elperMissi ng.call(t, r,l)),null !=r&&(s+=r ),s+"\n </div>\n\ n</script> \n"},useDa ta:!0}),th is.Handleb arsPrecomp iled["web- display"][ "container -array"]=H andlebars. template({ 1:function (e,t,n,i,a ){var r,o, l,s="\n " ;return o= null!=(o=n .item||(nu ll!=t?t.it em:t))?o:n .helperMis sing,l={na me:"item", hash:{},fn :e.program (2,a,0),in verse:e.no op,data:a} ,r="functi on"==typeo f o?o.call (null!=t?t :{},l):o,n .item||(r= n.blockHel perMissing .call(t,r, l)),null!= r&&(s+=r), s+"\n\n"}, 2:function (e,t,n,i,a ){return"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n\n'+(null !=(r=n.eac h.call(nul l!=t?t:{}, null!=t?t. items:t,{n ame:"each" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n </d iv>\n\n</s cript>"},u seData:!0} ),this.Han dlebarsPre compiled[" web-displa y"]["conta iner-objec t-item"]=H andlebars. template({ 1:function (e,t,n,i,a ){return"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r,o,l ,s='<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n ' ;return o= null!=(o=n .itemField ||(null!=t ?t.itemFie ld:t))?o:n .helperMis sing,l={na me:"itemFi eld",hash: {},fn:e.pr ogram(1,a, 0),inverse :e.noop,da ta:a},r="f unction"== typeof o?o .call(null !=t?t:{},l ):o,n.item Field||(r= n.blockHel perMissing .call(t,r, l)),null!= r&&(s+=r), s+"\n < /div>\n\n< /script>\n "},useData :!0}),this .Handlebar sPrecompil ed["web-di splay"]["c ontainer-o bject"]=Ha ndlebars.t emplate({1 :function( e,t,n,i,a) {var r,o,l ,s="\n "; return o=n ull!=(o=n. item||(nul l!=t?t.ite m:t))?o:n. helperMiss ing,l={nam e:"item",h ash:{},fn: e.program( 2,a,0),inv erse:e.noo p,data:a}, r="functio n"==typeof o?o.call( null!=t?t: {},l):o,n. item||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(s+=r),s +"\n\n"},2 :function( e,t,n,i,a) {return""} ,compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a){ var r;retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <div>\n \n'+(null! =(r=n.each .call(null !=t?t:{},n ull!=t?t.i tems:t,{na me:"each", hash:{},fn :e.program (1,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </di v>\n\n</sc ript>"},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-display "]["contai ner-table- item"]=Han dlebars.te mplate({1: function(e ,t,n,i,a){ return""}, compiler:[ 7,">= 4.0. 0"],main:f unction(e, t,n,i,a){v ar r;retur n'<script type="text /x-handleb ars-templa te">\n\n <tr>\n '+(n ull!=(r=(n .itemField ||t&&t.ite mField||n. helperMiss ing).call( null!=t?t: {},"td",{n ame:"itemF ield",hash :{},fn:e.p rogram(1,a ,0),invers e:e.noop,d ata:a}))?r :"")+"\n </tr>\n\ n\n</scrip t>\n"},use Data:!0}), this.Handl ebarsPreco mpiled["we b-display" ]["contain er-table"] =Handlebar s.template ({1:functi on(e,t,n,i ,a){return ""},3:func tion(e,t,n ,i,a){var r;return" < th>"+e.esc apeExpress ion(e.lamb da(null!=( r=null!=t? t.value:t) ?r.title:r ,t))+"</th >\n"},5:fu nction(e,t ,n,i,a){va r r;return "\n " +(null!=(r =(n.item|| t&&t.item| |n.helperM issing).ca ll(null!=t ?t:{},"tr" ,{name:"it em",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+"\n\n"} ,compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a){ var r,o,l, s=null!=t? t:{},u=n.h elperMissi ng,c='<scr ipt type=" text/x-han dlebars-te mplate">\n \n <div >\n\n ';retur n o=null!= (o=n.array Toolbar||( null!=t?t. arrayToolb ar:t))?o:u ,l={name:" arrayToolb ar",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a},r="fu nction"==t ypeof o?o. call(s,l): o,n.arrayT oolbar||(r =n.blockHe lperMissin g.call(t,r ,l)),null! =r&&(c+=r) ,c+"\n\n <tab le>\n\n < !-- table headers -- >\n <thea d>\n <tr>\n"+(n ull!=(r=(n .eachPrope rty||t&&t. eachProper ty||u).cal l(s,null!= (r=null!=( r=null!=t? t.schema:t )?r.items: r)?r.prope rties:r,{n ame:"eachP roperty",h ash:{},fn: e.program( 3,a,0),inv erse:e.noo p,data:a}) )?r:"")+" </tr> \n </thea d>\n\n <! -- table b ody -->\n <tbody>\n "+(null!=( r=n.each.c all(s,null !=t?t.item s:t,{name: "each",has h:{},fn:e. program(5, a,0),inver se:e.noop, data:a}))? r:"")+" < /tbody>\n\ n < /table>\n\ n </div >\n\n</scr ipt>"},use Data:!0}), this.Handl ebarsPreco mpiled["we b-display" ]["contain er-tablero w-item"]=H andlebars. template({ 1:function (e,t,n,i,a ){return"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) | |
| 2 | {var r,o,l ,s='<scrip t type="te xt/x-handl ebars-temp late">\n\n <td>\n '; return o=n ull!=(o=n. itemField| |(null!=t? t.itemFiel d:t))?o:n. helperMiss ing,l={nam e:"itemFie ld",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a},r="fu nction"==t ypeof o?o. call(null! =t?t:{},l) :o,n.itemF ield||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(s+=r),s +"\n </ td>\n\n</s cript>\n"} ,useData:! 0}),this.H andlebarsP recompiled ["web-disp lay"]["con tainer-tab lerow"]=Ha ndlebars.t emplate({1 :function( e,t,n,i,a) {var r,o,l ,s=" ";re turn o=nul l!=(o=n.it em||(null! =t?t.item: t))?o:n.he lperMissin g,l={name: "item",has h:{},fn:e. program(2, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(nu ll!=t?t:{} ,l):o,n.it em||(r=n.b lockHelper Missing.ca ll(t,r,l)) ,null!=r&& (s+=r),s+" \n"},2:fun ction(e,t, n,i,a){ret urn""},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r;return'< script typ e="text/x- handlebars -template" >\n\n < div class= "alpaca-me rge-up">\n \n'+(null! =(r=n.each .call(null !=t?t:{},n ull!=t?t.i tems:t,{na me:"each", hash:{},fn :e.program (1,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </di v>\n\n</sc ript>"},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-display "].contain er=Handleb ars.templa te({1:func tion(e,t,n ,i,a){var r;return' <le gend class ="'+(null! =(r=n["if" ].call(nul l!=t?t:{}, null!=(r=n ull!=t?t.o ptions:t)? r.labelCla ss:r,{name :"if",hash :{},fn:e.p rogram(2,a ,0),invers e:e.noop,d ata:a}))?r :"")+' alp aca-contai ner-label" >'+(null!= (r=e.lambd a(null!=(r =null!=t?t .options:t )?r.label: r,t))?r:"" )+"</legen d>\n"},2:f unction(e, t,n,i,a){v ar r;retur n e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.labelCla ss:r,t))}, 4:function (e,t,n,i,a ){var r;re turn null! =(r=n.each .call(null !=t?t:{},n ull!=(r=nu ll!=t?t.op tions:t)?r .helpers:r ,{name:"ea ch",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" "},5:funct ion(e,t,n, i,a){var r ;return' <p c lass="alpa ca-helper '+(null!=( r=n["if"]. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. helperClas s:r,{name: "if",hash: {},fn:e.pr ogram(6,a, 0),inverse :e.noop,da ta:a}))?r: "")+'">\n <i class= "alpaca-ic on-helper" ></i>\n ' +(null!=(r =e.lambda( t,t))?r:"" )+"\n </p>\n" },6:functi on(e,t,n,i ,a){var r; return e.e scapeExpre ssion(e.la mbda(null! =(r=null!= t?t.option s:t)?r.hel perClass:r ,t))},8:fu nction(e,t ,n,i,a){re turn""},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a){var r,o,l,s=n ull!=t?t:{ },u='<scri pt type="t ext/x-hand lebars-tem plate">\n\ n <div> \n\n'+(nul l!=(r=n["i f"].call(s ,null!=(r= null!=t?t. options:t) ?r.label:r ,{name:"if ",hash:{}, fn:e.progr am(1,a,0), inverse:e. noop,data: a}))?r:"") +"\n"+(nul l!=(r=n["i f"].call(s ,null!=(r= null!=t?t. options:t) ?r.helpers :r,{name:" if",hash:{ },fn:e.pro gram(4,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+"\n ";retu rn o=null! =(o=n.cont ainer||(nu ll!=t?t.co ntainer:t) )?o:n.help erMissing, l={name:"c ontainer", hash:{},fn :e.program (8,a,0),in verse:e.no op,data:a} ,r="functi on"==typeo f o?o.call (s,l):o,n. container| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu ll!=r&&(u+ =r),u+"\n\ n </div >\n\n</scr ipt>"},use Data:!0}), this.Handl ebarsPreco mpiled["we b-display" ]["control -any"]=Han dlebars.te mplate({co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a){var r;return' <script ty pe="text/x -handlebar s-template ">\n\n <div>'+(nu ll!=(r=(n. str||t&&t. str||n.hel perMissing ).call(nul l!=t?t:{}, null!=t?t. data:t,{na me:"str",h ash:{},dat a:a}))?r:" ")+"</div> \n\n</scri pt>"},useD ata:!0}),t his.Handle barsPrecom piled["web -display"] ["control- checkbox"] =Handlebar s.template ({compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>' +(null!=(r =(n.str||t &&t.str||n .helperMis sing).call (null!=t?t :{},null!= t?t.data:t ,{name:"st r",hash:{} ,data:a})) ?r:"")+"</ div>\n\n</ script>"}, useData:!0 }),this.Ha ndlebarsPr ecompiled[ "web-displ ay"]["cont rol-hidden "]=Handleb ars.templa te({compil er:[7,">= 4.0.0"],ma in:functio n(e,t,n,i, a){return' <script ty pe="text/x -handlebar s-template ">\n\n</sc ript>'},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-display "]["contro l-image"]= Handlebars .template( {compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a){ var r,o=nu ll!=t?t:{} ,l=n.helpe rMissing,s ="function ",u=e.esca peExpressi on;return' <script ty pe="text/x -handlebar s-template ">\n\n <div class ="alpaca-i mage-displ ay">\n <img i d="'+u((r= null!=(r=n .id||(null !=t?t.id:t ))?r:l,typ eof r===s? r.call(o,{ name:"id", hash:{},da ta:a}):r)) +'-image" src="'+u(( r=null!=(r =n.data||( null!=t?t. data:t))?r :l,typeof r===s?r.ca ll(o,{name :"data",ha sh:{},data :a}):r))+' ">\n </ div>\n\n</ script>'}, useData:!0 }),this.Ha ndlebarsPr ecompiled[ "web-displ ay"]["cont rol-passwo rd"]=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){re turn""},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a){var r;return' <script ty pe="text/x -handlebar s-template ">\n\n <div>'+(nu ll!=(r=(n. disguise|| t&&t.disgu ise||n.hel perMissing ).call(nul l!=t?t:{}, null!=t?t. data:t,"&b ull;",{nam e:"disguis e",hash:{} ,fn:e.prog ram(1,a,0) ,inverse:e .noop,data :a}))?r:"" )+"</div>\ n\n</scrip t>"},useDa ta:!0}),th is.Handleb arsPrecomp iled["web- display"][ "control-r adio"]=Han dlebars.te mplate({1: function(e ,t,n,i,a,r ,o){var l; return nul l!=(l=(n.c ompare||t& &t.compare ||n.helper Missing).c all(null!= | |
| 3 | t?t:{},nul l!=t?t.val ue:t,null! =o[1]?o[1] .data:o[1] ,{name:"co mpare",has h:{},fn:e. program(2, a,0,r,o),i nverse:e.n oop,data:a }))?l:""}, 2:function (e,t,n,i,a ){var r,o; return" "+(null !=(o=null! =(o=n.text ||(null!=t ?t.text:t) )?o:n.help erMissing, r="functio n"==typeof o?o.call( null!=t?t: {},{name:" text",hash :{},data:a }):o)?r:"" )+"\n"},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a,r,o) {var l;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n'+(null!= (l=n.each. call(null! =t?t:{},nu ll!=t?t.se lectOption s:t,{name: "each",has h:{},fn:e. program(1, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ " </div >\n\n</scr ipt>\n"},u seData:!0, useDepths: !0}),this. Handlebars Precompile d["web-dis play"]["co ntrol-sele ct"]=Handl ebars.temp late({comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a){var r ;return'<s cript type ="text/x-h andlebars- template"> \n\n <d iv>\n '+e.esc apeExpress ion((r=nul l!=(r=n.di splayableT ext||(null !=t?t.disp layableTex t:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"displaya bleText",h ash:{},dat a:a}):r))+ "\n </d iv>\n\n</s cript>\n"} ,useData:! 0}),this.H andlebarsP recompiled ["web-disp lay"]["con trol-text" ]=Handleba rs.templat e({compile r:[7,">= 4 .0.0"],mai n:function (e,t,n,i,a ){var r,o; return'<sc ript type= "text/x-ha ndlebars-t emplate">\ n\n <di v>'+(null! =(o=null!= (o=n.data| |(null!=t? t.data:t)) ?o:n.helpe rMissing,r ="function "==typeof o?o.call(n ull!=t?t:{ },{name:"d ata",hash: {},data:a} ):o)?r:"") +"</div>\n \n</script >"},useDat a:!0}),thi s.Handleba rsPrecompi led["web-d isplay"][" control-te xtarea"]=H andlebars. template({ compiler:[ 7,">= 4.0. 0"],main:f unction(e, t,n,i,a){v ar r,o;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <p>\n '+( null!=(o=n ull!=(o=n. data||(nul l!=t?t.dat a:t))?o:n. helperMiss ing,r="fun ction"==ty peof o?o.c all(null!= t?t:{},{na me:"data", hash:{},da ta:a}):o)? r:"")+"\n </p>\n\ n</script> "},useData :!0}),this .Handlebar sPrecompil ed["web-di splay"]["c ontrol-url "]=Handleb ars.templa te({1:func tion(e,t,n ,i,a){var r;return't arget="'+e .escapeExp ression(e. lambda(nul l!=(r=null !=t?t.opti ons:t)?r.a nchorTarge t:r,t))+'" '},3:funct ion(e,t,n, i,a){var r ;return e. escapeExpr ession(e.l ambda(null !=(r=null! =t?t.optio ns:t)?r.an chorTitle: r,t))},5:f unction(e, t,n,i,a){v ar r;retur n e.escape Expression ((r=null!= (r=n.data| |(null!=t? t.data:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"dat a",hash:{} ,data:a}): r))},7:fun ction(e,t, n,i,a){var r;return" "+e.esca peExpressi on(e.lambd a(null!=(r =null!=t?t .options:t )?r.anchor Title:r,t) )+"\n"},9: function(e ,t,n,i,a){ var r;retu rn" "+e.e scapeExpre ssion((r=n ull!=(r=n. data||(nul l!=t?t.dat a:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"data",ha sh:{},data :a}):r))+" \n"},compi ler:[7,">= 4.0.0"],m ain:functi on(e,t,n,i ,a){var r, o,l=null!= t?t:{};ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div c lass="alpa ca-control -url-ancho r-wrapper" >\n <a href=" '+e.escape Expression ((o=null!= (o=n.data| |(null!=t? t.data:t)) ?o:n.helpe rMissing," function"= =typeof o? o.call(l,{ name:"data ",hash:{}, data:a}):o ))+'" '+(n ull!=(r=n[ "if"].call (l,null!=( r=null!=t? t.options: t)?r.ancho rTarget:r, {name:"if" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ ' title="' +(null!=(r =n["if"].c all(l,null !=(r=null! =t?t.optio ns:t)?r.an chorTitle: r,{name:"i f",hash:{} ,fn:e.prog ram(3,a,0) ,inverse:e .program(5 ,a,0),data :a}))?r:"" )+'">\n'+( null!=(r=n ["if"].cal l(l,null!= (r=null!=t ?t.options :t)?r.anch orTitle:r, {name:"if" ,hash:{},f n:e.progra m(7,a,0),i nverse:e.p rogram(9,a ,0),data:a }))?r:"")+ " < /a>\n < /div>\n\n< /script>"} ,useData:! 0}),this.H andlebarsP recompiled ["web-disp lay"].cont rol=Handle bars.templ ate({1:fun ction(e,t, n,i,a){var r,o,l=nul l!=t?t:{}; return' <labe l class="' +(null!=(r =n["if"].c all(l,null !=(r=null! =t?t.optio ns:t)?r.la belClass:r ,{name:"if ",hash:{}, fn:e.progr am(2,a,0), inverse:e. noop,data: a}))?r:"") +' alpaca- control-la bel" for=" '+e.escape Expression ((o=null!= (o=n.id||( null!=t?t. id:t))?o:n .helperMis sing,"func tion"==typ eof o?o.ca ll(l,{name :"id",hash :{},data:a }):o))+'"> '+(null!=( r=e.lambda (null!=(r= null!=t?t. options:t) ?r.label:r ,t))?r:"") +"</label> \n"},2:fun ction(e,t, n,i,a){var r;return e.escapeEx pression(e .lambda(nu ll!=(r=nul l!=t?t.opt ions:t)?r. labelClass :r,t))},4: function(e ,t,n,i,a){ return""}, 6:function (e,t,n,i,a ){var r;re turn null! =(r=n.each .call(null !=t?t:{},n ull!=(r=nu ll!=t?t.op tions:t)?r .helpers:r ,{name:"ea ch",hash:{ },fn:e.pro gram(7,a,0 ),inverse: e.noop,dat a:a}))?r:" "},7:funct ion(e,t,n, i,a){var r ;return' <p c lass="'+(n ull!=(r=n[ "if"].call (null!=t?t :{},null!= (r=null!=t ?t.options :t)?r.help erClass:r, {name:"if" ,hash:{},f n:e.progra m(8,a,0),i nverse:e.n oop,data:a }))?r:"")+ '">\n <i class="inf o-sign"></ i>\n '+(n ull!=(r=e. lambda(t,t ))?r:"")+" \n </p>\n"},8 :function( e,t,n,i,a) {var r;ret urn e.esca peExpressi on(e.lambd a(null!=(r =null!=t?t .options:t )?r.helper Class:r,t) )},compile r:[7,">= 4 .0.0"],mai n:function (e,t,n,i,a ){var r,o, l,s=null!= t?t:{},u=' <script ty pe="text/x -handlebar s-template ">\n\n <div>\n\n' +(null!=(r =n["if"].c all(s,null !=(r=null! =t?t.optio ns:t)?r.la bel:r,{nam e:"if",has h:{},fn:e. program(1, | |
| 4 | a,0),inver se:e.noop, data:a}))? r:"")+"\n ";r eturn o=nu ll!=(o=n.c ontrol||(n ull!=t?t.c ontrol:t)) ?o:n.helpe rMissing,l ={name:"co ntrol",has h:{},fn:e. program(4, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(s, l):o,n.con trol||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(u+=r),u +"\n\n"+(n ull!=(r=n[ "if"].call (s,null!=( r=null!=t? t.options: t)?r.helpe rs:r,{name :"if",hash :{},fn:e.p rogram(6,a ,0),invers e:e.noop,d ata:a}))?r :"")+"\n </div>\n \n</script >\n"},useD ata:!0}),t his.Handle barsPrecom piled["web -display"] .form=Hand lebars.tem plate({1:f unction(e, t,n,i,a){r eturn""},3 :function( e,t,n,i,a) {var r;ret urn null!= (r=n.each. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. buttons:r, {name:"eac h",hash:{} ,fn:e.prog ram(4,a,0) ,inverse:e .noop,data :a}))?r:"" },4:functi on(e,t,n,i ,a){var r, o,l=null!= t?t:{},s=n .helperMis sing,u="fu nction",c= e.escapeEx pression;r eturn' <b utton data -key="'+c( (o=null!=( o=n.key||a &&a.key)?o :s,typeof o===u?o.ca ll(l,{name :"key",has h:{},data: a}):o))+'" '+(null!= (r=(n.comp are||t&&t. compare||s ).call(l,n ull!=t?t.t ype:t,"sub mit",{name :"compare" ,hash:{},f n:e.progra m(5,a,0),i nverse:e.n oop,data:a }))?r:"")+ " "+(null! =(r=(n.com pare||t&&t .compare|| s).call(l, null!=t?t. type:t,"re set",{name :"compare" ,hash:{},f n:e.progra m(7,a,0),i nverse:e.n oop,data:a }))?r:"")+ ' class="a lpaca-form -button al paca-form- button-'+c ((o=null!= (o=n.key|| a&&a.key)? o:s,typeof o===u?o.c all(l,{nam e:"key",ha sh:{},data :a}):o))+" "+c((o=nu ll!=(o=n.s tyles||(nu ll!=t?t.st yles:t))?o :s,typeof o===u?o.ca ll(l,{name :"styles", hash:{},da ta:a}):o)) +'" '+(nul l!=(r=n.ea ch.call(l, null!=t?t. value:t,{n ame:"each" ,hash:{},f n:e.progra m(9,a,0),i nverse:e.n oop,data:a }))?r:"")+ " "+(null! =(r=n.each .call(l,nu ll!=t?t.at tributes:t ,{name:"ea ch",hash:{ },fn:e.pro gram(11,a, 0),inverse :e.noop,da ta:a}))?r: "")+">"+(n ull!=(o=nu ll!=(o=n.v alue||(nul l!=t?t.val ue:t))?o:s ,r=typeof o===u?o.ca ll(l,{name :"value",h ash:{},dat a:a}):o)?r :"")+"</bu tton>\n"}, 5:function (e,t,n,i,a ){return't ype="submi t"'},7:fun ction(e,t, n,i,a){ret urn'type=" reset"'},9 :function( e,t,n,i,a) {var r,o=e .escapeExp ression;re turn o((r= null!=(r=n .key||a&&a .key)?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"key",has h:{},data: a}):r))+'= "'+o(e.lam bda(t,t))+ '"'},11:fu nction(e,t ,n,i,a){va r r,o=e.es capeExpres sion;retur n" "+o((r= null!=(r=n .key||a&&a .key)?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"key",has h:{},data: a}):r))+'= "'+o(e.lam bda(t,t))+ '"'},compi ler:[7,">= 4.0.0"],m ain:functi on(e,t,n,i ,a){var r, o,l,s=null !=t?t:{},u ='<script type="text /x-handleb ars-templa te">\n\n <form ro le="form"> \n\n ';return o=null!=( o=n.formIt ems||(null !=t?t.form Items:t))? o:n.helper Missing,l= {name:"for mItems",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.noop ,data:a},r ="function "==typeof o?o.call(s ,l):o,n.fo rmItems||( r=n.blockH elperMissi ng.call(t, r,l)),null !=r&&(u+=r ),u+'\n\n <di v class="a lpaca-form -buttons-c ontainer"> \n'+(null! =(r=n["if" ].call(s,n ull!=(r=nu ll!=t?t.op tions:t)?r .buttons:r ,{name:"if ",hash:{}, fn:e.progr am(3,a,0), inverse:e. noop,data: a}))?r:"") +" </div>\n\n </form >\n\n</scr ipt>"},use Data:!0}), this.Handl ebarsPreco mpiled["we b-edit"]=t his.Handle barsPrecom piled["web -edit"]||{ },this.Han dlebarsPre compiled[" web-edit"] ["containe r-array-ac tionbar"]= Handlebars .template( {1:functio n(e,t,n,i, a,r,o){var l,s,u=e.e scapeExpre ssion,c=nu ll!=t?t:{} ;return' <but ton class= "alpaca-ar ray-action bar-action '+u(e.lam bda(null!= (l=null!=( l=null!=o[ 1]?o[1].vi ew:o[1])?l .styles:l) ?l.smallBu tton:l,t)) +'" data-a lpaca-arra y-actionba r-action=" '+u((s=nul l!=(s=n.ac tion||(nul l!=t?t.act ion:t))?s: n.helperMi ssing,"fun ction"==ty peof s?s.c all(c,{nam e:"action" ,hash:{},d ata:a}):s) )+'">\n'+( null!=(l=n ["if"].cal l(c,null!= t?t.iconCl ass:t,{nam e:"if",has h:{},fn:e. program(2, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ " "+(null !=(l=n["if "].call(c, null!=t?t. label:t,{n ame:"if",h ash:{},fn: e.program( 4,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"\n </butto n>\n"},2:f unction(e, t,n,i,a){r eturn' <i class="'+ e.escapeEx pression(e .lambda(nu ll!=t?t.ic onClass:t, t))+'"></i >\n'},4:fu nction(e,t ,n,i,a){va r r,o;retu rn null!=( o=null!=(o =n.label|| (null!=t?t .label:t)) ?o:n.helpe rMissing,r ="function "==typeof o?o.call(n ull!=t?t:{ },{name:"l abel",hash :{},data:a }):o)?r:"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a, r,o){var l ,s,u=null! =t?t:{},c= n.helperMi ssing,d="f unction",p =e.escapeE xpression; return'<sc ript type= "text/x-ha ndlebars-t emplate">\ n\n <di v class="a lpaca-arra y-actionba r alpaca-a rray-actio nbar-'+p(( s=null!=(s =n.actionb arStyle||( null!=t?t. actionbarS tyle:t))?s :c,typeof s===d?s.ca ll(u,{name :"actionba rStyle",ha sh:{},data :a}):s))+' btn-group " data-alp aca-array- actionbar- parent-fie ld-id="'+p ((s=null!= (s=n.paren tFieldId|| (null!=t?t .parentFie ldId:t))?s :c,typeof s===d?s.ca ll(u,{name :"parentFi eldId",has h:{},data: a}):s))+'" data-alpa ca-array-a ctionbar-f ield-id="' +p((s=null !=(s=n.fie ldId||(nul l!=t?t.fie ldId:t))?s :c,typeof s===d?s.ca ll(u,{name :"fieldId" ,hash:{},d ata:a}):s) )+'" data- alpaca-arr ay-actionb ar-item-in dex="'+p(( s=null!=(s =n.itemInd ex||(null! =t?t.itemI ndex:t))?s :c,typeof s===d?s.ca ll(u,{name :"itemInde x",hash:{} ,data:a}): | |
| 5 | s))+'">\n' +(null!=(l =n.each.ca ll(u,null! =t?t.actio ns:t,{name :"each",ha sh:{},fn:e .program(1 ,a,0,r,o), inverse:e. noop,data: a}))?l:"") +" </di v>\n\n</sc ript>"},us eData:!0,u seDepths:! 0}),this.H andlebarsP recompiled ["web-edit "]["contai ner-array- item"]=Han dlebars.te mplate({1: function(e ,t,n,i,a){ var r,o,l, s=null!=t? t:{},u=n.h elperMissi ng,c="func tion",d=n. blockHelpe rMissing,p =' <div class ="pull-lef t">\n ';r eturn o=nu ll!=(o=n.a rrayAction bar||(null !=t?t.arra yActionbar :t))?o:u,l ={name:"ar rayActionb ar",hash:{ },fn:e.pro gram(2,a,0 ),inverse: e.noop,dat a:a},r=typ eof o===c? o.call(s,l ):o,n.arra yActionbar ||(r=d.cal l(t,r,l)), null!=r&&( p+=r),p+=' \n </div>\n <div class="pu ll-right"> \n ',o=nu ll!=(o=n.i temField|| (null!=t?t .itemField :t))?o:u,l ={name:"it emField",h ash:{},fn: e.program( 2,a,0),inv erse:e.noo p,data:a}, r=typeof o ===c?o.cal l(s,l):o,n .itemField ||(r=d.cal l(t,r,l)), null!=r&&( p+=r),p+'\ n < /div>\n <div class="cle ar"></div> \n'},2:fun ction(e,t, n,i,a){ret urn""},4:f unction(e, t,n,i,a){v ar r;retur n null!=(r =(n.compar e||t&&t.co mpare||n.h elperMissi ng).call(n ull!=t?t:{ },null!=t? t.actionba rStyle:t," right",{na me:"compar e",hash:{} ,fn:e.prog ram(5,a,0) ,inverse:e .program(7 ,a,0),data :a}))?r:"" },5:functi on(e,t,n,i ,a){var r, o,l,s=null !=t?t:{},u =n.helperM issing,c=" function", d=n.blockH elperMissi ng,p=' <d iv class=" pull-left" >\n ' ;return o= null!=(o=n .itemField ||(null!=t ?t.itemFie ld:t))?o:u ,l={name:" itemField" ,hash:{},f n:e.progra m(2,a,0),i nverse:e.n oop,data:a },r=typeof o===c?o.c all(s,l):o ,n.itemFie ld||(r=d.c all(t,r,l) ),null!=r& &(p+=r),p+ ='\n </di v>\n <div class="pu ll-right"> \n ', o=null!=(o =n.arrayAc tionbar||( null!=t?t. arrayActio nbar:t))?o :u,l={name :"arrayAct ionbar",ha sh:{},fn:e .program(2 ,a,0),inve rse:e.noop ,data:a},r =typeof o= ==c?o.call (s,l):o,n. arrayActio nbar||(r=d .call(t,r, l)),null!= r&&(p+=r), p+'\n </d iv>\n <di v class="a lpaca-clea r"></div>\ n'},7:func tion(e,t,n ,i,a){var r,o,l,s=nu ll!=t?t:{} ,u=n.helpe rMissing,c =" <div>\ n\n"+(null !=(r=(n.co mpare||t&& t.compare| |u).call(s ,null!=t?t .actionbar Style:t,"t op",{name: "compare", hash:{},fn :e.program (8,a,0),in verse:e.no op,data:a} ))?r:"")+" \n "; return o=n ull!=(o=n. itemField| |(null!=t? t.itemFiel d:t))?o:u, l={name:"i temField", hash:{},fn :e.program (2,a,0),in verse:e.no op,data:a} ,r="functi on"==typeo f o?o.call (s,l):o,n. itemField| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu ll!=r&&(c+ =r),c+"\n\ n"+(null!= (r=(n.comp are||t&&t. compare||u ).call(s,n ull!=t?t.a ctionbarSt yle:t,"bot tom",{name :"compare" ,hash:{},f n:e.progra m(8,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n </div >\n"},8:fu nction(e,t ,n,i,a){va r r,o,l,s= " ";r eturn o=nu ll!=(o=n.a rrayAction bar||(null !=t?t.arra yActionbar :t))?o:n.h elperMissi ng,l={name :"arrayAct ionbar",ha sh:{},fn:e .program(2 ,a,0),inve rse:e.noop ,data:a},r ="function "==typeof o?o.call(n ull!=t?t:{ },l):o,n.a rrayAction bar||(r=n. blockHelpe rMissing.c all(t,r,l) ),null!=r& &(s+=r),s+ "\n"},comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a){var r ;return'<s cript type ="text/x-h andlebars- template"> \n\n <d iv>\n'+(nu ll!=(r=(n. compare||t &&t.compar e||n.helpe rMissing). call(null! =t?t:{},nu ll!=t?t.ac tionbarSty le:t,"left ",{name:"c ompare",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.prog ram(4,a,0) ,data:a})) ?r:"")+" </div>\n \n</script >\n"},useD ata:!0}),t his.Handle barsPrecom piled["web -edit"]["c ontainer-a rray-toolb ar"]=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){re turn" btn- group"},3: function(e ,t,n,i,a,r ,o){var l, s=null!=t? t:{},u=n.h elperMissi ng;return" \n"+(null! =(l=(n.com pare||t&&t .compare|| u).call(s, null!=o[1] ?o[1].tool barStyle:o [1],"link" ,{name:"co mpare",has h:{},fn:e. program(4, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ "\n"+(null !=(l=(n.co mpare||t&& t.compare| |u).call(s ,null!=o[1 ]?o[1].too lbarStyle: o[1],"butt on",{name: "compare", hash:{},fn :e.program (6,a,0,r,o ),inverse: e.noop,dat a:a}))?l:" ")+"\n"},4 :function( e,t,n,i,a) {var r,o,l =null!=t?t :{},s=n.he lperMissin g,u="funct ion";retur n' <a href="#" class="alp aca-array- toolbar-ac tion" data -alpaca-ar ray-toolba r-action=" '+e.escape Expression ((o=null!= (o=n.actio n||(null!= t?t.action :t))?o:s,t ypeof o=== u?o.call(l ,{name:"ac tion",hash :{},data:a }):o))+'"> '+(null!=( o=null!=(o =n.label|| (null!=t?t .label:t)) ?o:s,r=typ eof o===u? o.call(l,{ name:"labe l",hash:{} ,data:a}): o)?r:"")+" </a>\n"},6 :function( e,t,n,i,a, r,o){var l ,s,u=e.esc apeExpress ion,c=null !=t?t:{};r eturn' <button class="alp aca-array- toolbar-ac tion '+u(e .lambda(nu ll!=(l=nul l!=(l=null !=o[1]?o[1 ].view:o[1 ])?l.style s:l)?l.sma llButton:l ,t))+'" da ta-alpaca- array-tool bar-action ="'+u((s=n ull!=(s=n. action||(n ull!=t?t.a ction:t))? s:n.helper Missing,"f unction"== typeof s?s .call(c,{n ame:"actio n",hash:{} ,data:a}): s))+'">\n' +(null!=(l =n["if"].c all(c,null !=t?t.icon Class:t,{n ame:"if",h ash:{},fn: e.program( 7,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+" "+(null !=(l=n["if "].call(c, null!=t?t. label:t,{n ame:"if",h ash:{},fn: e.program( 9,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"\n </button> \n"},7:fun ction(e,t, n,i,a){var r;return' <i class=" '+e.escape | |
| 6 | Expression ((r=null!= (r=n.iconC lass||(nul l!=t?t.ico nClass:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"ico nClass",ha sh:{},data :a}):r))+' "></i>\n'} ,9:functio n(e,t,n,i, a){var r,o ;return nu ll!=(o=nul l!=(o=n.la bel||(null !=t?t.labe l:t))?o:n. helperMiss ing,r="fun ction"==ty peof o?o.c all(null!= t?t:{},{na me:"label" ,hash:{},d ata:a}):o) ?r:""},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a,r,o){ var l,s,u= null!=t?t: {},c=n.hel perMissing ;return'<s cript type ="text/x-h andlebars- template"> \n\n <d iv class=" alpaca-arr ay-toolbar " data-alp aca-array- toolbar-fi eld-id="'+ e.escapeEx pression(( s=null!=(s =n.id||(nu ll!=t?t.id :t))?s:c," function"= =typeof s? s.call(u,{ name:"id", hash:{},da ta:a}):s)) +'" '+(nul l!=(l=(n.c ompare||t& &t.compare ||c).call( u,null!=t? t.toolbarS tyle:t,"bu tton",{nam e:"compare ",hash:{}, fn:e.progr am(1,a,0,r ,o),invers e:e.noop,d ata:a}))?l :"")+">\n\ n"+(null!= (l=n.each. call(u,nul l!=t?t.act ions:t,{na me:"each", hash:{},fn :e.program (3,a,0,r,o ),inverse: e.noop,dat a:a}))?l:" ")+"\n </div>\n\n </script>" },useData: !0,useDept hs:!0}),th is.Handleb arsPrecomp iled["web- edit"]["co ntainer-ar ray"]=Hand lebars.tem plate({1:f unction(e, t,n,i,a){r eturn""},3 :function( e,t,n,i,a) {var r,o,l ,s="\n "; return o=n ull!=(o=n. item||(nul l!=t?t.ite m:t))?o:n. helperMiss ing,l={nam e:"item",h ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}, r="functio n"==typeof o?o.call( null!=t?t: {},l):o,n. item||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(s+=r),s +"\n\n"},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o,l,s= null!=t?t: {},u='<scr ipt type=" text/x-han dlebars-te mplate">\n \n <div >\n\n ';retur n o=null!= (o=n.array Toolbar||( null!=t?t. arrayToolb ar:t))?o:n .helperMis sing,l={na me:"arrayT oolbar",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.noop ,data:a},r ="function "==typeof o?o.call(s ,l):o,n.ar rayToolbar ||(r=n.blo ckHelperMi ssing.call (t,r,l)),n ull!=r&&(u +=r),u+"\n \n"+(null! =(r=n.each .call(s,nu ll!=t?t.it ems:t,{nam e:"each",h ash:{},fn: e.program( 3,a,0),inv erse:e.noo p,data:a}) )?r:"")+"\ n </div >\n\n</scr ipt>\n"},u seData:!0} ),this.Han dlebarsPre compiled[" web-edit"] ["containe r-object-i tem"]=Hand lebars.tem plate({1:f unction(e, t,n,i,a){r eturn""},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o,l,s= '<script t ype="text/ x-handleba rs-templat e">\n\n <div>\n\n '; return o=n ull!=(o=n. itemField| |(null!=t? t.itemFiel d:t))?o:n. helperMiss ing,l={nam e:"itemFie ld",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a},r="fu nction"==t ypeof o?o. call(null! =t?t:{},l) :o,n.itemF ield||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(s+=r),s +"\n\n </div>\n\n </script>\ n"},useDat a:!0}),thi s.Handleba rsPrecompi led["web-e dit"]["con tainer-obj ect"]=Hand lebars.tem plate({1:f unction(e, t,n,i,a){v ar r,o,l,s ="\n ";re turn o=nul l!=(o=n.it em||(null! =t?t.item: t))?o:n.he lperMissin g,l={name: "item",has h:{},fn:e. program(2, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(nu ll!=t?t:{} ,l):o,n.it em||(r=n.b lockHelper Missing.ca ll(t,r,l)) ,null!=r&& (s+=r),s+" \n\n"},2:f unction(e, t,n,i,a){r eturn""},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r;return '<script t ype="text/ x-handleba rs-templat e">\n\n <div>\n\n '+(null!=( r=n.each.c all(null!= t?t:{},nul l!=t?t.ite ms:t,{name :"each",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+"\n </div> \n\n</scri pt>"},useD ata:!0}),t his.Handle barsPrecom piled["web -edit"]["c ontainer-t able-item" ]=Handleba rs.templat e({1:funct ion(e,t,n, i,a){retur n""},compi ler:[7,">= 4.0.0"],m ain:functi on(e,t,n,i ,a){var r; return'<sc ript type= "text/x-ha ndlebars-t emplate">\ n\n <tr >\n '+(null!= (r=(n.item Field||t&& t.itemFiel d||n.helpe rMissing). call(null! =t?t:{},"t d",{name:" itemField" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n </t r>\n\n</sc ript>\n"}, useData:!0 }),this.Ha ndlebarsPr ecompiled[ "web-edit" ]["contain er-table"] =Handlebar s.template ({1:functi on(e,t,n,i ,a){return ""},3:func tion(e,t,n ,i,a){retu rn' <!-- hi dden colum n storing sort order -->\n <th class="alp aca-table- reorder-in dex-header "></th>\n < !-- dragga ble -->\n < th class=" alpaca-tab le-reorder -draggable -header">< /th>\n'},5 :function( e,t,n,i,a) {var r,o,l =null!=t?t :{},s=n.he lperMissin g,u="funct ion";retur n' <th data -header-id ="'+e.esca peExpressi on((o=null !=(o=n.id| |(null!=t? t.id:t))?o :s,typeof o===u?o.ca ll(l,{name :"id",hash :{},data:a }):o))+'" '+(null!=( r=n["if"]. call(l,nul l!=t?t.hid den:t,{nam e:"if",has h:{},fn:e. program(6, a,0),inver se:e.noop, data:a}))? r:"")+">"+ (null!=(o= null!=(o=n .title||(n ull!=t?t.t itle:t))?o :s,r=typeo f o===u?o. call(l,{na me:"title" ,hash:{},d ata:a}):o) ?r:"")+"</ th>\n"},6: function(e ,t,n,i,a){ return'cla ss="alpaca -table-col umn-hidden "'},8:func tion(e,t,n ,i,a){retu rn" <th >Actions</ th>\n"},10 :function( e,t,n,i,a) {var r;ret urn"\n "+(null! =(r=(n.ite m||t&&t.it em||n.help erMissing) .call(null !=t?t:{}," tr",{name: "item",has h:{},fn:e. program(1, a,0),inver se:e.noop, data:a}))? r:"")+"\n\ n"},compil er:[7,">= 4.0.0"],ma in:functio n(e,t,n,i, a){var r,o ,l,s=null! =t?t:{},u= '<script t ype="text/ x-handleba rs-templat e">\n\n <div>\n\n '; return o=n | |
| 7 | ull!=(o=n. arrayToolb ar||(null! =t?t.array Toolbar:t) )?o:n.help erMissing, l={name:"a rrayToolba r",hash:{} ,fn:e.prog ram(1,a,0) ,inverse:e .noop,data :a},r="fun ction"==ty peof o?o.c all(s,l):o ,n.arrayTo olbar||(r= n.blockHel perMissing .call(t,r, l)),null!= r&&(u+=r), u+"\n\n <tabl e>\n\n <! -- table h eaders --> \n <thead >\n < tr>\n\n"+( null!=(r=n ["if"].cal l(s,null!= (r=null!=t ?t.options :t)?r.drag Rows:r,{na me:"if",ha sh:{},fn:e .program(3 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+"\n "+(null!=( r=n.each.c all(s,null !=t?t.head ers:t,{nam e:"each",h ash:{},fn: e.program( 5,a,0),inv erse:e.noo p,data:a}) )?r:"")+"\ n"+(null!= (r=n["if"] .call(s,nu ll!=(r=nul l!=t?t.opt ions:t)?r. showAction sColumn:r, {name:"if" ,hash:{},f n:e.progra m(8,a,0),i nverse:e.n oop,data:a }))?r:"")+ " </t r>\n </th ead>\n\n <!-- table body -->\ n <tbody> \n"+(null! =(r=n.each .call(s,nu ll!=t?t.it ems:t,{nam e:"each",h ash:{},fn: e.program( 10,a,0),in verse:e.no op,data:a} ))?r:"")+" </tbody> \n\n </table> \n\n </ div>\n\n</ script>"}, useData:!0 }),this.Ha ndlebarsPr ecompiled[ "web-edit" ]["contain er-tablero w-item"]=H andlebars. template({ 1:function (e,t,n,i,a ){return"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r,o,l ,s='<scrip t type="te xt/x-handl ebars-temp late">\n\n <td>\n '; | |
| 8 | return o=n ull!=(o=n. itemField| |(null!=t? t.itemFiel d:t))?o:n. helperMiss ing,l={nam e:"itemFie ld",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a},r="fu nction"==t ypeof o?o. call(null! =t?t:{},l) :o,n.itemF ield||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(s+=r),s +"\n </ td>\n\n</s cript>\n"} ,useData:! 0}),this.H andlebarsP recompiled ["web-edit "]["contai ner-tabler ow"]=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){re turn'\n < !-- hidden sort orde r column - ->\n <div class="al paca-table -reorder-i ndex-cell" ></div>\n\ n <!-- re order drag gable -->\ n <div cl ass="alpac a-table-re order-drag gable-cell ">\n <i class=" glyphicon glyphicon- menu-hambu rger"></i> \n </div> \n'},3:fun ction(e,t, n,i,a){var r;return null!=(r=n ["if"].cal l(null!=t? t:{},null! =t?t.hidde n:t,{name: "if",hash: {},fn:e.pr ogram(4,a, 0),inverse :e.program (6,a,0),da ta:a}))?r: ""},4:func tion(e,t,n ,i,a){retu rn""},6:fu nction(e,t ,n,i,a){va r r,o,l,s= " ";r eturn o=nu ll!=(o=n.i tem||(null !=t?t.item :t))?o:n.h elperMissi ng,l={name :"item",ha sh:{},fn:e .program(4 ,a,0),inve rse:e.noop ,data:a},r ="function "==typeof o?o.call(n ull!=t?t:{ },l):o,n.i tem||(r=n. blockHelpe rMissing.c all(t,r,l) ),null!=r& &(s+=r),s+ "\n"},8:fu nction(e,t ,n,i,a){va r r,o,l,s= ' <div cl ass="alpac a-merge-up ">\n ';return o =null!=(o= n.arrayAct ionbar||(n ull!=t?t.a rrayAction bar:t))?o: n.helperMi ssing,l={n ame:"array Actionbar" ,hash:{},f n:e.progra m(4,a,0),i nverse:e.n oop,data:a },r="funct ion"==type of o?o.cal l(null!=t? t:{},l):o, n.arrayAct ionbar||(r =n.blockHe lperMissin g.call(t,r ,l)),null! =r&&(s+=r) ,s+"\n </ div>\n"},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o=null !=t?t:{};r eturn'<scr ipt type=" text/x-han dlebars-te mplate">\n \n <div class="al paca-merge -up">\n\n <!- - drag cel l -->\n'+( null!=(r=n ["if"].cal l(o,null!= (r=null!=t ?t.options :t)?r.drag Rows:r,{na me:"if",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+"\n "+(null!=( r=n.each.c all(o,null !=t?t.item s:t,{name: "each",has h:{},fn:e. program(3, a,0),inver se:e.noop, data:a}))? r:"")+"\n <!- - actions cell -->\n "+(null!=( r=n["if"]. call(o,nul l!=(r=null !=t?t.opti ons:t)?r.s howActions Column:r,{ name:"if", hash:{},fn :e.program (8,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </di v>\n\n</sc ript>"},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"]. container= Handlebars .template( {1:functio n(e,t,n,i, a){var r;r eturn' <legen d class="' +(null!=(r =n["if"].c all(null!= t?t:{},nul l!=(r=null !=t?t.opti ons:t)?r.l abelClass: r,{name:"i f",hash:{} ,fn:e.prog ram(2,a,0) ,inverse:e .noop,data :a}))?r:"" )+' alpaca -container -label">'+ (null!=(r= e.lambda(n ull!=(r=nu ll!=t?t.op tions:t)?r .label:r,t ))?r:"")+" </legend>\ n"},2:func tion(e,t,n ,i,a){var r;return e .escapeExp ression(e. lambda(nul l!=(r=null !=t?t.opti ons:t)?r.l abelClass: r,t))},4:f unction(e, t,n,i,a){v ar r;retur n null!=(r =n.each.ca ll(null!=t ?t:{},null !=(r=null! =t?t.optio ns:t)?r.he lpers:r,{n ame:"each" ,hash:{},f n:e.progra m(5,a,0),i nverse:e.n oop,data:a }))?r:""}, 5:function (e,t,n,i,a ){var r;re turn' <p clas s="alpaca- helper '+( null!=(r=n ["if"].cal l(null!=t? t:{},null! =(r=null!= t?t.option s:t)?r.hel perClass:r ,{name:"if ",hash:{}, fn:e.progr am(6,a,0), inverse:e. noop,data: a}))?r:"") +'">\n <i class="al paca-icon- helper"></ i>\n '+(n ull!=(r=e. lambda(t,t ))?r:"")+" \n </p>\n"},6 :function( e,t,n,i,a) {var r;ret urn e.esca peExpressi on(e.lambd a(null!=(r =null!=t?t .options:t )?r.helper Class:r,t) )},8:funct ion(e,t,n, i,a){retur n""},compi ler:[7,">= 4.0.0"],m ain:functi on(e,t,n,i ,a){var r, o,l,s=null !=t?t:{},u ='<script type="text /x-handleb ars-templa te">\n\n <div>\n\ n'+(null!= (r=n["if"] .call(s,nu ll!=(r=nul l!=t?t.opt ions:t)?r. label:r,{n ame:"if",h ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}) )?r:"")+"\ n"+(null!= (r=n["if"] .call(s,nu ll!=(r=nul l!=t?t.opt ions:t)?r. helpers:r, {name:"if" ,hash:{},f n:e.progra m(4,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n ";return o=null!=(o =n.contain er||(null! =t?t.conta iner:t))?o :n.helperM issing,l={ name:"cont ainer",has h:{},fn:e. program(8, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(s, l):o,n.con tainer||(r =n.blockHe lperMissin g.call(t,r ,l)),null! =r&&(u+=r) ,u+"\n\n </div>\n \n</script >"},useDat a:!0}),thi s.Handleba rsPrecompi led["web-e dit"]["con trol-any"] =Handlebar s.template ({1:functi on(e,t,n,i ,a){return 'readonly= "readonly" '},3:funct ion(e,t,n, i,a){var r ;return'na me="'+e.es capeExpres sion((r=nu ll!=(r=n.n ame||(null !=t?t.name :t))?r:n.h elperMissi ng,"functi on"==typeo f r?r.call (null!=t?t :{},{name: "name",has h:{},data: a}):r))+'" '},5:funct ion(e,t,n, i,a){var r ,o=e.escap eExpressio n;return"d ata-"+o((r =null!=(r= n.key||a&& a.key)?r:n .helperMis sing,"func tion"==typ eof r?r.ca ll(null!=t ?t:{},{nam e:"key",ha sh:{},data :a}):r))+' ="'+o(e.la mbda(t,t)) +'"'},comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a){var r ,o,l=null! =t?t:{};re turn'<scri pt type="t ext/x-hand lebars-tem plate">\n\ n <inpu t type="te xt" id="'+ e.escapeEx pression(( o=null!=(o =n.id||(nu ll!=t?t.id :t))?o:n.h elperMissi ng,"functi on"==typeo f o?o.call (l,{name:" id",hash:{ },data:a}) :o))+'" si ze="40" '+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.rea donly:r,{n ame:"if",h | |
| 9 | ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=t?t.nam e:t,{name: "if",hash: {},fn:e.pr ogram(3,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n. each.call( l,null!=(r =null!=t?t .options:t )?r.data:r ,{name:"ea ch",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+"/>\n\n </script>" },useData: !0}),this. Handlebars Precompile d["web-edi t"]["contr ol-checkbo x"]=Handle bars.templ ate({1:fun ction(e,t, n,i,a,r,o) {var l;ret urn"\n"+(n ull!=(l=n. each.call( null!=t?t: {},null!=t ?t.checkbo xOptions:t ,{name:"ea ch",hash:{ },fn:e.pro gram(2,a,0 ,r,o),inve rse:e.noop ,data:a})) ?l:"")+"\n "},2:funct ion(e,t,n, i,a,r,o){v ar l,s,u=n ull!=t?t:{ },c=n.help erMissing, d="functio n",p=e.esc apeExpress ion;return '\n <div> \n\n <label>\n\ n <input ty pe="checkb ox" data-c heckbox-in dex="'+p(( s=null!=(s =n.index|| a&&a.index )?s:c,type of s===d?s .call(u,{n ame:"index ",hash:{}, data:a}):s ))+'" data -checkbox- value="'+p ((s=null!= (s=n.value ||(null!=t ?t.value:t ))?s:c,typ eof s===d? s.call(u,{ name:"valu e",hash:{} ,data:a}): s))+'" '+( null!=(l=n ["if"].cal l(u,null!= (l=null!=o [1]?o[1].o ptions:o[1 ])?l.reado nly:l,{nam e:"if",has h:{},fn:e. program(3, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ " "+(null! =(l=n["if" ].call(u,n ull!=t?t.n ame:t,{nam e:"if",has h:{},fn:e. program(5, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ " "+(null! =(l=n.each .call(u,nu ll!=(l=nul l!=o[1]?o[ 1].options :o[1])?l.d ata:l,{nam e:"each",h ash:{},fn: e.program( 7,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"/>\n "+( null!=(s=n ull!=(s=n. text||(nul l!=t?t.tex t:t))?s:c, l=typeof s ===d?s.cal l(u,{name: "text",has h:{},data: a}):s)?l:" ")+"\n\n </labe l>\n </di v>\n\n"},3 :function( e,t,n,i,a) {return're adonly="re adonly"'}, 5:function (e,t,n,i,a ){var r;re turn'name= "'+e.escap eExpressio n((r=null! =(r=n.name ||(null!=t ?t.name:t) )?r:n.help erMissing, "function" ==typeof r ?r.call(nu ll!=t?t:{} ,{name:"na me",hash:{ },data:a}) :r))+'"'}, 7:function (e,t,n,i,a ){var r,o= null!=t?t: {},l=n.hel perMissing ,s="functi on",u=e.es capeExpres sion;retur n"data-"+u ((r=null!= (r=n.key|| a&&a.key)? r:l,typeof r===s?r.c all(o,{nam e:"key",ha sh:{},data :a}):r))+' ="'+u((r=n ull!=(r=n. value||(nu ll!=t?t.va lue:t))?r: l,typeof r ===s?r.cal l(o,{name: "value",ha sh:{},data :a}):r))+' "'},9:func tion(e,t,n ,i,a){var r,o=null!= t?t:{};ret urn'\n <div>\ n\n <labe l>\n\n <input t ype="check box" '+(nu ll!=(r=n[" if"].call( o,null!=(r =null!=t?t .options:t )?r.readon ly:r,{name :"if",hash :{},fn:e.p rogram(3,a ,0),invers e:e.noop,d ata:a}))?r :"")+" "+( null!=(r=n ["if"].cal l(o,null!= t?t.name:t ,{name:"if ",hash:{}, fn:e.progr am(5,a,0), inverse:e. noop,data: a}))?r:"") +" "+(null !=(r=n.eac h.call(o,n ull!=(r=nu ll!=t?t.op tions:t)?r .data:r,{n ame:"each" ,hash:{},f n:e.progra m(7,a,0),i nverse:e.n oop,data:a }))?r:"")+ "/>\n\n "+(null !=(r=e.lam bda(null!= (r=null!=t ?t.options :t)?r.righ tLabel:r,t ))?r:"")+" \n </labe l>\n\n </div> \n\n"},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a,r,o){ var l;retu rn'<script type="tex t/x-handle bars-templ ate">\n\n' +(null!=(l =n["if"].c all(null!= t?t:{},nul l!=(l=null !=t?t.opti ons:t)?l.m ultiple:l, {name:"if" ,hash:{},f n:e.progra m(1,a,0,r, o),inverse :e.program (9,a,0,r,o ),data:a}) )?l:"")+"\ n</script> \n"},useDa ta:!0,useD epths:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"][ "control-c keditor"]= Handlebars .template( {compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a){ var r;retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <textar ea id="'+e .escapeExp ression((r =null!=(r= n.id||(nul l!=t?t.id: t))?r:n.he lperMissin g,"functio n"==typeof r?r.call( null!=t?t: {},{name:" id",hash:{ },data:a}) :r))+'" co ls="80" ro ws="10">\n </text area>\n\n< /script>'} ,useData:! 0}),this.H andlebarsP recompiled ["web-edit "]["contro l-editor"] =Handlebar s.template ({compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div i d="'+e.esc apeExpress ion((r=nul l!=(r=n.id ||(null!=t ?t.id:t))? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"id", hash:{},da ta:a}):r)) +'" class= "control-f ield-edito r-el"></di v>\n\n</sc ript>'},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"][ "control-f ile"]=Hand lebars.tem plate({1:f unction(e, t,n,i,a){v ar r;retur n'size="'+ e.escapeEx pression(e .lambda(nu ll!=(r=nul l!=t?t.opt ions:t)?r. size:r,t)) +'"'},3:fu nction(e,t ,n,i,a){re turn'reado nly="reado nly"'},5:f unction(e, t,n,i,a){v ar r;retur n'name="'+ e.escapeEx pression(( r=null!=(r =n.name||( null!=t?t. name:t))?r :n.helperM issing,"fu nction"==t ypeof r?r. call(null! =t?t:{},{n ame:"name" ,hash:{},d ata:a}):r) )+'"'},7:f unction(e, t,n,i,a){v ar r,o=e.e scapeExpre ssion;retu rn"data-"+ o((r=null! =(r=n.key| |a&&a.key) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"key ",hash:{}, data:a}):r ))+'="'+o( e.lambda(t ,t))+'"'}, compiler:[ 7,">= 4.0. 0"],main:f unction(e, t,n,i,a){v ar r,o,l=n ull!=t?t:{ };return'< script typ e="text/x- handlebars -template" >\n\n < input type ="file" id ="'+e.esca peExpressi on((o=null !=(o=n.id| |(null!=t? t.id:t))?o :n.helperM issing,"fu nction"==t ypeof o?o. call(l,{na me:"id",ha sh:{},data :a}):o))+' " '+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .size:r,{n ame:"if",h | |
| 10 | ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.r eadonly:r, {name:"if" ,hash:{},f n:e.progra m(3,a,0),i nverse:e.n oop,data:a }))?r:"")+ " "+(null! =(r=n["if" ].call(l,n ull!=t?t.n ame:t,{nam e:"if",has h:{},fn:e. program(5, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n.each.cal l(l,null!= (r=null!=t ?t.options :t)?r.data :r,{name:" each",hash :{},fn:e.p rogram(7,a ,0),invers e:e.noop,d ata:a}))?r :"")+"/>\n </script>" },useData: !0}),this. Handlebars Precompile d["web-edi t"]["contr ol-hidden" ]=Handleba rs.templat e({1:funct ion(e,t,n, i,a){var r ;return'na me="'+e.es capeExpres sion((r=nu ll!=(r=n.n ame||(null !=t?t.name :t))?r:n.h elperMissi ng,"functi on"==typeo f r?r.call (null!=t?t :{},{name: "name",has h:{},data: a}):r))+'" '},3:funct ion(e,t,n, i,a){var r ,o=e.escap eExpressio n;return"d ata-"+o((r =null!=(r= n.key||a&& a.key)?r:n .helperMis sing,"func tion"==typ eof r?r.ca ll(null!=t ?t:{},{nam e:"key",ha sh:{},data :a}):r))+' ="'+o(e.la mbda(t,t)) +'"'},comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a){var r ,o,l=null! =t?t:{};re turn'<scri pt type="t ext/x-hand lebars-tem plate">\n\ n <inpu t type="hi dden" id=" '+e.escape Expression ((o=null!= (o=n.id||( null!=t?t. id:t))?o:n .helperMis sing,"func tion"==typ eof o?o.ca ll(l,{name :"id",hash :{},data:a }):o))+'" '+(null!=( r=n["if"]. call(l,nul l!=t?t.nam e:t,{name: "if",hash: {},fn:e.pr ogram(1,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n. each.call( l,null!=(r =null!=t?t .options:t )?r.data:r ,{name:"ea ch",hash:{ },fn:e.pro gram(3,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+"/>\n\n </script>" },useData: !0}),this. Handlebars Precompile d["web-edi t"]["contr ol-image"] =Handlebar s.template ({1:functi on(e,t,n,i ,a){var r; return'pla ceholder=" '+e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.placehol der:r,t))+ '"'},3:fun ction(e,t, n,i,a){var r;return' size="'+e. escapeExpr ession(e.l ambda(null !=(r=null! =t?t.optio ns:t)?r.si ze:r,t))+' "'},5:func tion(e,t,n ,i,a){retu rn'readonl y="readonl y"'},7:fun ction(e,t, n,i,a){var r;return' name="'+e. escapeExpr ession((r= null!=(r=n .name||(nu ll!=t?t.na me:t))?r:n .helperMis sing,"func tion"==typ eof r?r.ca ll(null!=t ?t:{},{nam e:"name",h ash:{},dat a:a}):r))+ '"'},9:fun ction(e,t, n,i,a){var r,o=e.esc apeExpress ion;return "data-"+o( (r=null!=( r=n.key||a &&a.key)?r :n.helperM issing,"fu nction"==t ypeof r?r. call(null! =t?t:{},{n ame:"key", hash:{},da ta:a}):r)) +'="'+o(e. lambda(t,t ))+'"'},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a){var r,o,l=nul l!=t?t:{}, s=n.helper Missing,u= "function" ,c=e.escap eExpressio n;return'< script typ e="text/x- handlebars -template" >\n\n < input type ="text" id ="'+c((o=n ull!=(o=n. id||(null! =t?t.id:t) )?o:s,type of o===u?o .call(l,{n ame:"id",h ash:{},dat a:a}):o))+ '" '+(null !=(r=n["if "].call(l, null!=(r=n ull!=t?t.o ptions:t)? r.placehol der:r,{nam e:"if",has h:{},fn:e. program(1, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.siz e:r,{name: "if",hash: {},fn:e.pr ogram(3,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n[ "if"].call (l,null!=( r=null!=t? t.options: t)?r.reado nly:r,{nam e:"if",has h:{},fn:e. program(5, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =t?t.name: t,{name:"i f",hash:{} ,fn:e.prog ram(7,a,0) ,inverse:e .noop,data :a}))?r:"" )+" "+(nul l!=(r=n.ea ch.call(l, null!=(r=n ull!=t?t.o ptions:t)? r.data:r,{ name:"each ",hash:{}, fn:e.progr am(9,a,0), inverse:e. noop,data: a}))?r:"") +'/>\n\n <div cla ss="alpaca -image-dis play">\n <h5> Preview</h 5>\n <img id= "'+c((o=nu ll!=(o=n.i d||(null!= t?t.id:t)) ?o:s,typeo f o===u?o. call(l,{na me:"id",ha sh:{},data :a}):o))+' -image" sr c="'+c((o= null!=(o=n .data||(nu ll!=t?t.da ta:t))?o:s ,typeof o= ==u?o.call (l,{name:" data",hash :{},data:a }):o))+'"> \n </di v>\n\n</sc ript>'},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"][ "control-o ptiontree" ]=Handleba rs.templat e({1:funct ion(e,t,n, i,a){var r ;return'pl aceholder= "'+e.escap eExpressio n(e.lambda (null!=(r= null!=t?t. options:t) ?r.placeho lder:r,t)) +'"'},3:fu nction(e,t ,n,i,a){va r r;return 'size="'+e .escapeExp ression(e. lambda(nul l!=(r=null !=t?t.opti ons:t)?r.s ize:r,t))+ '"'},5:fun ction(e,t, n,i,a){ret urn'readon ly="readon ly"'},7:fu nction(e,t ,n,i,a){va r r;return 'name="'+e .escapeExp ression((r =null!=(r= n.name||(n ull!=t?t.n ame:t))?r: n.helperMi ssing,"fun ction"==ty peof r?r.c all(null!= t?t:{},{na me:"name", hash:{},da ta:a}):r)) +'"'},9:fu nction(e,t ,n,i,a){va r r,o=e.es capeExpres sion;retur n"data-"+o ((r=null!= (r=n.key|| a&&a.key)? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"key" ,hash:{},d ata:a}):r) )+'="'+o(e .lambda(t, t))+'"'},1 1:function (e,t,n,i,a ){var r,o= e.escapeEx pression;r eturn o((r =null!=(r= n.key||a&& a.key)?r:n .helperMis sing,"func tion"==typ eof r?r.ca ll(null!=t ?t:{},{nam e:"key",ha sh:{},data :a}):r))+' ="'+o(e.la mbda(t,t)) +'"'},comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a){var r ,o,l=null! =t?t:{},s= n.helperMi ssing,u="f unction",c =e.escapeE xpression; return'<sc ript type= "text/x-ha ndlebars-t emplate">\ n\n <di v class="o ptiontree" ></div>\n\ n <inpu t type="'+ c((o=null! =(o=n.inpu tType||(nu ll!=t?t.in putType:t) )?o:s,type of o===u?o .call(l,{n ame:"input Type",hash :{},data:a }):o))+'" id="'+c((o =null!=(o= n.id||(nul l!=t?t.id: t))?o:s,ty peof o===u ?o.call(l, {name:"id" | |
| 11 | ,hash:{},d ata:a}):o) )+'" '+(nu ll!=(r=n[" if"].call( l,null!=(r =null!=t?t .options:t )?r.placeh older:r,{n ame:"if",h ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.s ize:r,{nam e:"if",has h:{},fn:e. program(3, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.rea donly:r,{n ame:"if",h ash:{},fn: e.program( 5,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=t?t.nam e:t,{name: "if",hash: {},fn:e.pr ogram(7,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n. each.call( l,null!=(r =null!=t?t .options:t )?r.data:r ,{name:"ea ch",hash:{ },fn:e.pro gram(9,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n.e ach.call(l ,null!=(r= null!=t?t. options:t) ?r.attribu tes:r,{nam e:"each",h ash:{},fn: e.program( 11,a,0),in verse:e.no op,data:a} ))?r:"")+" />\n\n</sc ript>"},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"][ "control-p assword"]= Handlebars .template( {1:functio n(e,t,n,i, a){var r;r eturn'plac eholder="' +e.escapeE xpression( e.lambda(n ull!=(r=nu ll!=t?t.op tions:t)?r .placehold er:r,t))+' "'},3:func tion(e,t,n ,i,a){var r;return's ize="'+e.e scapeExpre ssion(e.la mbda(null! =(r=null!= t?t.option s:t)?r.siz e:r,t))+'" '},5:funct ion(e,t,n, i,a){retur n'readonly ="readonly "'},7:func tion(e,t,n ,i,a){var r;return'n ame="'+e.e scapeExpre ssion((r=n ull!=(r=n. name||(nul l!=t?t.nam e:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"name",ha sh:{},data :a}):r))+' "'},9:func tion(e,t,n ,i,a){var r,o=e.esca peExpressi on;return" data-"+o(( r=null!=(r =n.key||a& &a.key)?r: n.helperMi ssing,"fun ction"==ty peof r?r.c all(null!= t?t:{},{na me:"key",h ash:{},dat a:a}):r))+ '="'+o(e.l ambda(t,t) )+'"'},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o,l=null !=t?t:{};r eturn'<scr ipt type=" text/x-han dlebars-te mplate">\n \n <inp ut type="p assword" i d="'+e.esc apeExpress ion((o=nul l!=(o=n.id ||(null!=t ?t.id:t))? o:n.helper Missing,"f unction"== typeof o?o .call(l,{n ame:"id",h ash:{},dat a:a}):o))+ '" '+(null !=(r=n["if "].call(l, null!=(r=n ull!=t?t.o ptions:t)? r.placehol der:r,{nam e:"if",has h:{},fn:e. program(1, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.siz e:r,{name: "if",hash: {},fn:e.pr ogram(3,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n[ "if"].call (l,null!=( r=null!=t? t.options: t)?r.reado nly:r,{nam e:"if",has h:{},fn:e. program(5, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =t?t.name: t,{name:"i f",hash:{} ,fn:e.prog ram(7,a,0) ,inverse:e .noop,data :a}))?r:"" )+" "+(nul l!=(r=n.ea ch.call(l, null!=(r=n ull!=t?t.o ptions:t)? r.data:r,{ name:"each ",hash:{}, fn:e.progr am(9,a,0), inverse:e. noop,data: a}))?r:"") +"/>\n\n</ script>"}, useData:!0 }),this.Ha ndlebarsPr ecompiled[ "web-edit" ]["control -radio"]=H andlebars. template({ 1:function (e,t,n,i,a ){return"" },3:functi on(e,t,n,i ,a){var r, o,l=null!= t?t:{};ret urn' <d iv class=" radio">\n <la bel>\n <i nput type= "radio" '+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.rea donly:r,{n ame:"if",h ash:{},fn: e.program( 4,a,0),inv erse:e.noo p,data:a}) )?r:"")+' name="'+e. escapeExpr ession((o= null!=(o=n .name||(nu ll!=t?t.na me:t))?o:n .helperMis sing,"func tion"==typ eof o?o.ca ll(l,{name :"name",ha sh:{},data :a}):o))+' " value="" />'+(null! =(r=e.lamb da(null!=( r=null!=t? t.options: t)?r.noneL abel:r,t)) ?r:"")+"\n </ label>\n </div>\n "},4:funct ion(e,t,n, i,a){retur n'readonly ="readonly "'},6:func tion(e,t,n ,i,a,r,o){ var l,s,u= null!=t?t: {},c=e.esc apeExpress ion,d=n.he lperMissin g,p="funct ion";retur n' <div class="ra dio">\n <labe l>\n <inp ut type="r adio" '+(n ull!=(l=n[ "if"].call (u,null!=( l=null!=o[ 1]?o[1].op tions:o[1] )?l.readon ly:l,{name :"if",hash :{},fn:e.p rogram(4,a ,0,r,o),in verse:e.no op,data:a} ))?l:"")+' name="'+c (e.lambda( null!=o[1] ?o[1].name :o[1],t))+ '" value=" '+c((s=nul l!=(s=n.va lue||(null !=t?t.valu e:t))?s:d, typeof s== =p?s.call( u,{name:"v alue",hash :{},data:a }):s))+'" '+(null!=( l=n["if"]. call(u,nul l!=t?t.sel ected:t,{n ame:"if",h ash:{},fn: e.program( 7,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"/>"+(nu ll!=(s=nul l!=(s=n.te xt||(null! =t?t.text: t))?s:d,l= typeof s== =p?s.call( u,{name:"t ext",hash: {},data:a} ):s)?l:"") +"\n </label> \n </di v>\n"},7:f unction(e, t,n,i,a){r eturn'chec ked="check ed"'},comp iler:[7,"> = 4.0.0"], main:funct ion(e,t,n, i,a,r,o){v ar l,s=nul l!=t?t:{}; return'<sc ript type= "text/x-ha ndlebars-t emplate">\ n\n'+(null !=(l=n["if "].call(s, null!=(l=n ull!=t?t.o ptions:t)? l.hideNone :l,{name:" if",hash:{ },fn:e.pro gram(1,a,0 ,r,o),inve rse:e.prog ram(3,a,0, r,o),data: a}))?l:"") +"\n"+(nul l!=(l=n.ea ch.call(s, null!=t?t. selectOpti ons:t,{nam e:"each",h ash:{},fn: e.program( 6,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"\n</scr ipt>"},use Data:!0,us eDepths:!0 }),this.Ha ndlebarsPr ecompiled[ "web-edit" ]["control -select"]= Handlebars .template( {1:functio n(e,t,n,i, a){return' readonly=" readonly"' },3:functi on(e,t,n,i ,a){return 'multiple= "multiple" '},5:funct ion(e,t,n, i,a){var r ;return'si ze="'+e.es capeExpres sion(e.lam bda(null!= (r=null!=t ?t.options :t)?r.size :r,t))+'"' },7:functi on(e,t,n,i ,a){var r; return'nam e="'+e.esc apeExpress ion((r=nul l!=(r=n.na me||(null! =t?t.name: t))?r:n.he lperMissin g,"functio n"==typeof r?r.call( | |
| 12 | null!=t?t: {},{name:" name",hash :{},data:a }):r))+'"' },9:functi on(e,t,n,i ,a){var r, o=null!=t? t:{};retur n"\n"+(nul l!=(r=n["i f"].call(o ,null!=(r= null!=t?t. options:t) ?r.hideNon e:r,{name: "if",hash: {},fn:e.pr ogram(10,a ,0),invers e:e.progra m(12,a,0), data:a}))? r:"")+"\n" +(null!=(r =n.each.ca ll(o,null! =t?t.selec tOptions:t ,{name:"ea ch",hash:{ },fn:e.pro gram(14,a, 0),inverse :e.noop,da ta:a}))?r: "")+"\n"}, 10:functio n(e,t,n,i, a){return" "},12:func tion(e,t,n ,i,a){var r;return' <op tion value ="">'+(nul l!=(r=e.la mbda(null! =(r=null!= t?t.option s:t)?r.non eLabel:r,t ))?r:"")+" </option>\ n"},14:fun ction(e,t, n,i,a){var r,o,l=nul l!=t?t:{}, s=n.helper Missing,u= "function" ;return' <opt ion value= "'+(null!= (o=null!=( o=n.value| |(null!=t? t.value:t) )?o:s,r=ty peof o===u ?o.call(l, {name:"val ue",hash:{ },data:a}) :o)?r:"")+ '" '+(null !=(r=n["if "].call(l, null!=t?t. selected:t ,{name:"if ",hash:{}, fn:e.progr am(15,a,0) ,inverse:e .noop,data :a}))?r:"" )+">"+e.es capeExpres sion((o=nu ll!=(o=n.t ext||(null !=t?t.text :t))?o:s,t ypeof o=== u?o.call(l ,{name:"te xt",hash:{ },data:a}) :o))+"</op tion>\n"}, 15:functio n(e,t,n,i, a){return' selected=" selected"' },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r,o,l =null!=t?t :{};return '<script t ype="text/ x-handleba rs-templat e">\n\n <select i d="'+e.esc apeExpress ion((o=nul l!=(o=n.id ||(null!=t ?t.id:t))? o:n.helper Missing,"f unction"== typeof o?o .call(l,{n ame:"id",h ash:{},dat a:a}):o))+ '" '+(null !=(r=n["if "].call(l, null!=(r=n ull!=t?t.o ptions:t)? r.readonly :r,{name:" if",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n[" if"].call( l,null!=(r =null!=t?t .options:t )?r.multip le:r,{name :"if",hash :{},fn:e.p rogram(3,a ,0),invers e:e.noop,d ata:a}))?r :"")+" "+( null!=(r=n ["if"].cal l(l,null!= (r=null!=t ?t.options :t)?r.size :r,{name:" if",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n[" if"].call( l,null!=t? t.name:t,{ name:"if", hash:{},fn :e.program (7,a,0),in verse:e.no op,data:a} ))?r:"")+" >\n\n"+(nu ll!=(r=n[" if"].call( l,null!=(r =null!=t?t .options:t )?r.multip le:r,{name :"if",hash :{},fn:e.p rogram(9,a ,0),invers e:e.progra m(9,a,0),d ata:a}))?r :"")+"\n </select >\n\n</scr ipt>"},use Data:!0}), this.Handl ebarsPreco mpiled["we b-edit"][" control-te xt"]=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){va r r;return 'placehold er="'+e.es capeExpres sion(e.lam bda(null!= (r=null!=t ?t.options :t)?r.plac eholder:r, t))+'"'},3 :function( e,t,n,i,a) {var r;ret urn'size=" '+e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.size:r,t ))+'"'},5: function(e ,t,n,i,a){ return'rea donly="rea donly"'},7 :function( e,t,n,i,a) {var r;ret urn'name=" '+e.escape Expression ((r=null!= (r=n.name| |(null!=t? t.name:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"nam e",hash:{} ,data:a}): r))+'"'},9 :function( e,t,n,i,a) {var r,o=e .escapeExp ression;re turn"data- "+o((r=nul l!=(r=n.ke y||a&&a.ke y)?r:n.hel perMissing ,"function "==typeof r?r.call(n ull!=t?t:{ },{name:"k ey",hash:{ },data:a}) :r))+'="'+ o(e.lambda (t,t))+'"' },11:funct ion(e,t,n, i,a){var r ,o=e.escap eExpressio n;return o ((r=null!= (r=n.key|| a&&a.key)? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"key" ,hash:{},d ata:a}):r) )+'="'+o(e .lambda(t, t))+'"'},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o,l=nu ll!=t?t:{} ,s=n.helpe rMissing,u ="function ",c=e.esca peExpressi on;return' <script ty pe="text/x -handlebar s-template ">\n\n <input typ e="'+c((o= null!=(o=n .inputType ||(null!=t ?t.inputTy pe:t))?o:s ,typeof o= ==u?o.call (l,{name:" inputType" ,hash:{},d ata:a}):o) )+'" id="' +c((o=null !=(o=n.id| |(null!=t? t.id:t))?o :s,typeof o===u?o.ca ll(l,{name :"id",hash :{},data:a }):o))+'" '+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.p laceholder :r,{name:" if",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n[" if"].call( l,null!=(r =null!=t?t .options:t )?r.size:r ,{name:"if ",hash:{}, fn:e.progr am(3,a,0), inverse:e. noop,data: a}))?r:"") +" "+(null !=(r=n["if "].call(l, null!=(r=n ull!=t?t.o ptions:t)? r.readonly :r,{name:" if",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n[" if"].call( l,null!=t? t.name:t,{ name:"if", hash:{},fn :e.program (7,a,0),in verse:e.no op,data:a} ))?r:"")+" "+(null!= (r=n.each. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.d ata:r,{nam e:"each",h ash:{},fn: e.program( 9,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n.each.c all(l,null !=(r=null! =t?t.optio ns:t)?r.at tributes:r ,{name:"ea ch",hash:{ },fn:e.pro gram(11,a, 0),inverse :e.noop,da ta:a}))?r: "")+"/>\n\ n</script> "},useData :!0}),this .Handlebar sPrecompil ed["web-ed it"]["cont rol-textar ea"]=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){va r r;return 'placehold er="'+e.es capeExpres sion(e.lam bda(null!= (r=null!=t ?t.options :t)?r.plac eholder:r, t))+'"'},3 :function( e,t,n,i,a) {var r;ret urn'rows=" '+e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.rows:r,t ))+'"'},5: function(e ,t,n,i,a){ var r;retu rn'cols="' +e.escapeE xpression( e.lambda(n ull!=(r=nu ll!=t?t.op tions:t)?r .cols:r,t) )+'"'},7:f unction(e, t,n,i,a){r eturn'read only="read only"'},9: function(e ,t,n,i,a){ var r;retu rn'name="' +e.escapeE xpression( (r=null!=( r=n.name|| (null!=t?t .name:t))? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"name ",hash:{}, data:a}):r ))+'"'},11 :function( | |
| 13 | e,t,n,i,a) {var r,o,l =null!=t?t :{},s=n.he lperMissin g,u="funct ion";retur n"data-"+e .escapeExp ression((o =null!=(o= n.fieldId| |(null!=t? t.fieldId: t))?o:s,ty peof o===u ?o.call(l, {name:"fie ldId",hash :{},data:a }):o))+'=" '+(null!=( o=null!=(o =n.value|| (null!=t?t .value:t)) ?o:s,r=typ eof o===u? o.call(l,{ name:"valu e",hash:{} ,data:a}): o)?r:"")+' "'},compil er:[7,">= 4.0.0"],ma in:functio n(e,t,n,i, a){var r,o ,l=null!=t ?t:{};retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <textar ea id="'+e .escapeExp ression((o =null!=(o= n.id||(nul l!=t?t.id: t))?o:n.he lperMissin g,"functio n"==typeof o?o.call( l,{name:"i d",hash:{} ,data:a}): o))+'" '+( null!=(r=n ["if"].cal l(l,null!= (r=null!=t ?t.options :t)?r.plac eholder:r, {name:"if" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ " "+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .rows:r,{n ame:"if",h ash:{},fn: e.program( 3,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.c ols:r,{nam e:"if",has h:{},fn:e. program(5, a,0),inver se:e.noop, data:a}))? r:"")+" "+ (null!=(r= n["if"].ca ll(l,null! =(r=null!= t?t.option s:t)?r.rea donly:r,{n ame:"if",h ash:{},fn: e.program( 7,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n["if"]. call(l,nul l!=t?t.nam e:t,{name: "if",hash: {},fn:e.pr ogram(9,a, 0),inverse :e.noop,da ta:a}))?r: "")+" "+(n ull!=(r=n. each.call( l,null!=(r =null!=t?t .options:t )?r.data:r ,{name:"ea ch",hash:{ },fn:e.pro gram(11,a, 0),inverse :e.noop,da ta:a}))?r: "")+"/>\n\ n</script> "},useData :!0}),this .Handlebar sPrecompil ed["web-ed it"]["cont rol-url"]= Handlebars .template( {1:functio n(e,t,n,i, a){var r;r eturn'plac eholder="' +e.escapeE xpression( e.lambda(n ull!=(r=nu ll!=t?t.op tions:t)?r .placehold er:r,t))+' "'},3:func tion(e,t,n ,i,a){var r;return's ize="'+e.e scapeExpre ssion(e.la mbda(null! =(r=null!= t?t.option s:t)?r.siz e:r,t))+'" '},5:funct ion(e,t,n, i,a){retur n'readonly ="readonly "'},7:func tion(e,t,n ,i,a){var r;return'n ame="'+e.e scapeExpre ssion((r=n ull!=(r=n. name||(nul l!=t?t.nam e:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"name",ha sh:{},data :a}):r))+' "'},9:func tion(e,t,n ,i,a){var r,o=e.esca peExpressi on;return" data-"+o(( r=null!=(r =n.key||a& &a.key)?r: n.helperMi ssing,"fun ction"==ty peof r?r.c all(null!= t?t:{},{na me:"key",h ash:{},dat a:a}):r))+ '="'+o(e.l ambda(t,t) )+'"'},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o,l=null !=t?t:{};r eturn'<scr ipt type=" text/x-han dlebars-te mplate">\n \n <inp ut type="t ext" id="' +e.escapeE xpression( (o=null!=( o=n.id||(n ull!=t?t.i d:t))?o:n. helperMiss ing,"funct ion"==type of o?o.cal l(l,{name: "id",hash: {},data:a} ):o))+'" ' +(null!=(r =n["if"].c all(l,null !=(r=null! =t?t.optio ns:t)?r.pl aceholder: r,{name:"i f",hash:{} ,fn:e.prog ram(1,a,0) ,inverse:e .noop,data :a}))?r:"" )+" "+(nul l!=(r=n["i f"].call(l ,null!=(r= null!=t?t. options:t) ?r.size:r, {name:"if" ,hash:{},f n:e.progra m(3,a,0),i nverse:e.n oop,data:a }))?r:"")+ " "+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .readonly: r,{name:"i f",hash:{} ,fn:e.prog ram(5,a,0) ,inverse:e .noop,data :a}))?r:"" )+" "+(nul l!=(r=n["i f"].call(l ,null!=t?t .name:t,{n ame:"if",h ash:{},fn: e.program( 7,a,0),inv erse:e.noo p,data:a}) )?r:"")+" "+(null!=( r=n.each.c all(l,null !=(r=null! =t?t.optio ns:t)?r.da ta:r,{name :"each",ha sh:{},fn:e .program(9 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+"/> \n\n</scri pt>"},useD ata:!0}),t his.Handle barsPrecom piled["web -edit"].co ntrol=Hand lebars.tem plate({1:f unction(e, t,n,i,a){v ar r,o,l=n ull!=t?t:{ };return' <la bel class= "'+(null!= (r=n["if"] .call(l,nu ll!=(r=nul l!=t?t.opt ions:t)?r. labelClass :r,{name:" if",hash:{ },fn:e.pro gram(2,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+' alpac a-control- label" for ="'+e.esca peExpressi on((o=null !=(o=n.id| |(null!=t? t.id:t))?o :n.helperM issing,"fu nction"==t ypeof o?o. call(l,{na me:"id",ha sh:{},data :a}):o))+' ">'+(null! =(r=e.lamb da(null!=( r=null!=t? t.options: t)?r.label :r,t))?r:" ")+"</labe l>\n"},2:f unction(e, t,n,i,a){v ar r;retur n e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.labelCla ss:r,t))}, 4:function (e,t,n,i,a ){return"" },6:functi on(e,t,n,i ,a){var r; return nul l!=(r=n.ea ch.call(nu ll!=t?t:{} ,null!=(r= null!=t?t. options:t) ?r.helpers :r,{name:" each",hash :{},fn:e.p rogram(7,a ,0),invers e:e.noop,d ata:a}))?r :""},7:fun ction(e,t, n,i,a){var r;return' <p class="'+ (null!=(r= n["if"].ca ll(null!=t ?t:{},null !=(r=null! =t?t.optio ns:t)?r.he lperClass: r,{name:"i f",hash:{} ,fn:e.prog ram(8,a,0) ,inverse:e .noop,data :a}))?r:"" )+'">\n < i class="i nfo-sign"> </i>\n '+ (null!=(r= e.lambda(t ,t))?r:"") +"\n </p>\n"} ,8:functio n(e,t,n,i, a){var r;r eturn e.es capeExpres sion(e.lam bda(null!= (r=null!=t ?t.options :t)?r.help erClass:r, t))},10:fu nction(e,t ,n,i,a){va r r;return null!=(r= n["if"].ca ll(null!=t ?t:{},null !=(r=null! =t?t.optio ns:t)?r.bu ttons:r,{n ame:"if",h ash:{},fn: e.program( 11,a,0),in verse:e.no op,data:a} ))?r:""},1 1:function (e,t,n,i,a ){var r;re turn' <di v class="a lpaca-cont rol-button s-containe r">\n'+(nu ll!=(r=n.e ach.call(n ull!=t?t:{ },null!=(r =null!=t?t .options:t )?r.button s:r,{name: "each",has h:{},fn:e. program(12 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+" </div>\n"} ,12:functi on(e,t,n,i ,a){var r, o,l=null!= t?t:{},s=n .helperMis sing,u="fu nction",c= e.escapeEx pression;r eturn' | |
| 14 | <button data-key=" '+c((o=nul l!=(o=n.ke y||a&&a.ke y)?o:s,typ eof o===u? o.call(l,{ name:"key" ,hash:{},d ata:a}):o) )+'" type= "'+c((o=nu ll!=(o=n.t ype||(null !=t?t.type :t))?o:s,t ypeof o=== u?o.call(l ,{name:"ty pe",hash:{ },data:a}) :o))+'" cl ass="alpac a-control- button alp aca-contro l-button-' +c((o=null !=(o=n.key ||a&&a.key )?o:s,type of o===u?o .call(l,{n ame:"key", hash:{},da ta:a}):o)) +" "+c((o= null!=(o=n .styles||( null!=t?t. styles:t)) ?o:s,typeo f o===u?o. call(l,{na me:"styles ",hash:{}, data:a}):o ))+'" '+(n ull!=(r=n. each.call( l,null!=t? t.value:t, {name:"eac h",hash:{} ,fn:e.prog ram(13,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+">"+(nu ll!=(o=nul l!=(o=n.va lue||(null !=t?t.valu e:t))?o:s, r=typeof o ===u?o.cal l(l,{name: "value",ha sh:{},data :a}):o)?r: "")+"</but ton>\n"},1 3:function (e,t,n,i,a ){var r,o= null!=t?t: {},l=n.hel perMissing ,s="functi on",u=e.es capeExpres sion;retur n u((r=nul l!=(r=n.ke y||a&&a.ke y)?r:l,typ eof r===s? r.call(o,{ name:"key" ,hash:{},d ata:a}):r) )+'="'+u(( r=null!=(r =n.value|| (null!=t?t .value:t)) ?r:l,typeo f r===s?r. call(o,{na me:"value" ,hash:{},d ata:a}):r) )+'" '},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a){var r,o,l,s=n ull!=t?t:{ },u='<scri pt type="t ext/x-hand lebars-tem plate">\n\ n <div> \n\n'+(nul l!=(r=n["i f"].call(s ,null!=(r= null!=t?t. options:t) ?r.label:r ,{name:"if ",hash:{}, fn:e.progr am(1,a,0), | |
| 15 | inverse:e. noop,data: a}))?r:"") +"\n ";return o=null!=( o=n.contro l||(null!= t?t.contro l:t))?o:n. helperMiss ing,l={nam e:"control ",hash:{}, fn:e.progr am(4,a,0), inverse:e. noop,data: a},r="func tion"==typ eof o?o.ca ll(s,l):o, n.control| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu ll!=r&&(u+ =r),u+"\n\ n"+(null!= (r=n["if"] .call(s,nu ll!=(r=nul l!=t?t.opt ions:t)?r. helpers:r, {name:"if" ,hash:{},f n:e.progra m(6,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n"+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.renderBu ttons:r,{n ame:"if",h ash:{},fn: e.program( 10,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </di v>\n\n</sc ript>"},us eData:!0}) ,this.Hand lebarsPrec ompiled["w eb-edit"]. form=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){re turn""},3: function(e ,t,n,i,a){ var r;retu rn null!=( r=n.each.c all(null!= t?t:{},nul l!=(r=null !=t?t.opti ons:t)?r.b uttons:r,{ name:"each ",hash:{}, fn:e.progr am(4,a,0), inverse:e. noop,data: a}))?r:""} ,4:functio n(e,t,n,i, a){var r,o ,l=null!=t ?t:{},s=n. helperMiss ing,u="fun ction",c=e .escapeExp ression;re turn' <butt on data-ke y="'+c((o= null!=(o=n .key||a&&a .key)?o:s, typeof o== =u?o.call( l,{name:"k ey",hash:{ },data:a}) :o))+'" ty pe="'+c((o =null!=(o= n.type||(n ull!=t?t.t ype:t))?o: s,typeof o ===u?o.cal l(l,{name: "type",has h:{},data: a}):o))+'" '+(null!= (r=n["if"] .call(l,nu ll!=t?t.id :t,{name:" if",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+' class ="alpaca-f orm-button alpaca-fo rm-button- '+c((o=nul l!=(o=n.ke y||a&&a.ke y)?o:s,typ eof o===u? o.call(l,{ name:"key" ,hash:{},d ata:a}):o) )+" "+c((o =null!=(o= n.styles|| (null!=t?t .styles:t) )?o:s,type of o===u?o .call(l,{n ame:"style s",hash:{} ,data:a}): o))+'" '+( null!=(r=n .each.call (l,null!=t ?t.value:t ,{name:"ea ch",hash:{ },fn:e.pro gram(7,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n.e ach.call(l ,null!=t?t .attribute s:t,{name: "each",has h:{},fn:e. program(9, a,0),inver se:e.noop, data:a}))? r:"")+">"+ (null!=(o= null!=(o=n .value||(n ull!=t?t.v alue:t))?o :s,r=typeo f o===u?o. call(l,{na me:"value" ,hash:{},d ata:a}):o) ?r:"")+"</ button>\n" },5:functi on(e,t,n,i ,a){var r; return'id= "'+e.escap eExpressio n((r=null! =(r=n.id|| (null!=t?t .id:t))?r: n.helperMi ssing,"fun ction"==ty peof r?r.c all(null!= t?t:{},{na me:"id",ha sh:{},data :a}):r))+' "'},7:func tion(e,t,n ,i,a){var r,o=e.esca peExpressi on;return o((r=null! =(r=n.key| |a&&a.key) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"key ",hash:{}, data:a}):r ))+'="'+o( e.lambda(t ,t))+'"'}, 9:function (e,t,n,i,a ){var r,o= e.escapeEx pression;r eturn" "+o ((r=null!= (r=n.key|| a&&a.key)? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"key" ,hash:{},d ata:a}):r) )+'="'+o(e .lambda(t, t))+'"'},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o,l,s= null!=t?t: {},u='<scr ipt type=" text/x-han dlebars-te mplate">\n \n <for m role="fo rm">\n\n ';re turn o=nul l!=(o=n.fo rmItems||( null!=t?t. formItems: t))?o:n.he lperMissin g,l={name: "formItems ",hash:{}, fn:e.progr am(1,a,0), inverse:e. noop,data: a},r="func tion"==typ eof o?o.ca ll(s,l):o, n.formItem s||(r=n.bl ockHelperM issing.cal l(t,r,l)), null!=r&&( u+=r),u+'\ n\n <div clas s="alpaca- form-butto ns-contain er">\n'+(n ull!=(r=n[ "if"].call (s,null!=( r=null!=t? t.options: t)?r.butto ns:r,{name :"if",hash :{},fn:e.p rogram(3,a ,0),invers e:e.noop,d ata:a}))?r :"")+" </div> \n\n </ form>\n\n< /script>"} ,useData:! 0}),this.H andlebarsP recompiled ["web-edit "].message =Handlebar s.template ({compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r,o,l =null!=t?t :{},s=n.he lperMissin g,u="funct ion";retur n'<script type="text /x-handleb ars-templa te">\n\n <div cla ss="alpaca -message a lpaca-mess age-'+(nul l!=(o=null !=(o=n.id| |(null!=t? t.id:t))?o :s,r=typeo f o===u?o. call(l,{na me:"id",ha sh:{},data :a}):o)?r: "")+'">\n '+( null!=(o=n ull!=(o=n. message||( null!=t?t. message:t) )?o:s,r=ty peof o===u ?o.call(l, {name:"mes sage",hash :{},data:a }):o)?r:"" )+"\n < /div>\n\n< /script>"} ,useData:! 0}),this.H andlebarsP recompiled ["web-edit "].wizard= Handlebars .template( {1:functio n(e,t,n,i, a){var r;r eturn' <div c lass="alpa ca-wizard- nav">\n < nav class= "navbar na vbar-defau lt" role=" navigation ">\n <div class ="containe r-fluid al paca-wizar d-back">\n <ul class= "nav navba r-nav">\n' +(null!=(r =n.each.ca ll(null!=t ?t:{},null !=t?t.step s:t,{name: "each",has h:{},fn:e. program(2, a,0),inver se:e.noop, data:a}))? r:"")+" </u l>\n </div>\n </nav>\n </di v>\n"},2:f unction(e, t,n,i,a){v ar r,o,l=n ull!=t?t:{ },s=n.help erMissing, u="functio n";return' <li da ta-alpaca- wizard-ste p-index="' +e.escapeE xpression( (o=null!=( o=n.index| |a&&a.inde x)?o:s,typ eof o===u? o.call(l,{ name:"inde x",hash:{} ,data:a}): o))+'">\n <di v class="h older">\n <div clas s="title"> '+(null!=( o=null!=(o =n.title|| (null!=t?t .title:t)) ?o:s,r=typ eof o===u? o.call(l,{ name:"titl e",hash:{} ,data:a}): o)?r:"")+' </div>\n <div class ="descript ion">'+(nu ll!=(o=nul l!=(o=n.de scription| |(null!=t? t.descript ion:t))?o: s,r=typeof o===u?o.c all(l,{nam e:"descrip tion",hash :{},data:a }):o)?r:"" )+'</div>\ n < /div>\n | |
| 16 | <div class="che vron"></di v>\n </ li>\n'},4: function(e ,t,n,i,a){ return' <div class="alp aca-wizard -progress- bar">\n < div class= "progress" >\n < div class= "progress- bar" role= "progressb ar" aria-v aluenow="0 " aria-val uemin="0" aria-value max="100" style="wid th: 60%;"> \n </ div>\n </ div>\n </div> \n'},6:fun ction(e,t, n,i,a){var r,o;retur n" <h3>"+ (null!=(o= null!=(o=n .wizardTit le||(null! =t?t.wizar dTitle:t)) ?o:n.helpe rMissing,r ="function "==typeof o?o.call(n ull!=t?t:{ },{name:"w izardTitle ",hash:{}, data:a}):o )?r:"")+"< /h3>\n"},8 :function( e,t,n,i,a) {var r,o;r eturn" <h 4>"+(null! =(o=null!= (o=n.wizar dDescripti on||(null! =t?t.wizar dDescripti on:t))?o:n .helperMis sing,r="fu nction"==t ypeof o?o. call(null! =t?t:{},{n ame:"wizar dDescripti on",hash:{ },data:a}) :o)?r:"")+ "</h4>\n"} ,10:functi on(e,t,n,i ,a,r,o){va r l;return null!=(l= (n.compare ||t&&t.com pare||n.he lperMissin g).call(nu ll!=t?t:{} ,null!=t?t .align:t," left",{nam e:"compare ",hash:{}, fn:e.progr am(11,a,0, r,o),inver se:e.noop, data:a}))? l:""},11:f unction(e, t,n,i,a,r, o){var l,s ,u=null!=t ?t:{},c=n. helperMiss ing,d="fun ction",p=e .escapeExp ression;re turn' < button typ e="'+p((s= null!=(s=n .type||(nu ll!=t?t.ty pe:t))?s:c ,typeof s= ==d?s.call (u,{name:" type",hash :{},data:a }):s))+'" '+(null!=( l=n["if"]. call(u,nul l!=t?t.id: t,{name:"i f",hash:{} ,fn:e.prog ram(12,a,0 ,r,o),inve rse:e.noop ,data:a})) ?l:"")+' c lass="'+p( e.lambda(n ull!=(l=nu ll!=(l=nul l!=o[1]?o[ 1].view:o[ 1])?l.styl es:l)?l.bu tton:l,t)) +'" data-a lpaca-wiza rd-button- key="'+p(( s=null!=(s =n.key||a& &a.key)?s: c,typeof s ===d?s.cal l(u,{name: "key",hash :{},data:a }):s))+'" '+(null!=( l=n.each.c all(u,null !=t?t.attr ibutes:t,{ name:"each ",hash:{}, fn:e.progr am(14,a,0, r,o),inver se:e.noop, data:a}))? l:"")+">"+ (null!=(s= null!=(s=n .title||(n ull!=t?t.t itle:t))?s :c,l=typeo f s===d?s. call(u,{na me:"title" ,hash:{},d ata:a}):s) ?l:"")+"</ button>\n" },12:funct ion(e,t,n, i,a){var r ;return'id ="'+e.esca peExpressi on((r=null !=(r=n.id| |(null!=t? t.id:t))?r :n.helperM issing,"fu nction"==t ypeof r?r. call(null! =t?t:{},{n ame:"id",h ash:{},dat a:a}):r))+ '"'},14:fu nction(e,t ,n,i,a){va r r,o=e.es capeExpres sion;retur n" "+o((r= null!=(r=n .key||a&&a .key)?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"key",has h:{},data: a}):r))+'= "'+o(e.lam bda(t,t))+ '"'},16:fu nction(e,t ,n,i,a,r,o ){var l;re turn null! =(l=(n.com pare||t&&t .compare|| n.helperMi ssing).cal l(null!=t? t:{},null! =t?t.align :t,"right" ,{name:"co mpare",has h:{},fn:e. program(11 ,a,0,r,o), inverse:e. noop,data: a}))?l:""} ,compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a,r ,o){var l, s=null!=t? t:{};retur n'<script type="text /x-handleb ars-templa te">\n\n <div cla ss="alpaca -wizard">\ n\n <!-- nav bar -->\n' +(null!=(l =n["if"].c all(s,null !=t?t.show Steps:t,{n ame:"if",h ash:{},fn: e.program( 1,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"\n <!-- wi zard progr ess bar -- >\n"+(null !=(l=n["if "].call(s, null!=t?t. showProgre ssBar:t,{n ame:"if",h ash:{},fn: e.program( 4,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+"\n"+(nu ll!=(l=n[" if"].call( s,null!=t? t.wizardTi tle:t,{nam e:"if",has h:{},fn:e. program(6, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ (null!=(l= n["if"].ca ll(s,null! =t?t.wizar dDescripti on:t,{name :"if",hash :{},fn:e.p rogram(8,a ,0,r,o),in verse:e.no op,data:a} ))?l:"")+' \n <!-- wizar d steps -- >\n <div clas s="alpaca- wizard-ste ps">\n\n </di v>\n\n <!-- w izard butt ons -->\n <di v class="a lpaca-wiza rd-buttons ">\n\n <d iv class=" pull-left" >\n'+(null !=(l=n.eac h.call(s,n ull!=t?t.b uttons:t,{ name:"each ",hash:{}, fn:e.progr am(10,a,0, r,o),inver se:e.noop, data:a}))? l:"")+' < /div>\n\n <div clas s="pull-ri ght">\n'+( null!=(l=n .each.call (s,null!=t ?t.buttons :t,{name:" each",hash :{},fn:e.p rogram(16, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ ' </div>\ n\n <div style="cle ar:both">< /div>\n\n </d iv>\n\n </div>\n\ n</script> '},useData :!0,useDep ths:!0}),t his.Handle barsPrecom piled["boo tstrap-dis play"]=thi s.Handleba rsPrecompi led["boots trap-displ ay"]||{},t his.Handle barsPrecom piled["boo tstrap-dis play"].con tainer=Han dlebars.te mplate({1: function(e ,t,n,i,a){ var r,o=nu ll!=t?t:{} ;return' <leg end class= "'+(null!= (r=n["if"] .call(o,nu ll!=(r=nul l!=t?t.opt ions:t)?r. labelClass :r,{name:" if",hash:{ },fn:e.pro gram(2,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+'alpaca -container -label">\n \n'+(null! =(r=n["if" ].call(o,n ull!=(r=nu ll!=t?t.op tions:t)?r .collapsib le:r,{name :"if",hash :{},fn:e.p rogram(4,a ,0),invers e:e.noop,d ata:a}))?r :"")+"\n "+(null!=( r=e.lambda (null!=(r= null!=t?t. options:t) ?r.label:r ,t))?r:"") +"\n\n"+(n ull!=(r=n[ "if"].call (o,null!=( r=null!=t? t.options: t)?r.colla psible:r,{ name:"if", hash:{},fn :e.program (6,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </legend>\ n"},2:func tion(e,t,n ,i,a){var r;return e .escapeExp ression(e. lambda(nul l!=(r=null !=t?t.opti ons:t)?r.l abelClass: r,t))+" "} ,4:functio n(e,t,n,i, a){return' <span da ta-toggle= "collapse" >\n'},6:fu nction(e,t ,n,i,a){re turn" </s pan>\n"},8 :function( e,t,n,i,a) {var r;ret urn null!= (r=n.each. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt | |
| 17 | ions:t)?r. helpers:r, {name:"eac h",hash:{} ,fn:e.prog ram(9,a,0) ,inverse:e .noop,data :a}))?r:"" },9:functi on(e,t,n,i ,a){var r; return' <p cl ass="alpac a-helper h elp-block '+(null!=( r=n["if"]. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. helperClas s:r,{name: "if",hash: {},fn:e.pr ogram(10,a ,0),invers e:e.noop,d ata:a}))?r :"")+'">\n <i class ="alpaca-i con-16 gly phicon gly phicon-inf o-sign"></ i>\n '+(n ull!=(r=e. lambda(t,t ))?r:"")+" \n </p>\n"},1 0:function (e,t,n,i,a ){var r;re turn e.esc apeExpress ion(e.lamb da(null!=( r=null!=t? t.options: t)?r.helpe rClass:r,t ))},12:fun ction(e,t, n,i,a){ret urn""},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o,l,s=nu ll!=t?t:{} ,u='<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n\n'+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.label:r, {name:"if" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n"+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.helpers: r,{name:"i f",hash:{} ,fn:e.prog ram(8,a,0) ,inverse:e .noop,data :a}))?r:"" )+"\n ";retur n o=null!= (o=n.conta iner||(nul l!=t?t.con tainer:t)) ?o:n.helpe rMissing,l ={name:"co ntainer",h ash:{},fn: e.program( 12,a,0),in verse:e.no op,data:a} ,r="functi on"==typeo f o?o.call (s,l):o,n. container| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu ll!=r&&(u+ =r),u+"\n\ n </div >\n\n</scr ipt>\n"},u seData:!0} ),this.Han dlebarsPre compiled[" bootstrap- display"][ "control-r adio"]=Han dlebars.te mplate({1: function(e ,t,n,i,a,r ,o){var l; return nul l!=(l=(n.c ompare||t& &t.compare ||n.helper Missing).c all(null!= t?t:{},nul l!=t?t.val ue:t,null! =o[1]?o[1] .data:o[1] ,{name:"co mpare",has h:{},fn:e. program(2, a,0,r,o),i nverse:e.n oop,data:a }))?l:""}, 2:function (e,t,n,i,a ){var r,o; return" "+(null !=(o=null! =(o=n.text ||(null!=t ?t.text:t) )?o:n.help erMissing, r="functio n"==typeof o?o.call( null!=t?t: {},{name:" text",hash :{},data:a }):o)?r:"" )+"\n"},co mpiler:[7, ">= 4.0.0" ],main:fun ction(e,t, n,i,a,r,o) {var l;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n'+(null!= (l=n.each. call(null! =t?t:{},nu ll!=t?t.se lectOption s:t,{name: "each",has h:{},fn:e. program(1, a,0,r,o),i nverse:e.n oop,data:a }))?l:"")+ " </div >\n\n</scr ipt>\n"},u seData:!0, useDepths: !0}),this. Handlebars Precompile d["bootstr ap-display "]["contro l-select"] =Handlebar s.template ({compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n ' +e.escapeE xpression( (r=null!=( r=n.displa yableText| |(null!=t? t.displaya bleText:t) )?r:n.help erMissing, "function" ==typeof r ?r.call(nu ll!=t?t:{} ,{name:"di splayableT ext",hash: {},data:a} ):r))+"\n </div>\ n\n</scrip t>\n"},use Data:!0}), this.Handl ebarsPreco mpiled["bo otstrap-di splay"]["c ontrol-upl oad-partia l-download "]=Handleb ars.templa te({1:func tion(e,t,n ,i,a){var r,o=e.lamb da,l=e.esc apeExpress ion;return ' < td></td>\n <t d class="n ame">\n < span>'+l(o (null!=(r= null!=t?t. file:t)?r. name:r,t)) +'</span>\ n < /td>\n <td cl ass="size" >\n <span >'+l(o(nul l!=(r=null !=t?t.file :t)?r.size :r,t))+'</ span>\n </td> \n <td class= "error" co lspan="2"> \n Error: \n '+l(o( null!=(r=n ull!=t?t.f ile:t)?r.e rror:r,t)) +"\n </td>\n" },3:functi on(e,t,n,i ,a){var r, o=e.lambda ,l=e.escap eExpressio n;return' <td class="pr eview">\n' +(null!=(r =n["if"].c all(null!= t?t:{},nul l!=(r=null !=t?t.file :t)?r.thum bnailUrl:r ,{name:"if ",hash:{}, fn:e.progr am(4,a,0), inverse:e. noop,data: a}))?r:"") +' </td>\n <td c lass="name ">\n <a h ref="'+l(o (null!=(r= null!=t?t. file:t)?r. url:r,t))+ '" title=" '+l(o(null !=(r=null! =t?t.file: t)?r.name: r,t))+'" d ata-galler y="'+l(o(n ull!=(r=nu ll!=t?t.fi le:t)?r.th umbnailUrl :r,t))+'ga llery" dow nload="'+l (o(null!=( r=null!=t? t.file:t)? r.name:r,t ))+'">'+l( o(null!=(r =null!=t?t .file:t)?r .name:r,t) )+'</a>\n </t d>\n <td clas s="size">< span>'+l(o (null!=(r= null!=t?t. file:t)?r. size:r,t)) +'</span>< /td>\n <td co lspan="2"> </td>\n'}, 4:function (e,t,n,i,a ){var r,o= e.lambda,l =e.escapeE xpression; return' < a href="'+ l(o(null!= (r=null!=t ?t.file:t) ?r.url:r,t ))+'" titl e="'+l(o(n ull!=(r=nu ll!=t?t.fi le:t)?r.na me:r,t))+' " data-gal lery="gall ery" downl oad="'+l(o (null!=(r= null!=t?t. file:t)?r. name:r,t)) +'">\n <img src ="'+l(o(nu ll!=(r=nul l!=t?t.fil e:t)?r.thu mbnailUrl: r,t))+'">\ n </a>\n' },6:functi on(e,t,n,i ,a,r,o){va r l;return null!=(l= n.each.cal l(null!=t? t:{},null! =t?t.butto ns:t,{name :"each",ha sh:{},fn:e .program(7 ,a,0,r,o), inverse:e. noop,data: a}))?l:""} ,7:functio n(e,t,n,i, a,r,o){var l;return null!=(l=n ["if"].cal l(null!=t? t:{},null! =t?t.isDel ete:t,{nam e:"if",has h:{},fn:e. program(8, a,0,r,o),i nverse:e.p rogram(10, a,0,r,o),d ata:a}))?l :""},8:fun ction(e,t, n,i,a,r,o) {var l,s=e .escapeExp ression;re turn' < button cla ss="delete btn btn-d anger" dat a-file-ind ex="'+s(e. lambda(nul l!=o[1]?o[ 1].fileInd ex:o[1],t) )+'" data- button-key ="'+s((l=n ull!=(l=n. key||(null !=t?t.key: t))?l:n.he lperMissin g,"functio n"==typeof l?l.call( null!=t?t: {},{name:" key",hash: {},data:a} ):l))+'">\ n < i class="g lyphicon g lyphicon-t rash glyph icon-white "></i>\n | |
| 18 | </button >\n'},10:f unction(e, t,n,i,a,r, o){var l,s ,u=null!=t ?t:{},c=n. helperMiss ing,d="fun ction",p=e .escapeExp ression;re turn' < button cla ss="'+p((s =null!=(s= n.key||(nu ll!=t?t.ke y:t))?s:c, typeof s== =d?s.call( u,{name:"k ey",hash:{ },data:a}) :s))+" btn "+p((s=nu ll!=(s=n.b uttonClass ||(null!=t ?t.buttonC lass:t))?s :c,typeof s===d?s.ca ll(u,{name :"buttonCl ass",hash: {},data:a} ):s))+'" d ata-file-i ndex="'+p( e.lambda(n ull!=o[1]? o[1].fileI ndex:o[1], t))+'" dat a-button-k ey="'+p((s =null!=(s= n.key||(nu ll!=t?t.ke y:t))?s:c, typeof s== =d?s.call( u,{name:"k ey",hash:{ },data:a}) :s))+'">\n '+(null!=( l=n["if"]. call(u,nul l!=t?t.ico nClass:t,{ name:"if", hash:{},fn :e.program (11,a,0,r, o),inverse :e.noop,da ta:a}))?l: "")+(null! =(l=n["if" ].call(u,n ull!=t?t.l abel:t,{na me:"if",ha sh:{},fn:e .program(1 3,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+" </b utton>\n"} ,11:functi on(e,t,n,i ,a){var r; return' < i class="' +e.escapeE xpression( (r=null!=( r=n.iconCl ass||(null !=t?t.icon Class:t))? r:n.helper Missing,"f unction"== typeof r?r .call(null !=t?t:{},{ name:"icon Class",has h:{},data: a}):r))+'" ></i>\n'}, 13:functio n(e,t,n,i, a){var r;r eturn" "+ e.escapeEx pression(( r=null!=(r =n.label|| (null!=t?t .label:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"lab el",hash:{ },data:a}) :r))+"\n"} ,compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a,r ,o){var l, s=null!=t? t:{};retur n'<script type="text /x-handleb ars-templa te">\n\n <tr clas s="templat e-download ">\n'+(nul l!=(l=n["i f"].call(s ,null!=(l= null!=t?t. file:t)?l. error:l,{n ame:"if",h ash:{},fn: e.program( 1,a,0,r,o) ,inverse:e .program(3 ,a,0,r,o), data:a}))? l:"")+" <td>\ n"+(null!= (l=n["if"] .call(s,nu ll!=t?t.bu ttons:t,{n ame:"if",h ash:{},fn: e.program( 6,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" )+" </td>\n </tr>\n\ n</script> "},useData :!0,useDep ths:!0}),t his.Handle barsPrecom piled["boo tstrap-dis play"]["co ntrol-uplo ad-partial -upload"]= Handlebars .template( {1:functio n(e,t,n,i, a){return' <t d class="p review">\n <span cl ass="fade" ></span>\n </ td>\n'},3: function(e ,t,n,i,a){ return" <td>< /td>\n"},5 :function( e,t,n,i,a) {var r;ret urn' <td clas s="error" colspan="2 "><span cl ass="label label-imp ortant">Er ror</span> '+e.escap eExpressio n(e.lambda (null!=(r= null!=t?t. file:t)?r. error:r,t) )+"</td>\n "},7:funct ion(e,t,n, i,a){var r ;return nu ll!=(r=n[" if"].call( null!=t?t: {},null!=( r=null!=t? t.file:t)? r.valid:r, {name:"if" ,hash:{},f n:e.progra m(8,a,0),i nverse:e.p rogram(15, a,0),data: a}))?r:""} ,8:functio n(e,t,n,i, a){var r,o =null!=t?t :{};return (null!=(r= (n.compare ||t&&t.com pare||n.he lperMissin g).call(o, a&&a.index ,0,{name:" compare",h ash:{},fn: e.program( 9,a,0),inv erse:e.noo p,data:a}) )?r:"")+' <td class ="start">\ n'+(null!= (r=n["if"] .call(o,nu ll!=(r=nul l!=t?t.opt ions:t)?r. autoUpload :r,{name:" if",hash:{ },fn:e.pro gram(11,a, 0),inverse :e.program (13,a,0),d ata:a}))?r :"")+" </ td>\n"},9: function(e ,t,n,i,a){ return' <td>\n < div class= "progress progress-s uccess pro gress-stri ped active " role="pr ogressbar" aria-valu emin="0" a ria-valuem ax="100" a ria-valuen ow="0">\n <div cl ass="progr ess-bar" s tyle="widt h:0%;"></d iv>\n </div >\n < /td>\n'},1 1:function (e,t,n,i,a ){return"" },13:funct ion(e,t,n, i,a){retur n' <b utton clas s="btn btn -primary"> \\\n <i cl ass="glyph icon glyph icon-uploa d glyphico n-white">< /i>\n <span >Start</sp an>\n </button> \n'},15:fu nction(e,t ,n,i,a){va r r;return ' <td></t d>\n <td class="can cel">\n'+( null!=(r=( n.compare| |t&&t.comp are||n.hel perMissing ).call(nul l!=t?t:{}, a&&a.index ,0,{name:" compare",h ash:{},fn: e.program( 16,a,0),in verse:e.no op,data:a} ))?r:"")+" </td>\n" },16:funct ion(e,t,n, i,a){retur n' <b utton clas s="btn btn -warning"> \n <i class ="glyphico n glyphico n-ban-circ le glyphic on-white"> </i>\n <spa n>Cancel</ span>\n </butto n>\n'},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o=null!= t?t:{},l=e .lambda,s= e.escapeEx pression;r eturn'<scr ipt type=" text/x-han dlebars-te mplate">\n \n <tr class="tem plate-uplo ad">\n\n'+ (null!=(r= n["if"].ca ll(o,null! =(r=null!= t?t.option s:t)?r.sho wUploadPre view:r,{na me:"if",ha sh:{},fn:e .program(1 ,a,0),inve rse:e.prog ram(3,a,0) ,data:a})) ?r:"")+'\n <t d class="n ame"><span >'+s(l(nul l!=(r=null !=t?t.file :t)?r.name :r,t))+'</ span></td> \n <td class= "size"><sp an>'+s(l(n ull!=(r=nu ll!=t?t.fi le:t)?r.si ze:r,t))+" </span></t d>\n\n"+(n ull!=(r=n[ "if"].call (o,null!=( r=null!=t? t.file:t)? r.error:r, {name:"if" ,hash:{},f n:e.progra m(5,a,0),i nverse:e.p rogram(7,a ,0),data:a }))?r:"")+ " < td></td>\n </tr>\ n\n</scrip t>"},useDa ta:!0}),th is.Handleb arsPrecomp iled["boot strap-disp lay"]["con trol-uploa d"]=Handle bars.templ ate({1:fun ction(e,t, n,i,a){var r;return e.escapeEx pression(( r=null!=(r =n.cssClas ses||(null !=t?t.cssC lasses:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"css Classes",h ash:{},dat a:a}):r))} ,3:functio | |
| 19 | n(e,t,n,i, a){var r;r eturn" <thead>\n <tr >\n"+(null !=(r=n["if "].call(nu ll!=t?t:{} ,null!=(r= null!=t?t. options:t) ?r.showUpl oadPreview :r,{name:" if",hash:{ },fn:e.pro gram(4,a,0 ),inverse: e.program( 6,a,0),dat a:a}))?r:" ")+' <td> Name</td>\ n <td>Siz e</td>\n <td colspa n="2"></td ><!-- erro r or start or progre ss indicat or -->\n <td>Action s</td>\n </tr >\n </t head>\n'}, 4:function (e,t,n,i,a ){return" <td>T humbnail</ td>\n"},6: function(e ,t,n,i,a){ return" <td></t d>\n"},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o,l=null !=t?t:{},s =e.escapeE xpression, u=n.helper Missing,c= "function" ;return'<s cript type ="text/x-h andlebars- template"> \n\n <d iv class=" alpaca-fil eupload-co ntainer '+ (null!=(r= n["if"].ca ll(l,null! =t?t.cssCl asses:t,{n ame:"if",h ash:{},fn: e.program( 1,a,0),inv erse:e.noo p,data:a}) )?r:"")+'" >\n <div clas s="contain er-fluid"> \n <div c lass="row alpaca-fil eupload-ch ooserow">\ n <di v class="c ol-md-12"> \n <div cla ss="btn-gr oup">\n <span cla ss="'+s(e. lambda(nul l!=(r=null !=(r=null! =t?t.view: t)?r.style s:r)?r.but ton:r,t))+ ' fileinpu t-button"> \n <i class=" glyphicon glyphicon- upload"></ i>\n <span cl ass="fileu pload-add- button">'+ s((o=null! =(o=n.choo seButtonLa bel||(null !=t?t.choo seButtonLa bel:t))?o: u,typeof o ===c?o.cal l(l,{name: "chooseBut tonLabel", hash:{},da ta:a}):o)) +'</span>\ n < input clas s="alpaca- fileupload -input" ty pe="file" name="'+s( (o=null!=( o=n.name|| (null!=t?t .name:t))? o:u,typeof o===c?o.c all(l,{nam e:"name",h ash:{},dat a:a}):o))+ '_files">\ n < input clas s="alpaca- fileupload -input-hid den" type= "hidden" n ame="'+s(( o=null!=(o =n.name||( null!=t?t. name:t))?o :u,typeof o===c?o.ca ll(l,{name :"name",ha sh:{},data :a}):o))+' _files_hid den">\n </span>\n </div>\n </div> \n </div> \n <div c lass="row alpaca-fil eupload-we ll">\n <div cla ss="col-md -12 fileup load-activ e-zone">\n <table cla ss="table table-stri ped">\n'+( null!=(r=n ["if"].cal l(l,null!= (r=null!=t ?t.options :t)?r.show Headers:r, {name:"if" ,hash:{},f n:e.progra m(3,a,0),i nverse:e.n oop,data:a }))?r:"")+ ' <tbod y class="f iles">\n </tbody> \n </table> \n <p align ="center" class="dro pzone-mess age">'+s(( o=null!=(o =n.dropZon eMessage|| (null!=t?t .dropZoneM essage:t)) ?o:u,typeo f o===c?o. call(l,{na me:"dropZo neMessage" ,hash:{},d ata:a}):o) )+'</p>\n </div >\n </div >\n <div class="row ">\n <div class ="col-md-1 2">\n <div id="progre ss" class= "progress" >\n <di v class="p rogress-ba r progress -bar-succe ss"></div> \n </div>\n </di v>\n </di v>\n </div>\n </div> \n\n</scri pt>'},useD ata:!0}),t his.Handle barsPrecom piled["boo tstrap-dis play"].con trol=Handl ebars.temp late({1:fu nction(e,t ,n,i,a){va r r,o,l=nu ll!=t?t:{} ;return' <lab el class=" '+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.l abelClass: r,{name:"i f",hash:{} ,fn:e.prog ram(2,a,0) ,inverse:e .noop,data :a}))?r:"" )+' contro l-label al paca-contr ol-label" for="'+e.e scapeExpre ssion((o=n ull!=(o=n. id||(null! =t?t.id:t) )?o:n.help erMissing, "function" ==typeof o ?o.call(l, {name:"id" ,hash:{},d ata:a}):o) )+'">'+(nu ll!=(r=e.l ambda(null !=(r=null! =t?t.optio ns:t)?r.la bel:r,t))? r:"")+"</l abel>\n"}, 2:function (e,t,n,i,a ){var r;re turn e.esc apeExpress ion(e.lamb da(null!=( r=null!=t? t.options: t)?r.label Class:r,t) )},4:funct ion(e,t,n, i,a){retur n""},6:fun ction(e,t, n,i,a){var r;return null!=(r=n .each.call (null!=t?t :{},null!= (r=null!=t ?t.options :t)?r.help ers:r,{nam e:"each",h ash:{},fn: e.program( 7,a,0),inv erse:e.noo p,data:a}) )?r:""},7: function(e ,t,n,i,a){ var r;retu rn' <p class= "help-bloc k '+(null! =(r=n["if" ].call(nul l!=t?t:{}, null!=(r=n ull!=t?t.o ptions:t)? r.helperCl ass:r,{nam e:"if",has h:{},fn:e. program(8, a,0),inver se:e.noop, data:a}))? r:"")+'">\ n <i clas s="glyphic on glyphic on-info-si gn"></i>\n '+(null! =(r=e.lamb da(t,t))?r :"")+"\n </p> \n"},8:fun ction(e,t, n,i,a){var r;return e.escapeEx pression(e .lambda(nu ll!=(r=nul l!=t?t.opt ions:t)?r. helperClas s:r,t))},c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o,l,s= null!=t?t: {},u='<scr ipt type=" text/x-han dlebars-te mplate">\n \n <div class="fo rm-group"> \n\n'+(nul l!=(r=n["i f"].call(s ,null!=(r= null!=t?t. options:t) ?r.label:r ,{name:"if ",hash:{}, fn:e.progr am(1,a,0), inverse:e. noop,data: a}))?r:"") +"\n ";return o=null!=( o=n.contro l||(null!= t?t.contro l:t))?o:n. helperMiss ing,l={nam e:"control ",hash:{}, fn:e.progr am(4,a,0), inverse:e. noop,data: a},r="func tion"==typ eof o?o.ca ll(s,l):o, n.control| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu | |
| 20 | ll!=r&&(u+ =r),u+"\n\ n"+(null!= (r=n["if"] .call(s,nu ll!=(r=nul l!=t?t.opt ions:t)?r. helpers:r, {name:"if" ,hash:{},f n:e.progra m(6,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n </d iv>\n\n</s cript>"},u seData:!0} ),this.Han dlebarsPre compiled[" bootstrap- display"]. message=Ha ndlebars.t emplate({c ompiler:[7 ,">= 4.0.0 "],main:fu nction(e,t ,n,i,a){va r r,o;retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <div cl ass="help- block">\n <i class="gly phicon gly phicon-exc lamation-s ign"></i>& nbsp;'+(nu ll!=(o=nul l!=(o=n.me ssage||(nu ll!=t?t.me ssage:t))? o:n.helper Missing,r= "function" ==typeof o ?o.call(nu ll!=t?t:{} ,{name:"me ssage",has h:{},data: a}):o)?r:" ")+"\n </div>\n\n </script>" },useData: !0}),this. Handlebars Precompile d["bootstr ap-edit"]= this.Handl ebarsPreco mpiled["bo otstrap-ed it"]||{},t his.Handle barsPrecom piled["boo tstrap-edi t"]["conta iner-grid" ]=Handleba rs.templat e({1:funct ion(e,t,n, i,a){retur n" btn-gro up"},3:fun ction(e,t, n,i,a,r,o) {var l,s=n ull!=t?t:{ },u=n.help erMissing; return"\n" +(null!=(l =(n.compar e||t&&t.co mpare||u). call(s,nul l!=(l=null !=o[1]?o[1 ].options: o[1])?l.to olbarStyle :l,"link", {name:"com pare",hash :{},fn:e.p rogram(4,a ,0,r,o),in verse:e.no op,data:a} ))?l:"")+" \n"+(null! =(l=(n.com pare||t&&t .compare|| u).call(s, null!=(l=n ull!=o[1]? o[1].optio ns:o[1])?l .toolbarSt yle:l,"but ton",{name :"compare" ,hash:{},f n:e.progra m(6,a,0,r, o),inverse :e.noop,da ta:a}))?l: "")+"\n"}, 4:function (e,t,n,i,a ){var r=e. lambda,o=e .escapeExp ression;re turn' <a href=" #" class=" alpaca-arr ay-toolbar -action" d ata-array- toolbar-ac tion="'+o( r(null!=t? t.action:t ,t))+'">'+ o(r(null!= t?t.label: t,t))+"</a >\n"},6:fu nction(e,t ,n,i,a,r,o ){var l,s, u=e.escape Expression ,c=null!=t ?t:{};retu rn' < button cla ss="alpaca -array-too lbar-actio n '+u(e.la mbda(null! =(l=null!= (l=null!=o [1]?o[1].v iew:o[1])? l.styles:l )?l.button :l,t))+'" data-array -toolbar-a ction="'+u ((s=null!= (s=n.actio n||(null!= t?t.action :t))?s:n.h elperMissi ng,"functi on"==typeo f s?s.call (c,{name:" action",ha sh:{},data :a}):s))+' ">\n'+(nul l!=(l=n["i f"].call(c ,null!=t?t .iconClass :t,{name:" if",hash:{ },fn:e.pro gram(7,a,0 ,r,o),inve rse:e.noop ,data:a})) ?l:"")+" "+ (null!=(l= n["if"].ca ll(c,null! =t?t.label :t,{name:" if",hash:{ },fn:e.pro gram(9,a,0 ,r,o),inve rse:e.noop ,data:a})) ?l:"")+"\n </bu tton>\n"}, 7:function (e,t,n,i,a ){var r;re turn' <i cl ass="'+e.e scapeExpre ssion((r=n ull!=(r=n. iconClass| |(null!=t? t.iconClas s:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"iconClas s",hash:{} ,data:a}): r))+'"></i >\n'},9:fu nction(e,t ,n,i,a){va r r,o;retu rn null!=( o=null!=(o =n.label|| (null!=t?t .label:t)) ?o:n.helpe rMissing,r ="function "==typeof o?o.call(n ull!=t?t:{ },{name:"l abel",hash :{},data:a }):o)?r:"" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a, r,o){var l ,s=null!=t ?t:{};retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <div>\n \n <div class ="alpaca-a rray-toolb ar" '+(nul l!=(l=(n.c ompare||t& &t.compare ||n.helper Missing).c all(s,null !=(l=null! =t?t.optio ns:t)?l.to olbarStyle :l,"button ",{name:"c ompare",ha sh:{},fn:e .program(1 ,a,0,r,o), inverse:e. noop,data: a}))?l:"") +">\n\n"+( null!=(l=n .each.call (s,null!=t ?t.arrayTo olbarActio ns:t,{name :"each",ha sh:{},fn:e .program(3 ,a,0,r,o), inverse:e. noop,data: a}))?l:"") +'\n </div>\n \n <div class ="alpaca-c ontainer-g rid-holder "></div>\n \n </di v>\n\n</sc ript>'},us eData:!0,u seDepths:! 0}),this.H andlebarsP recompiled ["bootstra p-edit"][" container- table"]=Ha ndlebars.t emplate({1 :function( e,t,n,i,a) {return""} ,3:functio n(e,t,n,i, a){return' <!-- hidde n column s toring sor t order -- >\n <th cla ss="alpaca -table-reo rder-index -header">< /th>\n <!-- draggable -->\n <th class="alp aca-table- reorder-dr aggable-he ader"></th >\n'},5:fu nction(e,t ,n,i,a){va r r,o,l=nu ll!=t?t:{} ,s=n.helpe rMissing,u ="function ";return' < th data-he ader-id="' +e.escapeE xpression( (o=null!=( o=n.id||(n ull!=t?t.i d:t))?o:s, typeof o== =u?o.call( l,{name:"i d",hash:{} ,data:a}): o))+'" '+( null!=(r=n ["if"].cal l(l,null!= t?t.hidden :t,{name:" if",hash:{ },fn:e.pro gram(6,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+">"+(nu ll!=(o=nul l!=(o=n.ti tle||(null !=t?t.titl e:t))?o:s, r=typeof o ===u?o.cal l(l,{name: "title",ha sh:{},data :a}):o)?r: "")+"</th> \n"},6:fun ction(e,t, n,i,a){ret urn'class= "alpaca-ta ble-column -hidden"'} ,8:functio n(e,t,n,i, a){return" <th>Ac tions</th> \n"},10:fu nction(e,t ,n,i,a){va r r;return "\n " +(null!=(r =(n.item|| t&&t.item| |n.helperM issing).ca ll(null!=t ?t:{},"tr" ,{name:"it em",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+"\n\n"} ,compiler: [7,">= 4.0 .0"],main: function(e ,t,n,i,a){ var r,o,l, s=null!=t? t:{},u='<s cript type ="text/x-h andlebars- template"> \n\n <d iv class=" table-resp onsive">\n \n ';return o =null!=(o= n.arrayToo lbar||(nul l!=t?t.arr ayToolbar: t))?o:n.he lperMissin g,l={name: "arrayTool bar",hash: {},fn:e.pr ogram(1,a, 0),inverse :e.noop,da ta:a},r="f unction"== typeof o?o .call(s,l) :o,n.array Toolbar||( r=n.blockH elperMissi ng.call(t, r,l)),null !=r&&(u+=r ),u+"\n\n <ta ble>\n\n <!-- table headers - ->\n <the ad>\n | |
| 21 | <tr>\n\n" +(null!=(r =n["if"].c all(s,null !=(r=null! =t?t.optio ns:t)?r.dr agRows:r,{ name:"if", hash:{},fn :e.program (3,a,0),in verse:e.no op,data:a} ))?r:"")+" \n"+(null! =(r=n.each .call(s,nu ll!=t?t.he aders:t,{n ame:"each" ,hash:{},f n:e.progra m(5,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n"+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.showActi onsColumn: r,{name:"i f",hash:{} ,fn:e.prog ram(8,a,0) ,inverse:e .noop,data :a}))?r:"" )+" < /tr>\n </ thead>\n\n <!-- tab le body -- >\n <tbod y>\n"+(nul l!=(r=n.ea ch.call(s, null!=t?t. items:t,{n ame:"each" ,hash:{},f n:e.progra m(10,a,0), inverse:e. noop,data: a}))?r:"") +" </tbod y>\n\n </tabl e>\n\n </div>\n\n </script>" },useData: !0}),this. Handlebars Precompile d["bootstr ap-edit"]. container= Handlebars .template( {1:functio n(e,t,n,i, a){var r,o =null!=t?t :{};return ' < legend cla ss="'+(nul l!=(r=n["i f"].call(o ,null!=(r= null!=t?t. options:t) ?r.labelCl ass:r,{nam e:"if",has h:{},fn:e. program(2, a,0),inver se:e.noop, data:a}))? r:"")+'alp aca-contai ner-label" >\n\n'+(nu ll!=(r=n[" if"].call( o,null!=(r =null!=t?t .options:t )?r.collap sible:r,{n ame:"if",h ash:{},fn: e.program( 4,a,0),inv erse:e.noo p,data:a}) )?r:"")+"\ n "+(null !=(r=e.lam bda(null!= (r=null!=t ?t.options :t)?r.labe l:r,t))?r: "")+"\n\n" +(null!=(r =n["if"].c all(o,null !=(r=null! =t?t.optio ns:t)?r.co llapsible: r,{ | |
| 22 | name:"if", hash:{},fn :e.program (6,a,0),in verse:e.no op,data:a} ))?r:"")+" \n </legend>\ n"},2:func tion(e,t,n ,i,a){var r;return e .escapeExp ression(e. lambda(nul l!=(r=null !=t?t.opti ons:t)?r.l abelClass: r,t))+" "} ,4:functio n(e,t,n,i, a){return' <span da ta-toggle= "collapse" >\n'},6:fu nction(e,t ,n,i,a){re turn" </s pan>\n"},8 :function( e,t,n,i,a) {var r;ret urn null!= (r=n.each. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. helpers:r, {name:"eac h",hash:{} ,fn:e.prog ram(9,a,0) ,inverse:e .noop,data :a}))?r:"" },9:functi on(e,t,n,i ,a){var r; return' <p cl ass="alpac a-helper h elp-block '+(null!=( r=n["if"]. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. helperClas s:r,{name: "if",hash: {},fn:e.pr ogram(10,a ,0),invers e:e.noop,d ata:a}))?r :"")+'">\n <i class ="alpaca-i con-16 gly phicon gly phicon-inf o-sign"></ i>\n '+(n ull!=(r=e. lambda(t,t ))?r:"")+" \n </p>\n"},1 0:function (e,t,n,i,a ){var r;re turn e.esc apeExpress ion(e.lamb da(null!=( r=null!=t? t.options: t)?r.helpe rClass:r,t ))},12:fun ction(e,t, n,i,a){ret urn""},com piler:[7," >= 4.0.0"] ,main:func tion(e,t,n ,i,a){var r,o,l,s=nu ll!=t?t:{} ,u='<scrip t type="te xt/x-handl ebars-temp late">\n\n <div>\ n\n'+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.label:r, {name:"if" ,hash:{},f n:e.progra m(1,a,0),i nverse:e.n oop,data:a }))?r:"")+ "\n"+(null !=(r=n["if "].call(s, null!=(r=n ull!=t?t.o ptions:t)? r.helpers: r,{name:"i f",hash:{} ,fn:e.prog ram(8,a,0) ,inverse:e .noop,data :a}))?r:"" )+"\n ";retur n o=null!= (o=n.conta iner||(nul l!=t?t.con tainer:t)) ?o:n.helpe rMissing,l ={name:"co ntainer",h ash:{},fn: e.program( 12,a,0),in verse:e.no op,data:a} ,r="functi on"==typeo f o?o.call (s,l):o,n. container| |(r=n.bloc kHelperMis sing.call( t,r,l)),nu ll!=r&&(u+ =r),u+"\n\ n </div >\n\n</scr ipt>\n"},u seData:!0} ),this.Han dlebarsPre compiled[" bootstrap- edit"]["co ntrol-colo rpicker"]= Handlebars .template( {1:functio n(e,t,n,i, a){return' <div c lass="inpu t-group">\ n'},3:func tion(e,t,n ,i,a){var r;return'p laceholder ="'+e.esca peExpressi on(e.lambd a(null!=(r =null!=t?t .options:t )?r.placeh older:r,t) )+'"'},5:f unction(e, t,n,i,a){v ar r;retur n'size="'+ e.escapeEx pression(e .lambda(nu ll!=(r=nul l!=t?t.opt ions:t)?r. size:r,t)) +'"'},7:fu nction(e,t ,n,i,a){re turn'reado nly="reado nly"'},9:f unction(e, t,n,i,a){v ar r;retur n'name="'+ e.escapeEx pression(( r=null!=(r =n.name||( null!=t?t. name:t))?r :n.helperM issing,"fu nction"==t ypeof r?r. call(null! =t?t:{},{n ame:"name" ,hash:{},d ata:a}):r) )+'"'},11: function(e ,t,n,i,a){ var r,o=e. escapeExpr ession;ret urn"data-" +o((r=null !=(r=n.key ||a&&a.key )?r:n.help erMissing, "function" ==typeof r ?r.call(nu ll!=t?t:{} ,{name:"ke y",hash:{} ,data:a}): r))+'="'+o (e.lambda( t,t))+'"'} ,13:functi on(e,t,n,i ,a){var r, o=e.escape Expression ;return o( (r=null!=( r=n.key||a &&a.key)?r :n.helperM issing,"fu nction"==t ypeof r?r. call(null! =t?t:{},{n ame:"key", hash:{},da ta:a}):r)) +'="'+o(e. lambda(t,t ))+'"'},15 :function( e,t,n,i,a) {return' <spa n class="i nput-group -addon"><i ></i></spa n>\n </div>\n '},compile r:[7,">= 4 .0.0"],mai n:function (e,t,n,i,a ){var r,o, l=null!=t? t:{},s=n.h elperMissi ng,u="func tion",c=e. escapeExpr ession;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n '+(null!=( r=n["if"]. call(l,nul l!=(r=null !=t?t.opti ons:t)?r.c omponent:r ,{name:"if ",hash:{}, fn:e.progr am(1,a,0), inverse:e. noop,data: a}))?r:"") +'\n <input t ype="'+c(( o=null!=(o =n.inputTy pe||(null! =t?t.input Type:t))?o :s,typeof o===u?o.ca ll(l,{name :"inputTyp e",hash:{} ,data:a}): o))+'" id= "'+c((o=nu ll!=(o=n.i d||(null!= t?t.id:t)) ?o:s,typeo f o===u?o. call(l,{na me:"id",ha sh:{},data :a}):o))+' " '+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .placehold er:r,{name :"if",hash :{},fn:e.p rogram(3,a ,0),invers e:e.noop,d ata:a}))?r :"")+" "+( null!=(r=n ["if"].cal l(l,null!= (r=null!=t ?t.options :t)?r.size :r,{name:" if",hash:{ },fn:e.pro gram(5,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" "+(nu ll!=(r=n[" if"].call( l,null!=(r =null!=t?t .options:t )?r.readon ly:r,{name :"if",hash :{},fn:e.p rogram(7,a ,0),invers e:e.noop,d ata:a}))?r :"")+" "+( null!=(r=n ["if"].cal l(l,null!= t?t.name:t ,{name:"if ",hash:{}, fn:e.progr am(9,a,0), inverse:e. noop,data: a}))?r:"") +" "+(null !=(r=n.eac h.call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .data:r,{n ame:"each" ,hash:{},f n:e.progra m(11,a,0), inverse:e. noop,data: a}))?r:"") +" "+(null !=(r=n.eac h.call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .attribute s:r,{name: "each",has h:{},fn:e. program(13 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+"/> \n\n"+(nul l!=(r=n["i f"].call(l ,null!=(r= null!=t?t. options:t) ?r.compone nt:r,{name :"if",hash :{},fn:e.p rogram(15, a,0),inver se:e.noop, data:a}))? r:"")+"\n< /script>"} ,useData:! 0}),this.H andlebarsP recompiled ["bootstra p-edit"][" control-up load-parti al-downloa d"]=Handle bars.templ ate({1:fun ction(e,t, n,i,a){var r,o=e.lam bda,l=e.es capeExpres sion;retur n' <td></td>\ n < td class=" name">\n <span>'+l( o(null!=(r =null!=t?t .file:t)?r .name:r,t) )+'</span> \n </td>\n <td c lass="size ">\n <spa n>'+l(o(nu ll!=(r=nul l!=t?t.fil e:t)?r.siz e:r,t))+'< /span>\n </td >\n <td class ="error" c olspan="2" >\n Error :\n '+l(o (null!=(r= null!=t?t. file:t)?r. error:r,t) )+"\n </td>\n "},3:funct ion(e,t,n, i,a){var r ,o=e.lambd | |
| 23 | a,l=e.esca peExpressi on;return' <t d class="p review">\n '+(null!=( r=n["if"]. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.fil e:t)?r.thu mbnailUrl: r,{name:"i f",hash:{} ,fn:e.prog ram(4,a,0) ,inverse:e .noop,data :a}))?r:"" )+' </td>\n <td class="nam e">\n <a href="'+l( o(null!=(r =null!=t?t .file:t)?r .url:r,t)) +'" title= "'+l(o(nul l!=(r=null !=t?t.file :t)?r.name :r,t))+'" data-galle ry="'+l(o( null!=(r=n ull!=t?t.f ile:t)?r.t humbnailUr l:r,t))+'g allery" do wnload="'+ l(o(null!= (r=null!=t ?t.file:t) ?r.name:r, t))+'">'+l (o(null!=( r=null!=t? t.file:t)? r.name:r,t ))+'</a>\n </ td>\n <td cla ss="size"> <span>'+l( o(null!=(r =null!=t?t .file:t)?r .size:r,t) )+'</span> </td>\n <td c olspan="2" ></td>\n'} ,4:functio n(e,t,n,i, a){var r,o =e.lambda, l=e.escape Expression ;return' <a href="' +l(o(null! =(r=null!= t?t.file:t )?r.url:r, t))+'" tit le="'+l(o( null!=(r=n ull!=t?t.f ile:t)?r.n ame:r,t))+ '" data-ga llery="gal lery" down load="'+l( o(null!=(r =null!=t?t .file:t)?r .name:r,t) )+'">\n <img sr c="'+l(o(n ull!=(r=nu ll!=t?t.fi le:t)?r.th umbnailUrl :r,t))+'"> \n </a>\n '},6:funct ion(e,t,n, i,a,r,o){v ar l;retur n null!=(l =n.each.ca ll(null!=t ?t:{},null !=t?t.butt ons:t,{nam e:"each",h ash:{},fn: e.program( 7,a,0,r,o) ,inverse:e .noop,data :a}))?l:"" },7:functi on(e,t,n,i ,a,r,o){va r l;return null!=(l= n["if"].ca ll(null!=t ?t:{},null !=t?t.isDe lete:t,{na me:"if",ha sh:{},fn:e .program(8 ,a,0,r,o), inverse:e. program(10 ,a,0,r,o), data:a}))? l:""},8:fu nction(e,t ,n,i,a,r,o ){var l,s= e.escapeEx pression;r eturn' <button cl ass="delet e btn btn- danger" da ta-file-in dex="'+s(e .lambda(nu ll!=o[1]?o [1].fileIn dex:o[1],t ))+'" data -button-ke y="'+s((l= null!=(l=n .key||(nul l!=t?t.key :t))?l:n.h elperMissi ng,"functi on"==typeo f l?l.call (null!=t?t :{},{name: "key",hash :{},data:a }):l))+'"> \n <i class=" glyphicon glyphicon- trash glyp hicon-whit e"></i>\n </butto n>\n'},10: function(e ,t,n,i,a,r ,o){var l, s,u=null!= t?t:{},c=n .helperMis sing,d="fu nction",p= e.escapeEx pression;r eturn' <button cl ass="'+p(( s=null!=(s =n.key||(n ull!=t?t.k ey:t))?s:c ,typeof s= ==d?s.call (u,{name:" key",hash: {},data:a} ):s))+" bt n "+p((s=n ull!=(s=n. buttonClas s||(null!= t?t.button Class:t))? s:c,typeof s===d?s.c all(u,{nam e:"buttonC lass",hash :{},data:a }):s))+'" data-file- index="'+p (e.lambda( null!=o[1] ?o[1].file Index:o[1] ,t))+'" da ta-button- key="'+p(( s=null!=(s =n.key||(n ull!=t?t.k ey:t))?s:c ,typeof s= ==d?s.call (u,{name:" key",hash: {},data:a} ):s))+'">\ n'+(null!= (l=n["if"] .call(u,nu ll!=t?t.ic onClass:t, {name:"if" ,hash:{},f n:e.progra m(11,a,0,r ,o),invers e:e.noop,d ata:a}))?l :"")+(null !=(l=n["if "].call(u, null!=t?t. label:t,{n ame:"if",h ash:{},fn: e.program( 13,a,0,r,o ),inverse: e.noop,dat a:a}))?l:" ")+" </ button>\n" },11:funct ion(e,t,n, i,a){var r ;return' <i class=" '+e.escape Expression ((r=null!= (r=n.iconC lass||(nul l!=t?t.ico nClass:t)) ?r:n.helpe rMissing," function"= =typeof r? r.call(nul l!=t?t:{}, {name:"ico nClass",ha sh:{},data :a}):r))+' "></i>\n'} ,13:functi on(e,t,n,i ,a){var r; return" " +e.escapeE xpression( (r=null!=( r=n.label| |(null!=t? t.label:t) )?r:n.help erMissing, "function" ==typeof r ?r.call(nu ll!=t?t:{} ,{name:"la bel",hash: {},data:a} ):r))+"\n" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a, r,o){var l ,s=null!=t ?t:{};retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <tr cla ss="templa te-downloa d">\n'+(nu ll!=(l=n[" if"].call( s,null!=(l =null!=t?t .file:t)?l .error:l,{ name:"if", hash:{},fn :e.program (1,a,0,r,o ),inverse: e.program( 3,a,0,r,o) ,data:a})) ?l:"")+" <td> \n"+(null! =(l=n["if" ].call(s,n ull!=t?t.b uttons:t,{ name:"if", hash:{},fn :e.program (6,a,0,r,o ),inverse: e.noop,dat a:a}))?l:" ")+" </td>\n </tr>\n \n</script >"},useDat a:!0,useDe pths:!0}), this.Handl ebarsPreco mpiled["bo otstrap-ed it"]["cont rol-upload -partial-u pload"]=Ha ndlebars.t emplate({1 :function( e,t,n,i,a) {return' <td class="pre view">\n <span clas s="fade">< /span>\n </td >\n'},3:fu nction(e,t ,n,i,a){re turn" <td></t d>\n"},5:f unction(e, t,n,i,a){v ar r;retur n' <td class= "error" co lspan="2"> <span clas s="label l abel-impor tant">Erro r</span> ' +e.escapeE xpression( e.lambda(n ull!=(r=nu ll!=t?t.fi le:t)?r.er ror:r,t))+ "</td>\n"} ,7:functio n(e,t,n,i, a){var r;r eturn null !=(r=n["if "].call(nu ll!=t?t:{} ,null!=(r= null!=t?t. file:t)?r. valid:r,{n ame:"if",h ash:{},fn: e.program( 8,a,0),inv erse:e.pro gram(15,a, 0),data:a} ))?r:""},8 :function( e,t,n,i,a) {var r,o=n ull!=t?t:{ };return(n ull!=(r=(n .compare|| t&&t.compa re||n.help erMissing) .call(o,a& &a.index,0 ,{name:"co mpare",has h:{},fn:e. program(9, a,0),inver se:e.noop, data:a}))? r:"")+' < td class=" start">\n' +(null!=(r =n["if"].c all(o,null !=(r=null! =t?t.optio ns:t)?r.au toUpload:r ,{name:"if ",hash:{}, fn:e.progr am(11,a,0) ,inverse:e .program(1 3,a,0),dat a:a}))?r:" ")+" </td >\n"},9:fu nction(e,t ,n,i,a){re turn' <td>\n <di v class="p rogress pr ogress-suc cess progr ess-stripe d active" role="prog ressbar" a ria-valuem in="0" ari a-valuemax ="100" ari a-valuenow ="0">\n <div clas s="progres s-bar" sty le="width: | |
| 24 | 0%;"></div >\n </div>\ n </t d>\n'},11: function(e ,t,n,i,a){ return""}, 13:functio n(e,t,n,i, a){return' <but ton class= "btn btn-p rimary"> \ \\n <i clas s="glyphic on glyphic on-upload glyphicon- white"></i >\n <span>S tart</span >\n < /button>\n '},15:func tion(e,t,n ,i,a){var r;return' <td></td> \n <td cl ass="cance l">\n'+(nu ll!=(r=(n. compare||t &&t.compar e||n.helpe rMissing). call(null! =t?t:{},a& &a.index,0 ,{name:"co mpare",has h:{},fn:e. program(16 ,a,0),inve rse:e.noop ,data:a})) ?r:"")+" </td>\n"}, 16:functio n(e,t,n,i, a){return' <but ton class= "btn btn-w arning">\n <i class=" glyphicon glyphicon- ban-circle glyphicon -white"></ i>\n <span> Cancel</sp an>\n </button> \n'},compi ler:[7,">= 4.0.0"],m ain:functi on(e,t,n,i ,a){var r, o=null!=t? t:{},l=e.l ambda,s=e. escapeExpr ession;ret urn'<scrip t type="te xt/x-handl ebars-temp late">\n\n <tr cl ass="templ ate-upload ">\n\n'+(n ull!=(r=n[ "if"].call (o,null!=( r=null!=t? t.options: t)?r.showU ploadPrevi ew:r,{name :"if",hash :{},fn:e.p rogram(1,a ,0),invers e:e.progra m(3,a,0),d ata:a}))?r :"")+'\n <td class="nam e"><span>' +s(l(null! =(r=null!= t?t.file:t )?r.name:r ,t))+'</sp an></td>\n <t d class="s ize"><span >'+s(l(nul l!=(r=null !=t?t.file :t)?r.size :r,t))+"</ span></td> \n\n"+(nul l!=(r=n["i f"].call(o ,null!=(r= null!=t?t. file:t)?r. error:r,{n ame:"if",h ash:{},fn: e.program( 5,a,0),inv erse:e.pro gram(7,a,0 ),data:a}) )?r:"")+" <td ></td>\n </tr>\n\ n</script> "},useData :!0}),this .Handlebar sPrecompil ed["bootst rap-edit"] ["control- upload"]=H andlebars. template({ 1:function (e,t,n,i,a ){var r;re turn e.esc apeExpress ion((r=nul l!=(r=n.cs sClasses|| (null!=t?t .cssClasse s:t))?r:n. helperMiss ing,"funct ion"==type of r?r.cal l(null!=t? t:{},{name :"cssClass es",hash:{ },data:a}) :r))},3:fu nction(e,t ,n,i,a){va r r;return " <thea d>\n <tr>\n"+ (null!=(r= n["if"].ca ll(null!=t ?t:{},null !=(r=null! =t?t.optio ns:t)?r.sh owUploadPr eview:r,{n ame:"if",h ash:{},fn: e.program( 4,a,0),inv erse:e.pro gram(6,a,0 ),data:a}) )?r:"")+' <td>Name< /td>\n <t d>Size</td >\n <td c olspan="2" ></td><!-- error or start or p rogress in dicator -- >\n <td>A ctions</td >\n </tr>\n </thead> \n'},4:fun ction(e,t, n,i,a){ret urn" <td>Thumbn ail</td>\n "},6:funct ion(e,t,n, i,a){retur n" <t d></td>\n" },compiler :[7,">= 4. 0.0"],main :function( e,t,n,i,a) {var r,o,l =null!=t?t :{},s=e.es capeExpres sion,u=n.h elperMissi ng,c="func tion";retu rn'<script type="tex t/x-handle bars-templ ate">\n\n <div cl ass="alpac a-fileuplo ad-contain er '+(null !=(r=n["if "].call(l, null!=t?t. cssClasses :t,{name:" if",hash:{ },fn:e.pro gram(1,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+'">\n <div class="co ntainer-fl uid">\n < div class= "row alpac a-fileuplo ad-chooser ow">\n <div cla ss="col-md -12">\n <di v class="b tn-group"> \n <spa n class="' +s(e.lambd a(null!=(r =null!=(r= null!=t?t. view:t)?r. styles:r)? r.button:r ,t))+' fil einput-but ton">\n <i cl ass="glyph icon glyph icon-uploa d"></i>\n <sp an class=" fileupload -add-butto n">'+s((o= null!=(o=n .chooseBut tonLabel|| (null!=t?t .chooseBut tonLabel:t ))?o:u,typ eof o===c? o.call(l,{ name:"choo seButtonLa bel",hash: {},data:a} ):o))+'</s pan>\n <input class="al paca-fileu pload-inpu t" type="f ile" name= "'+s((o=nu ll!=(o=n.n ame||(null !=t?t.name :t))?o:u,t ypeof o=== c?o.call(l ,{name:"na me",hash:{ },data:a}) :o))+'_fil es">\n <input class="al paca-fileu pload-inpu t-hidden" type="hidd en" name=" '+s((o=nul l!=(o=n.na me||(null! =t?t.name: t))?o:u,ty peof o===c ?o.call(l, {name:"nam e",hash:{} ,data:a}): o))+'_file s_hidden"> \n </sp an>\n </div >\n < /div>\n < /div>\n < div class= "row alpac a-fileuplo ad-well">\ n <di v class="c ol-md-12 f ileupload- active-zon e">\n <tabl e class="t able table -striped"> \n'+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .showHeade rs:r,{name :"if",hash :{},fn:e.p rogram(3,a ,0),invers e:e.noop,d ata:a}))?r :"")+' <tbody cla ss="files" >\n </t body>\n </t able>\n <p align="cen ter" class ="dropzone -message"> '+s((o=nul l!=(o=n.dr opZoneMess age||(null !=t?t.drop ZoneMessag e:t))?o:u, typeof o== =c?o.call( l,{name:"d ropZoneMes sage",hash :{},data:a }):o))+'</ p>\n </div>\n </div>\n <div class ="row">\n <div class="col -md-12">\n <div id="p rogress" c lass="prog ress">\n <div cla ss="progre ss-bar pro gress-bar- success">< /div>\n </d iv>\n </div>\n </div>\n </d iv>\n < /div>\n\n< /script>'} ,useData:! | |
| 25 | 0}),this.H andlebarsP recompiled ["bootstra p-edit"].c ontrol=Han dlebars.te mplate({1: function(e ,t,n,i,a){ var r,o,l= null!=t?t: {};return' <l abel class ="'+(null! =(r=n["if" ].call(l,n ull!=(r=nu ll!=t?t.op tions:t)?r .labelClas s:r,{name: "if",hash: {},fn:e.pr ogram(2,a, 0),inverse :e.noop,da ta:a}))?r: "")+' cont rol-label alpaca-con trol-label " for="'+e .escapeExp ression((o =null!=(o= n.id||(nul l!=t?t.id: t))?o:n.he lperMissin g,"functio n"==typeof o?o.call( l,{name:"i d",hash:{} ,data:a}): o))+'">'+( null!=(r=e .lambda(nu ll!=(r=nul l!=t?t.opt ions:t)?r. label:r,t) )?r:"")+"< /label>\n" },2:functi on(e,t,n,i ,a){var r; return e.e scapeExpre ssion(e.la mbda(null! =(r=null!= t?t.option s:t)?r.lab elClass:r, t))},4:fun ction(e,t, n,i,a){ret urn""},6:f unction(e, t,n,i,a){v ar r;retur n null!=(r =n.each.ca ll(null!=t ?t:{},null !=(r=null! =t?t.optio ns:t)?r.he lpers:r,{n ame:"each" ,hash:{},f n:e.progra m(7,a,0),i nverse:e.n oop,data:a }))?r:""}, 7:function (e,t,n,i,a ){var r;re turn' <p clas s="help-bl ock '+(nul l!=(r=n["i f"].call(n ull!=t?t:{ },null!=(r =null!=t?t .options:t )?r.helper Class:r,{n ame:"if",h ash:{},fn: e.program( 8,a,0),inv erse:e.noo p,data:a}) )?r:"")+'" >\n <i cl ass="glyph icon glyph icon-info- sign"></i> \n '+(nul l!=(r=e.la mbda(t,t)) ?r:"")+"\n </ p>\n"},8:f unction(e, t,n,i,a){v ar r;retur n e.escape Expression (e.lambda( null!=(r=n ull!=t?t.o ptions:t)? r.helperCl ass:r,t))} ,10:functi on(e,t,n,i ,a){var r; return nul l!=(r=n["i f"].call(n ull!=t?t:{ },null!=(r =null!=t?t .options:t )?r.button s:r,{name: "if",hash: {},fn:e.pr ogram(11,a ,0),invers e:e.noop,d ata:a}))?r :""},11:fu nction(e,t ,n,i,a){va r r;return ' <div cl ass="alpac a-control- buttons-co ntainer">\ n'+(null!= (r=n.each. call(null! =t?t:{},nu ll!=(r=nul l!=t?t.opt ions:t)?r. buttons:r, {name:"eac h",hash:{} ,fn:e.prog ram(12,a,0 ),inverse: e.noop,dat a:a}))?r:" ")+" </di v>\n"},12: function(e ,t,n,i,a){ var r,o,l= null!=t?t: {},s=n.hel perMissing ,u="functi on",c=e.es capeExpres sion;retur n' <b utton data -key="'+c( (o=null!=( o=n.key||a &&a.key)?o :s,typeof o===u?o.ca ll(l,{name :"key",has h:{},data: a}):o))+'" type="'+c ((o=null!= (o=n.type| |(null!=t? t.type:t)) ?o:s,typeo f o===u?o. call(l,{na me:"type", hash:{},da ta:a}):o)) +'" class= "alpaca-co ntrol-butt on alpaca- control-bu tton-'+c(( o=null!=(o =n.key||a& &a.key)?o: s,typeof o ===u?o.cal l(l,{name: "key",hash :{},data:a }):o))+" " +c((o=null !=(o=n.sty les||(null !=t?t.styl es:t))?o:s ,typeof o= ==u?o.call (l,{name:" styles",ha sh:{},data :a}):o))+' " '+(null! =(r=n.each .call(l,nu ll!=t?t.va lue:t,{nam e:"each",h ash:{},fn: e.program( 13,a,0),in verse:e.no op,data:a} ))?r:"")+" >"+(null!= (o=null!=( o=n.value| |(null!=t? t.value:t) )?o:s,r=ty peof o===u ?o.call(l, {name:"val ue",hash:{ },data:a}) :o)?r:"")+ "</button> \n"},13:fu nction(e,t ,n,i,a){va r r,o=null !=t?t:{},l =n.helperM issing,s=" function", u=e.escape Expression ;return u( (r=null!=( r=n.key||a &&a.key)?r :l,typeof r===s?r.ca ll(o,{name :"key",has h:{},data: a}):r))+'= "'+u((r=nu ll!=(r=n.v alue||(nul l!=t?t.val ue:t))?r:l ,typeof r= ==s?r.call (o,{name:" value",has h:{},data: a}):r))+'" '},compil er:[7,">= 4.0.0"],ma in:functio n(e,t,n,i, a){var r,o ,l,s=null! =t?t:{},u= '<script t ype="text/ x-handleba rs-templat e">\n\n <div clas s="form-gr oup">\n\n' +(null!=(r =n["if"].c all(s,null !=(r=null! =t?t.optio ns:t)?r.la bel:r,{nam e:"if",has h:{},fn:e. program(1, a,0),inver se:e.noop, data:a}))? r:"")+"\n ";r eturn o=nu ll!=(o=n.c ontrol||(n ull!=t?t.c ontrol:t)) ?o:n.helpe rMissing,l ={name:"co ntrol",has h:{},fn:e. program(4, a,0),inver se:e.noop, data:a},r= "function" ==typeof o ?o.call(s, l):o,n.con trol||(r=n .blockHelp erMissing. call(t,r,l )),null!=r &&(u+=r),u +"\n\n"+(n ull!=(r=n[ "if"].call (s,null!=( r=null!=t? t.options: t)?r.helpe rs:r,{name :"if",hash :{},fn:e.p rogram(6,a ,0),invers e:e.noop,d ata:a}))?r :"")+"\n"+ (null!=(r= n["if"].ca ll(s,null! =(r=null!= t?t.option s:t)?r.ren derButtons :r,{name:" if",hash:{ },fn:e.pro gram(10,a, 0),inverse :e.noop,da ta:a}))?r: "")+"\n </div>\n\ n</script> "},useData :!0}),this .Handlebar sPrecompil ed["bootst rap-edit"] .message=H andlebars. template({ compiler:[ 7,">= 4.0. 0"],main:f unction(e, t,n,i,a){v ar r,o,l=n ull!=t?t:{ },s=n.help erMissing, u="functio n";return' <script ty pe="text/x -handlebar s-template ">\n\n <div class ="help-blo ck alpaca- message al paca-messa ge-'+(null !=(o=null! =(o=n.id|| (null!=t?t .id:t))?o: s,r=typeof o===u?o.c all(l,{nam e:"id",has h:{},data: a}):o)?r:" ")+'">\n <i c lass="glyp hicon glyp hicon-excl amation-si gn"></i>&n bsp;'+(nul l!=(o=null !=(o=n.mes sage||(nul l!=t?t.mes sage:t))?o :s,r=typeo f o===u?o. call(l,{na me:"messag e",hash:{} ,data:a}): o)?r:"")+" \n </di v>\n\n</sc ript>"},us eData:!0}) ,function( e,t){e.Bas e=t()}(thi s,function (){var e=" function", t="object" ,n="string ",i=!1,a=[ "construct or","toStr ing","valu eOf"],r=a. length,o=/ \bbase\b/, l=function (){},s={to Source:nul l,base:l}, u=function (){};retur n u.extend =function( n,a){var r =u.prototy pe.extend; i=!0;var o =new this; r.call(o,n ),o.base=s .base,i=!1 ;var l=o.c onstructor ,c=o.const ructor=fun ction(){i| |(this&&(t his._const ructing||t his.constr uctor===c) ?(this._co nstructing =!0,l.appl y(this,arg uments),th is._constr ucting=!1) :arguments .length&&u .cast.appl y(c,argume nts))};ret urn r.call (c,this),c .ancestor= this,c.pro totype=o,c .valueOf=f unction(e) {return e= ==t?c:l.va lueOf()},r | |
| 26 | .call(c,a) ,typeof c. init===e&& c.init(),c },u.protot ype.extend =function( l,c){if(ty peof l===n &&argument s.length>1 ){var d=th is[l];if(d &&typeof c ===e&&(!d. valueOf||d .valueOf() !==c.value Of())&&o.t est(c)){va r p=c.valu eOf();c=fu nction(){v ar e,t=thi s.base||s. base;retur n this.bas e=d,e=0=== arguments. length?p.c all(this): p.apply(th is,argumen ts),this.b ase=t,e},c .valueOf=f unction(e) {return e= ==t?c:p},c .toString= u.toString }this[l]=c }else if(l ){var h=u. prototype. extend;i|| typeof thi s===e||(h= this.exten d||h);for( var f,m=i? 0:1;r>m;m+ +)f=a[m],l [f]!==s[f] &&h.call(t his,f,l[f] );for(f in l)s[f]||h .call(this ,f,l[f])}r eturn this },u=u.exte nd({base:s .base},{an cestor:Obj ect,versio n:"1.1",ca st:functio n(){for(va r t,n,i=0, a=argument s.length;a >i;i++)n=a rguments[i ],t=n.exte nd||u.prot otype.exte nd,typeof n===e?(t=n .prototype .extend||u .prototype .extend,t. call(n.pro totype,thi s.prototyp e),t.call( n,this),n. ancestor=t his):t.cal l(n,this.p rototype); return thi s},impleme nt:functio n(){for(va r e=0;e<ar guments.le ngth;e++)t his.cast.c all(argume nts[e],thi s);return this},toSt ring:funct ion(){retu rn this.va lueOf()+"" }})}),func tion(e){va r t=functi on(){var n =t.makeArr ay(argumen ts);if(0== =n.length) return t.t hrowDefaul tError("Yo u must sup ply at lea st one arg ument. Th is argumen t can eith er be a DO M element against wh ich Alpaca will gene rate a for m or it ca n be a fun ction name . See htt p://www.al pacajs.org for more details.") ;var i=n[0 ];i&&t.isS tring(i)&& (i=e("#"+i ));var a=n ull,r=null ,o=null,l= null,s=nul l,u=null,c =null,d=nu ll,p=!1,h= {},f=null, m=null,g=n ull,v=null ,b=functio n(n,a){var r=null,o= e(n).attr( "data-alpa ca-field-i d");if(o){ var l=t.fi eldInstanc es[o];l&&( r=l)}if(!r ){var s=e( n).attr("d ata-alpaca -form-id") ;if(s){var u=e(n).fi nd(":first ");if(u.le ngth>0){va r c=e(u[0] ).attr("da ta-alpaca- field-id") ;if(c){var d=t.field Instances[ c];d&&(r=d )}}}}if(!r &&!a){var p=e(i).fin d(":first" );if(p.len gth>0){var h=b(p[0], !0);h&&(r= h)}}if(!r& &!a){var f =e(i).pare nt();if(f) {var m=b(f ,!0);m&&(r =m)}}retur n r},y=["g et","exist s","destro y"],w=n.le ngth>1&&t. isString(n [1])&&y.in dexOf(n[1] )>-1,x=b(i );if(x||w) {if(w){var E=n[1];re turn"get"= ==E?x:"exi sts"===E?! !x:"destro y"===E?voi d(x&&x.des troy()):t. throwDefau ltError("U nknown spe cial funct ion: "+E)} return x}v ar F=null; if(1===n.l ength){var C=e(i).te xt();F=JSO N.parse(C) ,e(i).html ("")}else F=t.isObje ct(n[1])?n [1]:t.isFu nction(n[1 ])?n[1](): {data:n[1] };if(!F)re turn t.thr owDefaultE rror("Unab le to dete rmine Alpa ca configu ration");i f(a=F.data ,r=F.schem a,o=F.opti ons,l=F.vi ew,s=F.ren der,F.call back&&(s=F .callback) ,u=F.postR ender,c=F. error,d=F. connector, f=F.dataSo urce,m=F.s chemaSourc e,g=F.opti onsSource, v=F.viewSo urce,F.ui& &(h.ui=F.u i),F.type& &(h.type=F .type),t.i sEmpty(F.n otTopLevel )||(p=F.no tTopLevel) ,t.isEmpty (c)&&(c=t. defaultErr orCallback ),!d||!d.c onnect){va r T="defau lt",S={};t .isString( d)?T=d:t.i sObject(d) &&d.id&&(T =d.id,d.co nfig&&(S=d .config)); var k=t.ge tConnector Class(T);k ||(k=t.get ConnectorC lass("defa ult")),d=n ew k(T,S)} var A=d;if (p){var O= t.getConne ctorClass( "default") ;A=new O(" default")} o||(o={}); var I=func tion(e){e. parent||(e .hideInitV alidationE rror||e.re freshValid ationState (!0),"view "!==e.view .type&&t.f ieldApplyF ieldAndChi ldren(e,fu nction(e){ e.hideInit Validation Error=!1}) )},M=funct ion(e){e.p arent||(e. observable Scope=t.ge nerateId() ),e.parent ||t.fireRe ady(e),t.i sUndefined (o.focus)& &!e.parent &&(o.focus =t.default Focus),o&& o.focus?wi ndow.setTi meout(func tion(){var t=functio n(e){e.sus pendBlurFo cus=!0,e.f ocus(),e.s uspendBlur Focus=!1}; if(o.focus ){if(e.isC ontrolFiel d&&e.isAut oFocusable ())t(e);el se if(e.is ContainerF ield)if(o. focus===!0 )e.childre n&&e.child ren.length >0&&t(e);e lse if("st ring"==typ eof o.focu s){var n=e .getContro lByPath(o. focus);n&& n.isContro lField&&n. isAutoFocu sable()&&t (n)}I(e)}} ,500):I(e) ,u&&u(e)}; A.loadAll( {data:a,sc hema:r,opt ions:o,vie w:l,dataSo urce:f,sch emaSource: m,optionsS ource:g,vi ewSource:v },function (e,n,u,p){ return e=e ?e:a,u=u?u :r,n=n?n:o ,p=p?p:l,t .isEmpty(e )&&t.isEmp ty(u)&&(t. isEmpty(n) ||t.isEmpt y(n.type)) &&(e="",t. isEmpty(n) ?n="text": o&&t.isObj ect(o)&&(n .type="tex t")),n.vie w&&(p=n.vi ew),t.init (i,e,n,u,p ,h,s,M,d,c )},functio n(e){retur n c(e),nul l})};t.Fie lds={},t.C onnectors= {},t.Exten d=e.extend ,t.Create= function() {var t=Arr ay.prototy pe.slice.c all(argume nts);retur n t.unshif t({}),e.ex tend.apply (this,t)}, t.Extend(t ,{makeArra y:function (e){return Array.pro totype.sli ce.call(e) },isFuncti on:functio n(e){retur n"[object Function]" ===Object. prototype. toString.c all(e)},is String:fun ction(e){r eturn"stri ng"==typeo f e},isObj ect:functi on(e){retu rn!t.isUnd efined(e)& &"[object Object]"== =Object.pr ototype.to String.cal l(e)},isPl ainObject: function(t ){return e .isPlainOb ject(t)},i sNumber:fu nction(e){ return"num ber"==type of e},isAr ray:functi on(e){retu rn e insta nceof Arra y},isBoole an:functio n(e){retur n"boolean" ==typeof e },isUndefi ned:functi on(e){retu rn"undefin ed"==typeo f e},trim: function(e ){var n=e; return n&& t.isString (n)&&(n=n. replace(/^ \s+|\s+$/g ,"")),n},s afeDomPars e:function (n){if(n&& t.isString (n)){n=t.t rim(n);var i=null;tr y{i=e(n)}c atch(a){n= "<div>"+n+ "</div>",i =e(n).chil dren()}ret urn i}retu rn n},isEm pty:functi on(e,n){va r i=this;i f(t.isUnde fined(e))r eturn!0;if (null===e) return!0;i | |
| 27 | f(e&&t.isO bject(e)){ var a=i.co untPropert ies(e,n);i f(0===a)re turn!0}ret urn!1},cou ntProperti es:functio n(e,n){var i=0;if(e& &t.isObjec t(e))for(v ar a in e) e.hasOwnPr operty(a)& &(n?i++:"f unction"!= typeof e[a ]&&i++);re turn i},co pyOf:funct ion(n){var i=n;if(t. isArray(n) ){i=[];for (var a=0;a <n.length; a++)i.push (t.copyOf( n[a]))}els e if(t.isO bject(n)){ if(n insta nceof Date )return ne w Date(n.g etTime()); if(n insta nceof RegE xp)return new RegExp (n);if(n.n odeType&&" cloneNode" in n)i=n.c loneNode(! 0);else if (e.isPlain Object(n)) {i={};for( var r in n )n.hasOwnP roperty(r) &&(i[r]=t. copyOf(n[r ]))}}retur n i},copyI nto:functi on(e,t){fo r(var n in t)t.hasOw nProperty( n)&&!this. isFunction (this[n])& &(e[n]=t[n ])},cloneO bject:func tion(e){re turn t.cop yOf(e)},sp liceIn:fun ction(e,t, n){return e.substrin g(0,t)+n+e .substring (t,e.lengt h)},compac tArray:fun ction(e){v ar t,n=[], i=e.length ;for(t=0;i >t;t++)lan g.isNull(e [t])||lang .isUndefin ed(e[t])|| n.push(e[t ]);return n},removeA ccents:fun ction(e){r eturn e.re place(/[à áâãäå ]/g,"a").r eplace(/[à ¨Ã©ÃªÃ«]/g ,"e").repl ace(/[ìà îï]/g,"i ").replace (/[òóôà µÃ¶]/g,"o" ).replace( /[ùúûü ]/g,"u").r eplace(/[à ½Ã¿]/g,"y" ).replace( /[ñ]/g,"n ").replace (/[ç]/g," c").replac e(/[Å“]/g, "oe").repl ace(/[æ]/ g,"ae")},i ndexOf:fun ction(e,n, i){var a,r =n.length; for(t.isFu nction(i)| |(i=functi on(e,t){re turn e===t }),a=0;r>a ;a++)if(i. call({},e, n[a]))retu rn a;retur n-1},uniqu eIdCounter :0,default Locale:"en _US",defau ltFocus:!0 ,defaultSo rt:functio n(e,t){ret urn e.text >t.text?1: e.text<t.t ext?-1:0}, setDefault Locale:fun ction(e){t his.defaul tLocale=e} ,defaultSc hemaFieldM apping:{}, registerDe faultSchem aFieldMapp ing:functi on(e,t){e& &t&&(this. defaultSch emaFieldMa pping[e]=t )},default FormatFiel dMapping:{ },register DefaultFor matFieldMa pping:func tion(e,t){ e&&t&&(thi s.defaultF ormatField Mapping[e] =t)},getSc hemaType:f unction(e) {var n=nul l;return t .isEmpty(e )?n="strin g":t.isArr ay(e)?n="a rray":t.is Object(e)? n="object" :t.isStrin g(e)?n="st ring":t.is Number(e)? n="number" :t.isBoole an(e)&&(n= "boolean") ,n||"objec t"!=typeof e||(n="ob ject"),n}, guessOptio nsType:fun ction(e){v ar n=null; return n=e &&"undefin ed"!=typeo f e["enum" ]?e["enum" ].length>3 ?"select": "radio":t. defaultSch emaFieldMa pping[e.ty pe],e.form at&&t.defa ultFormatF ieldMappin g[e.format ]&&(n=t.de faultForma tFieldMapp ing[e.form at]),n},vi ews:{},gen erateViewI d:function (){return" view-"+thi s.generate Id()},regi sterView:f unction(e) {var n=e.i d;if(!n)re turn t.thr owDefaultE rror("Cann ot registe r view wit h missing view id: " +n);var i= this.views [n];if(i)t .mergeObje ct(i,e);el se{this.vi ews[n]=e,e .templates ||(e.templ ates={});f or(var a=t .TemplateE ngineRegis try.ids(), r=0;r<a.le ngth;r++){ var o=a[r] ,l=t.Templ ateEngineR egistry.fi nd(o);if(l )for(var s =l.findCac heKeys(n), u=0;u<s.le ngth;u++){ var c=t.sp litCacheKe y(s[u]);e. templates[ c.template Id]={type: o,template :!0,cacheK ey:s[u]}}} }},getNorm alizedView :function( e){return this.norma lizedViews [e]},looku pNormalize dView:func tion(e,t){ var n=null ;for(var i in this.n ormalizedV iews){var a=this.nor malizedVie ws[i];if(a .ui===e&&a .type===t) {n=i;break }}return n },register Template:f unction(e, n,i){i||(i ="base"),t his.views[ i]||(this. views[i]={ },this.vie ws[i].id=i ),this.vie ws[i].temp lates||(th is.views[i ].template s={}),this .views[i]. templates[ e]=n,t.cou ntProperti es(t.norma lizedViews )>0&&(t.no rmalizedVi ews={})},r egisterTem plates:fun ction(e,t) {for(var n in e)this .registerT emplate(n, e[n],t)},r egisterMes sage:funct ion(e,t,n) {n||(n="ba se"),this. views[n]|| (this.view s[n]={},th is.views[n ].id=n),th is.views[n ].messages ||(this.vi ews[n].mes sages={}), this.views [n].messag es[e]=t},r egisterMes sages:func tion(e,t){ for(var n in e)e.has OwnPropert y(n)&&this .registerM essage(n,e [n],t)},de faultDateF ormat:"MM/ DD/YYYY",d efaultTime Format:"HH :SS",regex ps:{email: /^[a-z0-9! \#\$%&'\*\ -\/=\?\+\- \^_`\{\|\} ~]+(?:\.[a -z0-9!\#\$ %&'\*\-\/= \?\+\-\^_` \{\|\}~]+) *@(?:[a-z0 -9](?:[a-z 0-9-]*[a-z 0-9])?\.)+ [a-z]{2,6} $/i,url:/^ (http|http s|ftp):\/\ /[a-z0-9]+ ([\-\.]{1} [a-z0-9]+) *\.[a-z]{2 ,5}(\:[0-9 ]{1,5})?(\ /.*)?$/i," intranet-u rl":/^(htt p|https|ft p):\/\/[a- z0-9]+([\- \.]{1}[a-z 0-9]+)*(\: [0-9]{1,5} )?(\/.*)?$ /i,passwor d:/^[0-9a- zA-Z\x20-\ x7E]*$/,da te:/^(0[1- 9]|1[012]) [- \/.](0[ 1-9]|[12][ 0-9]|3[01] )[- \/.]\d \d$/,integ er:/^([\+\ -]?([1-9]\ d*)|0)$/,n umber:/^([ \+\-]?((([ 0-9]+(\.)? )|([0-9]*\ .[0-9]+))( [eE][+-]?[ 0-9]+)?))$ /,phone:/^ (\D?(\d{3} )\D?\D?(\d {3})\D?(\d {4}))?$/,i pv4:/^(?:1 \d?\d?|2(? :[0-4]\d?| [6789]|5[0 -5]?)?|[3- 9]\d?|0)(? :\.(?:1\d? \d?|2(?:[0 -4]\d?|[67 89]|5[0-5] ?)?|[3-9]\ d?|0)){3}$ /,"zipcode -five":/^( \d{5})?$/, "zipcode-n ine":/^(\d {5}(-\d{4} )?)?$/,whi tespace:/^ \s+$/},fie ldInstance s:{},field ClassRegis try:{},reg isterField Class:func tion(e,t){ this.field ClassRegis try[e]=t}, getFieldCl ass:functi on(e){retu rn this.fi eldClassRe gistry[e]} ,getFieldC lassType:f unction(e) {for(var t in this.f ieldClassR egistry)if (this.fiel dClassRegi stry.hasOw nProperty( t)&&this.f ieldClassR egistry[t] ===e)retur n t;return null},con nectorClas sRegistry: {},registe rConnector Class:func tion(e,t){ this.conne ctorClassR egistry[e] =t},getCon nectorClas s:function (e){return this.conn ectorClass Registry[e ]},replace All:functi on(e,t,n){ return e.r eplace(new RegExp(t, "g"),n)},e lement:fun ction(t,n, i,a){var r =e("<"+t+" />");if(n& &r.attr(n) | |
| 28 | ,i&&r.css( i),a)for(v ar o in a) r.addClass (o)},eleme ntFromTemp late:funct ion(n,i){v ar a=n;if( i)for(var r in i)a=t .replaceAl l(a,"${"+r +"}",i[r]) ;return e( a)},genera teId:funct ion(){retu rn t.uniqu eIdCounter ++,"alpaca "+t.unique IdCounter} ,later:fun ction(t,n, i,a,r){t=t ||0,n=n||{ };var o,l, s=i,u=e.ma keArray(a) ;if("strin g"==typeof i&&(s=n[i ]),!s)thro w{name:"Ty peError",m essage:"Th e function is undefi ned."};ret urn o=func tion(){s.a pply(n,u)} ,l=r?setIn terval(o,t ):setTimeo ut(o,t),{i d:l,interv al:r,cance l:function (){this.in terval?cle arInterval (l):clearT imeout(l)} }},endsWit h:function (e,t){retu rn-1!==e.i ndexOf(t,e .length-t. length)},s tartsWith: function(e ,t){return e.substr( 0,t.length )===t},isU ri:functio n(e){retur n t.isStri ng(e)&&(t. startsWith (e,"http:/ /")||t.sta rtsWith(e, "https://" )||t.start sWith(e,"/ ")||t.star tsWith(e," ./")||t.st artsWith(e ,"../"))}, traverseOb ject:funct ion(e,n,i) {t.isStrin g(n)&&(n=n .split("." ));var a=n ull,r=e,o= null;do o= n.shift(), i&&o===i&& (o=n.shift ()),t.isEm pty(r[o])? n=[]:(r=r[ o],0===n.l ength&&(a= r));while( n.length>0 );return a },each:fun ction(e,n) {if(t.isAr ray(e))for (var i=0;i <e.length; i++)n.appl y(e[i]);el se if(t.is Object(e)) for(var a in e)n.app ly(e[a])}, merge:func tion(e,n,i ){e||(e={} );for(var a in n){va r r=!0;i&& (r=i(a)),r &&(t.isEmp ty(n[a])?e [a]=n[a]:t .isObject( n[a])?(e[a ]||(e[a]={ }),e[a]=t. merge(e[a] ,n[a])):e[ a]=n[a]); | |
| 29 | }return e} ,mergeObje ct:functio n(e,t){ret urn e||(e= {}),t||(t= {}),this.m ergeObject 2(t,e),e}, mergeObjec t2:functio n(n,i){var a=t.isArr ay,r=t.isO bject,o=t. isUndefine d,l=t.copy Of,s=funct ion(t,n){r eturn a(t) ?a(n)&&e.e ach(t,func tion(e){n. push(l(t[e ]))}):r(t) ?r(n)&&e.e ach(t,func tion(e){o( n[e])?n[e] =l(t[e]):n [e]=s(t[e] ,n[e])}):n =l(t),n};r eturn s(n, i),i},subs tituteToke ns:functio n(e,n){if( !t.isEmpty (e))for(va r i=0;i<n. length;i++ ){var a="{ "+i+"}",r= e.indexOf( a);if(r>-1 ){var o=e. substring( 0,r)+n[i]+ e.substrin g(r+3);e=o }}return e },compareO bject:func tion(e,t){ return equ iv(e,t)},c ompareArra yContent:f unction(t, n){var i=t &&n&&t.len gth===n.le ngth;if(i) for(var a= t.length-1 ;a>=0;a--) {var r=t[a ];if(e.inA rray(r,n)< 0)return!1 }return i} ,testRegex :function( e,t){var n =new RegEx p(e);retur n n.test(t )},isValEm pty:functi on(n,i){va r a=!1;ret urn t.isEm pty(n,i)?a =!0:(t.isS tring(n)&& ""===n&&(a =!0),t.isO bject(n)&& e.isEmptyO bject(n)&& (a=!0),t.i sArray(n)& &0===n.len gth&&(a=!0 )),a},init :function( e,n,i,a,r, o,l,s,u,c) {var d=thi s;if(t.isO bject(r)){ var p=r.id ;p||(r.id= this.gener ateViewId( ));var h=r .parent;h| |(r.parent ="bootstra p-edit"),t his.regist erView(r), r=r.id}thi s.compile( function(p ){if(p.err ors&&p.err ors.length >0){for(va r h=[],f=0 ;f<p.error s.length;f ++){var m= p.errors[f ].view,g=p .errors[f] .cacheKey, v=p.errors [f].err,b= "The templ ate with c ache key: "+g+" for view: "+m+ " failed t o compile" ;v&&v.mess age&&(b+=" , message: "+v.messa ge,h.push( v.message) ),v&&(b+=" , err: "+J SON.string ify(v)),t. logError(b ),delete d .normalize dViews[m], delete d.v iews[m]}re turn t.thr owErrorWit hCallback( "View comp ilation fa iled, cann ot initial ize Alpaca . "+h.join (", "),c)} d._init(e, n,i,a,r,o, l,s,u,c)}, c)},_init: function(n ,i,a,r,o,l ,s,u,c,d){ var p=this ,h=t.defau ltView||nu ll,f=null; e.mobile&& !h&&(h="jq uerymobile ");var m=" function"= =typeof e. fn.modal;m &&!h&&(h=" bootstrap" );var g="u ndefined"! =typeof e. ui;if(g&&! h&&(h="jqu eryui"),h& &(f=i?"edi t":"create "),!o){var v=l.ui,b= l.type;v|| (h||(h=t.d efaultUI), h&&(v=h)), v&&(b||(b= f?f:"edit" ),t.logDeb ug("No vie w provided but found request f or UI: "+v +" and typ e: "+b),o= this.looku pNormalize dView(v,b) ,o?t.logDe bug("Found view: "+o ):t.logDeb ug("No vie w found fo r UI: "+v+ " and type : "+b))}if (!o)return t.throwEr rorWithCal lback("A v iew was no t specifie d and coul d not be a utomatical ly determi ned.",d);i f(t.isStri ng(o)&&!th is.normali zedViews[o ])return t .throwErro rWithCallb ack("The d esired vie w: "+o+" c ould not b e loaded. Please ma ke sure it is loaded and not m isspelled. ",d);var y =t.createF ieldInstan ce(n,i,a,r ,o,c,d);if (y){e(n).a ddClass("a lpaca-fiel d-renderin g"),e(n).a ddClass("a lpaca-hidd en"),t.fie ldInstance s[y.getId( )]=y,y.all FieldInsta nces=funct ion(){retu rn t.field Instances} ,t.isEmpty (s)&&(s=y. view.rende r),t.isEmp ty(u)&&(u= y.view.pos tRender);v ar w=funct ion(){y.pa rent||y.ge tFieldEl() .addClass( "alpaca-"+ p.getNorma lizedView( o).type),y .parent||y .getFieldE l().addCla ss("alpaca -top"),e(n ).removeCl ass("alpac a-field-re ndering"), e(n).remov eClass("al paca-hidde n"),y._old FieldEl&&e (y._oldFie ldEl).remo ve(),u(y)} ;t.isEmpty (s)?y.rend er(functio n(){w()}): s(y,functi on(){w()}) ,y.callbac k=s,y.rend eredCallba ck=u}},cre ateFieldIn stance:fun ction(e,n, i,a,r,o,l) {if(t.isVa lEmpty(i,! 0)&&(i={}) ,t.isValEm pty(a,!0)& &(a={}),i& &t.isStrin g(i)){var s=i;i={},i .type=s}i. type||(a.t ype||(a.ty pe=t.getSc hemaType(n )),a.type| |(n&&t.isA rray(n)?a. type="arra y":a.type= "object"), i.type=t.g uessOption sType(a)); var u=t.ge tFieldClas s(i.type); return u?n ew u(e,n,i ,a,r,o,l): (l({messag e:"Unable to find fi eld class for type: "+i.type,r eason:"FIE LD_INSTANT IATION_ERR OR"}),null )},parseJS ON:functio n(t){retur n t?e.pars eJSON(t):n ull},compi le:functio n(n,i){var a=this,r= {errors:[] ,count:0,s uccessCoun t:0},o=fun ction(e){i f(0===r.er rors.lengt h)for(var t in e)a.n ormalizedV iews[t]=e[ t];n(r)},l =function( e,t,n,i,a) {var l=n.i d;r.count+ +,t?r.erro rs.push({v iew:l,cach eKey:i,err :t}):r.suc cessCount+ +,r.count= =a&&o(e)}, s=function (n,i,a,r,o ,s,u){var c=t.makeCa cheKey(i.i d,a,r,o),d ="text/x-h andlebars- template"; if(s&&t.is Object(s)& &(d=s.type ,s.cacheKe y&&(c=s.ca cheKey),s= s.template ),s&&"stri ng"==typeo f s){var p =s.toLower Case();if( t.isUri(p) );else if( !s||0!==s. indexOf("# ")&&0!==s. indexOf(". ")){if(s){ var h=i.te mplates[s] ;h&&(s=h)} }else{var f=e(s);d=e (f).attr(" type"),s=e (f).html() }}if(!d){t .logError( "Engine ty pe was emp ty");var m =new Error ("Engine t ype was em pty");retu rn void l( n,m,i,c,u) }var g=t.T emplateEng ineRegistr y.find(d); if(!g){t.l ogError("C annot find template engine for type: "+t ype);var m =new Error ("Cannot f ind templa te engine for type: "+type);re turn void l(n,m,i,c, u)}if(s=== !0){if(g.i sCached(c) )return vo id l(n,nul l,i,c,u);v ar v="View configura tion for v iew: "+i.i d+" claims to have p recompiled template for cacheK ey: "+c+" but it cou ld not be found";ret urn t.logE rror(v),vo id l(n,new Error(v), i,c,u)}ret urn g.isCa ched(c)?vo id l(n,nul l,i,c,u):v oid g.comp ile(c,s,fu nction(e){ l(n,e,i,c, u)})},u=fu nction(e){ var t=[];f or(var n i n e){var i =e[n];if(i .templates )for(var a in i.temp lates){var r=i.templ ates[a];t. push(funct ion(e,t,n, i,a,r){ret urn functi on(o){s(e, t,n,i,a,r, o)}}(e,i," view",i.id ,a,r))}if( i.fields)f or(var o i n i.fields )if(i.fiel ds[o].temp lates)for( | |
| 30 | var a in i .fields[o] .templates ){var r=i. fields[o]. templates[ a];t.push( function(e ,t,n,i,a,r ){return f unction(o) {s(e,t,n,i ,a,r,o)}}( e,i,"field ",o,a,r))} if(i.layou t&&i.layou t.template ){var r=i. layout.tem plate;t.pu sh(functio n(e,t,n,i, a,r){retur n function (o){s(e,t, n,i,a,r,o) }}(e,i,"la yout","lay out","layo utTemplate ",r))}if(i .globalTem plate){var r=i.globa lTemplate; t.push(fun ction(e,t, n,i,a,r){r eturn func tion(o){s( e,t,n,i,a, r,o)}}(e,i ,"global", "global"," globalTemp late",r))} }for(var l =t.length, u=0;u<t.le ngth;u++)t [u](l)},c= function() {var e={}, n=0;t.norm alizedView s||(t.norm alizedView s={}),a.no rmalizedVi ews=t.norm alizedView s;for(var r in a.vie ws)if(!t.n ormalizedV iews[r]){v ar l=new t .Normalize dView(r);i f(!l.norma lize(a.vie ws))return t.throwEr rorWithCal lback("Vie w normaliz ation fail ed, cannot initializ e Alpaca. Please ch eck the er ror logs." ,i);e[r]=l ,n++}n>0?u (e):o(e)}; c()},getTe mplateDesc riptor:fun ction(e,n, i){var a=n ull,r=null ,o=null;if (e.templat es&&e.temp lates[n]){ o=t.makeCa cheKey(e.i d,"view",e .id,n);var l=e.templ ates[n];t. isObject(l )&&l.cache Key&&(o=l. cacheKey)} if(i&&i.pa th){var s= i.path;if( e&&e.field s&&s&&s.le ngth>1){va r u=functi on(i,a,r){ if(a!=i.le ngth){var o=i.slice( ),l=!1,s=i [a],c=s.in dexOf("[") ;c>-1&&(s= s.substrin g(0,c),l=! 0),o[a]=s; var d=o.jo in("/");if (e.fields[ d]&&e.fiel ds[d].temp lates&&e.f ields[d].t emplates[n ]){var p=t .makeCache Key(e.id," field",d,n );p&&r.pus h({path:d, cacheKey:p })}u(i,a+1 ,r),l&&u(o ,a+1,r)}}, c=s.split( "/"),d=[]; u(c,0,d),d .length>0& &(o=d[0].c acheKey)}} if("global Template"! ==n&&"glob al"!==n||( o=t.makeCa cheKey(e.i d,"global" ,"global", "globalTem plate"))," layoutTemp late"!==n& &"layout"! ==n||(o=t. makeCacheK ey(e.id,"l ayout","la yout","lay outTemplat e")),o){fo r(var p=t. TemplateEn gineRegist ry.ids(),h =0;h<p.len gth;h++){v ar f=p[h], m=t.Templa teEngineRe gistry.fin d(f);if(m. isCached(o )){r=f;bre ak}}r&&(a= {engine:r, cacheKey:o })}return a},tmpl:fu nction(e,n ){var i=t. tmplHtml(e ,n);return t.safeDom Parse(i)}, tmplHtml:f unction(e, n){n||(n={ });var i=e .engine,a= t.Template EngineRegi stry.find( i);if(!a)r eturn t.th rowDefault Error("Can not find t emplate en gine for t ype: "+i); var r=e.ca cheKey,o=a .execute(r ,n,functio n(e){var n =JSON.stri ngify(e);r eturn e.me ssage&&(n= e.message) ,t.throwDe faultError ("The comp iled templ ate: "+r+" failed to execute: "+n)});ret urn o}}),t .DEBUG=0,t .INFO=1,t. WARN=2,t.E RROR=3,t.l ogLevel=t. WARN,t.log Debug=func tion(e){t. log(t.DEBU G,e)},t.lo gInfo=func tion(e){t. log(t.INFO ,e)},t.log Warn=funct ion(e){t.l og(t.WARN, e)},t.logE rror=funct ion(e){t.l og(t.ERROR ,e)},t.LOG _METHOD_MA P={0:"debu g",1:"info ",2:"warn" ,3:"error" },t.log=fu nction(e,n ){if(t.log Level<=e){ var i=t.LO G_METHOD_M AP[e];"und efined"!=t ypeof cons ole&&conso le[i]&&("d ebug"===i? console.de bug(n):"in fo"===i?co nsole.info (n):"warn" ===i?conso le.warn(n) :"error"== =i?console .error(n): console.lo g(n))}},t. checked=fu nction(e,n ){return t .attrProp( e,"checked ",n)},t.di sabled=fun ction(e,n) {return t. attrProp(e ,"disabled ",n)},t.at trProp=fun ction(t,n, i){return" undefined" !=typeof i &&(e(t).pr op?e(t).pr op(n,i):i? e(t).attr( n,i):e(t). removeAttr (n)),e(t). prop?e(t). prop(n):e( t).attr(n) },t.loadRe fSchemaOpt ions=funct ion(e,n,i) {if(n)if(" #"===n)i(e .schema,e. options);e lse if(0== =n.indexOf ("#/")){fo r(var a=n. substring( 2),r=a.spl it("/"),o= e.schema,l =0;l<r.len gth;l++){v ar s=r[l]; if(o[s])o= o[s];else if(o.prope rties&&o.p roperties[ s])o=o.pro perties[s] ;else{if(! o.definiti ons||!o.de finitions[ s]){o=null ;break}o=o .definitio ns[s]}}for (var u=e.o ptions,l=0 ;l<r.lengt h;l++){var s=r[l];if (u[s])u=u[ s];else if (u.fields& &u.fields[ s])u=u.fie lds[s];els e{if(!u.de finitions| |!u.defini tions[s]){ u=null;bre ak}u=u.def initions[s ]}}i(o,u)} else if(0= ==n.indexO f("#")){va r c=t.reso lveReferen ce(e.schem a,e.option s,n);c?i(c .schema,c. options):i ()}else{va r d=t.path Parts(n);e .connector .loadRefer enceSchema (d.path,fu nction(n){ e.connecto r.loadRefe renceOptio ns(d.path, function(e ){if(d.id) {var a=t.r esolveRefe rence(n,e, d.id);a&&( n=a.schema ,e=a.optio ns)}i(n,e) },function (){i(n)})} ,function( ){i()})}el se i()},t. DEFAULT_ER ROR_CALLBA CK=functio n(e){if(e& &e.message )throw t.l ogError(JS ON.stringi fy(e)),new Error("Al paca caugh t an error with the default er ror handle r: "+JSON. stringify( e))},t.def aultErrorC allback=t. DEFAULT_ER ROR_CALLBA CK,t.throw DefaultErr or=functio n(e){e&&t. isObject(e )&&(e=JSON .stringify (e));var n ={message: e};t.defau ltErrorCal lback(n)}, t.throwErr orWithCall back=funct ion(e,n){e &&t.isObje ct(e)&&(e= JSON.strin gify(e));v ar i={mess age:e};n?n (i):t.defa ultErrorCa llback(i)} ,t.resolve Reference= function(e ,n,i){if(e .id===i||" #"+e.id=== i){var a={ };return e &&(a.schem a=e),n&&(a .options=n ),a}if(e.p roperties) for(var r in e.prope rties){var o=e.prope rties[r],l =null;n&&n .fields&&n .fields[r] &&(l=n.fie lds[r]);va r s=t.reso lveReferen ce(o,l,i); if(s)retur n s}else i f(e.items) {var o=e.i tems,l=nul l;n&&n.ite ms&&(l=n.i tems);var s=t.resolv eReference (o,l,i);if (s)return s}return n ull},e.alp aca=window .Alpaca=t, e.fn.alpac a=function (){var n=t .makeArray (arguments ),i=[].con cat(this,n ),a=t.appl y(this,i); return"und efined"==t ypeof a&&( a=e(this)) ,a},e.fn.o uterHTML=f unction(t) {return t? e("<div></ div>").app end(this). html():e(" <div></div >").append (this.clon e()).html( )},e.fn.sw apWith=fun ction(t){r | |
| 31 | eturn this .each(func tion(){var n=e(t).cl one(),i=e( this).clon e();e(t).r eplaceWith (i),e(this ).replaceW ith(n)})}, e.fn.attrP rop=functi on(n,i){re turn t.att rProp(e(th is),n,i)}, e.event.sp ecial.dest royed={rem ove:functi on(e){e.ha ndler&&e.h andler()}} ,t.pathPar ts=functio n(e){if("s tring"!=ty peof e)ret urn e;var n=e,i=null ,a=n.index Of("#");a> -1&&(i=n.s ubstring(a +1),n=n.su bstring(0, a)),t.ends With(n,"/" )&&(n=n.su bstring(0, n.length-1 ));var r={ };return r .path=n,i& &(r.id=i), r},t.resol veField=fu nction(e,n ){var i=nu ll;if("str ing"==type of n)if(0= ==n.indexO f("#/")&&p ropertyId. length>2); else if("# "===n||"#/ "===n)i=e; else if(0= ==n.indexO f("#")){fo r(var a=e; a.parent;) a=a.parent ;var r=n.s ubstring(1 );i=t.reso lveFieldBy Reference( a,r)}else i=e.childr enByProper tyId[n];re turn i},t. resolveFie ldByRefere nce=functi on(e,n){if (e.schema& &e.schema. id==n)retu rn e;if(e. children&& e.children .length>0) for(var i= 0;i<e.chil dren.lengt h;i++){var a=e.child ren[i],r=t .resolveFi eldByRefer ence(a,n); if(r)retur n r}return null},t.a nyEquality =function( e,n){var i ={};if("ob ject"==typ eof e||t.i sArray(e)) for(var a in e)i[e[a ]]=!0;else i[e]=!0;v ar r=!1;if ("object"= =typeof n| |t.isArray (n))for(va r a in n){ var o=n[a] ;if(i[o]){ r=!0;break }}else r=i [n];return r},t.seri es=functio n(e,t){asy nc.series( e,function (){t()})}, t.parallel =function( e,t){async .parallel( e,function (){t()})}, t.nextTick =function( e){async.n extTick(fu nction(){e ()})},t.co mpileValid ationConte xt=functio n(e,t){var n=[],i=e; do i.isVal idationPar ticipant() ||(i=null) ,i&&n.push (i),i&&(i= i.parent); while(i);n .reverse() ;var a=[], r=function (e,t,n){if (!e||0===e .length)re turn n();v ar i=e[0], a={};a.id= i.getId(), a.field=i, a.path=i.p ath;var o= i.isValid( );i.isCont ainer()&&( o=i.isVali d(!0)),a.b efore=o;va r l=functi on(e,n,i){ var a=e._p reviouslyV alidated;e .validate( ),e._valid ateCustomV alidator(f unction(){ var r=e.is Valid();e. isContaine r()&&(r=e. isValid(!0 )),n.after =r,n.valid ated=!1,n. invalidate d=!1,!o&&r ?n.validat ed=!0:o&&! r?n.invali dated=!0:a ||r||(n.in validated= !0),n.cont ainer=e.is Container( ),n.valid= n.after,t. push(n),i( )})};if(e. length>1){ var s=e.sl ice(0);s.s hift(),r(s ,t,functio n(){l(i,a, function() {n()})})}e lse l(i,a, function() {n()})};r( n,a,functi on(){t(a)} )},t.updat eValidatio nStateForC ontext=fun ction(e,n) {for(var i =0;i<n.len gth;i++){v ar a=n[i], r=a.field; if(r.getFi eldEl().re moveClass( "alpaca-in valid alpa ca-invalid -hidden al paca-valid "),r.fireC allback("c learValidi ty"),a.val id)r.getFi eldEl().ad dClass("al paca-field -valid"),r .fireCallb ack("valid ");else if (!r.option s.readonly ||t.showRe adOnlyInva lidState){ var o=!1;r .hideInitV alidationE rror&&(o=! 0),r.fireC allback("i nvalid",o) ,r.getFiel dEl().addC lass("alpa ca-invalid "),o&&r.ge tFieldEl() .addClass( "alpaca-in valid-hidd en")}else t.logWarn( "The field (id="+r.g etId()+", title="+r. getTitle() +", path=" +r.path+") is invali d and also read-only ");if(a.va lidated?t. later(25,t his,functi on(){r.tri gger("vali dated")}): a.invalida ted&&t.lat er(25,this ,function( ){r.trigge r("invalid ated")}),r .options.s howMessage s&&!r.init ializing&& (!r.option s.readonly ||t.showRe adOnlyInva lidState)) {var l=[]; for(var s in r.valid ation)r.va lidation[s ].status|| l.push({id :s,message :r.validat ion[s].mes sage});r.d isplayMess age(l,r.va lid)}}},t. fieldApply FieldAndCh ildren=fun ction(e,n) {if(n(e),e .children& &e.childre n.length>0 )for(var i =0;i<e.chi ldren.leng th;i++)t.f ieldApplyF ieldAndChi ldren(e.ch ildren[i], n)},t.repl aceAll=fun ction(e,t, n){return e.replace( new RegExp (t,"g"),n) },t.asArra y=function (e){if(!t. isArray(e) ){var n=[] ;return n. push(e),n} return e}, function() {function e(e){var t =!1;return function( ){if(t)thr ow new Err or("Callba ck was alr eady calle d.");t=!0, e.apply(i, arguments) }}function t(e){retu rn e.const ructor===S tring?"str ing":e.con structor== =Boolean?" boolean":e .construct or===Numbe r?isNaN(e) ?"nan":"nu mber":"und efined"==t ypeof e?"u ndefined": null===e?" null":e in stanceof A rray?"arra y":e insta nceof Date ?"date":e instanceof RegExp?"r egexp":"ob ject"==typ eof e?"obj ect":e ins tanceof Fu nction?"fu nction":vo id 0}funct ion n(e,n, i){var a=t (e);return a?"functi on"===t(n[ a])?n[a].a pply(n,i): n[a]:void 0}var i,a, r={};i=thi s,null!=i& &(a=i.asyn c),r.noCon flict=func tion(){ret urn i.asyn c=a,r};var o=functio n(e,t){if( e.forEach) return e.f orEach(t); for(var n= 0;n<e.leng th;n+=1)t( e[n],n,e)} ,l=functio n(e,t){if( e.map)retu rn e.map(t );var n=[] ;return o( e,function (e,i,a){n. push(t(e,i ,a))}),n}, s=function (e,t,n){re turn e.red uce?e.redu ce(t,n):(o (e,functio n(e,i,a){n =t(n,e,i,a )}),n)},u= function(e ){if(Objec t.keys)ret urn Object .keys(e);v ar t=[];fo r(var n in e)e.hasOw nProperty( n)&&t.push (n);return t};"undef ined"!=typ eof proces s&&process .nextTick? (r.nextTic k=process. nextTick," undefined" !=typeof s etImmediat e?r.setImm ediate=fun ction(e){s etImmediat e(e)}:r.se tImmediate =r.nextTic k):"functi on"==typeo f setImmed iate?(r.ne xtTick=fun ction(e){s etImmediat e(e)},r.se tImmediate =r.nextTic k):(r.next Tick=funct ion(e){set Timeout(e, 0)},r.setI mmediate=r .nextTick) ,r.each=fu nction(t,n ,i){if(i=i ||function (){},!t.le ngth)retur n i();var a=0;o(t,fu nction(r){ n(r,e(func tion(e){e? (i(e),i=fu nction(){} ):(a+=1,a> =t.length& &i(null))} ))})},r.fo rEach=r.ea ch,r.eachS eries=func tion(e,t,n ){if(n=n|| function() {},!e.leng th)return n();var i= | |
| 32 | 0,a=functi on(){t(e[i ],function (t){t?(n(t ),n=functi on(){}):(i +=1,i>=e.l ength?n(nu ll):a())}) };a()},r.f orEachSeri es=r.eachS eries,r.ea chLimit=fu nction(e,t ,n,i){var a=c(t);a.a pply(null, [e,n,i])}, r.forEachL imit=r.eac hLimit;var c=functio n(e){retur n function (t,n,i){if (i=i||func tion(){},! t.length|| 0>=e)retur n i();var a=0,r=0,o= 0;!functio n l(){if(a >=t.length )return i( );for(;e>o &&r<t.leng th;)r+=1,o +=1,n(t[r- 1],functio n(e){e?(i( e),i=funct ion(){}):( a+=1,o-=1, a>=t.lengt h?i():l()) })}()}},d= function(e ){return f unction(){ var t=Arra y.prototyp e.slice.ca ll(argumen ts);return e.apply(n ull,[r.eac h].concat( t))}},p=fu nction(e,t ){return f unction(){ var n=Arra y.prototyp e.slice.ca ll(argumen ts);return t.apply(n ull,[c(e)] .concat(n) )}},h=func tion(e){re turn funct ion(){var t=Array.pr ototype.sl ice.call(a rguments); return e.a pply(null, [r.eachSer ies].conca t(t))}},f= function(e ,t,n,i){va r a=[];t=l (t,functio n(e,t){ret urn{index: t,value:e} }),e(t,fun ction(e,t) {n(e.value ,function( n,i){a[e.i ndex]=i,t( n)})},func tion(e){i( e,a)})};r. map=d(f),r .mapSeries =h(f),r.ma pLimit=fun ction(e,t, n,i){retur n m(t)(e,n ,i)};var m =function( e){return p(e,f)};r. reduce=fun ction(e,t, n,i){r.eac hSeries(e, function(e ,i){n(t,e, function(e ,n){t=n,i( e)})},func tion(e){i( e,t)})},r. inject=r.r educe,r.fo ldl=r.redu ce,r.reduc eRight=fun ction(e,t, n,i){var a =l(e,funct ion(e){ret urn e}).re verse();r. reduce(a,t ,n,i)},r.f oldr=r.red uceRight;v ar g=funct ion(e,t,n, i){var a=[ ];t=l(t,fu nction(e,t ){return{i ndex:t,val ue:e}}),e( t,function (e,t){n(e. value,func tion(n){n& &a.push(e) ,t()})},fu nction(e){ i(l(a.sort (function( e,t){retur n e.index- t.index}), function(e ){return e .value}))} )};r.filte r=d(g),r.f ilterSerie s=h(g),r.s elect=r.fi lter,r.sel ectSeries= r.filterSe ries;var v =function( e,t,n,i){v ar a=[];t= l(t,functi on(e,t){re turn{index :t,value:e }}),e(t,fu nction(e,t ){n(e.valu e,function (n){n||a.p ush(e),t() })},functi on(e){i(l( a.sort(fun ction(e,t) {return e. index-t.in dex}),func tion(e){re turn e.val ue}))})};r .reject=d( v),r.rejec tSeries=h( v);var b=f unction(e, t,n,i){e(t ,function( e,t){n(e,f unction(n) {n?(i(e),i =function( ){}):t()}) },function (e){i()})} ;r.detect= d(b),r.det ectSeries= h(b),r.som e=function (e,t,n){r. each(e,fun ction(e,i) {t(e,funct ion(e){e&& (n(!0),n=f unction(){ }),i()})}, function(e ){n(!1)})} ,r.any=r.s ome,r.ever y=function (e,t,n){r. each(e,fun ction(e,i) {t(e,funct ion(e){e|| (n(!1),n=f unction(){ }),i()})}, function(e ){n(!0)})} ,r.all=r.e very,r.sor tBy=functi on(e,t,n){ r.map(e,fu nction(e,n ){t(e,func tion(t,i){ t?n(t):n(n ull,{value :e,criteri a:i})})},f unction(e, t){if(e)re turn n(e); var i=func tion(e,t){ var n=e.cr iteria,i=t .criteria; return i>n ?-1:n>i?1: 0};n(null, l(t.sort(i ),function (e){return e.value}) )})},r.aut o=function (e,t){t=t| |function( ){};var n= u(e);if(!n .length)re turn t(nul l);var i={ },a=[],l=f unction(e) {a.unshift (e)},c=fun ction(e){f or(var t=0 ;t<a.lengt h;t+=1)if( a[t]===e)r eturn void a.splice( t,1)},d=fu nction(){o (a.slice(0 ),function (e){e()})} ;l(functio n(){u(i).l ength===n. length&&(t (null,i),t =function( ){})}),o(n ,function( n){var a=e [n]instanc eof Functi on?[e[n]]: e[n],p=fun ction(e){v ar a=Array .prototype .slice.cal l(argument s,1);if(a. length<=1& &(a=a[0]), e){var l={ };o(u(i),f unction(e) {l[e]=i[e] }),l[n]=a, t(e,l),t=f unction(){ }}else i[n ]=a,r.setI mmediate(d )},h=a.sli ce(0,Math. abs(a.leng th-1))||[] ,f=functio n(){return s(h,funct ion(e,t){r eturn e&&i .hasOwnPro perty(t)}, !0)&&!i.ha sOwnProper ty(n)};if( f())a[a.le ngth-1](p, i);else{va r m=functi on(){f()&& (c(m),a[a. length-1]( p,i))};l(m )}})},r.wa terfall=fu nction(e,t ){if(t=t|| function() {},e.const ructor!==A rray){var n=new Erro r("First a rgument to waterfall must be a n array of functions ");return t(n)}if(!e .length)re turn t();v ar i=funct ion(e){ret urn functi on(n){if(n )t.apply(n ull,argume nts),t=fun ction(){}; else{var a =Array.pro totype.sli ce.call(ar guments,1) ,o=e.next( );o?a.push (i(o)):a.p ush(t),r.s etImmediat e(function (){e.apply (null,a)}) }}};i(r.it erator(e)) ()};var y= function(e ,t,n){if(n =n||functi on(){},t.c onstructor ===Array)e .map(t,fun ction(e,t) {e&&e(func tion(e){va r n=Array. prototype. slice.call (arguments ,1);n.leng th<=1&&(n= n[0]),t.ca ll(null,e, n)})},n);e lse{var i= {};e.each( u(t),funct ion(e,n){t [e](functi on(t){var a=Array.pr ototype.sl ice.call(a rguments,1 );a.length <=1&&(a=a[ 0]),i[e]=a ,n(t)})},f unction(e) {n(e,i)})} };r.parall el=functio n(e,t){y({ map:r.map, each:r.eac h},e,t)},r .parallelL imit=funct ion(e,t,n) {y({map:m( t),each:c( t)},e,n)}, r.series=f unction(e, t){if(t=t| |function( ){},e.cons tructor=== Array)r.ma pSeries(e, function(e ,t){e&&e(f unction(e) {var n=Arr ay.prototy pe.slice.c all(argume nts,1);n.l ength<=1&& (n=n[0]),t .call(null ,e,n)})},t );else{var n={};r.ea chSeries(u (e),functi on(t,i){e[ t](functio n(e){var a =Array.pro totype.sli ce.call(ar guments,1) ;a.length< =1&&(a=a[0 ]),n[t]=a, i(e)})},fu nction(e){ t(e,n)})}} ,r.iterato r=function (e){var t= function(n ){var i=fu nction(){r eturn e.le ngth&&e[n] .apply(nul l,argument s),i.next( )};return i.next=fun ction(){re turn n<e.l ength-1?t( n+1):null} ,i};return t(0)},r.a pply=funct ion(e){var t=Array.p rototype.s lice.call( arguments, 1);return function() {return e. apply(null ,t.concat( Array.prot otype.slic e.call(arg uments)))} };var w=fu nction(e,t ,n,i){var a=[];e(t,f unction(e, t){n(e,fun ction(e,n) {a=a.conca t(n||[]),t (e)})},fun ction(e){i (e,a)})};r | |
| 33 | .concat=d( w),r.conca tSeries=h( w),r.whils t=function (e,t,n){e( )?t(functi on(i){retu rn i?n(i): void r.whi lst(e,t,n) }):n()},r. doWhilst=f unction(e, t,n){e(fun ction(i){r eturn i?n( i):void(t( )?r.doWhil st(e,t,n): n())})},r. until=func tion(e,t,n ){e()?n(): t(function (i){return i?n(i):vo id r.until (e,t,n)})} ,r.doUntil =function( e,t,n){e(f unction(i) {return i? n(i):void( t()?n():r. doUntil(e, t,n))})},r .queue=fun ction(t,n) {function i(e,t,i,a) {t.constru ctor!==Arr ay&&(t=[t] ),o(t,func tion(t){va r o={data: t,callback :"function "==typeof a?a:null}; i?e.tasks. unshift(o) :e.tasks.p ush(o),e.s aturated&& e.tasks.le ngth===n&& e.saturate d(),r.setI mmediate(e .process)} )}void 0== =n&&(n=1); var a=0,l= {tasks:[], concurrenc y:n,satura ted:null,e mpty:null, drain:null ,push:func tion(e,t){ i(l,e,!1,t )},unshift :function( e,t){i(l,e ,!0,t)},pr ocess:func tion(){if( a<l.concur rency&&l.t asks.lengt h){var n=l .tasks.shi ft();l.emp ty&&0===l. tasks.leng th&&l.empt y(),a+=1;v ar i=funct ion(){a-=1 ,n.callbac k&&n.callb ack.apply( n,argument s),l.drain &&l.tasks. length+a== =0&&l.drai n(),l.proc ess()},r=e (i);t(n.da ta,r)}},le ngth:funct ion(){retu rn l.tasks .length},r unning:fun ction(){re turn a}};r eturn l},r .cargo=fun ction(e,t) {var n=!1, i=[],a={ta sks:i,payl oad:t,satu rated:null ,empty:nul l,drain:nu ll,push:fu nction(e,n ){e.constr uctor!==Ar ray&&(e=[e ]),o(e,fun ction(e){i .push({dat a:e,callba ck:"functi on"==typeo f n?n:null }),a.satur ated&&i.le ngth===t&& a.saturate d()}),r.se tImmediate (a.process )},process :function s(){if(!n) {if(0===i. length)ret urn void(a .drain&&a. drain());v ar r="numb er"==typeo f t?i.spli ce(0,t):i. splice(0), u=l(r,func tion(e){re turn e.dat a});a.empt y&&a.empty (),n=!0,e( u,function (){n=!1;va r e=argume nts;o(r,fu nction(t){ t.callback &&t.callba ck.apply(n ull,e)}),s ()})}},len gth:functi on(){retur n i.length },running: function() {return n} };return a };var x=fu nction(e){ return fun ction(t){v ar n=Array .prototype .slice.cal l(argument s,1);t.app ly(null,n. concat([fu nction(t){ var n=Arra y.prototyp e.slice.ca ll(argumen ts,1);"und efined"!=t ypeof cons ole&&(t?co nsole.erro r&&console .error(t): console[e] &&o(n,func tion(t){co nsole[e](t )}))}]))}} ;r.log=x(" log"),r.di r=x("dir") ,r.memoize =function( e,t){var n ={},i={};t =t||functi on(e){retu rn e};var a=function (){var a=A rray.proto type.slice .call(argu ments),r=a .pop(),o=t .apply(nul l,a);o in n?r.apply( null,n[o]) :o in i?i[ o].push(r) :(i[o]=[r] ,e.apply(n ull,a.conc at([functi on(){n[o]= arguments; var e=i[o] ;delete i[ o];for(var t=0,a=e.l ength;a>t; t++)e[t].a pply(null, arguments) }])))};ret urn a.memo =n,a.unmem oized=e,a} ,r.unmemoi ze=functio n(e){retur n function (){return( e.unmemoiz ed||e).app ly(null,ar guments)}} ,r.times=f unction(e, t,n){for(v ar i=[],a= 0;e>a;a++) i.push(a); return r.m ap(i,t,n)} ,r.timesSe ries=funct ion(e,t,n) {for(var i =[],a=0;e> a;a++)i.pu sh(a);retu rn r.mapSe ries(i,t,n )},r.compo se=functio n(){var e= Array.prot otype.reve rse.call(a rguments); return fun ction(){va r t=this,n =Array.pro totype.sli ce.call(ar guments),i =n.pop();r .reduce(e, n,function (e,n,i){n. apply(t,e. concat([fu nction(){v ar e=argum ents[0],t= Array.prot otype.slic e.call(arg uments,1); i(e,t)}])) },function (e,n){i.ap ply(t,[e]. concat(n)) })}};var E =function( e,t){var n =function( ){var n=th is,i=Array .prototype .slice.cal l(argument s),a=i.pop ();return e(t,functi on(e,t){e. apply(n,i. concat([t] ))},a)};if (arguments .length>2) {var i=Arr ay.prototy pe.slice.c all(argume nts,2);ret urn n.appl y(this,i)} return n}; r.applyEac h=d(E),r.a pplyEachSe ries=h(E), r.forever= function(e ,t){functi on n(i){if (i){if(t)r eturn t(i) ;throw i}e (n)}n()},i .async=r;i .equiv=fun ction(){va r e,i=[],a =function( ){function n(e,t){re turn e ins tanceof t. constructo r||t insta nceof e.co nstructor? t==e:t===e }return{st ring:n,"bo olean":n,n umber:n,"n ull":n,und efined:n,n an:functio n(e){retur n isNaN(e) },date:fun ction(e,n) {return"da te"===t(e) &&n.valueO f()===e.va lueOf()},r egexp:func tion(e,n){ return"reg exp"===t(e )&&n.sourc e===e.sour ce&&n.glob al===e.glo bal&&n.ign oreCase=== e.ignoreCa se&&n.mult iline===e. multiline} ,"function ":function (){var e=i [i.length- 1];return e!==Object &&"undefin ed"!=typeo f e},array :function( n,i){var a ,r;if("arr ay"!==t(n) )return!1; if(r=i.len gth,r!==n. length)ret urn!1;for( a=0;r>a;a+ +)if(!e(i[ a],n[a]))r eturn!1;re turn!0},ob ject:funct ion(t,n){v ar a,r=!0, o=[],l=[]; if(n.const ructor!==t .construct or)return! 1;i.push(n .construct or);for(a in n)o.pus h(a),e(n[a ],t[a])||( r=!1);i.po p();for(a in t)l.pus h(a);retur n r&&e(o.s ort(),l.so rt())}}}() ;return e= function() {var e=Arr ay.prototy pe.slice.a pply(argum ents);retu rn e.lengt h<2?!0:fun ction(e,i) {return e= ==i?!0:nul l===e||nul l===i||"un defined"== typeof e|| "undefined "==typeof i||t(e)!== t(i)?!1:n( e,a,[i,e]) }(e[0],e[1 ])&&argume nts.callee .apply(thi s,e.splice (1,e.lengt h-1))}}()} (),t.MARKE R_CLASS_CO NTROL_FIEL D="alpaca- marker-con trol-field ",t.MARKER _CLASS_CON TAINER_FIE LD="alpaca -marker-co ntainer-fi eld",t.MAR KER_CLASS_ CONTAINER_ FIELD_ITEM ="alpaca-m arker-cont rol-field- item",t.MA RKER_DATA_ CONTAINER_ FIELD_ITEM _KEY="data -alpaca-co ntainer-fi eld-item-k ey",t.MARK ER_CLASS_F ORM_ITEMS_ FIELD="alp aca-marker -form-item s-field",t .CLASS_CON TAINER="al paca-conta iner",t.CL ASS_CONTRO L="alpaca- control",t .MARKER_CL ASS_INSERT ="alpaca-m arker-inse rt",t.MARK ER_DATA_IN SERT_KEY=" data-alpac a-marker-i nsert-key" ,t.MARKER_ CLASS_ARRA Y_TOOLBAR= | |
| 34 | "alpaca-ma rker-array -field-too lbar",t.MA RKER_DATA_ ARRAY_TOOL BAR_FIELD_ ID="data-a lpaca-arra y-field-to olbar-fiel d-id",t.MA RKER_CLASS _ARRAY_ITE M_ACTIONBA R="alpaca- marker-arr ay-field-i tem-action bar",t.MAR KER_DATA_A RRAY_ITEM_ KEY="data- alpaca-mar ker-array- field-item -key",t.MA RKER_DATA_ ARRAY_ITEM _PARENT_FI ELD_ID="da ta-alpaca- marker-arr ay-field-i tem-parent -field-id" ,t.MARKER_ CLASS_CONT AINER_FIEL D_ITEM_FIE LD="alpaca -marker-co ntainer-fi eld-item-f ield",t.ma keCacheKey =function( e,t,n,i){r eturn e+": "+t+":"+n+ ":"+i},t.s plitCacheK ey=functio n(e){var t ={},n=e.in dexOf(":") ,i=e.lastI ndexOf(":" );t.viewId =e.substri ng(0,n),t. templateId =e.substri ng(i+1);va r a=e.subs tring(n+1, i),r=a.ind exOf(":"); return t.s copeType=a .substring (0,r),t.sc opeId=a.su bstring(r+ 1),t},t.cr eateEmptyD ataInstanc e=function (e){return e?"object "===e.type ?{}:"array "===e.type ?[]:"numbe r"===e.typ e?-1:"bool ean"===e.t ype?!1:"": ""},t.anim atedSwap=f unction(t, n,i,a){"fu nction"==t ypeof i&&( a=i,i=500) ;var r=fun ction(t,n, i,a){var r =e(t),o=e( n),l=r.off set(),s=o. offset(),u =r.clone() ,c=o.clone (),d=s.top +o.height( )-l.top,p= 0,h=0,f=s. left+o.wid th()-l.lef t,m=0,g=0; r.css("opa city",0),o .css("opac ity",0),u. insertAfte r(r).css({ position:" absolute", width:r.ou terWidth() ,height:r. outerHeigh t()}).offs et(l).css( "z-index", "999"),c.i nsertAfter (o).css({p osition:"a bsolute",w idth:o.out erWidth(), height:o.o uterHeight ()}).offse t(s).css(" z-index"," 999"),l.to p!==s.top& &(p=d-r.he ight()),h= d-o.height (),l.left! ==s.left&& (m=f-r.wid th()),g=f- o.width(), u.animate( {top:"+="+ p+"px",lef t:"+="+m+" px"},i,fun ction(){o. css("opaci ty",1),e(t his).remov e()}),c.an imate({top :"-="+h+"p x",left:"- ="+g+"px"} ,i,functio n(){r.css( "opacity", 1),e(this) .remove()} ),window.s etTimeout( function() {u.remove( ),c.remove (),a()},i+ 1)};r(t,n, i,a)},t.an imatedMove =function( t,n,i,a){" function"= =typeof i& &(a=i,i=50 0);var r=f unction(t, n,i,a){var r=e(t),o= e(n),l=r.o ffset(),s= o.offset() ,u=r.clone (),c=s.top +o.height( )-l.top,d= 0,p=0,h=s. left+o.wid th()-l.lef t,f=0,m=0; r.css("opa city",0),o .css("opac ity",0),u. insertAfte r(r).css({ position:" absolute", width:r.ou terWidth() ,height:r. outerHeigh t()}).offs et(l).css( "z-index", "999"),l.t op!==s.top &&(d=c-r.h eight()),p =c-o.heigh t(),l.left !==s.left& &(f=h-r.wi dth()),m=h -o.width() ,u.animate ({top:"+=" +d+"px",le ft:"+="+f+ "px"},i,fu nction(){o .css("opac ity",1),e( this).remo ve()}),win dow.setTim eout(funct ion(){u.re move(),a() },i+1)};r( t,n,i,a)}, t.fireRead y=function (e){if(e.c hildren&&e .children. length>0)f or(var n=0 ;n<e.child ren.length ;n++)t.fir eReady(e.c hildren[n] );e.trigge r("ready") },t.readCo okie=funct ion(e){fun ction t(e) {for(var t =e+"=",n=d ocument.co okie.split (";"),i=0; i<n.length ;i++){for( var a=n[i] ;" "==a.ch arAt(0);)a =a.substri ng(1,a.len gth);if(0= =a.indexOf (t))return a.substri ng(t.lengt h,a.length )}return n ull}var n= null;retur n"undefine d"!=typeof document& &(n=t(e)), n},t.safeS etObjectAr ray=functi on(e,t,n){ "undefined "==typeof e[t]||null ===e[t]?e[ t]=[]:e[t] .length=0; for(var i= 0;i<n.leng th;i++)e[t ].push(n[i ])},t.inAr ray=functi on(t,n){re turn e.inA rray(n,t)> -1},t.inde xOf=functi on(t,n){re turn e.inA rray(n,t)} ,t.moment= function() {if(t._mom ent||windo w.moment&& (t._moment =window.mo ment),!t._ moment)thr ow new Err or("The mo ment.js li brary has not been i ncluded, c annot prod uce moment object"); return t._ moment.cal l(this,arg uments)},t .CSRF_TOKE N=null,t.C SRF_COOKIE _NAMES=["C SRF-TOKEN" ,"XSRF-TOK EN"],t.CSR F_HEADER_N AME="X-CSR F-TOKEN",t .defaultTo olbarStick y=void 0,t .showReadO nlyInvalid State=!1}( jQuery),fu nction(e){ var t=e.al paca;t.lis tenerId=fu nction(){v ar e=0;ret urn functi on(){retur n"listener -"+e++}}() ,t.subscri be=functio n(){var e= t.makeArra y(argument s),n=null, i=null,a=n ull;if(2== e.length?( n="global" ,i=e.shift (),a=e.shi ft()):(n=e .shift(),i =e.shift() ,a=e.shift ()),i&&t.i sObject(i) &&(i=i.pat h),!i)retu rn t.logEr ror("Missi ng observa ble subscr ibe id: "+ i),null;va r r=a._lfi d;r||(r=t. listenerId (),a._lfid =r);var o= function(e ){return f unction(){ return a.a pply(e,arg uments)}}( this);o._l fid=a._lfi d;var l=t. ScopedObse rvables.ge t(n),s=l.o bservable( i);return s.subscrib e(r,o),{sc ope:n,id:i ,listenerI d:r}},t.un subscribe= function() {var e=t.m akeArray(a rguments), n=null,i=n ull,a=null ;2==e.leng th?(n="glo bal",i=e.s hift(),a=e .shift()): 3==e.lengt h&&(n=e.sh ift(),i=e. shift(),a= e.shift()) ;var r=a;i f(t.isFunc tion(r)&&( r=r._lfid) ,i&&t.isOb ject(i)&&( i=i.path), !i)return t.logError ("Missing observable id: "+i), null;var o =t.ScopedO bservables .get(n),l= o.observab le(i);retu rn l.unsub scribe(r), {scope:n,i d:i,listen erId:r}},t .observabl e=function (){var e,n ,i=t.makeA rray(argum ents);if(1 ==i.length ?(e="globa l",n=i.shi ft()):2==i .length&&( e=i.shift( ),n=i.shif t()),n&&t. isObject(n )&&(n=n.pa th),n){var a=t.Scope dObservabl es.get(e); observable =a.observa ble(n)}els e t.logErr or("Missin g observab le id: "+J SON.string ify(i));re turn obser vable},t.c learObserv able=funct ion(){var e,n,i=t.ma keArray(ar guments);1 ==i.length ?(e="globa l",n=i.shi ft()):2==i .length&&( e=i.shift( ),n=i.shif t()),n&&t. isObject(n )&&(n=n.pa th),n||t.l ogError("M issing obs ervable id : "+JSON.s tringify(i ));var a=t .ScopedObs ervables.g et(e),r=a. observable (n);r.clea r()},t.dep endentObse rvable=fun ction(){va r e=null,n =null,i=nu ll,a=t.mak eArray(arg uments);if (2==a.leng | |
| 35 | th)e="glob al",n=a.sh ift(),i=a. shift();el se{if(3!=a .length)re turn void t.error("W rong numbe r of argum ents");e=a .shift(),n =a.shift() ,i=a.shift ()}n&&t.is Object(n)& &(n=n.path ),n||t.log Error("Mis sing obser vable id: "+JSON.str ingify(a)) ;var r=t.S copedObser vables.get (e);return r.depende ntObservab le(n,i)}}( jQuery),fu nction(e){ var t=e.al paca;t.Obs ervables=B ase.extend ({construc tor:functi on(e){this .base(),th is.scope=e ,this.obse rvables={} },observab le:functio n(e,n){if( !this.obse rvables[e] ){var i=ne w t.Observ able(this. scope,e);n &&i.set(n) ,this.obse rvables[e] =i}return this.obser vables[e]} ,dependent Observable :function( e,n){var i =this;if(! this.obser vables[e]) {var a=thi s.observab le(e),r=ne w t.Observ ables(this .scope);r. observable =function( e,t){var n =i.observa ble(e,t);r eturn n.ma rkDependen tOnUs(a),n };var o=fu nction(){r eturn n.ca ll(r)};a.s etValueFun ction(o)}r eturn this .observabl es[e]},obs ervables:f unction(){ return thi s.observab les}})}(jQ uery),func tion(e){va r t=e.alpa ca;t.Obser vable=Base .extend({c onstructor :function( t,n){this. base(),thi s.id=t+"-" +n,this.va lue=null,t his.subscr ibers={},t his.depend entOnUs={} ,this.noti fySubscrib ers=functi on(t){var n=this;e.e ach(this.s ubscribers ,function( e,i){i(n.v alue,t)})} ,this.noti fyDependen ts=functio n(t){e.eac h(this.dep endentOnUs ,function( e,t){t.onD ependencyC hange(); | |
| 36 | })},this.v alueFuncti on=null},s etValueFun ction:func tion(e){th is.valueFu nction=e,t his.onDepe ndencyChan ge()},subs cribe:func tion(e,t){ this.isSub scribed(e) ||(this.su bscribers[ e]=t)},uns ubscribe:f unction(e) {delete th is.subscri bers[e]},i sSubscribe d:function (e){return !!this.sub scribers[e ]},markDep endentOnUs :function( e){this.de pendentOnU s[e.id]=e} ,onDepende ncyChange: function() {var e=thi s.get();if (this.valu eFunction) {var t=thi s.valueFun ction();e! =t&&this.s et(t)}},se t:function (e){var t= this.value ;this.valu e=e,this.n otifyDepen dents(t),t his.notify Subscriber s(t)},get: function(e ){var t=th is.value;r eturn t||( t=e),t},cl ear:functi on(){var e =this.valu e;delete t his.value, this.notif yDependent s(e),this. notifySubs cribers(e) }})}(jQuer y),functio n(e){var t =e.alpaca; t.ScopedOb servables= {},t.Scope dObservabl es.map={}, t.ScopedOb servables. get=functi on(e){retu rn t.Scope dObservabl es.map[e]| |(t.Scoped Observable s.map[e]=n ew t.Obser vables(e)) ,t.ScopedO bservables .map[e]}}( jQuery),fu nction(){A lpaca.Temp lateEngine Registry=f unction(){ var e={};r eturn{regi ster:funct ion(t,n){e [t]=n,n.in it()},find :function( t){var n=n ull;if(e[t ])n=e[t];e lse for(va r i in e)f or(var a=e [i].suppor tedMimetyp es(),r=0;r <a.length; r++)if(t.t oLowerCase ()===a[r]. toLowerCas e()){n=e[i ];break}re turn n},id s:function (){var t=[ ];for(var n in e)t.p ush(n);ret urn t}}}() }(),functi on(e){Alpa ca.Abstrac tTemplateE ngine=Base .extend({c onstructor :function( t){this.ba se(),this. id=t,this. cleanup=fu nction(t){ return t&& 1===e(t).l ength&&"sc ript"===e( t)[0].node Name.toLow erCase()?e (t).html() :t}},compi le:functio n(t,n,i){v ar a=this, r="html";i f(Alpaca.i sString(n) ){var o=n. toLowerCas e();Alpaca .isUri(o)? r="uri":0! ==n.indexO f("#")&&0! ==n.indexO f(".")&&0! ==n.indexO f("[")||(r ="selector ")}if("sel ector"===r )a._compil e(t,n,func tion(e){i( e)});else if("uri"== =r){var l= a.fileExte nsion(),s= n;-1===s.i ndexOf("." +l)&&(s+=" ."+l),e.aj ax({url:s, dataType:" html",succ ess:functi on(e,n,r){ e=a.cleanu p(e),a._co mpile(t,e, function(e ){i(e)})}, error:func tion(e,t){ i({message :e.respons eText,xhr: e,code:t}, null)}})}e lse if("ht ml"===r){v ar u=n;u i nstanceof jQuery&&(u =e(u).oute rHTML()),a ._compile( t,u,functi on(e){i(e) })}else i( new Error( "Template engine can not determ ine how to handle ty pe: "+r))} ,_compile: function(e ,t,n){Alpa ca.isEmpty (t)&&(t="" ),t=Alpaca .trim(t),0 ===t.toLow erCase().i ndexOf("<s cript")||( t="<script type='"+t his.suppor tedMimetyp es()[0]+"' >"+t+"</sc ript>"),Al paca.logDe bug("Compi ling templ ate: "+thi s.id+", ca cheKey: "+ e+", templ ate: "+t), this.doCom pile(e,t,n )},doCompi le:functio n(e,t,n){} ,execute:f unction(e, t,n){Alpac a.logDebug ("Executin g template for cache key: "+e) ;var i=thi s.doExecut e(e,t,n);r eturn i=th is.cleanup (i)},doExe cute:funct ion(e,t,n) {return nu ll},fileEx tension:fu nction(){r eturn"html "},support edMimetype s:function (){return[ ]},isCache d:function (e){return !1},findCa cheKeys:fu nction(e){ return[]}} )}(jQuery) ,function( $,Handleba rs,Handleb arsPrecomp iled){var COMPILED_T EMPLATES={ },helpers= {};helpers .compare=f unction(e, t,n){if(ar guments.le ngth<3)thr ow new Err or("Handle rbars Help er 'compar e' needs 2 parameter s");var i= n.hash.ope rator||"== ",a={"==": function(e ,t){return e==t},"== =":functio n(e,t){ret urn e===t} ,"!=":func tion(e,t){ return e!= t},"!==":f unction(e, t){return e!==t},"<" :function( e,t){retur n t>e},">" :function( e,t){retur n e>t},"<= ":function (e,t){retu rn t>=e}," >=":functi on(e,t){re turn e>=t} ,"typeof": function(e ,t){return typeof e= =t}};if(!a [i])throw new Error( "Handlerba rs Helper 'compare' doesn't kn ow the ope rator "+i) ;var r=a[i ](e,t);ret urn r?n.fn (this):n.i nverse(thi s)},helper s.ifnot=fu nction(e,t ){return e ?t.inverse (this):t.f n(this)},h elpers.tim es=functio n(e,t){for (var n="", i=0;e>i;++ i)n+=t.fn( i);return n},helpers .control=f unction(e) {return"<d iv class=' "+Alpaca.M ARKER_CLAS S_CONTROL_ FIELD+"'>< /div>"},he lpers.cont ainer=func tion(e){re turn"<div class='"+A lpaca.MARK ER_CLASS_C ONTAINER_F IELD+"'></ div>"},hel pers.item= function(e ,t){return Alpaca.is Object(e)& &(t=e,e="d iv"),"<"+e +" class=' "+Alpaca.M ARKER_CLAS S_CONTAINE R_FIELD_IT EM+"' "+Al paca.MARKE R_DATA_CON TAINER_FIE LD_ITEM_KE Y+"='"+thi s.name+"'> </"+e+">"} ,helpers.i temField=f unction(e, t){return Alpaca.isO bject(e)&& (t=e,e="di v"),"<"+e+ " class='" +Alpaca.MA RKER_CLASS _CONTAINER _FIELD_ITE M_FIELD+"' ></"+e+">" },helpers. formItems= function(e ){return"< div class= '"+Alpaca. MARKER_CLA SS_FORM_IT EMS_FIELD+ "'></div>" },helpers. insert=fun ction(e){r eturn"<div class='"+ Alpaca.MAR KER_CLASS_ INSERT+"' "+Alpaca.M ARKER_DATA _INSERT_KE Y+"='"+e+" '></div>"} ,helpers.s tr=functio n(e){retur n e===!1?" false":e== =!0?"true" :0===e?"0" :"undefine d"==typeof e?"":null ===e?"":Al paca.isStr ing(e)?e:A lpaca.isNu mber(e)?e: Alpaca.isO bject(e)?J SON.string ify(e,null ," "):Alp aca.isArra y(e)?JSON. stringify( e,null," "):e},help ers.arrayT oolbar=fun ction(e){r eturn"<div class='"+ Alpaca.MAR KER_CLASS_ ARRAY_TOOL BAR+"' "+A lpaca.MARK ER_DATA_AR RAY_TOOLBA R_FIELD_ID +"='"+this .id+"'></d iv>"},help ers.arrayA ctionbar=f unction(e) {return"<d iv class=' "+Alpaca.M ARKER_CLAS S_ARRAY_IT EM_ACTIONB AR+"' "+Al paca.MARKE R_DATA_ARR AY_ITEM_KE Y+"='"+thi s.name+"' "+Alpaca.M ARKER_DATA _ARRAY_ITE M_PARENT_F IELD_ID+"= '"+this.pa rentFieldI d+"'></div >"},Handle bars.regis terHelper( "arrayTool bar",helpe | |
| 37 | rs.arrayTo olbar),Han dlebars.re gisterHelp er("arrayA ctionbar", helpers.ar rayActionb ar),Handle bars.regis terHelper( "setIndex" ,function( e){this.in dex=Number (e)}),Hand lebars.reg isterHelpe r("eachPro perty",fun ction(e,t) {var n=""; for(var i in e)n+=t. fn({key:i, value:e[i] });return n}),Handle bars.regis terHelper( "uploadErr orMessage" ,function( e){var t=e ;return 1= ==e?t="Fil e exceeds upload_max _filesize" :2===e?t=" File excee ds MAX_FIL E_SIZE":3= ==e?t="Fil e was only partially uploaded" :4===e?t=" No File wa s uploaded ":5===e?t= "Missing a temporary folder":6 ===e?t="Fa iled to wr ite file t o disk":7= ==e?t="Fil e upload s topped by extension" :"maxFileS ize"===e?t ="File is too big":" minFileSiz e"===e?t=" File is to o small":" acceptFile Types"===e ?t="Filety pe not all owed":"max NumberOfFi les"===e?t ="Max numb er of file s exceeded ":"uploade dBytes"=== e?t="Uploa ded bytes exceed fil e size":"e mptyResult "===e&&(t= "Empty fil e upload r esult"),t} ),Handleba rs.registe rHelper("d isguise",f unction(e, t){for(var n="",i=0; i<e.length ;i++)n+=t; return n}) ,Handlebar s.register Helper("co mpare",hel pers.compa re),Handle bars.regis terHelper( "control", helpers.co ntrol),Han dlebars.re gisterHelp er("contai ner",helpe rs.contain er),Handle bars.regis terHelper( "item",hel pers.item) ,Handlebar s.register Helper("it emField",h elpers.ite mField),Ha ndlebars.r egisterHel per("formI tems",help ers.formIt ems),Handl ebars.regi sterHelper ("times",h elpers.tim es),Handle bars.regis terHelper( "str",help ers.str),H andlebars. registerHe lper("with ",function (e,t){retu rn t.fn(e) }),Handleb ars.regist erHelper(" ifnot",hel pers.ifnot );var part ials={};Al paca.Handl ebarsTempl ateEngine= Alpaca.Abs tractTempl ateEngine. extend({fi leExtensio n:function (){return" html"},sup portedMime types:func tion(){ret urn["text/ x-handleba rs-templat e","text/x -handlebar s-tmpl"]}, init:funct ion(){if(H andlebarsP recompiled )for(var e in Handle barsPrecom piled){var t=Handleb arsPrecomp iled[e];fo r(var n in t){var i= t[n];if("f unction"== typeof i){ var a=Alpa ca.makeCac heKey(e,"v iew",e,n); COMPILED_T EMPLATES[a ]=i}}}},do Compile:fu nction(cac heKey,html ,callback) {var self= this,templ ate=null;t ry{var fun ctionStrin g=Handleba rs.precomp ile(html); template=e val("("+fu nctionStri ng+")"),te mplate=Han dlebars.te mplate(tem plate),COM PILED_TEMP LATES[cach eKey]=temp late}catch (e){return void call back(e)}ca llback()}, doExecute: function(e ,t,n){var i=COMPILED _TEMPLATES [e];if(!i) return voi d n(new Er ror("Could not find handlebars cached te mplate for key: "+e) );var a=nu ll;try{a=i (t)}catch( r){return n(r),null} return a}, isCached:f unction(e) {return!!C OMPILED_TE MPLATES[e] },findCach eKeys:func tion(e){va r t=[];for (var n in COMPILED_T EMPLATES)0 ===n.index Of(e+":")& &t.push(n) ;return t} }),Alpaca. TemplateEn gineRegist ry.registe r("handleb ars",new A lpaca.Hand lebarsTemp lateEngine ("handleba rs"))}(jQu ery,"undef ined"!=typ eof Handle bars?Handl ebars:wind ow.Handleb ars,"undef ined"!=typ eof Handle barsPrecom piled?Hand lebarsPrec ompiled:wi ndow.Handl ebarsPreco mpiled),fu nction(e){ var t=e.al paca;t.Nor malizedVie w=Base.ext end({const ructor:fun ction(e){t his.id=e}, normalize: function(e ){var n=e[ this.id];i f(!n)retur n t.logErr or("View c ompilation failed - view not f ound: "+th is.id),!1; for(var i= [],a=n;a;) {i.push(a) ;var r=a.p arent;if(r ){var o=e[ a.parent]; if(!o)retu rn t.logEr ror("View compilatio n failed - cannot fi nd parent view: "+r+ " for view : "+a.id), !1;a=o}els e a=null}i =i.reverse ();for(var l=functio n(e,n,i){v ar a=n[i], r=e[i];t.i sUndefined (r)||t.isU ndefined(a )||t.logDe bug("View property: "+i+" alre ady has va lue: "+r+" and overw riting to: "+a),t.is Undefined( a)||(e[i]= a)},s=func tion(e,n,i ){var a=n[ i],r=e[i]; t.isUndefi ned(r)||t. isUndefine d(a)||t.lo gDebug("Vi ew propert y: "+i+" a lready has function, overwriti ng"),t.isU ndefined(a )||(e[i]=a )},u=funct ion(e,n,i) {var a=n[i ];a&&(e[i] ||(e[i]={} ),t.mergeO bject2(a,e [i]))},c=0 ;c<i.lengt h;c++){var d=i[c];l( this,d,"ty pe"),l(thi s,d,"ui"), l(this,d," displayRea donly"),l( this,d,"lo cale"),s(t his,d,"ren der"),s(th is,d,"post Render"),u (this,d,"t emplates") ,u(this,d, "fields"), u(this,d," layout"),u (this,d,"s tyles"),u( this,d,"ca llbacks"), u(this,d," messages") ,l(this,d, "horizonta l"),l(this ,d,"collap sible"),l( this,d,"le gendStyle" ),l(this,d ,"toolbarS tyle"),l(t his,d,"but tonStyle") ,l(this,d, "toolbarSt icky"),l(t his,d,"glo balTemplat e"),u(this ,d,"wizard ")}return t.logDebug ("View com pilation c omplete fo r view: "+ this.id),t .logDebug( "Final vie w: "),t.lo gDebug(JSO N.stringif y(this,nul l," ")), !0}})}(jQu ery),funct ion(e){var t=e.alpac a;t.Runtim eView=Base .extend({c onstructor :function( e,t){this. field=t,th is.setView (e)},setVi ew:functio n(e){e||(e ="web-edit ");var n=t .getNormal izedView(e );if(!n)th row new Er ror("Runti me view fo r view id: "+e+" cou ld not fin d a normal ized view" );for(var i in n)n.h asOwnPrope rty(i)&&(t his[i]=n[i ])},getWiz ard:functi on(){retur n this.get ViewParam( "wizard")} ,getGlobal TemplateDe scriptor:f unction(){ return thi s.getTempl ateDescrip tor("globa lTemplate" )},getLayo ut:functio n(){var e= this;retur n{template Descriptor :this.getT emplateDes criptor("l ayoutTempl ate",e),bi ndings:thi s.getViewP aram(["lay out","bind ings"],!0) }},getTemp lateDescri ptor:funct ion(e,n){r eturn t.ge tTemplateD escriptor( this,e,n)} ,getMessag e:function (e,n){n||( n=t.defaul tLocale);v | |
| 38 | ar i=this. getViewPar am(["messa ges",n,e]) ;return t. isEmpty(i) &&(i=this. getViewPar am(["messa ges",e])), i},getView Param:func tion(e,n){ var i=this .field.pat h;if(this. fields&&th is.fields[ i]){var a= this._getC onfigVal(t his.fields [i],e);if( !t.isEmpty (a))return a}if(i&&- 1!==i.inde xOf("[")&& -1!==i.ind exOf("]")) {var r=i.r eplace(/\[ \d+\]/g,"[ *]");if(th is.fields& &this.fiel ds[r]){var a=this._g etConfigVa l(this.fie lds[r],e); if(!t.isEm pty(a))ret urn a}}if( i&&-1!==i. indexOf("[ ")&&-1!==i .indexOf(" ]")){var r =i.replace (/\[\d+\]/ g,"");if(t his.fields &&this.fie lds[r]){va r a=this._ getConfigV al(this.fi elds[r],e) ;if(!t.isE mpty(a))re turn a}}re turn!t.isE mpty(n)&&n &&"/"!==th is.field.p ath?null:t his._getCo nfigVal(th is,e)},_ge tConfigVal :function( e,n){if(t. isArray(n) )for(var i =0;i<n.len gth&&!t.is Empty(e);i ++)e=e[n[i ]];else t. isEmpty(e) ||(e=e[n]) ;return e} ,fireCallb ack:functi on(e,t,n,i ,a,r,o){th is.callbac ks&&this.c allbacks[t ]&&this.ca llbacks[t] .call(e,n, i,a,r,o)}, applyStyle :function( t,n){var i =n;i&&i.ge tFieldEl&& (i=i.getFi eldEl()),i &&this.sty les&&this. styles[t]& &e(i).addC lass(this. styles[t]) },getStyle :function( e){return this.style s[e]?this. styles[e]: ""}})}(jQu ery),funct ion(e){var t=e.alpac a;t.Field= Base.exten d({constru ctor:funct ion(e,n,i, a,r,o,l){v ar s=this; this.initi alizing=!0 ,this.domE l=e,this.p arent=null ,this.data =n,this.op tions=i,th is.schema= a,this.con nector=o,t his.errorC allback=fu nction(e){ l?l(e):t.d efaultErro rCallback. call(s,e)} ,this.sing leLevelRen dering=!1, this.view= new t.Runt imeView(r, this);var u=!1;this. options||( this.optio ns={},u=!0 ),this.id= this.optio ns.id,this .type=this .options.t ype,this.i d||(this.i d=t.genera teId());va r c=!1;if( this.schem a||(this.s chema={},c =!0),this. options.la bel||null= ==this.sch ema.title| |(this.opt ions.label =this.sche ma.title), this.optio ns.helpers ||(this.op tions.help ers=[]),th is.options .helper){i f(t.isArra y(this.opt ions.helpe r))for(var d=0;d<thi s.options. helper.len gth;d++)th is.options .helpers.p ush(this.o ptions.hel per[d]);el se this.op tions.help ers.push(t his.option s.helper); delete thi s.options. helper}t.i sEmpty(thi s.options. readonly)& &!t.isEmpt y(this.sch ema.readon ly)&&(this .options.r eadonly=th is.schema. readonly), t.isValEmp ty(this.da ta)&&!t.is Empty(this .schema["d efault"])& &(this.dat a=this.sch ema["defau lt"],this. showingDef aultData=! 0),this.pa th="/",thi s.validati on={},this ._events={ },this.isD isplayOnly =function( ){return"v iew"===s.v iew.type|| "display"= =s.view.ty pe},this.s chema&&thi s.schema.i d&&0===thi s.schema.i d.indexOf( "#")&&(thi s.schema.i d=this.sch ema.id.sub string(1)) ,this._pre viouslyVal idated=!1, this.updat eObservabl e=function (){this.da ta?this.ob servable(t his.path). set(this.d ata):this. observable (this.path ).clear()} ,this.getO bservableS cope=funct ion(){for( var e=this ;!e.isTop( );)e=e.par ent;var t= e.observab leScope;re turn t||(t ="global") ,t},this.e nsurePrope rType=func tion(e){va r n=this,i =function( e,n){retur n t.isStri ng(e)?"num ber"===n?e =parseFloa t(e):"inte ger"===n?e =parseInt( e):"boolea n"===n&&(e =""!==e&&" false"!==e .toLowerCa se()):t.is Number(e)& &("string" ===n?e=""+ e:"boolean "===n&&(e= -1!==e&&0! ==e)),e};i f("undefin ed"!=typeo f e)if(t.i sArray(e)) for(var a= 0;a<e.leng th;a++)n.s chema.item s&&n.schem a.items.ty pe&&(e[a]= i(e[a],n.s chema.item s.type));e lse(t.isSt ring(e)||t .isNumber( e))&&n.sch ema.type&& (e=i(e,n.s chema.type ));return e},this.on Construct( )},onConst ruct:funct ion(){},is Top:functi on(){retur n!this.par ent},getTe mplateDesc riptorId:f unction(){ throw new Error("Tem plate desc riptor ID was not sp ecified")} ,initTempl ateDescrip tor:functi on(){var e =this,n=th is.view.ge tTemplateD escriptor( this.getTe mplateDesc riptorId() ,this),i=t his.view.g etGlobalTe mplateDesc riptor(),a =this.view .getLayout (),r=!1;th is.isTop() &&(i?(this .setTempla teDescript or(i),this .singleLev elRenderin g=!0,r=!0) :a&&a.temp lateDescri ptor&&(thi s.setTempl ateDescrip tor(a.temp lateDescri ptor),r=!0 )),!r&&n&& this.setTe mplateDesc riptor(n); var o=this .getTempla teDescript or();retur n o?void 0 :t.throwEr rorWithCal lback("Una ble to fin d template descripto r for fiel d: "+e.get FieldType( ))},setup: function() {this.init ializing|| (this.data =this.getV alue()),th is.initTem plateDescr iptor(),t. isUndefine d(this.sch ema.requir ed)&&(this .schema.re quired=!1) ,t.isUndef ined(this. options.va lidate)&&( this.optio ns.validat e=!0),t.is Undefined( this.optio ns.disable d)&&(this. options.di sabled=!1) ,t.isUndef ined(this. options.sh owMessages )&&(this.o ptions.sho wMessages= !0)},on:fu nction(e,n ){return t .logDebug( "Adding li stener for event: "+ e),this._e vents[e]|| (this._eve nts[e]=[]) ,this._eve nts[e].pus h(n),this} ,off:funct ion(e){thi s._events[ e]&&(this. _events[e] .length=0) },triggerW ithPropaga tion:funct ion(e,t,n) {if("strin g"==typeof t&&(n=t,t =null),n|| (n="up")," up"===n)th is.trigger .call(this ,e,t),this .parent&&t his.parent .triggerWi thPropagat ion.call(t his.parent ,e,t,n);el se if("dow n"===n){if (this.chil dren&&this .children. length>0)f or(var i=0 ;i<this.ch ildren.len gth;i++){v ar a=this. children[i ];a.trigge rWithPropa gation.cal l(a,e,t,n) }this.trig ger.call(t his,e,t)}e lse if("bo th"===n){i f(this.chi ldren&&thi s.children .length>0) for(var i= 0;i<this.c hildren.le ngth;i++){ var a=this .children[ i];a.trigg erWithProp agation.ca ll(a,e,t," down")}thi s.trigger. call(this, e,t),this. | |
| 39 | parent&&th is.parent. triggerWit hPropagati on.call(th is.parent, e,t,"up")} },trigger: function(e ,n,i,a,r){ var o=this ._events[e ];if(o)for (var l=0;l <o.length; l++){var s =o[l],u=nu ll;if("fun ction"==ty peof s){t. logDebug(" Firing eve nt: "+e);t ry{u=s.cal l(this,n,i ,a,r)}catc h(c){t.log Debug("The event han dler caugh t an excep tion: "+e) ,t.logDebu g(c)}}}},b indData:fu nction(){t .isEmpty(t his.data)| |this.setV alue(this. data)},ren der:functi on(e,n){va r i=this;e &&(t.isStr ing(e)||t. isObject(e ))?this.vi ew.setView (e):t.isEm pty(n)&&t. isFunction (e)&&(n=e) ,null===th is.options .label&&th is.propert yId&&(this .options.l abel=this. propertyId ),this.opt ions.name& &(this.nam e=this.opt ions.name) ,this.calc ulateName( ),this.set up(),this. _render(fu nction(){i .trigger(" render"),n ()})},calc ulateName: function() {if(!this. name||this .name&&thi s.nameCalc ulated)if( this.paren t&&this.pa rent.name& &this.path ){var e=th is.path.su bstring(th is.path.la stIndexOf( "/")+1);-1 !==e.index Of("[")&&- 1!==e.inde xOf("]")&& (e=e.subst ring(e.ind exOf("[")+ 1,e.indexO f("]"))),e &&(this.na me=this.pa rent.name+ "_"+e,this .nameCalcu lated=!0)} else this. path&&(thi s.name=thi s.path.rep lace(/\//g ,"").repla ce(/\[/g," _").replac e(/\]/g,"" ),this.nam eCalculate d=!0)},_re nder:funct ion(n){var i=this;if (i.options .form&&t.i sObject(i. options.fo rm)){i.opt ions.form. viewType=t his.view.t ype;var a= i.form;a|| (a=new t.F orm(i.domE l,this.opt ions.form, i.view.id, i.connecto r,i.errorC allback)), a.render(f unction(a) {var r=e(" <div></div >");i._pro cessRender (r,functio n(){a.form FieldsCont ainer.befo re(i.field ),a.formFi eldsContai ner.remove (),a.topCo ntrol=i,i. view.type& &"view"!== i.view.typ e&&a.initE vents(),i. form=a;i.p ostRender( function() {i.initial izing=!1,i .form.afte rInitializ e(),e(i.fi eld).bind( "destroyed ",function (e){i.form .destroy() }),n&&t.is Function(n )&&n(i)})} )})}else t his._proce ssRender(i .domEl,fun ction(){i. postRender (function( ){i.initia lizing=!1, n&&t.isFun ction(n)&& n(i)})})}, _processRe nder:funct ion(e,t){v ar n=this; n.renderFi eld(e,func tion(){n.f ireCallbac k("field") ,n.renderF ieldElemen ts(functio n(){t()})} )},renderF ieldDomEle ment:funct ion(e){var n=this.ge tTemplateD escriptor( );return t .tmpl(n,{i d:this.get Id(),optio ns:this.op tions,sche ma:this.sc hema,data: e,view:thi s.view,pat h:this.pat h,name:thi s.name})}, renderFiel d:function (t,n){var i=this,a=t his.data;t his.isDisp layOnly()& &"object"= =typeof a& &(a=JSON.s tringify(a ));var r=i .renderFie ldDomEleme nt(a);if(e (r).length >0){for(va r o=null,l =0;l<e(r). length;l++ ){var s=e( r)[l].node Name;if(s& &(s=s.toLo werCase(), "div"===s| |"span"=== s)){o=e(e( r)[l]);bre ak}}o||(o= e(e(r).las t())),o&&( r=o)}this. field=r,th is.field.a ppendTo(t) ,n()},rend erFieldEle ments:func tion(e){e( )},updateD OMElement: function() {this.fiel d.attr("da ta-alpaca- field-path ",this.get Path()),th is.field.a ttr("data- alpaca-fie ld-name",t his.getNam e()),this. field.remo veAttr("na me")},post Render:fun ction(n){v ar i=this; if(this.fi eld.addCla ss("alpaca -field"),t his.field. addClass(" alpaca-fie ld-"+this. getFieldTy pe()),this .field.att r("data-al paca-field -id",this. getId()),t his.update DOMElement (),"view"! ==this.vie w.type){th is.isRequi red()?(e(t his.field) .addClass( "alpaca-re quired"),i .fireCallb ack("requi red")):(e( this.field ).addClass ("alpaca-o ptional"), i.fireCall back("opti onal"));va r a=functi on(){t.dis abled(e("i nput",i.fi eld),!0),t .disabled( e("select" ,i.field), !0),t.disa bled(e(":r adio",i.fi eld),!0),t .disabled( e(":checkb ox",i.fiel d),!0),e(" :radio",i. field).off ().click(f unction(e) {return e. preventDef ault(),e.s topImmedia tePropagat ion(),!1}) ,e(".radio label",i. field).off ().click(f unction(e) {return e. preventDef ault(),e.s topImmedia tePropagat ion(),!1}) ,e("input" ,i.field). off().clic k(function (e){return e.prevent Default(), e.stopImme diatePropa gation(),! 1}),i.disa ble&&i.dis able()};th is.options .readonly& &(e(this.f ield).addC lass("alpa ca-readonl y"),e("inp ut",this.f ield).attr ("readonly ","readonl y"),a(),i. fireCallba ck("readon ly")),this .options.d isabled&&( e(this.fie ld).addCla ss("alpaca -disabled" ),a(),i.fi reCallback ("disabled "));var r= function(e ,n){if(n){ var i=0,a= null;if(t. isArray(n) )for(i=0;i <n.length; i++)e.addC lass(n[i]) ;else if(n .indexOf(" ,")>-1)for (a=n.split (","),i=0; i<a.length ;i++)e.add Class(a[i] );else if( n.indexOf( " ")>-1)fo r(a=n.spli t(" "),i=0 ;i<a.lengt h;i++)e.ad dClass(a[i ]);else e. addClass(n )}};r(this .field,thi s.options. fieldClass ),this.opt ions.disab led&&(this .disable() ,i.fireCal lback("dis able")),th is.view.ty pe&&"edit" ===this.vi ew.type?th is.bindDat a():this.s howingDefa ultData&&t his.bindDa ta(),"crea te"===this .view.type &&t.logDeb ug("Skippi ng data bi nding for field: "+t his.id+" s ince view mode is 'c reate'"),t his.view.t ype&&"view "!==this.v iew.type&& this.initE vents()}th is.options .hidden&&t his.field. hide();var o="create "===this.v iew.type&& !this.refr eshed;this .hideInitV alidationE rror=t.isV alEmpty(th is.options .hideInitV alidationE rror)?o:th is.options .hideInitV alidationE rror,this. view.displ ayReadonly ||e(this.f ield).find (".alpaca- readonly") .hide(),th is.options .postRende r?this.opt ions.postR ender.call (this,func tion(){n() }):n()},re fresh:func tion(n){va r i=this,a =i.data=i. getValue() ,r=i.domEl ,o=i.field ,l=e("<div ></div>"); e(o).befor e(l),i.dom El=e("<div style='di splay: non e'></div>" ),i.field= void 0,i.c | |
| 40 | ontrol=voi d 0,i.cont ainer=void 0,i.form= void 0,e(o ).find("bu tton").pro p("disable d",!0),thi s.initiali zing=!0,i. setup(),i. _render(fu nction(){e (l).before (i.field), i.domEl=r; var s=e(o) .attr("cla ss");s&&e. each(s.spl it(" "),fu nction(t,n ){n&&0===! n.indexOf( "alpaca-") &&e(i.fiel d).addClas s(n)}),e(o ).hide(),e (l).remove (),i.refre shed=!0,"u ndefined"! =typeof a& &(t.isObje ct(a)||t.i sArray(a)) &&i.setVal ue(a),t.fi reReady(i) ,n&&n.call (i),e(o).r emove(void 0,{nodest roy:!0})}) },applySty le:functio n(e,t){thi s.view.app lyStyle(e, t)},fireCa llback:fun ction(e,t, n,i,a,r){t his.view.f ireCallbac k(this,e,t ,n,i,a,r)} ,getFieldE l:function (){return this.field },getId:fu nction(){r eturn this .id},getPa rent:funct ion(){retu rn this.pa rent},getP ath:functi on(){retur n this.pat h},getName :function( ){return t his.name}, isTopLevel :function( ){return t .isEmpty(t his.parent )},top:fun ction(){fo r(var e=th is;e.paren t;)e=e.par ent;return e},getVal ue:functio n(){var e= this,t=thi s.data;ret urn t=e.en sureProper Type(t)},s etValue:fu nction(e){ this.data= e,this.upd ateObserva ble(),this .triggerUp date(),thi s.isDispla yOnly()&&! this.initi alizing&&( this.top&& this.top() &&this.top ().initial izing||thi s.refresh( ))},setDef ault:funct ion(){},ge tTemplateD escriptor: function() {return th is.templat eDescripto r},setTemp lateDescri ptor:funct ion(e){thi s.template Descriptor =e},displa yMessage:f unction(n, i){var a=t his;n&&t.i sObject(n) &&(n=[n]), n&&t.isStr ing(n)&&(n =[{id:"cus tom",messa ge:n}]),e( this.getFi eldEl()).c hildren(". alpaca-mes sage").rem ove(),n&&n .length>0& &this.opti ons.maxMes sages&&t.i sNumber(th is.options .maxMessag es)&&this. options.ma xMessages> -1&&(n=n.s lice(0,thi s.options. maxMessage s)),a.fire Callback(" removeMess ages"),n&& n.length>0 &&e.each(n ,function( n,i){var r =!1;a.hide InitValida tionError& &(r=!0);va r o=a.view .getTempla teDescript or("messag e");if(o){ var l=t.tm pl(o,{id:i .id,messag e:i.messag e,view:a.v iew});l.ad dClass("al paca-messa ge"),r&&l. addClass(" alpaca-mes sage-hidde n"),e(a.ge tFieldEl() ).append(l )}a.fireCa llback("ad dMessage", n,i.id,i.m essage,r)} )},refresh Validation State:func tion(e,n){ var i=this ,a=[],r=[] ,o=functio n(e,n){ret urn functi on(i){t.ne xtTick(fun ction(){t. compileVal idationCon text(e,fun ction(e){n .push(e),i ()})})}};i f(e){var l =function( e,t){if(e. isValidati onParticip ant()){if( e.children &&e.childr en.length> 0)for(var n=0;n<e.ch ildren.len gth;n++)l( e.children [n],t);r.p ush(o(e,t) )}};l(this ,a)}r.push (o(this,a) ),t.series (r,functio n(e){for(v ar r={},o= [],l=0;l<a .length;l+ +)for(var s=a[l],u=o .length,c= 0;c<s.leng th;c++){va r d=s[c],p =r[d.id];i f(p)d.vali dated&&!p. invalidate d&&(p.vali dated=!0,p .invalidat ed=!1,p.va lid=d.vali d),d.inval idated&&(p .invalidat ed=!0,p.va lidated=!1 ,p.valid=d .valid);el se{var h={ };h.id=d.i d,h.path=d .path,h.do mEl=d.domE l,h.field= d.field,h. validated= d.validate d,h.invali dated=d.in validated, h.valid=d. valid,o.sp lice(u,0,h ),r[h.id]= h}}o.rever se(),i.hid eInitValid ationError ||t.update Validation StateForCo ntext(i.vi ew,o),n&&n ()})},getM essage:fun ction(e){r eturn this .view.getM essage(e,t his.view.l ocale)},va lidate:fun ction(e){v ar n=!0;if (!this.ini tializing& &this.opti ons.valida te){if(thi s.children &&e)for(va r i=0;i<th is.childre n.length;i ++){var a= this.child ren[i];a.i sValidatio nParticipa nt()&&a.va lidate(e)} if(n=this. handleVali date(),!n& &t.logLeve l==t.DEBUG ){var r=[] ;for(var o in this.v alidation) this.valid ation[o].s tatus||r.p ush(this.v alidation[ o].message );t.logDeb ug("Valida tion failu re for fie ld (id="+t his.getId( )+", path= "+this.pat h+"), mess ages: "+JS ON.stringi fy(r))}}re turn this. _previousl yValidated =!0,n},han dleValidat e:function (){var e=t his.valida tion,n=thi s._validat eOptional( );return e .notOption al={messag e:n?"":thi s.getMessa ge("notOpt ional"),st atus:n},n= this._vali dateDisall ow(),e.dis allowValue ={message: n?"":t.sub stituteTok ens(this.g etMessage( "disallowV alue"),[th is.schema. disallow.j oin(", ")] ),status:n },e.notOpt ional.stat us&&e.disa llowValue. status},_v alidateCus tomValidat or:functio n(e){var n =this;this .options.v alidator&& t.isFuncti on(this.op tions.vali dator)?thi s.options. validator. call(this, function(t ){n.valida tion.custo m=t,e()}): e()},_vali dateOption al:functio n(){return this.isRe quired()&& this.isEmp ty()?!1:!t his.option s.disallow OnlyEmptyS paces||!t. testRegex( t.regexps. whitespace ,this.getV alue())},_ validateDi sallow:fun ction(){if (!t.isValE mpty(this. schema.dis allow)){va r n=this.g etValue(), i=this.sch ema.disall ow;if(t.is Array(i)){ var a=!0;r eturn e.ea ch(i,funct ion(e,i){( t.isObject (n)||t.isA rray(n)&&t .isString( i))&&(i=t. parseJSON( i)),t.comp areObject( n,i)&&(a=! 1)}),a}ret urn(t.isOb ject(n)||t .isArray(n )&&t.isStr ing(i))&&( i=t.parseJ SON(i)),!t .compareOb ject(n,i)} return!0}, triggerUpd ate:functi on(){e(thi s.field).t rigger("fi eldupdate" )},disable :function( ){},enable :function( ){},isDisa bled:funct ion(){retu rn!1},isEn abled:func tion(){ret urn!this.i sDisabled( )},focus:f unction(e) {e&&e(this )},destroy :function( ){t.observ able(this. path).clea r(),t&&t.f ieldInstan ces&&t.fie ldInstance s[this.get Id()]&&del ete t.fiel dInstances [this.getI d()],e(thi s.field).r emove()},s how:functi on(){this. options&&t his.option s.hidden|| (e(this.fi eld).css({ display:"" }),this.on Show(),thi s.fireCall back("show "))},onSho w:function (){},hide: function() {e(this.fi eld).css({ display:"n | |
| 41 | one"}),thi s.onHide() ,this.fire Callback(" hide")},on Hide:funct ion(){},is Validation Participan t:function (){return this.isSho wn()},isSh own:functi on(){retur n!this.isH idden()},i sVisible:f unction(){ return!thi s.isHidden ()},isHidd en:functio n(){return "none"===e (this.fiel d).css("di splay")},p rint:funct ion(){this .getFieldE l().printA rea&&this. getFieldEl ().printAr ea()},onDe pendentRev eal:functi on(){},onD ependentCo nceal:func tion(){},r eload:func tion(){thi s.initiali zing=!0,t. isEmpty(th is.callbac k)?this.re nder(this. renderedCa llback):th is.callbac k(this,thi s.rendered Callback)} ,clear:fun ction(){va r e=null;t his.data&& (e=this.da ta),this.s etValue(e) },isEmpty: function() {return t. isValEmpty (this.getV alue())},i sValid:fun ction(t){i f(t&&this. children)f or(var n=0 ;n<this.ch ildren.len gth;n++){v ar i=this. children[n ];if(i.isV alidationP articipant ()&&!i.isV alid(t))re turn!1}if( e.isEmptyO bject(this .validatio n))return! 0;for(var a in this. validation )if(!this. validation [a].status )return!1; return!0}, initEvents :function( ){var n=th is;this.fi eld&&(this .field.mou seover(fun ction(e){n .onMouseOv er.call(n, e),n.trigg er("mouseo ver",e)}), this.field .mouseout( function(e ){n.onMous eOut.call( n,e),n.tri gger("mous eout",e)}) ,e.each(th is.options ,function( e,i){if(t. startsWith (e,"onFiel d")&&t.isF unction(i) ){var a=e. substring( 7).toLower Case();n.f ield.on(a, function(e ){i.call(n ,e)})}}),t his.option s&&this.op tions.even ts&&e.each (this.opti ons.events ,function( e,i){t.isF unction(i) &&("render "===e||"re ady"===e|| "blur"===e ||"focus"= ==e?n.on(e ,function( e,t,a,r){i .call(n,e, t,a,r)}):n .field.on( e,function (e){i.call (n,e)}))}) )},onFocus :function( t){e(this. field).rem oveClass(" alpaca-fie ld-empty") ,e(this.fi eld).addCl ass("alpac a-field-fo cused")},o nBlur:func tion(t){va r n=e(this .field).ha sClass("al paca-field -focused") ;e(this.fi eld).remov eClass("al paca-field -focused") ,n&&this.r efreshVali dationStat e(),e(this .field).tr igger("fie ldblur")}, onChange:f unction(e) {this.data =this.getV alue(),thi s.updateOb servable() ,this.trig gerUpdate( )},onMouse Over:funct ion(e){},o nMouseOut: function(e ){},getCon trolByPath :function( e){var n=n ull;if(e){ 0===e.inde xOf("/")&& (e=e.subst ring(1)),t .endsWith( e,"/")&&(e =e.substri ng(0,e.len gth-1));fo r(var i=th is,a=e.spl it("/"),r= 0;r<a.leng th;r++){va r o=a[r],l =o,s=-1,u= o.indexOf( "[");if(u> =0){var c= o.indexOf( "]",u+1);c >=0&&(s=pa rseInt(o.s ubstring(u +1,c)),l=o .substring (0,u))}l&& (i=i.child renByPrope rtyId[l],s >-1&&(i=i. children[s ]))}n=i}re turn n},ge tControlsB yFieldType :function( e){var t=[ ];if(e){va r n=functi on(e,t,i){ for(var a= 0;a<e.chil dren.lengt h;a++)e.ch ildren[a]. getFieldTy pe()===t&& i.push(e.c hildren[a] ),e.childr en[a].isCo ntainer()& &n(e.child ren[a],t,i )};n(this, e,t)}retur n t},getCo ntrolsBySc hemaType:f unction(e) {var t=[]; if(e){var n=function (e,t,i){fo r(var a=0; a<e.childr en.length; a++)e.chil dren[a].ge tType()=== t&&i.push( e.children [a]),e.chi ldren[a].i sContainer ()&&n(e.ch ildren[a], t,i)};n(th is,e,t)}re turn t},su bscribe:fu nction(){v ar e=t.mak eArray(arg uments);re turn e.uns hift(this. getObserva bleScope() ),t.subscr ibe.apply( this,e)},u nsubscribe :function( ){var e=t. makeArray( arguments) ;return e. unshift(th is.getObse rvableScop e()),t.uns ubscribe.a pply(this, e)},observ able:funct ion(){var e=t.makeAr ray(argume nts);retur n e.unshif t(this.get Observable Scope()),t .observabl e.apply(th is,e)},cle arObservab le:functio n(){var e= t.makeArra y(argument s);return e.unshift( this.getOb servableSc ope()),t.c learObserv able.apply (this,e)}, dependentO bservable: function() {var e=t.m akeArray(a rguments); return e.u nshift(thi s.getObser vableScope ()),t.depe ndentObser vable.appl y(this,e)} ,getType:f unction(){ },getField Type:funct ion(){retu rn""},getB aseFieldTy pe:functio n(){var e= null,t=thi s.construc tor.ancest or.prototy pe;return t&&t.getFi eldType&&( e=t.getFie ldType()), e},isConta iner:funct ion(){retu rn!1},isRe quired:fun ction(){va r e=!1;if( "boolean"= =typeof th is.schema. required&& (e=this.sc hema.requi red),this. parent&&th is.parent. schema.req uired&&t.i sArray(thi s.parent.s chema.requ ired)){var n=this.pa rent.schem a.required ;if(n)for( var i=0;i< n.length;i ++)if(n[i] ===this.pr opertyId){ e=!0;break }}return e },getTitle :function( ){},getDes cription:f unction(){ },getSchem aOfSchema: function() {var e={ti tle:this.g etTitle(), descriptio n:this.get Descriptio n(),type:" object",pr operties:{ title:{tit le:"Title" ,descripti on:"Short descriptio n of the p roperty.", type:"stri ng"},descr iption:{ti tle:"Descr iption",de scription: "Detailed descriptio n of the p roperty.", type:"stri ng"},reado nly:{title :"Readonly ",descript ion:"Indic ates that the field is read-on ly. A rea d-only fie ld cannot have it's value chan ged. Read -only fiel ds render in a graye d-out or d isabled co ntrol. If the field is render ed using a view with the <code >displayRe adonly</co de> attrib ute set to false, th e read-onl y field wi ll not app ear.",type :"boolean" ,"default" :!1},requi red:{title :"Required ",descript ion:"Indic ates wheth er the fie ld's value is requir ed. If se t to true, the field must take on a vali d value an d cannnot be left em pty or una ssigned.", type:"bool ean","defa ult":!1}," default":{ title:"Def ault",desc ription:"T he default value to be assigne d for this property. If the d ata for th e field is empty or not provid ed, this d efault val | |
| 42 | ue will be plugged i n for you. Specify a default value when you want to pre-pop ulate the field's va lue ahead of time.", type:"any" },type:{ti tle:"Type" ,descripti on:"Data t ype of the property. ",type:"st ring",read only:!0},f ormat:{tit le:"Format ",descript ion:"Data format of the proper ty.",type: "string"}, disallow:{ title:"Dis allowed Va lues",desc ription:"L ist of dis allowed va lues for t he propert y.",type:" array"},de pendencies :{title:"D ependencie s",descrip tion:"List of proper ty depende ncies.",ty pe:"array" }}};return this.getT ype&&!t.is ValEmpty(t his.getTyp e())&&(e.p roperties. type["defa ult"]=this .getType() ,e.propert ies.type[" enum"]=[th is.getType ()]),e},ge tOptionsFo rSchema:fu nction(){r eturn{fiel ds:{title: {helper:"F ield short descripti on",type:" text"},des cription:{ helper:"Fi eld detail ed descrip tion",type :"textarea "},readonl y:{helper: "Field wil l be read only if ch ecked",rig htLabel:"T his field is read-on ly",type:" checkbox"} ,required: {helper:"F ield value must be s et if chec ked",right Label:"Thi s field is required" ,type:"che ckbox"},"d efault":{h elper:"Fie ld default value",ty pe:"textar ea"},type: {helper:"F ield data type",type :"text"},f ormat:{typ e:"select" ,dataSourc e:function (e){for(va r n in t.d efaultForm atFieldMap ping)this. selectOpti ons.push({ value:n,te xt:n});e() }},disallo w:{helper: "Disallowe d values f or the fie ld", | |
| 43 | itemLabel: "Value",ty pe:"array" },dependen cies:{help er:"Field Dependenci es",multip le:!0,size :3,type:"s elect",dat aSource:fu nction(e,t ){if(e.par ent&&e.par ent.schema Parent&&e. parent.sch emaParent. parent)for (var n in e.parent.s chemaParen t.parent.c hildrenByP ropertyId) n!=e.paren t.schemaPa rent.prope rtyId&&e.s electOptio ns.push({v alue:n,tex t:n});t&&t ()}}}}},ge tSchemaOfO ptions:fun ction(){va r e={title :"Options for "+this .getTitle( ),descript ion:this.g etDescript ion()+" (O ptions)",t ype:"objec t",propert ies:{form: {},id:{tit le:"Field Id",descri ption:"Uni que field id. Auto-g enerated i f not prov ided.",typ e:"string" },type:{ti tle:"Field Type",des cription:" Field type .",type:"s tring","de fault":thi s.getField Type(),rea donly:!0}, validate:{ title:"Val idation",d escription :"Field va lidation i s required if true." ,type:"boo lean","def ault":!0}, showMessag es:{title: "Show Mess ages",desc ription:"D isplay val idation me ssages if true.",typ e:"boolean ","default ":!0},disa bled:{titl e:"Disable d",descrip tion:"Fiel d will be disabled i f true.",t ype:"boole an","defau lt":!1},re adonly:{ti tle:"Reado nly",descr iption:"Fi eld will b e readonly if true." ,type:"boo lean","def ault":!1}, hidden:{ti tle:"Hidde n",descrip tion:"Fiel d will be hidden if true.",typ e:"boolean ","default ":!1},labe l:{title:" Label",des cription:" Field labe l.",type:" string"},h elper:{tit le:"Helper ",descript ion:"Field help mess age.",type :"string"} ,helpers:{ title:"Hel pers",desc ription:"A n array of field hel p messages . Each me ssage will be displa yed on it' s own line .",type:"a rray",item s:{type:"s tring"}},f ieldClass: {title:"CS S class",d escription :"Specifie s one or m ore CSS cl asses that should be applied t o the dom element fo r this fie ld once it is render ed. Suppo rts a sing le value, comma-deli mited valu es, space- delimited values or values pas sed in as an array." ,type:"str ing"},hide InitValida tionError: {title:"Hi de Initial Validatio n Errors", descriptio n:"Hide in itial vali dation err ors if tru e.",type:" boolean"," default":! 1},focus:{ title:"Foc us",descri ption:"If true, the initial fo cus for th e form wil l be set t o the firs t child el ement (usu ally the f irst field in the fo rm). If a field nam e or path is provide d, then th e specifie d child fi eld will r eceive foc us. For e xample, yo u might se t focus to 'name' (s electing t he 'name' field) or you might set it to 'client/na me' which picks the 'name' fie ld on the 'client' o bject.",ty pe:"checkb ox","defau lt":!0},op tionLabels :{title:"E numerated Value Labe ls",descri ption:"An array of s tring labe ls for ite ms in the enum array ",type:"ar ray"},view :{title:"O verride of the view for this f ield",desc ription:"A llows for this field to be ren dered with a differe nt view (s uch as 'di splay' or 'create')" ,type:"str ing"}}};re turn this. isTopLevel ()?e.prope rties.form ={title:"F orm",descr iption:"Op tions for rendering the FORM t ag.",type: "object",p roperties: {attribute s:{title:" Form Attri butes",des cription:" List of at tributes f or the FOR M tag.",ty pe:"object ",properti es:{id:{ti tle:"Id",d escription :"Unique f orm id. Au to-generat ed if not provided." ,type:"str ing"},acti on:{title: "Action",d escription :"Form sub mission en dpoint",ty pe:"string "},method: {title:"Me thod",desc ription:"F orm submis sion metho d","enum": ["post","g et"],type: "string"}, rubyrails: {title:"Ru by On Rail s",descrip tion:"Ruby on Rails Name Stand ard","enum ":["true", "false"],t ype:"strin g"},name:{ title:"Nam e",descrip tion:"Form name",typ e:"string" },focus:{t itle:"Focu s",descrip tion:"Focu s Setting" ,type:"any "}}},butto ns:{title: "Form Butt ons",descr iption:"Co nfiguratio n for form -bound but tons",type :"object", properties :{submit:{ type:"obje ct",title: "Submit Bu tton",requ ired:!1},r eset:{type :"object", title:"Res et button" ,required: !1}}},togg leSubmitVa lidState:{ title:"Tog gle Submit Valid Sta te",descri ption:"Tog gle the va lidity sta te of the Submit but ton",type: "boolean", "default": !0}}}:dele te e.prope rties.form ,e},getOpt ionsForOpt ions:funct ion(){var e={type:"o bject",fie lds:{id:{t ype:"text" ,readonly: !0},type:{ type:"text "},validat e:{rightLa bel:"Enfor ce validat ion",type: "checkbox" },showMess ages:{righ tLabel:"Sh ow validat ion messag es",type:" checkbox"} ,disabled: {rightLabe l:"Disable this fiel d",type:"c heckbox"}, hidden:{ty pe:"checkb ox",rightL abel:"Hide this fiel d"},label: {type:"tex t"},helper :{type:"te xtarea"},h elpers:{ty pe:"array" ,items:{ty pe:"textar ea"}},fiel dClass:{ty pe:"text"} ,hideInitV alidationE rror:{righ tLabel:"Hi de initial validatio n errors", type:"chec kbox"},foc us:{type:" checkbox", rightLabel :"Auto-foc us first c hild field "},optionL abels:{typ e:"array", items:{typ e:"text"}} ,view:{typ e:"text"}} };return t his.isTopL evel()&&(e .fields.fo rm={type:" object",fi elds:{attr ibutes:{ty pe:"object ",fields:{ id:{type:" text",read only:!0},a ction:{typ e:"text"}, method:{ty pe:"select "},name:{t ype:"text" }}}}}),e}} ),t.regist erMessages ({disallow Value:"{0} are disal lowed valu es.",notOp tional:"Th is field i s not opti onal."})}( jQuery),fu nction(e){ var t=e.al paca;t.Con trolField= t.Field.ex tend({onCo nstruct:fu nction(){v ar t=this; this.isCon trolField= !0,this._g etControlV al=functio n(n){var i =null;retu rn this.co ntrol&&(i= e(this.con trol).val( ),n&&(i=t. ensureProp erType(i)) ),i}},setu p:function (){var e=t his;this.b ase();var | |
| 44 | n=e.resolv eControlTe mplateType ();if(!n)r eturn t.th rowErrorWi thCallback ("Unable t o find tem plate desc riptor for control: "+e.getFie ldType()); if(this.co ntrolDescr iptor=this .view.getT emplateDes criptor("c ontrol-"+n ,e),"undef ined"==typ eof this.o ptions.ren derButtons &&(this.op tions.rend erButtons= !0),this.o ptions.but tons)for(v ar i in th is.options .buttons)t his.option s.buttons[ i].label&& (this.opti ons.button s[i].value =this.opti ons.button s[i].label ),this.opt ions.butto ns[i].titl e&&(this.o ptions.but tons[i].va lue=this.o ptions.but tons[i].ti tle),this. options.bu ttons[i].t ype||(this .options.b uttons[i]. type="butt on"),this. options.bu ttons[i].s tyles||(th is.options .buttons[i ].styles=t his.view.s tyles.butt on)},getCo ntrolEl:fu nction(){r eturn this .control}, resolveCon trolTempla teType:fun ction(){va r e=this,t =!1,n=null ,i=this;do if(i.getF ieldType){ var a=this .view.getT emplateDes criptor("c ontrol-"+i .getFieldT ype(),e);a ?(n=i.getF ieldType() ,t=!0):i=i .construct or.ancesto r.prototyp e}else t=! 0;while(!t );return n },onSetup: function() {},isAutoF ocusable:f unction(){ return!0}, getTemplat eDescripto rId:functi on(){retur n"control" },renderFi eldElement s:function (n){var i= this;this. control=e( this.field ).find("." +t.MARKER_ CLASS_CONT ROL_FIELD) ,this.cont rol.remove Class(t.MA RKER_CLASS _CONTROL_F IELD),i.pr epareContr olModel(fu nction(e){ i.beforeRe nderContro l(e,functi on(){i.ren derControl (e,functio n(a){a&&(i .control.r eplaceWith (a),i.cont rol=a,i.co ntrol.addC lass(t.CLA SS_CONTROL )),i.fireC allback("c ontrol"),i .afterRend erControl( e,function (){n()})}) })})},prep areControl Model:func tion(e){va r t={};t.i d=this.get Id(),t.nam e=this.nam e,t.option s=this.opt ions,t.sch ema=this.s chema,t.da ta=this.da ta,t.requi red=this.i sRequired( ),t.view=t his.view,e (t)},befor eRenderCon trol:funct ion(e,t){t ()},afterR enderContr ol:functio n(t,n){var i=this;i. firstUpdat eObservabl eFire||"un defined"== typeof i.d ata||null= =i.data||( i.firstUpd ateObserva bleFire=!0 ,i.updateO bservable( )),e(this. getFieldEl ()).find(" .alpaca-co ntrol-butt on").each( function() {e(this).c lick(funct ion(t){e(t his).attr( "button-pu shed",!0)} );var t=e( this).attr ("data-key ");if(t){v ar n=i.opt ions.butto ns[t];n&&n .click&&e( this).clic k(function (e,t){retu rn functio n(n){n.pre ventDefaul t(),t.call (e,n)}}(i, n.click))} }),n()},re nderContro l:function (e,n){var i=null;thi s.controlD escriptor& &(i=t.tmpl (this.cont rolDescrip tor,e)),n( i)},postRe nder:funct ion(e){thi s.base(fun ction(){e( )})},updat eDOMElemen t:function (){this.ba se(),this. control.at tr("name", this.getNa me())},set Default:fu nction(){v ar e=t.isE mpty(this. schema["de fault"])?" ":this.sch ema["defau lt"];this. setValue(e )},getValu e:function (){var e=t his,t=this .base();re turn this. isDisplayO nly()||(t= e.getContr olValue()) ,t=e.ensur eProperTyp e(t)},getC ontrolValu e:function (){return this._getC ontrolVal( !0)},_vali dateEnum:f unction(){ if(!this.g etEnum())r eturn!0;va r e=this.g etValue(); return!thi s.isRequir ed()&&t.is ValEmpty(e )?!0:t.inA rray(this. getEnum(), e)},handle Validate:f unction(){ var e=this .base(),n= this.valid ation,i=th is._valida teEnum(),a =this.getE num(),r=th is.getOpti onLabels() ;return r& &r.length> 0&&(a=r),n .invalidVa lueOfEnum= {message:i ?"":t.subs tituteToke ns(this.ge tMessage(" invalidVal ueOfEnum") ,[a.join(" , "),this. getValue() ]),status: i},e&&n.in validValue OfEnum.sta tus},initE vents:func tion(){thi s.base(),t his.contro l&&this.co ntrol.leng th>0&&this .initContr olEvents() },initCont rolEvents: function() {var e=thi s,t=this.c ontrol;t.c lick(funct ion(t){e.o nClick.cal l(e,t),e.t rigger("cl ick",t)}), t.change(f unction(t) {setTimeou t(function (){e.onCha nge.call(e ,t),e.trig gerWithPro pagation(" change",t) },200)}),t .focus(fun ction(t){i f(e.wasFoc used=!0,!e .suspendBl urFocus){v ar n=e.onF ocus.call( e,t);retur n n!==!1&& (n=e.trigg er("focus" ,t)),n}}), t.blur(fun ction(t){i f(e.wasBlu rred=!0,!e .suspendBl urFocus){v ar n=e.onB lur.call(e ,t);return n!==!1&&( n=e.trigge r("blur",t )),n}}),t. keypress(f unction(t) {var n=e.o nKeyPress. call(e,t); return n!= =!1&&(n=e. trigger("k eypress",t )),n}),t.k eyup(funct ion(t){var n=e.onKey Up.call(e, t);return n!==!1&&(n =e.trigger ("keyup",t )),n}),t.k eydown(fun ction(t){v ar n=e.onK eyDown.cal l(e,t);ret urn n!==!1 &&(n=e.tri gger("keyd own",t)),n })},onKeyP ress:funct ion(e){var t=this,n= !1;if(t.vi ew.type&&" edit"===t. view.type) {var i=thi s.isValid( );i||(n=!0 )}else if( t.view.typ e&&"create "===t.view .type){var i=this.is Valid();!i &&t.wasBlu rred&&(n=! 0)}n&&wind ow.setTime out(functi on(){t.ref reshValida tionState( )},50)},on KeyDown:fu nction(e){ },onKeyUp: function(e ){},onClic k:function (e){},disa ble:functi on(){this. options.re adonly||(t his.base() ,this.cont rol&&this. control.le ngth>0&&e( this.contr ol).prop(" disabled", !0))},enab le:functio n(){this.o ptions.rea donly||(th is.base(), this.contr ol&&this.c ontrol.len gth>0&&e(t his.contro l).prop("d isabled",! 1))},isDis abled:func tion(){ret urn e(this .control). prop("disa bled")},ge tEnum:func tion(){var e=null;re turn this. schema&&th is.schema[ "enum"]&&( e=this.sch ema["enum" ]),e},setE num:functi on(e){t.sa feSetObjec tArray(thi s.schema," enum",e)}, getOptionL abels:func tion(){var e=null;re turn this. options&&t his.option s.optionLa bels&&(e=t his.option s.optionLa bels),e},s etOptionLa bels:funct ion(e){t.s afeSetObje ctArray(th is.options ,"optionLa bels",e)}, sortEnum:f unction(){ | |
| 45 | var e=this .getEnum() ;if(e&&e.l ength>0){f or(var n=t his.getOpt ionLabels( ),i=[],a=0 ;a<e.lengt h;a++){var r=e[a],o= e[a];n&&n. length>=a+ 1&&(o=n[a] ),i.push({ value:r,te xt:o})}thi s.sortSele ctableOpti ons(i);for (var l=[], s=[],a=0;a <i.length; a++)l.push (i[a].valu e),t.isArr ay(n)&&s.p ush(i[a].t ext);this. setEnum(l) ,this.setO ptionLabel s(s)}},sor tSelectabl eOptions:f unction(e) {var n=thi s;if(n.opt ions.sort! ==!1){var i=t.defaul tSort;n.op tions.sort &&"functio n"==typeof n.options .sort&&(i= n.options. sort),e.so rt(i)}},in vokeDataSo urce:funct ion(n,i,a) {var r=thi s,o=functi on(e){var t=this;ret urn e?a(e) :void t.af terLoadDat aSourceOpt ions(n,i,f unction(e, n){return e?a(e):(t. sortSelect ableOption s(n),void a(null,n)) })}.bind(r );if(t.isF unction(r. options.da taSource)) r.options. dataSource .call(r,fu nction(e){ if(t.isArr ay(e)){for (var i=0;i <e.length; i++)"strin g"==typeof e[i]?n.pu sh({text:e [i],value: e[i]}):t.i sObject(e[ i])&&n.pus h(e[i]);o( )}else if( t.isObject (e)){for(v ar a in e) n.push({te xt:a,value :e[a]});o( )}else o() });else if (t.isUri(r .options.d ataSource) ){var l=r. view.local e,s=""+r.o ptions.dat aSource;l& &(s+=-1=== s.indexOf( "?")?"?":" &",s+="loc ale="+l),e .ajax({url :s,type:"g et",dataTy pe:"json", success:fu nction(i){ var a=i;r. options.ds Transforme r&&t.isFun ction(r.op tions.dsTr ansformer) &&(a=r.opt ions.dsTra nsformer(a )),a&&(t.i sObject(a) ?(e.each(a ,function( e,t){n.pus h({value:e ,text:t})} ),o()):t.i sArray(a)& &(e.each(a ,function( e,t){n.pus h({value:t .value,tex t:t.text}) }),o()))}, error:func tion(e,t,n ){r.errorC allback({m essage:"Un able to lo ad data fr om uri : " +r.options .dataSourc e,stage:"D ATASOURCE_ LOADING_ER ROR",detai ls:{jqXHR: e,textStat us:t,error Thrown:n}} )}})}else if(t.isArr ay(r.optio ns.dataSou rce)){for( var u=r.op tions.data Source,c=0 ;c<u.lengt h;c++)"str ing"==type of u[c]?n. push({text :u[c],valu e:u[c]}):t .isObject( u[c])&&n.p ush(u[c]); o()}else i f(t.isObje ct(r.optio ns.dataSou rce))if(r. options.da taSource.c onnector){ var d=r.co nnector;if (t.isObjec t(r.option s.dataSour ce.connect or)){var p =r.options .dataSourc e.connecto r.id,h=r.o ptions.dat aSource.co nnector.co nfig;h||(h ={});var f =t.getConn ectorClass (p);f&&(d= new f(p,h) )}var m=r. options.da taSource.c onfig;m||( m={}),d.lo adDataSour ce(m,funct ion(e){for (var i=0;i <e.length; i++)"strin g"==typeof e[i]?n.pu sh({text:e [i],value: e[i]}):t.i sObject(e[ i])&&n.pus h(e[i]);o( )})}else{f or(var g i n r.option s.dataSour ce)n.push( {text:r.op tions.data Source[g], value:g}); o()}else a ()},afterL oadDataSou rceOptions :function( e,t,n){n(n ull,e)},ge tSchemaOfS chema:func tion(){ret urn t.merg e(this.bas e(),{prope rties:{"en um":{title :"Enumerat ed Values" ,descripti on:"List o f specific values fo r this pro perty",typ e:"array"} }})},getOp tionsForSc hema:funct ion(){retu rn t.merge (this.base (),{fields :{"enum":{ itemLabel: "Value",ty pe:"array" }}})},getS chemaOfOpt ions:funct ion(){retu rn t.merge (this.base (),{proper ties:{name :{title:"F ield Name" ,descripti on:"Field Name.",typ e:"string" },sort:{ti tle:"Sort Function", descriptio n:"Defines an f(a,b) sort func tion for t he array o f enumerat ed values [{text, va lue}]. Th is is used to sort e num and op tionLabels as well a s results that come back from any data s ources (fo r select a nd radio c ontrols). By defaul t the item s are sort ed alphabe tically. Don't app ly any sor ting if fa lse.",type :"function "}}})},get OptionsFor Options:fu nction(){r eturn t.me rge(this.b ase(),{fie lds:{name: {type:"tex t"}}})}}), t.register Messages({ invalidVal ueOfEnum:" This field should ha ve one of the values in {0}. Current va lue is: {1 }"})}(jQue ry),functi on(e){var t=e.alpaca ;t.Contain erField=t. Field.exte nd({onCons truct:func tion(){thi s.isContai nerField=! 0},isConta iner:funct ion(){retu rn!0},getC ontainerEl :function( ){return t his.contai ner},getTe mplateDesc riptorId:f unction(){ return"con tainer"},r esolveCont ainerTempl ateType:fu nction(){v ar e=!1,t= null,n=thi s;do if(n. getFieldTy pe){var i= this.view. getTemplat eDescripto r("contain er-"+n.get FieldType( ),this);i? (t=n.getFi eldType(), e=!0):n=n. constructo r.ancestor .prototype }else e=!0 ;while(!e) ;return t} ,resolveCo ntainerIte mTemplateT ype:functi on(){var e =!1,t=null ,n=this;do if(n.getF ieldType){ var i=this .view.getT emplateDes criptor("c ontainer-" +n.getFiel dType()+"- item",this );i?(t=n.g etFieldTyp e(),e=!0): n=n.constr uctor.ance stor.proto type}else e=!0;while (!e);retur n t},setup :function( ){var e=th is;this.ba se();var n =e.resolve ContainerT emplateTyp e();if(!n) return t.t hrowErrorW ithCallbac k("Unable to find te mplate des criptor fo r containe r: "+e.get FieldType( ));this.co ntainerDes criptor=th is.view.ge tTemplateD escriptor( "container -"+n,e);va r i=!1;t.i sEmpty(thi s.view.col lapsible)| |(i=this.v iew.collap sible),t.i sEmpty(thi s.options. collapsibl e)||(i=thi s.options. collapsibl e),this.op tions.coll apsible=i; var a="but ton";t.isE mpty(this. view.legen dStyle)||( a=this.vie w.legendSt yle),t.isE mpty(this. options.le gendStyle) ||(a=this. options.le gendStyle) ,this.opti ons.legend Style=a,th is.lazyLoa ding=!1,t. isEmpty(th is.options .lazyLoadi ng)||(this .lazyLoadi ng=this.op tions.lazy Loading,th is.lazyLoa ding&&(thi s.options. collapsed= !0)),this. children=[ ],this.chi ldrenById= {},this.ch ildrenByPr opertyId={ }},destroy :function( ){this.for m&&(this.f orm.destro y(!0),dele te this.fo rm),t.each (this.chil dren,funct ion(){this | |
| 46 | .destroy() }),this.ba se()},rend erFieldEle ments:func tion(n){va r i=this;t his.contai ner=e(this .field).fi nd("."+t.M ARKER_CLAS S_CONTAINE R_FIELD),t his.contai ner.remove Class(t.MA RKER_CLASS _CONTAINER _FIELD),i. prepareCon tainerMode l(function (e){i.befo reRenderCo ntainer(e, function() {i.renderC ontainer(e ,function( a){a&&(i.c ontainer.r eplaceWith (a),i.cont ainer=a,i. container. addClass(t .CLASS_CON TAINER)),i .view.hori zontal?i.c ontainer.a ddClass("a lpaca-hori zontal"):i .container .addClass( "alpaca-ve rtical"),i .fireCallb ack("conta iner"),i.a fterRender Container( e,function (){n()})}) })})},prep areContain erModel:fu nction(e){ var t=this ,n={id:thi s.getId(), name:this. name,schem a:this.sch ema,option s:this.opt ions,view: this.view} ;t.createI tems(funct ion(t){t|| (t=[]);for (var i=0;i <t.length; i++)t[i].c ontainerIt emEl||(t[i ].containe rItemEl=t[ i].getFiel dEl());n.i tems=t,e(n )})},befor eRenderCon tainer:fun ction(e,t) {t()},rend erContaine r:function (e,n){var i=null;thi s.containe rDescripto r&&(i=t.tm pl(this.co ntainerDes criptor,e) ),n(i)},af terRenderC ontainer:f unction(e, t){var n=t his;n.befo reApplyCre atedItems( e,function (){n.apply CreatedIte ms(e,funct ion(){n.af terApplyCr eatedItems (e,functio n(){t()})} )})},postR ender:func tion(e){th is.base(fu nction(){e ()})},init Events:fun ction(){th is.base()} ,createIte ms:functio n(e){e()}, beforeAppl yCreatedIt ems:functi on(e,t){t( )},applyCr eatedItems :function( n,i){var a =this,r=nu ll;if(a.is TopLevel() &&a.view.g etLayout() &&(r=a.vie w.getLayou t().bindin gs,!r&&a.v iew.getLay out().temp lateDescri ptor&&n.it ems.length >0)){r={}; for(var o= 0;o<n.item s.length;o ++){var l= n.items[o] .name;r[l] ="[data-al paca-layou t-binding= '"+l+"']"} }n.items.l ength>0?(e (a.contain er).addCla ss("alpaca -container -has-items "),e(a.con tainer).at tr("data-a lpaca-cont ainer-item -count",n. items.leng th)):(e(a. container) .removeCla ss("alpaca -container -has-items "),e(a.con tainer).re moveAttr(" data-alpac a-containe r-item-cou nt"));for( var o=0;o< n.items.le ngth;o++){ var s=n.it ems[o],u=e (a.contain er).find(" ."+t.MARKE R_CLASS_CO NTAINER_FI ELD_ITEM+" ["+t.MARKE R_DATA_CON TAINER_FIE LD_ITEM_KE Y+"='"+s.n ame+"']"); if(r){var c=r[s.name ];if(c){va r d=e(c,a. field);if( 0==d.lengt h)try{d=e( "#"+c,a.fi eld)}catch (p){}d.len gth>0&&(s. domEl=e("< div></div> "),e(s.dom El).addCla ss("alpaca -layout-bi nding-hold er"),e(s.d omEl).attr ("alpaca-l ayout-bind ing-field- name",s.na me),d.appe nd(s.domEl ),s.domEl. append(s.c ontainerIt emEl))}e(u ).remove() }else{var d=e(u).par ent();e(u) .replaceWi th(s.conta inerItemEl ),s.domEl= d}e(s.cont ainerItemE l).addClas s("alpaca- container- item"),0== =o&&e(s.co ntainerIte mEl).addCl ass("alpac a-containe r-item-fir st"),o+1== =n.items.l ength&&e(s .container ItemEl).ad dClass("al paca-conta iner-item- last"),e(s .container ItemEl).at tr("data-a lpaca-cont ainer-item -index",o) ,e(s.conta inerItemEl ).attr("da ta-alpaca- container- item-name" ,s.name),e (s.contain erItemEl). attr("data -alpaca-co ntainer-it em-parent- field-id", a.getId()) ,a.registe rChild(s,o )}a.option s.collapsi ble&&a.fir eCallback( "collapsib le"),a.tri ggerUpdate (),i()},af terApplyCr eatedItems :function( e,t){t()}, registerCh ild:functi on(e,n){t. isEmpty(n) ?this.chil dren.push( e):this.ch ildren.spl ice(n,0,e) ,this.chil drenById[e .getId()]= e,e.proper tyId&&(thi s.children ByProperty Id[e.prope rtyId]=e), e.parent=t his},unreg isterChild :function( e){var n=t his.childr en[e];n&&( t.isEmpty( e)||this.c hildren.sp lice(e,1), delete thi s.children ById[n.get Id()],n.pr opertyId&& delete thi s.children ByProperty Id[n.prope rtyId],n.p arent=null )},updateD OMElement: function() {var t=thi s;this.bas e(),t.chil dren.lengt h>0?(e(t.g etContaine rEl()).add Class("alp aca-contai ner-has-it ems"),e(t. getContain erEl()).at tr("data-a lpaca-cont ainer-item -count",t. children.l ength)):(e (t.getCont ainerEl()) .removeCla ss("alpaca -container -has-items "),e(t.get ContainerE l()).remov eAttr("dat a-alpaca-c ontainer-i tem-count" ));for(var n=0;n<t.c hildren.le ngth;n++){ var i=t.ch ildren[n]; i.path||(" array"===i .schema.ty pe?i.path= t.path+"[" +n+"]":i.p ath=t.path +"/"+i.pro pertyId),i .calculate Name(),e(i .container ItemEl).re moveClass( "alpaca-co ntainer-it em-first") ,e(i.conta inerItemEl ).removeCl ass("alpac a-containe r-item-las t"),e(i.co ntainerIte mEl).remov eClass("al paca-conta iner-item- index"),e( i.containe rItemEl).r emoveClass ("alpaca-c ontainer-i tem-key"), e(i.contai nerItemEl) .addClass( "alpaca-co ntainer-it em"),0===n &&e(i.cont ainerItemE l).addClas s("alpaca- container- item-first "),n+1===t .children. length&&e( i.containe rItemEl).a ddClass("a lpaca-cont ainer-item -last"),e( i.containe rItemEl).a ttr("data- alpaca-con tainer-ite m-index",n ),e(i.cont ainerItemE l).attr("d ata-alpaca -container -item-name ",i.name), e(i.contai nerItemEl) .attr("dat a-alpaca-c ontainer-i tem-parent -field-id" ,t.getId() ),t.update ChildDOMWr apperEleme nt(n,i),i. updateDOME lement()}} ,updateChi ldDOMWrapp erElement: function(e ,t){},hand leRepositi onDOMRefre sh:functio n(){var e= this;e.get Parent()?e .getParent ().updateD OMElement( ):e.update DOMElement ()},onDepe ndentRevea l:function (){for(var e=0;e<thi s.children .length;e+ +)this.chi ldren[e].o nDependent Reveal()}, onDependen tConceal:f unction(){ for(var e= 0;e<this.c hildren.le ngth;e++)t his.childr en[e].onDe pendentCon ceal()},fo cus:functi on(t){var n=this;if( this.isDis playOnly() )return vo id(t&&t()) ;this.base ();var i=- 1,a=[],r=t | |
| 47 | his.getCon tainerEl() ;this.form &&(r=this. form.getFo rmEl()),e( r).find(". alpaca-con tainer-ite m[data-alp aca-contai ner-item-p arent-fiel d-id='"+th is.getId() +"']").eac h(function (){var t=e (this).att r("data-al paca-conta iner-item- index");a. push(n.chi ldren[t])} );for(var o=0;o<a.le ngth;o++)i f(a[o]&&!a [o].isVali d(!0)&&a[o ].isContro lField&&a[ o].isAutoF ocusable() &&!a[o].op tions.read only){i=o; break}-1== =i&&a.leng th>0&&(i=0 ),i>-1&&(a [i].focus( ),t&&t(a[i ]))},disab le:functio n(){if(!th is.options .readonly) {this.base ();for(var e=0;e<thi s.children .length;e+ +)this.chi ldren[e].d isable()}} ,enable:fu nction(){i f(!this.op tions.read only){this .base();fo r(var e=0; e<this.chi ldren.leng th;e++)thi s.children [e].enable ()}},getVa lue:functi on(){var e =this,t=e. getContain erValue(); return t}, getContain erValue:fu nction(){r eturn null },firstChi ld:functio n(){var e= null;retur n this.chi ldren.leng th>0&&(e=t his.childr en[0]),e}, lastChild: function() {var e=nul l;return t his.childr en.length> 0&&(e=this .children[ this.child ren.length -1]),e},ge tSchemaOfO ptions:fun ction(){re turn t.mer ge(this.ba se(),{prop erties:{la zyLoading: {title:"La zy Loading ",descript ion:"Child fields wi ll only be rendered when the f ieldset is expanded if this op tion is se t true.",t ype:"boole an","defau lt":!1},co llapsible: {title:"Co llapsible" ,descripti on:"Field set is col lapsible i f true.",t ype:"boole an","defau lt":!1},co llapsed:{t itle:"Coll apsed",des cription:" Field set is initial ly collaps ed if true .",type:"b oolean","d efault":!1 },legendSt yle:{title :"Legend S tyle",desc ription:"F ield set l egend styl e.",type:" string","e num":["but ton","link "],"defaul t":"button "},animate :{title:"A nimate mov ements and transitio ns",descri ption:"Up and down t ransitions will be a nimated",t ype:"boole an","defau lt":!0}}}) },getOptio nsForOptio ns:functio n(){return t.merge(t his.base() ,{fields:{ lazyLoadin g:{rightLa bel:"Lazy loading ch ild fields ?",helper :"Lazy loa ding will be enabled if checke d.",type:" checkbox"} ,collapsib le:{rightL abel:"Fiel d set coll apsible ?" ,helper:"F ield set i s collapsi ble if che cked.",typ e:"checkbo x"},collap sed:{right Label:"Fie ld set ini tially col lapsed ?", descriptio n:"Field s et is init ially coll apsed if c hecked.",t ype:"check box"},lege ndStyle:{t ype:"selec t"},animat e:{rightLa bel:"Anima te movemen ts and tra nsitions", type:"chec kbox"}}})} })}(jQuery ),function (e){var t= e.alpaca;t .Form=Base .extend({c onstructor :function( e,n,i,a,r) {if(this.d omEl=e,thi s.parent=n ull,this.c onnector=a ,this.erro rCallback= r,this.opt ions=n,thi s.options. attributes ?this.attr ibutes=thi s.options. attributes :this.attr ibutes={}, this.optio ns.buttons ){this.opt ions.butto ns.submit& &(this.opt ions.butto ns.submit. type||(thi s.options. buttons.su bmit.type= "submit"), this.optio ns.buttons .submit.na me||(this. options.bu ttons.subm it.name="s ubmit"),th is.options .buttons.s ubmit.valu e||(this.o ptions.but tons.submi t.value="S ubmit")),t his.option s.buttons. reset&&(th is.options .buttons.r eset.type| |(this.opt ions.butto ns.reset.t ype="reset "),this.op tions.butt ons.reset. name||(thi s.options. buttons.re set.name=" reset"),th is.options .buttons.r eset.value ||(this.op tions.butt ons.reset. value="Res et"));for( var o in t his.option s.buttons) this.optio ns.buttons [o].label& &(this.opt ions.butto ns[o].valu e=this.opt ions.butto ns[o].labe l),this.op tions.butt ons[o].tit le&&(this. options.bu ttons[o].v alue=this. options.bu ttons[o].t itle),this .options.b uttons[o]. type||(thi s.options. buttons[o] .type="but ton")}this .attribute s.id?this. id=this.at tributes.i d:(this.id =t.generat eId(),this .attribute s.id=this. id),this.o ptions.but tons&&this .options.b uttons.sub mit&&t.isU ndefined(t his.option s.toggleSu bmitValidS tate)&&(th is.options .toggleSub mitValidSt ate=!0),th is.viewTyp e=n.viewTy pe,this.vi ew=new t.R untimeView (i,this);f or(var o i n this.opt ions.butto ns)this.op tions.butt ons[o].sty les||(this .options.b uttons[o]. styles=thi s.view.sty les.button )},render: function(e ){var t=th is;this.pr ocessRende r(this.dom El,functio n(){t.form .appendTo( t.domEl),t .form.addC lass("alpa ca-form"), t.fireCall back("form "),e(t)})} ,afterInit ialize:fun ction(){va r e=this;e .options.t oggleSubmi tValidStat e&&e.adjus tSubmitBut tonState() },isFormVa lid:functi on(){this. topControl .validate( !0);var e= this.topCo ntrol.isVa lid(!0);re turn e},is Valid:func tion(){ret urn this.i sFormValid ()},valida te:functio n(e){retur n this.top Control.va lidate(e)} ,enableSub mitButton: function() {if(e(".al paca-form- button-sub mit").attr Prop("disa bled",!1), e.mobile)t ry{e(".alp aca-form-b utton-subm it").butto n("refresh ")}catch(t ){}},disab leSubmitBu tton:funct ion(){if(e (".alpaca- form-butto n-submit") .attrProp( "disabled" ,!0),e.mob ile)try{e( ".alpaca-f orm-button -submit"). button("re fresh")}ca tch(t){}}, adjustSubm itButtonSt ate:functi on(){this. disableSub mitButton( ),this.isF ormValid() &&this.ena bleSubmitB utton()},p rocessRend er:functio n(n,i){var a=this;if (this.f
|
|
| 48 | .MARKER_CL ASS_FORM_I TEMS_FIELD ),t.isEmpt y(this.for m.attr("id "))&&this. form.attr( "id",this. getId()+"- form-outer "),t.isEmp ty(this.fo rm.attr("d ata-alpaca -form-id") )&&this.fo rm.attr("d ata-alpaca -form-id", this.getId ()),e(n).f ind("form" ).attr(thi s.attribut es),this.b uttons={}, e(n).find( ".alpaca-f orm-button ").each(fu nction(){e (this).cli ck(functio n(t){e(thi s).attr("b utton-push ed",!0)}); var t=e(th is).attr(" data-key") ;if(t){var n=a.optio ns.buttons [t];n&&n.c lick&&e(th is).click( function(e ,t){return function( n){n.preve ntDefault( ),t.call(e ,n)}}(a,n. click))}}) ,i()},getI d:function (){return this.id},g etType:fun ction(){re turn this. type},getP arent:func tion(){ret urn this.p arent},get Value:func tion(){ret urn this.t opControl. getValue() },setValue :function( e){this.to pControl.s etValue(e) },initEven ts:functio n(){var t= this,n=e(t his.domEl) .find("for m"),i=this .getValue( );e(n).sub mit(i,func tion(e){re turn t.onS ubmit(e,t) }),this.op tions.togg leSubmitVa lidState&& (e(t.topCo ntrol.getF ieldEl()). bind("fiel dupdate",f unction(){ t.adjustSu bmitButton State()}), e(t.topCon trol.getFi eldEl()).b ind("field keyup",fun ction(){t. adjustSubm itButtonSt ate()}),e( t.topContr ol.getFiel dEl()).bin d("fieldbl ur",functi on(){t.adj ustSubmitB uttonState ()}))},get ButtonEl:f unction(t) {return e( this.domEl ).find(".a lpaca-form -button-"+ t)},onSubm it:functio n(e,n){if( !this.isFo rmValid()) return e.s topPropaga tion(),thi s.refreshV alidationS tate(!0),! 1;if(this. submitHand ler){e.sto pPropagati on();var i =this.subm itHandler( e,n);retur n t.isUnde fined(i)&& (i=!1),i}} ,registerS ubmitHandl er:functio n(e){t.isF unction(e) &&(this.su bmitHandle r=e)},refr eshValidat ionState:f unction(e, t){this.to pControl.r efreshVali dationStat e(e,t)},di sable:func tion(){thi s.topContr ol.disable ()},enable :function( ){this.top Control.en able()},fo cus:functi on(e){this .topContro l.focus(fu nction(t){ e&&e(t)})} ,destroy:f unction(e) {this.getF ormEl().re move(),!e& &this.pare nt&&this.p arent.dest roy()},sho w:function (){this.ge tFormEl(). css({displ ay:""})},h ide:functi on(){this. getFormEl( ).css({dis play:"none "})},clear :function( e){this.to pControl.c lear(e)},i sEmpty:fun ction(){re turn this. topControl .isEmpty() },fireCall back:funct ion(e,t,n, i,a,r){thi s.view.fir eCallback( this,e,t,n ,i,a,r)},g etFormEl:f unction(){ return thi s.form},su bmit:funct ion(){this .form.subm it()},ajax Submit:fun ction(n){v ar i=this; n||(n={}), n.url=i.op tions.attr ibutes.act ion,n.type =i.options .attribute s.method,n .data||(n. data=this. getValue() ),n.dataTy pe||(n.dat aType="jso n"),n.head ers||(n.he aders={}); var a=i.de termineCsr fToken();r eturn a&&( n.headers[ t.CSRF_HEA DER_NAME]= a),e.ajax( n)},determ ineCsrfTok en:functio n(){var e= t.CSRF_TOK EN;if(!e)f or(var n=0 ;n<t.CSRF_ COOKIE_NAM ES.length; n++){var i =t.CSRF_CO OKIE_NAMES [n],a=t.re adCookie(i );if(a){e= a;break}}r eturn e}}) }(jQuery), function(e ){var t=e. alpaca,n=3 6e5;t.Conn ector=Base .extend({c onstructor :function( e,a){this. id=e,this. config=a,t his.isUri= function(e ){return!t .isEmpty(e )&&t.isUri (e)},this. cache=new i("URL",!0 ,n)},conne ct:functio n(e,t){e() },loadTemp late:funct ion(e,n,i) {t.isEmpty (e)?i({mes sage:"Empt y data sou rce.",reas on:"TEMPLA TE_LOADING _ERROR"}): t.isUri(e) ?this.load Uri(e,!1,f unction(e) {n&&t.isFu nction(n)& &n(e)},fun ction(e){i &&t.isFunc tion(i)&&i (e)}):n(e) },loadData :function( e,t,n,i){r eturn this ._handleLo adJsonReso urce(e,n,i )},loadSch ema:functi on(e,t,n,i ){return t his._handl eLoadJsonR esource(e, n,i)},load Options:fu nction(e,t ,n,i){retu rn this._h andleLoadJ sonResourc e(e,n,i)}, loadView:f unction(e, t,n,i){ret urn this._ handleLoad JsonResour ce(e,n,i)} ,loadAll:f unction(e, n,i){var a =this,r=fu nction(){v ar r=e.dat aSource,o= e.schemaSo urce,l=e.o ptionsSour ce,s=e.vie wSource;o| |"string"! =typeof e. schema||(o =e.schema) ,l||"strin g"!=typeof e.options ||(l=e.opt ions),s||" string"!=t ypeof e.vi ew||(s=e.v iew);var u ={},c=0,d= 0,p=functi on(){c===d &&n&&t.isF unction(n) &&n(u.data ,u.options ,u.schema, u.view)},h =function( e){i&&t.is Function(i )&&i(e)};i f(r&&d++,o &&d++,l&&d ++,s&&d++, 0===d)retu rn void p( );var f=fu nction(e,n ,i){u[e]=n ,i&&("obje ct"==typeo f u[e]&&"o bject"==ty peof i?t.m ergeObject (u[e],i):u [e]=i)};r& &a.loadDat a(r,e,func tion(t){f( "data",e.d ata,t),c++ ,p()},h),o &&a.loadSc hema(o,e,f unction(t) {f("schema ",e.schema ,t),c++,p( )},h),l&&a .loadOptio ns(l,e,fun ction(t){f ("options" ,e.options ,t),c++,p( )},h),s&&a .loadView( s,e,functi on(t){f("v iew",e.vie w,t),c++,p ()},h)},o= function(e ){i&&t.isF unction(i) &&i(e)};a. connect(r, o)},loadJs on:functio n(e,t,n){t his.loadUr i(e,!0,t,n )},buildAj axConfig:f unction(e, t){var n={ url:e,type :"get"};re turn t?n.d ataType="j son":n.dat aType="tex t",n},load Uri:functi on(n,i,a,r ){var o=th is,l=o.bui ldAjaxConf ig(n,i);l. success=fu nction(e){ o.cache.pu t(n,e),a&& t.isFuncti on(a)&&a(e )},l.error =function( e,i,a){r&& t.isFuncti on(r)&&r({ message:"U nable to l oad data f rom uri : "+n,stage: "DATA_LOAD ING_ERROR" ,details:{ jqXHR:e,te xtStatus:i ,errorThro wn:a}})};v ar s=o.cac he.get(n); s!==!1&&a& &t.isFunct ion(a)?a(s ):e.ajax(l )},loadRef erenceSche ma:functio n(e,t,n){r eturn this ._handleLo adJsonReso urce(e,t,n )},loadRef erenceOpti ons:functi on(e,t,n){ return thi s._handleL oadJsonRes ource(e,t, n)},_handl eLoadJsonR esource:fu nction(e,t ,n){this.i sUri(e)?th is.loadJso n(e,functi on(e){t(e) },n):t(e)} ,loadDataS ource:func tion(e,t,n ){return t | |
| 49 | his._handl eLoadDataS ource(e,t, n)},_handl eLoadDataS ource:func tion(e,n,i ){var a=e; return t.i sObject(a) &&(a=e.url ),this._ha ndleLoadJs onResource (a,n,i)}}) ,t.registe rConnector Class("def ault",t.Co nnector);v ar i=funct ion(e,t,n) {switch(t? this.on=!0 :this.on=! 1,null!=n& &(this.def aultLifeti me=n),this .type=e,th is.type){c ase"URL":t his.put=th is.put_url ;break;cas e"GET":thi s.put=this .put_GET}} ;i.prototy pe.on=!1,i .prototype .type=void 0,i.proto type.defau ltLifetime =18e5,i.pr ototype.it ems={},i.p rototype.p ut_url=fun ction(e,t, n){null==n &&(n=this. defaultLif etime);var i=this.ma ke_key(e); return thi s.items[i] ={},this.i tems[i].ke y=i,this.i tems[i].ur l=e,this.i tems[i].re sponse=t,t his.items[ i].expire= (new Date) .getTime() +n,!0},i.p rototype.p ut_GET=fun ction(e,t, n,i){null= =i&&(i=thi s.defaultL ifetime);v ar a=this. make_key(e ,[t]);retu rn this.it ems[a]={}, this.items [a].key=a, this.items [a].url=e, this.items [a].data=t ,this.item s[a].respo nse=n,this .items[a]. expire=(ne w Date).ge tTime()+i, !0},i.prot otype.get= function(e ,t){var n= this.make_ key(e,t);r eturn null ==this.ite ms[n]?!1:t his.items[ n].expire< (new Date) .getTime() ?!1:this.i tems[n].re sponse},i. prototype. make_key=f unction(e, t){var n=e ;switch(th is.type){c ase"URL":b reak;case" GET":n+=th is.stringi fy(t[0])}r eturn n},i .prototype .flush=fun ction(){re turn cache .items={}, | |
| 50 | !0},i.prot otype.stri ngify=func tion(e,t,n ){var i;if (gap="",in dent="","n umber"==ty peof n)for (i=0;n>i;i +=1)indent +=" ";else "string"== typeof n&& (indent=n) ;if(rep=t, t&&"functi on"!=typeo f t&&("obj ect"!=type of t||"num ber"!=type of t.lengt h))throw n ew Error(" JSON.strin gify");ret urn this.s tr("",{"": e})},i.pro totype.quo te=functio n(e){var t =/[\\\"\x0 0-\x1f\x7f -\x9f\u00a d\u0600-\u 0604\u070f \u17b4\u17 b5\u200c-\ u200f\u202 8-\u202f\u 2060-\u206 f\ufeff\uf ff0-\uffff ]/g;return t.lastInd ex=0,t.tes t(e)?'"'+e .replace(t ,function( e){var t=m eta[e];ret urn"string "==typeof t?t:"\\u"+ ("0000"+e. charCodeAt (0).toStri ng(16)).sl ice(-4)})+ '"':'"'+e+ '"'},i.pro totype.str =function( e,t){var n ,i,a,r,o,l =gap,s=t[e ];switch(s &&"object" ==typeof s &&"functio n"==typeof s.toJSON& &(s=s.toJS ON(e)),"fu nction"==t ypeof rep& &(s=rep.ca ll(t,e,s)) ,typeof s) {case"stri ng":return this.quot e(s);case" number":re turn isFin ite(s)?Str ing(s):"nu ll";case"b oolean":ca se"null":r eturn Stri ng(s);case "object":i f(!s)retur n"null";if (gap+=inde nt,o=[],"[ object Arr ay]"===Obj ect.protot ype.toStri ng.apply(s )){for(r=s .length,n= 0;r>n;n+=1 )o[n]=this .str(n,s)| |"null";re turn a=0== =o.length? "[]":gap?" [\n"+gap+o .join(",\n "+gap)+"\n "+l+"]":"[ "+o.join(" ,")+"]",ga p=l,a}if(r ep&&"objec t"==typeof rep)for(r =rep.lengt h,n=0;r>n; n+=1)i=rep [n],"strin g"==typeof i&&(a=thi s.str(i,s) ,a&&o.push (this.quot e(i)+(gap? ": ":":")+ a));else f or(i in s) Object.has OwnPropert y.call(s,i )&&(a=this .str(i,s), a&&o.push( this.quote (i)+(gap?" : ":":")+a ));return a=0===o.le ngth?"{}": gap?"{\n"+ gap+o.join (",\n"+gap )+"\n"+l+" }":"{"+o.j oin(",")+" }",gap=l,a }}}(jQuery ),function (e){var t= e.alpaca;t .CloudCmsC onnector=t .Connector .extend({c onnect:fun ction(e,n) {var i=thi s,a=functi on(t,a){re turn t?voi d n(t):(a& &(i.branch =Chain(a), i.bindHelp erFunction s(i.branch )),void e( ))};t.glob alContext& &t.globalC ontext.bra nch?a(null ,t.globalC ontext.bra nch):(i.br anch=null, i.doConnec t(function (e,t){a(e, t)}))},doC onnect:fun ction(e){t his.config .key||(thi s.config.k ey="defaul t"),Gitana .connect(t his.config ,function( t){return t?void e(t ):void(thi s.getDrive r().getOri ginalConfi guration() .loadAppHe lper?this. datastore( "content") .readBranc h("master" ).then(fun ction(){e( null,this) }):e())})} ,bindHelpe rFunctions :function( e){e.loadA lpacaSchem a||(e.load AlpacaSche ma=functio n(t,n,i){v ar a=funct ion(){retu rn e.getUr i()+"/alpa ca/schema" },r={};ret urn r.id=t ,this.chai nGetRespon se(this,a, r).then(fu nction(e){ i.call(thi s,null,e)} )}),e.load AlpacaOpti ons||(e.lo adAlpacaOp tions=func tion(t,n,i ){var a=fu nction(){r eturn e.ge tUri()+"/a lpaca/opti ons"},r={} ;return r. schemaId=n .schemaSou rce,r.id=t ,this.chai nGetRespon se(this,a, r).then(fu nction(e){ i.call(thi s,null,e)} )}),e.load AlpacaData ||(e.loadA lpacaData= function(t ,n,i){var a=function (){return e.getUri() +"/alpaca/ data"},r={ };return r .id=t,this .chainGetR esponse(th is,a,r).th en(functio n(e){i.cal l(this,nul l,e)})}),e .loadAlpac aDataSourc e||(e.load AlpacaData Source=fun ction(n,i, a){var r={ };i&&t.cop yInto(r,i) ;var o=fun ction(){re turn e.get Uri()+"/al paca/datas ource"};re turn this. chainPostR esponse(th is,o,r,n). then(funct ion(e){a.c all(this,n ull,e.data source)})} )},loadDat a:function (e,t,n,i){ var a=this ;return a. branch?voi d a.branch .loadAlpac aData(e,t, function(e ,t){if(e)r eturn void i(e);var a=null;t&& (a=JSON.pa rse(JSON.s tringify(t ))),n(a)}) :this.base (e,t,n,i)} ,loadSchem a:function (e,t,n,i){ var a=this ;return a. branch?voi d a.branch .loadAlpac aSchema(e, t,function (e,t){retu rn e?void i(e):void n(t)}):thi s.base(e,t ,n,i)},loa dOptions:f unction(e, n,i,a){var r=this;re turn r.bra nch?void r .branch.lo adAlpacaOp tions(e,n, function(e ,n){return e?void a( e):(n||(n= {}),n.form .buttons={ submit:{ti tle:"Submi t",click:f unction(e) {var t=thi s,n=this.g etValue(); n||(n={}); var i=this .ajaxSubmi t({xhrFiel ds:{withCr edentials: !0},crossD omain:!0,p rocessData :!1,data:J SON.string ify(n),con tentType:" applicatio n/json; ch arset=utf- 8"});i.don e(function (){t.topCo ntrol.trig ger("formS ubmitSucce ss")}),i.f ail(functi on(){t.top Control.tr igger("for mSubmitFai l")})}}}," undefined" ==typeof n .focus&&(n .focus=t.d efaultFocu s),n.form. attributes .action=r. config.bas eURL+n.for m.attribut es.action, void i(n)) }):this.ba se(e,n,i,a )},loadRef erenceSche ma:functio n(e,t,n){v ar i=this; return i.l oadSchema( e,t,n)},lo adReferenc eOptions:f unction(e, t,n){var i =this;retu rn i.loadO ptions(e,t ,n)},loadD ataSource: function(e ,t,n){var i=this;if( !i.branch) return thi s.base(e,t ,n);var a= e.paginati on;return delete e.p agination, i.branch.l oadAlpacaD ataSource( e,a,functi on(e,i){re turn e?voi d n(e):voi d t(i)})}} ),t.regist erConnecto rClass("cl oudcms",t. CloudCmsCo nnector)}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.TextFi eld=t.Cont rolField.e xtend({get FieldType: function() {return"te xt"},setup :function( ){this.bas e(),this.i nputType|| (this.inpu tType="tex t"),this.o ptions.inp utType&&(t his.inputT ype=this.o ptions.inp utType),th is.options .data||(th is.options .data={}), this.optio ns.attribu tes||(this .options.a ttributes= {}),"undef ined"==typ eof this.o ptions.all owOptional Empty&&(th is.options .allowOpti onalEmpty= !0),this.o ptions.aut ocomplete& &"string"= =typeof th is.options .autocompl ete&&("on" ===this.op tions.auto complete.t oLowerCase ()?this.op tions.auto complete=! 0:"true"== =this.opti ons.autoco mplete.toL | |
| 51 | owerCase() ?this.opti ons.autoco mplete=!0: "yes"===th is.options .autocompl ete.toLowe rCase()?th is.options .autocompl ete=!0:thi s.options. autocomple te=!1),"un defined"== typeof thi s.options. autocomple te&&(this. options.au tocomplete =!1),"unde fined"==ty peof this. options.di sallowEmpt ySpaces&&( this.optio ns.disallo wEmptySpac es=!1),"un defined"== typeof thi s.options. disallowOn lyEmptySpa ces&&(this .options.d isallowOnl yEmptySpac es=!1)},de stroy:func tion(){thi s.base(),t his.contro l&&this.co ntrol.type ahead&&thi s.options. typeahead& &e(this.co ntrol).typ eahead("de stroy")},p ostRender: function(e ){var t=th is;this.ba se(functio n(){t.cont rol&&(t.ap plyAutocom plete(),t. applyMask( ),t.applyT ypeAhead() ,t.updateM axLengthIn dicator()) ,e()})},ap plyAutocom plete:func tion(){var t=this;"u ndefined"! =typeof t. options.au tocomplete &&(e(t.fie ld).addCla ss("alpaca -autocompl ete"),e(t. control).a ttr("autoc omplete",t .options.a utocomplet e?"on":"of f"),t.fire Callback(" autocomple te"))},app lyMask:fun ction(){va r e=this;e .control.m ask&&e.opt ions.maskS tring&&e.c ontrol.mas k(e.option s.maskStri ng)},apply TypeAhead: function() {var n=thi s;if(n.con trol.typea head&&n.op tions.type ahead&&!t. isEmpty(n. options.ty peahead)){ var i=n.op tions.type ahead.conf ig;i||(i={ });var a=n .options.t ypeahead.d atasets;a| |(a={}),a. name||(a.n ame=n.getI d());var r =n.options .typeahead .events;if (r||(r={}) ,"local"== =a.type||" remote"=== a.type||"p refetch"== =a.type){v ar o={datu mTokenizer :function( e){var t=" ";for(var n in e)(e. hasOwnProp erty(n)||e [n])&&(t+= " "+e[n]); return Blo odhound.to kenizers.w hitespace( t)},queryT okenizer:B loodhound. tokenizers .whitespac e};if("loc al"===a.ty pe){var l= [];if("fun ction"==ty peof a.sou rce)o.loca l=a.source ;else{for( var s=0;s< a.source.l ength;s++) {var u=a.s ource[s];" string"==t ypeof u&&( u={value:u }),l.push( u)}o.local =l}a.local &&(o.local =a.local)} "prefetch" ===a.type& &(o.prefet ch={url:a. source},a. filter&&(o .prefetch. filter=a.f ilter)),"r emote"===a .type&&(o. remote={ur l:a.source },a.filter &&(o.remot e.filter=a .filter),a .replace&& (o.remote. replace=a. replace)), e.each(a,f unction(e, t){"type"! ==e&&"sour ce"!==e&&" filter"!== e&&"replac e"!==e&&"l ocal"!==e& &"template s"!==e&&(o [e]=t)});v ar c=new B loodhound( o);c.initi alize(),a. source=c.t tAdapter() }if(a.temp lates)for( var d in a .templates ){var p=a. templates[ d];"string "==typeof p&&(a.temp lates[d]=H andlebars. compile(p) )}e(n.cont rol).typea head(i,a), e(n.contro l).on("typ eahead:aut ocompleted ",function (t,i){n.se tValue(i.v alue),e(n. control).c hange()}), e(n.contro l).on("typ eahead:sel ected",fun ction(t,i) {n.setValu e(i.value) ,e(n.contr ol).change ()}),r&&(r .autocompl eted&&e(n. control).o n("typeahe ad:autocom pleted",fu nction(e,t ){r.autoco mpleted(e, t)}),r.sel ected&&e(n .control). on("typeah ead:select ed",functi on(e,t){r. selected(e ,t)}));var h=e(n.con trol);e(n. control).c hange(func tion(){var t=e(this) .val(),n=e (h).typeah ead("val") ;n!==t&&e( h).typeahe ad("val",n )}),e(n.fi eld).find( "span.twit ter-typeah ead").firs t().css("d isplay","b lock"),e(n .field).fi nd("span.t witter-typ eahead inp ut.tt-inpu t").first( ).css("bac kground-co lor","")}} ,prepareCo ntrolModel :function( e){var t=t his;this.b ase(functi on(n){n.in putType=t. inputType, e(n)})},up dateMaxLen gthIndicat or:functio n(){var n= this,i=!1, a="";if(!t .isEmpty(n .schema.ma xLength)&& n.options. showMaxLen gthIndicat or){var r= n.getValue ()||"",o=n .schema.ma xLength-r. length;o>= 0?a="You h ave "+o+" characters remaining ":(a="Your message i s too long by "+-1*o +" charact ers",i=!0) ;var l=e(n .field).fi nd(".alpac a-field-te xt-max-len gth-indica tor");0=== l.length&& (l=e("<p c lass='alpa ca-field-t ext-max-le ngth-indic ator'></p> "),e(n.con trol).afte r(l)),e(l) .html(a),e (l).remove Class("err "),i&&e(l) .addClass( "err")}},g etControlV alue:funct ion(){var t=this,n=t his._getCo ntrolVal(! 0);if(t.co ntrol.mask &&t.option s.maskStri ng){var i= e(this.con trol).data (e.mask.da taName);i& &(n=i(),n= t.ensurePr operType(n ))}return n},setValu e:function (e){this.c ontrol&&th is.control .length>0& &(t.isEmpt y(e)?this. control.va l(""):this .control.v al(e)),thi s.base(e), this.updat eMaxLength Indicator( )},handleV alidate:fu nction(){v ar e=this. base(),n=t his.valida tion,i=thi s._validat ePattern() ;return n. invalidPat tern={mess age:i?"":t .substitut eTokens(th is.getMess age("inval idPattern" ),[this.sc hema.patte rn]),statu s:i},i=thi s._validat eMaxLength (),n.strin gTooLong={ message:i? "":t.subst ituteToken s(this.get Message("s tringTooLo ng"),[this .schema.ma xLength]), status:i}, i=this._va lidateMinL ength(),n. stringTooS hort={mess age:i?"":t .substitut eTokens(th is.getMess age("strin gTooShort" ),[this.sc hema.minLe ngth]),sta tus:i},e&& n.invalidP attern.sta tus&&n.str ingTooLong .status&&n .stringToo Short.stat us},_valid atePattern :function( ){if(this. schema.pat tern){var e=this.get Value();if (""===e&&t his.option s.allowOpt ionalEmpty &&!this.is Required() )return!0; if(t.isEmp ty(e)&&(e= ""),"strin g"==typeof e&&!e.mat ch(this.sc hema.patte rn))return !1}return! 0},_valida teMinLengt h:function (){if(!t.i sEmpty(thi s.schema.m inLength)) {var e=thi s.getValue ();if(e!== e&&(e=""), ""===e&&th is.options .allowOpti onalEmpty& &!this.isR equired()) return!0;i f(t.isEmpt y(e)&&(e=" "),(""+e). length<thi s.schema.m inLength)r eturn!1}re turn!0},_v alidateMax Length:fun ction(){if (!t.isEmpt y(this.sch ema.maxLen gth)){var e=this.get | |
| 52 | Value();if (""===e&&t his.option s.allowOpt ionalEmpty &&!this.is Required() )return!0; if(t.isEmp ty(e)&&(e= ""),(""+e) .length>th is.schema. maxLength) return!1}r eturn!0},f ocus:funct ion(t){if( this.contr ol&&this.c ontrol.len gth>0){var n=e(this. control).g et(0);try{ var i=n.va lue?n.valu e.length:0 ;n.selecti onStart=i, n.selectio nEnd=i}cat ch(a){}n.f ocus(),t&& t(this)}}, getType:fu nction(){r eturn"stri ng"},onKey Press:func tion(e){va r n=this;i f(9!==e.ke yCode&&37! ==e.keyCod e&&38!==e. keyCode&&3 9!==e.keyC ode&&40!== e.keyCode) {if(8===e. keyCode){i f(!t.isEmp ty(n.schem a.minLengt h)&&(n.opt ions.const rainLength s||n.optio ns.constra inMinLengt h)){var i= n.getValue ()||"";i.l ength<=n.s chema.minL ength&&(e. preventDef ault(),e.s topImmedia tePropagat ion())}}el se if(!t.i sEmpty(n.s chema.maxL ength)&&(n .options.c onstrainLe ngths||n.o ptions.con strainMaxL ength)){va r i=n.getV alue()||"" ;i.length> =n.schema. maxLength& &(e.preven tDefault() ,e.stopImm ediateProp agation()) }32===e.ke yCode&&n.o ptions.dis allowEmpty Spaces&&(e .preventDe fault(),e. stopImmedi atePropaga tion())}}, onKeyUp:fu nction(t){ var n=this ;n.updateM axLengthIn dicator(), e(this.fie ld).trigge r("fieldke yup")},get Title:func tion(){ret urn"Single -Line Text "},getDesc ription:fu nction(){r eturn"Text field for single-li ne text."} ,getSchema OfSchema:f unction(){ return t.m erge(this. base(),{pr operties:{ minLength: {title:"Mi nimal Leng th",descri ption:"Min imal lengt h of the p roperty va lue.",type :"number"} ,maxLength :{title:"M aximum Len gth",descr iption:"Ma ximum leng th of the property v alue.",typ e:"number" },pattern: {title:"Pa ttern",des cription:" Regular ex pression f or the pro perty valu e.",type:" string"}}} )},getOpti onsForSche ma:functio n(){return t.merge(t his.base() ,{fields:{ "default": {helper:"F ield defau lt value", type:"text "},minLeng th:{type:" integer"}, maxLength: {type:"int eger"},pat tern:{type :"text"}}} )},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie s:{size:{t itle:"Fiel d Size",de scription: "Field siz e.",type:" number","d efault":40 },maskStri ng:{title: "Mask Expr ession",de scription: "Expressio n for the field mask . Field ma sking will be enable d if not e mpty.",typ e:"string" },placehol der:{title :"Field Pl aceholder" ,descripti on:"Field placeholde r.",type:" string"},t ypeahead:{ title:"Typ e Ahead",d escription :"Provides configura tion for t he $.typea head plugi n if it is available . For ful l configur ation opti ons, see: https://gi thub.com/t witter/typ eahead.js" },allowOpt ionalEmpty :{title:"A llow Optio nal Empty" ,descripti on:"Allows this non- required f ield to va lidate whe n the valu e is empty "},inputTy pe:{title: "HTML5 Inp ut Type",d escription :"Allows f or the ove rride of t he underly ing HTML5 input type . If not specified, an assume d value is provided based on t he kind of input con trol (i.e. 'text', ' date', 'em ail' and s o forth)", type:"stri ng"},data: {title:"Da ta attribu tes for th e underlyi ng DOM inp ut control ",descript ion:"Allow s you to s pecify a k ey/value m ap of data attribute s that wil l be added as DOM at tribuets f or the und erlying in put contro l. The da ta attribu tes will b e added as data-{nam e}='{value }'.",type: "object"}, autocomple te:{title: "HTML auto complete a ttribute f or the und erlying DO M input co ntrol",des cription:" Allows you to specif y the auto complete a ttribute f or the und erlying in put contro l whether or not fie ld should have autoc omplete en abled.",ty pe:"string "},disallo wEmptySpac es:{title: "Disallow Empty Spac es",descri ption:"Whe ther to di sallow the entry of empty spac es in the text",type :"boolean" ,"default" :!1},disal lowOnlyEmp tySpaces:{ title:"Dis allow Only Empty Spa ces",descr iption:"Wh ether to d isallow th e entry of only empt y spaces i n the text ",type:"bo olean","de fault":!1} }})},getOp tionsForOp tions:func tion(){ret urn t.merg e(this.bas e(),{field s:{size:{t ype:"integ er"},maskS tring:{hel per:"a - a n alpha ch aracter;9 - a numeri c characte r;* - an a lphanumeri c characte r",type:"t ext"},type ahead:{typ e:"object" },allowOpt ionalEmpty :{type:"ch eckbox"},i nputType:{ type:"text "},data:{t ype:"objec t"}}})}}), t.register Messages({ invalidPat tern:"This field sho uld have p attern {0} ",stringTo oShort:"Th is field s hould cont ain at lea st {0} num bers or ch aracters", stringTooL ong:"This field shou ld contain at most { 0} numbers or charac ters"}),t. registerFi eldClass(" text",t.Fi elds.TextF ield),t.re gisterDefa ultSchemaF ieldMappin g("string" ,"text")}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.TextAr eaField=t. Fields.Tex tField.ext end({getFi eldType:fu nction(){r eturn"text area"},set up:functio n(){this.b ase(),this .options.r ows||(this .options.r ows=5),thi s.options. cols||(thi s.options. cols=40)}, handleVali date:funct ion(){var e=this.bas e(),n=this .validatio n,i=this._ validateWo rdCount(); return n.w ordLimitEx ceeded={me ssage:i?"" :t.substit uteTokens( this.getMe ssage("wor dLimitExce eded"),[th is.options .wordlimit ]),status: i},e&&n.wo rdLimitExc eeded.stat us},_valid ateWordCou nt:functio n(){if(thi s.options. wordlimit& &this.opti ons.wordli mit>-1){va r e=this.d ata;if(e){ var t=e.sp lit(" ").l ength;if(t >this.opti ons.wordli mit)return !1}}return !0},getTit le:functio n(){return "Multi-Lin e Text"},g etDescript ion:functi on(){retur n"Textarea field for multiple line text. "},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie | |
| 53 | s:{rows:{t itle:"Rows ",descript ion:"Numbe r of rows" ,type:"num ber","defa ult":5},co ls:{title: "Columns", descriptio n:"Number of columns ",type:"nu mber","def ault":40}, wordlimit: {title:"Wo rd Limit", descriptio n:"Limits the number of words allowed in the text area.",typ e:"number" ,"default" :-1}}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{row s:{type:"i nteger"},c ols:{type: "integer"} ,wordlimit :{type:"in teger"}}}) }}),t.regi sterMessag es({wordLi mitExceede d:"The max imum word limit of { 0} has bee n exceeded ."}),t.reg isterField Class("tex tarea",t.F ields.Text AreaField) }(jQuery), function(e ){var t=e. alpaca;t.F ields.Chec kBoxField= t.ControlF ield.exten d({getFiel dType:func tion(){ret urn"checkb ox"},setup :function( ){var n=th is;if(n.ba se(),"unde fined"==ty peof n.opt ions.multi ple&&("arr ay"===n.sc hema.type? n.options. multiple=! 0:"undefin ed"!=typeo f n.schema ["enum"]&& (n.options .multiple= !0)),n.opt ions.multi ple){if(n. checkboxOp tions=[],n .getEnum() ){n.sortEn um();var i =n.getOpti onLabels() ;e.each(n. getEnum(), function(e ,a){var r= a;i&&(t.is Empty(i[e] )?t.isEmpt y(i[a])||( r=i[a]):r= i[e]),n.ch eckboxOpti ons.push({ value:a,te xt:r})})}n .options.d atasource& &!n.option s.dataSour ce&&(n.opt ions.dataS ource=n.op tions.data source,del ete n.opti ons.dataso urce),"und efined"==t ypeof n.op tions.useD ataSourceA sEnum&&(n. options.us eDataSourc eAsEnum=!0 )}else thi s.options. rightLabel ||(this.op tions.righ tLabel="") },prepareC ontrolMode l:function (e){var t= this;this. base(funct ion(n){t.c heckboxOpt ions&&(n.c heckboxOpt ions=t.che ckboxOptio ns),e(n)}) },getEnum: function() {var e=thi s.base();r eturn e||t his.schema &&this.sch ema.items& &this.sche ma.items[" enum"]&&(e =this.sche ma.items[" enum"]),e} ,getOption Labels:fun ction(){va r e=this.b ase();retu rn e||this .options&& this.optio ns.items&& this.optio ns.items.o ptionLabel s&&(e=this .options.i tems.optio nLabels),e },onClick: function(e ){this.ref reshValida tionState( )},beforeR enderContr ol:functio n(e,t){var n=this;th is.base(e, function() {n.options .dataSourc e?(n.optio ns.multipl e=!0,n.che ckboxOptio ns||(e.che ckboxOptio ns=n.check boxOptions =[]),n.che ckboxOptio ns.length= 0,n.invoke DataSource (n.checkbo xOptions,e ,function( e){if(n.op tions.useD ataSourceA sEnum){for (var i=[], a=[],r=0;r <n.checkbo xOptions.l ength;r++) i.push(n.c heckboxOpt ions[r].va lue),a.pus h(n.checkb oxOptions[ r].text);n .setEnum(i ),n.setOpt ionLabels( a)}t()})): t()})},pos tRender:fu nction(t){ var n=this ;this.base (function( ){if(n.dat a&&"undefi ned"!=type of n.data& &n.setValu e(n.data), n.options. multiple&& (e(n.getFi eldEl()).f ind("input :checkbox" ).prop("ch ecked",!1) ,n.data)){ var i=n.da ta;if("str ing"==type of n.data) {i=n.data. split(",") ;for(var a =0;a<i.len gth;a++)i[ a]=e.trim( i[a])}for( var r in i )e(n.getFi eldEl()).f ind('input :checkbox[ data-check box-value= "'+i[r]+'" ]').prop(" checked",! 0)}e(n.get FieldEl()) .find("inp ut:checkbo x").change (function( e){n.trigg erWithProp agation("c hange")}), t()})},get ControlVal ue:functio n(){var n= this,i=nul l;if(n.opt ions.multi ple){for(v ar a=[],r= 0;r<n.chec kboxOption s.length;r ++){var o= e(n.getFie ldEl()).fi nd("input[ data-check box-index= '"+r+"']") ;if(t.chec ked(o)){va r l=e(o).a ttr("data- checkbox-v alue");a.p ush(l)}}"a rray"===n. schema.typ e?i=a:"str ing"===n.s chema.type &&(i=a.joi n(","))}el se{var s=e (n.getFiel dEl()).fin d("input") ;i=s.lengt h>0?t.chec ked(e(s[0] )):!1}retu rn i},setV alue:funct ion(n){var i=this,a= function(n ){t.isStri ng(n)&&(n= "true"===n );var a=e( i.getField El()).find ("input"); a.length>0 &&t.checke d(e(a[0]), n)},r=func tion(a){"s tring"==ty peof a&&(a =a.split(" ,"));for(v ar r=0;r<a .length;r+ +)a[r]=t.t rim(a[r]); t.checked( e(i.getFie ldEl()).fi nd("input[ data-check box-value] "),!1);for (var o=0;o <a.length; o++){var l =e(i.getFi eldEl()).f ind('input [data-chec kbox-value ="'+a[o]+' "]');l.len gth>0&&t.c hecked(e(l [0]),n)}}, o=!1;i.opt ions.multi ple?"strin g"==typeof n?(r(n),o =!0):t.isA rray(n)&&( r(n),o=!0) :"boolean" ==typeof n ?(a(n),o=! 0):"string "==typeof n&&(a(n),o =!0),!o&&n &&t.logErr or("Checkb oxField ca nnot set v alue for s chema.type ="+i.schem a.type+" a nd value=" +n),this.b ase(n)},_v alidateEnu m:function (){var e=t his;if(!e. options.mu ltiple)ret urn!0;var n=e.getVal ue();retur n!e.isRequ ired()&&t. isValEmpty (n)?!0:("s tring"==ty peof n&&(n =n.split(" ,")),t.any Equality(n ,e.getEnum ()))},disa ble:functi on(){e(thi s.control) .find("inp ut").each( function() {e(this).d isabled=!0 ,e(this).p rop("disab led",!0)}) },enable:f unction(){ e(this.con trol).find ("input"). each(funct ion(){e(th is).disabl ed=!1,e(th is).prop(" disabled", !1)})},get Type:funct ion(){retu rn"boolean "},getTitl e:function (){return" Checkbox F ield"},get Descriptio n:function (){return" Checkbox F ield for b oolean (tr ue/false), string (' true', 'fa lse' or co mma-delimi ted string of values ) or data array."},g etSchemaOf Options:fu nction(){r eturn t.me rge(this.b ase(),{pro perties:{r ightLabel: {title:"Op tion Label ",descript ion:"Optio nal right- hand side label for single che ckbox fiel d.",type:" string"},m ultiple:{t itle:"Mult iple",desc ription:"W hether to render mul tiple chec kboxes for multi-val ued type ( such as an array or a comma-de limited st ring)",typ e:"boolean "},dataSou rce:{title :"Option D ataSource" ,descripti on:"Data s ource for generating list of o ptions. T his can be a string or a funct ion. If a string, i | |
| 54 | t is consi dered to b e a URI to a service that prod uces a obj ect contai ning key/v alue pairs or an arr ay of elem ents of st ructure {' text': '', 'value': ''}. This can also be a funct ion that i s called t o produce the same l ist.",type :"string"} ,useDataSo urceAsEnum :{title:"U se Data So urce as En umerated V alues",des cription:" Whether to constrain the field 's schema enum prope rty to the values th at come ba ck from th e data sou rce.",type :"boolean" ,"default" :!0}}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{rig htLabel:{t ype:"text" },multiple :{type:"ch eckbox"},d ataSource: {type:"tex t"}}})}}), t.register FieldClass ("checkbox ",t.Fields .CheckBoxF ield),t.re gisterDefa ultSchemaF ieldMappin g("boolean ","checkbo x")}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.F ileField=t .Fields.Te xtField.ex tend({getF ieldType:f unction(){ return"fil e"},setVal ue:functio n(e){this. data=e,thi s.data=e,t his.update Observable (),this.tr iggerUpdat e()},getCo ntrolValue :function( ){return t his.data}, onChange:f unction(e) {this.base (e),this.o ptions.sel ectionHand ler&&this. processSel ectionHand ler(e.targ et.files)} ,processSe lectionHan dler:funct ion(e){if( e&&e.lengt h>0&&"unde fined"!=ty peof FileR eader){var t=[],n=0, i=new File Reader;i.o nload=func tion(){var i=this;re turn funct ion(a){var r=a.targe t.result;t .push(r),n ++,n===e.l ength&&i.o ptions.sel ectionHand ler.call(i ,e,t)}}.ca ll(this);f or(var a=0 ;a<e.lengt h;a++)i.re adAsDataUR L(e[a])}}, getTitle:f unction(){ return"Fil e Field"}, getDescrip tion:funct ion(){retu rn"Field f or uploadi ng files." },getSchem aOfOptions :function( ){return t .merge(thi s.base(),{ properties :{selectio nHandler:{ title:"Sel ection Han dler",desc ription:"F unction th at should be called when files are selec ted. Requ ires HTML5 .",type:"b oolean","d efault":!1 }}})},getO ptionsForO ptions:fun ction(){re turn t.mer ge(this.ba se(),{fiel ds:{select ionHandler :{type:"ch eckbox"}}} )}}),t.reg isterField Class("fil e",t.Field s.FileFiel d)}(jQuery ),function (e){var t= e.alpaca;t .Fields.Li stField=t. ControlFie ld.extend( {setup:fun ction(){va r n=this;i f(n.base() ,n.selectO ptions=[], n.getEnum( )){n.sortE num();var i=n.getOpt ionLabels( );e.each(n .getEnum() ,function( e,a){var r =a;i&&(t.i sEmpty(i[e ])?t.isEmp ty(i[a])|| (r=i[a]):r =i[e]),n.s electOptio ns.push({v alue:a,tex t:r})})}if (n.isRequi red()&&!n. data&&n.op tions.remo veDefaultN one===!0){ var a=n.ge tEnum();a& &a.length> 0&&(n.data =a[0])}n.o ptions.dat asource&&! n.options. dataSource &&(n.optio ns.dataSou rce=n.opti ons.dataso urce,delet e n.option s.datasour ce),"undef ined"==typ eof n.opti ons.useDat aSourceAsE num&&(n.op tions.useD ataSourceA sEnum=!0)} ,prepareCo ntrolModel :function( e){var t=t his;this.b ase(functi on(n){"und efined"==t ypeof t.op tions.none Label&&(t. options.no neLabel=t. getMessage ("noneLabe l")),"unde fined"==ty peof t.opt ions.hideN one&&("und efined"!=t ypeof t.op tions.remo veDefaultN one?t.opti ons.hideNo ne=t.optio ns.removeD efaultNone :t.options .hideNone= t.isRequir ed()),e(n) })},before RenderCont rol:functi on(e,t){va r n=this,i =function( ){for(var e=n.conver tToScalarV alue(n.dat a),i=0;i<n .selectOpt ions.lengt h;i++)if(e ===n.selec tOptions[i ].value){n .selectOpt ions[i].se lected=!0; break}t()} ;this.base (e,functio n(){n.opti ons.dataSo urce?(n.se lectOption s.length=0 ,n.invokeD ataSource( n.selectOp tions,e,fu nction(){i f(n.option s.useDataS ourceAsEnu m){for(var e=[],t=[] ,a=0;a<n.s electOptio ns.length; a++)e.push (n.selectO ptions[a]. value),t.p ush(n.sele ctOptions[ a].text);n .setEnum(e ),n.setOpt ionLabels( t)}i()})): i()})},con vertToScal arValue:fu nction(e){ return e}, convertToD ataValue:f unction(e, t){t(null, e)},getSch emaOfSchem a:function (){return t.merge(th is.base(), {propertie s:{"enum": {title:"En umeration" ,descripti on:"List o f field va lue option s",type:"a rray",requ ired:!0}}} )},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie s:{dataSou rce:{title :"Option D atasource" ,descripti on:"Dataso urce for g enerating list of op tions. Th is can be a string o r a functi on. If a string, it is consid ered to be a URI to a service that produ ces a obje ct contain ing key/va lue pairs or an arra y of eleme nts of str ucture {'t ext': '', 'value': ' '}. This can also b e a functi on that is called to produce t he same li st.",type: "string"}, removeDefa ultNone:{t itle:"Remo ve Default None",des cription:" If true, t he default 'None' op tion will not be sho wn.",type: "boolean", "default": !1},noneLa bel:{title :"None Lab el",descri ption:"The label to use for th e 'None' o ption in a list (sel ect, radio or otherw ise).",typ e:"string" ,"default" :"None"},h ideNone:{t itle:"Hide None",des cription:" Whether to hide the None optio n from a l ist (selec t, radio o r otherwis e). This will be tr ue if the field is r equired an d false ot herwise.", type:"bool ean","defa ult":!1},u seDataSour ceAsEnum:{ title:"Use Data Sour ce as Enum erated Val ues",descr iption:"Wh ether to c onstrain t he field's schema en um propert y to the v alues that come back from the data sourc e.",type:" boolean"," default":! 0}}})},get OptionsFor Options:fu nction(){r eturn t.me rge(this.b ase(),{fie lds:{dataS ource:{typ e:"text"}, removeDefa ultNone:{t ype:"check box",right Label:"Rem ove Defaul t None"},n oneLabel:{ type:"text "},hideNon e:{type:"c heckbox",r ightLabel: "Hide the 'None' opt ion from t he list"}} })}}),t.re gisterMess | |
| 55 | ages({none Label:"Non e"})}(jQue ry),functi on(e){var t=e.alpaca ;t.Fields. RadioField =t.Fields. ListField. extend({ge tFieldType :function( ){return"r adio"},set up:functio n(){this.b ase(),this .options.n ame?this.n ame=this.o ptions.nam e:this.nam e||(this.n ame=this.g etId()+"-n ame"),t.is Undefined( this.optio ns.emptySe lectFirst) &&(this.op tions.empt ySelectFir st=!1),t.i sUndefined (this.opti ons.vertic al)&&(this .options.v ertical=!0 )},getCont rolValue:f unction(){ var t=this ,n=null;re turn e(thi s.control) .find(":ch ecked").ea ch(functio n(){n=e(th is).val(), n=t.ensure ProperType (n)}),n},s etValue:fu nction(n){ var i=this ;e(this.co ntrol).fin d("input") .each(func tion(){t.c hecked(e(t his),null) }),"undefi ned"!=type of n&&t.ch ecked(e(i. control).f ind('input [value="'+ n+'"]'),"c hecked"),t his.option s.emptySel ectFirst&& 0===e(this .control). find("inpu t:checked" ).length&& t.checked( e(i.contro l).find("i nput:radio ").first() ,"checked" ),this.bas e(n)},init ControlEve nts:functi on(){var t =this;t.ba se();var n =e(this.co ntrol).fin d("input") ;n.focus(f unction(e) {t.suspend BlurFocus| |(t.onFocu s.call(t,e ),t.trigge r("focus", e))}),n.bl ur(functio n(e){t.sus pendBlurFo cus||(t.on Blur.call( t,e),t.tri gger("blur ",e))})},p repareCont rolModel:f unction(e) {var t=thi s;this.bas e(function (n){n.sele ctOptions= t.selectOp tions,n.re moveDefaul tNone=t.op tions.remo veDefaultN one,e(n)}) },afterRen derControl :function( n,i){var a =this;this .base(n,fu nction(){a .options.e mptySelect First&&a.s electOptio ns&&a.sele ctOptions. length>0&& (a.data=a. selectOpti ons[0].val ue,0===e(" input:radi o:checked" ,a.control ).length&& t.checked( e(a.contro l).find('i nput:radio [value="'+ a.data+'"] '),"checke d")),a.opt ions.verti cal?e(a.co ntrol).css ("display" ,"block"): e(a.contro l).css("di splay","in line-block "),i()})}, updateDOME lement:fun ction(){th is.base(), e(this.con trol).find ("input:ra dio").attr ("name",th is.getName ())},onCli ck:functio n(t){var n =this,i=n. getValue() ;this.base (t);var a= e(t.curren tTarget).f ind("input ").val();" undefined" !=typeof a &&(n.setVa lue(a),n.r efreshVali dationStat e(),i!==a& &n.trigger ("change") )},disable :function( ){this.bas e(),this.g etFieldEl( ).addClass ("disabled ")},enable :function( ){this.bas e(),this.g etFieldEl( ).removeCl ass("disab led")},get Title:func tion(){ret urn"Radio Group Fiel d"},getDes cription:f unction(){ return"Rad io Group F ield with list of op tions."},g etSchemaOf Options:fu nction(){r eturn t.me rge(this.b ase(),{pro perties:{n ame:{title :"Field na me",descri ption:"Fie ld name.", type:"stri ng"},empty SelectFirs t:{title:" Empty Sele ct First", descriptio n:"If the data is em pty, then automatica lly select the first item in t he list.", type:"bool ean","defa ult":!1},v ertical:{t itle:"Posi tion the r adio selec tor items vertically ",descript ion:"By de fault, rad io control s are stac ked vertic ally. Set to false if you'd l ike radio controls t o lay out horizontal ly.",type: "boolean", "default": !0}}})}}), t.register FieldClass ("radio",t .Fields.Ra dioField)} (jQuery),f unction(e) {var t=e.a lpaca;t.Fi elds.Selec tField=t.F ields.List Field.exte nd({getFie ldType:fun ction(){re turn"selec t"},setup: function() {var t=thi s;this.bas e(),t.sche ma.type&&" array"===t .schema.ty pe&&(t.opt ions.multi ple=!0),t. options.mu ltiple&&e. fn.multise lect&&"und efined"==t ypeof t.op tions.hide None&&(t.o ptions.hid eNone=!0), this.schem a.items&&t his.schema .items.max Items&&"un defined"== typeof thi s.schema.m axItems&&( this.schem a.maxItems =this.sche ma.items.m axItems,de lete this. schema.ite ms.maxItem s),this.sc hema.items &&this.sch ema.items. minItems&& "undefined "==typeof this.schem a.minItems &&(this.sc hema.minIt ems=this.s chema.item s.minItems ,delete th is.schema. items.minI tems),!t.o ptions.mul tiselect&& e.fn.multi select&&(t .options.m ultiselect ={}),t.opt ions.multi select&&"u ndefined"= =typeof t. options.mu ltiselect. disableIfE mpty&&(t.o ptions.mul tiselect.d isableIfEm pty=!0)},g etValue:fu nction(){v ar e=this; return"obj ect"===e.s chema.type ?this.data :this.base ()},setVal ue:functio n(e){var n =this,i=n. convertToS calarValue (e),a=n.co nvertToSca larValue(n .getValue( ));if(t.is Array(e))t .compareAr rayContent (i,a)||(!t .isEmpty(i )&&this.co ntrol&&thi s.control. val(i),thi s.base(e)) ;else{var r=!1;t.isE mpty(i)&&t .isEmpty(a )?r=!0:i!= =a&&(r=!0) ,r&&(n.con trol&&"und efined"!=t ypeof i&&n ull!==i&&n .control.v al(i),this .base(e))} },getEnum: function() {if(this.s chema){if( this.schem a["enum"]) return thi s.schema[" enum"];if( this.schem a.type&&"a rray"===th is.schema. type&&this .schema.it ems&&this. schema.ite ms["enum"] )return th is.schema. items["enu m"]}},init ControlEve nts:functi on(){var e =this;if(e .base(),e. options.mu ltiple){va r t=this.c ontrol.par ent().find ("button.m ultiselect ");t.focus (function( t){e.suspe ndBlurFocu s||(e.onFo cus.call(e ,t),e.trig ger("focus ",t))}),t. blur(funct ion(t){e.s uspendBlur Focus||(e. onBlur.cal l(e,t),e.t rigger("bl ur",t))})} },prepareC ontrolMode l:function (e){var t= this;this. base(funct ion(n){n.s electOptio ns=t.selec tOptions,e (n)})},bef oreRenderC ontrol:fun ction(e,n) {this.base (e,functio n(){for(va r i=[],a={ },r=0;r<e. selectOpti ons.length ;r++)a[e.s electOptio ns[r].valu e]=e.selec tOptions[r ].text;if( t.isArray( e.data))fo r(var r=0; r<e.data.l ength;r++) {var o=a[e .data[r]]; o&&i.push( o)}else{va r o=a[e.da ta];o&&i.p ush(o)}e.d isplayable Text=i.joi n(", "),n( )})},after RenderCont rol:functi | |
| 56 | on(n,i){va r a=this;t his.base(n ,function( ){if(t.isU ndefined(a .data)&&a. options.em ptySelectF irst&&a.se lectOption s&&a.selec tOptions.l ength>0&&( a.data=a.s electOptio ns[0].valu e),a.data& &a.setValu e(a.data), a.options. multiple&& e.fn.multi select&&!a .isDisplay Only()){va r n=null;n =a.options .multisele ct?a.optio ns.multise lect:{},n. nonSelecte dText||(n. nonSelecte dText="Non e",a.optio ns.noneLab el&&(n.non SelectedTe xt=a.optio ns.noneLab el)),e(a.g etControlE l()).multi select(n)} i()})},_va lidateEnum :function( ){var n=th is;if(this .schema["e num"]){var i=this.da ta;if(!thi s.isRequir ed()&&t.is ValEmpty(i ))return!0 ;if(this.o ptions.mul tiple){var a=!0;retu rn i||(i=[ ]),t.isArr ay(i)||t.i sObject(i) ||(i=[i]), e.each(i,f unction(e, i){var r=n .convertTo ScalarValu e(i),o=t.i nArray(n.s chema["enu m"],r);o|| (a=!1)}),a }t.isArray (i)&&(i=i[ 0]);var r= n.convertT oScalarVal ue(i);retu rn t.inArr ay(this.sc hema["enum "],r)}retu rn!0},onCh ange:funct ion(e){var t=this,n= t.getContr olValue(); t.convertT oDataValue (n,functio n(e,i){t.d ata=i,t.co ntrol.val( n),t.updat eObservabl e(),t.trig gerUpdate( ),t.refres hValidatio nState()}) },_validat eMinItems: function() {return!(t his.schema .minItems& &this.sche ma.minItem s>=0&&e(": selected", this.contr ol).length <this.sche ma.minItem s)},_valid ateMaxItem s:function (){return! (this.sche ma.maxItem s&&this.sc hema.maxIt ems>=0&&e( ":selected ",this.con trol).leng th>this.sc hema.maxIt ems); | |
| 57 | },handleVa lidate:fun ction(){va r e=this.b ase(),n=th is.validat ion,i=this ._validate MaxItems() ;return n. tooManyIte ms={messag e:i?"":t.s ubstituteT okens(this .getMessag e("tooMany Items"),[t his.schema .maxItems] ),status:i },i=this._ validateMi nItems(),n .notEnough Items={mes sage:i?"": t.substitu teTokens(t his.getMes sage("notE noughItems "),[this.s chema.minI tems]),sta tus:i},e&& n.tooManyI tems.statu s&&n.notEn oughItems. status},fo cus:functi on(t){if(t his.contro l&&this.co ntrol.leng th>0){var n=e(this.c ontrol).ge t(0);n.foc us(),t&&t( this)}},di sable:func tion(){var t=this;th is.base(), t.options. multiselec t&&e(t.get ControlEl( )).multise lect("disa ble")},ena ble:functi on(){var t =this;this .base(),t. options.mu ltiselect& &e(t.getCo ntrolEl()) .multisele ct("enable ")},getTit le:functio n(){return "Select Fi eld"},getD escription :function( ){return"S elect Fiel d"},getSch emaOfOptio ns:functio n(){return t.merge(t his.base() ,{properti es:{multip le:{title: "Mulitple Selection" ,descripti on:"Allow multiple s election i f true.",t ype:"boole an","defau lt":!1},si ze:{title: "Displayed Options", descriptio n:"Number of options to be sho wn.",type: "number"}, emptySelec tFirst:{ti tle:"Empty Select Fi rst",descr iption:"If the data is empty, then autom atically s elect the first item in the li st.",type: "boolean", "default": !1},multis elect:{tit le:"Multis elect Plug in Setting s",descrip tion:"Mult iselect pl ugin prope rties - ht tp://david stutz.gith ub.io/boot strap-mult iselect",t ype:"any"} }})},getOp tionsForOp tions:func tion(){ret urn t.merg e(this.bas e(),{field s:{multipl e:{rightLa bel:"Allow multiple selection ?",helper: "Allow mul tiple sele ction if c hecked",ty pe:"checkb ox"},size: {type:"int eger"},emp tySelectFi rst:{type: "checkbox" ,rightLabe l:"Empty S elect Firs t"},multis elect:{typ e:"object" ,rightLabe l:"Multise lect plugi n properti es - http: //davidstu tz.github. io/bootstr ap-multise lect"}}})} }),t.regis terFieldCl ass("selec t",t.Field s.SelectFi eld)}(jQue ry),functi on(e){var t=e.alpaca ;t.Fields. NumberFiel d=t.Fields .TextField .extend({s etup:funct ion(){this .base(),"u ndefined"= =typeof th is.options .numericEn try&&(this .options.n umericEntr y=!1)},get FieldType: function() {return"nu mber"},pos tRender:fu nction(e){ var t=this ;this.base (function( ){t.contro l&&t.on("k eypress",f unction(e) {var n=e.c harCode||e .keyCode|| 0,i=!0;ret urn t.opti ons.numeri cEntry&&(i =i&&n>=48& &57>=n),i| |(e.preven tDefault() ,e.stopImm ediateProp agation()) ,i}),e()}) },getContr olValue:fu nction(){v ar e=this. _getContro lVal(!0);r eturn"unde fined"==ty peof e||"" ==e?e:pars eFloat(e)} ,handleVal idate:func tion(){var e=this.ba se(),n=thi s.validati on,i=this. _validateN umber();re turn n.str ingNotANum ber={messa ge:i?"":th is.getMess age("strin gNotANumbe r"),status :i},i=this ._validate DivisibleB y(),n.stri ngDivisibl eBy={messa ge:i?"":t. substitute Tokens(thi s.getMessa ge("string DivisibleB y"),[this. schema.div isibleBy]) ,status:i} ,i=this._v alidateMax imum(),n.s tringValue TooLarge={ message:"" ,status:i} ,i||(this. schema.exc lusiveMaxi mum?n.stri ngValueToo Large.mess age=t.subs tituteToke ns(this.ge tMessage(" stringValu eTooLargeE xclusive") ,[this.sch ema.maximu m]):n.stri ngValueToo Large.mess age=t.subs tituteToke ns(this.ge tMessage(" stringValu eTooLarge" ),[this.sc hema.maxim um])),i=th is._valida teMinimum( ),n.string ValueTooSm all={messa ge:"",stat us:i},i||( this.schem a.exclusiv eMinimum?n .stringVal ueTooSmall .message=t .substitut eTokens(th is.getMess age("strin gValueTooS mallExclus ive"),[thi s.schema.m inimum]):n .stringVal ueTooSmall .message=t .substitut eTokens(th is.getMess age("strin gValueTooS mall"),[th is.schema. minimum])) ,i=this._v alidateMul tipleOf(), n.stringVa lueNotMult ipleOf={me ssage:"",s tatus:i},i ||(n.strin gValueNotM ultipleOf. message=t. substitute Tokens(thi s.getMessa ge("string ValueNotMu ltipleOf") ,[this.sch ema.multip leOf])),e& &n.stringN otANumber. status&&n. stringDivi sibleBy.st atus&&n.st ringValueT ooLarge.st atus&&n.st ringValueT ooSmall.st atus&&n.st ringValueN otMultiple Of.status& &n.invalid Pattern.st atus&&n.st ringTooLon g.status&& n.stringTo oShort.sta tus},_vali dateOption al:functio n(){return this.isDi splayOnly( )||!this.i sRequired( )||!t.isVa lEmpty(e(t his.contro l).val())} ,_validate Number:fun ction(){va r e=this._ getControl Val();if(" number"==t ypeof e&&( e=""+e),t. isValEmpty (e))return !0;var n=t .testRegex (t.regexps .number,e) ;if(!n)ret urn!1;var i=this.get Value();re turn!isNaN (i)},_vali dateDivisi bleBy:func tion(){var e=this.ge tValue();r eturn!(!t. isEmpty(th is.schema. divisibleB y)&&e%this .schema.di visibleBy! ==0)},_val idateMaxim um:functio n(){var e= this.getVa lue();if(! t.isEmpty( this.schem a.maximum) ){if(e>thi s.schema.m aximum)ret urn!1;if(! t.isEmpty( this.schem a.exclusiv eMaximum)& &e==this.s chema.maxi mum&&this. schema.exc lusiveMaxi mum)return !1}return! 0},_valida teMinimum: function() {var e=thi s.getValue ();if(!t.i sEmpty(thi s.schema.m inimum)){i f(e<this.s chema.mini mum)return !1;if(!t.i sEmpty(thi s.schema.e xclusiveMi nimum)&&e= =this.sche ma.minimum &&this.sch ema.exclus iveMinimum )return!1} return!0}, _validateM ultipleOf: function() {var e=thi s.getValue ();return t.isEmpty( this.schem a.multiple Of)||!e||0 ===this.sc hema.multi pleOf},get Type:funct ion(){retu rn"number" },onKeyPre ss:functio n(e){var n =this;if(9 !==e.keyCo de&&37!==e .keyCode&& 38!==e.key Code&&39!= =e.keyCode &&40!==e.k eyCode){if (8===e.key Code){if(! | |
| 58 | t.isEmpty( n.schema.m inLength)& &(n.option s.constrai nLengths|| n.options. constrainM inLength)) {var i=n.g etValue()| |"";t.isNu mber(i)&&( i=i.toStri ng()),i.le ngth<=n.sc hema.minLe ngth&&(e.p reventDefa ult(),e.st opImmediat ePropagati on())}}els e if(!t.is Empty(n.sc hema.maxLe ngth)&&(n. options.co nstrainLen gths||n.op tions.cons trainMaxLe ngth)){var i=n.getVa lue()||""; t.isNumber (i)&&(i=i. toString() ),i.length >=n.schema .maxLength &&(e.preve ntDefault( ),e.stopIm mediatePro pagation() )}32===e.k eyCode&&n. options.di sallowEmpt ySpaces&&( e.preventD efault(),e .stopImmed iatePropag ation())}} ,onKeyUp:f unction(t) {var n=thi s;n.update MaxLengthI ndicator() ,e(this.fi eld).trigg er("fieldk eyup")},ge tSchemaOfS chema:func tion(){ret urn t.merg e(this.bas e(),{prope rties:{mul tipleOf:{t itle:"Mult iple Of",d escription :"Property value mus t be a mul tiple of t he multipl eOf schema property such that division b y this val ue yields an interge r (mod zer o).",type: "number"}, minimum:{t itle:"Mini mum",descr iption:"Mi nimum valu e of the p roperty.", type:"numb er"},maxim um:{title: "Maximum", descriptio n:"Maximum value of the proper ty.",type: "number"}, exclusiveM inimum:{ti tle:"Exclu sive Minim um",descri ption:"Pro perty valu e can not equal the number def ined by th e minimum schema pro perty.",ty pe:"boolea n","defaul t":!1},exc lusiveMaxi mum:{title :"Exclusiv e Maximum" ,descripti on:"Proper ty value c an not equ al the num ber define d by the m aximum sch ema proper ty.",type: "boolean", "default": !1}}})},ge tOptionsFo rSchema:fu nction(){r eturn t.me rge(this.b ase(),{fie lds:{multi pleOf:{tit le:"Multip le Of",des cription:" The value must be a integral m ultiple of the prope rty",type: "number"}, minimum:{t itle:"Mini mum",descr iption:"Mi nimum valu e of the p roperty",t ype:"numbe r"},maximu m:{title:" Maximum",d escription :"Maximum value of t he propert y",type:"n umber"},ex clusiveMin imum:{righ tLabel:"Ex clusive mi nimum ?",h elper:"Fie ld value m ust be gre ater than but not eq ual to thi s number i f checked" ,type:"che ckbox"},ex clusiveMax imum:{righ tLabel:"Ex clusive Ma ximum ?",h elper:"Fie ld value m ust be les s than but not equal to this n umber if c hecked",ty pe:"checkb ox"}}})},g etSchemaOf Options:fu nction(){r eturn t.me rge(this.b ase(),{pro perties:{n umericEntr y:{title:" Numeric En try",descr iption:"Wh ether to c onstrain d ata entry key presse s to numer ic values (0-9)",typ e:"boolean ","default ":!1}}})}, getTitle:f unction(){ return"Num ber Field" },getDescr iption:fun ction(){re turn"Field for float numbers." }}),t.regi sterMessag es({string ValueTooSm all:"The m inimum val ue for thi s field is {0}",stri ngValueToo Large:"The maximum v alue for t his field is {0}",st ringValueT ooSmallExc lusive:"Va lue of thi s field mu st be grea ter than { 0}",string ValueTooLa rgeExclusi ve:"Value of this fi eld must b e less tha n {0}",str ingDivisib leBy:"The value must be divisi ble by {0} ",stringNo tANumber:" This value is not a number.",s tringValue NotMultipl eOf:"This value is n ot a multi ple of {0} "}),t.regi sterFieldC lass("numb er",t.Fiel ds.NumberF ield),t.re gisterDefa ultSchemaF ieldMappin g("number" ,"number") }(jQuery), function(e ){var t=e. alpaca;t.F ields.Arra yField=t.C ontainerFi eld.extend ({getField Type:funct ion(){retu rn"array"} ,setup:fun ction(){va r n=this;t his.base() ;var i=n.r esolveCont ainerItemT emplateTyp e();if(!i) return t.t hrowErrorW ithCallbac k("Unable to find te mplate des criptor fo r containe r item: "+ n.getField Type());th is.contain erItemTemp lateDescri ptor=n.vie w.getTempl ateDescrip tor("conta iner-"+i+" -item",n), this.optio ns.toolbar Style||(th is.options .toolbarSt yle=t.isEm pty(this.v iew.toolba rStyle)?"b utton":thi s.view.too lbarStyle) ,this.opti ons.toolba rStyle||(t his.option s.toolbarS tyle="butt on"),this. options.ac tionbarSty le||(this. options.ac tionbarSty le=t.isEmp ty(this.vi ew.actionb arStyle)?" top":this. view.actio nbarStyle) ,this.opti ons.action barStyle|| (this.opti ons.action barStyle=" top"),this .schema.it ems||(this .schema.it ems={}),th is.options .items||(t his.option s.items={} ),this.sch ema.items& &this.sche ma.items.m axItems&&" undefined" ==typeof t his.schema .maxItems& &(this.sch ema.maxIte ms=this.sc hema.items .maxItems, delete thi s.schema.i tems.maxIt ems),this. schema.ite ms&&this.s chema.item s.minItems &&"undefin ed"==typeo f this.sch ema.minIte ms&&(this. schema.min Items=this .schema.it ems.minIte ms,delete this.schem a.items.mi nItems),th is.schema. items&&thi s.schema.i tems.uniqu eItems&&"u ndefined"= =typeof th is.schema. uniqueItem s&&(this.s chema.uniq ueItems=th is.schema. items.uniq ueItems,de lete this. schema.ite ms.uniqueI tems),this .options.r ubyrails=! 1,this.par ent&&this. parent.opt ions&&this .parent.op tions.form &&this.par ent.option s.form.att ributes&&( t.isEmpty( this.paren t.options. form.attri butes.ruby rails)||(t his.option s.rubyrail s=!0));var a=t.defau ltToolbarS ticky;if(t .isEmpty(t his.view.t oolbarStic ky)||(a=th is.view.to olbarStick y),t.isEmp ty(this.op tions.tool barSticky) ||(a=this. options.to olbarStick y),this.op tions.tool barSticky= a,"undefin ed"==typeo f n.option s.hideTool barWithChi ldren&&(n. options.hi deToolbarW ithChildre n=!0),this .schema.it ems&&this. schema.uni queItems&& t.mergeObj ect(this.o ptions,{fo rceRevalid ation:!0}) ,"undefine d"==typeof this.data &&(this.da ta=[]),nul l==this.da ta&&(this. data=[])," "==this.da ta&&(this. data=[]),t .isString( this.data) )try{var r =t.parseJS | |
| 59 | ON(this.da ta);if(!t. isArray(r) &&!t.isObj ect(r))ret urn void t .logWarn(" ArrayField parsed st ring data but it was not an ar ray: "+thi s.data);th is.data=r} catch(o){t his.data=[ this.data] }if(!t.isA rray(this. data)&&!t. isObject(t his.data)) return voi d t.logWar n("ArrayFi eld data i s not an a rray: "+JS ON.stringi fy(this.da ta,null," "));var l =function( e,t,i){var a=n.findA ction(e,t) ;a||(a={co re:!0},e.p ush(a));fo r(var r in i)a[r]||( a[r]=i[r]) },s=functi on(e,t){va r n=0;do"u ndefined"= =typeof e[ n].enabled &&(e[n].en abled=!0), t||delete e[n].label ,e[n].enab led?n++:e. splice(n,1 );while(n< e.length); e.sort(fun ction(e,t) {return e. core&&!t.c ore?-1:!e. core&&t.co re?1:0})}; if(n.toolb ar={},n.op tions.tool bar)for(va r u in n.o ptions.too lbar)n.too lbar[u]=t. copyOf(n.o ptions.too lbar[u]);i f("undefin ed"==typeo f n.toolba r.showLabe ls&&(n.too lbar.showL abels=!0), n.toolbar. actions||( n.toolbar. actions=[] ),l(n.tool bar.action s,"add",{l abel:n.get Message("a ddItemButt onLabel"), action:"ad d",iconCla ss:n.view. getStyle(" addIcon"), click:func tion(e,t){ n.handleTo olBarAddIt emClick(fu nction(e){ })}}),s(n. toolbar.ac tions,n.to olbar.show Labels),n. actionbar= {},n.optio ns.actionb ar)for(var c in n.op tions.acti onbar)n.ac tionbar[c] =t.copyOf( n.options. actionbar[ c]);"undef ined"==typ eof n.acti onbar.show Labels&&(n .actionbar .showLabel s=!1),n.ac tionbar.ac tions||(n. actionbar. actions=[] ),l(n.acti onbar.acti ons,"add", {label:n.g etMessage( "addButton Label"),ac tion:"add" ,iconClass :n.view.ge tStyle("ad dIcon"),cl ick:functi on(e,t,i){ n.handleAc tionBarAdd ItemClick( i,function (e){})}}), l(n.action bar.action s,"remove" ,{label:n. getMessage ("removeBu ttonLabel" ),action:" remove",ic onClass:n. view.getSt yle("remov eIcon"),cl ick:functi on(e,t,i){ n.handleAc tionBarRem oveItemCli ck(i,funct ion(e){})} }),l(n.act ionbar.act ions,"up", {label:n.g etMessage( "upButtonL abel"),act ion:"up",i conClass:n .view.getS tyle("upIc on"),click :function( e,t,i){n.h andleActio nBarMoveIt emUpClick( i,function (){})}}),l (n.actionb ar.actions ,"down",{l abel:n.get Message("d ownButtonL abel"),act ion:"down" ,iconClass :n.view.ge tStyle("do wnIcon"),c lick:funct ion(e,t,i) {n.handleA ctionBarMo veItemDown Click(i,fu nction(){} )}}),s(n.a ctionbar.a ctions,n.a ctionbar.s howLabels) ;var d=thi s.data.len gth,p=e.ex tend(!0,{} ,this.data );p.length =d,this.da ta=Array.p rototype.s lice.call( p)},setVal ue:functio n(e){var n =this;if(e &&t.isArra y(e)){var i=0;do if( i<n.childr en.length) {var a=n.c hildren[i] ;e.length> i?(a.setVa lue(e[i]), i++):n.rem oveItem(i) }while(i<n .children. length);i< e.length&& n.resolveI temSchemaO ptions(fun ction(a,r, o){if(a||t .logDebug( "Unable to resolve s chema for item: "+i) ,o)return t.throwErr orWithCall back("Circ ular refer ence detec ted for sc hema: "+JS ON.stringi fy(a),n.er rorCallbac k);for(var l=[];i<e. length;){v ar s=funct ion(e,i){r eturn func tion(o){n. addItem(e, a,r,i[e],f unction(){ t.nextTick (function( ){o()})})} }(i,e);l.p ush(s),i++ }t.series( l,function (){})})}}, getContain erValue:fu nction(){i f(0===this .children. length&&!t his.isRequ ired())ret urn[];for( var e=[],t =0;t<this. children.l ength;t++) {var n=thi s.children [t].getVal ue();n!==n &&(n=void 0),"undefi ned"!=type of n&&e.pu sh(n)}retu rn e},crea teItems:fu nction(e){ var n=this ,i=[];n.da ta&&n.data .length>0? n.resolveI temSchemaO ptions(fun ction(a,r, o){if(o)re turn t.thr owErrorWit hCallback( "Circular reference detected f or schema: "+JSON.st ringify(a) ,n.errorCa llback);fo r(var l=[] ,s=0;s<n.d ata.length ;s++){var u=n.data[s ],c=functi on(e,t){re turn funct ion(o){n.c reateItem( e,a,r,t,fu nction(e){ i.push(e), o()})}}(s, u);l.push( c)}t.nextT ick(functi on(){t.ser ies(l,func tion(t){e( i)})})}):e (i)},creat eItem:func tion(n,i,a ,r,o){var l=this;if( l._validat eEqualMaxI tems()){va r s=e("<di v></div>") ;s.alpaca( {data:r,op tions:a,sc hema:i,vie w:this.vie w.id?this. view.id:th is.view,co nnector:th is.connect or,error:f unction(e) {l.destroy (),l.error Callback.c all(l,e)}, notTopLeve l:!0,rende r:function (e,t){e.pa rent=l,e.p ath=l.path +"["+n+"]" ,e.render( null,funct ion(){t&&t ()})},post Render:fun ction(n){v ar i=t.tmp l(l.contai nerItemTem plateDescr iptor,{id: l.getId(), name:n.nam e,parentFi eldId:l.ge tId(),acti onbarStyle :l.options .actionbar Style,view :l.view,da ta:r}),a=e (i).find(" ."+t.MARKE R_CLASS_CO NTAINER_FI ELD_ITEM_F IELD);retu rn 0===a.l ength&&e(i ).hasClass (t.MARKER_ CLASS_CONT AINER_FIEL D_ITEM_FIE LD)&&(a=e( i)),0===a. length?voi d l.errorC allback.ca ll(l,{mess age:"Canno t find ins ertion poi nt for fie ld: "+l.ge tId()}):(e (a).before (n.getFiel dEl()),e(a ).remove() ,n.contain erItemEl=i ,t.fieldAp plyFieldAn dChildren( n,function (e){e.hide InitValida tionError= !1}),t.isF unction(l. options.it ems.postRe nder)&&l.o ptions.ite ms.postRen der.call(n ,a),void(o &&o(n)))}} )}},resolv eItemSchem aOptions:f unction(e) {var n,i=t his,a=func tion(t,n,a ){i.option s.readonly &&(n.reado nly=!0),e( t,n,a)};!n &&i.option s&&i.optio ns.fields& &i.options .fields.it em&&(n=i.o ptions.fie lds.item), !n&&i.opti ons&&i.opt ions.items &&(n=i.opt ions.items );var r;if (i.schema& &i.schema. items&&(r= i.schema.i tems),r&&r .$ref){for (var o=r.$ ref,l=this ,s=[l];l.p arent;)l=l .parent,s. push(l);va r u=r,c=n; t.loadRefS chemaOptio ns(l,o,fun ction(e,n) {for(var i =0,r=0;r<s .length;r+ +)s[r].sch ema&&(s[r] .schema.id ===o||s[r] .schema.id ==="#"+o?i ++:s[r].sc hema.$ref= ==o&&i++); var l=i>10 ,d={};u&&t .mergeObje ct(d,u),e& | |
| 60 | &t.mergeOb ject(d,e), delete d.i d;var p={} ;c&&t.merg eObject(p, c),n&&t.me rgeObject( p,n),t.nex tTick(func tion(){a(d ,p,l)})})} else t.nex tTick(func tion(){a(r ,n)})},han dleValidat e:function (){var e=t his.base() ,n=this.va lidation,i =this._val idateUniqu eItems();r eturn n.va lueNotUniq ue={messag e:i?"":thi s.getMessa ge("valueN otUnique") ,status:i} ,i=this._v alidateMax Items(),n. tooManyIte ms={messag e:i?"":t.s ubstituteT okens(this .getMessag e("tooMany Items"),[t his.schema .maxItems] ),status:i },i=this._ validateMi nItems(),n .notEnough Items={mes sage:i?"": t.substitu teTokens(t his.getMes sage("notE noughItems "),[this.s chema.minI tems]),sta tus:i},e&& n.valueNot Unique.sta tus&&n.too ManyItems. status&&n. notEnoughI tems.statu s},_valida teEqualMax Items:func tion(){ret urn!(this. schema.max Items&&thi s.schema.m axItems>=0 &&this.get Size()>=th is.schema. maxItems)} ,_validate EqualMinIt ems:functi on(){retur n!(this.sc hema.minIt ems&&this. schema.min Items>=0&& this.getSi ze()<=this .schema.mi nItems)},_ validateMi nItems:fun ction(){re turn!(this .schema.mi nItems&&th is.schema. minItems>= 0&&this.ge tSize()<th is.schema. minItems)} ,_validate MaxItems:f unction(){ return!(th is.schema. maxItems&& this.schem a.maxItems >=0&&this. getSize()> this.schem a.maxItems )},_valida teUniqueIt ems:functi on(){if(th is.schema. items&&thi s.schema.u niqueItems )for(var e ={},t=0;t< this.child ren.length ;t++){var n=this.chi ldren[t].g etValue(); if(n||(n=" "),e[n])re turn!1;e[n ]=!0}retur n!0},findA ction:func tion(t,n){ var i=null ;return e. each(t,fun ction(e,t) {t.action= ==n&&(i=t) }),i},post Render:fun ction(e){v ar t=this; this.base( function() {t.updateT oolbars(), e()})},get Size:funct ion(){retu rn this.ch ildren.len gth},updat eDOMElemen t:function (){this.up datePathAn dName(),th is.base()} ,updatePat hAndName:f unction(){ var n=func tion(i){i. children&& e.each(i.c hildren,fu nction(a,r ){i.prePat h&&t.start sWith(r.pa th,i.prePa th)&&(r.pr ePath=r.pa th,r.path= r.path.rep lace(i.pre Path,i.pat h)),i.preN ame&&t.sta rtsWith(r. name,i.pre Name)&&(r. preName=r. name,r.nam e=r.name.r eplace(i.p reName,i.n ame),r.fie ld&&e(r.fi eld).attr( "name",r.n ame)),n(r) })};this.c hildren&&t his.childr en.length> 0&&e.each( this.child ren,functi on(t,i){va r a=i.path .lastIndex Of("/"),r= i.path.sub string(a+1 );r.indexO f("[")<0&& r.indexOf( "]")<0&&(r =r.substri ng(r.index Of("[")+1, r.indexOf( "]"))),r!= =t&&(i.pre Path=i.pat h,i.path=i .path.subs tring(0,a) +"/["+t+"] "),i.nameC alculated& &(i.preNam e=i.name,i .parent&&i .parent.na me&&i.path ?i.name=i. parent.nam e+"_"+t:i. path&&(i.n ame=i.path .replace(/ \//g,"").r eplace(/\[ /g,"_").re place(/\]/ g,"")),thi s.parent.o ptions.rub yrails?e(i .field).at tr("name", i.parent.n ame):e(i.f ield).attr ("name",i. name)),i.p rePath||(i .prePath=i .path),n(i )})},updat eToolbars: function() {var t=thi s;if("disp lay"!==thi s.view.typ e&&!this.s chema.read only){t.to olbar&&(t. fireCallba ck("arrayT oolbar",!0 ),t.fireCa llback("ar rayToolbar ")),t.acti onbar&&(t. fireCallba ck("arrayA ctionbars" ,!0),t.fir eCallback( "arrayActi onbars")); var n=e(th is.getFiel dEl()).fin d(".alpaca -array-too lbar[data- alpaca-arr ay-toolbar -field-id= '"+t.getId ()+"']");i f(this.chi ldren.leng th>0&&t.op tions.hide ToolbarWit hChildren? e(n).hide( ):(e(n).sh ow(),e(n). find("[dat a-alpaca-a rray-toolb ar-action] ").each(fu nction(){v ar n=e(thi s).attr("d ata-alpaca -array-too lbar-actio n"),i=t.fi ndAction(t .toolbar.a ctions,n); i&&e(this) .off().cli ck(functio n(e){e.pre ventDefaul t(),i.clic k.call(t,n ,i)})}))," undefined" ==typeof t his.option s.toolbarS ticky||nul l===this.o ptions.too lbarSticky ){var i=th is.getFiel dEl().find (".alpaca- container- item[data- alpaca-con tainer-ite m-parent-f ield-id='" +t.getId() +"']");e(i ).each(fun ction(n){v ar i=e(t.g etFieldEl( )).find(". alpaca-arr ay-actionb ar[data-al paca-array -actionbar -parent-fi eld-id='"+ t.getId()+ "'][data-a lpaca-arra y-actionba r-item-ind ex='"+n+"' ]");i&&i.l ength>0&&( e(this).ho ver(functi on(){e(i). show()},fu nction(){e (i).hide() }),e(i).hi de())})}el se this.op tions.tool barSticky? e(t.getFie ldEl()).fi nd(".alpac a-array-ac tionbar[da ta-alpaca- array-acti onbar-pare nt-field-i d='"+t.get Id()+"']") .css("disp lay","inli ne-block") :this.opti ons.toolba rSticky||e (t.getFiel dEl()).fin d(".alpaca -array-act ionbar[dat a-alpaca-a rray-actio nbar-paren t-field-id ='"+t.getI d()+"']"). hide();var a=e(t.get FieldEl()) .find(".al paca-array -actionbar [data-alpa ca-array-a ctionbar-p arent-fiel d-id='"+t. getId()+"' ]");e(a).e ach(functi on(){var n =e(this).a ttr("data- alpaca-arr ay-actionb ar-item-in dex");"str ing"==type of n&&(n=p arseInt(n, 10)),e(thi s).childre n("[data-a lpaca-arra y-actionba r-action]" ).each(fun ction(){va r i=e(this ).attr("da ta-alpaca- array-acti onbar-acti on"),a=t.f indAction( t.actionba r.actions, i);a&&e(th is).off(). click(func tion(e){e. preventDef ault(),a.c lick.call( t,i,a,n)}) }),t._vali dateEqualM axItems()? (e(this).c hildren("[ data-alpac a-array-to olbar-acti on='add']" ).each(fun ction(n){e (this).rem oveClass(" alpaca-but ton-disabl ed"),t.fir eCallback( "enableBut ton",this) }),e(this) .children( "[data-alp aca-array- actionbar- action='ad d']").each (function( n){e(this) .removeCla ss("alpaca -button-di sabled"),t .fireCallb ack("enabl eButton",t his)})):(e (this).chi ldren("[da ta-alpaca- array-tool bar-action ='add']"). each(funct ion(n){e(t his).addCl ass("alpac a-button-d isabled"), t.fireCall back("disa bleButton" ,this)}),e (this).chi ldren("[da | |
| 61 | ta-alpaca- array-acti onbar-acti on='add']" ).each(fun ction(n){e (this).add Class("alp aca-button -disabled" ),t.fireCa llback("di sableButto n",this)}) ),t._valid ateEqualMi nItems()?e (this).chi ldren("[da ta-alpaca- array-acti onbar-acti on='remove ']").each( function(n ){e(this). removeClas s("alpaca- button-dis abled"),t. fireCallba ck("enable Button",th is)}):e(th is).childr en("[data- alpaca-arr ay-actionb ar-action= 'remove']" ).each(fun ction(n){e (this).add Class("alp aca-button -disabled" ),t.fireCa llback("di sableButto n",this)}) }),e(a).fi rst().chil dren("[dat a-alpaca-a rray-actio nbar-actio n='up']"). each(funct ion(){e(th is).addCla ss("alpaca -button-di sabled"),t .fireCallb ack("disab leButton", this)}),e( a).last(). children(" [data-alpa ca-array-a ctionbar-a ction='dow n']").each (function( ){e(this). addClass(" alpaca-but ton-disabl ed"),t.fir eCallback( "disableBu tton",this )})}},doRe solveItemC ontainer:f unction(){ var t=this ;return e( t.containe r)},handle ToolBarAdd ItemClick: function(e ){var n=th is;n.resol veItemSche maOptions( function(i ,a,r){if(r )return t. throwError WithCallba ck("Circul ar referen ce detecte d for sche ma: "+JSON .stringify (i),n.erro rCallback) ;var o=n.c hildren.le ngth,l=t.c reateEmpty DataInstan ce(i);n.ad dItem(o,i, a,l,functi on(t){e&&e (t)})})},h andleActio nBarAddIte mClick:fun ction(e,n) {var i=thi s;i.resolv eItemSchem aOptions(f unction(a, r,o){if(o) return t.t hrowErrorW ithCallbac k("Circula r referenc e detected for schem a: "+JSON. stringify( a),i.error Callback); var l=i.ge tValue(),s =t.createE mptyDataIn stance(a); i.addItem( e+1,a,r,s, function(t ){l.splice (e+1,0,t.g etValue()) ,i.setValu e(l),n&&n( t)})})},ha ndleAction BarRemoveI temClick:f unction(e, t){var n=t his;n.remo veItem(e,f unction(){ t&&t()})}, handleActi onBarMoveI temUpClick :function( e,t){var n =this;n.sw apItem(e,e -1,n.optio ns.animate ,function( ){t&&t()}) },handleAc tionBarMov eItemDownC lick:funct ion(e,t){v ar n=this; n.swapItem (e,e+1,n.o ptions.ani mate,funct ion(){t&&t ()})},doAd dItem:func tion(n,i,a ){var r=th is,o=r.doR esolveItem Container( );if(0===n )e(o).appe nd(i.conta inerItemEl );else{var l=o.child ren("[data -alpaca-co ntainer-it em-index=' "+(n-1)+"' ]");l&&l.l ength>0&&l .after(i.c ontainerIt emEl)}r.do AfterAddIt em(i,funct ion(e){t.f ireReady(i ),a(e)})}, doAfterAdd Item:funct ion(e,t){t ()},addIte m:function (e,t,n,i,a ){var r=th is;r._vali dateEqualM axItems()& &r.createI tem(e,t,n, i,function (t){r.regi sterChild( t,e),r.doA ddItem(e,t ,function( ){r.handle Reposition DOMRefresh (),r.updat eToolbars( ),r.refres hValidatio nState(),r .trigger(" add",t),r. triggerUpd ate(),a&&a (t)})})},d oRemoveIte m:function (e,t){var n=this,i=n .doResolve ItemContai ner();i.ch ildren(".a lpaca-cont ainer-item [data-alpa ca-contain er-item-in dex='"+e+" ']").remov e(),n.doAf terRemoveI tem(e,func tion(e){t( e)})},doAf terRemoveI tem:functi on(e,t){t( )},removeI tem:functi on(e,t){va r n=this;t his._valid ateEqualMi nItems()&& (n.unregis terChild(e ),n.doRemo veItem(e,f unction(){ n.handleRe positionDO MRefresh() ,n.updateT oolbars(), n.refreshV alidationS tate(),n.t rigger("re move",e),n .triggerUp date(),t&& t()}))},mo veItem:fun ction(n,i, a,r){var o =this;if(" function"= =typeof a& &(r=a,a=o. options.an imate),"un defined"== typeof a&& (a=o.optio ns.animate ?o.options .animate:! 0),"string "==typeof n&&(n=pars eInt(n,10) ),"string" ==typeof i &&(i=parse Int(i,10)) ,0>i&&(i=0 ),i>=o.chi ldren.leng th&&(i=o.c hildren.le ngth-1),-1 !==i&&n!== i){var l=o .children[ i];if(l){v ar s=funct ion(){var e=i;i>n&&e --;var t=o .children. splice(n,1 )[0];o.chi ldren.spli ce(e,0,t), o.data=o.g etValue(), o.refresh( function() {o.refresh Validation State(),o. triggerUpd ate(),o.tr igger("mov e"),r&&r() })},u=0;if (a&&(u=500 ),u>0){var c=o.getId (),d=o.get ContainerE l().find(" .alpaca-co ntainer-it em[data-al paca-conta iner-item- index='"+n +"'][data- alpaca-con tainer-ite m-parent-f ield-id='" +c+"']"),p =o.getCont ainerEl(). find(".alp aca-contai ner-item[d ata-alpaca -container -item-inde x='"+i+"'] [data-alpa ca-contain er-item-pa rent-field -id='"+c+" ']"),h=e(" <div class ='tempMark er1'></div >");d.befo re(h);var f=e("<div class='tem pMarker2'> </div>");p .before(f) ,t.animate dMove(d,p, u,function (){s()})}e lse s()}}} ,swapItem: function(n ,i,a,r){va r o=this;i f("functio n"==typeof a&&(r=a,a =o.options .animate), "undefined "==typeof a&&(a=o.op tions.anim ate?o.opti ons.animat e:!0),"str ing"==type of n&&(n=p arseInt(n, 10)),"stri ng"==typeo f i&&(i=pa rseInt(i,1 0)),0>i&&( i=0),i>=o. children.l ength&&(i= o.children .length-1) ,-1!==i&&n !==i){var l=o.childr en[i];if(l ){var s=fu nction(){v ar e=o.chi ldren[n],t =o.childre n[i];o.chi ldren[n]=t ,o.childre n[i]=e,o.d ata=o.getV alue(),o.r efresh(fun ction(){o. refreshVal idationSta te(),o.tri ggerUpdate (),o.trigg er("move") ,r&&r()})} ,u=0;if(a& &(u=500),u >0){var c= o.getId(), d=o.getCon tainerEl() .find(".al paca-conta iner-item[ data-alpac a-containe r-item-ind ex='"+n+"' ][data-alp aca-contai ner-item-p arent-fiel d-id='"+c+ "']"),p=o. getContain erEl().fin d(".alpaca -container -item[data -alpaca-co ntainer-it em-index=' "+i+"'][da ta-alpaca- container- item-paren t-field-id ='"+c+"']" ),h=e("<di v class='t empMarker1 '></div>") ;d.before( h);var f=e ("<div cla ss='tempMa rker2'></d iv>");p.be fore(f),t. animatedSw ap(d,p,u,f unction(){ s()})}else s()}}},ge tType:func tion(){ret urn"array" },getTitle :function( ){return"A rray Field "},getDesc ription:fu nction(){r eturn"Fiel d for list of items with same | |
| 62 | data type or structu re."},getS chemaOfSch ema:functi on(){var e ={properti es:{items: {title:"Ar ray Items" ,descripti on:"Schema for array items.",t ype:"objec t"},minIte ms:{title: "Minimum I tems",desc ription:"M inimum num ber of ite ms.",type: "number"}, maxItems:{ title:"Max imum Items ",descript ion:"Maxim um number of items." ,type:"num ber"},uniq ueItems:{t itle:"Item s Unique", descriptio n:"Item va lues shoul d be uniqu e if true. ",type:"bo olean","de fault":!1} }};return this.child ren&&this. children[0 ]&&t.merge (e.propert ies.items. properties ,this.chil dren[0].ge tSchemaOfS chema()),t .merge(thi s.base(),e )},getOpti onsForSche ma:functio n(){return t.merge(t his.base() ,{fields:{ items:{typ e:"object" },minItems :{type:"in teger"},ma xItems:{ty pe:"intege r"},unique Items:{typ e:"checkbo x"}}})},ge tSchemaOfO ptions:fun ction(){va r e={prope rties:{too lbarSticky :{title:"S ticky Tool bar",descr iption:"If true, the array ite m toolbar will alway s be enabl ed. If fa lse, the t oolbar is always dis abled. If undefined or null, the toolba r will app ear when h overed ove r.",type:" boolean"," default":v oid 0},too lbarStyle: {title:"To olbar Styl e",descrip tion:"The kind of to p-level to olbar to r ender for the array field. Ei ther 'butt on' or 'li nk'.",type :"string", "default": "button"}, actionbarS tyle:{titl e:"Actionb ar Style", descriptio n:"The kin d of actio nbar to re nder for e ach item i n the arra y. Either 'top', 'b ottom', 'l eft', or ' right'.",t ype:"strin g","defaul t":"top"}, toolbar:{t ype:"objec t",title:" Toolbar Co nfiguratio n",propert ies:{showL abels:{typ e:"boolean ","default ":!0,title :"Whether to show la bels next to actions "},actions :{type:"ar ray",title :"Toolbar Actions Co nfiguratio n",items:{ action:{ty pe:"string ",title:"A ction Key" },label:{t ype:"strin g",title:" Action Lab el"},iconC lass:{type :"string", title:"Act ion CSS Cl asses for Icon"},cli ck:{type:" function", title:"Act ion Click Handler"}, enabled:{t ype:"boole an",title: "Whether t o enable t he action" ,"default" :!0}}}}},a ctionbar:{ type:"obje ct",proper ties:{show Labels:{ty pe:"boolea n","defaul t":!1,titl e:"Whether to show l abels next to action s"},action s:{type:"a rray",titl e:"Actions Bar Actio ns Configu ration",it ems:{actio n:{type:"s tring",tit le:"Action Key"},lab el:{type:" string",ti tle:"Actio n Label"}, iconClass: {type:"str ing",title :"Action C SS Classes for Icon" },click:{t ype:"funct ion",title :"Action C lick Handl er"},enabl ed:{type:" boolean",t itle:"Whet her to ena ble the ac tion","def ault":!0}} }}},hideTo olbarWithC hildren:{t ype:"boole an",title: "Hide Tool bar with C hildren",d escription :"Indicate s whether to hide th e top tool bar when c hild eleme nts are av ailable.", "default": !0}}};retu rn this.ch ildren&&th is.childre n[0]&&t.me rge(e.prop erties.ite ms.propert ies,this.c hildren[0] .getSchema OfSchema() ),t.merge( this.base( ),e)},getO ptionsForO ptions:fun ction(){re turn t.mer ge(this.ba se(),{fiel ds:{toolba rSticky:{t ype:"check box"},item s:{type:"o bject",fie lds:{}}}}) }}),t.regi sterMessag es({notEno ughItems:" The minimu m number o f items is {0}",tooM anyItems:" The maximu m number o f items is {0}",valu eNotUnique :"Values a re not uni que",notAn Array:"Thi s value is not an Ar ray"}),t.r egisterFie ldClass("a rray",t.Fi elds.Array Field),t.r egisterDef aultSchema FieldMappi ng("array" ,"array"), t.register Messages({ addItemBut tonLabel:" Add New It em",addBut tonLabel:" Add",remov eButtonLab el:"Remove ",upButton Label:"Up" ,downButto nLabel:"Do wn"})}(jQu ery),funct ion(e){var t=e.alpac a;t.Fields .ObjectFie ld=t.Conta inerField. extend({ge tFieldType :function( ){return"o bject"},se tup:functi on(){var e =this;this .base();va r n=e.reso lveContain erItemTemp lateType() ;if(!n){e. resolveCon tainerItem TemplateTy pe();retur n t.throwE rrorWithCa llback("Un able to fi nd templat e descript or for con tainer ite m: "+e.get FieldType( ))}if(this .container ItemTempla teDescript or=e.view. getTemplat eDescripto r("contain er-"+n+"-i tem",e),!t .isEmpty(t his.data)& &""!==this .data&&!t. isObject(t his.data)) {if(!t.isS tring(this .data))ret urn;try{if (this.data =t.parseJS ON(this.da ta),!t.isO bject(this .data))ret urn void t .logWarn(" ObjectFiel d parsed d ata but it was not a n object: "+JSON.str ingify(thi s.data))}c atch(i){re turn}}},se tValue:fun ction(e){i f(e||(e={} ),t.isObje ct(e)){var n={};for( var i in t his.childr enById){va r a=this.c hildrenByI d[i].prope rtyId;n[a] =this.chil drenById[i ]}var r={} ;for(var o in e)e.ha sOwnProper ty(o)&&(r[ o]=e[o]);f or(var a i n r){var l =n[a];l&&( l.setValue (r[a]),del ete n[a],d elete r[a] )}for(var a in n){va r l=n[a];l .setValue( null)}}},g etContaine rValue:fun ction(){if (0===this. children.l ength&&!th is.isRequi red())retu rn{};for(v ar e={},n= 0;n<this.c hildren.le ngth;n++){ var i=this .children[ n].propert yId,a=this .children[ n].getValu e();if(a!= =a&&(a=voi d 0),"unde fined"!=ty peof a&&th is.determi neAllDepen denciesVal id(i)){var r=null;"b oolean"==t ypeof a?r= !!a:t.isAr ray(a)||t. isObject(a )||t.isNum ber(a)?r=a :(a||0===a )&&(r=a),n ull!==r&&( e[i]=r)}}r eturn e},a fterRender Container: function(e ,n){var i= this;this. base(e,fun ction(){if (i.isTopLe vel()&&i.v iew){i.wiz ardConfigs =i.view.ge tWizard(), "undefined "!=typeof i.wizardCo nfigs&&(i. wizardConf igs&&i.wiz ardConfigs !==!0||(i. wizardConf igs={}));v ar e=i.vie w.getLayou t().templa teDescript or;i.wizar dConfigs&& t.isObject (i.wizardC onfigs)&&( !e||i.wiza rdConfigs. | |
| 63 | bindings?i .autoWizar d():i.wiza rd())}n()} )},createI tems:funct ion(e){var n=this,i= [],a={};fo r(var r in n.data)a[ r]=r;var o =n.data;n. schema&&n. schema.pro perties&&( o=n.schema .propertie s);var l=f unction(){ var n=[];f or(var r i n a)n.push (r);n.leng th>0&&t.lo gDebug("Th ere were " +n.length+ " extra da ta keys th at were no t part of the schema "+JSON.st ringify(n) ),e(i)},s= [];for(var u in o){v ar c=null; n.data&&n. data.hasOw nProperty( u)&&(c=n.d ata[u]);va r d=functi on(e,a,r){ return fun ction(o){n .resolvePr opertySche maOptions( e,function (l,s,u){re turn u?t.t hrowErrorW ithCallbac k("Circula r referenc e detected for schem a: "+JSON. stringify( l),n.error Callback): (l||t.logD ebug("Unab le to reso lve schema for prope rty: "+e), void n.cre ateItem(e, l,s,a,null ,function( t){i.push( t),delete r[e],o()}) )})}}(u,c, a);s.push( d)}t.nextT ick(functi on(){t.ser ies(s,func tion(e){fo r(var t=!1 ,n=0;n<i.l ength;n++) if("undefi ned"!=type of i[n].op tions.orde r){t=!0;br eak}t&&i.s ort(functi on(e,t){va r n=e.opti ons.order; n||(n=0);v ar i=t.opt ions.order ;return i| |(i=0),n-i }),l()})}) },createIt em:functio n(n,i,a,r, o,l){var s =this,u=e( "<div></di v>");u.alp aca({data: r,options: a,schema:i ,view:this .view.id?t his.view.i d:this.vie w,connecto r:this.con nector,err or:functio n(e){s.des troy(),s.e rrorCallba ck.call(s, e)},notTop Level:!0,r ender:func tion(e,t){ | |
| 64 | e.parent=s ,e.propert yId=n,"/"! ==s.path?e .path=s.pa th+"/"+n:e .path=s.pa th+n,e.ren der(null,f unction(){ t&&t()})}, postRender :function( n){var i=t .tmpl(s.co ntainerIte mTemplateD escriptor, {id:s.getI d(),name:n .name,pare ntFieldId: s.getId(), actionbarS tyle:s.opt ions.actio nbarStyle, view:s.vie w,data:r}) ,a=e(i).fi nd("."+t.M ARKER_CLAS S_CONTAINE R_FIELD_IT EM_FIELD); return 0== =a.length& &e(i).hasC lass(t.MAR KER_CLASS_ CONTAINER_ FIELD_ITEM _FIELD)&&( a=e(i)),0= ==a.length ?void s.er rorCallbac k.call(s,{ message:"C annot find insertion point for field: "+ s.getId()} ):(e(a).be fore(n.get FieldEl()) ,e(a).remo ve(),n.con tainerItem El=i,t.fie ldApplyFie ldAndChild ren(n,func tion(e){e. hideInitVa lidationEr ror=!1}),v oid(l&&l(n )))}})},re solvePrope rtySchemaO ptions:fun ction(e,n) {var i=thi s,a=functi on(e,t,a){ i.options. readonly&& (t.readonl y=!0),n(e, t,a)},r=nu ll;i.schem a&&i.schem a.properti es&&i.sche ma.propert ies[e]&&(r =i.schema. properties [e]);var o ={};if(i.o ptions&&i. options.fi elds&&i.op tions.fiel ds[e]&&(o= i.options. fields[e]) ,r&&r.$ref ){for(var l=r.$ref,s =this,u=[s ];s.parent ;)s=s.pare nt,u.push( s);var c=r ,d=o;t.loa dRefSchema Options(s, l,function (e,n){for( var i=0,r= 0;r<u.leng th;r++)u[r ].schema&& (u[r].sche ma.id===l| |u[r].sche ma.id==="# "+l?i++:u[ r].schema. $ref===l&& i++);var o =i>1,s={}; c&&t.merge Object(s,c ),e&&t.mer geObject(s ,e),c&&c.i d&&(s.id=c .id);var p ={};d&&t.m ergeObject (p,d),n&&t .mergeObje ct(p,n),t. nextTick(f unction(){ a(s,p,o)}) })}else t. nextTick(f unction(){ a(r,o)})}, applyCreat edItems:fu nction(e,t ){var n=th is;this.ba se(e,funct ion(){var i=function (a){if(a== =e.items.l ength)retu rn void t( );var r=e. items[a],o =r.propert yId;n.show OrHideProp ertyBasedO nDependenc ies(o),n.b indDepende ncyFieldUp dateEvent( o),n.refre shDependen tFieldStat es(o),i(a+ 1)};i(0)}) },handleVa lidate:fun ction(){va r e=this.b ase(),n=th is.validat ion,i=this ._validate MaxPropert ies();retu rn n.tooMa nyProperti es={messag e:i?"":t.s ubstituteT okens(this .getMessag e("tooMany Properties "),[this.s chema.maxP roperties] ),status:i },i=this._ validateMi nPropertie s(),n.tooF ewProperti es={messag e:i?"":t.s ubstituteT okens(this .getMessag e("tooMany Items"),[t his.schema .minProper ties]),sta tus:i},e&& n.tooManyP roperties. status&&n. tooFewProp erties.sta tus},_vali dateMaxPro perties:fu nction(){i f("undefin ed"==typeo f this.sch ema.maxPro perties)re turn!0;var e=this.sc hema.maxPr operties,t =0;for(var n in this .data)t++; return e>= t},_valida teMinPrope rties:func tion(){if( "undefined "==typeof this.schem a.minPrope rties)retu rn!0;var e =this.sche ma.minProp erties,t=0 ;for(var n in this.d ata)t++;re turn t>=e} ,showOrHid ePropertyB asedOnDepe ndencies:f unction(e) {var n=thi s,i=this.c hildrenByP ropertyId[ e];if(!i)r eturn t.th rowErrorWi thCallback ("Missing property: "+e,n.erro rCallback) ;var a=thi s.determin eAllDepend enciesVali d(e);a?(i. show(),i.o nDependent Reveal()): (i.hide(), i.onDepend entConceal ()),i.getF ieldEl().t rigger("fi eldupdate" )},getChil dDependenc ies:functi on(e){var t=null;if( this.schem a.dependen cies&&(t=t his.schema .dependenc ies[e]),!t ){var n=th is.childre nByPropert yId[e];n&& (t=n.schem a.dependen cies)}retu rn t},getC hildCondit ionalDepen dencies:fu nction(e){ var t=null ,n=this.ch ildrenByPr opertyId[e ];return n &&(t=n.opt ions.depen dencies),t },determin eAllDepend enciesVali d:function (n){var i= this,a=thi s.children ByProperty Id[n];if(! a)return t .throwErro rWithCallb ack("Missi ng propert y: "+n,i.e rrorCallba ck);var r= i.getChild Dependenci es(n);if(! r)return!0 ;var o=!0; return t.i sString(r) ?o=i.deter mineSingle Dependency Valid(n,r) :t.isArray (r)&&e.eac h(r,functi on(e,t){o= o&&i.deter mineSingle Dependency Valid(n,t) }),o},bind Dependency FieldUpdat eEvent:fun ction(n){v ar i=this, a=this.chi ldrenByPro pertyId[n] ;if(!a)ret urn t.thro wErrorWith Callback(" Missing pr operty: "+ n,i.errorC allback);v ar r=i.get ChildDepen dencies(n) ;if(!r)ret urn!0;var o=function (e,n){var r=t.resolv eField(i,n );r&&(r.ge tFieldEl() .bind("fie ldupdate", function(e ,t,n,a){re turn funct ion(t){i.s howOrHideP ropertyBas edOnDepend encies(n), e.getField El().trigg er("fieldu pdate")}}( a,r,e,n)), r.getField El().trigg er("fieldu pdate"))}; t.isString (r)?o(n,r) :t.isArray (r)&&e.eac h(r,functi on(e,t){o( n,t)})},re freshDepen dentFieldS tates:func tion(n){va r i=this,a =this.chil drenByProp ertyId[n]; if(!a)retu rn t.throw ErrorWithC allback("M issing pro perty: "+n ,i.errorCa llback);va r r=i.getC hildDepend encies(n); if(!r)retu rn!0;var o =function( e){var n=t .resolveFi eld(i,e);n &&n.getFie ldEl().tri gger("fiel dupdate")} ;t.isStrin g(r)?o(r): t.isArray( r)&&e.each (r,functio n(e,t){o(t )})},deter mineSingle Dependency Valid:func tion(e,n){ var i=this ,a=t.resol veField(i, n);if(!a)r eturn!1;va r r=a.data ,o=!1,l=th is.getChil dCondition alDependen cies(e);if (l&&0!==l. length){"b oolean"!== a.getType( )||r||(r=! 1);var s=l [n];!t.isE mpty(s)&&t .isFunctio n(s)?o=s.c all(this,r ):(o=!0,t. isArray(s) ?t.anyEqua lity(r,s)| |(o=!1):t. isEmpty(s) ||t.anyEqu ality(s,r) ||(o=!1))} else o="bo olean"!==a .getType() ||this.chi ldrenByPro pertyId[e] .options.d ependencie s||r?!t.is ValEmpty(a .data):!1; return a&& a.isHidden ()&&(o=!1) ,o},getInd ex:functio n(e){if(t. isEmpty(e) )return-1; for(var n= 0;n<this.c hildren.le ngth;n++){ var i=this .children[ n].propert yId;if(i== e)return n }return-1} ,addItem:f unction(e, t,n,i,a,r) {var o=thi s;this.cre ateItem(e, t,n,i,a,fu nction(e){ var t=null | |
| 65 | ;if(a&&o.c hildrenByI d[a])for(v ar n=0;n<o .children. length;n++ )if(o.chil dren[n].ge tId()==a){ t=n;break} o.register Child(e,nu ll!=t?t+1: 0),o.doAdd Item(t,e), o.handleRe positionDO MRefresh() ,o.refresh Validation State(!0,f unction(){ o.trigger( "add",e),o .triggerUp date(),e.t riggerWith Propagatio n.call(e," ready","do wn"),r&&r( )})})},doA ddItem:fun ction(n,i) {var a=thi s;if(n){va r r=a.getC ontainerEl ().childre n("[data-a lpaca-cont ainer-item -index='"+ n+"']");r& &r.length> 0&&r.after (i.contain erItemEl)} else e(a.c ontainer). prepend(i. containerI temEl);a.d oAfterAddI tem(i,func tion(){t.f ireReady(i )})},doAft erAddItem: function(e ,t){t()},d oResolveIt emContaine r:function (){var t=t his;return e(t.conta iner)},rem oveItem:fu nction(t,n ){var i=th is,a=this. childrenBy PropertyId [t];a?(thi s.children =e.grep(th is.childre n,function (e,n){retu rn e.prope rtyId!==t} ),delete t his.childr enByProper tyId[t],de lete this. childrenBy Id[a.getId ()],i.doRe moveItem(a ),this.ref reshValida tionState( !0,functio n(){i.hand leRepositi onDOMRefre sh(),i.tri gger("remo ve",a),i.t riggerUpda te(),n&&n( )})):n()}, doRemoveIt em:functio n(e){var t =this,n=t. doResolveI temContain er();n.chi ldren(".al paca-conta iner-item[ data-alpac a-containe r-item-nam e='"+e.nam e+"']").re move(),e.d estroy()}, wizard:fun ction(){va r n=this,i =this.wiza rdConfigs. steps;i||( i=[]);var a=this.wiz ardConfigs .title,r=t his.wizard Configs.de scription, o=this.wiz ardConfigs .buttons;o ||(o={}),o .previous| |(o.previo us={}),o.p revious.ti tle||(o.pr evious.tit le="Previo us"),o.pre vious.alig n||(o.prev ious.align ="left"),o .previous. type||(o.p revious.ty pe="button "),o.next| |(o.next={ }),o.next. title||(o. next.title ="Next"),o .next.alig n||(o.next .align="ri ght"),o.ne xt.type||( o.next.typ e="button" ),this.wiz ardConfigs .hideSubmi tButton||( o.submit|| (o.submit= {}),o.subm it.title|| (o.submit. title="Sub mit"),o.su bmit.align ||(o.submi t.align="r ight"),o.s ubmit.type ||(o.submi t.type="bu tton"));fo r(var l in o)o[l].ty pe||(o[l]. type="butt on");var s =this.wiza rdConfigs. showSteps; "undefined "==typeof s&&(s=!0); var u=this .wizardCon figs.showP rogressBar ,c=this.wi zardConfig s.validati on;"undefi ned"==type of c&&(c=! 0);var a=e (this.fiel d).attr("d ata-alpaca -wizard-ti tle"),r=e( this.field ).attr("da ta-alpaca- wizard-des cription") ,d=e(this. field).att r("data-al paca-wizar d-validati on");"unde fined"!=ty peof d&&(c =!!d);var p=e(this.f ield).attr ("data-alp aca-wizard -show-step s");"undef ined"!=typ eof p&&(s= !!p);var h =e(this.fi eld).attr( "data-alpa ca-wizard- show-progr ess-bar"); "undefined "!=typeof h&&(u=!!h) ;var f=e(t his.field) .find("[da ta-alpaca- wizard-rol e='step']" );0==i.len gth&&f.eac h(function (t){var n= {},a=e(thi s).attr("d ata-alpaca -wizard-st ep-title") ;"undefine d"!=typeof a&&(n.tit le=a),n.ti tle||(n.ti tle="Step "+t);var r =e(this).a ttr("data- alpaca-wiz ard-step-d escription ");"undefi ned"!=type of r&&(n.d escription =r),n.desc ription||( n.descript ion="Step "+t),i.pus h(n)}),"un defined"== typeof u&& i.length>1 &&(u=!0);v ar m={};m. wizardTitl e=a,m.wiza rdDescript ion=r,m.sh owSteps=s, m.performV alidation= c,m.steps= i,m.button s=o,m.sche ma=n.schem a,m.option s=n.option s,m.data=n .data,m.sh owProgress Bar=u,m.ma rkAllSteps Visited=th is.wizardC onfigs.mar kAllStepsV isited,m.v iew=n.view ;var g=n.v iew.getTem plateDescr iptor("wiz ard",n);if (g){var v= t.tmpl(g,m );e(n.fiel d).append( v);var b=e (v).find(" .alpaca-wi zard-nav") ,y=e(v).fi nd(".alpac a-wizard-s teps"),w=e (v).find(" .alpaca-wi zard-butto ns"),x=e(v ).find(".a lpaca-wiza rd-progres s-bar");e( y).append( f),functio n(i,a,r,o) {var l=0,s =e(r).find ("[data-al paca-wizar d-button-k ey='previo us']"),u=e (r).find(" [data-alpa ca-wizard- button-key ='next']") ,c=e(r).fi nd("[data- alpaca-wiz ard-button -key='subm it']"),d=f unction(){ if(o.showS teps){if(o .visits||( o.visits={ }),o.markA llStepsVis ited)for(v ar t=e(i). find("[dat a-alpaca-w izard-step -index]"), n=0;n<t.le ngth;n++)o .visits[n] =!0;o.visi ts[l]=!0;v ar t=e(i). find("[dat a-alpaca-w izard-step -index]"); e(t).remov eClass("di sabled"),e (t).remove Class("com pleted"),e (t).remove Class("act ive"),e(t) .removeCla ss("visite d");for(va r n=0;n<t. length;n++ )l>n?e(i). find("[dat a-alpaca-w izard-step -index='"+ n+"']").ad dClass("co mpleted"): n===l?e(i) .find("[da ta-alpaca- wizard-ste p-index='" +n+"']").a ddClass("a ctive"):o. visits&&o. visits[n]| |e(i).find ("[data-al paca-wizar d-step-ind ex='"+n+"' ]").addCla ss("disabl ed"),o.vis its&&o.vis its[n]&&e( i).find("[ data-alpac a-wizard-s tep-index= '"+n+"']") .addClass( "visited") }if(o.show ProgressBa r){var r=l +1,d=o.ste ps.length+ 1,p=parseI nt(r/d*100 ,10)+"%";e (x).find(" .progress- bar").attr ("aria-val uemax",d), e(x).find( ".progress -bar").att r("aria-va luenow",r) ,e(x).find (".progres s-bar").cs s("width", p)}s.hide( ),u.hide() ,c.hide(), 1==o.steps .length?c. show():o.s teps.lengt h>1&&(l>0& &s.show(), u.show(),0 ==l?u.show ():l==o.st eps.length -1&&(u.hid e(),c.show ())),e(a). find("[dat a-alpaca-w izard-role ='step']") .hide(),e( e(a).find( "[data-alp aca-wizard -role='ste p']")[l]). show()},p= function(i ,r){if(!o. performVal idation)re turn void r(!0);var s=[],u=e(e (a).find(" [data-alpa ca-wizard- role='step ']")[l]);e (u).find(" .alpaca-fi eld").each (function( ){var t=e( this).attr ("data-alp aca-field- id");if(t) {var i=n.c hildrenByI d[t];i&&s. push(i)}}) ;for(var c =[],d=0;d< s.length;d ++)c.push( function(e ){return f unction(t) {e.refresh Validation | |
| 66 | State(!0,f unction(){ t()})}}(s[ d]));t.ser ies(c,func tion(){for (var e=!0, t=0;t<s.le ngth;t++)e =e&&s[t].i sValid(!0) ;var a=o.b uttons[i]; a&&a.valid ate?a.vali date.call( n,function (t){e=e&&t ,r(e)}):r( e)})};e(s) .click(fun ction(e){i f(e.preven tDefault() ,l>=1){var t=o.butto ns.previou s;t&&t.cli ck&&t.clic k.call(n,e ),l--,d()} }),e(u).cl ick(functi on(e){e.pr eventDefau lt(),l+1<= o.steps.le ngth-1&&p( "next",fun ction(t){i f(t){var i =o.buttons .next;i&&i .click&&i. click.call (n,e),l++, d()}else w indow.setT imeout(fun ction(){n. focus(func tion(e){}) },250)})}) ,e(c).clic k(function (e){e.prev entDefault (),l===o.s teps.lengt h-1&&p("su bmit",func tion(t){if (t){var i= o.buttons. submit;i&& (i.click?i .click.cal l(n,e):n.f orm&&n.for m.submit() )}else win dow.setTim eout(funct ion(){n.fo cus(functi on(e){})}, 250)})}),e (r).find(" [data-alpa ca-wizard- button-key ]").each(f unction(){ var t=e(th is).attr(" data-alpac a-wizard-b utton-key" );if("subm it"!=t&&"n ext"!=t&&" previous"! =t){var i= o.buttons[ t];i&&i.cl ick&&e(thi s).click(f unction(e) {return fu nction(t){ e.click.ca ll(n,t)}}( i))}}),e(i ).find("[d ata-alpaca -wizard-st ep-index]" ).click(fu nction(t){ t.preventD efault();v ar n=e(thi s).attr("d ata-alpaca -wizard-st ep-index") ;n&&(n=par seInt(n,10 ),(n==l||o .visits&&o .visits[n] )&&(l>n?(l =n,d()):n> l&&p(null, function(e ){e&&(l=n, d())})))}) ,n.on("mov eToStep",f unction(e) {var t=e.i ndex,n=e.s kipValidat ion;"undef ined"!=typ eof t&&t<= o.steps.le ngth-1&&(n ?(l=t,d()) :p(null,fu nction(e){ e&&(l=t,d( ))}))}),n. on("advanc eOrSubmit" ,function( t){p(null, function(t ){t&&(l=== o.steps.le ngth-1?e(c ).click(): e(u).click ())})}),d( )}(b,y,w,m )}},autoWi zard:funct ion(){var t=this.wiz ardConfigs .bindings; t||(t={}); for(var n in this.ch ildrenByPr opertyId)t .hasOwnPro perty(n)|| (t[n]=1);v ar i=!0;e( this.field ).find("[d ata-alpaca -wizard-ro le='step'] ").length> 0&&(i=!1); var a=1,r= [];do{r=[] ;for(var n in t)t[n] ===a&&this .childrenB yPropertyI d&&this.ch ildrenByPr opertyId[n ]&&r.push( this.child renByPrope rtyId[n]); if(r.lengt h>0){var o =null;i?(o =e('<div d ata-alpaca -wizard-ro le="step"> </div>'),e (this.fiel d).append( o)):o=e(e( this.field ).find("[d ata-alpaca -wizard-ro le='step'] ")[a-1]);f or(var l=! 1,s=0;s<r. length;s++ )if("undef ined"!=typ eof r[s].o ptions.ord er){l=!0;b reak}l&&r. sort(funct ion(e,t){v ar n=e.opt ions.order ;n||(n=0); var i=t.op tions.orde r;return i ||(i=0),n- i});for(va r s=0;s<r. length;s++ )e(o).appe nd(r[s].co ntainerIte mEl);a++}} while(r.le ngth>0);th is.wizard( ),0===e(th is.contain er).childr en().lengt h&&e(this. container) .css("disp lay","none ")},getTyp e:function (){return" object"},m oveItem:fu nction(n,i ,a,r){var o=this;if( "function" ==typeof a &&(r=a,a=o .options.a nimate),"u ndefined"= =typeof a& &(a=o.opti ons.animat e?o.option s.animate: !0),"strin g"==typeof n&&(n=par seInt(n,10 )),"string "==typeof i&&(i=pars eInt(i,10) ),0>i&&(i= 0),i>=o.ch ildren.len gth&&(i=o. children.l ength-1),- 1!==i){var l=o.child ren[i];if( l){var s=o .getContai nerEl().ch ildren("[d ata-alpaca -container -item-inde x='"+n+"'] "),u=o.get ContainerE l().childr en("[data- alpaca-con tainer-ite m-index='" +i+"']"),c =e("<div c lass='temp Marker1'>< /div>");s. before(c); var d=e("< div class= 'tempMarke r2'></div> ");u.befor e(d);var p =function( ){for(var t=[],a=0;a <o.childre n.length;a ++)a===n?t [a]=o.chil dren[i]:a= ==i?t[a]=o .children[ n]:t[a]=o. children[a ];o.childr en=t,c.rep laceWith(u ),d.replac eWith(s),o .handleRep ositionDOM Refresh(), e(s).find( "[data-alp aca-array- actionbar- item-index ='"+n+"']" ).attr("da ta-alpaca- array-acti onbar-item -index",i) ,e(u).find ("[data-al paca-array -actionbar -item-inde x='"+i+"'] ").attr("d ata-alpaca -array-act ionbar-ite m-index",n ),o.refres hValidatio nState(),o .triggerUp date(),o.t rigger("mo ve"),r&&r( )};a?t.ani matedSwap( s,u,500,fu nction(){p ()}):p()}} },getTitle :function( ){return"O bject Fiel d"},getDes cription:f unction(){ return"Obj ect field for contai ning other fields"}, getSchemaO fSchema:fu nction(){v ar e={prop erties:{pr operties:{ title:"Pro perties",d escription :"List of child prop erties.",t ype:"objec t"},maxPro perties:{t ype:"numbe r",title:" Maximum Nu mber Prope rties",des cription:" The maximu m number o f properti es that th is object is allowed to have"} ,minProper ties:{type :"number", title:"Min imum Numbe r of Prope rties",des cription:" The minimu m number o f properti es that th is object is require d to have" }}},n=e.pr operties.p roperties; if(n.prope rties={},t his.childr en)for(var i=0;i<thi s.children .length;i+ +){var a=t his.childr en[i].prop ertyId;n.p roperties[ a]=this.ch ildren[i]. getSchemaO fSchema(), n.properti es[a].titl e=a+" :: " +n.propert ies[a].tit le}return t.merge(th is.base(), e)},getSch emaOfOptio ns:functio n(){var e= t.merge(th is.base(), {propertie s:{},order :{type:"nu mber",titl e:"Order", descriptio n:"Allows for option al specifi cation of the index of this fi eld in the propertie s array."} }),n={prop erties:{fi elds:{titl e:"Field O ptions",de scription: "List of o ptions for child fie lds.",type :"object"} }},i=n.pro perties.fi elds;if(i. properties ={},this.c hildren)fo r(var a=0; a<this.chi ldren.leng th;a++){va r r=this.c hildren[a] .propertyI d;i.proper ties[r]=th is.childre n[a].getSc hemaOfOpti ons(),i.pr operties[r ].title=r+ " :: "+i.p roperties[ r].title}r eturn t.me rge(e,n)}} ),t.regist erMessages ({tooManyP roperties: "The maxim um number of propert ies ({0}) has been e xceeded.", tooFewProp | |
| 67 | erties:"Th ere are no t enough p roperties ({0} are r equired)"} ),t.regist erFieldCla ss("object ",t.Fields .ObjectFie ld),t.regi sterDefaul tSchemaFie ldMapping( "object"," object")}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.AnyFie ld=t.Contr olField.ex tend({getF ieldType:f unction(){ return"any "},setup:f unction(){ this.base( )},getCont rolValue:f unction(){ return thi s._getCont rolVal(!0) },setValue :function( e){t.isEmp ty(e)?this .control.v al(""):thi s.control. val(e),thi s.base(e)} ,disable:f unction(){ this.contr ol.disable d=!0},enab le:functio n(){this.c ontrol.dis abled=!1}, focus:func tion(e){th is.control .focus(),e &&e(this)} ,getType:f unction(){ return"any "},getTitl e:function (){return" Any Field" },getDescr iption:fun ction(){re turn"Any f ield."},ge tSchemaOfS chema:func tion(){ret urn t.merg e(this.bas e(),{prope rties:{}}) },getOptio nsForSchem a:function (){return t.merge(th is.base(), {fields:{} })},getSch emaOfOptio ns:functio n(){return t.merge(t his.base() ,{properti es:{}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{}}) }}),t.regi sterFieldC lass("any" ,t.Fields. AnyField), t.register DefaultSch emaFieldMa pping("any ","any")}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.Hidden Field=t.Co ntrolField .extend({g etFieldTyp e:function (){return" hidden"},s etup:funct ion(){this .base()},g etControlV alue:funct ion(){retu rn this._g etControlV al(!0)},se tValue:fun ction(e){t .isEmpty(e )?this.get ControlEl( ).val(""): this.getCo ntrolEl(). val(e),thi s.base(e)} ,getType:f unction(){ return"str ing"},getT itle:funct ion(){retu rn"Hidden" },getDescr iption:fun ction(){re turn"Field for a hid den HTML i nput"}}),t .registerF ieldClass( "hidden",t .Fields.Hi ddenField) }(jQuery), function(e ){var t=e. alpaca;t.F ields.Addr essField=t .Fields.Ob jectField. extend({ge tFieldType :function( ){return"a ddress"},s etup:funct ion(){this .base(),th is.data&&t his.data.s treet||(th is.data={s treet:["", ""]}),this .schema={t itle:"Home Address", type:"obje ct",proper ties:{stre et:{title: "Street",t ype:"array ",items:{t ype:"strin g",maxLeng th:30},min Items:0,ma xItems:3}, city:{titl e:"City",t ype:"strin g"},state: {title:"St ate",type: "string"," enum":["AL ","AK","AS ","AZ","AR ","CA","CO ","CT","DE ","DC","FM ","FL","GA ","GU","HI ","ID","IL ","IN","IA ","KS","KY ","LA","ME ","MH","MD ","MA","MI ","MN","MS ","MO","MT ","NE","NV ","NH","NJ ","NM","NY ","NC","ND ","MP","OH ","OK","OR ","PW","PA ","PR","RI ","SC","SD ","TN","TX ","UT","VT ","VI","VA ","WA","WV ","WI","WY "]},zip:{t itle:"Zip Code",type :"string", pattern:/^ (\d{5}(-\d {4})?)?$/} }},t.merge (this.opti ons,{field s:{zip:{ma skString:" 99999",siz e:5},state :{optionLa bels:["ALA BAMA","ALA SKA","AMER ICAN SAMOA ","ARIZONA ","ARKANSA S","CALIFO RNIA","COL ORADO","CO NNECTICUT" ,"DELAWARE ","DISTRIC T OF COLUM BIA","FEDE RATED STAT ES OF MICR ONESIA","F LORIDA","G EORGIA","G UAM","HAWA II","IDAHO ","ILLINOI S","INDIAN A","IOWA", "KANSAS"," KENTUCKY", "LOUISIANA ","MAINE", "MARSHALL ISLANDS"," MARYLAND", "MASSACHUS ETTS","MIC HIGAN","MI NNESOTA"," MISSISSIPP I","MISSOU RI","MONTA NA","NEBRA SKA","NEVA DA","NEW H AMPSHIRE", "NEW JERSE Y","NEW ME XICO","NEW YORK","NO RTH CAROLI NA","NORTH DAKOTA"," NORTHERN M ARIANA ISL ANDS","OHI O","OKLAHO MA","OREGO N","PALAU" ,"PENNSYLV ANIA","PUE RTO RICO", "RHODE ISL AND","SOUT H CAROLINA ","SOUTH D AKOTA","TE NNESSEE"," TEXAS","UT AH","VERMO NT","VIRGI N ISLANDS" ,"VIRGINIA ","WASHING TON","WEST VIRGINIA" ,"WISCONSI N","WYOMIN G"]}}}),t. isEmpty(th is.options .addressVa lidation)& &(this.opt ions.addre ssValidati on=!0)},is Container: function() {return!1} ,getAddres s:function (){var t=t his.getVal ue();"view "===this.v iew.type&& (t=this.da ta);var n= "";return t&&(t.stre et&&e.each (t.street, function(e ,t){n+=t+" "}),t.cit y&&(n+=t.c ity+" "),t .state&&(n +=t.state+ " "),t.zip &&(n+=t.zi p)),n},aft erRenderCo ntainer:fu nction(t,n ){var i=th is;this.ba se(t,funct ion(){var t=i.getCon tainerEl() ;if(e(t).a ddClass("a lpaca-addr essfield") ,i.options .addressVa lidation&& !i.isDispl ayOnly()){ e('<div st yle="clear :both;"></ div>').app endTo(t);v ar a=e('<d iv class=" alpaca-for m-button"> Show Googl e Map</div >').append To(t);a.bu tton&&a.bu tton({text :!0}),a.cl ick(functi on(){if(go ogle&&goog le.maps){v ar t=new g oogle.maps .Geocoder, n=i.getAdd ress();t&& t.geocode( {address:n },function (t,n){if(n ===google. maps.Geoco derStatus. OK){var a= i.getId()+ "-map-canv as";0===e( "#"+a).len gth&&e("<d iv id='"+a +"' class= 'alpaca-fi eld-addres s-mapcanva s'></div>" ).appendTo (i.getFiel dEl());var r=new goo gle.maps.M ap(documen t.getEleme ntById(i.g etId()+"-m ap-canvas" ),{zoom:10 ,center:t[ 0].geometr y.location ,mapTypeId :google.ma ps.MapType Id.ROADMAP });new goo gle.maps.M arker({map :r,positio n:t[0].geo metry.loca tion})}els e i.displa yMessage(" Geocoding failed: "+ n)})}else i.displayM essage("Go ogle Map A PI is not installed. ")}).wrap( "<small/>" ),i.option s.showMapO nLoad&&a.c lick()}n() })},getTyp e:function (){return" any"},getT itle:funct ion(){retu rn"Address "},getDesc ription:fu nction(){r eturn"Stan dard US Ad dress with Street, C ity, State and Zip. Also comes with supp ort for Go ogle map." },getSchem aOfOptions :function( ){return t .merge(thi s.base(),{ properties :{validate Address:{t itle:"Addr ess Valida tion",desc ription:"E nable addr ess valida tion if tr ue",type:" boolean"," default":! 0},showMap OnLoad:{ti tle:"Wheth er to show the map w hen first loaded",ty pe:"boolea n"}}})},ge tOptionsFo rOptions:f | |
| 68 | unction(){ return t.m erge(this. base(),{fi elds:{vali dateAddres s:{helper: "Address v alidation if checked ",rightLab el:"Enable Google Ma p for addr ess valida tion?",typ e:"checkbo x"}}})}}), t.register FieldClass ("address" ,t.Fields. AddressFie ld)}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.C KEditorFie ld=t.Field s.TextArea Field.exte nd({getFie ldType:fun ction(){re turn"ckedi tor"},setu p:function (){this.da ta||(this. data=""),t his.base() ,"undefine d"==typeof this.opti ons.ckedit or&&(this. options.ck editor={}) },afterRen derControl :function( t,n){var i =this;this .base(t,fu nction(){! i.isDispla yOnly()&&i .control&& "undefined "!=typeof CKEDITOR&& i.on("read y",functio n(){i.edit or||(i.edi tor=CKEDIT OR.replace (e(i.contr ol)[0],i.o ptions.cke ditor),i.i nitCKEdito rEvents()) }),e(i.con trol).bind ("destroye d",functio n(){if(i.e ditor){i.e ditor.remo veAllListe ners();try {i.editor. destroy(!1 )}catch(e) {}i.editor =null}}),n ()})},init CKEditorEv ents:funct ion(){var e=this;e.e ditor&&(e. editor.on( "click",fu nction(t){ e.onClick. call(e,t), e.trigger( "click",t) }),e.edito r.on("chan ge",functi on(t){e.on Change(),e .triggerWi thPropagat ion("chang e",t)}),e. editor.on( "blur",fun ction(t){e .onBlur(), e.trigger( "blur",t)} ),e.editor .on("focus ",function (t){e.onFo cus.call(e ,t),e.trig ger("focus ",t)}),e.e ditor.on(" key",funct ion(t){e.o nKeyPress. call(e,t), e.trigger( "keypress" ,t)}))},se tValue:fun ction(e){v ar t=this; this.base( e),t.edito r&&t.edito r.setData( e)},getCon trolValue: function() {var e=thi s,t=null;r eturn e.ed itor&&(t=e .editor.ge tData()),t },destroy: function() {var e=thi s;e.editor &&(e.edito r.destroy( ),e.editor =null),thi s.base()}, getTitle:f unction(){ return"CK Editor"},g etDescript ion:functi on(){retur n"Provides an instan ce of a CK Editor co ntrol for use in edi ting HTML. "},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie s:{ckedito r:{title:" CK Editor options",d escription :"Use this entry to provide co nfiguratio n options to the und erlying CK Editor plu gin.",type :"any"}}}) },getOptio nsForOptio ns:functio n(){return t.merge(t his.base() ,{fields:{ ckeditor:{ type:"any" }}})}}),t. registerFi eldClass(" ckeditor", t.Fields.C KEditorFie ld)}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.C olorField= t.Fields.T extField.e xtend({set up:functio n(){var t= this;this. spectrumAv ailable=!1 ,t.isDispl ayOnly()|| "undefined "==typeof e.fn.spect rum||(this .spectrumA vailable=! 0),"undefi ned"==type of this.op tions.spec trum&&t.sp ectrumAvai lable&&(th is.inputTy pe="color" ),this.bas e(),"undef ined"==typ eof this.o ptions.spe ctrum&&(th is.options .spectrum= {}),"undef ined"==typ eof this.o ptions.spe ctrum.show Input&&(th is.options .spectrum. showInput= !0),"undef ined"==typ eof this.o ptions.spe ctrum.show Palette&&( this.optio ns.spectru m.showPale tte=!0),"u ndefined"= =typeof th is.options .spectrum. preferredF ormat&&(th is.options .spectrum. preferredF ormat="hex 3"),"undef ined"==typ eof this.o ptions.spe ctrum.clic koutFiresC hange&&(th is.options .spectrum. clickoutFi resChange= !0)},getFi eldType:fu nction(){r eturn"colo r"},getTyp e:function (){return" string"},a fterRender Control:fu nction(t,n ){var i=th is;this.ba se(t,funct ion(){i.sp ectrumAvai lable&&i.c ontrol&&(s etTimeout( function() {e(i.contr ol[0]).spe ctrum(e.ex tend({colo r:i.data}, i.options. spectrum)) },100),e(i .control). on("change .spectrum" ,function( e,t){var n =i.convert TinyColor( t);i.setVa lue(n)})), n()})},con vertTinyCo lor:functi on(e){retu rn e.toHex String()}, getTitle:f unction(){ return"Col or Field"} ,getDescri ption:func tion(){ret urn"A colo r picker f or selecti ng hexadec imal color values"}} ),t.regist erFieldCla ss("color" ,t.Fields. ColorField ),t.regist erDefaultS chemaField Mapping("c olor","col or")}(jQue ry),functi on(e){var t=e.alpaca ;t.Fields. ColorPicke rField=t.F ields.Text Field.exte nd({setup: function() {var t=thi s;this.sim pleColorPi ckerAvaila ble=!1,t.i sDisplayOn ly()||"und efined"==t ypeof e.fn .colorpick er||(this. simpleColo rPickerAva ilable=!0) ,"undefine d"!=typeof this.opti ons.colorp icker||t.s impleColor PickerAvai lable||(th is.inputTy pe="color" ),this.bas e(),"undef ined"==typ eof this.o ptions.col orpicker&& (this.opti ons.colorp icker={}), t.data&&(t .options.c olorpicker .color=t.d ata)},getF ieldType:f unction(){ return"col orpicker"} ,getType:f unction(){ return"str ing"},afte rRenderCon trol:funct ion(t,n){v ar i=this; this.base( t,function (){i.simpl eColorPick erAvailabl e&&i.contr ol&&(setTi meout(func tion(){e(i .control[0 ]).colorpi cker(i.opt ions.color picker)},1 00),e(i.co ntrol).on( "changeCol or.colorpi cker",func tion(e){i. setValue(e .color.toH ex())})),n ()})},getT itle:funct ion(){retu rn"Color P icker Fiel d"},getDes cription:f unction(){ return"A c olor picke r for sele cting hexa decimal co lor values "}}),t.reg isterField Class("col orpicker", t.Fields.C olorPicker Field)}(jQ uery),func tion(e){va r t=e.alpa ca;t.Field s.CountryF ield=t.Fie lds.Select Field.exte nd({getFie ldType:fun ction(){re turn"count ry"},setup :function( ){t.isUnde fined(this .options.c apitalize) &&(this.op tions.capi talize=!1) ,this.sche ma["enum"] =[],this.o ptions.opt ionLabels= [];var e=t his.getMes sage("coun tries");if (e)for(var n in e){t his.schema ["enum"].p ush(n);var i=e[n];th is.options .capitaliz e&&(i=i.to UpperCase( )),this.op tions.opti onLabels.p ush(i)}thi s.base()}, getTitle:f unction(){ return"Cou ntry Field "},getDesc ription:fu nction(){r eturn"Prov ides a dro | |
| 69 | pdown sele ctor of co untries ke yed by the ir ISO3 co de. The n ames of th e countrie s are read from the I18N bundl e for the current lo cale."},ge tSchemaOfO ptions:fun ction(){re turn t.mer ge(this.ba se(),{prop erties:{ca pitalize:{ title:"Cap italize",d escription :"Whether the values should be capitaliz ed",type:" boolean"," default":! 1,readonly :!0}}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{cap italize:{t ype:"check box"}}})}} ),t.regist erFieldCla ss("countr y",t.Field s.CountryF ield),t.re gisterDefa ultFormatF ieldMappin g("country ","country ")}(jQuery ),function (e){var t= function() {var e={up :Math.ceil ,down:func tion(e){re turn~~e},n earest:Mat h.round};r eturn func tion(t){re turn e[t]} }(),n=e.al paca;n.Fie lds.Curren cyField=n. Fields.Tex tField.ext end({const ructor:fun ction(e,t, n,i,a,r,o) {n=n||{};v ar l=this. getSchemaO fPriceForm atOptions( ).properti es;for(var s in l){v ar u=l[s]; s in n||(n [s]=u["def ault"]||vo id 0)}"und efined"!=t ypeof t&&( t=""+parse Float(t).t oFixed(n.c entsLimit) ),this.bas e(e,t,n,i, a,r,o)},ge tFieldType :function( ){return"c urrency"}, afterRende rControl:f unction(t, n){var i=t his,a=this .getContro lEl();this .base(t,fu nction(){e (a).priceF ormat(i.op tions),n() })},getCon trolValue: function() {var n=thi s.getContr olEl(),i=e (n).is("in put")?n.va l():n.html ();if(this .options.u nmask||"no ne"!==this .options.r ound){var a=function (){var e=" ";for(var t in i){va r n=i[t];i sNaN(n)?n= ==this.opt ions.cents Separator& &(e+="."): e+=n}retur n parseFlo at(e)}.bin d(this)(); if("none"! ==this.opt ions.round &&(a=t(thi s.options. round)(a), !this.opti ons.unmask )){for(var r=[],o="" +a,l=0,s=0 ;l<i.lengt h;l++)isNa N(i[l])?r. push(i[l]) :r.push(o[ s++]||0);r eturn r.jo in("")}ret urn a}retu rn i},getT itle:funct ion(){retu rn"Currenc y Field"}, getDescrip tion:funct ion(){retu rn"Provide s an autom atically f ormatted a nd configu rable inpu t for ente ring curre ncy amount s."},getSc hemaOfPric eFormatOpt ions:funct ion(){retu rn{propert ies:{allow Negative:{ title:"All ow Negativ e",descrip tion:"Dete rmines if negative n umbers are allowed." ,type:"boo lean","def ault":!1}, centsLimit :{title:"C ents Limit ",descript ion:"The l imit of fr actional d igits.",ty pe:"number ","default ":2,minimu m:0},cents Separator: {title:"Ce nts Separa tor",descr iption:"Th e separato r between whole and fractional amounts." ,type:"tex t","defaul t":"."},cl earPrefix: {title:"Cl ear Prefix ",descript ion:"Deter mines if t he prefix is cleared on blur." ,type:"boo lean","def ault":!1}, clearSuffi x:{title:" Clear Suff ix",descri ption:"Det ermines if the suffi x is clear ed on blur .",type:"b oolean","d efault":!1 },insertPl usSign:{ti tle:"Plus Sign",desc ription:"D etermines if a plus sign shoul d be inser ted for po sitive val ues.",type :"boolean" ,"default" :!1},limit :{title:"L imit",desc ription:"A limit of the length of the fi eld.",type :"number", "default": void 0,min imum:0},pr efix:{titl e:"Prefix" ,descripti on:"The pr efix if an y for the field.",ty pe:"text", "default": "$"},round :{title:"R ound",desc ription:"D etermines if the fie ld is roun ded. (Roun ding is do ne when ge tValue is called and is not re flected in the UI)", type:"stri ng","enum" :["up","do wn","neare st","none" ],"default ":"none"}, suffix:{ti tle:"Suffi x",descrip tion:"The suffix if any for th e field.", type:"text ","default ":""},thou sandsSepar ator:{titl e:"Thousan ds Separat or",descri ption:"The separator between t housands." ,type:"str ing","defa ult":","}, unmask:{ti tle:"Unmas k",descrip tion:"If t rue then t he resulti ng value f or this fi eld will b e unmasked . That is , the resu lting valu e will be a float in stead of a string (w ith the pr efix, suff ix, etc. r emoved).", type:"bool ean","defa ult":!0}}} },getSchem aOfOptions :function( ){return n .merge(thi s.base(),t his.getSch emaOfPrice FormatOpti ons())},ge tOptionsFo rOptions:f unction(){ return n.m erge(this. base(),{fi elds:{allo wNegative: {type:"che ckbox"},ce ntsLimit:{ type:"numb er"},cents Separator: {type:"tex t"},clearP refix:{typ e:"checkbo x"},clearS uffix:{typ e:"checkbo x"},insert PlusSign:{ type:"chec kbox"},lim it:{type:" number"},p refix:{typ e:"text"}, round:{typ e:"select" },suffix:{ type:"text "},thousan dsSeparato r:{type:"s tring"},un mask:{type :"checkbox "}}})}}),n .registerF ieldClass( "currency" ,n.Fields. CurrencyFi eld)}(jQue ry),functi on(e){var t=e.alpaca ;t.Fields. DateField= t.Fields.T extField.e xtend({get FieldType: function() {return"da te"},getDe faultForma t:function (){return" MM/DD/YYYY "},getDefa ultExtraFo rmats:func tion(){ret urn[]},set up:functio n(){var e= this;if(th is.base(), e.options. picker||(e .options.p icker={}), "undefined "==typeof e.options. picker.use Current&&( e.options. picker.use Current=!1 ),e.option s.picker.f ormat&&(e. options.da teFormat=e .options.p icker.form at),e.opti ons.dateFo rmat||(e.o ptions.dat eFormat=e. getDefault Format()), e.options. picker.for mat||(e.op tions.pick er.format= e.options. dateFormat ),e.option s.picker.l ocale||(e. options.pi cker.local e="en_US") ,e.options .picker.da yViewHeade rFormat||( e.options. picker.day ViewHeader Format="MM MM YYYY"), !e.options .picker.ex traFormats ){var t=e. getDefault ExtraForma ts();t&&(e .options.p icker.extr aFormats=t )}"undefin ed"==typeo f e.option s.manualEn try&&(e.op tions.manu alEntry=!1 )},onKeyPr ess:functi on(e){retu rn this.op tions.manu alEntry?(e .preventDe fault(),vo id e.stopI mmediatePr opagation( )):void th | |
| 70 | is.base(e) },onKeyDow n:function (e){return this.opti ons.manual Entry?(e.p reventDefa ult(),void e.stopImm ediateProp agation()) :void this .base(e)}, beforeRend erControl: function(e ,t){this.f ield.css(" position", "relative" ),t()},aft erRenderCo ntrol:func tion(t,n){ var i=this ;this.base (t,functio n(){"displ ay"!==i.vi ew.type&&e .fn.dateti mepicker&& (i.getCont rolEl().da tetimepick er(i.optio ns.picker) ,i.picker= i.getContr olEl().dat a("DateTim ePicker"), i.picker&& i.options. dateFormat &&i.picker .format(i. options.da teFormat), i.picker&& (i.options .dateForma t=i.picker .format()) ,i.getFiel dEl().on(" dp.change" ,function( e){setTime out(functi on(){i.onC hange.call (i,e),i.tr iggerWithP ropagation ("change", e)},250)}) ,i.data&&i .picker.da te(i.data) ),n()})},s etManualEn try:functi on(e){this .options.m anualEntry =e},getDat e:function (){var e=t his,t=null ;try{t=e.p icker?e.pi cker.date( )?e.picker .date()._d :null:new Date(this. getValue() )}catch(n) {console.e rror(n)}re turn t},da te:functio n(){return this.getD ate()},onC hange:func tion(e){th is.base(), this.refre shValidati onState()} ,isAutoFoc usable:fun ction(){re turn!1},ha ndleValida te:functio n(){var e= this.base( ),n=this.v alidation, i=this._va lidateDate Format();r eturn n.in validDate= {message:i ?"":t.subs tituteToke ns(this.ge tMessage(" invalidDat e"),[this. options.da teFormat]) ,status:i} , | |
| 71 | e&&n.inval idDate.sta tus},_vali dateDateFo rmat:funct ion(){var e=this,n=! 0;if(e.opt ions.dateF ormat){var i=e.getVa lue();if(i ||e.isRequ ired()){va r a=[];if( a.push(e.o ptions.dat eFormat),e .options.p icker&&e.o ptions.pic ker.extraF ormats)for (var r=0;r <e.options .picker.ex traFormats .length;r+ +)a.push(e .options.p icker.extr aFormats[r ]);for(var r=0;r<a.l ength;r++) n=n||t.mom ent(i,e.op tions.date Format,!0) .isValid() }}return n },setValue :function( e){var n=t his;this.b ase(e),thi s.picker&& t.moment(e ,n.options .dateForma t,!0).isVa lid()&&thi s.picker.d ate(e)},de stroy:func tion(){thi s.base(),t his.picker =null},get Title:func tion(){ret urn"Date F ield"},get Descriptio n:function (){return" Date Field "},getSche maOfSchema :function( ){return t .merge(thi s.base(),{ properties :{format:{ title:"For mat",descr iption:"Pr operty dat a format", type:"stri ng","defau lt":"date" ,"enum":[" date"],rea donly:!0}} })},getOpt ionsForSch ema:functi on(){retur n t.merge( this.base( ),{fields: {format:{t ype:"text" }}})},getS chemaOfOpt ions:funct ion(){retu rn t.merge (this.base (),{proper ties:{date Format:{ti tle:"Date Format",de scription: "Date form at (using moment.js format)",t ype:"strin g"},picker :{title:"D atetimePic ker option s",descrip tion:"Opti ons that a re support ed by the <a href='h ttp://eona sdan.githu b.io/boots trap-datet imepicker/ '>Bootstra p DateTime Picker</a >.",type:" any"}}})}, getOptions ForOptions :function( ){return t .merge(thi s.base(),{ fields:{da teFormat:{ type:"text "},picker: {type:"any "}}})}}),t .registerM essages({i nvalidDate :"Invalid date for f ormat {0}" }),t.regis terFieldCl ass("date" ,t.Fields. DateField) ,t.registe rDefaultFo rmatFieldM apping("da te","date" )}(jQuery) ,function( e){var t=e .alpaca;t. Fields.Dat etimeField =t.Fields. DateField. extend({ge tFieldType :function( ){return"d atetime"}, getDefault Format:fun ction(){re turn"MM/DD /YYYY HH:m m:ss"},get DefaultExt raFormats: function() {return["M M/DD/YYYY hh:mm:ss a ","MM/DD/Y YYY HH:mm" ,"MM/DD/YY YY"]},setu p:function (){this.ba se()},getT itle:funct ion(){retu rn"Datetim e Field"}, getDescrip tion:funct ion(){retu rn"Datetim e Field ba sed on <a href='http ://eonasda n.github.i o/bootstra p-datetime picker/'>B ootstrap D ateTime Pi cker</a>." }}),t.regi sterFieldC lass("date time",t.Fi elds.Datet imeField), t.register DefaultFor matFieldMa pping("dat etime","da tetime"),t .registerD efaultForm atFieldMap ping("date -time","da tetime")}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.Editor Field=t.Fi elds.TextF ield.exten d({getFiel dType:func tion(){ret urn"editor "},setup:f unction(){ var e=this ;this.base (),e.optio ns.aceThem e||(e.opti ons.aceThe me="ace/th eme/chrome "),e.optio ns.aceMode ||(e.optio ns.aceMode ="ace/mode /json"),"u ndefined"= =typeof e. options.be autify&&(e .options.b eautify=!0 ),e.option s.beautify &&this.dat a&&("ace/m ode/json"= ==e.option s.aceMode& &(t.isObje ct(this.da ta)?this.d ata=JSON.s tringify(t his.data,n ull," " ):t.isStri ng(this.da ta)&&(this .data=JSON .stringify (JSON.pars e(this.dat a),null," "))),"a ce/mode/ht ml"===e.op tions.aceM ode&&"unde fined"!=ty peof html_ beautify&& (this.data =html_beau tify(this. data)),"ac e/mode/css "===e.opti ons.aceMod e&&"undefi ned"!=type of css_bea utify&&(th is.data=cs s_beautify (this.data )),"ace/mo de/javascr ipt"===e.o ptions.ace Mode&&"und efined"!=t ypeof js_b eautify&&( this.data= js_beautif y(this.dat a))),"ace/ mode/json" ===e.optio ns.aceMode &&(this.da ta&&"{}"!= =this.data ||(this.da ta="{\n \n}"))}, afterRende rControl:f unction(n, i){var a=t his;this.b ase(n,func tion(){if( a.control) {var n=a.o ptions.ace Height;n&& e(a.contro l).css("he ight",n);v ar r=a.opt ions.aceWi dth;r||(r= "100%"),e( a.control) .css("widt h",r)}var o=e(a.cont rol)[0];if (!ace&&win dow.ace&&( ace=window .ace),ace) {a.editor= ace.edit(o ),a.editor .setOption s({maxLine s:1/0}),a. editor.get Session(). setUseWrap Mode(!0);v ar l=a.opt ions.aceTh eme;a.edit or.setThem e(l);var s =a.options .aceMode;i f(a.editor .getSessio n().setMod e(s),a.edi tor.render er.setHScr ollBarAlwa ysVisible( !1),a.edit or.setShow PrintMargi n(!1),a.ed itor.setVa lue(a.data ),a.editor .clearSele ction(),a. editor.get Session(). getUndoMan ager().res et(),a.opt ions.aceFi tContentHe ight){var u=function (){var t=! 1;0===a.ed itor.rende rer.lineHe ight&&(t=! 0,a.editor .renderer. lineHeight =16);var n =a.editor. getSession ().getScre enLength() *a.editor. renderer.l ineHeight+ a.editor.r enderer.sc rollBar.ge tWidth();e (a.control ).height(n .toString( )+"px"),a. editor.res ize(),t&&w indow.setT imeout(fun ction(){a. editor.cle arSelectio n()},100)} ;u(),a.edi tor.getSes sion().on( "change",u )}a.schema .readonly& &a.editor. setReadOnl y(!0),e(o) .bind("des troyed",fu nction(){a .editor&&( a.editor.d estroy(),a .editor=nu ll)})}else t.logErro r("Editor Field is m issing the 'ace' Clo ud 9 Edito r");i()})} ,destroy:f unction(){ this.edito r&&(this.e ditor.dest roy(),this .editor=nu ll),this.b ase()},get Editor:fun ction(){re turn this. editor},ha ndleValida te:functio n(){var e= this.base( ),n=this.v alidation, i=this._va lidateWord Count();n. wordLimitE xceeded={m essage:i?" ":t.substi tuteTokens (this.getM essage("wo rdLimitExc eeded"),[t his.option s.wordlimi t]),status :i};var a= this._vali dateEditor Annotation s();return n.editorA nnotations Exist={mes sage:a?"": this.getMe ssage("edi torAnnotat ionsExist" ),status:a },e&&n.wor dLimitExce eded.statu s&&n.edito rAnnotatio nsExist.st atus},_val idateEdito rAnnotatio ns:functio n(){ | |
| 72 | if(this.ed itor){var e=this.edi tor.getSes sion().get Annotation s();if(e&& e.length>0 )return!1} return!0}, _validateW ordCount:f unction(){ if(this.op tions.word limit&&thi s.options. wordlimit> -1){var e= this.edito r.getValue ();if(e){v ar t=e.spl it(" ").le ngth;if(t> this.optio ns.wordlim it)return! 1}}return! 0},onDepen dentReveal :function( ){this.edi tor&&this. editor.res ize()},set Value:func tion(e){va r n=this;t his.editor &&("object "==n.schem a.type&&t. isObject(e )&&(e=JSON .stringify (e,null," ")),thi s.editor.s etValue(e) ,n.editor. clearSelec tion()),th is.base(e) },getContr olValue:fu nction(){v ar e=null; return thi s.editor&& (e=this.ed itor.getVa lue()),"ob ject"==thi s.schema.t ype&&(e=e? JSON.parse (e):{}),e} ,getTitle: function() {return"Ed itor"},get Descriptio n:function (){return" Editor"},g etSchemaOf Options:fu nction(){r eturn t.me rge(this.b ase(),{pro perties:{a ceTheme:{t itle:"ACE Editor The me",descri ption:"Spe cifies the theme to set onto t he editor instance", type:"stri ng","defau lt":"ace/t heme/twili ght"},aceM ode:{title :"ACE Edit or Mode",d escription :"Specifie s the mode to set on to the edi tor instan ce",type:" string","d efault":"a ce/mode/ja vascript"} ,aceWidth: {title:"AC E Editor H eight",des cription:" Specifies the width of the wra pping div around the editor",t ype:"strin g","defaul t":"100%"} ,aceHeight :{title:"A CE Editor Height",de scription: "Specifies the heigh t of the w rapping di v around t he editor" ,type:"str ing","defa ult":"300p x"},aceFit ContentHei ght:{title :"ACE Fit Content He ight",desc ription:"C onfigures the ACE Ed itor to au to-fit its height to the conte nts of the editor",t ype:"boole an","defau lt":!1},wo rdlimit:{t itle:"Word Limit",de scription: "Limits th e number o f words al lowed in t he text ar ea.",type: "number"," default":- 1}}})},get OptionsFor Options:fu nction(){r eturn t.me rge(this.b ase(),{fie lds:{aceTh eme:{type: "text"},ac eMode:{typ e:"text"}, wordlimit: {type:"int eger"}}})} }),t.regis terMessage s({wordLim itExceeded :"The maxi mum word l imit of {0 } has been exceeded. ",editorAn notationsE xist:"The editor has errors in it that m ust be cor rected"}), t.register FieldClass ("editor", t.Fields.E ditorField )}(jQuery) ,function( e){var t=e .alpaca;t. Fields.Ema ilField=t. Fields.Tex tField.ext end({getFi eldType:fu nction(){r eturn"emai l"},setup: function() {this.inpu tType="ema il",this.b ase(),this .schema.pa ttern||(th is.schema. pattern=t. regexps.em ail)},hand leValidate :function( ){var e=th is.base(), t=this.val idation;re turn t.inv alidPatter n.status|| (t.invalid Pattern.me ssage=this .getMessag e("invalid Email")),e },getTitle :function( ){return"E mail Field "},getDesc ription:fu nction(){r eturn"Emai l Field."} ,getSchema OfSchema:f unction(){ var e=this .schema&&t his.schema .pattern?t his.schema .pattern:t .regexps.e mail;retur n t.merge( this.base( ),{propert ies:{patte rn:{title: "Pattern", descriptio n:"Field P attern in Regular Ex pression", type:"stri ng","defau lt":e,"enu m":[e],rea donly:!0}, format:{ti tle:"Forma t",descrip tion:"Prop erty data format",ty pe:"string ","default ":"email", "enum":["e mail"],rea donly:!0}} })},getOpt ionsForSch ema:functi on(){retur n t.merge( this.base( ),{fields: {format:{t ype:"text" }}})}}),t. registerMe ssages({in validEmail :"Invalid Email addr ess e.g. i nfo@cloudc ms.com"}), t.register FieldClass ("email",t .Fields.Em ailField), t.register DefaultFor matFieldMa pping("ema il","email ")}(jQuery ),function (e){var t= e.alpaca;t .Fields.Gr idField=t. Fields.Arr ayField.ex tend({getF ieldType:f unction(){ return"gri d"},setup: function() {this.base (),"undefi ned"==type of this.op tions.grid &&(this.op tions.grid ={})},afte rRenderCon tainer:fun ction(t,n) {var i=thi s;this.bas e(t,functi on(){var t =[],a=[];f or(var r i n i.option s.fields){ var o=i.op tions.fiel ds[r],l=r; o.label&&( l=o.label) ,a.push(l) }t.push(a) ;for(var s =0;s<i.dat a.length;s ++){var u= [];for(var c in i.da ta[s])u.pu sh(i.data[ s][c]);t.p ush(u)}var d=e(i.con tainer).fi nd(".alpac a-containe r-grid-hol der"),p=i. options.gr id;p.data= t,e(d).han dsontable( p),n()})}, getType:fu nction(){r eturn"arra y"},getTit le:functio n(){return "Grid Fiel d"},getDes cription:f unction(){ return"Ren ders array items int o a grid"} }),t.regis terFieldCl ass("grid" ,t.Fields. GridField) }(jQuery), function(e ){var t=e. alpaca;t.F ields.Imag eField=t.F ields.Text Field.exte nd({getFie ldType:fun ction(){re turn"image "},getTitl e:function (){return" Image Fiel d"},getDes cription:f unction(){ return"Ima ge Field." }}),t.regi sterFieldC lass("imag e",t.Field s.ImageFie ld)}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.I ntegerFiel d=t.Fields .NumberFie ld.extend( {getFieldT ype:functi on(){retur n"integer" },getContr olValue:fu nction(){v ar e=this. base();ret urn"undefi ned"==type of e||""== e?e:parseI nt(e,10)}, onChange:f unction(e) {this.base (),this.sl ider&&this .slider.sl ider("valu e",this.ge tValue())} ,postRende r:function (n){var i= this;this. base(funct ion(){i.op tions.slid er&&(t.isE mpty(i.sch ema.maximu m)||t.isEm pty(i.sche ma.minimum )||i.contr ol&&(i.con trol.after ('<div id= "slider">< /div>'),i. slider=e(" #slider",i .control.p arent()).s lider({val ue:i.getVa lue(),min: i.schema.m inimum,max :i.schema. maximum,sl ide:functi on(e,t){i. setValue(t .value),i. refreshVal idationSta te()}}))), n()})},han dleValidat e:function (){var e=t his.base() ,t=this.va lidation,n =this._val idateInteg er();retur n t.string NotANumber ={message: n?"":this. getMessage | |
| 73 | ("stringNo tAnInteger "),status: n},e},_val idateInteg er:functio n(){var e= this._getC ontrolVal( );if("numb er"==typeo f e&&(e="" +e),t.isVa lEmpty(e)) return!0;v ar n=t.tes tRegex(t.r egexps.int eger,e);if (!n)return !1;var i=t his.getVal ue();retur n!isNaN(i) },getType: function() {return"in teger"},ge tTitle:fun ction(){re turn"Integ er Field"} ,getDescri ption:func tion(){ret urn"Field for intege rs."},getS chemaOfSch ema:functi on(){retur n t.merge( this.base( ),{propert ies:{minim um:{title: "Minimum", descriptio n:"Minimum value of the proper ty.",type: "integer"} ,maximum:{ title:"Max imum",desc ription:"M aximum val ue of the property." ,type:"int eger"},div isibleBy:{ title:"Div isible By" ,descripti on:"Proper ty value m ust be div isible by this numbe r.",type:" integer"}} })},getOpt ionsForSch ema:functi on(){retur n t.merge( this.base( ),{fields: {minimum:{ helper:"Mi nimum valu e of the f ield.",typ e:"integer "},maximum :{helper:" Maximum va lue of the field.",t ype:"integ er"},divis ibleBy:{he lper:"Prop erty value must be d ivisible b y this num ber.",type :"integer" }}})},getS chemaOfOpt ions:funct ion(){retu rn t.merge (this.base (),{proper ties:{slid er:{title: "Slider",d escription :"Generate jQuery UI slider co ntrol with the field if true." ,type:"boo lean","def ault":!1}} })},getOpt ionsForOpt ions:funct ion(){retu rn t.merge (this.base (),{fields :{slider:{ rightLabel :"Slider c ontrol ?", helper:"Ge nerate sli der contro l if selec ted.",type :"checkbox "}}})}}),t .registerM essages({s tringNotAn Integer:"T his value is not an integer."} ),t.regist erFieldCla ss("intege r",t.Field s.IntegerF ield),t.re gisterDefa ultSchemaF ieldMappin g("integer ","integer ")}(jQuery ),function (e){var t= e.alpaca;t .Fields.IP v4Field=t. Fields.Tex tField.ext end({getFi eldType:fu nction(){r eturn"ipv4 "},setup:f unction(){ this.base( ),this.sch ema.patter n||(this.s chema.patt ern=t.rege xps.ipv4)} ,handleVal idate:func tion(){var e=this.ba se(),t=thi s.validati on;return t.invalidP attern.sta tus||(t.in validPatte rn.message =this.getM essage("in validIPv4" )),e},getT itle:funct ion(){retu rn"IP Addr ess Field" },getDescr iption:fun ction(){re turn"IP Ad dress Fiel d."},getSc hemaOfSche ma:functio n(){var e= this.schem a&&this.sc hema.patte rn?this.sc hema.patte rn:t.regex ps.ipv4;re turn t.mer ge(this.ba se(),{prop erties:{pa ttern:{tit le:"Patter n",descrip tion:"Fiel d Pattern in Regular Expressio n",type:"s tring","de fault":e,r eadonly:!0 },format:{ title:"For mat",descr iption:"Pr operty dat a format", type:"stri ng","enum" :["ip-addr ess"],"def ault":"ip- address",r eadonly:!0 }}})},getO ptionsForS chema:func tion(){ret urn t.merg e(this.bas e(),{field s:{format: {type:"tex t"}}})}}), t.register Messages({ invalidIPv 4:"Invalid IPv4 addr ess, e.g. 192.168.0. 1"}),t.reg isterField Class("ipv 4",t.Field s.IPv4Fiel d),t.regis terDefault FormatFiel dMapping(" ip-address ","ipv4")} (jQuery),f unction(e) {function t(e){if("s tring"==ty peof e.dat a){var t=e .handler,n =e.data.to LowerCase( ).split(" ");e.handl er=functio n(e){if(th is===e.tar get||!/tex tarea|sele ct/i.test( e.target.n odeName)&& "text"!==e .target.ty pe){var i= "keypress" !==e.type& &jQuery.ho tkeys.spec ialKeys[e. which],a=S tring.from CharCode(e .which).to LowerCase( ),r="",o={ };e.altKey &&"alt"!== i&&(r+="al t+"),e.ctr lKey&&"ctr l"!==i&&(r +="ctrl+") ,e.metaKey &&!e.ctrlK ey&&"meta" !==i&&(r+= "meta+"),e .shiftKey& &"shift"!= =i&&(r+="s hift+"),i? o[r+i]=!0: (o[r+a]=!0 ,o[r+jQuer y.hotkeys. shiftNums[ a]]=!0,"sh ift+"===r& &(o[jQuery .hotkeys.s hiftNums[a ]]=!0));fo r(var l=0, s=n.length ;s>l;l++)i f(o[n[l]]) return t.a pply(this, arguments) }}}}var n= e.alpaca;n .Fields.JS ONField=n. Fields.Tex tAreaField .extend({g etFieldTyp e:function (){return" json"},set Value:func tion(e){(n .isObject( e)||"objec t"==typeof e)&&(e=JS ON.stringi fy(e,null, 3)),this.b ase(e)},ge tControlVa lue:functi on(){var e =this.base ();return e&&n.isStr ing(e)&&(e =JSON.pars e(e)),e},h andleValid ate:functi on(){var e =this.base (),t=this. validation ,n=this._v alidateJSO N();return t.stringN otAJSON={m essage:n.s tatus?"":t his.getMes sage("stri ngNotAJSON ")+" "+n.m essage,sta tus:n.stat us},e&&t.s tringNotAJ SON.status },_validat eJSON:func tion(){var e=this.co ntrol.val( );if(n.isV alEmpty(e) )return{st atus:!0};t ry{var t=J SON.parse( e);return this.setVa lue(JSON.s tringify(t ,null,3)), {status:!0 }}catch(i) {return{st atus:!1,me ssage:i.me ssage}}},a fterRender Control:fu nction(e,t ){var n=th is;this.ba se(e,funct ion(){n.co ntrol&&(n. control.bi nd("keypre ss",functi on(e){var t=e.keyCod e||e.wich; 34===t&&n. control.in sertAtCare t('"'),123 ===t&&n.co ntrol.inse rtAtCaret( "}"),91=== t&&n.contr ol.insertA tCaret("]" )}),n.cont rol.bind(" keypress", "Ctrl+l",f unction(){ n.getField El().remov eClass("al paca-field -focused") ,n.refresh Validation State()}), n.control. attr("titl e","Type C trl+L to f ormat and validate t he JSON st ring.")),t ()})},getT itle:funct ion(){retu rn"JSON Ed itor"},get Descriptio n:function (){return" Editor for JSON obje cts with b asic valid ation and formatting ."}}),n.re gisterMess ages({stri ngNotAJSON :"This val ue is not a valid JS ON string. "}),n.regi sterFieldC lass("json ",n.Fields .JSONField ),e.fn.ins ertAtCaret =function( e){return this.each( function() {if(docume nt.selecti on)this.fo cus(),sel= document.s election.c reateRange (),sel.tex t=e,this.f ocus();els e if(this. selectionS tart||"0"= =this.sele ctionStart ){var t=th is.selecti onStart,n= this.selec tionEnd,i= this.scrol | |
| 74 | lTop;this. value=this .value.sub string(0,t )+e+this.v alue.subst ring(n,thi s.value.le ngth),this .focus(),t his.select ionStart=t ,this.sele ctionEnd=t ,this.scro llTop=i}el se this.va lue+=e,thi s.focus()} )},jQuery. hotkeys={v ersion:"0. 8",special Keys:{8:"b ackspace", 9:"tab",13 :"return", 16:"shift" ,17:"ctrl" ,18:"alt", 19:"pause" ,20:"capsl ock",27:"e sc",32:"sp ace",33:"p ageup",34: "pagedown" ,35:"end", 36:"home", 37:"left", 38:"up",39 :"right",4 0:"down",4 5:"insert" ,46:"del", 96:"0",97: "1",98:"2" ,99:"3",10 0:"4",101: "5",102:"6 ",103:"7", 104:"8",10 5:"9",106: "*",107:"+ ",109:"-", 110:".",11 1:"/",112: "f1",113:" f2",114:"f 3",115:"f4 ",116:"f5" ,117:"f6", 118:"f7",1 19:"f8",12 0:"f9",121 :"f10",122 :"f11",123 :"f12",144 :"numlock" ,145:"scro ll",191:"/ ",224:"met a"},shiftN ums:{"`":" ~",1:"!",2 :"@",3:"#" ,4:"$",5:" %",6:"^",7 :"&",8:"*" ,9:"(",0:" )","-":"_" ,"=":"+"," ;":": ","' ":'"',",": "<",".":"> ","/":"?", "\\":"|"}} ,jQuery.ea ch(["keydo wn","keyup ","keypres s"],functi on(){jQuer y.event.sp ecial[this ]={add:t}} )}(jQuery) ,function( e){var t=e .alpaca;t. Fields.Low erCaseFiel d=t.Fields .TextField .extend({g etFieldTyp e:function (){return" lowercase" },setup:fu nction(){t his.base() ,this.data &&(this.da ta=this.da ta.toLower Case())},s etValue:fu nction(e){ if(!e)retu rn this.ba se(e);var t=e.toLowe rCase();t! =this.getV alue()&&th is.base(t) },onKeyPre ss:functio n(e){this. base(e);va r n=this;t .later(25, this,funct ion(){var e=n.getVal ue();n.set Value(e)}) },getTitle :function( ){return"L owercase T ext"},getD escription :function( ){return"T ext field for lowerc ase text." }}),t.regi sterFieldC lass("lowe rcase",t.F ields.Lowe rCaseField ),t.regist erDefaultF ormatField Mapping("l owercase", "lowercase ")}(jQuery ),function (e){var t= e.alpaca;t .Fields.Ma pField=t.F ields.Arra yField.ext end({getFi eldType:fu nction(){r eturn"map" },getType: function() {return"ob ject"},set up:functio n(){if(thi s.data&&t. isObject(t his.data)) {var n=[]; e.each(thi s.data,fun ction(e,i) {var a=t.c opyOf(i);a ._key=e,n. push(a)}), this.data= n}this.bas e(),t.merg eObject(th is.options ,{forceRev alidation: !0}),t.isE mpty(this. data)},get ContainerV alue:funct ion(){if(0 !==this.ch ildren.len gth||this. isRequired ()){for(va r e={},t=0 ;t<this.ch ildren.len gth;t++){v ar n=this. children[t ].getValue (),i=n._ke y;i&&(dele te n._key, e[i]=n)}re turn e}},h andleValid ate:functi on(){var e =this.base (),t=this. validation ,n=this._v alidateMap KeysNotEmp ty();t.key Missing={m essage:n?" ":this.get Message("k eyMissing" ),status:n };var i=th is._valida teMapKeysU nique();re turn t.key NotUnique= {message:i ?"":this.g etMessage( "keyNotUni que"),stat us:i},e&&t .keyMissin g.status&& t.keyNotUn ique.statu s},_valida teMapKeysN otEmpty:fu nction(){f or(var e=! 0,t=0;t<th is.childre n.length;t ++){var n= this.child ren[t].get Value(),i= n._key;if( !i){e=!1;b reak}}retu rn e},_val idateMapKe ysUnique:f unction(){ for(var e= !0,t={},n= 0;n<this.c hildren.le ngth;n++){ var i=this .children[ n].getValu e(),a=i._k ey;t[a]&&( e=!1),t[a] =a}return e},getTitl e:function (){return" Map Field" },getDescr iption:fun ction(){re turn"Field for objec ts with ke y/value pa irs that s hare the s ame schema for value s."}}),t.r egisterFie ldClass("m ap",t.Fiel ds.MapFiel d),t.regis terMessage s({keyNotU nique:"Key s of map f ield are n ot unique. ",keyMissi ng:"Map co ntains an empty key. "})}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.O ptionTreeF ield=t.Fie lds.TextFi eld.extend ({getField Type:funct ion(){retu rn"optiont ree"},setu p:function (){var e=t his;this.b ase(),this .options.t ree||(this .options.t ree={}),th is.options .tree.sele ctors||(th is.options .tree.sele ctors={}), this.optio ns.tree.or der||(this .options.t ree.order= []);for(va r n in thi s.options. tree.selec tors){if(! this.optio ns.tree.se lectors[n] .schema)re turn void t.logError ("OptionTr ee selecto r for: "+n +" is miss ing schema ");this.op tions.tree .selectors [n].option s||(this.o ptions.tre e.selector s[n].optio ns={})}thi s.options. tree.data| |(this.opt ions.tree. data=[]);f or(var i=0 ;i<this.op tions.tree .data.leng th;i++){va r a=this.o ptions.tre e.data[i]; if(a.attri butes)for( var n in a .attribute s)this.opt ions.tree. selectors[ n]||(this. options.tr ee.selecto rs[n]={}), this.optio ns.tree.se lectors[n] .label||(t his.option s.tree.sel ectors[n]. options.no neLabel="C hoose...") ,this.opti ons.tree.s electors[n ].type||(t his.option s.tree.sel ectors[n]. options.ty pe="select ")}if(!e.o ptions.tre e.order){e .options.t ree.order= [];for(var n in e.op tions.tree .selectors )e.options .tree.orde r.push(e.o ptions.tre e.selector s[n])}"und efined"==t ypeof e.op tions.tree .horizonta l&&(e.opti ons.tree.h orizontal= !0),this.l ocationVal ueLists={} ,this.loca tionValues ={};for(va r i=0;i<e. options.tr ee.data.le ngth;i++)i f(e.option s.tree.dat a[i].attri butes){var r="root"; for(var n in e.optio ns.tree.da ta[i].attr ibutes){va r o=e.opti ons.tree.d ata[i].att ributes[n] ,l=this.lo cationValu eLists[r]; l||(l=[],t his.locati onValueLis ts[r]=l);f or(var s=! 1,u=0;u<l. length;u++ )if(l[u].v alue===o){ s=!0;break }s||l.push ({text:o,v alue:o}),r .length>0& &(r+="~"), r+=n+"="+o }this.loca tionValues [r]=e.opti ons.tree.d ata[i].val ue}this.cu rrentAttri butes={},t his.contro ls={}},toL ocation:fu nction(e){ var t="roo t";for(var n in e){v ar i=e[n]; t.length>0 &&(t+="~") ,t+=n+"="+ i}return t },existsLo cationWith Prefix:fun ction(e){v ar t=!1;fo r(var n in this.loca tionValueL ists)if(n. indexOf(e) >-1){t=!0; break}retu | |
| 75 | rn t},afte rRenderCon trol:funct ion(t,n){v ar i=this; i.optionTr eeHolder=e (i.field). find(".opt iontree"), i.options. tree.horiz ontal&&e(i .field).ad dClass("op tiontree-h orizontal" ),this.bas e(t,functi on(){i.ref reshOption TreeContro ls(functio n(){n()})} )},refresh OptionTree Controls:f unction(n) {var i=thi s;for(var a in i.con trols)i.co ntrols[a]. hide();for (var r=0,o =0;o<i.opt ions.tree. order.leng th;o++){va r l=i.opti ons.tree.o rder[o];"u ndefined"! =typeof i. currentAtt ributes[l] &&null!==i .currentAt tributes[l ]&&""!==i. currentAtt ributes[l] &&r++}var s="root",u =[],c=0,o= 0;do{if(o< i.options. tree.order .length){v ar l=i.opt ions.tree. order[o],d =o==i.opti ons.tree.o rder.lengt h-1||i.exi stsLocatio nWithPrefi x(s+"~"+l+ "=");if(d) if(r>=c){i f(i.contro ls[l])i.co ntrols[l]. show(),s+= "~"+l+"="+ i.currentA ttributes[ l];else{va r p=i.opti ons.tree.s electors[l ],h=o+1=== i.options. tree.order .length,f= function(t ,n,a,r,o,l ){return f unction(s) {var u=a.s chema,c=a. options;c| |(c={}),c. type||(c.t ype="selec t"),"selec t"===c.typ e&&(c.data Source=fun ction(e){v ar t=i.toL ocation(i. currentAtt ributes),n =i.locatio nValueList s[t];e(n)} );var d=e( "<div clas s='optiont ree-select or'></div> ");e(d).al paca({sche ma:u,optio ns:c,postR ender:func tion(a){r[ n]=a,e(o). append(d), a.selector Id=n,a.on( "change",f unction(){ var e=this .selectorI d;i.curren tAttribute s[e]=this. getValue() ;for(var n =0;n<i.opt ions.tree. order.leng th;n++)if( n>t){var e =i.options .tree.orde r[n];delet e i.curren tAttribute s[e],r[e]& &(r[e].des troy(),del ete r[e])} if(l){for( var a=null ,n=0;n<i.o ptions.tre e.data.len gth;n++){v ar o=!0,s= i.options. tree.data[ n].attribu tes;for(va r u in i.c urrentAttr ibutes)if( s[u]!==i.c urrentAttr ibutes[u]) {o=!1;brea k}o&&(a=i. options.tr ee.data[n] .value)}a& &i.setValu e(a)}i.ref reshOption TreeContro ls()}),a.s how(),s()} })}}(o,l,p ,i.control s,i.option TreeHolder ,h);u.push (f),s+="~" +l+"="+i.c urrentAttr ibutes[l]} c++}else i .controls[ l]&&(i.con trols[l].d estroy(),d elete i.co ntrols[l]) ;else i.co ntrols[l]& &(i.contro ls[l].dest roy(),dele te i.contr ols[l])}o+ +}while(o< i.options. tree.order .length);t .series(u, function() {n&&n()})} ,getType:f unction(){ return"any "},getTitl e:function (){return" Option Tre e"},getDes cription:f unction(){ return"Opt ion Tree"} ,getSchema OfOptions: function() {return t. merge(this .base(),{p roperties: {tree:{typ e:"object" ,propertie s:{options :{type:"ob ject"},ord er:{type:" array",ite ms:{type:" string"}}, data:{type :"array",i tems:{type :"object", properties :{value:{t ype:"any"} ,attribute s:{type:"o bject"}}}} ,horizonta l:{type:"b oolean"}}} }})},getOp tionsForOp tions:func tion(){ret urn t.merg e(this.bas e(),{field s:{}})}}), t.register FieldClass ("optiontr ee",t.Fiel ds.OptionT reeField)} (jQuery),f unction(e) {var t=e.a lpaca;t.Fi elds.Passw ordField=t .Fields.Te xtField.ex tend({getF ieldType:f unction(){ return"pas sword"},se tup:functi on(){this. base(),thi s.schema.p attern||(t his.schema .pattern=t .regexps.p assword)}, handleVali date:funct ion(){var e=this.bas e(),t=this .validatio n;return t .invalidPa ttern.stat us||(t.inv alidPatter n.message= this.getMe ssage("inv alidPasswo rd")),e},g etTitle:fu nction(){r eturn"Pass word Field "},getDesc ription:fu nction(){r eturn"Pass word Field ."},getSch emaOfSchem a:function (){var e=t his.schema &&this.sch ema.patter n?this.sch ema.patter n:/^[0-9a- zA-Z\x20-\ x7E]*$/;re turn t.mer ge(this.ba se(),{prop erties:{pa ttern:{tit le:"Patter n",descrip tion:"Fiel d Pattern in Regular Expressio n",type:"s tring","de fault":thi s.schema.p attern,"en um":[e],re adonly:!0} ,format:{t itle:"Form at",descri ption:"Pro perty data format",t ype:"strin g","defaul t":"passwo rd","enum" :["passwor d"],readon ly:!0}}})} ,getOption sForSchema :function( ){return t .merge(thi s.base(),{ fields:{fo rmat:{type :"text"}}} )}}),t.reg isterMessa ges({inval idPassword :"Invalid Password"} ),t.regist erFieldCla ss("passwo rd",t.Fiel ds.Passwor dField),t. registerDe faultForma tFieldMapp ing("passw ord","pass word")}(jQ uery),func tion(e){va r t=e.alpa ca;t.Field s.Personal NameField= t.Fields.T extField.e xtend({get FieldType: function() {return"pe rsonalname "},setValu e:function (e){if(!e) return thi s.base(e); for(var t= "",n=0;n<e .length;n+ +)t+=0===n ?e.charAt( n).toUpper Case():" " ===e.charA t(n-1)||"- "===e.char At(n-1)||" '"===e.cha rAt(n-1)?e .charAt(n) .toUpperCa se():e.cha rAt(n);t!= this.getVa lue()&&thi s.base(t)} ,onKeyPres s:function (e){this.b ase(e);var n=this;t. later(25,t his,functi on(){var e =n.getValu e();n.setV alue(e)})} ,getTitle: function() {return"Pe rsonal Nam e"},getDes cription:f unction(){ return"Tex t Field fo r personal name with captical letter for first let ter & afte r hyphen, space or a postrophe. "}}),t.reg isterField Class("per sonalname" ,t.Fields. PersonalNa meField)}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.PhoneF ield=t.Fie lds.TextFi eld.extend ({setup:fu nction(){t his.inputT ype="tel", this.base( ),this.sch ema.patter n||(this.s chema.patt ern=t.rege xps.phone) ,t.isEmpty (this.opti ons.maskSt ring)&&(th is.options .maskStrin g="(999) 9 99-9999")} ,postRende r:function (e){this.b ase(functi on(){e()}) },handleVa lidate:fun ction(){va r e=this.b ase(),t=th is.validat ion;return t.invalid Pattern.st atus||(t.i nvalidPatt ern.messag e=this.get Message("i nvalidPhon e")),e},ge tFieldType :function( ){return"p hone"},get Title:func tion(){ret urn"Phone Field"},ge tDescripti on:functio n(){return "Phone Fie ld."},getS | |
| 76 | chemaOfSch ema:functi on(){var e =this.sche ma&&this.s chema.patt ern?this.s chema.patt ern:t.rege xps.phone; return t.m erge(this. base(),{pr operties:{ pattern:{t itle:"Patt ern",descr iption:"Fi eld Patter n in Regul ar Express ion",type: "string"," default":e ,"enum":[e ],readonly :!0},forma t:{title:" Format",de scription: "Property data forma t",type:"s tring","de fault":"ph one","enum ":["phone" ],readonly :!0}}})},g etOptionsF orSchema:f unction(){ return t.m erge(this. base(),{fi elds:{form at:{type:" text"}}})} ,getSchema OfOptions: function() {return t. merge(this .base(),{p roperties: {maskStrin g:{title:" Field Mask String",d escription :"Expressi on for fie ld mask",t ype:"strin g","defaul t":"(999) 999-9999"} }})}}),t.r egisterMes sages({inv alidPhone: "Invalid P hone Numbe r, e.g. (1 23) 456-99 99"}),t.re gisterFiel dClass("ph one",t.Fie lds.PhoneF ield),t.re gisterDefa ultFormatF ieldMappin g("phone", "phone")}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.PickAC olorField= t.Fields.T extField.e xtend({set up:functio n(){var t= this;this. pickAColor FieldAvail able=!1,t. isDisplayO nly()||"un defined"== typeof e.f n.pickACol or||(this. pickAColor FieldAvail able=!0)," undefined" !=typeof t his.option s.pickacol or||t.pick AColorFiel dAvailable ||(this.in putType="c olor"),thi s.base()," undefined" ==typeof t his.option s.pickacol or&&(this. options.pi ckacolor={ showSpectr um:!0,show SavedColor s:!0,saveC olorsPerEl ement:!1,f adeMenuTog gle:!0,sho wAdvanced: !0,showBas icColors:! 0,showHexI nput:!0,al lowBlank:! 0,inlineDr opdown:!1} ),"undefin ed"==typeo f this.opt ions.color s&&(this.o ptions.col ors={white :"#ffffff" ,clouds:"# ecf0f1",re d:"#c0392b ",orange:" #e67e22",y ellow:"#f1 c40f",gree n:"#27ae60 ",blue:"#2 980b9",pur ple:"#8e44 ad",dark:" #34495e",b lack:"#000 000",brown :"#bb9977" }),this.op tions.pick acolor&&"u ndefined"= =typeof th is.options .pickacolo r.basicCol ors&&(this .options.p ickacolor. basicColor s=this.opt ions.color s),"undefi ned"==type of this.op tions.pick acolor.inl ineDropdow n&&(this.o ptions.pic kacolor.in lineDropdo wn=!1)},ge tFieldType :function( ){return"p ickacolor" },getType: function() {return"st ring"},aft erRenderCo ntrol:func tion(t,n){ var i=this ;this.base (t,functio n(){i.cont rol&&i.pic kAColorFie ldAvailabl e&&i.optio ns.pickaco lor&&(i.da ta&&e(i.co ntrol).att r("value", i.data),e( i.control) .addClass( "pick-a-co lor"),e(i. control).p ickAColor( i.options. pickacolor ),e(i.cont rol).on("c hange",fun ction(t){i .setValue( e(this).va l())})),n( )})},getTi tle:functi on(){retur n"Pick-A-C olor Field "},getDesc ription:fu nction(){r eturn"A co lor picker for selec ting hexad ecimal col or values" }}),t.regi sterFieldC lass("pick acolor",t. Fields.Pic kAColorFie ld)}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.S earchField =t.Fields. TextField. extend({se tup:functi on(){this. inputType= "search",t his.base() ,this.opti ons.attrib utes.resul ts=5},getF ieldType:f unction(){ return"sea rch"},getT ype:functi on(){retur n"string"} ,getTitle: function() {return"Se arch Field "},getDesc ription:fu nction(){r eturn"A se arch box f ield"}}),t .registerF ieldClass( "search",t .Fields.Se archField) ,t.registe rDefaultSc hemaFieldM apping("se arch","sea rch")}(jQu ery),funct ion(e){var t=e.alpac a;t.usHold ings={},t. usHoldings .territori es={"Ameri can Samoa" :"AS","Dis trict Of C olumbia":" DC","Feder ated State s Of Micro nesia":"FM ",Guam:"GU ","Marshal l Islands" :"MH","Nor thern Mari ana Island s":"MP",Pa lau:"PW"," Puerto Ric o":"PR","V irgin Isla nds":"VI"} ,t.usHoldi ngs.states ={Alabama: "AL",Alask a:"AK",Ari zona:"AZ", Arkansas:" AR",Califo rnia:"CA", Colorado:" CO",Connec ticut:"CT" ,Delaware: "DE",Flori da:"FL",Ge orgia:"GA" ,Hawaii:"H I",Idaho:" ID",Illino is:"IL",In diana:"IN" ,Iowa:"IA" ,Kansas:"K S",Kentuck y:"KY",Lou isiana:"LA ",Maine:"M E",Marylan d:"MD",Mas sachusetts :"MA",Mich igan:"MI", Minnesota: "MN",Missi ssippi:"MS ",Missouri :"MO",Mont ana:"MT",N ebraska:"N E",Nevada: "NV","New Hampshire" :"NH","New Jersey":" NJ","New M exico":"NM ","New Yor k":"NY","N orth Carol ina":"NC", "North Dak ota":"ND", Ohio:"OH", Oklahoma:" OK",Oregon :"OR",Penn sylvania:" PA","Rhode Island":" RI","South Carolina" :"SC","Sou th Dakota" :"SD",Tenn essee:"TN" ,Texas:"TX ",Utah:"UT ",Vermont: "VT",Virgi nia:"VA",W ashington: "WA","West Virginia" :"WV",Wisc onsin:"WI" ,Wyoming:" WY"},t.Fie lds.StateF ield=t.Fie lds.Select Field.exte nd({getFie ldType:fun ction(){re turn"state "},setup:f unction(){ t.isUndefi ned(this.o ptions.cap italize)&& (this.opti ons.capita lize=!1),t .isUndefin ed(this.op tions.incl udeStates) &&(this.op tions.incl udeStates= !0),t.isUn defined(th is.options .includeTe rritories) &&(this.op tions.incl udeTerrito ries=!0),t .isUndefin ed(this.op tions.form at)&&(this .options.f ormat="nam e"),"name" ===this.op tions.form at||"code" ===this.op tions.form at||(t.log Error("The configure d state fo rmat: "+th is.options .format+" is not a l egal value [name, co de]"),this .options.f ormat="nam e");var e= t.retrieve USHoldings (this.opti ons.includ eStates,th is.options .includeTe rritories, "code"===t his.option s.format,t his.option s.capitali ze);this.s chema["enu m"]=e.keys ,this.opti ons.option Labels=e.v alues,this .base()},g etTitle:fu nction(){r eturn"Stat e Field"}, getDescrip tion:funct ion(){retu rn"Provide s a dropdo wn selecto r of state s and/or t erritories in the Un ited State s, keyed b y their tw o-characte r code."}, getSchemaO fOptions:f unction(){ return t.m erge(this. base(),{pr operties:{ format:{ti tle:"Forma | |
| 77 | t",descrip tion:"How to represe nt the sta te values in the sel ector",typ e:"string" ,"default" :"name","e num":["nam e","code"] ,readonly: !0},capita lize:{titl e:"Capital ize",descr iption:"Wh ether the values sho uld be cap italized", type:"bool ean","defa ult":!1,re adonly:!0} ,includeSt ates:{titl e:"Include States",d escription :"Whether to include the state s of the U nited Stat es",type:" boolean"," default":! 0,readonly :!0},inclu deTerritor ies:{title :"Include Territorie s",descrip tion:"Whet her to inc lude the t erritories of the Un ited State s",type:"b oolean","d efault":!0 ,readonly: !0}}})},ge tOptionsFo rOptions:f unction(){ return t.m erge(this. base(),{fi elds:{form at:{type:" text"},cap italize:{t ype:"check box"},incl udeStates: {type:"che ckbox"},in cludeTerri tories:{ty pe:"checkb ox"}}})}}) ,t.registe rFieldClas s("state", t.Fields.S tateField) ,t.registe rDefaultFo rmatFieldM apping("st ate","stat e"),t.retr ieveUSHold ings=funct ion(){retu rn functio n(n,i,a,r) {var o={ke ys:[],valu es:[]},l=e .extend({} ,n?t.usHol dings.stat es:{},i?t. usHoldings .territori es:{}),s=O bject.keys (l);s.sort ();for(var u in s){v ar c=s[u], d=l[c],p=a ?d:c;r&&(p =p.toUpper Case()),o. keys.push( d),o.value s.push(p)} return o}} ()}(jQuery ),function (e){var t= e.alpaca;t .Fields.Su mmernoteFi eld=t.Fiel ds.TextAre aField.ext end({getFi eldType:fu nction(){r eturn"summ ernote"; | |
| 78 | },setup:fu nction(){t his.data|| (this.data =""),this. base(),"un defined"== typeof thi s.options. summernote &&(this.op tions.summ ernote={he ight:null, minHeight: null,maxHe ight:null, focus:!0}) },afterRen derControl :function( t,n){var i =this;this .base(t,fu nction(){! i.isDispla yOnly()&&i .control&& e.fn.summe rnote&&i.o n("ready", function() {e(i.contr ol).summer note(i.opt ions.summe rnote)}),e (i.control ).bind("de stroyed",f unction(){ e(i.contro l).summern ote("destr oy")}),n() })},getTit le:functio n(){return "Summernot e Editor"} ,getDescri ption:func tion(){ret urn"Provid es an inst ance of a Summernote Editor co ntrol for use in edi ting HTML. "},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie s:{summern ote:{title :"Summerno te Editor options",d escription :"Use this entry to provide co nfiguratio n options to the und erlying Su mmernote p lugin.",ty pe:"any"}} })},getOpt ionsForOpt ions:funct ion(){retu rn t.merge (this.base (),{fields :{summerno te:{type:" any"}}})}} ),t.regist erFieldCla ss("summer note",t.Fi elds.Summe rnoteField )}(jQuery) ,function( e){var t=e .alpaca;t. Fields.Tab leField=t. Fields.Arr ayField.ex tend({setu p:function (){var n=t his;n.opti ons||(n.op tions={}), "undefined "==typeof n.options. animate&&( n.options. animate=!1 ),"undefin ed"==typeo f this.opt ions.toolb arSticky&& (this.opti ons.toolba rSticky=!0 ),this.bas e(),this.o ptions.ite ms.type||( this.optio ns.items.t ype="table row"),this .options.d atatable&& (this.opti ons.datata bles=this. options.da tatable)," undefined" ==typeof t his.option s.datatabl es&&(this. options.da tatables={ paging:!1, lengthChan ge:!1,info :!1,search ing:!1,ord ering:!0}, "undefined "==typeof this.optio ns.dragRow s&&(this.o ptions.dra gRows=!1), this.optio ns.readonl y&&(this.o ptions.dra gRows=!1), this.isDis playOnly() &&(this.op tions.drag Rows=!1)), "undefined "==typeof this.optio ns.showAct ionsColumn &&(this.op tions.show ActionsCol umn=!0,thi s.options. readonly&& (this.opti ons.showAc tionsColum n=!1),this .isDisplay Only()&&(t his.option s.showActi onsColumn= !1)),this. options.da tatables.c olumns=[], e.fn.dataT ableExt&&! e.fn.DataT able.ext.t ype.search .alpaca&&( e.fn.DataT able.ext.o rder.alpac a=function (e,t){n.da ta=n.getVa lue();var i=null,a=0 ;for(var r in n.sche ma.items.p roperties) {if(a===t) {i=r;break }a++}var o =[];if(n.d ata)for(va r l=0;l<n. data.lengt h;l++)o.pu sh(n.data[ l][i]);ret urn o.sort (),o},e.fn .dataTable Ext.afnFil tering.pus h(function (n,i,a,r,o ){var l=e( n.nTableWr apper).fin d(".dataTa bles_filte r input[ty pe='search ']").val() ;if(!l)ret urn!0;l="" +l,l=e.tri m(l),l=l.t oLowerCase ();for(var s=!1,u=0; u<r.length ;u++){var c=r[u];if( c){var d=c .indexOf(" data-alpac a-field-id =");if(d>- 1){var p=e (c).attr(" data-alpac a-field-id "),h=t.fie ldInstance s[p].getVa lue();if(h &&(h=""+h, h=h.toLowe rCase(),h. indexOf(l) >-1)){s=!0 ;break}}}} return s}) )},getFiel dType:func tion(){ret urn"table" },prepareC ontainerMo del:functi on(e){var t=this;t.b ase(functi on(n){if(n .headers=[ ],t.schema .items&&t. schema.ite ms.propert ies)for(va r i in t.s chema.item s.properti es){var a= {};a.id=i, a.title=t. schema.ite ms.propert ies[i].tit le,a.hidde n=!1,t.opt ions.items &&t.option s.items.fi elds&&t.op tions.item s.fields[i ]&&(t.opti ons.items. fields[i]. label&&(a. title=t.op tions.item s.fields[i ].label)," hidden"=== t.options. items.fiel ds[i].type &&(a.hidde n=!0)),n.h eaders.pus h(a)}e(n)} )},afterRe nderContai ner:functi on(t,n){va r i=this;t his.base(t ,function( ){i.cleanu pDomInject ions();var t=e(this. container) .find("tab le");if(i. applyStyle ("table",t ),i.option s.datatabl es&&e.fn.D ataTable){ i.options. dragRows&& (i.options .datatable s.columns. push({orde rable:!1,n ame:"dragR owsIndex", hidden:!0} ),i.option s.datatabl es.columns .push({ord erable:!1, name:"drag RowsDragga ble"}));fo r(var a in i.schema. items.prop erties){va r r={order able:!0,or derDataTyp e:"alpaca" };i.option s.datatabl es.columns .push(r)}i .options.s howActions Column&&i. options.da tatables.c olumns.pus h({orderab le:!1,name :"actions" }),i.optio ns.dragRow s&&(i.opti ons.datata bles.rowRe order={sel ector:"tr td.alpaca- table-reor der-dragga ble-cell", dataSrc:0, snapX:!0,u pdate:!0}) ,i.off("re ady"),i.on ("ready",f unction(){ i._dt&&(i. _dt.destro y(),i._dt= void 0);va r t=e(i.co ntainer).f ind("table ");i._dt=e (t).DataTa ble(i.opti ons.datata bles),i._d t.on("row- reorder",f unction(e, t,n){i._dt ._disableA lpacaHandl ers||t.len gth>0&&t[0 ].oldPosit ion!==t[0] .newPositi on&&(i._dt ._disableA lpacaHandl ers=!0,i.m oveItem(t[ 0].oldPosi tion,t[0]. newPositio n,!1,funct ion(){}))} ),e(i.cont ainer).bin d("destroy ed",functi on(){i._dt &&(i._dt.d estroy(),i ._dt=void 0)}),i._dt .on("order ",function (e,t,n,a){ if(!i._dt. _disableAl pacaHandle rs){if(!i. _dt._origi nalChildre n){i._dt._ originalCh ildren=[]; for(var r= 0;r<i.chil dren.lengt h;r++)i._d t._origina lChildren. push(i.chi ldren[r])} for(var o= [],l=0;l<t .aiDisplay .length;l+ +){var s=t .aiDisplay [l];o.push (i._dt._or iginalChil dren[s])}i .children= o,i._dt._d isableAlpa caHandlers =!1}})})}e (t).find(" thead > tr > th[data -header-id ]").each(f unction(){ var t=e(th is).attr(" data-heade r-id"),n=i .schema.it ems.proper ties[t],a= null;i.opt ions.items .fields&&i .options.i tems.field s[t]&&(a=i .options.i tems.field s[t]),n.re quired||a& &a.require d?i.fireCa llback("ta bleHeaderR equired",n ,a,this):i .fireCallb ack("table HeaderOpti onal",n,a, this)}),n( )}.bind(i) )},cleanup DomInjecti ons:functi | |
| 79 | on(){var n =function( t){var n=e (t).parent (),i=e(t). children() ,a=e(t).at tr("class" ).split(/\ s+/);e.eac h(a,functi on(t,i){"a lpaca-merg e-up"===i| |e(n).addC lass(i)}), e.each(e(t )[0].attri butes,func tion(){thi s.name&&0= ==this.nam e.indexOf( "data-")&& e(n).attr( this.name, this.value )}),i.leng th>0?e(t). replaceWit h(i):e(t). remove()}; this.getFi eldEl().fi nd("tr > . alpaca-fie ld").each( function() {n(this)}) ,this.getF ieldEl().f ind("tr > .alpaca-co ntainer"). each(funct ion(){n(th is)});var i=this.get FieldEl(). find("."+t .MARKER_CL ASS_ARRAY_ ITEM_ACTIO NBAR);i.le ngth>0&&i. each(funct ion(){var t=e("<td c lass='acti onbar' now rap='nowra p'></td>") ;e(this).b efore(t),e (t).append (this)});v ar a=this. getFieldEl ().find(". alpaca-tab le-reorder -draggable -cell");a. length>0&& a.each(fun ction(){va r t=e("<td class='al paca-table -reorder-d raggable-c ell'></td> ");e(this) .before(t) ,e(t).appe nd(e(this) .children( )),e(this) .remove()} );var r=th is.getFiel dEl().find (".alpaca- table-reor der-index- cell");r.l ength>0&&r .each(func tion(t){va r n=e("<td class='al paca-table -reorder-i ndex-cell' >"+t+"</td >");e(this ).before(n ),e(this). remove()}) ,this.getF ieldEl().f ind(".alpa ca-merge-u p").each(f unction(){ n(this)})} ,doResolve ItemContai ner:functi on(){var t =this;retu rn e(t.con tainer).fi nd("table tbody")},d oAfterAddI tem:functi on(t,n){va r i=this;i .data=i.ge tValue(),i .cleanupDo mInjection s();var a= i.options. datatables &&e.fn.Dat aTable;if( i.options. dragRows|| a&&1===i.d ata.length )i.refresh (function( ){n()});el se{if(i._d t){var r=i .field.fin d("[data-a lpaca-fiel d-path='"+ t.path+"'] ");i._dt.r ow.add(r)} n()}},doAf terRemoveI tem:functi on(t,n){va r i=this;i .data=i.ge tValue(),i .cleanupDo mInjection s();var a= i.options. datatables &&e.fn.Dat aTable;i.o ptions.dra gRows||a&& 0===i.data .length?i. refresh(fu nction(){n ()}):(i._d t&&i._dt.r ows(t).rem ove(),n()) },getType: function() {return"ar ray"},getT itle:funct ion(){retu rn"Table F ield"},get Descriptio n:function (){return" Renders ar ray items into a tab le"},getSc hemaOfOpti ons:functi on(){retur n t.merge( this.base( ),{propert ies:{datat ables:{tit le:"DataTa bles Confi guration", descriptio n:"Optiona l configur ation to b e passed t o the unde rlying Dat aTables Pl ugin.",typ e:"object" },showActi onsColumn: {title:"Sh ow Actions Column"," default":! 0,descript ion:"Wheth er to show or hide t he actions column.", type:"bool ean"},drag Rows:{titl e:"Drag Ro ws","defau lt":!1,des cription:" Whether to enable th e dragging of rows v ia a dragg able colum n. This r equires Da taTables a nd the Dat aTables Ro w Reorder Plugin.",t ype:"boole an"}}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{dat atables:{t ype:"objec t"},showAc tionsColum n:{type:"c heckbox"}, dragRows:{ type:"chec kbox"}}})} }),t.regis terFieldCl ass("table ",t.Fields .TableFiel d)}(jQuery ),function (e){var t= e.alpaca;t .Fields.Ta bleRowFiel d=t.Fields .ObjectFie ld.extend( {prepareCo ntainerMod el:functio n(e){var t =this;this .base(func tion(n){n. options.sh owActionsC olumn=t.pa rent.optio ns.showAct ionsColumn ,n.options .dragRows= t.parent.o ptions.dra gRows;for( var i=0;i< n.items.le ngth;i++)" hidden"=== n.items[i] .options.t ype&&(n.it ems[i].hid den=!0);e( n)})},getF ieldType:f unction(){ return"tab lerow"},ge tType:func tion(){ret urn"object "},getTitl e:function (){return" Table Row Field"},ge tDescripti on:functio n(){return "Renders o bject item s into a t able row"} }),t.regis terFieldCl ass("table row",t.Fie lds.TableR owField)}( jQuery),fu nction(e){ var t=e.al paca;t.Fie lds.TagFie ld=t.Field s.LowerCas eField.ext end({getFi eldType:fu nction(){r eturn"tag" },setup:fu nction(){t his.base() ,this.opti ons.separa tor||(this .options.s eparator=" ,")},getCo ntrolValue :function( ){var e=th is.base(); return""== =e?[]:e.sp lit(this.o ptions.sep arator)},s etValue:fu nction(e){ return""!= =e?e?void this.base( e.join(thi s.options. separator) ):this.bas e(""):void 0},onBlur :function( t){this.ba se(t);var n=this.get Value(),i= [];e.each( n,function (e,t){""!= =t.trim()& &i.push(t. trim())}), this.setVa lue(i)},ge tTitle:fun ction(){re turn"Tag F ield"},get Descriptio n:function (){return" Text field for enter ing list o f tags sep arated by delimiter. "},getSche maOfOption s:function (){return t.merge(th is.base(), {propertie s:{separat or:{title: "Separator ",descript ion:"Separ ator used to split t ags.",type :"string", "default": ","}}})},g etOptionsF orOptions: function() {return t. merge(this .base(),{f ields:{sep arator:{ty pe:"text"} }})}}),t.r egisterFie ldClass("t ag",t.Fiel ds.TagFiel d)}(jQuery ),function (e){var t= e.alpaca;t .Fields.Ti meField=t. Fields.Dat eField.ext end({getFi eldType:fu nction(){r eturn"time "},getDefa ultFormat: function() {return"h: mm:ss a"}, setup:func tion(){thi s.base()}, getTitle:f unction(){ return"Tim e Field"}, getDescrip tion:funct ion(){retu rn"Time Fi eld"}}),t. registerMe ssages({in validTime: "Invalid t ime"}),t.r egisterFie ldClass("t ime",t.Fie lds.TimeFi eld),t.reg isterDefau ltFormatFi eldMapping ("time","t ime")}(jQu ery),funct ion(e){var t=e.alpac a;t.Fields .TinyMCEFi eld=t.Fiel ds.TextAre aField.ext end({getFi eldType:fu nction(){r eturn"tiny mce"},setu p:function (){var e=t his;this.d ata||(this .data=""), e.options. toolbar||( e.options. toolbar="i nsertfile undo redo | stylesel ect | bold italic | alignleft aligncente r alignrig ht alignju stify | bu llist numl ist outden t indent | link imag e"),this.b ase()},set | |
| 80 | Value:func tion(e){va r t=this;t his.base(e ),t.editor &&t.editor .setConten t(e)},getC ontrolValu e:function (){var e=t his,t=null ;return e. editor&&(t =e.editor. getContent ()),t},ini tTinyMCEEv ents:funct ion(){var e=this;e.e ditor&&(e. editor.on( "click",fu nction(t){ e.onClick. call(e,t), e.trigger( "click",t) }),e.edito r.on("chan ge",functi on(t){e.on Change(),e .triggerWi thPropagat ion("chang e",t)}),e. editor.on( "blur",fun ction(t){e .onBlur(), e.trigger( "blur",t)} ),e.editor .on("focus ",function (t){e.onFo cus.call(e ,t),e.trig ger("focus ",t)}),e.e ditor.on(" keypress", function(t ){e.onKeyP ress.call( e,t),e.tri gger("keyp ress",t)}) ,e.editor. on("keyup" ,function( t){e.onKey Up.call(e, t),e.trigg er("keyup" ,t)}),e.ed itor.on("k eydown",fu nction(t){ e.onKeyDow n.call(e,t ),e.trigge r("keydown ",t)}))},a fterRender Control:fu nction(t,n ){var i=th is;this.ba se(t,funct ion(){!i.i sDisplayOn ly()&&i.co ntrol&&"un defined"!= typeof tin yMCE&&i.on ("ready",f unction(){ if(!i.edit or){var t= e(i.contro l)[0].id;t inyMCE.ini t({init_in stance_cal lback:func tion(e){i. editor=e,i .initTinyM CEEvents() },selector :"#"+t,too lbar:i.opt ions.toolb ar})}}),n( )})},destr oy:functio n(){var e= this;e.edi tor&&(e.ed itor.remov e(),e.edit or=null),t his.base() },getTitle :function( ){return"T inyMCE Edi tor"},getD escription :function( ){return"P rovides an instance of a TinyM CE control for use i n editing HTML."},ge tSchemaOfO ptions:fun ction(){re turn t.mer ge(this.ba se(),{prop erties:{to olbar:{tit le:"TinyMC E toolbar options",d escription :"Toolbar options fo r TinyMCE plugin.",t ype:"strin g"}}})},ge tOptionsFo rOptions:f unction(){ return t.m erge(this. base(),{fi elds:{tool bar:{type: "text"}}}) }}),t.regi sterFieldC lass("tiny mce",t.Fie lds.TinyMC EField)}(j Query),fun ction(e){v ar t=e.alp aca;t.Fiel ds.TokenFi eld=t.Fiel ds.TextFie ld.extend( {getFieldT ype:functi on(){retur n"token"}, setup:func tion(){thi s.base(),t his.option s.separato r||(this.o ptions.sep arator="," ),"undefin ed"==typeo f this.opt ions.token field&&(th is.options .tokenfiel d={}),"und efined"==t ypeof this .options.t okenfield. showAutoco mpleteOnFo cus&&(this .options.t okenfield. showAutoco mpleteOnFo cus=!0)},g etControlV alue:funct ion(){retu rn this.ba se()},setV alue:funct ion(e){thi s.base(e)} ,onBlur:fu nction(e){ this.base( e)},afterR enderContr ol:functio n(t,n){var i=this;th is.base(t, function() {!i.isDisp layOnly()& &i.control &&"undefin ed"!=typeo f e.fn.tok enfield&&i .on("ready ",function (t,n){e(t. control).t okenfield( n)}(i,i.op tions.toke nfield)),n ()})},getT itle:funct ion(){retu rn"Token F ield"},get Descriptio n:function (){return" Token fiel d for ente ring list of tokens separated by delimit er."},getS chemaOfOpt ions:funct ion(){retu rn t.merge (this.base (),{proper ties:{sepa rator:{tit le:"Separa tor",descr iption:"Se parator us ed to spli t tokens." ,type:"str ing","defa ult":","}, tokenfield :{title:"T oken Field options", descriptio n:"Setting s to pass into the u nderlying bootstrap- tokenfield control", type:"obje ct","defau lt":void 0 }}})},getO ptionsForO ptions:fun ction(){re turn t.mer ge(this.ba se(),{fiel ds:{separa tor:{type: "text"}}}) }}),t.regi sterFieldC lass("toke n",t.Field s.TokenFie ld)}(jQuer y),functio n(e){var t =e.alpaca; t.Fields.U ploadField =t.Control Field.exte nd({constr uctor:func tion(n,i,a ,r,o,l){va r s=this;t his.base(n ,i,a,r,o,l ),this.isA rrayType=f unction(){ return"arr ay"===s.sc hema.type} ,this.isOb jectType=f unction(){ return"obj ect"===s.s chema.type },this.wra pTemplate= function(n ){return f unction(i) {for(var a =i.files,r =i.formatF ileSize,o= i.options, l=[],u=0;u <a.length; u++){var c ={};c.opti ons=s.opti ons,c.file =t.cloneOb ject(a[u]) ,c.size=r( c.size),c. buttons=s. options.bu ttons,c.vi ew=s.view, c.fileInde x=u;var d= t.tmpl(s.v iew.getTem plateDescr iptor(n),c ,s);l.push (d[0])}ret urn l=e(l) ,e(l).each (function( ){o.fileup load&&o.fi leupload.a utoUpload& &e(this).f ind("butto n.start"). css("displ ay","none" ),s.handle WrapRow(th is,o),e(th is).find(" button.del ete").on(" click",fun ction(){va r t=e(d).f ind("butto n.delete") ,n=e(t).at tr("data-f ile-index" ),i=a[n];i f(s.onFile Delete.cal l(s,d,t,i) ,s.isArray Type()){va r r=s.getV alueAsArra y();r.spli ce(n,1),s. setValueAs Array(r)}e lse s.isOb jectType() &&s.setVal ueAsArray( []);s.trig gerWithPro pagation(" change"),s etTimeout( function() {s.refresh UIState()} ,200)})}), e(l)}}},ge tFieldType :function( ){return"u pload"},se tup:functi on(){var e =this;this .base(),e. options.re nderButton s=!1,e.opt ions.butto ns||(e.opt ions.butto ns=[]),e.o ptions.hid eDeleteBut ton||e.opt ions.butto ns.push({k ey:"delete ",isDelete :!0}),"und efined"==t ypeof e.op tions.show UploadPrev iew&&(e.op tions.show UploadPrev iew=!0),"u ndefined"= =typeof e. options.sh owHeaders& &(e.option s.showHead ers=!0),e. data||(e.d ata=[]),e. data&&t.is Object(e.d ata)&&(e.d ata=[e.dat a]),e.opti ons.upload ||(e.optio ns.upload= {}),"undef ined"==typ eof e.opti ons.maxNum berOfFiles &&"undefin ed"!=typeo f e.option s.upload.m axNumberOf Files&&(e. options.ma xNumberOfF iles=e.opt ions.uploa d.maxNumbe rOfFiles), "undefined "==typeof e.options. maxNumberO fFiles&&(e .options.m axNumberOf Files=1,e. isArrayTyp e()&&(e.op tions.maxN umberOfFil es=-1)),e. isObjectTy pe()&&(e.o ptions.max NumberOfFi les=1),e.o ptions.mul tiple===!1 &&(e.optio ns.maxNumb erOfFiles= 1),(e.opti ons.maxNum berOfFiles >1||-1===e .options.m axNumberOf Files)&&(e .options.m ultiple=!0 ),e.option s.upload.m axNumberOf Files=9999 | |
| 81 | ,e.options .maxNumber OfFiles>0& &(e.option s.upload.m axNumberOf Files=e.op tions.maxN umberOfFil es),"undef ined"==typ eof e.opti ons.maxFil eSize&&(e. options.up load.maxFi leSize?e.o ptions.max FileSize=e .options.u pload.maxF ileSize:e. options.ma xFileSize= -1,e.optio ns.maxFile Size&&(e.o ptions.upl oad.maxFil eSize=e.op tions.maxF ileSize)), "undefined "==typeof e.options. fileTypes& &(e.option s.upload.a cceptFileT ypes?e.opt ions.fileT ypes=e.opt ions.uploa d.acceptFi leTypes:e. options.fi leTypes=nu ll,e.optio ns.fileTyp es&&(e.opt ions.uploa d.acceptFi leTypes=e. options.fi leTypes)), e.options. errorHandl er||(e.opt ions.error Handler=fu nction(e){ alert(e.jo in("\n"))} );var n=e. determineC srfToken() ;n&&(e.opt ions.uploa d||(e.opti ons.upload ={}),e.opt ions.uploa d.headers| |(e.option s.upload.h eaders={}) ,e.options .upload.he aders[t.CS RF_HEADER_ NAME]=n)}, determineC srfToken:f unction(){ var e=t.CS RF_TOKEN;i f(!e)for(v ar n=0;n<t .CSRF_COOK IE_NAMES.l ength;n++) {var i=t.C SRF_COOKIE _NAMES[n], a=t.readCo okie(i);if (a){e=a;br eak}}retur n e},prepa reControlM odel:funct ion(e){var t=this;t. base(funct ion(n){n.c hooseButto nLabel=t.o ptions.cho oseButtonL abel,n.cho oseButtonL abel||(n.c hooseButto nLabel=t.g etMessage( "chooseFil es"),1===t .options.m axNumberOf Files&&(n. chooseButt onLabel=t. getMessage ("chooseFi le"))),n.d ropZoneMes sage=t.opt ions.dropZ oneMessage ,n.dropZon eMessage|| (n.dropZon eMessage=t .getMessag e("dropZon eMultiple" ),1===n.op tions.maxN umberOfFil es&&(n.dro pZoneMessa ge=t.getMe ssage("dro pZoneSingl e"))),n.se lectFromEx istingMess age=t.opti ons.select FromExisti ngMessage, n.selectFr omExisting Message||( n.selectFr omExisting Message=t. getMessage ("selectFr omExisting Multiple") ,1===n.opt ions.maxNu mberOfFile s&&(n.sele ctFromExis tingMessag e=t.getMes sage("sele ctFromExis tingSingle "))),e(n)} )},afterRe nderContro l:function (t,n){var i=this;thi s.base(t,f unction(){ i.handlePo stRender(f unction(){ i.isDispla yOnly()&&( e(i.contro l).find("b utton").hi de(),e(i.c ontrol).fi nd(".btn") .hide(),e( i.control) .find(".al paca-fileu pload-choo serow").hi de(),e(i.c ontrol).fi nd(".dropz one-messag e").hide() ),n()})})} ,getUpload Template:f unction(){ return thi s.wrapTemp late("cont rol-upload -partial-u pload")},g etDownload Template:f unction(){ return thi s.wrapTemp late("cont rol-upload -partial-d ownload")} ,handleBef oreFileUpl oadSubmit: function(e ){},handle PostRender :function( t){var n=t his,i=this .control,a ={};if(a.d ataType="j son",a.upl oadTemplat eId=null,a .uploadTem plate=this .getUpload Template() ,a.downloa dTemplateI d=null,a.d ownloadTem plate=this .getDownlo adTemplate (),a.files Container= e(i).find( ".files"), a.dropZone =e(i).find (".fileupl oad-active -zone"),a. url="/",a. method="po st",a.show UploadPrev iew=n.opti ons.showUp loadPrevie w,n.option s.upload)f or(var r i n n.option s.upload)a [r]=n.opti ons.upload [r];n.opti ons.multip le&&e(i).f ind(".alpa ca-fileupl oad-input" ).attr("mu ltiple",!0 ),n.option s.name&&e( i).find(". alpaca-fil eupload-in put").attr ("name",n. options.na me),e(i).f ind(".prog ress").css ("display" ,"none"),a .progressa ll=functio n(t,n){var a=!1;if(n .loaded<n. total&&(a= !0),a){e(i ).find(".p rogress"). css("displ ay","block ");var r=p arseInt(n. loaded/n.t otal*100,1 0);e("#pro gress .pro gress-bar" ).css("wid th",r+"%") }else e(i) .find(".pr ogress").c ss("displa y","none") },a.add=fu nction(e,t ){var i=[] ,a=0;do{va r r=!1;if( a<t.files. length){if (n.options .fileTypes ){var o=n. options.fi leTypes;"s tring"==ty peof n.opt ions.fileT ypes&&(o=n ew RegExp( n.options. fileTypes) ),o.test(t .files[a]. type)||(i. push("Not an accepte d file typ e: "+t.fil es[a].type ),r=!0)}n. options.ma xFileSize> -1&&t.file s[a].size> n.options. maxFileSiz e&&(i.push ("Filesize is too bi g: "+t.fil es[a].size ),r=!0)}r? a++:a++}wh ile(a<t.fi les.length );i.length >0?n.optio ns.errorHa ndler(i):t .submit()} ,n.applyCo nfiguratio n(a);var o =n.fileUpl oad=e(i).f ind(".alpa ca-fileupl oad-input" ).fileuplo ad(a);o.bi ndFirst("f ileuploadd one",funct ion(e,t){v ar i=n.opt ions.enhan ceFiles;i? i(a,t):n.e nhanceFile s(a,t),t.f iles=t.res ult.files, setTimeout (function( ){n.refres hValidatio nState(!0) ,n.refresh UIState()} ,250)}),o. bindFirst( "fileuploa dsubmit",f unction(t, i){n.optio ns.propert ies&&e.eac h(i.files, function(e ,t){for(va r a in n.o ptions.pro perties){v ar r="prop erty"+e+"_ _"+a,o=n.o ptions.pro perties[a] ;o=n.apply TokenSubst itutions(o ,e,t),i.f
|
|
| 82 | defined"!= typeof doc ument&&e(d ocument).b ind("drop dragover", function(e ){e.preven tDefault() })},handle WrapRow:fu nction(e,t ){},applyT okenSubsti tutions:fu nction(e,t ,n){var i= {index:t,n ame:n.name ,size:n.si ze,url:n.u rl,thumbna ilUrl:n.th umbnailUrl },a=-1,r=0 ;do if(a=e .indexOf(" {",r),a>-1 ){var o=e. indexOf("} ",a);if(o> -1){var l= e.substrin g(a+car.le ngth,o),s= i[l];s&&(e =e.substri ng(0,a)+s+ e.substrin g(o+1)),r= o+1}}while (a>-1);ret urn e},app lyConfigur ation:func tion(e){}, applyBindi ngs:functi on(e){},co nvertFileT oDescripto r:function (e,t){var n={id:e.id ,name:e.na me,size:e. size,url:e .url,thumb nailUrl:e. thumbnailU rl,deleteU rl:e.delet eUrl,delet eType:e.de leteType}; t(null,n)} ,convertDe scriptorTo File:funct ion(e,t){v ar n={id:e .id,name:e .name,size :e.size,ur l:e.url,th umbnailUrl :e.thumbna ilUrl,dele teUrl:e.de leteUrl,de leteType:e .deleteTyp e};t(null, n)},enhanc eFiles:fun ction(e,t) {},preload :function( e,t,n){var i=this,a= [],r=i.get ValueAsArr ay(),o=fun ction(e){r eturn e==r .length?n( a):void i. convertDes criptorToF ile(r[e],f unction(t, n){n&&a.pu sh(n),o(e+ 1)})};o(0) },afterPre load:funct ion(e,t,n, i){var a=t his;a.refr eshUIState (),i()},ge tControlVa lue:functi on(){retur n this.dat a},getValu e:function (){var e=t his.data;r eturn this .isObjectT ype()&&(e= this.data& &this.data .length>0? this.data[ 0]:void 0) ,e},setVal ue:functio n(e){e?t.i sArray(e)? this.data= e:t.isObje ct(e)&&(th is.data=[e ]):this.da ta=[],this .updateObs ervable(), this.trigg erUpdate() },getValue AsArray:fu nction(){r eturn this .data||[]} ,setValueA sArray:fun ction(e){v ar t=this; if(t.isArr ayType())t .setValue( e);else if (t.isObjec tType()){v ar n=null; e&&e.lengt h>0&&(n=e[ 0]),t.setV alue(n)}}, reload:fun ction(t){v ar n=this, i=this.get ValueAsArr ay(),a=[], r=function (o){if(o== =i.length) {var l=e(n .control). find(".alp aca-fileup load-input ");return e(l).fileu pload("opt ion","done ").call(l, e.Event("d one"),{res ult:{files :a}}),n.re freshValid ationState (),t()}n.c onvertDesc riptorToFi le(i[o],fu nction(e,t ){t&&a.pus h(t),r(o+1 )})};r(0)} ,plugin:fu nction(){v ar t=this; return e(t .control). find(".alp aca-fileup load-input ").data(). blueimpFil eupload},r efreshUISt ate:functi on(){var e =this,t=e. plugin();i f(t){var n =e.options .maxNumber OfFiles;-1 ===n?e.ref reshButton s(!0):t.op tions.getN umberOfFil es&&t.opti ons.getNum berOfFiles ()>=n?e.re freshButto ns(!1):e.r efreshButt ons(!0)}}, refreshBut tons:funct ion(t){var n=this;e( n.control) .find(".bt n.fileinpu t-button") .prop("dis abled",!0) ,e(n.contr ol).find(" .btn.filei nput-butto n").attr(" disabled", "disabled" ),e(n.cont rol).find( ".fileuplo ad-active- zone p.dro pzone-mess age").css( "display", "none"),t& &(e(n.cont rol).find( ".btn.file input-butt on").prop( "disabled" ,!1),e(n.c ontrol).fi nd(".btn.f ileinput-b utton").at tr("disabl ed",null), e(n.contro l).find(". fileupload -active-zo ne p.dropz one-messag e").css("d isplay","b lock"))},o nFileDelet e:function (n,i,a){va r r=this,o =a.deleteU rl,l=a.del eteType,s= {method:l, url:o,head ers:{}},u= r.determin eCsrfToken ();u&&(s.h eaders[t.C SRF_HEADER _NAME]=u), e.ajax(s)} ,onUploadF ail:functi on(e){var t=this;t.o ptions.err orHandler& &t.options .errorHand ler.call(t ,e);for(va r n=0;n<e. files.leng th;n++)e.f iles[n].er ror=e.erro rThrown},d isable:fun ction(){e( this.field ).find(".f ileinput-b utton").pr op("disabl ed",!0),e( this.field ).find(".f ileinput-b utton").at tr("disabl ed","disab led"),e(th is.field). find(".alp aca-fileup load-well" ).css("vis ibility"," hidden")}, enable:fun ction(){e( this.field ).find(".f ileinput-b utton").pr op("disabl ed",!1),e( this.field ).find(".f ileinput-b utton").re moveAttr(" disabled") ,e(this.fi eld).find( ".alpaca-f ileupload- well").css ("visibili ty","visib le")},getT itle:funct ion(){retu rn"Upload Field"},ge tDescripti on:functio n(){return "Provides an upload field with support f or thumbna il preview "},getType :function( ){return"a rray"},get SchemaOfOp tions:func tion(){ret urn t.merg e(this.bas e(),{prope rties:{max NumberOfFi les:{title :"Maximum Number of Files",des cription:" The maximu m number o f files to allow to be uploade d. If gre ater than zero, the maximum nu mber will be constra ined. If -1, then n o limit is imposed." ,type:"num ber","defa ult":1},ma xFileSize: {title:"Ma ximum File Size (in bytes)",de scription: "The maxim um file si ze allowed per uploa d. If gre ater than zero, the maximum fi le size wi ll be limi ted to the given siz e in bytes . If -1, then no li mit is imp osed.",typ e:"number" ,"default" :-1},fileT ypes:{titl e:"File Ty pes",descr iption:"A regular ex pression l imiting th e file typ es that ca n be uploa ded based on filenam e",type:"s tring"},mu ltiple:{ti tle:"Multi ple",descr iption:"Wh ether to a llow multi ple file u ploads. I f maxNumbe rOfFiles i s not spec ified, mul tiple will toggle be tween 1 an d unlimite d.",type:" boolean"," default":! 1},showUpl oadPreview :{title:"S how Upload Preview", descriptio n:"Whether to show t humbnails for upload ed assets (requires preview su pport)",ty pe:"boolea n","defaul t":!0},err orHandler: {title:"Er ror Handle r",descrip tion:"Opti onal funct ion handle r to be ca lled when one or mor e files fa ils to upl oad. This function is respons ible for p arsing the underlyin g xHR requ est and po pulating t he error m essage sta te.",type: "function" }}})}}),t. registerFi eldClass(" upload",t. Fields.Upl oadField), t.register Messages({ chooseFile :"Choose F ile...",ch | |
| 83 | ooseFiles: "Choose Fi les...",dr opZoneSing le:"Click the Choose button or Drag and Drop a fil e here to upload..." ,dropZoneM ultiple:"C lick the C hoose butt on or Drag and Drop files here to upload ..."}),fun ction(e){f unction t( t){return l?t.data(" events"):e ._data(t[0 ]).events} function n (e,n,i){va r a=t(e),r =a[n];if(! l){var o=i ?r.splice( r.delegate Count-1,1) [0]:r.pop( );return v oid r.spli ce(i?0:r.d elegateCou nt||0,0,o) }i?a.live. unshift(a. live.pop() ):r.unshif t(r.pop()) }function i(t,i,a){v ar r=i.spl it(/\s+/); t.each(fun ction(){fo r(var t=0; t<r.length ;++t){var i=e.trim(r [t]).match (/[^\.]+/i )[0];n(e(t his),i,a)} })}var a=e .fn.jquery .split("." ),r=parseI nt(a[0]),o =parseInt( a[1]),l=1> r||1===r&& 7>o;e.fn.b indFirst=f unction(){ var t=e.ma keArray(ar guments),n =t.shift() ;return n& &(e.fn.bin d.apply(th is,argumen ts),i(this ,n)),this} }(e)}(jQue ry),functi on(e){var t=e.alpaca ;t.Fields. UpperCaseF ield=t.Fie lds.TextFi eld.extend ({getField Type:funct ion(){retu rn"upperca se"},setup :function( ){this.bas e(),this.d ata&&(this .data=this .data.toUp perCase()) },setValue :function( e){if(!e)r eturn this .base(e);v ar n=null; e&&t.isStr ing(e)&&(n =e.toUpper Case()),n! =this.getV alue()&&th is.base(n) },onKeyPre ss:functio n(e){this. base(e);va r n=this;t .later(25, this,funct ion(){var e=n.getVal ue();n.set Value(e)}) },getTitle :function( ){return"U ppercase T ext"},getD escription :function( ){return"T ext field for upperc ase text." }}),t.regi sterFieldC lass("uppe rcase",t.F ields.Uppe rCaseField ),t.regist erDefaultF ormatField Mapping("u ppercase", "uppercase ")}(jQuery ),function (e){var t= e.alpaca;t .Fields.UR LField=t.F ields.Text Field.exte nd({getFie ldType:fun ction(){re turn"url"} ,setup:fun ction(){th is.inputTy pe="url",t his.base() ,"undefine d"==typeof this.opti ons.allowI ntranet&&( this.optio ns.allowIn tranet=!1) ,this.opti ons.allowI ntranet?th is.schema. pattern=t. regexps["i ntranet-ur l"]:this.s chema.patt ern=t.rege xps.url,th is.schema. format="ur i"},handle Validate:f unction(){ var e=this .base(),t= this.valid ation;retu rn t.inval idPattern. status||(t .invalidPa ttern.mess age=this.g etMessage( "invalidUR LFormat")) ,e},getSch emaOfOptio ns:functio n(){return t.merge(t his.base() ,{properti es:{allowI ntranet:{t itle:"Allo w intranet ",descript ion:"Allow s URLs wit h unqualif ied hostna mes"}}})}, getOptions ForOptions :function( ){return t .merge(thi s.base(),{ fields:{al lowIntrane t:{type:"c heckbox"}} })},getTit le:functio n(){return "URL Field "},getDesc ription:fu nction(){r eturn"Prov ides a tex t control with valid ation for an interne t web addr ess."}}),t .registerM essages({i nvalidURLF ormat:"The URL provi ded is not a valid w eb address ."}),t.reg isterField Class("url ",t.Fields .URLField) ,t.registe rDefaultFo rmatFieldM apping("ur l","url")} (jQuery),f unction(e) {var t=e.a lpaca;t.Fi elds.Zipco deField=t. Fields.Tex tField.ext end({getFi eldType:fu nction(){r eturn"zipc ode"},setu p:function (){this.ba se(),this. options.fo rmat=this. options.fo rmat?this. options.fo rmat:"nine ","nine"== =this.opti ons.format ?this.sche ma.pattern =t.regexps ["zipcode- nine"]:"fi ve"===this .options.f ormat?this .schema.pa ttern=t.re gexps["zip code-five" ]:(t.logEr ror("The c onfigured zipcode fo rmat: "+th is.options .format+" is not a l egal value [five, ni ne]"),this .options.f ormat="nin e",this.sc hema.patte rn=t.regex ps["zipcod e-nine"]), "nine"===t his.option s.format?t his.option s.maskStri ng="99999- 9999":"fiv e"===this. options.fo rmat&&(thi s.options. maskString ="99999")} ,handleVal idate:func tion(){var e=this.ba se(),t=thi s.validati on;return t.invalidP attern.sta tus||("nin e"===this. options.fo rmat?t.inv alidPatter n.message= this.getMe ssage("inv alidZipcod eFormatNin e"):"five" ===this.op tions.form at&&(t.inv alidPatter n.message= this.getMe ssage("inv alidZipcod eFormatFiv e"))),e},g etSchemaOf Options:fu nction(){r eturn t.me rge(this.b ase(),{pro perties:{f ormat:{tit le:"Format ",descript ion:"How t o represen t the zipc ode field" ,type:"str ing","defa ult":"five ","enum":[ "five","ni ne"],reado nly:!0}}}) },getOptio nsForOptio ns:functio n(){return t.merge(t his.base() ,{fields:{ format:{ty pe:"text"} }})},getTi tle:functi on(){retur n"Zipcode Field"},ge tDescripti on:functio n(){return "Provides a five or nine-digit al US zipc ode contro l with val idation."} }),t.regis terMessage s({invalid ZipcodeFor matFive:"I nvalid Fiv e-Digit Zi pcode (### ##)",inval idZipcodeF ormatNine: "Invalid N ine-Digit Zipcode (# ####-####) "}),t.regi sterFieldC lass("zipc ode",t.Fie lds.Zipcod eField),t. registerDe faultForma tFieldMapp ing("zipco de","zipco de")}(jQue ry),functi on(e){var t=e.alpaca ;t.registe rView({id: "base",tit le:"Abstra ct base vi ew",messag es:{countr ies:{afg:" Afghanista n",ala:"Al and Island s",alb:"Al bania",dza :"Algeria" ,asm:"Amer ican Samoa ",and:"And orra",ago: "Angola",a ia:"Anguil la",ata:"A ntarctica" ,atg:"Anti gua and Ba rbuda",arg :"Argentin a",arm:"Ar menia",abw :"Aruba",a us:"Austra lia",aut:" Austria",a ze:"Azerba ijan",bhs: "Bahamas", bhr:"Bahra in",bgd:"B angladesh" ,brb:"Barb ados",blr: "Belarus", bel:"Belgi um",blz:"B elize",ben :"Benin",b mu:"Bermud a",btn:"Bh utan",bol: "Bolivia", bih:"Bosni a and Herz egovina",b wa:"Botswa na",bvt:"B ouvet Isla nd",bra:"B razil",iot :"British Indian Oce an Territo ry",brn:"B runei Daru ssalam",bg r:"Bulgari a",bfa:"Bu rkina Faso ",bdi:"Bur undi",khm: "Cambodia" ,cmr:"Came roon",can: "Canada",c pv:"Cape V erde",cym: "Cayman Is lands",caf | |
| 84 | :"Central African Re public",tc d:"Chad",c hl:"Chile" ,chn:"Chin a",cxr:"Ch ristmas Is land",cck: "Cocos (Ke eling), Is lands",col :"Colombia ",com:"Com oros",cog: "Congo",co d:"Congo, the Democr atic Repub lic of the ",cok:"Coo k Islands" ,cri:"Cost a Rica",hr v:"Croatia ",cub:"Cub a",cyp:"Cy prus",cze: "Czech Rep ublic",civ :"Cote d'I voire",dnk :"Denmark" ,dji:"Djib outi",dma: "Dominica" ,dom:"Domi nican Repu blic",ecu: "Ecuador", egy:"Egypt ",slv:"El Salvador", gnq:"Equat orial Guin ea",eri:"E ritrea",es t:"Estonia ",eth:"Eth iopia",flk :"Falkland Islands ( Malvinas), ",fro:"Far oe Islands ",fji:"Fij i",fin:"Fi nland",fra :"France", guf:"Frenc h Guiana", pyf:"Frenc h Polynesi a",atf:"Fr ench South ern Territ ories",gab :"Gabon",g mb:"Gambia ",geo:"Geo rgia",deu: "Germany", gha:"Ghana ",gib:"Gib raltar",gr c:"Greece" ,grl:"Gree nland",grd :"Grenada" ,glp:"Guad eloupe",gu m:"Guam",g tm:"Guatem ala",ggy:" Guernsey", gin:"Guine a",gnb:"Gu inea-Bissa u",guy:"Gu yana",hti: "Haiti",hm d:"Heard I sland and McDonald I slands",va t:"Holy Se e (Vatican City Stat e),",hnd:" Honduras", hkg:"Hong Kong",hun: "Hungary", isl:"Icela nd",ind:"I ndia",idn: "Indonesia ",irn:"Ira n, Islamic Republic of",irq:"I raq",irl:" Ireland",i mn:"Isle o f Man",isr :"Israel", ita:"Italy ",jam:"Jam aica",jpn: "Japan",je y:"Jersey" ,jor:"Jord an",kaz:"K azakhstan" ,ken:"Keny a",kir:"Ki ribati",pr k:"Korea, Democratic People's Republic o f", | |
| 85 | kor:"Korea , Republic of",kwt:" Kuwait",kg z:"Kyrgyzs tan",lao:" Lao People 's Democra tic Republ ic",lva:"L atvia",lbn :"Lebanon" ,lso:"Leso tho",lbr:" Liberia",l by:"Libyan Arab Jama hiriya",li e:"Liechte nstein",lt u:"Lithuan ia",lux:"L uxembourg" ,mac:"Maca o",mkd:"Ma cedonia, t he former Yugoslav R epublic of ",mdg:"Mad agascar",m wi:"Malawi ",mys:"Mal aysia",mdv :"Maldives ",mli:"Mal i",mlt:"Ma lta",mhl:" Marshall I slands",mt q:"Martini que",mrt:" Mauritania ",mus:"Mau ritius",my t:"Mayotte ",mex:"Mex ico",fsm:" Micronesia , Federate d States o f",mda:"Mo ldova, Rep ublic of", mco:"Monac o",mng:"Mo ngolia",mn e:"Montene gro",msr:" Montserrat ",mar:"Mor occo",moz: "Mozambiqu e",mmr:"My anmar",nam :"Namibia" ,nru:"Naur u",npl:"Ne pal",nld:" Netherland s",ant:"Ne therlands Antilles", ncl:"New C aledonia", nzl:"New Z ealand",ni c:"Nicarag ua",ner:"N iger",nga: "Nigeria", niu:"Niue" ,nfk:"Norf olk Island ",mnp:"Nor thern Mari ana Island s",nor:"No rway",omn: "Oman",pak :"Pakistan ",plw:"Pal au",pse:"P alestinian Territory , Occupied ",pan:"Pan ama",png:" Papua New Guinea",pr y:"Paragua y",per:"Pe ru",phl:"P hilippines ",pcn:"Pit cairn",pol :"Poland", prt:"Portu gal",pri:" Puerto Ric o",qat:"Qa tar",rou:" Romania",r us:"Russia n Federati on",rwa:"R wanda",reu :"Reunion" ,blm:"Sain t Barthele my",shn:"S aint Helen a",kna:"Sa int Kitts and Nevis" ,lca:"Sain t Lucia",m af:"Saint Martin (Fr ench part) ",spm:"Sai nt Pierre and Miquel on",vct:"S aint Vince nt and the Grenadine s",wsm:"Sa moa",smr:" San Marino ",stp:"Sao Tome and Principe", sau:"Saudi Arabia",s en:"Senega l",srb:"Se rbia",syc: "Seychelle s",sle:"Si erra Leone ",sgp:"Sin gapore",sv k:"Slovaki a",svn:"Sl ovenia",sl b:"Solomon Islands", som:"Somal ia",zaf:"S outh Afric a",sgs:"So uth Georgi a and the South Sand wich Islan ds",esp:"S pain",lka: "Sri Lanka ",sdn:"Sud an",sur:"S uriname",s jm:"Svalba rd and Jan Mayen",sw z:"Swazila nd",swe:"S weden",che :"Switzerl and",syr:" Syrian Ara b Republic ",twn:"Tai wan, Provi nce of Chi na",tjk:"T ajikistan" ,tza:"Tanz ania, Unit ed Republi c of",tha: "Thailand" ,tls:"Timo r-Leste",t go:"Togo", tkl:"Tokel au",ton:"T onga",tto: "Trinidad and Tobago ",tun:"Tun isia",tur: "Turkey",t km:"Turkme nistan",tc a:"Turks a nd Caicos Islands",t uv:"Tuvalu ",uga:"Uga nda",ukr:" Ukraine",a re:"United Arab Emir ates",gbr: "United Ki ngdom",usa :"United S tates",umi :"United S tates Mino r Outlying Islands", ury:"Urugu ay",uzb:"U zbekistan" ,vut:"Vanu atu",ven:" Venezuela" ,vnm:"Viet Nam",vgb: "Virgin Is lands, Bri tish",vir: "Virgin Is lands, U.S .",wlf:"Wa llis and F utuna",esh :"Western Sahara",ye m:"Yemen", zmb:"Zambi a",zwe:"Zi mbabwe"},e mpty:"",re quired:"Th is field i s required ",valid:"" ,invalid:" This field is invali d",months: ["January" ,"February ","March", "April","M ay","June" ,"July","A ugust","Se ptember"," October"," November", "December" ],timeUnit s:{SECOND: "seconds", MINUTE:"mi nutes",HOU R:"hours", DAY:"days" ,MONTH:"mo nths",YEAR :"years"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{cs_CZ :{required :"Toto pol e je vyža dováno",i nvalid:"To to pole je neplatné ",months:[ "Leden","à šnor","BÅ™ ezen","Dub en","KvÄ›t en","ÄŒerv en","ÄŒerv enec","Srp en","Zář Ã","ŘÃj en","Listo pad","Pros inec"],tim eUnits:{SE COND:"seku ndy",MINUT E:"minuty" ,HOUR:"hod iny",DAY:" dny",MONTH :"mÄ›sÃce ",YEAR:"ro ky"},inval idValueOfE num:"Toto pole musà obsahovat jednu hod notu z {0} . Aktuáln à hodnota je: {1}", notOptiona l:"Toto po le nenà v olitelné" ,disallowV alue:"{0} jsou zaká zané hodn oty.",notE noughItems :"Minimál nà poÄet položek je {0}",to oManyItems :"Maximál nà poÄet položek je {0}",va lueNotUniq ue:"Hodnot y nejsou u nikátnÃ" ,notAnArra y:"Tato ho dnota nenà pole",ad dItemButto nLabel:"PÅ ™idat novo u položku ",addButto nLabel:"PÅ ™idat",rem oveButtonL abel:"Odeb rat",upBut tonLabel:" Nahoru",do wnButtonLa bel:"Dolů ",noneLabe l:"Žádnà ½",stringV alueTooSma ll:"Minimà ¡lnà hodn ota tohoto pole je { 0}",string ValueTooLa rge:"Maxim álnà hod nota tohot o pole je {0}",strin gValueTooS mallExclus ive:"Hodno ta tohoto pole musà být vÄ›t šà než {0}",strin gValueTooL argeExclus ive:"Hodno ta tohoto pole musà být menÅ ¡Ã než { 0}",string DivisibleB y:"Hodnota musà bý t dÄ›litel ná {0}",s tringNotAN umber:"Hod nota nenà ÄÃslo." ,stringVal ueNotMulti pleOf:"Čà slo nenà násobkem {0}",tooM anyPropert ies:"Maxim álnà poÄ et vlastn ostà ({0} ) byl pÅ™e kroÄen.", tooFewProp erties:"Ne nà dostat ek vlastno stà (je p ožadován o {0})",wo rdLimitExc eeded:"Max imálnà p oÄet slov ({0}) byl pÅ™ekroÄ en.",inval idPattern: "Toto pole má mÃt vzor {0}", stringTooS hort:"Toto pole musà obsahova t nejmenÄ› {0} znakÅ ¯",stringT ooLong:"To to pole mu sà obsaho vat maximà ¡lnÄ› {0} znaků",in validDate: "Nesprávn é datum p ro formát {0}",edit orAnnotati onsExist:" Editor má v sobÄ› c hyby, kter é musà b ýt oprave ny",invali dEmail:"Ch ybná e-ma ilová adr esa, pÅ™.: info@clou dcms.com", stringNotA nInteger:" Tato hodno ta nenÃ Ä Ãslo.",i nvalidIPv4 :"Chybná IPv4 adres a, ex: 192 .168.0.1", stringNotA JSON:"Tato hodnota n enà platn ý JSON te xt.",keyMi ssing:"Map a obsahuje prázdný klÃÄ.", keyNotUniq ue:"KlÃÄ e nejsou j edineÄné .",invalid Password:" Å patné h eslo",inva lidPhone:" Å patné t elefonnà ÄÃslo, p Å™.: (123) 456-9999" ,chooseFil e:"Vyberte soubor... ",chooseFi les:"Vyber te soubory ...",dropZ oneSingle: "Vyberte s oubor nebo jej pÅ™et áhnÄ›te s | |
| 86 | em pro nah ránÃ..." ,dropZoneM ultiple:"V yberte sou bory nebo je pÅ™etá hnÄ›te sem pro nahrà ¡nÃ...",i nvalidURLF ormat:"Uve dená URL nenà plat na webová adresa.", invalidZip codeFormat Five:"Chyb né poÅ¡to vnà smÄ›r ovacà Äà slo (#### #)",invali dZipcodeFo rmatNine:" Chybné de vÃti-mÃs tné poÅ¡t ovnà smÄ› rovacÃ Ä Ãslo (### ##-####)"} }})}(jQuer y),functio n(e){var t =e.alpaca; t.register View({id:" base",mess ages:{de_A T:{require d:"Eingabe erforderl ich",inval id:"Eingab e invalid" ,months:[" Jänner"," Februar"," März","Ap ril","Mai" ,"Juni","J uli","Augu st","Septe mber","Okt ober","Nov ember","De zember"],t imeUnits:{ SECOND:"Se kunden",MI NUTE:"Minu ten",HOUR: "Stunden", DAY:"Tage" ,MONTH:"Mo nate",YEAR :"Jahre"}, notOptiona l:"Dieses Feld ist n icht optio nal",disal lowValue:" Diese Wert e sind nic ht erlaubt : {0}",inv alidValueO fEnum:"Die se Feld so llte einen der folge nden Werte enthalten : {0}. [{1 }]",notEno ughItems:" Die Mindes tanzahl vo n Elemente n ist {0}" ,tooManyIt ems:"Die M aximalanza hl von Ele menten ist {0}",valu eNotUnique :"Diese We rte sind n icht einde utig",notA nArray:"Ke ine Liste von Werten ",invalidD ate:"Falsc hes Datums format: {0 }",invalid Email:"Ung ültige e- Mail Adres se, z.B.: info@cloud cms.com",s tringNotAn Integer:"E ingabe ist keine Gan z Zahl.",i nvalidIPv4 :"Ungülti ge IPv4 Ad resse, z.B .: 192.168 .0.1",stri ngValueToo Small:"Die Mindestan zahl von Z eichen ist {0}",stri ngValueToo Large:"Die Maximalan zahl von Z eichen ist {0}",stri ngValueToo SmallExclu sive:"Die Anzahl der Zeichen m uss größ er sein al s {0}",str ingValueTo oLargeExcl usive:"Die Anzahl de r Zeichen muss klein er sein al s {0}",str ingDivisib leBy:"Der Wert muss durch {0} dividierba r sein",st ringNotANu mber:"Die Eingabe is t keine Za hl",invali dPassword: "Ungültig es Passwor t.",invali dPhone:"Un gültige T elefonnumm er, z.B.: (123) 456- 9999",inva lidPattern :"Diese Fe ld stimmt nicht mit folgender Vorgabe ü berein {0} ",stringTo oShort:"Di eses Feld sollte min destens {0 } Zeichen enthalten" ,stringToo Long:"Dies es Feld so llte höch stens {0} Zeichen en thalten"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{de_DE :{required :"Eingabe erforderli ch",invali d:"Eingabe ungültig ",months:[ "Januar"," Februar"," März","Ap ril","Mai" ,"Juni","J uli","Augu st","Septe mber","Okt ober","Nov ember","De zember"],t imeUnits:{ SECOND:"Se kunden",MI NUTE:"Minu ten",HOUR: "Stunden", DAY:"Tage" ,MONTH:"Mo nate",YEAR :"Jahre"}, notOptiona l:"Dieses Feld ist n icht optio nal",disal lowValue:" Diese Wert e sind nic ht erlaubt : {0}",inv alidValueO fEnum:"Die se Feld so llte einen der folge nden Werte enthalten : {0}. [{1 }]",notEno ughItems:" Die Mindes tanzahl vo n Elemente n ist {0}" ,tooManyIt ems:"Die M aximalanza hl von Ele menten ist {0}",valu eNotUnique :"Diese We rte sind n icht einde utig",notA nArray:"Ke ine Liste von Werten ",invalidD ate:"Falsc hes Datums format: {0 }",invalid Email:"Kei ne gültig e E-Mail A dresse",st ringNotAnI nteger:"Ke ine Ganze Zahl",inva lidIPv4:"U ngültige IPv4 Adres se",string ValueTooSm all:"Die M indestanza hl von Zei chen ist { 0}",string ValueTooLa rge:"Die M aximalanza hl von Zei chen ist { 0}",string ValueTooSm allExclusi ve:"Die An zahl der Z eichen mus s größer sein als {0}",strin gValueTooL argeExclus ive:"Die A nzahl der Zeichen mu ss kleiner sein als {0}",strin gDivisible By:"Der We rt muss du rch {0} di vidierbar sein",stri ngNotANumb er:"Die Ei ngabe ist keine Zahl ",invalidP assword:"U ngültiges Passwort" ,invalidPh one:"Ungü ltige Tele fonnummer" ,invalidPa ttern:"Die se Feld st immt nicht mit folge nder Vorga be überei n {0}",str ingTooShor t:"Dieses Feld sollt e mindeste ns {0} Zei chen entha lten",stri ngTooLong: "Dieses Fe ld sollte höchstens {0} Zeich en enthalt en"}}})}(j Query),fun ction(e){v ar t=e.alp aca;t.regi sterView({ id:"base", messages:{ es_ES:{req uired:"Est e campo es obligator io",invali d:"Este ca mpo es inv álido",mo nths:["Ene ro","Febre ro","Marzo ","Abril", "Mayo","Ju nio","Juli o","Agosto ","Septiem bre","Octu bre","Novi embre","Di ciembre"], timeUnits: {SECOND:"s egundos",M INUTE:"min utos",HOUR :"horas",D AY:"dÃas" ,MONTH:"me ses",YEAR: "años"},n otOptional :"Este cam po no es o pcional.", disallowVa lue:"{0} s on los val ores recha zados.",in validValue OfEnum:"Es te campo d ebe tener uno de los valores a dentro {0} . [{1}]",n otEnoughIt ems:"El nà ºmero mÃn imo de art Ãculos es {0}",tooM anyItems:" El número máximo d e artÃcul os es {0}" ,valueNotU nique:"Los valores n o son úni cos",notAn Array:"Est e valor no es un ars enal",inva lidDate:"F echa invá lida para el formato {0}",inva lidEmail:" Email addr ess invál ido, ex: i nfo@cloudc ms.com",st ringNotAnI nteger:"Es te valor n o es un nà ºmero ente ro.",inval idIPv4:"Di rección i nválida I Pv4, ex: 1 92.168.0.1 ",stringVa lueTooSmal l:"El valo r mÃnimo para este campo es { 0}",string ValueTooLa rge:"El va lor máxim o para est e campo es {0}",stri ngValueToo SmallExclu sive:"El v alor de es te campo d ebe ser ma yor que {0 }",stringV alueTooLar geExclusiv e:"El valo r de este campo debe ser menos que {0}", stringDivi sibleBy:"E l valor de be ser div isible cer ca {0}",st ringNotANu mber:"Este valor no es un núm ero.",inva lidPasswor d:"Contras eña invá lida",inva lidPhone:" Número de teléfono inválido , ex: (123 ) 456-9999 ",invalidP attern:"Es te campo d ebe tener patrón {0 }",stringT ooShort:"E ste campo debe conte | |
| 87 | ner por lo menos {0} números o caracter es",string TooLong:"E ste campo debe conte ner a lo m ás {0} nà ºmeros o c aracteres" ,noneLabel :"Ninguno" ,addItemBu ttonLabel: "Añadir", addButtonL abel:"Aña dir",remov eButtonLab el:"Quitar ",upButton Label:"Arr iba",downB uttonLabel :"Abajo"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{fi_FI :{required :"Kenttä on pakolli nen",inval id:"Syöte on virhee llinen",mo nths:["Tam mikuu","He lmikuu","M aaliskuu", "Huhtikuu" ,"Toukokuu ","Kesäku u","Heinä kuu","Elok uu","Syysk uu","Lokak uu","Marra skuu","Jou lukuu"],ti meUnits:{S ECOND:"sek untia",MIN UTE:"minuu ttia",HOUR :"tuntia", DAY:"päiv ää",MONT H:"kuukaut ta",YEAR:" vuotta"},n otOptional :"Tämä k enttä on pakollinen ",disallow Value:"Seu raavat syà ¶tteet eiv ät ole sa llittuja: {0}",inval idValueOfE num:"Kentà ¤n pitää sisältä ä yksi se uraavista arvoista: {0}. [{1}] ",notEnoug hItems:"Pi enin salli ttu määr ä arvoja on {0}",to oManyItems :"Suurin s allittu mà ¤Ã¤rä arv oja on {0} ",valueNot Unique:"Sy ötetyt ar vot eivät ole uniik keja",notA nArray:"Sy öte ei ol e lista",i nvalidDate :"Virheell inen päiv ämäärä muoto: {0} ",invalidE mail:"Virh eellinen s ähköpost iosoite",s tringNotAn Integer:"A rvo ei ole kokonaisl uku",inval idIPv4:"Vi rheellinen IPv4-osoi te",string ValueTooSm all:"Pieni n sallittu arvo on { 0}",string ValueTooLa rge:"Suuri n sallittu arvo on { 0}",string ValueTooSm allExclusi ve:"Arvon pitää ol la suuremp i kuin {0} ",stringVa lueTooLarg eExclusive :"Arvon pi tää olla pienempi kuin {0}", stringDivi sibleBy:"L uvun pitä ä olla ja ollinen lu vulla {0}" ,stringNot ANumber:"S yöte ei o le luku",i nvalidPass word:"Virh eellinen s alasana",i nvalidPhon e:"Virheel linen puhe linnumero" ,invalidPa ttern:"Syà ¶tteen tä ytyy olla seuraavass a muodossa : {0}",str ingTooShor t:"Syötte en minimip ituus on { 0} merkkià ¤",stringT ooLong:"Sy ötteen ma ksimipituu s on {0} m erkkiä"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{fr_FR :{required :"Ce champ est requi s",invalid :"Ce champ est inval ide",month s:["Janvie r","Févri er","Mars" ,"Avril"," Mai","Juin ","Juillet ","Août", "Septembre ","Octobre ","Novembr e","Dé DNS "],timeUni ts:{SECOND :"secondes ",MINUTE:" minutes",H OUR:"heure s",DAY:"jo urs",MONTH :"mois",YE AR:"année s"},notOpt ional:"Ce champ n'es t pas opti onnel.",di sallowValu e:"{0} son t des vale urs interd ites.",inv alidValueO fEnum:"Ce champ doit prendre u ne des val eurs suiva ntes : {0} . [{1}]",n otEnoughIt ems:"Le no mbre minim um d'élé ments est {0}",tooMa nyItems:"L e nombre m aximum d'à ©léments est {0}",v alueNotUni que:"Les v aleurs son t uniques" ,notAnArra y:"Cette v aleur n'es t pas une liste",inv alidDate:" Cette date ne corres pond pas a u format { 0}",invali dEmail:"Ad resse de c ourriel in valide, ex : info@clo udcms.com" ,stringNot AnInteger: "Cette val eur n'est pas un nom bre entier .",invalid IPv4:"Adre sse IPv4 i nvalide, e x: 192.168 .0.1",stri ngValueToo Small:"La valeur min imale pour ce champ est {0}",s tringValue TooLarge:" La valeur maximale p our ce cha mp est {0} ",stringVa lueTooSmal lExclusive :"La valeu r doit-êt re supéri eure à {0}",strin gValueTooL argeExclus ive:"La va leur doit- être infà ©rieure à {0}",strin gDivisible By:"La val eur doit-à ªtre divis ible par { 0}",string NotANumber :"Cette va leur n'est pas un no mbre.",inv alidPasswo rd:"Mot de passe inv alide",inv alidPhone: "Numéro d e téléph one invali de, ex: (1 23) 456-99 99",invali dPattern:" Ce champ d oit corres pondre au motif {0}" ,stringToo Short:"Ce champ doit contenir au moins { 0} caractà ¨res",stri ngTooLong: "Ce champ doit conte nir au plu s {0} cara ctères"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{hr_HR :{required :"Polje je obavezno" ,invalid:" PogreÅ¡na vrijednost ",months:[ "SijeÄanj ","VeljaÄ a","Ožuja k","Travan j","Sviban j","Lipanj ","Srpanj" ,"Kolovoz" ,"Rujan"," Listopad", "Studeni", "Prosinac" ],timeUnit s:{SECOND: "sekunda", MINUTE:"mi nuta",HOUR :"sati",DA Y:"dan",MO NTH:"mjese c",YEAR:"g odina"},no tOptional: "Polje nij e opciono. ",disallow Value:"{0} vrijednos t nije doz voljena.", invalidVal ueOfEnum:" Moguće vr ijednosti : {0}. [{1 }]",notEno ughItems:" Odaberite najmanje { 0}",tooMan yItems:"Od aberite na jviÅ¡e {0} ",valueNot Unique:"Vr ijednost n ije jedins tvena",not AnArray:"V rijednost nije popis ",invalidD ate:"Datum nije u fo rmatu {0}" ,invalidEm ail:"E-mai l adresa n ije u ispr avnom form atu, npr: ime.prezim e@internet .com",stri ngNotAnInt eger:"Vrij ednost nij e cijeli b roj.",inva lidIPv4:"I Pv4 adresa nije ispr avna, npr: 192.168.0 .1",string ValueTooSm all:"Vrije dnost je i spod dopuÅ ¡tenog {0} ",stringVa lueTooLarg e:"Vrijedn ost je izn ad dopuÅ¡t enog {0}", stringValu eTooSmallE xclusive:" Vrijednost mora biti veća od {0}",strin gValueTooL argeExclus ive:"Vrije dnost mora biti manj a od {0}", stringDivi sibleBy:"V rijednost mora biti djeljiva s a {0}",str ingNotANum ber:"Vrije dnost nije broj.",in validPassw ord:"Neisp ravna lozi nka",inval idPhone:"T elefon nij e ispravan , npr: (12 3) 456-999 9",invalid Pattern:"P ogreÅ¡an u zorak {0}" ,stringToo Short:"Pol je mora im ati namjan je {0} zna kova",stri ngTooLong: "Polje mor a imati na jviÅ¡e {0} znakova"} }})}(jQuer y),functio n(e){var t =e.alpaca; t.register View({id:" base",mess ages:{it_I T:{require d:"Questo campo è o bbligatori o",invalid :"Questo c ampo è | |
| 88 | invalido", months:["G ennaio","F ebbraio"," Marzo","Ap rile","Mag gio","Giug no","Lugli o","Agosto ","Settemb re","Ottob re","Novem bre","Di DNS "],timeUni ts:{SECOND :"secondi" ,MINUTE:"m inuti",HOU R:"ore",DA Y:"giorni" ,MONTH:"me si",YEAR:" anni"},not Optional:" Questo cam po non è opzionale" ,disallowV alue:"{0} sono valor i invalidi ",invalidV alueOfEnum :"Questo c ampo deve avere uno dei seguen ti valori {0} (valor e attuale: {1})",not EnoughItem s:"Il nume ro minimo di element i richiest i è {0}", tooManyIte ms:"Il num ero massim o di eleme nti ammess i è {0}", valueNotUn ique:"I va lori non s ono univoc i",notAnAr ray:"Quest o valore n on è di t ipo array" ,invalidDa te:"Data i nvalida pe r il forma to {0}",in validEmail :"Indirizz o email in valido, si attendono valori de l tipo: in fo@cloudcm s.com",str ingNotAnIn teger:"Que sto valore non è un numero in tero",inva lidIPv4:"I ndirizzo I Pv4 invali do, si att endono val ori del ti po: 192.16 8.0.1",str ingValueTo oSmall:"Il valore mi nimo per q uesto camp o è {0}", stringValu eTooLarge: "Il valore massimo p er questo campo è { 0}",string ValueTooSm allExclusi ve:"Il val ore di que sto campo deve esser e maggiore di {0}",s tringValue TooLargeEx clusive:"I l valore d i questo c ampo deve essere min ore di {0} ",stringDi visibleBy: "Il valore di questo campo dev e essere d ivisibile per {0}",s tringNotAN umber:"Que sto valore non è un numero",i nvalidPass word:"Pass word inval ida",inval idPhone:"N umero di t elefono in valido, si attendono valori de l tipo: (1 23) 456-99 99",invali dPattern:" Questo cam po deve av ere la seg uente stru ttura: {0} ",stringTo oShort:"Qu esto campo non deve contenere meno di {0 } caratter i",stringT ooLong:"Qu esto campo non deve contenere più di {0 } caratter i",noneLab el:"Nessun o",addItem ButtonLabe l:"Aggiung i",addButt onLabel:"A ggiungi",r emoveButto nLabel:"Ri muovi",upB uttonLabel :"Su",down ButtonLabe l:"Giù"}} })}(jQuery ),function (e){var t= e.alpaca;t .registerV iew({id:"b ase",messa ges:{ja_JP :{required :"ã“ã®é …ç›®ã¯å¿… é ˆã§ã™" ,invalid:" ã“ã®é …ç ›®ã¯æ£ã —ã„値㧠ã¯ã‚り㠾ã›ã‚“", months:["1 月","2月 ","3月"," 4月","5æœ ˆ","6月", "7月","8æ œˆ","9月" ,"10月"," 11月","12 月"],time Units:{SEC OND:"ç§’", MINUTE:"åˆ †",HOUR:"æ ™‚",DAY:"æ —¥",MONTH: "月",YEAR :"å¹´"},no tOptional: "ã“ã®é … ç›®ã¯ä»»æ „ã®å›žç ”é …ç›®ã§ ã¯ã‚り㠾ã›ã‚“", disallowVa lue:"{0} ã ¯ç¦æ¢ã •れã¦ã„ る値ã§ã ™",invali dValueOfEn um:"ã“ã® é …ç›®ã¯ {0} ã®ä¸ ã‹ã‚‰é¸ã °ãªã‘ã‚ Œã°ãªã‚Š ã¾ã›ã‚“ã €‚ç¾åœ¨ã ®å€¤ã¯ {1 } ã§ã™", notEnoughI tems:"é …ç ›®æ•°ã¯ { 0} ä»¥ä¸Šå ¿…è¦ã§ã ™",tooMany Items:"é … 目数㯠{0} 以下 ã§ãªã‘ã ‚Œã°ãªã‚ Šã¾ã›ã‚“ ",valueNot Unique:"å€ ¤ãŒä¸€æ„ ã§ã¯ã‚ã ‚Šã¾ã›ã‚ “",notAnAr ray:"ã“ã ®é …ç›®ã® å€¤ãŒé…å ˆ—ã§ã‚ã‚ Šã¾ã›ã‚“ ",stringVa lueTooSmal l:"ã“ã®é …ç›®ã®æœ €å°å€¤ã¯ {0} ã§ã ™",stringV alueTooLar ge:"ã“ã® é …ç›®ã®æ œ€å¤§å€¤ã ¯ {0} ã§ã ™",string ValueTooSm allExclusi ve:"ã“ã® é …ç›®ã®å €¤ã¯ {0} よりå°ã •ããªã ‘れã°ãª りã¾ã›ã ‚“",string ValueTooLa rgeExclusi ve:"ã“ã® é …ç›®ã®å €¤ã¯ {0} より大ã ããªã ‘れã°ãª りã¾ã›ã ‚“",string DivisibleB y:"値㯠{0} ã«ã‚ˆ ã£ã¦å‰²ã ‚Šåˆ‡ã‚Œã ªã‘れ㰠ãªã‚Šã¾ã ›ã‚“",str ingNotANum ber:"ã“ã ®é …ç›®ã® å€¤ãŒæ•°å €¤ã§ã¯ã ‚りã¾ã› ã‚“",strin gValueNotM ultipleOf: "値㌠{0 } ã®å€æ• °ã§ã¯ã‚ りã¾ã›ã ‚“",string NotAnInteg er:"ã“ã® é …ç›®ã®å €¤ãŒæ•´æ• °ã§ã¯ã‚ りã¾ã›ã ‚“",string NotAJSON:" å€¤ãŒæ£ã —ã„ JSON å½¢å¼ã® æ–‡å—列㠧ã¯ã‚ã‚ Šã¾ã›ã‚“ ",stringTo oShort:"ã “ã®é …ç›® 㯠{0} æ– ‡å—以上 å¿…è¦ã§ã ™",string TooLong:"ã “ã®é …ç› ®ã¯ {0} æ –‡å—ä»¥ä¸ ‹ã§ãªã‘ れã°ãªã ‚Šã¾ã›ã‚ “",invalid Time:"æ™‚é –“ãŒæ£ã —ãã‚り ã¾ã›ã‚“" ,invalidDa te:"日付 ㌠{0} ã §ã¯ã‚り ã¾ã›ã‚“" ,invalidEm ail:"メム¼ãƒ«ã‚¢ãƒ‰ ãƒ¬ã‚¹ãŒæ £ã—ã㠂りã¾ã› ん。例㠈㰠info @cloudcms. com ã®ã‚ˆ ã†ãªå½¢å ¼ã§ã™", invalidIPv 4:"IPv4 ã‚ ¢ãƒ‰ãƒ¬ã‚¹ ãŒæ£ã—ã ã‚り㠾ã›ã‚“。 例ãˆã° 192.168.0. 1 ã®ã‚ˆã †ãªå½¢å¼ ã§ã™",in validPassw ord:"パ゠¹ãƒ¯ãƒ¼ãƒ‰ ãŒæ£ã—ã ã‚り㠾ã›ã‚“",i nvalidPhon e:"é›»è©±ç •ªå·ãŒæ £ã—ã゠りã¾ã›ã ‚“。例㠈㰠(123) 456-9999 ã®ã‚ˆã†ã ªå½¢å¼ã §ã™",inva lidPattern :"ã“ã®é …目㯠{0 } ã®ãƒ‘ã‚ ¿ãƒ¼ãƒ³ã§ ãªã‘れ㠰ãªã‚Šã ¾ã›ã‚“",i nvalidURLF ormat:"URL ãŒæ£ã— ã„å½¢å¼ã §ã¯ã‚ã‚ Šã¾ã›ã‚“ ",keyMissi ng:"地図 ãŒç©ºã®ã ‚ãƒ¼ã‚’å «ã‚“ã§ã„ ã¾ã™",ke yNotUnique :"地図㠮ã‚ー㌠一æ„ã§ã ¯ã‚り㠾ã›ã‚“",O bjecttooFe wPropertie s:"プãƒã ƒ‘ティ㠌足り㾠ã›ã‚“ ({0 } ãŒå¿…è¦ ã§ã™)", tooManyPro perties:"ã ƒ—ãƒãƒ‘ム†ã‚£ ({0}) ã®æœ€å¤§ æ•°ã‚’è¶…ã ˆã¦ã„ã ¾ã™",word LimitExcee ded:"{0} ã ®å˜èªžæ• °ã®åˆ¶é™ ã‚’è¶…ãˆã ¦ã„ã¾ã ™",editorA nnotations Exist:"エ ディタ㠌修æ£ã ™ã¹ãエ ãƒ©ãƒ¼ã‚’å ±å‘Šã—ã ¦ã„ã¾ã™ ",invalidZ ipcodeForm atFive:"5æ ¡ã® Zipc ode (##### ) ã§ã¯ã ‚りã¾ã› ã‚“",inval idZipcodeF ormatNine: "9æ¡ã® Z ipcode (## ###-####) ã§ã¯ã‚ã ‚Šã¾ã›ã‚ “"}}})}(jQ uery),func tion(e){va r t=e.alpa ca;t.regis terView({i d:"base",m essages:{n l_BE:{requ ired:"Dit veld is ve rplicht",i nvalid:"Di t veld is ongeldig", months:["J anuari","F ebruari"," Maart","Ap ril","Mei" ,"Juni","J uly","Augu stus","Sep tember","O ktober","N ovember"," December"] ,timeUnits :{SECOND:" seconden", MINUTE:"mi nuten",HOU R:"uren",D AY:"dagen" ,MONTH:"ma anden",YEA R:"jaren"} ,notOption al:"Dit ve ld is niet optioneel .",disallo wValue:"{0 } zijn | |
| 89 | verboden waarden.", invalidVal ueOfEnum:" Dit veld m oet één van volgen de bevatte n : {0}. [ {1}]",notE noughItems :"Het mini mum aantal elementen is {0}",t ooManyItem s:"Het max imum aanta l elemente n is {0}", valueNotUn ique:"De w aarden zij n uniek",n otAnArray: "Deze waar de is geen lijst",in validDate: "De datum komt niet overeen me t formaat {0}",inval idEmail:"O ngeldig e- mailadres, vb.: info @cloudcms. com",strin gNotAnInte ger:"Deze waarde is geen gehee l getal.", invalidIPv 4:"Ongeldi g IPv4 adr es, vb.: 1 92.168.0.1 ",stringVa lueTooSmal l:"De mini male waard e voor dit veld is { 0}",string ValueTooLa rge:"De ma ximale waa rde voor d it veld is {0}",stri ngValueToo SmallExclu sive:"De w aarde moet groter zi jn dan {0} ",stringVa lueTooLarg eExclusive :"De waard e moet kle iner zijn dan {0}",s tringDivis ibleBy:"De waarde mo et deelbaa r zijn doo r {0}",str ingNotANum ber:"Deze waarde is geen getal .",invalid Password:" Ongeldig w achtwoord" ,invalidPh one:"Ongel dig telefo onnummer, vb: (123) 456-9999", invalidPat tern:"Dit veld moet overeenkom en met pat roon {0}", stringTooS hort:"Dit veld moet minstens { 0} tekens bevatten", stringTooL ong:"Dit v eld moet m inder dan {0} tekens bevatten" }}})}(jQue ry),functi on(e){var t=e.alpaca ;t.registe rView({id: "base",mes sages:{pl_ PL:{requir ed:"To pol e jest wym agane",inv alid:"To p ole jest n ieprawidÅ‚ owe",month s:["Stycze Å„","Luty" ,"Marzec", "KwiecieÅ„ ","Maj","C zerwiec"," Lipiec","S ierpieÅ„", "WrzesieÅ„ ","Paździ ernik","Li stopad","G rudzieÅ„"] ,timeUnits :{SECOND:" sekundy",M INUTE:"min uty",HOUR: "godziny", DAY:"dni", MONTH:"mie siÄ…ce",YE AR:"lata"} ,notOption al:"To pol e nie jest opcjonaln e",disallo wValue:"Ta wartość nie jest dozwolona: {0}",inva lidValueOf Enum:"To p ole powinn o zawieraÄ ‡ jednÄ… z nastÄ™puj Ä…cych war toÅ›ci: {0 }. [{1}]", notEnoughI tems:"Mini malna licz ba element ów wynosi {0}",tooM anyItems:" Maksymalna liczba el ementów w ynosi {0}" ,valueNotU nique:"Te wartoÅ›ci nie sÄ… un ikalne",no tAnArray:" Ta wartoÅ› ć nie jes t tablicÄ… ",invalidD ate:"Niepo prawny for mat daty: {0}",inval idEmail:"N iepoprawny adres ema il, n.p.: info@cloud cms.com",s tringNotAn Integer:"T a wartoÅ›Ä ‡ nie jest liczbÄ… c aÅ‚kowitÄ… ",invalidI Pv4:"Niepo prawny adr es IPv4, n .p.: 192.1 68.0.1",st ringValueT ooSmall:"M inimalna w artość d la tego po la wynosi {0}",strin gValueTooL arge:"Maks ymalna war tość dla tego pola wynosi {0 }",stringV alueTooSma llExclusiv e:"WartoÅ› ć dla teg o pola mus i być wiÄ ™ksza niż {0}",stri ngValueToo LargeExclu sive:"Wart ość dla tego pola musi być mniejsza n iż {0}",s tringDivis ibleBy:"Wa rtość mu si być po dzielna pr zez {0}",s tringNotAN umber:"War tość nie jest licz bÄ…",inval idPassword :"Niepopra wne hasÅ‚o ",invalidP hone:"Niep oprawny nu mer telefo nu, n.p.: (123) 456- 9999",inva lidPattern :"To pole powinno mi eć format {0}",stri ngTooShort :"To pole powinno za wierać co najmniej {0} znakó w",stringT ooLong:"To pole powi nno zawier ać najwyÅ ¼ej {0} zn aków"}}}) }(jQuery), function(e ){var t=e. alpaca;t.r egisterVie w({id:"bas e",message s:{pt_BR:{ required:" Este campo é obriga tório",in valid:"Est e campo é inválido ",months:[ "Janeiro", "Fevereiro ","Março" ,"Abril"," Maio","Jun ho","Julho ","Agosto" ,"Setembro ","Outubro ","Novembr o","Dezemb ro"],timeU nits:{SECO ND:"segund os",MINUTE :"minutos" ,HOUR:"hor as",DAY:"d ias",MONTH :"meses",Y EAR:"anos" },notOptio nal:"Este campo não é opcion al.",disal lowValue:" {0} são v alores pro ibidas.",i nvalidValu eOfEnum:"E ste campo deve ter u m dos segu intes valo res: {0}. [{1}]",not EnoughItem s:"O núme ro mÃnimo de elemen tos é {0} ",tooManyI tems:"O nà ºmero máx imo de ele mentos é {0}",value NotUnique: "Os valore s não sã o únicos" ,notAnArra y:"Este va lor não à © uma list a",invalid Date:"Esta data não tem o for mato {0}", invalidEma il:"Endere ço de ema il inváli da, ex: in fo@cloudcm s.com",str ingNotAnIn teger:"Est e valor nà £o é um n úmero int eiro.",inv alidIPv4:" Endereço IPv4 invá lida, ex: 192.168.0. 1",stringV alueTooSma ll:"O valo r mÃnimo para este campo é { 0}",string ValueTooLa rge:"O val or máximo para este campo é {0}",strin gValueTooS mallExclus ive:"O val or deste c ampo deve ser maior que {0}",s tringValue TooLargeEx clusive:"O valor des te campo d eve ser me nor que {0 }",stringD ivisibleBy :"O valor deve ser d ivisÃvel por {0}",s tringNotAN umber:"Est e valor nà £o é um n úmero.",i nvalidPass word:"Senh a inválid a",invalid Phone:"Nú mero de te lefone inv álido, ex : (123) 45 6-9999",in validPatte rn:"Este c ampo deve ter o padr ão {0}",s tringTooSh ort:"Este campo deve incluir p elo menos {0} caract eres",stri ngTooLong: "Este camp o pode inc luir no mà ¡ximo {0} caracteres "}}})}(jQu ery),funct ion(e){var t=e.alpac a;t.regist erView({id :"base",me ssages:{sv _SE:{requi red:"Fält et är obl igatoriskt ",invalid: "Värdet à ¤r felakti gt",months :["Januari ","Februar i","Mars", "April","M aj","Juni" ,"Juli","A ugusti","S eptember", "Oktober", "November" ,"December "],timeUni ts:{SECOND :"sekunder ",MINUTE:" minuter",H OUR:"timma r",DAY:"da gar",MONTH :"mÃ¥nader ",YEAR:"Ã¥ r"},notOpt ional:"Det ta fält à ¤r obligat oriskt",di sallowValu e:"Dessa v ärden är inte till Ã¥tna: {0} ",invalidV alueOfEnum :"Fältet mÃ¥ste inn ehÃ¥lla et t av följ ande värd en: {0}. [ {1}]",notE noughItems :"Det mins ta tillÃ¥t na antalet element à ¤r {0}",to oManyItems :"Det stö rsta tillà ¥tna antal | |
| 90 | et element är {0}", valueNotUn ique:"Vär dena är i nte unika" ,notAnArra y:"Inte en lista av värden",i nvalidDate :"Felaktig t format f ör datum: {0}",inva lidEmail:" Ogiltig e- postadress ",stringNo tAnInteger :"Värdet är inte e tt heltal" ,invalidIP v4:"Ogilti g IPv4-adr ess",strin gValueTooS mall:"Det minsta til lÃ¥tna vä rdet är { 0}",string ValueTooLa rge:"Det s törsta ti llÃ¥tna và ¤rdet är {0}",strin gValueTooS mallExclus ive:"Värd et mÃ¥ste vara stör re än {0} ",stringVa lueTooLarg eExclusive :"Värdet mÃ¥ste var a mindre à ¤n {0}",st ringDivisi bleBy:"Tal et mÃ¥ste vara delba rt med {0} ",stringNo tANumber:" Värdet ä r inte ett tal",inva lidPasswor d:"Ogiltig t lösenor d",invalid Phone:"Ogi ltigt tele fonnummer" ,invalidPa ttern:"Fä ltet mÃ¥st e vara i f öljande f ormat: {0} ",stringTo oShort:"De tta fält mÃ¥ste inn ehÃ¥lla mi nst {0} te cken",stri ngTooLong: "Detta fä lt fÃ¥r in nehÃ¥lla h ögst {0} tecken"}}} )}(jQuery) ,function( e){var t=e .alpaca;t. registerVi ew({id:"ba se",messag es:{zh_CN: {required: "此& #22495; 4517;Ɔ 35;",inval id:"ઽ 2;域 不&# 21512; 684;",mont hs:["Ç 68;月 ;","ߚ 8;月 ","三 ;月" ,"四 月", "五& #26376;"," 六&# 26376;","& #19971; 6376;","&# 20843; 376;"," 0061;ć 76;"," 313;੍ 6;","Õ 13;一 ;月" ,"十 二&# 26376;"],t imeUnits:{ SECOND:"&# 31186;",MI NUTE:" 998;",HOUR :"时 ",DAY:" 6085;",MON TH:"੍ 6;",YEAR:" 年"} ,notOption al:"ઽ 2;域 非&# 20219;$ 873;",disa llowValue: "非& #27861; 6755;Ð 37;包 ;括 {0}.",inva lidValueOf Enum:" 801;෸ 8;输 入&# 21253; 324; {0}. [{1}]",not EnoughItem s:"最 ;小& #20010; 5968; {0}" ,tooManyIt ems:"ć 68;大 ;个& #25968; {0 }",valueNo tUnique:"& #36755; 0837;Í 40;不 ;独& #29305;",n otAnArray: "不& #26159; 5968;ń 52;",inval idDate:"&# 26085; 399;੬ 4;式 因&# 35813; 159; {0}", invalidEma il:"ߧ 4;妹 儿&# 26684; 335;ߎ 1;对 , ex: info @cloudcms. com",strin gNotAnInte ger:"Ç 81;是 ;整& #25968;.", invalidIPv 4:"不 ;是& #21512; 7861;IP 2320;ß 36;, ex: 1 92.168.0.1 ",stringVa lueTooSmal l:"最 ;小& #20540; 6159; {0}" ,stringVal ueTooLarge :"最 大&# 20540; 159; {0}", stringValu eTooSmallE xclusive:" 值&# 24517;' 035;࣪ 3;于 {0}",stri ngValueToo LargeExclu sive:" 540;ও 7;须 小&# 20110; {0} ",stringDi visibleBy: "值& #24517; 9035;Ŋ 21;被 ; {0}  972;༊ 0;",string NotANumber :"不 是&# 25968; 383;.",inv alidPasswo rd:"༣ 0;法 密&# 30721;",in validPhone :"非 法&# 30005;# 805;ࡥ 5;码 , ex: (123 ) 456-9999 ",invalidP attern:"&# 27492; 495;༿ 5;有 格&# 24335; {0} ",stringTo oShort:"&# 27492; 495;೾ 7;少 长&# 24230; {0} ",stringTo oLong:" 7492;à 95;最 ;多& #38271; 4230; {0}" }}})}(jQue ry),functi on(e){var t=e.alpaca ,n={};n.fi eld=functi on(){},n.c ontrol=fun ction(){}, n.containe r=function (){},n.for m=function (){},n.req uired=func tion(){},n .optional= function() {},n.reado nly=functi on(){},n.d isabled=fu nction(){} ,n.enabled =function( ){},n.clea rValidity= function() {},n.inval id=functio n(e){},n.v alid=funct ion(){},n. addMessage =function( e,t,n,i){} ,n.removeM essages=fu nction(){} ,n.enableB utton=func tion(e){}, n.disableB utton=func tion(e){}, n.arrayToo lbar=funct ion(n){var i=this;if (n){var a= e(i.getFie ldEl()).fi nd(".alpac a-array-to olbar[data -alpaca-ar ray-toolba r-field-id ='"+i.getI d()+"']"); if(a.lengt h>0){var r =e("<div c lass='"+t. MARKER_CLA SS_ARRAY_T OOLBAR+"' "+t.MARKER _DATA_ARRA Y_TOOLBAR_ FIELD_ID+" ='"+i.getI d()+"'></d iv>");a.be fore(r),a. remove()}} else{var r =e(i.getCo ntainerEl( )).find(". "+t.MARKER _CLASS_ARR AY_TOOLBAR +"["+t.MAR KER_DATA_A RRAY_TOOLB AR_FIELD_I D+"='"+i.g etId()+"'] ");if(r.le ngth>0){va r o=i.view .getTempla teDescript or("contai ner-array- toolbar",i );if(o){va r l=t.tmpl (o,{action s:i.toolba r.actions, id:i.getId (),toolbar Style:i.op tions.tool barStyle,v iew:i.view });e(r).be fore(l),e( r).remove( )}}}},n.ar rayActionb ars=functi on(n){for( var i=this ,a=0;a<i.c hildren.le ngth;a++){ var r=i.ch ildren[a], o=r.getId( );if(n){va r l=e(i.ge tFieldEl() ).find(".a lpaca-arra y-actionba r[data-alp aca-array- actionbar- field-id=' "+o+"']"); if(l.lengt h>0){var s =e("<div c lass='"+t. MARKER_CLA SS_ARRAY_I TEM_ACTION BAR+"' "+t .MARKER_DA TA_ARRAY_I TEM_KEY+"= '"+r.name+ "'></div>" );l.before (s),l.remo ve()}}else {var s=e(i .getFieldE l()).find( "."+t.MARK ER_CLASS_A RRAY_ITEM_ ACTIONBAR+ "["+t.MARK ER_DATA_AR RAY_ITEM_K EY+"='"+r. name+"']") ;if(s.leng th>0){var u=i.view.g etTemplate Descriptor ("containe r-array-ac tionbar",i );if(u){va r c=t.tmpl (u,{action s:i.action bar.action s,name:r.n ame,parent FieldId:i. getId(),fi eldId:r.ge tId(),item Index:a,ac tionbarSty le:i.optio ns.actionb arStyle,vi ew:i.view} );e(s).bef ore(c),e(s ).remove() }}}}},n.au tocomplete =function( ){};var i= {};i.butto n="",i.sma llButton=" ",i.addIco n="",i.rem oveIcon="" ,i.upIcon= "",i.downI con="",i.e xpandedIco n="",i.col lapsedIcon ="",i.tabl e="",t.reg isterView( {id:"web-d isplay",pa rent:"base ",type:"di splay",ui: "web",titl e:"Default HTML5 dis play view" ,displayRe adonly:!0, templates: {},callbac ks:n,style | |
| 91 | s:i,horizo ntal:!1}), t.register View({id:" web-displa y-horizont al",parent :"web-disp lay",horiz ontal:!0}) ,t.registe rView({id: "web-edit" ,parent:"b ase",type: "edit",ui: "web",titl e:"Default HTML5 edi t view",di splayReado nly:!0,tem plates:{}, callbacks: n,styles:i ,horizonta l:!1}),t.r egisterVie w({id:"web -edit-hori zontal",pa rent:"web- edit",hori zontal:!0} ),t.regist erView({id :"web-crea te",parent :"web-edit ",type:"cr eate",titl e:"Default HTML5 cre ate view", displayRea donly:!1,t emplates:{ },horizont al:!1}),t. registerVi ew({id:"we b-create-h orizontal" ,parent:"w eb-create" ,horizonta l:!0})}(jQ uery),func tion(e){va r t=e.alpa ca,n={};n. button="bt n btn-defa ult",n.sma llButton=" btn btn-de fault btn- sm",n.addI con="glyph icon glyph icon-plus- sign",n.re moveIcon=" glyphicon glyphicon- minus-sign ",n.upIcon ="glyphico n glyphico n-chevron- up",n.down Icon="glyp hicon glyp hicon-chev ron-down", n.expanded Icon="glyp hicon glyp hicon-circ le-arrow-d own",n.col lapsedIcon ="glyphico n glyphico n-circle-a rrow-right ",n.table= "table tab le-striped table-bor dered tabl e-hover";v ar i={};i. required=f unction(){ var t=this .getFieldE l(),n=e(t) .find("lab el.alpaca- control-la bel");e('< span class ="alpaca-i con-requir ed glyphic on glyphic on-star">< /span>').p rependTo(n )},i.inval id=functio n(){this.i sControlFi eld&&e(thi s.getField El()).addC lass("has- error")},i .valid=fun ction(){e( this.getFi eldEl()).r emoveClass ("has-erro r")},i.con trol=funct ion(){var t=this.get FieldEl(), n=this.get ControlEl( );if(e(t). find("inpu t").addCla ss("form-c ontrol"),e (t).find(" textarea") .addClass( "form-cont rol"),e(t) .find("sel ect").addC lass("form -control") ,e(t).find ("input[ty pe=checkbo x]").remov eClass("fo rm-control "),e(t).fi nd("input[ type=file] ").removeC lass("form -control") ,e(t).find ("input[ty pe=radio]" ).removeCl ass("form- control"), "color"=== this.input Type&&e(t) .find("inp ut").remov eClass("fo rm-control "),e(t).fi nd("input[ type=check box]").par ent().pare nt().addCl ass("check box"),e(t) .find("inp ut[type=ra dio]").par ent().pare nt().addCl ass("radio "),e(t).pa rents("for m").hasCla ss("form-i nline")&&( e(t).find( "input[typ e=checkbox ]").parent ().addClas s("checkbo x-inline") ,e(t).find ("input[ty pe=radio]" ).parent() .addClass( "radio-inl ine")),e(t ).find("la bel.alpaca -control-l abel").add Class("con trol-label "),this.vi ew.horizon tal){e(t). find("labe l.alpaca-c ontrol-lab el").addCl ass("col-s m-3");var i=e("<div> </div>");i .addClass( "col-sm-9" ),e(n).aft er(i),i.ap pend(n),e( t).append( "<div styl e='clear:b oth;'></di v>")}},i.c ontainer=f unction(){ var t=this .getContai nerEl();th is.view.ho rizontal&& e(t).addCl ass("form- horizontal ")},i.form =function( ){this.get FormEl()}, i.enableBu tton=funct ion(t){e(t ).removeAt tr("disabl ed")},i.di sableButto n=function (t){e(t).a ttr("disab led","disa bled")},i. collapsibl e=function (){var n=t his.getFie ldEl(),i=e (n).find(" legend").f irst(),a=e ("[data-to ggle='coll apse']",i) ;if(e(a).l ength>0){v ar r=this. getContain erEl(),o=e (r).attr(" id");o||(o =t.generat eId(),e(r) .attr("id" ,o)),e(r). addClass(" collapse i n"), | |
| 92 | e(a).attr( "data-targ et")||e(a) .attr("dat a-target", "#"+o),e(a ).mouseove r(function (t){e(this ).css("cur sor","poin ter")})}}, i.tableHea derRequire d=function (t,n,i){e( '<span cla ss="alpaca -icon-requ ired glyph icon glyph icon-star" ></span>') .prependTo (i)},i.tab leHeaderOp tional=fun ction(e,t, n){},t.reg isterView( {id:"boots trap-displ ay",parent :"web-disp lay",type: "display", ui:"bootst rap",title :"Display View for B ootstrap 3 ",displayR eadonly:!0 ,callbacks :i,styles: n,template s:{}}),t.r egisterVie w({id:"boo tstrap-dis play-horiz ontal",par ent:"boots trap-displ ay",horizo ntal:!0}), t.register View({id:" bootstrap- edit",pare nt:"web-ed it",type:" edit",ui:" bootstrap" ,title:"Ed it View fo r Bootstra p 3",displ ayReadonly :!0,callba cks:i,styl es:n,templ ates:{}}), t.register View({id:" bootstrap- edit-horiz ontal",par ent:"boots trap-edit" ,horizonta l:!0}),t.r egisterVie w({id:"boo tstrap-cre ate",paren t:"bootstr ap-edit",t itle:"Crea te View fo r Bootstra p 3",type: "create",d isplayRead only:!1}), t.register View({id:" bootstrap- create-hor izontal",p arent:"boo tstrap-cre ate",horiz ontal:!0}) }(jQuery), Alpaca.def aultView=" bootstrap" ,Alpaca}); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.