functionet2_event_action_object_impl(widget,node){varaoi=newet2_action_object_impl(widget,node);returnaoi.doSetState=function(_state,_outerCall){},aoi}varet2_calendar_owner=function(){"use strict";returnet2_taglist_email.extend({attributes:{autocomplete_url:{default:"calendar_owner_etemplate_widget::ajax_owner"},autocomplete_params:{name:"Autocomplete parameters",type:"any",default:{},description:"Extra parameters passed to autocomplete URL. It should be a stringified JSON object."},allowFreeEntries:{default:!1,ignore:!0},select_options:{type:"any",name:"Select options",default:{},description:"Internally used to hold the select options."}},lib_options:{autoSelect:!1,groupBy:"app",minChars:2,selectFirst:!0,toggleOnClick:!0},doLoadingFinished:function(){this._super.apply(this,arguments);varwidget=this;returnthis._oldValue=this.taglist.getValue(),this.$taglist.on("focus",function(){widget.taglist.expand()}).on("load expand",function(){window.setTimeout(function(){widget&&widget.div&&widget.div.find(".ms-res-item-active").removeClass("ms-res-item-active")},1)}),!0},getValue:function(){returnnull==this.taglist?null:this.taglist.getValue()}})}.call(this);et2_register_widget(et2_calendar_owner,["calendar-owner"]);varet2_calendar_view=function(){"use strict";returnet2_valueWidget.extend({createNamespace:!0,attributes:{owner:{name:"Owner",type:"any",default:[egw.user("account_id")],description:"Account ID number of the calendar owner, if not the current user"},start_date:{name:"Start date",type:"any"},end_date:{name:"End date",type:"any"}},init:function(){this._super.apply(this,arguments),this.date_helper=et2_createWidget("date-time",{},null),this.date_helper.loadingFinished(),this.loader=$j('<div class="egw-loading-prompt-container ui-front loading"></div>'),this.update_timer=null},destroy:function(){this._super.apply(this,arguments),this.date_helper.destroy(),this.date_helper=null,this.update_timer&&window.clearTimeout(this.update_timer)},doLoadingFinished:function(){this._super.apply(this,arguments),this.loader.hide(0).prependTo(this.div),this.options.owner&&this.set_owner(this.options.owner)},invalidate:function(trigger_event){},get_start_date:function(){returnnewDate(this.options.start_date)},get_end_date:function(){returnnewDate(this.options.end_date)},set_start_date:function(new_date){new_date&&null!==new_date||(new_date=newDate),"object"==typeofnew_date||"string"==typeofnew_date&&new_date.length>8?this.date_helper.set_value(new_date):"string"==typeofnew_date&&(this.date_helper.set_year(new_date.substring(0,4)),this.date_helper.set_month(new_date.substring(4,6)),this.date_helper.set_date(new_date.substring(6,8)));varold_date=this.options.start_date;this.options.start_date=newDate(this.date_helper.getValue()),old_date!==this.options.start_date&&this.isAttached()&&this.invalidate(!0)},set_end_date:function(new_date){new_date&&null!==new_date||(new_date=newDate),"object"==typeofnew_date||"string"==typeofnew_date&&new_date.length>8?this.date_helper.set_value(new_date):"string"==typeofnew_date&&(this.date_helper.set_year(new_date.substring(0,4)),this.date_helper.set_month(new_date.substring(4,6)),this.date_helper.set_date(new_date.substring(6,8)));varold_date=this.options.end_date;this.options.end_date=newDate(this.date_helper.getValue()),old_date!==this.options.end_date&&this.isAttached()&&this.invalidate(!0)},set_owner:function(_owner){varold=this.options.owner;"0"==_owner&&(_owner=[egw.user("account_id")]),_owner=jQuery.isArray(_owner)?jQuery.extend([],_owner):"string"==typeof_owner?_owner.split(","):[_owner],this.options.owner=_owner,old!==this.options.owner&&this.isAttached()&&this.invalidate(!0)},set_value:function(events){return"object"!=typeofevents?!1:((events.length&&events.length>0||!jQuery.isEmptyObject(events))&&this.set_disabled(!1),events.id&&(this.set_id(events.id),deleteevents.id),events.start_date&&(this.set_start_date(events.start_date),deleteevents.start_date),events.end_date&&(this.set_end_date(events.end_date),deleteevents.end_date),events.owner&&(this.set_owner(events.ow
if(exceptions){varbuttons=[{button_id:"keep",title:this.egw.lang("All exceptions are converted into single events."),text:this.egw.lang("Keep exceptions"),id:"button[delete_keep_exceptions]",image:"keep",default:!0},{button_id:"delete",title:this.egw.lang("The exceptions are deleted together with the series."),text:this.egw.lang("Delete exceptions"),id:"button[delete_exceptions]",image:"delete"},{button_id:"cancel",text:this.egw.lang("Cancel"),id:"dialog[cancel]",image:"cancel"}];et2_dialog.show_dialog(function(_button_id){return"dialog[cancel]"!=_button_id?(widget.getRoot().getWidgetById("delete_exceptions").set_value("button[delete_exceptions]"==_button_id),widget.getInstanceManager().submit("button[delete]"),!0):!1},this.egw.lang("Do you want to keep the series exceptions in your calendar?"),this.egw.lang("This event is part of a series"),{},buttons,et2_dialog.WARNING_MESSAGE)}else0!==content.recur_type?et2_dialog.confirm(widget,"Delete this series of recuring events","Delete Series"):et2_dialog.confirm(widget,"Delete this event","Delete")},print_participants_status:function(_event,widget){if(widget&&window.opener){vareditPopWindow=window.opener;editPopWindow&&editPopWindow.etemplate2.getByApplication("calendar")[0].widgetContainer.getWidgetById(widget.id).set_value(widget.get_value()),this.et2._inst.submit(),editPopWindow.opener.egw_refresh("status changed","calendar")}elsewidget&&window.egw_refresh(this.egw.lang("The original popup edit window is closed! You need to close the print window and reopen the entry again."),"calendar")},edit_participant_search:function(request,widget){if("resources"==widget.app_select.val()){varvalues=widget.getInstanceManager().getValues(widget.getRoot());"object"==typeofrequest.options&&null!=request.options||(request.options={}),request.options.exec={start:values.start,end:values.end,duration:values.duration,participants:values.participants,recur_type:values.recur_type,event_id:values.link_to.to_id,show_conflict:"resources_without_conflict"==egw.preference("defaultresource_sel","calendar")?"0":"1"},values.whole_day&&(request.options.exec.whole_date=!0)}return!0},freetime_select:function(_event,_widget){if(_widget){varcontent=this.et2._inst.widgetContainer.getArrayMgr("content").data,selectedId=_widget.id.match(/^select\[([0-9])\]$/i)[1],sTime=this.et2.getWidgetById(selectedId+"start");if(window.opener&&sTime){vareditWindowObj=window.opener.etemplate2.getByApplication("calendar")[0];if("undefined"!=typeofeditWindowObj){varstartTime=editWindowObj.widgetContainer.getWidgetById("start"),endTime=editWindowObj.widgetContainer.getWidgetById("end");startTime&&endTime&&(startTime.set_value(sTime.get_value()),endTime.set_value(sTime.get_value()),endTime.set_value("+"+content.duration))}}elsealert(this.egw.lang("The original calendar edit popup is closed!"))}egw(window).close()},filter_change:function(){varview=app.classes.calendar.views.listview.etemplates[0].widgetContainer||!1,filter=view?view.getWidgetById("nm").getWidgetById("filter"):null,dates=view?view.getWidgetById("calendar.list.dates"):null;filter?app.calendar.state.filter=filter.getValue():deleteapp.calendar.state.filter,filter&&dates&&(dates.set_disabled("custom"!==filter.value),"custom"==filter.value&&jQuery(view.getWidgetById("startdate").getDOMNode()).find("input").focus())},action_open:function(_action,_events){varid=_events[0].id.split("::");if(_action.data.open){varopen=JSON.parse(_action.data.open)||{},extra=open.extra||"";if(extra=extra.replace(/(\$|%24)app/,id[0]).replace(/(\$|%24)id/,id[1]),!extra){varcontext={};egw.dataGetUIDdata(_events[0].id)&&egw.dataGetUIDdata(_events[0].id).data?(context=egw.dataGetUIDdata(_events[0].id).data,extra={}):_events[0].iface.getWidget()&&_events[0].iface.getWidget().instanceOf(et2_valueWidget)&&(context=_events[0].iface.getWidget().getValue?_events[0].iface.getWidget().getValue():_events[0].iface.getWidget().options.value||{},extra={}),context.date&&(extra.date=context.date),context.app&&(extra.app=context.app),context.app_id&&(extra.app_id=context.app_id)}this.egw.open(ope