!function(){window.WAPEDITOR={templates:[],modules:[{id:"header",name:"微页面标题",issystem:!0,params:{title:"微页面标题",description:"",pageHeight:568,thumb:"",bgColor:"",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"UCheader",name:"会员主页",issystem:!0,params:{title:"会员主页",cover:"",bgImage:""}},{id:"userCard",name:"会员卡",issystem:!0,params:{title:"会员卡",cover:"",bgImage:"",fields:[]}},{id:"cardBasic",name:"会员卡基本设置",issystem:!0,params:{title:"会员卡",color:{title:"#333",rank:"#333",name:"#333",number:"#333"},description:"1、本卡采取记名消费方式\n2、持卡人可享受会员专属优惠\n3、本卡不能与其他优惠活动同时使用\n4、持卡人可用卡内余额进行消费",background:{type:"system",image:util.tomedia("images/global/card/6.png")},logo:util.tomedia("http://www.baidu.com/img/bdlogo.gif"),format_type:1,format:"WQ2015*****#####***",fields:[{title:"姓名",require:1,bind:"realname"},{title:"手机",require:1,bind:"mobile"}],grant:{credit1:0,credit2:0,coupon:[]},grant_rate:0,offset_rate:0,offset_max:0}},{id:"cardActivity",name:"消费优惠设置",issystem:!0,params:{discount_type:0,discount_style:1,discounts:[],content:"",bgColor:""}},{id:"cardNums",name:"会员卡次数设置",issystem:!0,params:{nums_status:0,nums_style:1,nums_text:"可用次数",nums:[{recharge:100,num:5},{recharge:200,num:10}]}},{id:"cardTimes",name:"会员卡计时设置",issystem:!0,params:{times_status:0,times_style:1,times_text:"截至日期",times:[{recharge:100,time:5},{recharge:200,time:10}]}},{id:"cardRecharge",name:"充值优惠设置",issystem:!0,params:{recharge_type:0,recharge_style:1,recharges:[{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"}],content:"",bgColor:""}},{id:"onlyText",name:"文字",isbase:!0,params:{title:"请输入文字",textalign:"left",posactive:"left",postype:"left",baseStyle:{lineheight:2},borderStyle:{},shadowStyle:{},positionStyle:{margintop:0}}},{id:"image",name:"图片",isbase:!0,params:{items:{id:"",imgurl:""},textalign:"left",posactive:"left",postype:"left",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"shape",name:"形状",isbase:!0,params:{svgValue:"",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{width:100}}},{id:"pureLink",name:"链接",isbase:!0,params:{items:[{id:"1",type:"text",title:"点我购买",url:"",color:"#fff",editcolor:"danger",discolor:"#d9534f",active:1},{id:"2",type:"text",title:"点开链接",url:"",color:"#fff",editcolor:"warning",discolor:"#ec971f",active:0},{id:"3",type:"text",title:"马上购买",url:"",color:"#fff",editcolor:"success",discolor:"#449d44",active:0},{id:"4",type:"text",title:"关注我们",url:"",color:"#000",editcolor:"default",discolor:"#fff",active:0},{id:"5",type:"img",title:"自定义",url:"",imgurl:"",editcolor:"primary",discolor:"",active:0}],textalign:"center",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"dial",name:"拨号",isbase:!0,params:{items:[{id:"1",type:"text",title:"一键拨号",tel:"",color:"#fff",editcolor:"danger",discolor:"#d9534f",active:1},{id:"2",type:"text",title:"热线电话",tel:"",color:"#fff",editcolor:"warning",discolor:"#ec971f",active:0},{id:"3",type:"text",title:"拨打电话",tel:"",color:"#fff",editcolor:"success",discolor:"#449d44",active:0},{id:"4",type:"text",title:"销售专线",tel:"",color:"#000",editcolor:"default",discolor:"#fff",active:0},{id:"5",type:"img",title:"自定义",tel:"",imgurl:"",editcolor:"primary",discolor:"",active:0}],textalign:"center",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"good",name:"点赞",isbase:!0,params:{bgcolor:"#d15d82",color:"#fff",layoutstyle:1,layoutactive:"lr",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"countDown",name:"倒计时",isbase:!0,params:{deadtime:"",textalign:"center",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"richText",name:"富文本",params:{bgColor:"",content:"",isfull:!1,baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"adImg",name:"幻灯片",params:{listStyle:1,sizeType:1,items:[],baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"cube",name:"图片魔方",params:{layout:{},showIndex:0,selection:{},currentPos:{},currentLayout:{isempty:!0},baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"title",name:"标题",params:{title:"",template:1,tradition:{subtitle:"",align:"left",bgcolor:"",nav:{title:"",url:"",enable:0}},news:{date:"",author:"",title:"",urlType:1,url:""},baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"textNav",name:"文本导航",params:{items:[],baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"navImg",name:"图片导航",params:{items:[{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""}],baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"link",name:"关联链接",params:{items:[],baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"line",name:"辅助线",params:{baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"white",name:"辅助空白",params:{height:1,baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"audio",name:"语音",params:{style:"1",headimg:"",align:"left",title:"",isloop:!1,reload:"false",audio:{id:"",url:""},baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}},{id:"notice",name:"公告",params:{notice:"",baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{}}}]}}(),define(["angular.sanitize","jquery.ui","underscore","fileUploader","datetimepicker"],function(a,b,c,e){!function(){var d=window.WAPEDITOR.modules||{},e=a.module("app",["ngSanitize"]);e.controller("commonCtrl",["$scope","$sanitize",function(e,f){e.modules=[],e.editors=[],e.activeModules=window.activeModules?window.activeModules:[],e.activeItem={},e.activeIndex=0,e.index=window.activeModules?window.activeModules.length:0,e.pageLength=1,e.common={speed:1,delay:.6},e.submit={params:{},html:""};for(var g in e.activeModules)console.log(e.activeModules[g]),e.activeModules[g].params.baseStyle instanceof Array&&(e.activeModules[g].params.baseStyle={}),e.activeModules[g].params.borderStyle instanceof Array&&(e.activeModules[g].params.borderStyle={}),e.activeModules[g].params.shadowStyle instanceof Array&&(e.activeModules[g].params.shadowStyle={}),e.activeModules[g].params.positionStyle instanceof Array&&(e.activeModules[g].params.positionStyle={});e.addItem=function(d){a.forEach(e.modules,function(f,g){if(f.id==d){for(-1==b.inArray(d,e.editors)&&e.editors.push(f.id);0!=b("#module-"+e.index).size();)e.index++;return e.activeModules.push({id:f.id,name:f.name,params:a.copy(f.params),issystem:f.issystem?1:0,index:e.index,displayorder:f.displayorder?f.displayorder:e.activeModules.length}),e.activeIndex=c.findIndex(e.activeModules,{index:parseInt(e.index)}),e.activeItem=e.activeModules[e.activeIndex],e.triggerActiveItem(e.activeIndex),void e.index++}}),setTimeout(function(){var a=0;b(".modules").children().each(function(c){a+=b(this).innerHeight()}),a+=6,a>568&&(e.activeModules[0].params.pageHeight=a),e.$apply()},100),b(".modules").sortable({update:function(a,b){e.updateSort(a,b)},start:function(a,b){e.startSort(b.item)},items:".js-sorttable"})},e.triggerActiveItem=function(a){if(b("#module-"+e.activeModules[a].index).size()&&b("#editor"+e.activeModules[a].id).size()){clearTimeout(e.timer);var c=b(".app-preview .app-content").offset().top?b(".app-preview .app-content").offset().top:200,d=b("#module-"+e.activeModules[a].index).offset().top-c;b("#editor"+e.activeModules[a].id).css("marginTop",d),b("html,body").animate({scrollTop:d},500)}else e.timer=setTimeout(function(){e.triggerActiveItem(e.activeIndex)},50)},e.editItem=function(a){var a=c.findIndex(e.activeModules,{index:parseInt(a)});a>-1&&(e.activeIndex=a,e.activeItem=e.activeModules[a]),-1==b.inArray(e.activeItem.id,e.editors)&&e.editors.push(e.activeItem.id),e.triggerActiveItem(a)},e.deleteItem=function(a){if(confirm("删除后需要重新提交才会生效,确认吗?")){var a=c.findIndex(e.activeModules,{index:parseInt(a)});b("#module-"+a).prev().attr("index");e.activeModules=c.without(e.activeModules,e.activeModules[a]),e.activeItem={}}setTimeout(function(){var a=0;b(".modules").children().each(function(c){a+=b(this).innerHeight()}),a+=6,568>a?e.activeModules[0].params.pageHeight=568:e.activeModules[0].params.pageHeight=a,e.$apply()},100)},e.submit=function(d){function f(a,b){var c="<?php $"+a+" = modulefunc('widget', 'site_widget_"+a+"', array( 'func' => 'site_widget_"+a+"', 'params' => '"+JSON.stringify(b)+"', 'uniacid' => '"+window.sysinfo.uniacid+"', 'acid' => '"+window.sysinfo.acid+"',)); if(is_array($"+a+")) { $i=0; foreach($"+a+" as $i => $row) { $i++; $row['iteration'] = $i; ?>";return c}function g(){var a="<?php }} ?>";return a}function h(a){for(var b in a)"$$hashKey"==b?delete a[b]:"object"==typeof a[b]&&h(a[b])}var i="",j=b(b(".modules").html());j.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var d=c.findIndex(e.activeModules,{index:parseInt(b(this).parent().parent().attr("index"))}),h=b(this).find("div[class^='app-']").get(0),j=b(h).attr("style");e.activeModules[d].params.animate=e.activeModules[d].params.animateTemp,j+="-webkit-animation:"+e.activeModules[d].params.animate+";-moz-animation:"+e.activeModules[d].params.animate+";-o-animation:"+e.activeModules[d].params.animate+";",b(h).attr("style",j);var k="",l=a.copy(e.activeModules[d].params);b(this).find(".js-default-content").remove();var m=b(this).parent().parent().attr("name").toLowerCase();if("link"==m){var n=this;a.forEach(l.items,function(a,c){(a.selectCate.pid||a.selectCate.cid)&&b(n).find(".list-group").children().eq(c).replaceWith("
")}),k=b(this).html()}else"richtext"==m?(e.activeModules[d]&&(e.activeModules[d].params.content=""),k=b(this).html()):k=b(this).html();if("header"!=m){var o=b(this).attr("style");i+=''+k+"
"}d++});var k=e.activeModules[0].params.bgColor;i=''+i+"
",i=i.replace(/<\!\-\-([^-]*?)\-\->/g,""),i=i.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),i=i.replace(/ ng\-[a-zA-Z]+/g,""),e.submit.html=i,e.submit.params=a.copy(e.activeModules),h(e.submit.params),e.$apply("submit"),b(d.target).parents("form").submit()},e.updateSort=function(a,d){b(".modules").children().each(function(){var a=c.findIndex(e.activeModules,{index:parseInt(b(this).attr("index"))});e.activeModules[a].displayorder=b(this).index(),e.activeModules[a].params.animate&&(e.activeModules[a].params.animateTemp=e.activeModules[a].params.animate,e.activeModules[a].params.animate="")}),e.activeIndex=c.findIndex(e.activeModules,{index:parseInt(d.item.attr("index"))}),e.$apply()},e.startSort=function(a){var b=c.findIndex(e.activeModules,{index:parseInt(a.attr("index"))});e.activeModules[b].params.animate&&(e.activeModules[b].params.animateTemp=e.activeModules[b].params.animate,e.activeModules[b].params.animate="")},e.init=function(f,h){if(c.isNull(f)&&(e.modules=d),c.isArray(f))for(g in f){var i,j=c.findIndex(d,{id:f[g]});j>-1&&(i=a.copy(d[j]),e.modules.push(i))}if(c.isArray(h))for(g in h){var j=c.findIndex(e.modules,{id:h[g]});j>-1&&(e.modules[j].defaultshow=!0)}if(e.activeModules.length>0){var k=[];a.forEach(e.activeModules,function(a,b){a&&k.push(a.id)})}a.forEach(e.modules,function(a,c){a.defaultshow&&-1==b.inArray(a.id,k)&&e.addItem(a.id)})},e.tomedia=function(a){return window.sysinfo.attachurl+a},e.url=function(a){a=a.split("/");var b="./index.php?i="+window.sysinfo.uniacid+"&j="+window.sysinfo.acid+"&c="+a[0];return a[1]&&(b+="&a="+a[1]),a[2]&&(b+="&do="+a[2]),b},e.eleAnimationIns=function(a,c){"noEffect"!=a?e.activeItem.params.animate=e.activeItem.params.animateTemp=a+" "+e.common.speed+"s ease "+e.common.delay+"s both running":e.activeItem.params.animate=e.activeItem.params.animateTemp="",b(c.currentTarget).addClass("select"),b(c.currentTarget).siblings(".icon-container").removeClass("select")},e.changeLineHeight=function(a){var a=parseFloat(a);e.activeItem.params.baseStyle.lineheight=a},e.changeFontSize=function(a){var a=parseInt(a);e.activeItem.params.baseStyle.fontsize=a},e.changePageLength=function(a){var a=parseInt(a);e.pageLength=a,b(".app-content").css("height",568*a+"px")},b(".js-editor-submit").click(function(a){e.submit(a)}),b(".modules").sortable({update:function(a,b){e.updateSort(a,b)},start:function(a,b){e.startSort(b.item)},items:".js-sorttable"}),b(".modules").disableSelection(),setInterval(function(){var a=0;b(".modules").children().each(function(c){a+=b(this).innerHeight()}),a+=6,568>a?e.activeModules[0].params.pageHeight=568:e.activeModules[0].params.pageHeight=a,e.$apply()},100)}]),window.wapeditor=e}(),function(f){f.controller("adImgCtrl",["$scope",function(a){a.addItem=function(){e.show(function(c){a.activeItem.params.listNumb++,console.log(a.activeItem.params.listNumb),a.activeItem.params.items.push({id:c.id,imgurl:c.url,width:c.width,height:c.height,title:"",url:"",isactive:!1}),b.each(a.activeItem.params.items,function(b,c){a.activeItem.params.items[0].isactive=0==b}),a.resetPosition(),a.$apply("activeItem")},{direct:!0,multiple:!1})},a.removeItem=function(d){a.activeItem.params.listNumb--,console.log(a.activeItem.params.listNumb),index=b.inArray(d,a.activeItem.params.items),items=c.clone(a.activeItem.params.items),a.activeItem.params.items=[];for(i in items)i!=index&&a.activeItem.params.items.push(items[i]);a.resetPosition()},a.addEmpty=function(){a.activeItem.params.listNumb++,console.log(a.activeItem.params.listNumb),a.activeItem.params.items.push({imgurl:"",title:"",url:""})},a.changeItem=function(c){e.init(function(d){var e=b.inArray(c,a.activeItem.params.items);e>-1&&(a.activeItem.params.items[e].id=d.id,a.activeItem.params.items[e].imgurl=d.url,a.activeItem.params.items[e].width=d.width,a.activeItem.params.items[e].height=d.height,a.resetPosition(),a.$apply())},{direct:!0,multiple:!1})},a.resetPosition=function(){var c=0,d=0;b.each(a.activeItem.params.items,function(a,b){c=b.width>c?b.width:c,d=b.height>d?b.height:d}),c&&d&&(a.saveModulePosition(),a.activeItem.params.positionStyle.width=2*c,a.activeItem.params.positionStyle.height=2*d,a.setModulePositionStyle(a.activeItem.params.positionStyle))}}]),f.controller("audioCtrl",["$scope",function(a){a.addAudioItem=function(){e.init(function(c){c&&(a.activeItem.params.audio.id=c.id,a.activeItem.params.audio.url=c.attachment,a.$apply(),b(".audio-player-play").click(function(){var c=a.activeItem.params.audio.url;if(c){b("#player").remove();var d=b('');b(document.body).append(d),d.data("control",b(this)),d.jPlayer({playing:function(){b(this).data("control").find("i").removeClass("fa-play").addClass("fa-stop")},pause:function(a){b(this).data("control").find("i").removeClass("fa-stop").addClass("fa-play")},swfPath:"resource/components/jplayer",supplied:"mp3,wma,wav,amr",solution:"html, flash"}),d.jPlayer("setMedia",{mp3:c}).jPlayer("play"),b(this).find("i").hasClass("fa-stop")?d.jPlayer("stop"):d.jPlayer("setMedia",{mp3:c}).jPlayer("play")}}).show())},{direct:!0,multiple:!1,type:"audio"})},a.addImgItem=function(){e.init(function(b){a.activeItem.params.headimg=b.url,a.$apply()},{direct:!0,multiple:!1})}}]),f.controller("cardActivityCtrl",["$scope",function(a){a.$watch("activeItem.params.grant_rate",function(b,c){b+="",b.match(/^([1-9]\d*(\.(\d)?)?|0(\.(\d)?)?)?$/)?a.activeItem.params.grant_rate=b:a.activeItem.params.grant_rate=c})}]),f.controller("cardBasicCtrl",["$scope",function(a){a.creditnames=creditnames}]),f.controller("cardNumsCtrl",["$scope",function(a){}]),f.controller("cardRechargeCtrl",["$scope",function(a){}]),f.controller("cardTimesCtrl",["$scope",function(a){}]),f.controller("componentCtrl",["$scope",function(a){}]),f.controller("countDownCtrl",["$scope","$timeout",function(a,b){a.$watch("activeItem.params.deadtime",function(b,e){if(a.activeItem.params.leftTimeText={days:0,hour:0,min:0,sec:0},b&&"undefined"!=typeof b&&0!=b){var f=b.replace(/:/g,"-");f=f.replace(/ /g,"-");var g=f.split("-");dtime=new Date(Date.UTC(g[0],g[1]-1,g[2],g[3]-8,g[4],g[5])),dtime=parseInt(dtime.getTime()),d=new Date(dtime)}else{var h=2592e6,i=Date.parse(new Date);dtime=parseInt(h+i),d=new Date(dtime)}a.activeItem.params.deadtime=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds(),c()});var c=function(){var d=Date.parse(new Date),e=dtime-d>0?dtime-d:0;a.activeItem.params.leftTimeText.days=parseInt(e/864e5),a.activeItem.params.leftTimeText.hour=parseInt(e/36e5%24),a.activeItem.params.leftTimeText.min=parseInt(e/6e4%60),a.activeItem.params.leftTimeText.sec=parseInt(e/1e3%60),b(c,1e3)}}]),f.controller("cubeCtrl",["$scope",function(a){if(a.activeItem.params&&a.activeItem.params.layout&&c.isEmpty(a.activeItem.params.layout))for(row=0;row<4;row++)for(a.activeItem.params.layout[row]={},col=0;col<4;col++)a.activeItem.params.layout[row][col]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""};b(".layout-table").bind("mouseover",function(a){if("LI"==a.target.tagName){b(".layout-table li").removeClass("selected");var c=b(a.target).attr("data-rows"),d=b(a.target).attr("data-cols");b(".layout-table li").filter(function(a,e){return b(e).attr("data-rows")<=c&&b(e).attr("data-cols")<=d}).addClass("selected")}}),a.activeItem.params.currentLayout={},a.showSelection=function(d,e){a.activeItem.params.currentPos={row:d,col:e},a.activeItem.params.selection={};var f=-1,g=1;for(i=d;i<4;i++){for(y=1,a.activeItem.params.selection[g]={},j=e;j<4;j++)f>=0&&fb;b++)for(var d=0;4>d;d++)if(!c.isEmpty(a.activeItem.params.layout[b][d])&&a.activeItem.params.currentLayout.classname==a.activeItem.params.layout[b][d].classname){if(a.activeItem.params.currentLayout.rows>1)for(var e=0;e1)for(var g=0;g1)for(var g=0;g/g,""),f=f.replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),f=f.replace(/ng\-[a-zA-Z]+/g,""),f=f.replace(/[\t\n\n\r]/g,""),d.submit.html=f,d.$apply("submit"),b(c.target).parents("form").submit()},d.removeMenu=function(c){index=b.inArray(c,d.activeItem.menus),items=a.copy(d.activeItem.menus),d.activeItem.menus=[];for(i in items)i!=index&&d.activeItem.menus.push(items[i])},d.removeSubMenu=function(a,b){d.activeItem.menus[a].submenus=c.without(d.activeItem.menus[a].submenus,b)},d.showSearchModules=function(){d.moduleDialog=b("#shop-modules-modal").modal(),b("#shop-modules-modal .modal-body .btn-primary").html("取消"),b("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function(){d.activeItem.ignoreModules={},b("#shop-modules-modal .modal-body .btn-primary").each(function(){d.hasIgnoreModules=!0,d.activeItem.ignoreModules[b(this).attr("js-name")]={name:b(this).attr("js-name"),title:b(this).attr("js-title")}}),d.$apply("activeItem"),d.$apply("hasIgnoreModules")})},b(".js-editor-submit").click(function(a){d.submit(a)}),d.hasIgnoreModules=c.size(d.activeItem.ignoreModules),b(".nav-menu").show(),b(".app-shopNav-edit").show()}]),f.controller("rewardCtrl",["$scope",function(a){a.changeSize=function(b){switch(a.activeItem.params.fontactive=b,a.activeItem.params.fonttype=b,b){case"big":a.activeItem.params.fontsize="36px";break;case"middle":a.activeItem.params.fontsize="26px";break;case"small":a.activeItem.params.fontsize="16px"}}}]),f.controller("richTextCtrl",["$scope","$sce",function(a,b){a.trustAsHtml=function(a,c){return!a&&c&&(a=c.replace(/\#quot;/g,""")),b.trustAsHtml(a)}}]),f.controller("shapeCtrl",["$scope","$http",function(a,c){a.page={currentPage:1,numPages:1,toPage:"",totalItems:0,pageSize:18},a.addItem=function(){c({method:"GET",url:window.sysinfo.siteroot+"web/resource/images/app/shape/shape.json",cache:!0}).success(function(c){a.sysCategoryList=c.sysCategoryList,a.sysImageTag=c.sysImageTag,a.sysImageList=c.sysImageList,a.activeItem.params.catlistActive=1,a.activeItem.params.imgListActive=4,a.page.numPages=d(),a.pages=f(),e(1),a.currentImageList=h(a.activeItem.params.imgListActive,1),b("#shapeModal").modal("show")})},a.getSysCatAndList=function(c){var g=b.inArray(c,a.sysCategoryList);for(var i in a.sysCategoryList)if(i==g){a.sysCategoryList[i].active=!0,a.activeItem.params.catlistActive=a.sysCategoryList[i].id;var j=1;for(var k in a.sysImageTag)a.sysImageTag[k].parentid==a.sysCategoryList[i].id&&1==j?(a.activeItem.params.imgListActive=a.sysImageTag[k].id,a.sysImageTag[k].active=!0,a.page.numPages=d(),a.pages=f(),e(1),a.currentImageList=h(a.activeItem.params.imgListActive,1),j++):a.sysImageTag[k].active=!1}else a.sysCategoryList[i].active=!1},a.getSysImgByTag=function(c){var g=b.inArray(c,a.sysImageTag);for(var i in a.sysImageTag)i==g?(a.sysImageTag[i].active=!0,a.activeItem.params.imgListActive=a.sysImageTag[i].id,a.page.numPages=d(),a.pages=f(),e(1),a.currentImageList=h(a.activeItem.params.imgListActive,1)):a.sysImageTag[i].active=!1},a.selectSvg=function(d,e){var f=d.target.dataset.url;f=f.split("../"),c({method:"GET",url:window.sysinfo.siteroot+f[1]}).success(function(c){for(var d,e=b(c),f=e.length,g=0;f>g;g++)if("svg"==e[g].tagName){d=e[g];break}var h=parseFloat(b(d).attr("width")),i=parseFloat(b(d).attr("height"));h>=i?(a.activeItem.params.width=50*h/i,a.activeItem.params.height="50"):(a.activeItem.params.width="50",a.activeItem.params.height=50*i/h),a.activeItem.params.svgValue=c,b("#shapeModal").modal("hide")})},a.selectPage=function(b){var b=parseInt(b);b>0&&b<=a.page.numPages&&(a.page.currentPage=b,a.pages=f(),e(b),a.currentImageList=h(a.activeItem.params.imgListActive,b))},a.getImgByPage=function(){var b=parseInt(a.page.toPage);b>0&&b<=a.page.numPages&&(a.page.currentPage=b,a.pages=f(),e(b),a.currentImageList=h(a.activeItem.params.imgListActive,b))};var d=function(){var b=g(a.activeItem.params.imgListActive),c=Math.ceil(b/a.page.pageSize);return c},e=function(b){for(var c in a.pages)b==a.pages[c].number?a.pages[c].active=!0:a.pages[c].active=!1},f=function(){var b=[];if(a.page.numPages<=5)for(var c=1;c<=a.page.numPages;c++)a.page.currentPage==c?b.push({number:c,active:!0}):b.push({number:c,active:!1});else{var d=a.page.currentPage-2,e=a.page.currentPage+2;if(d>0)if(e<=a.page.numPages)b=[{number:d,active:!1},{number:a.page.currentPage-1,active:!1},{number:a.page.currentPage,active:!0},{number:a.page.currentPage+1,active:!1},{number:e,active:!1}];else{var c=a.page.numPages-4;for(c;c<=a.page.numPages;c++)c==a.page.currentPage?b.push({number:c,active:!0}):b.push({number:c,active:!1})}else for(var c=1;5>=c;c++)a.page.currentPage==c?b.push({number:c,active:!0}):b.push({number:c,active:!1})}return b},g=function(b){var c=0;for(var d in a.sysImageList)b==a.sysImageList[d].parentid&&c++;return c},h=function(b,c){var d=[],e=0,c=parseInt(c)>0?parseInt(c):1,f=(c-1)*a.page.pageSize,g=c*a.page.pageSize;for(var h in a.sysImageList)b==a.sysImageList[h].parentid&&(e>=f&&g>e&&d.push(a.sysImageList[h]),e++);return d}}]),f.controller("textNavCtrl",["$scope",function(a){a.addItem=function(){a.activeItem.params.items.push({title:"",url:""})},a.removeItem=function(d){index=b.inArray(d,a.activeItem.params.items),items=c.clone(a.activeItem.params.items),a.activeItem.params.items=[];for(i in items)i!=index&&a.activeItem.params.items.push(items[i])}}]),f.controller("titleCtrl",["$scope",function(a){a.changeNavEnable=function(b){a.activeItem.params.tradition.nav.enable=b}}]),f.controller("userCardCtrl",["$scope",function(d){d.init(null,["cardBasic","cardActivity","cardNums","cardTimes","cardRecharge"]),d.activeModules[1].params.discounts=discounts,d.newcard=window.newcard,d.addFields=function(){d.activeItem.params.fields.push({title:"",require:1,bind:"",issystem:0})},d.removeFields=function(a){return"mobile"==a.bind||"realname"==a.bind?!1:(d.activeItem.params.fields=c.without(d.activeItem.params.fields,a),!1)},d.addNums=function(){d.activeItem.params.nums.push({recharge:"",num:""})},d.removeNums=function(a){return d.activeItem.params.nums=c.without(d.activeItem.params.nums,a),!1},d.addRecharges=function(){d.activeItem.params.recharges.push({condition:"",back:"",backtype:"0",backunit:"元"})},d.removeRecharges=function(a){return d.activeItem.params.recharges=c.without(d.activeItem.params.recharges,a),!1},d.addTimes=function(){d.activeItem.params.times.push({recharge:"",time:""})},d.removeTimes=function(a){return d.activeItem.params.times=c.without(d.activeItem.params.times,a),!1},d.selectCoupon=function(){util.coupon(function(b){d.activeItem.params.grant.coupon=[],a.forEach(b,function(a){d.activeItem.params.grant.coupon.push({couponTitle:a.title,coupon:a.id})}),d.$apply("activeItem")},{multiple:!0})},d.addThumb=function(a){e.show(function(b){d.activeItem.params[a]=b.url,d.$apply("activeItem")},{direct:!0,multiple:!1})},d.addBgThumb=function(){e.show(function(a){d.activeItem.params.background.image=a.url,d.$apply("activeItem")},{direct:!0,multiple:!1})},d.triggerActiveItem=function(a){b(".app-side .editor").css("marginTop","0"),b("#module-"+d.activeModules[a].index).size()&&b("#editor"+d.activeModules[a].id).size()?clearTimeout(d.timer):d.timer=setTimeout(function(){d.triggerActiveItem(d.activeIndex)},50)},d.editItem=function(e){"string"==typeof e&&a.forEach(d.activeModules,function(a){a.id==e&&(e=a.index)});var e=c.findIndex(d.activeModules,{index:parseInt(e)});e>-1&&(d.activeIndex=e,d.activeItem=d.activeModules[e]),-1==b.inArray(d.activeItem.id,d.editors)&&d.editors.push(d.activeItem.id),d.triggerActiveItem(e)},d.fansFields=fansFields,d.editItem(0)}]),f.controller("userCenterCtrl",["$scope",function(a){a.init(null,["UCheader"]),a.addThumb=function(b){e.show(function(c){a.activeItem.params[b]=c.url,a.$apply("activeItem")},{direct:!0,multiple:!1})},a.showIconBrowser=function(b){util.iconBrowser(function(c){b.css.icon.icon=c,a.$apply("activeMenus")})},a.addMenu=function(){a.activeMenus.push({
icon:"",css:{icon:{icon:"fa fa-external-link"}},name:"",url:""})},a.removeMenu=function(b){a.activeMenus=c.without(a.activeMenus,b)},activeMenus?a.activeMenus=activeMenus:a.activeMenus=[],a.editItem(0)}]),f.controller("whiteCtrl",["$scope",function(a){0==b(".slider-bar .ui-slider-handle").length&&b(".slider-bar").slider({min:1,max:100,slide:function(b,c){a.activeItem.params.height=c.value,a.$apply()}}),b("#module-"+a.activeIndex).click(function(){b(".slider-bar").slider("option","value",a.activeItem.params.height)})}]),f.directive("ngMyColorpicker",[function(){var a={template:window.WAPEDITOR.templates["colorpicker-template"],scope:{colorValue:"=ngMyColor",colorDefault:"=ngMyDefaultColor"},link:function(a,c,d){b(c).data("data-colorpicker-init")||(util.colorpicker(c,function(d){b(c).parent().parent().find(":text").val(d.toHexString()),a.colorValue=d.toHexString(),a.$apply("colorValue"),a.$watch("colorValue",function(d){b(c).spectrum("get")!=d&&(b(c).spectrum("set",d?d:a.colorDefault),b(c).parent().parent().find(":text").val(d?d:a.colorDefault),b(c).parent().parent().find(".input-group-addon").css("background-color",d?d:a.colorDefault))})}),b(".colorclean").click(function(){b(c).parent().parent().find(":text").val(""),b(c).parent().parent().find(".input-group-addon").css("background-color",a.colorDefault),a.colorValue=a.colorDefault,b(c).spectrum("set",a.colorDefault),a.$apply("colorValue")}),b(c).data("data-colorpicker-init",!0))}};return a}]),f.directive("ngMyDatePicker",["$http","$parse",function(){var a={transclude:!0,template:"",scope:{dateValue:"=ngMyDateValue"},link:function(a,c,d){var e={lang:"zh",step:"30",format:"Y-m-d H:i:s",closeOnDateSelect:!0,onSelectDate:function(b,c){a.dateValue=b.dateFormat("Y-m-d H:i:s"),a.$apply("dateValue")},onSelectTime:function(b,c){a.dateValue=b.dateFormat("Y-m-d H:i:s"),a.$apply("dateValue")}};b(c).datetimepicker(e)}};return a}]),f.directive("ngMyEditor",function(){var a={scope:{value:"=?ngMyValue",params:"=?ngMyParams"},template:'',link:function(b,c,d){c.data("editor")||(c.find("textarea").attr("id","editor"+(new Date).getTime()),a=UE.getEditor(c.find("textarea").attr("id"),ueditoroption),c.data("editor",a),a.addListener("contentChange",function(){b.value=a.getContent(),b.value&&(b.params=b.value.replace(/\"/g,"#quot;")),b.$root.$$phase||b.$apply("value")}),a.addListener("ready",function(){!b.value&&b.params&&(b.value=b.params.replace(/\#quot;/g,""")),b.value&&a&&a.getContent()!=b.value&&a.setContent(b.value),b.$watch("value",function(b){a&&a.getContent()!=b&&a.setContent(b?b:"")})}))}};return a}),f.directive("ngMyIconer",function(){var a=window.WAPEDITOR.templates["iconer-template"],c={scope:{image:"=ngMyImage",icon:"=ngMyIcon"},transclude:!0,template:a,link:function(a,c,d){a.selectIcon=function(){var c=e.show(function(b){a.image=b.url,a.icon={},a.$apply("image"),a.$apply("icon")},{direct:!0,multiple:!1});c.on("shown.bs.modal",function(){c.find(".nav-pills").append(window.WAPEDITOR.templates["iconer-nav-pills"]),c.find(".tab-content").append(window.WAPEDITOR.templates["iconer-tab-content"]),b.get("./index.php?c=utility&a=icon&callback=selectIconComplete",function(a){c.find("#icon").append(a)})}),window.selectIconComplete=function(b){a.icon={},a.icon.name=b,a.icon.color=c.find("#icon").attr("color"),a.image="",a.$apply("image"),a.$apply("icon"),c.modal("hide")}},a.removeIcon=function(){a.image="",a.icon={}}}};return c}),f.directive("ngMyLinker",["$http",function(a){var d={template:window.WAPEDITOR.templates["linker-template"],scope:{url:"=ngMyUrl",title:"=ngMyTitle"},link:function(d,e,f){e.find(".input-group-btn").mouseover(function(a){clearTimeout(d.timer),e.find(".dropdown-menu").show()}).mouseout(function(){d.timer=setTimeout(function(){e.find(".dropdown-menu").hide()},500)}),e.find(".dropdown-menu").mouseover(function(){clearTimeout(d.timer),e.find(".dropdown-menu").show()}).mouseout(function(){d.timer=setTimeout(function(){e.find(".dropdown-menu").hide()},500)}),d.addLink=function(a,b){d.url=a,b&&(d.title=b)},d.searchSystemLinker=function(){d.modalobj=util.dialog("请选择链接",["./index.php?c=utility&a=link&callback=selectLinkComplete"],"",{containerName:"link-search-system"}),d.modalobj.modal({keyboard:!1}),d.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),d.modalobj.modal("show"),window.selectLinkComplete=function(a,b){d.addLink(a,b),d.$apply("url","title"),d.modalobj.modal("hide")}},d.searchCmsLinker=function(e){var f={};f.header=window.WAPEDITOR.templates["linker-cms-header"],f.content=window.WAPEDITOR.templates["linker-cms-content"],f.footer="",f.articleitem=window.WAPEDITOR.templates["linker-cms-article-item"],f.cateitem=window.WAPEDITOR.templates["linker-cms-cate-item"],b("#link-search-cms")[0]?d.modalobj=b("#link-search-cms").data("modal"):(d.modalobj=util.dialog(f.header,f.content,f.footer,{containerName:"link-search-cms"}),d.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),d.modalobj.modal("show"),d.modalobj.on("hidden.bs.modal",function(){d.modalobj.remove()}),b("#link-search-cms").data("modal",d.modalobj)),e=e||1,a.get("./index.php?c=utility&a=link&do=articlelist&page="+e).success(function(a,e,g,h){var j={items:[]};if(a.message.list){for(i in a.message.list)j.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:a.message.list[i].uniacid,attachment:a.message.list[i].thumb_url,createtime:a.message.list[i].createtime});d.modalobj.find("#articlelist tbody").html(c.template(f.articleitem)(j)),d.modalobj.find("#pager").html(a.message.pager),d.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return d.searchCmsLinker(b(this).attr("page")),!1}),d.modalobj.find(".js-btn-select").click(function(){d.addLink(b(this).attr("js-url"),b(this).attr("js-title")),d.$apply("url","title"),d.modalobj.modal("hide")})}}),a.get("./index.php?c=utility&a=link&do=catelist&page="+e).success(function(a,e,g,h){var j={items:[]};if(a.message){for(i in a.message)j.items.push({id:a.message[i].id,uniacid:a.message[i].uniacid,name:a.message[i].name,children:a.message[i].children});d.modalobj.find("#category tbody").html(c.template(f.cateitem)(j)),d.modalobj.find(".js-btn-select").click(function(){d.addLink(b(this).attr("js-url"),b(this).attr("js-title")),d.$apply("url","title"),d.modalobj.modal("hide")})}})},d.searchNewsLinker=function(e){var f={};f.content=window.WAPEDITOR.templates["linker-news-content"],f.footer="",f.newsitem=window.WAPEDITOR.templates["linker-news-item"],b("#link-search-news")[0]?d.modalobj=b("#link-search-news").data("modal"):(d.modalobj=util.dialog(f.header,f.content,f.footer,{containerName:"link-search-news"}),d.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),d.modalobj.modal("show"),d.modalobj.on("hidden.bs.modal",function(){d.modalobj.remove()}),b("#link-search-news").data("modal",d.modalobj)),e=e||1,a.get("./index.php?c=utility&a=link&do=newslist&page="+e).success(function(a,e,g,h){var j={items:[]};if(a.message.list){for(i in a.message.list)j.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:window.sysinfo.uniacid,attachment:a.message.list[i].thumb_url,createtime:a.message.list[i].createtime});d.modalobj.find("#newslist tbody").html(c.template(f.newsitem)(j)),d.modalobj.find("#pager").html(a.message.pager),d.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return d.searchNewsLinker(b(this).attr("page")),!1}),d.modalobj.find(".js-btn-select").click(function(){d.addLink(b(this).attr("js-url"),b(this).attr("js-title")),d.$apply("url","title"),d.modalobj.modal("hide")})}})},d.searchPageLinker=function(e){var f={};f.content=window.WAPEDITOR.templates["linker-page-content"],f.footer="",f.pageItem=window.WAPEDITOR.templates["linker-page-item"],b("#link-search-page")[0]?d.modalobj=b("#link-search-page").data("modal"):(d.modalobj=util.dialog(f.header,f.content,f.footer,{containerName:"link-search-page"}),d.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),d.modalobj.modal("show"),d.modalobj.on("hidden.bs.modal",function(){d.modalobj.remove()}),b("#link-search-page").data("modal",d.modalobj)),e=e||1,a.get("./index.php?c=utility&a=link&do=pagelist&&page="+e).success(function(a,e,g,h){var j={items:[]};if(a.message.list){for(i in a.message.list)j.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:window.sysinfo.uniacid,createtime:a.message.list[i].createtime});d.modalobj.find("#pageList tbody").html(c.template(f.pageItem)(j)),d.modalobj.find("#pager").html(a.message.pager),d.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return d.searchPageLinker(b(this).attr("page")),!1}),d.modalobj.find(".js-btn-select").click(function(){d.addLink(b(this).attr("js-url"),b(this).attr("js-title")),d.$apply("url","title"),d.modalobj.modal("hide")})}})},d.searchMapPosLinker=function(){var a={};a.content=window.WAPEDITOR.templates["linker-map-content"],d.modalobj=util.dialog(a.content),d.modalobj.modal("show"),d.modalobj.find("#getnav").click(function(){d.addLink("http://api.map.baidu.com/marker?location="+b("#navlat").val()+","+b("#navlng").val()+"&title="+b("#navtitle").val()+"&name="+b("#navtitle").val()+"&output=html&src=we7",b("#navtitle").val()),d.$apply("url","title"),d.modalobj.modal("hide")})},d.addTelLinker=function(){var a={};a.content=window.WAPEDITOR.templates["linker-tel-content"],d.modalobj=util.dialog("一键拨号",a.content),d.modalobj.modal("show"),d.modalobj.find(".btn-primary").click(function(){d.addLink("tel:"+d.modalobj.find("#telphone").val(),""),d.$apply("url","title"),d.modalobj.modal("hide")})}}};return d}]),f.directive("we7Svger",function(){return{scope:{we7svg:"=we7Svg"},link:function(a,c,d){a.$watch("we7svg",function(){for(var d=b(a.we7svg),e=0;d.length>e;e++)if("svg"==d[e].tagName){var f=d[e];b(f).attr({width:"100%",height:"100%"}),b(f)[0].setAttribute("preserveAspectRatio","none"),c.html(f);break}})}}})}(wapeditor),a.module("app").run(["$templateCache",function(a){"use strict";a.put("widget-adimg-display.html",''),a.put("widget-adimg-editor.html",'重新上传
'),a.put("widget-audio-display.html",' 歌名儿 {{module.params.title}} 00:00/00:00 '),a.put("widget-audio-editor.html",''),a.put("widget-cardactivity-display.html",'点此编辑『富文本』内容 ——>
你可以对文字进行 加粗、斜体、下划线、 删除线、文字颜色、 背景色、 以及字号大小等简单排版操作。
还可以在这里加入表格了
中奖客户 | 发放奖品 | 备注 |
猪猪 | 内测码 | 已经发放 |
大麦 | 积分 | 领取地址 |
也可在这里插入图片、并对图片加上超级链接,方便用户点击。
'),a.put("widget-cardactivity-editor.html",''),a.put("widget-cardbasic-display.html",'会员卡
VIP 铜牌会员
会员卡号:{$setting[\'format\']}
'),a.put("widget-cardbasic-editor.html",''),
a.put("widget-cardnums-display.html",'点此编辑『富文本』内容 ——>
你可以对文字进行 加粗、斜体、下划线、 删除线、文字颜色、 背景色、 以及字号大小等简单排版操作。
还可以在这里加入表格了
中奖客户 | 发放奖品 | 备注 |
猪猪 | 内测码 | 已经发放 |
大麦 | 积分 | 领取地址 |
也可在这里插入图片、并对图片加上超级链接,方便用户点击。
'),a.put("widget-cardnums-editor.html",''),a.put("widget-cardrecharge-display.html",'点此编辑『富文本』内容 ——>
你可以对文字进行 加粗、斜体、下划线、 删除线、文字颜色、 背景色、 以及字号大小等简单排版操作。
还可以在这里加入表格了
中奖客户 | 发放奖品 | 备注 |
猪猪 | 内测码 | 已经发放 |
大麦 | 积分 | 领取地址 |
也可在这里插入图片、并对图片加上超级链接,方便用户点击。
'),a.put("widget-cardrecharge-editor.html",''),a.put("widget-cardtimes-display.html",'点此编辑『富文本』内容 ——>
你可以对文字进行 加粗、斜体、下划线、 删除线、文字颜色、 背景色、 以及字号大小等简单排版操作。
还可以在这里加入表格了
中奖客户 | 发放奖品 | 备注 |
猪猪 | 内测码 | 已经发放 |
大麦 | 积分 | 领取地址 |
也可在这里插入图片、并对图片加上超级链接,方便用户点击。
'),a.put("widget-cardtimes-editor.html",''),a.put("widget-component-display.html",''),a.put("widget-component-editor.html",''),a.put("widget-countdown-display.html","{{module.params.leftTimeText.days}} 天 {{module.params.leftTimeText.hour}} 时 {{module.params.leftTimeText.min}} 分 {{module.params.leftTimeText.sec}} 秒
"),a.put("widget-countdown-editor.html",''),a.put("widget-cube-display.html",''),a.put("widget-cube-editor.html",''),a.put("widget-dial-display.html",""),a.put("widget-dial-editor.html",''),a.put("widget-good-display.html",""),a.put("widget-good-editor.html",''),a.put("widget-header-display.html",''),a.put("widget-header-editor.html",''),
a.put("widget-image-display.html",''),a.put("widget-image-editor.html",'重新上传
'),a.put("widget-line-display.html",""),a.put("widget-line-editor.html",''),a.put("widget-link-display.html",''),a.put("widget-link-editor.html",''),a.put("widget-navimg-display.html",''),a.put("widget-navimg-editor.html",' 添加图片
重新上传
'),a.put("widget-notice-display.html",'公告: {{module.params.notice || \'请填写内容,如果过长,将会在手机上滚动显示!\'}}
'),a.put("widget-notice-editor.html",''),a.put("widget-onlytext-display.html",""),a.put("widget-onlytext-editor.html",""),a.put("widget-purelink-display.html",""),a.put("widget-purelink-editor.html",''),a.put("widget-reward-display.html",""),a.put("widget-reward-editor.html",''),a.put("widget-richtext-display.html",'点此编辑『富文本』内容 ——>
你可以对文字进行 加粗、斜体、下划线、 删除线、文字颜色、 背景色、 以及字号大小等简单排版操作。
还可以在这里加入表格了
中奖客户 | 发放奖品 | 备注 |
猪猪 | 内测码 | 已经发放 |
大麦 | 积分 | 领取地址 |
也可在这里插入图片、并对图片加上超级链接,方便用户点击。
'),a.put("widget-richtext-editor.html",''),a.put("widget-shape-display.html",''),a.put("widget-shape-editor.html",''),a.put("widget-textnav-display.html",''),a.put("widget-textnav-editor.html",''),a.put("widget-title-display.html",'{{ module.params.title || "点击编辑『标题』"}}- 文本导航
副标题
{{ module.params.title || "点击编辑『标题』"}}
2015-03-12 zhangsan
'),a.put("widget-title-editor.html",''),
a.put("widget-ucheader-display.html",''),a.put("widget-ucheader-editor.html",''),a.put("widget-usercard-display.html",""),a.put("widget-usercard-editor.html",""),a.put("widget-usercenter-display.html",''),a.put("widget-usercenter-editor.html",''),a.put("widget-white-display.html",''),a.put("widget-white-editor.html",'')}]),function(a,b){a["colorpicker-template"]='
',a["iconer-nav-pills"]='图标',a["iconer-tab-content"]='',a["iconer-template"]='',a["linker-cms-article-item"]='<%_.each(items, function(item) {%><%=item.title%> | <%=item.createtime%> | |
<%});%>',a["linker-cms-cate-item"]='<%_.each(items, function(item) {%><%=item.name%> | 选取 |
<%_.each(item.children, function(child) {%><%=child.name%> | 选取 |
<%});%><%});%>',a["linker-cms-content"]='',a["linker-cms-header"]='',a["linker-map-content"]='',a["linker-news-content"]='',a["linker-news-item"]='<%_.each(items, function(item) {%><%=item.title%> | <%=item.createtime%> | |
<%});%>',a["linker-page-content"]='',a["linker-page-item"]='<%_.each(items, function(item) {%><%=item.title%> | <%=item.createtime%> | |
<%});%>',a["linker-tel-content"]='',a["linker-template"]=''}(this.window.WAPEDITOR.templates=this.window.WAPEDITOR.templates||{})});