(function(){page.using={types:["MarketingCalendar"]};page.onInit=function(){u8.services.campaignManagementProcess.setProcessToCalendarStage()};page.onLoad=function(){var e=this.url.getInt("scale",-1);var t=this.url.get("sortFieldAK","").split(",").filter(u8._.trueish());var a={model:{settingsName:"MarketingCalendar",defaultFilterSet:this.url.get("defaultFilterSet"),fixedFilterNames:this.url.getArray("fixedFilterNames"),calendarItemAction:this.url.get("calendarItemAction")},sidebarOptions:{showDatePicker:true},header:{showNewButton:false},parent:page,isDefault:true};if(e>0){a.model.scale=e}if(t.length>0){a.model.parentViews={CM:{childSortFields:t},VR:{childSortFields:t}}}var i=$("#marketingCalendar").uniqueId("marketingCalendar",true);var r=u8.widget("MarketingCalendar",i,a);r.model.bind("Create",function(){var e=u8.services.campaignManagementProcess.getSelectedEntityUid();if(e){var t=(e.infoAreaId||"")+";"+(e.recordId||"");r.model.setSelectedItems([t])}});r.model.bind("SelectionChange",function(e,t){var a=r.model.getSelectedItems();var i=a&&a.length>0?a[0].uid:null;u8.services.campaignManagementProcess.setSelectedEntityUid(i)})}})();