var _settings=null;var _popup=null;$.extend(page,{using:{texts:["net_marketingcalendar_settings","button_text"]},commandBindings:$.extend({apply:function(){_settings.ViewStyle=Number($widget("ViewStyle").getValue());_popup.close({ok:true})},cancel:function(){_popup.close()}},page.commandBindings),onLoad:function(){_popup=u8.Base.Widgets.Popup.getFromElement(document.body);$assert(_popup,"Unable to find popup widget.");_settings=_popup.Settings;$assert(_settings,"Missing attribute '_settings' on popup widget.");$assert(_settings.filterSet,"Missing attribute '_settings.filterSet' on popup widget.");var t={viewStyles:[{key:MarketingCalendarViewStyle_Month,text:$t("TXT_net_marketingcalendar_settings_1")},{key:MarketingCalendarViewStyle_Quarter,text:$t("TXT_net_marketingcalendar_settings_2")},{key:MarketingCalendarViewStyle_Year,text:$t("TXT_net_marketingcalendar_settings_3")}],viewStyle:_settings.ViewStyle};$("#template").utml({itemOptions:{parent:page},data:t})}});