| 1 |
- MWF.xApplication.Meeting=MWF.xApplication.Meeting||{};MWF.require("MWF.xDesktop.UserData",null,false);MWF.xDesktop.requireApp("Meeting","MeetingView",null,false);MWF.xDesktop.requireApp("Meeting","Common",null,false);MWF.xDesktop.requireApp("Template","MDomItem",null,false);MWF.xApplication.Meeting.options.multitask=false;MWF.xApplication.Meeting.Main=new Class({Extends:MWF.xApplication.Common.Main,Implements:[Options,Events],options:{style:"default",name:"Meeting",icon:"icon.png",width:"1000",height:"600",isResize:true,isMax:true,sideBarEnable:true,settingEnable:true,title:MWF.xApplication.Meeting.LP.title},onQueryLoad:function(){this.lp=MWF.xApplication.Meeting.LP;this.menuMode="show";this.isManager=MWF.AC.isMeetingAdministrator();this.actions=MWF.Actions.get("x_meeting_assemble_control");this.personActions=MWF.Actions.get("x_organization_assemble_express")},loadApplication:function(n){MWF.UD.getDataJson("meetingConfig",function(e){this.meetingConfig=e||{};MWF.UD.getPublicData("meetingConfig",function(e){var t=e||{};if(t.process){this.meetingConfig.process=t.process}else{this.meetingConfig.process=null}if(t.weekBegin){this.meetingConfig.weekBegin=t.weekBegin}if(t.meetingViewer){this.meetingConfig.meetingViewer=t.meetingViewer}for(var i in t){if(i!="process"&&i!="weekBegin"&&i!="meetingViewer"){this.meetingConfig[i]=t[i]}}if(!this.meetingConfig.disableViewList)this.meetingConfig.disableViewList=[];this.createNode();if(!this.options.isRefresh){this.maxSize(function(){this.loadLayout()}.bind(this))}else{this.loadLayout()}if(n)n()}.bind(this))}.bind(this))},createNode:function(){this.content.setStyle("overflow","hidden");this.node=new Element("div",{styles:{width:"100%",height:"100%",overflow:"hidden"}}).inject(this.content)},loadLayout:function(){if(this.status&&this.status.action){this.defaultAction=this.status.action}else if(this.meetingConfig.defaultView){this.defaultAction=this.meetingConfig.defaultView}else{this.defaultAction="toMyMeeting"}if(this.meetingConfig.disableViewList.contains(this.defaultAction)){this.defaultAction=""}this.topMenu=new Element("div",{styles:this.css.topMenu}).inject(this.node);this.contentNode=new Element("div",{styles:this.inContainer?this.css.contentNode_inContainer:this.css.contentNode}).inject(this.node);this.loadTopMenus();if(this.options.sideBarEnable){this.loadSideBar()}this.setEvent()},setEvent:function(){},loadTopMenus_right:function(){this.topMenuRight=new Element("div",{styles:this.css.topMenuRight}).inject(this.topMenu);this.createTopMenu_right(this.lp.addMeeting,"icon_newapply","addMeeting");if(this.isManager)this.createTopMenu_right(this.lp.addRoom,"icon_newhuiyishi","addRoom");if(this.options.settingEnable){var e=this.createTopMenu_right(this.lp.setting,"icon_shezhi","config");e.setStyle("float","right")}},createTopMenu_right:function(e,t,i){var n=new Element("div",{styles:this.css.topMenuNode_right,title:e}).inject(this.topMenuRight);var s=new Element("div",{styles:this.css.topMenuIconNode}).inject(n);var o=new Element("div",{styles:this.css.topMenuTextNode,text:e}).inject(n);s.setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+t+".png) no-repeat center center");n.store("icon",t);n.store("iconNode",s);var a=this;n.addEvents({mouseover:function(){this.node.setStyles(a.css.topMenuNode_over);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+"_click.png) no-repeat center center")}.bind({node:n}),mouseout:function(){this.node.setStyles(a.css.topMenuNode_right);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+".png) no-repeat center center")}.bind({node:n}),click:function(){this.node.setStyles(a.css.topMenuNode_down);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+"_click.png) no-repeat center center");if(a[i])a[i].apply(a)}.bind({node:n})});return n},loadTopMenus:function(){this.createTopMenu(this.lp.myMeeting,"icon_huiyi","toMyMeeting");this.createTopMenu(this.lp.month,"icon_yue","toMonth");this.createTopMenu(this.lp.week,"icon_zhou","toWeek");this.createTopMenu(this.lp.day,"icon_ri","toDay");this.createTopMenu(this.lp.list,"icon_liebiao","toList");this.createTopMenu(this.lp.room,"icon_huiyishi","toRoom");this.loadTopMenus_right()},isViewAvailable:function(e){return!this.meetingConfig.disableViewList.contains(e)},createTopMenu:function(e,t,i){if(this.meetingConfig.disableViewList.contains(i))return;if(this.meetingConfig[i+"ViewName"]){e=this.meetingConfig[i+"ViewName"]}var n=new Element("div",{styles:this.css.topMenuNode}).inject(this.topMenu);var s=new Element("div",{styles:this.css.topMenuIconNode}).inject(n);s.setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+t+".png) no-repeat center center");var o=new Element("div",{styles:this.css.topMenuTextNode,text:e}).inject(n);n.store("icon",t);n.store("iconNode",s);n.store("action",i);var a=this;n.addEvents({mouseover:function(){if(this.node!=a.currentTopMenuNode){this.node.setStyles(a.css.topMenuNode_over);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+"_click.png) no-repeat center center")}}.bind({node:n}),mouseout:function(){if(this.node!=a.currentTopMenuNode){this.node.setStyles(a.css.topMenuNode);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+".png) no-repeat center center")}}.bind({node:n}),click:function(){if(this.node!=a.currentTopMenuNode){this.node.setStyles(a.css.topMenuNode_down);this.node.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+this.node.retrieve("icon")+"_click.png) no-repeat center center")}if(a.currentTopMenuNode&&this.node!=a.currentTopMenuNode){a.currentTopMenuNode.setStyles(a.css.topMenuNode);a.currentTopMenuNode.retrieve("iconNode").setStyle("background","url(/x_component_Meeting/$Main/default/icon/"+a.currentTopMenuNode.retrieve("icon")+".png) no-repeat center center")}a.currentTopMenuNode=this.node;if(a[i])a[i].apply(a)}.bind({node:n})});if(this.defaultAction){if(this.defaultAction==i){n.click()}}else if(!this.loaded){n.click();this.loaded=true}return n},hideMenu:function(){},showMenu:function(){if(this.menuMode!="show"){this.topMenu.set("tween",{duration:100,transition:"bounce:out"});this.topMenu.tween("top","-50px","0px");this.menuMode="show";if(this.topMenuPoint)this.topMenuPoint.setStyle("display","none");if(this.bottomMenuPoint)this.bottomMenuPoint.setStyle("display","none")}},hideCurrentView:function(){if(this.currentView){this.currentView.hide();this.currentView=null}},toMyMeeting:function(){this.contentNode.setStyles(this.css.contentNode);if(this.currentView){this.currentView.destroy();this.currentView=null}this.myMeetingView=null;this.getMyMeetingView(function(){this.myMeetingView.show();this.currentView=this.myMeetingView}.bind(this))},getMyMeetingView:function(t){if(!this.myMeetingView){MWF.xDesktop.requireApp("Meeting","MeetingView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.myMeetingView=new MWF.xApplication.Meeting.MeetingView(this.contentNode,this,e);if(e)this.status.options=null;if(t)t()}.bind(this))}else{if(t)t()}},toList:function(){this.contentNode.setStyle("background","#EEE");if(this.currentView){this.currentView.destroy();this.currentView=null}this.listView=null;this.getListView(function(){this.listView.show();this.currentView=this.listView}.bind(this))},getListView:function(t){if(!this.listView){MWF.xDesktop.requireApp("Meeting","ListView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.listView=new MWF.xApplication.Meeting.ListView(this.contentNode,this,e);if(e)this.status.options=null;if(t)t()}.bind(this))}else{if(t)t()}},toMonth:function(){this.contentNode.setStyle("background","#EEE");if(this.currentView){this.currentView.destroy();this.currentView=null}this.monthView=null;this.getMonthView(function(){this.monthView.show();this.currentView=this.monthView}.bind(this))},getMonthView:function(t){if(!this.monthView){MWF.xDesktop.requireApp("Meeting","MonthView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.monthView=new MWF.xApplication.Meeting.MonthView(this.contentNode,this,e);if(e)this.status.options=null;if(t)t()}.bind(this))}else{if(t)t()}},toWeek:function(){this.contentNode.setStyle("background","#EEE");if(this.currentView){this.currentView.destroy();this.currentView=null}this.weekView=null;this.getWeekView(function(){this.weekView.show();this.currentView=this.weekView}.bind(this))},getWeekView:function(t){if(!this.weekView){MWF.xDesktop.requireApp("Meeting","WeekView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.weekView=new MWF.xApplication.Meeting.WeekView(this.contentNode,this,e);if(e)this.status.options=null;if(t)t()}.bind(this))}else{if(t)t()}},toDay:function(e){this.contentNode.setStyle("background","#EEE");if(this.currentView){this.currentView.destroy();this.currentView=null}this.dayView=null;this.getDayView(function(){this.dayView.show();this.currentView=this.dayView}.bind(this),e)},getDayView:function(t,i){if(!this.dayView){MWF.xDesktop.requireApp("Meeting","DayView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.dayView=new MWF.xApplication.Meeting.DayView(this.contentNode,this,e||{date:i});if(this.status)this.status.options=null;if(t)t()}.bind(this))}else{this.dayView.toDay(i);if(t)t()}},toRoom:function(){this.contentNode.setStyle("background","#EEE");if(this.currentView){this.currentView.destroy();this.currentView=null}this.roomView=null;this.getRoomView(function(){this.roomView.show();this.currentView=this.roomView}.bind(this))},getRoomView:function(t){if(!this.roomView){MWF.xDesktop.requireApp("Meeting","RoomView",function(){var e;if(this.status&&this.status.options){e=this.status.options}this.roomView=new MWF.xApplication.Meeting.RoomView(this.contentNode,this,e);if(e)this.status.options=null;if(t)t()}.bind(this))}else{if(t)t()}},addMeeting:function(n,s,o,a,c,r){MWF.UD.getPublicData("meetingConfig",function(e){var t=e?e.process:null;if(t){this.loadMeetingProcess(t,c,r)}else{var i=new MWF.xApplication.Meeting.MeetingForm(this,{},{date:n,hour:s,minute:o,room:a},{app:this});i.view=this;i.create()}}.bind(this))},loadMeetingProcess:function(e,i,n){this.getProcess(e,function(t){MWF.xDesktop.requireApp("process.TaskCenter","ProcessStarter",function(){var e=new MWF.xApplication.process.TaskCenter.ProcessStarter(t,this,{latest:n,workData:i,onStarted:function(e,t,i){this.afterStartProcess(e,t,i)}.bind(this)});e.load()}.bind(this))}.bind(this))},afterStartProcess:function(e,t,i){var n=[];var s=[];e.each(function(e){if(e.currentTaskIndex!==-1)s.push(e.taskList[e.currentTaskIndex].work);n.push(this.getStartWorkInforObj(e))}.bind(this));if(s.length===1){var o={workId:s[0],appId:s[0]};this.desktop.openApplication(null,"process.Work",o);this.createStartWorkResault(n,t,i,false)}else{this.createStartWorkResault(n,t,i,true)}},createStartWorkResault:function(e,t,i,n){var s="";e.each(function(e){var t=[];e.users.each(function(e){t.push(MWF.name.cn(e))});s+="<div><b>"+this.lp.nextActivity+'<font style="color: #ea621f">'+e.activity+"</font>, "+this.lp.nextUser+'<font style="color: #ea621f">'+t.join(", ")+"</font></b>";if(e.currentTask&&n){s+=' <span value="'+e.currentTask+'">'+this.lp.deal+"</span></div>"}else{s+="</div>"}}.bind(this));var o=e[0].title||t;var a={subject:this.lp.processStarted,content:"<div>"+this.lp.processStartedMessage+"“["+i+"]"+o+"”</div>"+s};var c=layout.desktop.message.addTooltip(a);var r=layout.desktop.message.addMessage(a);this.setStartWorkResaultAction(c);this.setStartWorkResaultAction(r)},getStartWorkInforObj:function(i){var n="";var s=[];var o="";i.taskList.each(function(e,t){n=e.title;s.push(e.person+"("+e.department+")");if(i.currentTaskIndex===t)o=e.id}.bind(this));debugger;return{activity:i.fromActivityName,users:s,currentTask:o,title:n}},setStartWorkResaultAction:function(e){var t=e.node.getElements("span");t.setStyles(this.css.dealStartedWorkAction);var i=this;t.addEvent("click",function(e){var t={taskId:this.get("value"),appId:this.get("value")};i.desktop.openApplication(e,"process.Work",t)})},getProcess:function(e,t){if(t)t(e)},config:function(){new MWF.xApplication.Meeting.Config(this,this.meetingConfig)},addRoom:function(){var e=new MWF.xApplication.Meeting.RoomForm(this,{},{},{app:this});e.view=this;e.create()},recordStatus:function(){return{action:this.currentTopMenuNode?this.currentTopMenuNode.retrieve("action"):"toMyMeeting",options:this.currentView.recordStatus?this.currentView.recordStatus():null}},reload:function(){this.refresh()},loadSideBar:function(){this.sideBar=new MWF.xApplication.Meeting.SideBar(this.node,this);this.sideBar.show()},isMeetingViewer:function(n){if(typeOf(this._isMeetingViewer)=="boolean"){if(n)n(this._isMeetingViewer);return}var s=this.meetingConfig.meetingViewer;if(!s||!s.length){this._isMeetingViewer=false;if(n)n(this._isMeetingViewer);return}if(this.isManager){this._isMeetingViewer=true;if(n)n(this._isMeetingViewer);return}if(typeOf(s)!="array")s=[s];MWF.Actions.get("x_organization_assemble_personal").getPerson(function(e){var t=e.data.distinguishedName;if(s.contains(t)){this._isMeetingViewer=true;if(n)n(this._isMeetingViewer);return}for(var i=0;i<e.data.woGroupList.length;i++){if(s.contains(e.data.woGroupList[i].distinguishedName)){this._isMeetingViewer=true;if(n)n(this._isMeetingViewer);return}}this.personActions.listUnitSupNestedWithPersonValue({personList:[t]},function(e){for(var t=0;t<e.data.unitList.length;t++){if(s.contains(e.data.unitList[t])){this._isMeetingViewer=true;if(n)n(this._isMeetingViewer);return}}this._isMeetingViewer=false;if(n)n(this._isMeetingViewer)}.bind(this),null,false)}.bind(this),null,false)}});MWF.xApplication.Meeting.Config=new Class({Implements:[Events],initialize:function(e){this.app=e;this.css=this.app.css;this.lp=this.app.lp;this.configData=this.app.meetingConfig||{};this.process=null;MWF.UD.getPublicData("meetingConfig",function(e){var t=e||{};if(t.process){this.configData.process=t.process}else{this.configData.process=null}if(t.weekBegin){this.configData.weekBegin=t.weekBegin}if(t.meetingViewer){this.configData.meetingViewer=t.meetingViewer}if(t.mobileCreateEnable){this.configData.mobileCreateEnable=t.mobileCreateEnable}for(var i in t){if(i!="process"&&i!="weekBegin"&&i!="meetingViewer"&&i!="mobileCreateEnable"){this.configData[i]=t[i]}}this.load()}.bind(this))},load:function(){this.node=new Element("div",{styles:this.css.configNode}).inject(this.app.node);this.contentNode=new Element("div",{styles:this.css.configContentNode}).inject(this.node);var e="overflow: hidden;margin-top:6px;margin-left:10px;";var t="float: left; width: 16px; height: 16px; border-radius: 100px; ";var i="float: left; width: 14px; height: 14px; border-radius: 100px; ";var n="margin-left:35px; line-height:16px; height:16px;font-size:14px;color:#666;";var s="font-size:14px;color:#666;heigh:16px;margin-top:6px;margin-left:10px;";var o="float:right; width:120px; border:1px solid #ccc";var a=this.configData;var c=this.lp.config;var r="<div class='configTitle'>"+this.lp.config["default"]+"</div>"+"<div>";if(!a.disableViewList.contains("toMyMeeting")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(!a.defaultView||a.defaultView=="toMyMeeting"?"checked":"")+" value='toMyMeeting'>"+(a.toMyMeetingViewName||this.lp.myMeeting)+" </div>"}if(!a.disableViewList.contains("toMonth")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(a.defaultView=="toMonth"?"checked":"")+" value='toMonth'>"+(a.toMonthViewName||this.lp.month)+" </div>"}if(!a.disableViewList.contains("toWeek")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(a.defaultView=="toWeek"?"checked":"")+" value='toWeek'>"+(a.toWeekViewName||this.lp.week)+" </div>"}if(!a.disableViewList.contains("toDay")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(a.defaultView=="toDay"?"checked":"")+" value='toDay'>"+(a.toDayViewName||this.lp.day)+" </div>"}if(!a.disableViewList.contains("toList")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(a.defaultView=="toList"?"checked":"")+" value='toList'>"+(a.toListViewName||this.lp.list)+" </div>"}if(!a.disableViewList.contains("toRoom")){r+=" <div style='"+s+"'>"+"<input type='radio' name='configSelectDefaultView' "+(a.defaultView=="toRoom"?"checked":"")+" value='toRoom'>"+(a.toRoomViewName||this.lp.room)+" </div>"}r+="</div>";if(MWF.AC.isMeetingAdministrator()){a.disableViewList=a.disableViewList||[];r+="<div class='line'></div>"+"<div class='configTitle'>"+this.lp.config.viewSetting+"</div>"+"<div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toMyMeeting")?"checked":"")+" value='toMyMeeting'>"+this.lp.myMeeting+"<input type='text' name='toMyMeetingViewName' value='"+(a.toMyMeetingViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toMonth")?"checked":"")+" value='toMonth'>"+this.lp.month+"<input type='text' name='toMonthViewName' value='"+(a.toMonthViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toWeek")?"checked":"")+" value='toWeek'>"+this.lp.week+"<input type='text' name='toWeekViewName' value='"+(a.toWeekViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toDay")?"checked":"")+" value='toDay'>"+this.lp.day+"<input type='text' name='toDayViewName' value='"+(a.toDayViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toList")?"checked":"")+" value='toList'>"+this.lp.list+"<input type='text' name='toListViewName' value='"+(a.toListViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+" <div style='"+s+"'>"+"<input type='checkbox' name='configAvailableView' "+(!a.disableViewList.contains("toRoom")?"checked":"")+" value='toRoom'>"+this.lp.room+"<input type='text' name='toRoomViewName' value='"+(a.toRoomViewName||"")+"' style='"+o+"' placeholder='"+this.lp.config.viewCustomName+"' >"+" </div>"+"</div>"+"<div class='line'></div>"+"<div class='configTitle'>"+this.lp.config.weekBegin+"</div>"+"<div><select name='configSelectWeekBeign'>"+"<option value='0' "+(a.weekBegin=="0"?"selected":"")+">"+this.lp.weeks.Sun+"</option>"+"<option value='1' "+(a.weekBegin=="1"?"selected":"")+">"+this.lp.weeks.Mon+"</option>"+"</select></div>"+"<div class='line'></div>"+"<div class='configTitle'>"+this.lp.config.applyProcess+"</div>"+"<div item='processArea'></div>"+"<div class='configTitle' title='"+this.lp.config.meetingViewerTitle+"'>"+this.lp.config.meetingViewer+"</div>"+"<div item='meetingViewerNode'></div>"+"<div class='configTitle'>"+this.lp.config.mobileCreateEnable+"</div>"+"<div item='mobileCreateEnable'></div>"}this.contentNode.set("html",r);this.contentNode.getElements("div.line").setStyles(this.css.configContentLine);this.contentNode.getElements("div.configTitle").setStyles(this.css.configTitleDiv);if(MWF.AC.isMeetingAdministrator()){this.processNode=this.contentNode.getElement("[item='processArea']");this.processNode.setStyles(this.css.configProcessNode);this.createApplicationSelect();this.meetingViewerNode=this.contentNode.getElement("[item='meetingViewerNode']");this.meetingViewer=new MDomItem(this.meetingViewerNode,{name:"meetingViewer",type:"org",orgType:["person","unit","group"],count:0,style:this.css.configMeetingViewerNode,value:a.meetingViewer||[]},null,this.app);this.meetingViewer.load();this.mobileCreateEnableNode=this.contentNode.getElement("[item='mobileCreateEnable']");this.mobileCreateEnable=new MDomItem(this.mobileCreateEnableNode,{name:"mobileCreateEnable",type:"select",selectValue:["true","false"],selectText:this.lp.config.mobileCreateEnableOptions,value:a.mobileCreateEnable||"true"},null,this.app);this.mobileCreateEnable.load()}this.actionNode=new Element("div",{styles:this.css.configActionNode}).inject(this.node);this.cancelNode=new Element("div",{styles:this.css.configActionCancelNode,text:this.app.lp.cancel}).inject(this.actionNode);this.saveNode=new Element("div",{styles:this.css.configActionSaveNode,text:this.app.lp.save}).inject(this.actionNode);this.cancelNode.addEvent("click",this.hide.bind(this));this.saveNode.addEvent("click",this.save.bind(this));this.node.addEvent("mousedown",function(e){e.stopPropagation()}.bind(this));this.setSize();this.show()},setSize:function(){var e=this.node.getSize().y;var t=this.app.content.getSize().y;if(e>t-50){this.node.setStyle("height",t-50)}},createApplicationSelect:function(){if(this.configData.process){MWF.require("MWF.widget.O2Identity",function(){var e=new MWF.widget.O2Process(this.configData.process,this.processNode)}.bind(this))}this.processNode.addEvent("click",function(){MWF.xDesktop.requireApp("Selector","package",function(){var e={type:"Process",values:[this.process||this.configData.process],count:1,onComplete:function(t){this.processNode.empty();this.process=null;this.configData.process=null;if(t.length){MWF.require("MWF.widget.O2Identity",function(){var e=new MWF.widget.O2Process(t[0].data,this.processNode);this.process={name:t[0].data.name,id:t[0].data.id,application:t[0].data.application,applicationName:t[0].data.applicationName,alias:t[0].data.alias};this.configData.process=this.process}.bind(this))}}.bind(this)};var t=new MWF.O2Selector(this.app.content,e)}.bind(this))}.bind(this))},save:function(){var e="toMyMeeting";var t=null;var i=this.contentNode.getElements("input[name='configSelectDefaultView']");for(var n=0;n<i.length;n++){if(i[n].checked){e=i[n].get("value");break}}MWF.UD.putData("meetingConfig",{defaultView:e},null,false);if(MWF.AC.isMeetingAdministrator()){var s=[];var o=this.contentNode.getElements("input[name='configAvailableView']");for(var n=0;n<o.length;n++){if(!o[n].checked){s.push(o[n].get("value"))}}var a=this.contentNode.getElement("select[name='configSelectWeekBeign']");var c="0";if(a){c=a.options[a.selectedIndex].get("value")}var r=null;if(this.meetingViewer){r=this.meetingViewer.getValue()}MWF.UD.putPublicData("meetingConfig",{process:this.process||this.configData.process,weekBegin:c,meetingViewer:r,mobileCreateEnable:this.mobileCreateEnable.getValue(),disableViewList:s,toMyMeetingViewName:this.contentNode.getElement("input[name='toMyMeetingViewName']").get("value"),toMonthViewName:this.contentNode.getElement("input[name='toMonthViewName']").get("value"),toWeekViewName:this.contentNode.getElement("input[name='toWeekViewName']").get("value"),toDayViewName:this.contentNode.getElement("input[name='toDayViewName']").get("value"),toListViewName:this.contentNode.getElement("input[name='toListViewName']").get("value"),toRoomViewName:this.contentNode.getElement("input[name='toRoomViewName']").get("value")},null,false)}this.app.notice(this.app.lp.config_saveSuccess,"success");this.hide()},show:function(){this.node.setStyles(this.css.configNode);var e=new Fx.Morph(this.node,{duration:"500",transition:Fx.Transitions.Expo.easeOut});e.start({opacity:1}).chain(function(){this.hideFun=this.hide.bind(this);this.app.node.addEvent("mousedown",this.hideFun)}.bind(this))},hide:function(){this.node.destroy();this.app.node.removeEvent("mousedown",this.hideFun);MWF.release(this)}});
|