(function(){"use strict";u8.Crm.Widgets.MarketingCalendar=function(e,t){this.ResourceView(e,$.extend(true,{},u8.Crm.Widgets.MarketingCalendar.defaults,t,u8.Crm.Widgets.MarketingCalendar.mandatory));this.commandBindings={"Action/MoveLinked(Toggle)":{queryState:this._onMoveLinkedQueryState.bind(this)}};this.model.bind("ParentViewIdChange",this._onModelParentViewIdChange.bind(this))};u8.Crm.Widgets.MarketingCalendar.defaults={header:{showNewButton:true,showNewCampaignButton:true,headerOptions:{headerGroupName:"Special",headerName:"MarketingCalendarHeader"}},model:{moveLinked:true,rangeDependsOnAvailableWidth:true}};u8.Crm.Widgets.MarketingCalendar.mandatory={model:{providers:[{id:"CalendarProviders/InfoAreaId/CM"},{id:"CalendarProviders/InfoAreaId/VR"},{id:"CalendarProviders/InfoAreaId/AK"}],filterSets:{containerName:"MarketingCalendar.FilterSets"},parentViews:{CM:{childInfoAreaId:"AK",parentInfoAreaId:"CM",moveLinkedAllowed:true},VR:{childInfoAreaId:"AK",parentInfoAreaId:"VR"},AK:{childInfoAreaId:"AK"}},scales:"fullDays",ignoreReps:true,showOneRowPerItem:true,itemReadOptions:{tableCaptionPostfix:".MarketingCalendar"},colorTypesId:"marketing"},sidebarOptions:{showRepPicker:false,showRepGrouping:false},settingOptions:{popup:{title:"TXT_net_marketingcalendar_settings_0"},showWorkingHoursOnlySetting:false,showGroupColumnSetting:false,showHiddenItemsSetting:false,showDoNotClipSmallItemsSetting:false}};u8.Crm.Widgets.MarketingCalendar.makeClass({name:"MarketingCalendar",events:["Create"],deriveFrom:u8.Crm.Widgets.ResourceView});$.extend(u8.Crm.Widgets.MarketingCalendar.prototype,{_onModelParentViewIdChange:function(e,t){var a=$u(".Header",this)[0];if(a){a.update({buttons:"state"})}},_onMoveLinkedQueryState:function(e,t,a){a.disabled=!this.model.getParentView().moveLinkedAllowed}})})();