/*
   * shows date pager on bottom of the resultlist
   */

/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2016 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2018 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2020 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 *
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2016 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2022 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2010 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2011-2012 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2011-2014 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <m.spahn@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <alex@stintzing.net>
 * @copyright   Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2011 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2013 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2017 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2012 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * event combo box and store
 * 
 * @package     Calendar
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <alex@stintzing.net>
 * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2008 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2013 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2015 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2010 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2011 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2015 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2011 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* 
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Nico Hessler <tine20@nico-hessler.de>
 * @copyright   Copyright (c) 2007-2008 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/* && user_id.id*/

/* ["default"] */

/* ["default"].locals */

/* asset import */

/* binding */

/* default */

/* default.locals */

/* fixed calendars */

/* global Ext, Tine */

/* harmony default export */

/* harmony export */

/* harmony import */

/* istanbul ignore if  */

/* istanbul ignore next  */

/*#__PURE__*/

/**
         * overwritten to deal with calendars special filter approach
         *
         * @return {Ext.Panel}
         */

/**
       * Select an event.
       * 
       * @param {Tine.Calendar.Model.Event} event The event to select
       * @param {EventObject} e (optional) An event associated with the selection
       * @param {Boolean} keepExisting True to retain existing selections
       * @return {Tine.Calendar.Model.Event} The selected event
       */

/**
     * @event change
     * Fired whenever a viewstate changes
     * @param {Tine.Calendar.PagingToolbar} this
     * @param {String} activeView
     * @param {Array} period
     */

/**
     * @event changeview
     * fired if an event got clicked
     * @param {Tine.Calendar.MainScreenCenterPanel} mspanel
     * @param {String} view
     */

/**
     * @event dtStartChange
     * @desc  Fired when dtstart chages in UI
     * @param {Json String} oldValue, newValue
     */

/**
     * @event refresh
     * Fired when user request view freshresh
     * @param {Tine.Calendar.PagingToolbar} this
     * @param {String} activeView
     * @param {Array} period
     */

/**
   *
   * @param attendee
   * @param date
   *
   * example
   * http://tine20.example.com:10443/#/Calendar/pollFBView/user/89192f9d3ce44ed3681a1b73d5ca491e766c4d62/2017-12-08
   */

/**
   *
   * @returns {{xtype: string, border: boolean, plain: boolean, activeTab: number, border: boolean, items: [null,null,null]}}
   */

/**
   *  @cfg {Integer} wheelIncrement
   *  the number of pixels to increment on mouse wheel scrolling (defaults to 50)
   */

/**
   * $property Object view -> startdate
   */

/**
   * (re) prepare IMIP
   */

/**
   * @TODO this returns wrong cols on DST boundaries:
   *  e.g. on DST switch form +2 to +1 an all day event is 25 hrs. long
   * 
   * @param {} date
   * @return {}
   */

/**
   * @cfg String moreString
   * i18n._('{0} more...')
   */

/**
   * @cfg defaut text for new attendee combo
   * i18n._('Click here to invite another attender...')
   */

/**
   * @cfg {Array} dayNames
   * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
   */

/**
   * @cfg {Array} monthNames
   * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
   */

/**
   * @cfg {Boolean} denyDragOnMissingEditGrant
   * deny drag action if edit grant for event is missing
   */

/**
   * @cfg {Boolean} initialLoadAfterRender
   */

/**
   * @cfg {Boolean} readOnly
   * no dd acionts if read only
   */

/**
   * @cfg {Boolean} showAttendeeRole
   * true to show roles in the list
   */

/**
   * @cfg {Boolean} showGroupMemberType
   * show user_type groupmember in type selection
   */

/**
   * @cfg {Boolean} showNamesOnly
   * true to only show types and names in the list
   */

/**
   * @cfg {Boolean} showReloadBtn
   */

/**
   * @cfg {Boolean} showTodayBtn
   */

/**
   * @cfg {Bool} cropDayTime
   * crop times before and after dayStart and dayEnd
   */

/**
   * @cfg {Bool} hasDetailsPanel 
   */

/**
   * @cfg {Bool} requireFreeBusyGrantOnly
   *  freebusy grant is sufficient to find ressource (instead of inviteGrant)
   */

/**
   * @cfg {Bool} requireFreeBusyGrantOnly
   * freebusy grant is sufficient to find ressource (instead of inviteGrant)
   */

/**
   * @cfg {Date} dtEnd
   * end of range for this registry 
   */

/**
   * @cfg {Date} dtStart
   * start of range for this registry
   */

/**
   * @cfg {Date} dtstart
   */

/**
   * @cfg {Date} startDate
   * start date
   */

/**
   * @cfg {Ext.data.DataProxy} recordProxy
   */

/**
   * @cfg {Ext.data.Store} store
   */

/**
   * @cfg {Number} autoRefreshInterval (seconds)
   */

/**
   * @cfg {Number} granularity
   * granularity of this registry in minutes
   */

/**
   * @cfg {Number} labelWidth
   * width of left label column
   */

/**
   * @cfg {Number} numOfDays
   * number of days to display
   */

/**
   * @cfg {Number} startDay
   * Day index at which the week should begin, 0-based
   */

/**
   * @cfg {Number} timeGranularity
   * granularity of timegrid in minutes
   */

/**
   * @cfg {Number} timeIncrement
   * time increment for range adds/edits (minutes)
   */

/**
   * @cfg {Number} timeVisible
   * time visible in scrolling area (minutes)
   */

/**
   * @cfg {Object} period
   * period to display
   */

/**
   * @cfg {Object} preparedPart
   * server prepared text/calendar iMIP part 
   */

/**
   * @cfg {String} (H:i) dayEnd
   * generic end of the (work) day
   */

/**
   * @cfg {String} (H:i) dayStart
   * generic start of the (work) day
   */

/**
   * @cfg {String} (H:i) defaultStart
   * generic scroll start of the (work) day
   */

/**
   * @cfg {String} activeView
   */

/**
   * @cfg {String} calWeekString
   * i18n._('WK')
   */

/**
   * @cfg {String} dayFormatString
   * i18n._('{0}, the {1}. of {2}')
   */

/**
   * @cfg {String} defaultAttendeeRole
   * attendee role for new attendee row
   */

/**
   * @cfg {String} dtEndProperty
   */

/**
   * @cfg {String} dtStartProperty
   */

/**
   * @cfg {String} eventCls
   * css class of event ui
   */

/**
   * @cfg {String} label
   * Note: must be escaped properly
   */

/**
   * @cfg {String} loadMaskText
   * i18n._('Loading events, please wait...')
   */

/**
   * @cfg {String} newEventSummary
   * i18n._('New Event')
   */

/**
   * @cfg {String} view
   */

/**
   * @cfg {String} viewType
   */

/**
   * @cfg {Tine.Calendar.EventEditDialog}
   */

/**
   * @cfg {Tine.Calendar.TimelineLabel} label
   */

/**
   * @cfg {Tine.Calendar.someView} view
   */

/**
   * @cfg {Tine.widgets.dialog.EditDialog}
   */

/**
   * @cfg {} eventRecord
   * reference to event record. If set scheduling info for freebusy info will be taken from it
   */

/**
   * @event addEvent
   * fired when a new event got inserted
   * 
   * @param {Tine.Calendar.Model.Event} event
   */

/**
   * @event change
   * Fired whenever a period changes
   * @param {Tine.Calendar.PagingToolbar.AbstractPeriodPicker} this
   * @param {String} corresponding view
   * @param {Array} period
   */

/**
   * @event changePeriod
   * fired when period changed
   * @param {Object} period
   */

/**
   * @event changeView
   * fired if user wants to change view
   * @param {String} requested view name
   * @param {mixed} start param of requested view
   */

/**
   * @event click
   * fired if an event got clicked
   * @param {Tine.Calendar.Model.Event} event
   * @param {Ext.EventObject} e
   */

/**
   * @event contextmenu
   * fired if an event got contextmenu 
   * @param {Ext.EventObject} e
   */

/**
   * @event dblclick
   * fired if an event got dblclicked
   * @param {Tine.Calendar.Model.Event} event
   * @param {Ext.EventObject} e
   */

/**
   * @event onBeforeAllDayScrollerResize
   * fired when an the allDayArea gets resized
   *
   * @param {Tine.Calendar.Model.DaysView} this
   * @param {number} heigt
   */

/**
   * @event updateEvent
   * fired when an event go resised/moved
   * 
   * @param {Tine.Calendar.Model.Event} event
   */

/**
   * @param {String} value
   * @return {Ext.form.Field} this
   */

/**
   * @param {} store
   * @param {} records
   */

/**
   * @private
   * 
   * @param {Number} startIdx
   * @param {Number} endIdx
   * @return {Object}
   */

/**
   * @private
   * 
   * NOTE: Order of items matters! Ext.Layout.Border.SplitRegion.layout() does not
   *       fence the rendering correctly, as such it's impotant, so have the ftb
   *       defined after all other layout items
   */

/**
   * @private
   * @param  {Number} ts
   * @return {Number}
   */

/**
   * @private
   * @param {Ext.data.Store} ds
   */

/**
   * @private
   * @param {String} which
   */

/**
   * @private
   * @param {Tine.Calendar.Model.Event} event
   */

/**
   * @private
   */

/**
   * @private calculates mesh of dates for month this.startDate is in
   */

/**
   * @private periodPicker
   */

/**
   * @private returns a child div in requested position
   * 
   * @param {dom} dayCell
   * @param {Number} pos
   * @return {dom}
   */

/**
   * @private {Array} dateMesh
   */

/**
   * @private {Array} map
   * 
   * array of frames. a frames
   */

/**
   * @private {Date} toDay
   */

/**
   * @private {Number} dt
   */

/**
   * @private {Number} dtEndTs
   */

/**
   * @private {Number} dtStartTs
   */

/**
   * @private {Tine.Calendar.ParallelEventsRegistry} parallelEventsRegistry
   */

/**
   * @property
   */

/**
   * @property Tine.Tinebase.Application app
   */

/**
   * @property actionToolbar
   * @type Ext.Toolbar
   */

/**
   * @property app
   * @type Tine.Calendar.Application
   */

/**
   * @property attendeeViews
   * @type Ext.util.MixedCollection
   */

/**
   * @property autoRefreshTask
   * @type Ext.util.DelayedTask
   */

/**
   * @property eventTpl
   * @type Ext.XTemplate
   * The XTemplate used to create the headings row. By default this just uses <th> elements, override to provide your own
   */

/**
   * @property iMIPrecord
   * @type Tine.Calendar.Model.iMIP
   */

/**
   * @property mainStore store of main view
   * @type Ext.Store
   */

/**
   * @property statusActions
   * @type Array
   */

/**
   * @property {Ext.data.Store}
   * @private
   */

/**
   * @property {Number} scalingFactor
   * percentage per millisecond
   */

/**
   * @property {Object} byAttendee
   * fbInfo grouped by attendee
   */

/**
   * @property {Object} statusMap
   * status per attendee
   */

/**
   * @property {Tine.Calendar.Model.AttenderProxy} recordProxy
   */

/**
   * @property {Tine.Calendar.Model.Poll} poll
   */

/**
   * @see Tine.widgets.dialog.AddToRecordPanel::getFormItems()
   */

/**
   * @see Tine.widgets.dialog.AddToRecordPanel::getRelationConfig()
   */

/**
   * @see Tine.widgets.dialog.AddToRecordPanel::isValid()
   */

/**
   * @static
   */

/**
   * @todo: improve layout, rangeslidercomponent can't deal with resizing! Techically it can but it's extremely slow atm!
   */

/**
   * Binds the paging toolbar to the specified {@link Ext.data.Store}
   * @param {Ext.data.Store} store The data store to bind
   */

/**
   * Creates a recuring event exception
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @param {Boolean} deleteInstance
   * @param {Boolean} deleteAllFollowing
   * @param {Object} options
   * @return {String} transaction id
   */

/**
   * Get a time period of a given slider range
   *
   *    0:0:0 - 23:59:59
   *
   * @param range
   * @return {{from: *, until: *}}
   */

/**
   * Get content panel of calendar application
   *
   * @return {Tine.Calendar.MainScreenCenterPanel}
   */

/**
   * Get translated application title of the calendar application
   *
   * @return {String}
   */

/**
   * Gets the number of selected events.
   * @return {Number}
   */

/**
   * Is called on copy to clipboard
   *
   * @param action
   * @param event
   */

/**
   * Reload store when combobox is cleared
   */

/**
   * Retruns calendar View
   * 
   * @return {Tine.Calendar.View}
   */

/**
   * Return CSS class to apply to rows depending upon due status
   * 
   * @param {Tine.Tasks.Task} record
   * @param {Integer} index
   * @return {String}
   */

/**
   * Returns a panel with a text field for a remote location and a description
   * 
   * @returns {Object}
   */

/**
   * Returns a panel with a upload field and descriptions
   * 
   * @returns {Object}
   */

/**
   * Returns an array of the selected events
   * @return {Array}
   */

/**
   * Returns data store
   * 
   * @deprecated
   * @return {Ext.data.Store}
   */

/**
   * Returns selection model
   * 
   * @deprecated
   * @return {Tine.Calendar.EventSelectionModel}
   */

/**
   * Returns the HTML that will be placed into the <head> element of th print window.
   * @param {Ext.Component} component The component to render
   * @return {String} The HTML fragment to place inside the print window's <head> element
   */

/**
   * Returns the first selected event.
   * @return {Record}
   */

/**
   * Select an event.
   * 
   * @param {Tine.Calendar.Model.Event} event The event to select
   * @param {EventObject} e (optional) An event associated with the selection
   * @param {Boolean} keepExisting True to retain existing selections
   * @return {Tine.Calendar.Model.Event} The selected event
   */

/**
   * The amount of space to reserve for the scrollbar (defaults to 19 pixels)
   * @property {Number}
   * @private
   */

/**
   * The minmum all day height in px
   * @property Number
   * @private
   */

/**
   * The record currently being edited
   * 
   * @type Tine.Calendar.Model.Event
   * @property record
   */

/**
   * The time in milliseconds, a scroll should be delayed after using the mousewheel
   * @property Number
   * @private
   */

/**
   * To show or hide the paging toolbar
   */

/**
   * Unbinds the paging toolbar from the specified {@link Ext.data.Store}
   * @param {Ext.data.Store} store The data store to unbind
   */

/**
   * Updates given record with data from this panel
   * called by edit dialog to get data
   * 
   * @param {Tine.Calendar.Model.Event} record
   */

/**
   * add hint if events are outside visible area
   * 
   * @param {} e
   * @param {} t
   * @param {} o
   */

/**
   * add records from other applications using the split add button
   * - activated by default
   * 
   * @type Bool
   * @property splitAddButton
   */

/**
   * adjusts given date (end/start) to user preference (hours)
   * 
   * @param {Date} dateValue
   * @param {String} prefKey
   * @return {Date}
   */

/**
   * adopt attr
   * 
   * @param {Object} attr
   */

/**
   * auto hook text i18n._('New Event')
   */

/**
   * autosave
   */

/**
   * buffered version of this.unbufferedOnLayout
   * @see this.initComponent
   */

/**
   * bus notified about record changes
   */

/**
   * called before store queries for data
   */

/**
   * called when events are droped on a calendar node
   * 
   * NOTE: atm. event panels only allow d&d for single events
   * 
   * @private
   * @param  {Ext.Event} dropEvent
   * @return {Boolean}
   */

/**
   * called when import request sends response
   * 
   * @param {Object}   request
   * @param {Boolean}  success
   * @param {Object}   response
   * @param {Function} callback
   */

/**
   * called when store loaded data
   */

/**
   * cancel collapse if ctx menu is shown
   */

/**
   * checks if a slice in a given frame is free
   * 
   * @private
   * @param {Array} frame
   * @param {Number} startIdx
   * @param {Number} endIdx
   */

/**
   * checks if form data is valid
   * 
   * @return {Boolean}
   */

/**
   * checks, if the last filter still matches after update
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @param {Tine.Calendar.Model.Event} updatedEvent
   */

/**
   * collapses the result list only when periodpicker is not active
   * @return {Boolean}
   */

/**
   * color sets for colors from colorPalette
   * 
   * @type Array 
   * @property colorSchemata
   */

/**
   * copy record
   * 
   * TODO change attender status?
   */

/**
   * create bogus attendee record for directly entered email-addresses
   */

/**
   * creates a new event directly from this view
   * @param {} event
   */

/**
   * ctx menu
   * 
   * @type Ext.menu.Menu
   * @property ctxMenu
   */

/**
   * default duration for new events
   */

/**
   * default panel w.o. data
   * 
   * @return {Ext.ux.display.DisplayPanel}
   */

/**
   * default print mode
   * 
   * @type String {sheet|grid}
   * @property defaultPrintMode
   */

/**
   * delete a recuring event series
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @param {Object} options
   * @return {String} transaction id
   */

/**
   * disable contents not panel
   */

/**
   * display event in mainscreen
   * @param {String} id
   *
   * example:
   * http://tine20.example.com:10443/#/Calendar/showEvent/89192f9d3ce44ed3681a1b73d5ca491e766c4d62
   */

/**
   * dissalow loading of all and otherUsers node
   * 
   * @param {Ext.tree.TreeNode} node
   * @param {Ext.EventObject} e
   * @return {Boolean}
   */

/**
   * do import request
   * 
   * @param {Function} callback
   * @param {Object}   importOptions
   */

/**
   * executed after record got updated from proxy
   */

/**
   * extract attendee filter from filters
   *
   * @param {Array} filters
   */

/**
   * extract attendee filter values from filters
   *
   * @param {Array} filters
   */

/**
   * fetches elements from our generated dom
   */

/**
   * fill the events into the view
   */

/**
   * generic apply changes handler
   * @param {Boolean} closeWindow
   */

/**
   * get checked attendee
   */

/**
   * get copy action
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @return {Object}
   */

/**
   * get current view type (Grid/Day/Week/...)
   *
   * @param {String} view
   * @returns {Boolean}
   */

/**
   * get date of a (event) target
   * 
   * @param {Ext.EventObject} e
   * @param {number} graticule
   * @param {char} graticuleEdge one of n (north) s, (south)
   * @return {Date}
   */

/**
   * get detailed info (HTML) for a single attendee
   *
   * @param {Record} attendee
   */

/**
   * get detailed info (HTML) grouped by attendee
   *
   * @param {Store} attendees
   */

/**
   * get diff of resizeable
   *
   * @param {Ext.Resizeable} rz
   */

/**
   * get eventStatusAction action
   *
   * @param {Tine.Calendar.Model.Event} event
   * @return {Object}
   */

/**
   * get height in % of the diff for the given dates
   *
   * @param {date} dtStart
   * @param {date} dtEnd
   * @returns {number}
   */

/**
   * get height in px of the diff for the given dates (with current scaling)
   *
   * @param {date} dtStart
   * @param {date} dtEnd
   * @returns {number}
   */

/**
   * get max state of all attendee
   *
   * @return {Number} one of Tine.Calendar.FreeBusyInfo.states
   */

/**
   * get north panel for given contentType
   *
   * @param {String} contentType
   * @return {Ext.Panel}
   */

/**
   * get number of maximal parallel events in given time span
   * 
   * @param {Date} dtStart
   * @param {Date} dtEnd
   * @return {Number}
   */

/**
   * get number of minutes represented by height in px (current scaleing)
   *
   * @param {number} height
   * @returns {number}
   */

/**
   * get offset in % for the time part of given date
   *
   * @param {date|number} date
   * @returns {number}
   */

/**
   * get offset in px for the time part of given date (with current scaling)
   *
   * @param {date} date
   * @returns {number}
   */

/**
   * get position of given event
   * 
   * @param {Ext.data.Record} event
   * @return {Number}
   */

/**
   * get response action
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @return {Object}
   */

/**
   * get short info (HTML with hover) for a single attendee
   *
   * @param {Record} attendee
   * @param {Record} event
   * @return {Number} one of Tine.Calendar.FreeBusyInfo.states
   */

/**
   * gets HTML fragment of the day columns
   */

/**
   * gets HTML fragment of the horizontal time rows
   */

/**
   * gets HTML fragment of the time over rows
   */

/**
   * gets event el of target
   *
   * @param {Ext.EventObject} e
   * @return {Tine.Calendar.Model.Event}
   */

/**
   * gets name of attender
   * 
   * @return {String}
   */

/**
   * give new attendee an extra cls
   */

/**
   * gray color set
   * 
   * @type Object 
   * @property gray
   */

/**
   * grid panel phone hook for calling attendee
   * 
   * @type Tine.Phone.AddressbookGridPanelHook
   */

/**
   * grid specific
   * @private
   */

/**
   * hack for container only support
   * 
   * @param {Tine.Calendar.Model.Evnet} event
   * @return {Object} colorset
   */

/**
   * iMIP action toolbar
   */

/**
   * id of current account
   * 
   * @type Number
   * @property currentAccountId
   */

/**
   * if this addRelations is set, iterate and create attendee
   */

/**
   * import events
   * 
   * @param {Button} btn 
   */

/**
   * init import wizard
   */

/**
   * init month view
   */

/**
   * init phone grid panel hook if Phone app is available
   */

/**
   * init template
   * @private
   */

/**
   * init this component
   */

/**
   * init this view
   */

/**
   * initialises filter toolbar
   *  @private
   */

/**
   * inits all tempaltes of this view
   */

/**
   * inits this component
   */

/**
   * inits time scale
   * @private
   */

/**
   * is called after all subpanels have been loaded
   */

/**
   * is called on action cut
   * 
   * @param {} action
   * @param {} event
   */

/**
   * is called on action paste
   * 
   * @param {Date} datetime
   */

/**
   * is called on cancelling cut & paste
   */

/**
   * is called on scroll of a grid, scrolls the other grids
   * 
   * @param {Object} activeView
   * @param {Object} e Event
   */

/**
   * is called, when list is initialized, appends a date-paging-toolbar instead a normal one
   */

/**
   * is this event a recuring base event?
   * 
   * @return {Boolean}
   */

/**
   * is this event a recuring exception?
   * 
   * @return {Boolean}
   */

/**
   * is this event an recuring event instance?
   * 
   * @return {Boolean}
   */

/**
   * just needed when inserted in an eventpickercombobox
   */

/**
   * layouts a single day cell
   * 
   * @param {dom} cell
   * @param {Bool} hideOverflow
   * @param {Bool} updateHeader
   */

/**
   * layouts the contents (sets 'more items marker')
   */

/**
   * layouts the view
   */

/**
   * load perspective into dialog
   */

/**
   * loads this panel with data from given record
   * called by edit dialog when record is loaded
   * 
   * @param {Tine.Calendar.Model.Event} record
   * @param Array addAttendee
   */

/**
   * main event details panel
   * 
   * @return {Ext.ux.display.DisplayPanel}
   */

/**
   * mute first alert
   * 
   * @param {} button
   * @param {} e
   */

/**
   * need this, because we use setValue from Tine.Tinebase.widgets.form.RecordPickerComboBox
   */

/**
   * on dt start change
   * 
   * @param {} dtStartField
   * @param {} newValue
   * @param {} oldValue
   */

/**
   * on store load exception
   * 
   * @param {Tine.Tinebase.data.RecordProxy} proxy
   * @param {String} type
   * @param {Object} error
   * @param {Object} options
   */

/**
   * onContextMenu
   * 
   * @param {Event} e
   */

/**
   * open event in new window
   * 
   * @param {String} action  add|edit|copy
   * @param {String} event   edit given event instead of selected event
   * @param {Object} plugins event dlg plugins
   * @param {Object} default properties for new items
   */

/**
   * perform the initial load of grid data
   */

/**
   * period NOTE: might not fit to current range on view changes!
   */

/**
   * preform the initial load of grid data
   */

/**
   * prepare paging and sort
   *
   * @param {Ext.data.Store} store
   * @param {Object} options
   */

/**
   * prevent menu hide
   */

/**
   * print wrapper
   */

/**
   * process IMIP
   * 
   * @param {String} status
   */

/**
   * provide events to do an freeBusy info checkup for when searching attendee
   *
   * @cfg {Function} freeBusyEventsProvider
   */

/**
   * record class
   * @cfg {Tine.Addressbook.Model.Contact} recordClass
   */

/**
   * record currently being edited or false
   * @property {Record} editing
   * @private
   */

/**
   * register event
   * @param {Ext.data.Record} event
   * @param {bool} returnAffected
   * @return mixed
   */

/**
   * registers evnet in given frame for given slice
   * 
   * @private
   * @param {Array} frame
   * @param {Number} startIdx
   * @param {Number} endIdx
   * @param {Ext.data.Record} event
   * @return this
   */

/**
   * registers evnet in given frame for given slice 
   * 
   * @private
   * @param {Array} frame
   * @param {Number} startIdx
   * @param {Number} endIdx
   * @return this
   */

/**
   * remove all events from dom
   */

/**
   * removes a event from the dom
   * @param {Tine.Calendar.Model.Event} event
   */

/**
   * removes a event from the dom
   */

/**
   * removes all events from dom
   */

/**
   * removes all events from store
   */

/**
   * render attender user name
   *
   * @param name
   * @returns {*}
   */

/**
   * renders a single event into this daysview
   * @param {Tine.Calendar.Model.Event} event
   * 
   * @todo Add support vor Events spanning over a day boundary
   */

/**
   * renders attendee names
   * 
   * @param {Array} attendeeData
   * @return {String}
   */

/**
   * renders datetime
   * 
   * @param {Date} dt
   * @return {String}
   */

/**
   * renders the view
   */

/**
   * respect record.getTitle method
   */

/**
   * returns HTML fragment of the whole day cols
   */

/**
   * returns HTML frament of the day headers
   */

/**
   * returns account_id if attender is/has a user account
   * 
   * @return {String}
   */

/**
   * returns all filter data for current view
   */

/**
   * returns attender record of current account if exists, else false
   */

/**
   * returns cm
   * 
   * @return Ext.grid.ColumnModel
   * @private
   */

/**
   * returns dialog
   * 
   * NOTE: when this method gets called, all initalisation is done.
   * @return {Object} components this.itmes definition
   */

/**
   * returns displaycontainer with orignialcontainer as fallback
   * 
   * @return {Array}
   */

/**
   * returns events dom
   * @return {Array} of Ext.Element
   */

/**
   * returns events of current range sorted by duration
   * 
   * @param  {Date} dtStart
   * @param  {Date} dtEnd
   * @return {Array}
   */

/**
   * returns filter toolbar of mainscreen center panel of app this picker panel belongs to
   */

/**
   * returns frame of given position. 
   * If no frame is found on given position it will be created implicitlty
   * 
   * @private
   * @param {Number} position
   * @return {Array}
   */

/**
   * returns iconCls of this application
   *
   * @param {String} target
   * @return {String}
   */

/**
   * returns id of attender of any kind
   */

/**
   * returns index of dateCell given date is in
   * @param {Date} date
   */

/**
   * returns period of currently displayed month
   * @return {Object}
   */

/**
   * returns requested CalendarPanel
   * 
   * @param {String} which
   * @return {Tine.Calendar.CalendarPanel}
   */

/**
   * returns requested period
   * @return {Array}
   */

/**
   * returns store of attender objects
   * 
   * @param  {Array} attendeeData
   * @return {Ext.data.Store}
   */

/**
   * returns store of currently active view
   */

/**
   * returns the file panel of this wizard (step 1)
   */

/**
   * returns the paste action
   * 
   * @param {Date} datetime
   * @param {Tine.Calendar.Model.Event} event
   */

/**
   * returns the selectionModel of the active panel
   * @return {}
   */

/**
   * returns true for external contacts
   */

/**
   * set attendee value
   * 
   * @param {Array} value
   */

/**
   * set filter value (done by MainScreenCenterPanel::onStoreLoad)
   * 
   * @param {Array} filter
   */

/**
   * sets period ans searchword as query parameter
   * @param {} store
   */

/**
   * sets values to innerForm
   */

/**
   * show extra window & prevent autosave
   */

/**
   * show/layout iMIP panel
   */

/**
   * shows an reload button in the datepager
   */

/**
   * shows an today button in the datepager
   */

/**
   * shows if the periodpicker is active
   * @type boolean
   */

/**
   * store holding timescale
   * @property {Ext.data.Store}
   * @private
   */

/**
   * store to hold all attendee
   * 
   * @type Ext.data.Store
   * @property attendeeStore
   */

/**
   * sync to filter panel
   */

/**
   * the event edit dialog (parent)
   * @type Tine.Calendar.EventEditDialog
   */

/**
   * unregister event
   * 
   * @param {Ext.data.Record} event
   */

/**
   * update event details panel
   * 
   * @param {Tine.Tinebase.data.Record} record
   * @param {Mixed} body
   */

/**
   * update perspective from dialog
   */

/**
   * updates HTML of day headers
   */

/**
   * updates a recuring event series
   * 
   * @param {Tine.Calendar.Model.Event} event
   * @param {Object} options
   * @return {String} transaction id
   */

/**
   * updates period to display
   * @param {Array} period
   */

/**
   * value renderer
   * 
   * @param {Ext.data.Record} filter line
   * @param {Ext.Element} element to render to 
   */

/**
 *
 * @param freeBusyInfo
 * @constructor
 */

/**
 * @TODO ui for active view?
 * @TODO we could also create views beforeload for better performace
 * 
 */

/**
 * @class   Tine.Calendar.Printer.BaseRenderer
 * @extends Ext.ux.Printer.BaseRenderer
 * 
 * Printig renderer for Ext.ux.printing
 */

/**
 * @class Tine.Calendar.CalendarPanel
 * @namespace Tine.Calendar
 * @extends Ext.Panel
 * @author Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @class Tine.Calendar.EventDetailsPanel
 * @namespace Tine.Calendar
 * @extends Tine.widgets.grid.DetailsPanel
 * @author Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @class Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @extends Ext.util.Observable
 * @constructor
 * @param {Object} config
 */

/**
 * @class Tine.Calendar.PagingToolbar.CustomPeriodPicker
 * @extends Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @constructor
 */

/**
 * @class Tine.Calendar.PagingToolbar.DayPeriodPicker
 * @extends Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @constructor
 */

/**
 * @class Tine.Calendar.PagingToolbar.MonthPeriodPicker
 * @extends Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @constructor
 */

/**
 * @class Tine.Calendar.PagingToolbar.WeekPeriodPicker
 * @extends Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @constructor
 */

/**
 * @class Tine.Calendar.PagingToolbar.YearPeriodPicker
 * @extends Tine.Calendar.PagingToolbar.AbstractPeriodPicker
 * @constructor
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AbstractView
 * @extends     Ext.Container
 *
 * Calendar abstract view
 *
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AddToEventPanel
 * @extends     Tine.widgets.dialog.AddToRecordPanel
 * @author      Alexander Stintzing <alex@stintzing.net>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AddressbookGridPanelHook
 * 
 * <p>Calendar Addressbook Hook</p>
 * <p>
 * </p>
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * 
 * @constructor
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.Application
 * @extends     Tine.Tinebase.Application
 * Calendar Application Object <br>
 *
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AttendeeFilterModel
 * @extends     Tine.widgets.grid.FilterModel
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AttendeeFilterModelValueField
 * @extends     Ext.ux.form.LayerCombo
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AttendeeGridPanel
 * @extends     Ext.grid.EditorGridPanel
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AttendeePickerCombo
 * @extends     Tine.Tinebase.widgets.form.RecordPickerComboBox
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.DaysView
 * @extends     Tine.Calendar.AbstractView
 * Calendar view representing each day in a column
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.ExceptionHandler
 * 
 * <p>Exception Handler for Calendar</p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.FilterPanel
 * @extends     Tine.widgets.persistentfilter.PickerPanel
 * 
 * <p>Calendar Favorites Panel</p>
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Calendar.FilterPanel
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.GridView
 * @extends     Ext.grid.GridPanel
 * 
 * Calendar grid view representing
 * 
 * @TODO generalize renderers and role out to displaypanel/printing etc.
 * @TODO add organiser and own status
 * 
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.PerspectiveCombo
 * @extends     Ext.form.ComboBox
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * 
 * @TODO make displaycontainer setting work
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.ResourcePickerCombo
 * @extends     Tine.Tinebase.widgets.form.RecordPickerComboBox
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.RruleFilter
 * @extends     Tine.widgets.grid.FilterModel
 *
 * @author      Michael Spahn <m.spahn@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.RruleFilterValueField
 * @extends     Ext.ux.form.LayerCombo
 *
 * @author      Michael Spahn <m.spahn@metaways.de>
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.TimelineLabel
 * @extends     Ext.Component
 *
 * Calendar timeline view
 *
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.TimelinePanel
 * @extends     Ext.Panel
 *
 * Calendar timeline view
 *
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.TimelineView
 * @extends     Tine.Calendar.AbstractView
 *
 * Calendar timeline view
 *
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace   Tine.Calendar.Model
 * @class       Tine.Calendar.Model.ResourceType
 * @extends     Tine.Tinebase.data.Record
 * ResourceType Record Definition
 */

/**
 * @namespace   Tine.Calendar.Model
 * @class       Tine.Calendar.Model.iMIP
 * @extends     Tine.Tinebase.data.Record
 * iMIP Record Definition
 */

/**
 * @namespace Tine.Calendar
 * @class     Tine.Calendar.CalendarSelectTreePanel
 * @extends   Tine.widgets.container.TreePanel
 * 
 * Main Calendar Select Panel
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/**
 * @namespace Tine.Calendar
 * @class     Tine.Calendar.ResourceEditDialog
 * @extends   Tine.widgets.dialog.EditDialog
 * Resources Grid Panel <br>
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace Tine.Calendar
 * @class     Tine.Calendar.ResourceGridPanel
 * @extends   Tine.widgets.grid.GridPanel
 * Resources Grid Panel <br>
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.ColorManager
 * Colormanager for Coloring Calendar Events <br>
 * 
 * @constructor
 * Creates a new color manager
 * @param {Object} config
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2007-2008 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.EventEditDialog
 * @extends Tine.widgets.dialog.EditDialog
 * Calendar Edit Dialog <br>
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.EventSelectionModel
 * @extends Ext.tree.MultiSelectionModel
 * Selection model for a calendar views.
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.FreeTimeSearchDialog
 * @extends Ext.Panel
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.MainScreen
 * @extends Tine.widgets.MainScreen
 * MainScreen of the Calendar Application <br>
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 * @constructor
 * Constructs mainscreen of the calendar application
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.MonthView
 * @extends Ext.util.Observable
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace Tine.Calendar
 * @class Tine.Calendar.YearView
 * @extends Ext.util.Observable
 * @constructor
 * @param {Object} config
 */

/**
 * @namespace Tine.Calendar.Model
 * 
 * creates store of attender objects
 * 
 * @param  {Array} attendeeData
 * @return {Ext.data.Store}
 * @static
 */

/**
 * @namespace Tine.Calendar.Model
 * 
 * get default data for a new attender
 *  
 * @return {Object} default data
 * @static
 */

/**
 * @namespace Tine.Calendar.Model
 * 
 * get default data for a new resource
 *  
 * @return {Object} default data
 * @static
 */

/**
 * @namespace Tine.Calendar.Model
 * @class Tine.Calendar.Model.Attender
 * @extends Tine.Tinebase.data.Record
 * Attender Record Definition
 */

/**
 * @namespace Tine.Calendar.Model
 * @class Tine.Calendar.Model.Event
 * @extends Tine.Tinebase.data.Record
 * Event record definition
 */

/**
 * @namespace Tine.Calendar.Model
 * @class Tine.Calendar.Model.EventJsonBackend
 * @extends Tine.Tinebase.data.RecordProxy
 * 
 * JSON backend for events
 */

/**
 * @namespace Tine.Calendar.Model
 * @class Tine.Calendar.Model.Resource
 * @extends Tine.Tinebase.data.Record
 * Resource Record Definition
 */

/**
 * Calendar Admin Panel Popup
 * 
 * @param   {Object} config
 * @return  {Ext.ux.Window}
 */

/**
 * Calendar west panel
 * 
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.WestPanel
 * @extends     Tine.widgets.mainscreen.WestPanel
 * 
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * 
 * @constructor
 * @xtype       tine.calendar.mainscreenwestpanel
 */

/**
 * Color Strategies Registry
 * 
 * @type Object
 */

/**
 * Create new EventFinderOptionsDialog window
 */

/**
 * Create new import window
 */

/**
 * File picker dialog
 *
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.EventFinderOptionsDialog
 * @extends     Ext.FormPanel
 * @constructor
 * @param       {Object} config The configuration options.
 */

/**
 * Info Color Bar Strategies Registry
 *
 * @type Object
 */

/**
 * Model of a grant
 */

/**
 * Opens a new event edit dialog window
 * 
 * @return {Ext.ux.Window}
 */

/**
 * Opens a new free time serach dialog window
 *
 * @return {Ext.ux.Window}
 */

/**
 * Opens a new resource edit dialog window
 * 
 * @return {Ext.ux.Window}
 */

/**
 * Simple Import Dialog
 *
 * @namespace   Tine.widgets.dialog
 * @class       Tine.widgets.dialog.ImportDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * @constructor
 * @param       {Object} config The configuration options.
 * 
 * TODO add app grid to show results when dry run is selected
 */

/**
 * admin settings panel
 * 
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AdminPanel
 * @extends     Ext.TabPanel
 * 
 * <p>Calendar Admin Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2009 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Calendar.AdminPanel
 */

/**
 * attendee filter gird widget
 * 
 * @TODO: remove attendee deleted on server?
 * 
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.AttendeeFilterGrid
 * @extends     Tine.Calendar.AttendeeGridPanel
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 */

/**
 * display panel for MIME type text/calendar
 * 
 * NOTE: this panel is registered on Tine.Calendar::init
 * 
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.iMIPDetailsPanel
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @constructor
 */

/**
 * event selection combo box
 *
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.SearchCombo
 * @extends     Ext.form.ComboBox
 *
 * <p>Event Search Combobox</p>
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <alex@stintzing.net>
 * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Calendar.SearchCombo
 *
 * @TODO        Extend Tine.Tinebase.widgets.form.RecordPickerComboBox once this class
 *              is rewritten to use beforeload/load events
 */

/**
 * get default data for a new event
 *  
 * @return {Object} default data
 * @static
 */

/**
 * get default data for a new resource
 *
 * @return {Object} default data
 * @static
 */

/**
 * registry to cope with parallel events
 * 
 * @class Tine.Events.ParallelEventsRegistry
 * @constructor
 */

/**
 * render event container_id
 */

/**
 * render location relation
 *
 * @param data
 * @param cell
 * @param record
 * @returns {*|String}
 */

/**
 * render site relation
 *
 * @param data
 * @param cell
 * @param record
 * @returns {*|String}
 */

/**
 * render the CalDAV Url into property panel of containers
 * 
 * @class   Tine.Calendar.CalDAVContainerPropertiesHookField
 * @extends Tine.widgets.container.CalDAVContainerPropertiesHookField
 */

/**
 * returns attendee data
 * optinally fills into event record
 */

/**
 * returns attendee record of given attendee if exists, else false
 * @static
 */

/**
 * returns attender record of current account if exists, else false
 * @static
 */

/**
 * returns cm
 *
 * @return Ext.grid.ColumnModel
 */

/**
 * set current alternative as definite event
 */

/**
 * show all events, given contact record is attender of
 * 
 * NOTE: This Grid does not show recuings yet!
 *       If we want to display recurings we need to add a period filter.
 *       We might be able to do so after we have a generic calendar list widget
 *       with a generic period paging tbar
 *       
 * @namespace   Tine.Calendar
 * @class       Tine.Calendar.ContactEventsGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 */

/** distinct click from dblClick **/

/** end distinct click from dblClick **/

/*************************************** frame functions **********************************/

/***/

/*, 'notin'*/

/*, {
             xtype: 'checkbox',
             fieldLabel: this.app.i18n._('Basic Data Only'),
             boxLabel: this.app.i18n._('Import basic data only (i.e. without attendee, alarms, uid, ...)'),
             name: 'onlyBasicData'
          }*/

/*.add(Date.SECOND, -1)*/

/*defaultOperator: 'in',*/

//

//    

//        

//            

//                attendeeFilter.formFields.operator.setValue('in');

//                html: '<p>' + this.app.i18n._('Following you find a list of all supported import formats and a sample file, how Tine 2.0 expects your file to look like.') + '</p><br />'

//                return event.data.dtstart.getTime() < dayEnd.getTime() && event.data.dtend.getTime() > dayStart.getTime();

//                xtype: 'label',

//            // get events in this day

//            dayEnd   = dayStart.add(Date.DAY, 1).add(Date.SECOND, -1);

//            dayEvents = view.store.queryBy(function(event){

//            dayStart = view.startDate.add(Date.DAY, i);

//            days.push(this.generateDay(dayStart, dayEnd, dayEvents));

//            else if (preconditions.hasOwnProperty('TOPROCESS')) {

//            });

//            }, {

//         // but we would need to foreground the window and this is not possible for the browser

//         // save via mainscreen to show fbExceptions and recurring decistions

//        //    this.multiTpl.overwrite(body);

//        // iterate days

//        //if (this.multiTpl) {

//        //}

//        for (var dayStart, dayEnd, dayEvents, i=0; i<view.numOfDays; i++) {

//        return this.getSelectedEvents();

//        return view.numOfDays === 1 ? days[0] : String.format('<table>{0}</table>', this.generateCalRows(days, view.numOfDays < 9 ? 2 : 7));

//        this might be confusing in print

//        this.cardPanel.layout.setActiveItem(this.cardPanel.items.getKey(this.defaultPanel));

//        var body  = 

//        var days = [];

//        var topic = this.generateHeader(view);

//        }

//       -> use choose definite event

//       As ext has no suiteable layout for this, we do a little hack

//       WELL we could add the info to search attendee somehow

//       a problem here we have to find a smart solution

//       as the view just might be empty. If an unloded store is

//       so we can't set correct values in containing record here!

//       the buttons will be moved on chageView later

//     * 

//     * @param {Ext.grid.RowSelectionModel} sm

//     * @param {Mixed} body

//     * show default panel

//     * show template for multiple rows

//     */

//     .then(function() {

//     activePanel = cp.getCalendarPanel(cp.activeView),

//     activeView = activePanel.getView();

//     });

//    /**

//    // i18n._('Event attendee')

//    BUT startDate sticks to first of month!

//    filterName: 'ContactAttendeeFilter',

//    filtertype: 'foreignrecord',

//    foreignRecordClass: 'Calendar.Event',

//    generateBody: function(view) {

//    getSelections: function() {

//    label: 'Event attendee'

//    linkType: 'foreignId', 

//    showDefault: function(body) {

//    showMulti: function(sm, body) {

//    }

//    },

//  - sheetView begins with end of last month and ends with beginning of next month

//  - timelineView starts with the first and ends with the last

//  the check only sees [Object Object] wich of course never changes...

//  yes, this is a mem leak - but it's ok as recreate is a rare action

// #endif

// #if process.env.NODE_ENV !== 'unittest'

// 'resourceExport', // should be resource-admin?

// 'resourceSync',   // no sync targets - let's save space

// - ...

// - if one attendee is busy

// - if organizer is busy

// - resources are busy

// -> otherwise loading spinner would be active event if the view beforeload cancels the request

// 00:00 in users timezone is a spechial case where the user expects

// 30 minutes

// <- initialHeight

// @IDEA: this could be a combo later

// @TODO check if event is visible and skip scrolling -> defered scrolling looks ugly

// @TODO compute max minutes also

// @TODO do this on period change only

// @TODO have load spinner?

// @TODO have some config here? user vs. default?

// @TODO implement clipbord field (trigger field)

// @TODO move to common function with daysView::notifyDrop parts

// @TODO print rrule

// @TODO sort out css

// @TODO timeline view

// @TODO: have own (grouping) ui

// @TODO: if week is not standard, have a marker in btn?

// @TODO: if you have a lot of allDayEvents, your scroller gets smaller,

// @see https://github.com/ericmorand/twing/issues/332

// @todo generalise!

// @todo move displaycal if curruser is attender

// @todo move this to dragOver

// Add new attendee

// BUT: add Grant is container based!

// CONCATENATED MODULE: ./ux/form/FieldTriggerPlugin.js

// Calendar is the only app with record based grants -> user gets edit grant for all fields when copying

// Calendar_Exception_InvalidUrl

// Container already exists

// EXPORTS

// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js

// Exports

// FIXME: how can this be null? is it ok??

// For old IE

// If url is already wrapped in quotes, remove them

// Module

// NEEDS-ACTION is not appropriate in iMIP context

// NOTE: '+1' is to ensure we display the ISO8601 based week where weeks always start on monday!

// NOTE: Ext keeps proxy if element is not destroyed (diff !=0)

// NOTE: already encoded

// NOTE: ext dosn't support move events via api

// NOTE: for transistent events id is not part of data but we need the transistent id e.g. for freeBusy info

// NOTE: it's not possible to remove a persistent poll here

// NOTE: mind the add new attendee row!

// NOTE: monthView periods differ for views.

// NOTE: only mainscreen can handle busyConflicts

// NOTE: only render the button once for the toolbars

// NOTE: store.getCount == 0 is no indicator for an unloaded store

// NOTE: the store checks if data changed. If we don't overwrite to string, 

// NOTE: the store somehow changes, so refetch it

// NOTE: this fn gets also called from other scopes

// NOTE: this is already done by the view itself - don't have dublicate events in mainscreen!

// NOTE: we can't compute if the user has editgrant to the displaycontainer of an account here!

// NOTE: we can't use a normal hbox layout as it can't deal with minWidth and overflow.

// NOTE: we can't use checked items here as we use icons already

// NOTE: we don't iterate the attendeeStore as we would loose attendee order than

// NOTE: we need both setWidht statements, otherwise safari keeps scroller space

// NOTE: we need to dereference btn's in source view, oterwise btn's get destroyed on cmp destroy

// NOTE: we need to redraw event as resizer is broken after one attempt

// NOTE: we remove from items to avoid autoDestroy

// NOTE: when entering a plain mail, getValue is called (from onBlur or onSpecialkey) (no set value!!!)

// Only show records with edit grant

// PROXY

// See https://drafts.csswg.org/css-values-3/#urls

// Set status if the resource has a specific default status

// Should url be wrapped?

// Someone replied => autoprocessing atm.

// Special case to return head of iframe instead of iframe itself

// Start with unmodified Record

// TODO allow to copy recurring events / exceptions

// TODO this is set to null somewhere in the Calendar, find a better place to fix this

// TODO: Move copied pSBC code out of here!

// This will throw an exception if access to iframe is blocked

// Validate Summary maxLength

// Validate Summary minLength

// We need to get all resources and store them in memory for default Data Creation

// _('GENDER_Calendar')

// _('Set as definite event')

// a combo with all attendee + origin/organizer

// a personal container of the current user

// abort edit on ESC key

// abort normal flow

// activate grid header menu for column selection

// activeView.showEvent(record)

// activities and tags

// add admin (and other) grant for resource managers

// add detail panel

// add each list member to fixedGroups

// add filter toolbar

// add groupmember for user

// add more actions here (no spam / apply / crush / send event / ...)

// add new attendee

// add new user:

// add or edit?

// add period filter as last filter to not conflict with first OR filter

// add phone call action via item registry

// add subviews new to filter

// adjust date to user preference

// adjust initial size to avoid flickering when start resizing

// adjust scrollConfig

// after items are rendered

// all but option attendee

// allow status setting if status authkey is present

// allways start with an empty filter set!

// alt -> prefer calendarOwner in intelligent mode

// and the button handling is complicated

// apply os specific scrolling space

// apply preferences

// assemble event actions

// attendeePickerCombo

// auto location

// autocomplete view

// baseCls: 'ux-subformpanel',

// blue

// brown

// calculate duration and parallels

// calculate period start

// change attendee in split view

// check for hint clicks first

// check if displaycontainer of owner got changed

// check if event is currently visible by looking into ui.domIds

// check if events fits into view @see Tine.Calendar.MainScreenCenterPanel::congruenceFilterCheck

// check if store is current store

// check preconditions

// clean empty slices

// clear favorites

// clear selections from other views

// clear state

// click vs. setValue!

// compute status icons

// const state = Ext.state.Manager.get('cal-pgtb-pp-wkbtn');

// constrain to other boundary

// constraint to graticule

// convert old boolean argument

// create a copy of selection so selection changes don't affect this

// create parallels registry

// create view for each attendee

// crop daytime

// date has no time part

// day headers

// defer to have the loadMask centered in case of rendering actions

// deselect/reduce

// detect duplicate entry

// disable container selection combo if user has no right to edit

// disable for the moment, as updating calendarSelectWidget is not working in both directions

// disable relations panel for non persistent exceptions till we have the baseEventId

// disable time selectors if this is a whole day event

// disable unselect on radio item

// display spam box -> might be accepted by user?

// do we have a 'real' event?

// don't allow dragging of dirty events

// don't allow dragging with missing edit grant

// don't allow to set anything besides quantity and role for already set attendee

// don't care for right btn

// don't create events with very small duration

// don't delete 'add' row

// don't fire update events on rangeAdd

// don't save initial 'add attendee' record

// don't update events while being created

// draged from allDay -> droped to scroller will be resetted to hone hour

// draged from scroller -> dropped to allDay and duration less than a day

// due to cross-origin restrictions

// else

// end of pSBC

// endif

// event copy

// example for explicit definition

// fallback to default value

// filter grid helper field

// finally apend generic options from Calendar_Import_Abstract

// for all other fields user need editGrant

// force event length to at least 1 minute

// force positioning on scroll hints

// frame: true,

// get events in this day

// getRzInfo calcs wrong values???

// give up!

// grant helper fields

// green

// grid could not be refreshed at the moment, maybe a row has been deleted

// grid specific

// hack: as we have no local storage window manager yet

// happens if month view is rendered first

// have less optical focus

// height: 30,

// hidden atm.

// hide button and make sure it isn't pressed

// hook into getDefaultData 

// how to detect hash/string ids

// https://github.com/PimpTrizkit/PJs/edit/master/pSBC.js

// i18n._('Add Events')

// i18n._('Add attendee')

// i18n._('Delete Events')

// i18n._('Edit Events')

// i18n._('Edit Resource')

// i18n._('Event (as attendee)')

// i18n._('Event (as organizer)')

// i18n._('Events Free Busy')

// i18n._('Export Events')

// i18n._('Export Resource')

// i18n._('Free Busy')

// i18n._('Invite Resource')

// i18n._('Private')

// i18n._('Read Events')

// i18n._('Read Resource')

// i18n._('Resource Admin')

// i18n._('Resource notification')

// i18n._('Resource status')

// i18n._('Sync Events')

// i18n._('Sync Resource')

// i18n._('The grant to administrate the resource itself')

// i18n._('The grant to delete events directly stored in this resource calendar')

// i18n._('The grant to directly add events into this resource calendar')

// i18n._('The grant to edit events directly saved in this resource calendar')

// i18n._('The grant to edit the resource itself')

// i18n._('The grant to export events from this resource calendar')

// i18n._('The grant to export the resource itself')

// i18n._('The grant to get free/busy information of events from this resource calendar')

// i18n._('The grant to get free/busy information of events in this calendar')

// i18n._('The grant to invite the resource to an event')

// i18n._('The grant to read events from this resource calendar')

// i18n._('The grant to read the resource itself')

// i18n._('The grant to receive notifications for this resource')

// i18n._('The grant to set the resource attendee status')

// i18n._('The grant to synchronise events from this resource calendar. Need Read Events Grant')

// i18n._('The grant to synchronise the resource itself')

// ical common fields

// ical common fields with multiple appearance

// id: event.get('id'),

// if

// if dtstart is out of current period, take start of current period

// import a list of modules into the list

// init autoRefresh

// init dragables

// init map

// init plugins

// init some translations

// init state now to render menu with state applied

// initialize new poll

// insert event silently into store

// iso week

// istanbul ignore if

// istanbul ignore next

// iterate days

// layout helper

// layout whole day area -> take one third of the available height maximum

// layout: 'form',

// lcocal COPY!

// let from = this.fromPicker.getValue() || new Date

// light gray

// load poll

// load result

// make sure cell is empty

// make sure new-attendee line is on the bottom

// make sure, last reccurance is included

// manage active views

// manage main (main is shown if no split criteria is present)

// mark as new rule to avoid series confirm dlg

// mark event as not dirty to allow edit dlg

// maybe another app is active

// mhh - if the user already declined we can't see the event

// might happen in shared folders -> we might want to become a party crusher?

// model generics

// monthSheet is a bitch!

// more brown

// needed for action updater / save and close in edit dialog

// needed for addToEventPanel

// neglegt diffs due to borders etc.

// new Ext.ux.Printer.TagsRenderer().generateBody(component.getForm().findField('tags').tagsPanel),

// ngettext('Attender', 'Attendee', n); gettext('Attendee');

// ngettext('Calendar', 'Calendars', n); gettext('Calendars');

// ngettext('Event', 'Events', n); gettext('Events');

// ngettext('Resource Grant', 'Resource Grants', n); gettext('Resource Grant');

// ngettext('Resource', 'Resources', n); gettext('Resources');

// no arguments means programatic scroll (show/hide/...)

// no keys for quickadds etc.

// no record after delete

// no record, no summary

// no selection of external organizers here yet

// normal events container

// normalise

// not yet

// not yet used? - let's save space

// note, we can't use the 'normal' plugin approach here, cause we have to deal with n stores

// note: unprecise plural form here, but this is hard to change

// nothing to do

// ommit loadMask

// on initialisation items are not renderd

// one of['me', 'intelligent', 'calendarOwner', 'filteredAttendee', 'none']

// only add range events if mouse is down long enough

// only apply filter plugin when used as mainscreen leftpanel

// only commit edit on Enter & blur

// only unzoom if click is not in the area of the daypreviewbox

// orange

// origin container will only be moved for personal events with their origin in

// origin w.o. skip of this perspective + specials for this perspective

// outdated data

// override via prototype or config

// override, when required.

// pSBC - Shade Blend Convert - Version 4.0 - 02/18/2019

// party crush button?

// precondition changed?  

// preserve space for triggers

// preset quickadd

// prevent adding of fixed calendars

// private

// purple

// put the events in

// quick add/update actions

// rebind store so it's event listeners get called at last.

// recalculate dtstart according to WeekPeriodPicker.Button

// record is JSON encoded here...

// red

// redefine this props in case ext translations got included after this component

// refetch record as it might be outdated in the meantime

// register calendar filters in addressbook

// register grants for calendar containers

// relations

// relayout actual context

// relayout original context

// remove "add new attender" row

// remove all existing period filters

// remove attender ids

// remove from ui before update

// remove not longer existing attendee

// remove old events

// remove resource calendars user has appropriate grants for

// remove temporary id

// remove views not longer in filter

// reset actions

// reset autoRefresh

// reset autoRefresh it might get lost if request fails

// reset if perspective attendee is gone

// resize header/scroller to fullsize

// resize mainBody for visibleMinutes to fit

// resolve groupmembers

// resolve members for memberOf filters

// resource events container

// return false will the generic exceptionhandler handle the caught exception

// return the list of modules as css string

// run action updater

// save current startDate

// save some layout info

// save state

// save west panel scrolling position so we can restore it after selecting nodes

// scheduleable interface fields

// scheduleable interface fields with multiple appearance

// scrollTo initial position

// see if a recent startDate of that view fits

// select name cell

// select only current page

// select/expand

// self register

// send click event anyway

// set some default time:

// set status authkey for contacts and recources so user can edit status directly

// shift -> change intelligent <-> me

// shortcut

// show container from existing event if exists

// show icon on startCell and leftCells

// show origin (if available)

// skip dates not in our diplay range

// skip out of range events

// skip updates from new attendee row

// snap correction for rangeadds

// so dumb!

// so just lets reload

// something like 24:00 and not 00:00

// start sizing for range adds

// switch editor

// sync attendee status

// take a full clone to not taint the original filter

// take displayContainer if user has no access to origin

// take one third of the available height maximum

// the event was selected before

// the field is already blured, due to the extra chooser window. We need to change the value per hand

// this is important for paging and sort header!

// this prevents reopen of cell on header clicks

// this.calPanel.relayEvents(view, ['changeView', 'changePeriod', 'addEvent', 'updateEvent', 'click', 'dblclick', 'contextmenu', 'keydown']);

// this.calendarView.scrollTo.defer(500, this.calendarView, [this.record.get('dtstart')]);

// this.periodLabel.update(this.period.from.format())

// title: this.app.i18n._('Choose File and Format'),

// to allow gridpanel hooks (like email compose)

// todo: sort generic?

// transform grants for event container selection

// transition customGrid -> sheetView

// tree comes with containers only

// try to force landscape -> opera only atm...

// update actions

// update attendee filter grid

// update container tree

// update data

// update dates and bg colors

// update filter panel

// update grid after import

// update header & scaling

// update weeks

// use first OR panel in case of filterPanel

// use first attedee filter

// userData contains account

// userData contains contact

// userData contains group

// userData contains list

// var cp = this.app.getMainScreen().getCenterPanel(),

// violet

// walk all cols an hide hints

// we can't evaluate the filters on client side to check compute if this affects us

// we dont support multiple dropping yet

// we expect user_id to be a user or contact object or record

// we need to clone an event with summary in

// weights of color values see: https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color

// west panel attendee filter grid

//'1px'

//@TODO improve detection or pipe as config

//@TODO remove relayed events?

//TODO reenable

//TODO: return html element and get the format ?

//TODO: use grid panel hook ?

//Tine.Calendar.backend.getReader(),

//Tine.widgets.grid.FilterRegistry.register('Addressbook', 'Contact', {

//assert position

//autoLoad: true,

//calendarSelectionPlugin.onBeforeLoad.call(calendarSelectionPlugin, store, options);

//clsToAdd = ((this.dateMesh[i].getMonth() == this.startDate.getMonth()) ? ' cal-yearview-daycell-valid' : ' cal-yearview-daycell-invalid');

//console.info('pushed event in frame# ' + position + ' from startIdx"' + startIdx + '" to endIdx "' + endIdx + '".');

//console.log(Ext.get(target));

//day: date.get('dateString'),

//delete this.grid;

//dynamic: !!this.event.isRangeAdd,

//e.stopEvent();

//event.ui.render(this);

//eventEl[height > this.dayCellsHeight && hideOverflow ? 'hide' : 'show']();

//eventEls[0].setOpacity(0.5);

//eventEls[0].setStyle({'border-left-style': 'dashed'});

//fieldLabel    : this.intervalBeforeString,

//height: 230,

//hidden: this.tb.activeView != 'day',

//hidden: this.tb.activeView != 'month',

//listWidth: 300,

//no loadMask called from another app

//offset = row*numCols;

//remove location if location is location from deleted ressource

//return height;

//return this.supr().updateDetails.apply(this, arguments);

//store.on("loadexception", this.onLoadError, this);

//store.un("loadexception", this.onLoadError, this);

//style: 'padding-top: 2px;',

//style: 'padding: 10px 0 0 20px;',

//this.blur();

//this.cardPanel.layout.setActiveItem(this.cardPanel.items.getKey(this.eventDetailsPanel));

//this.colMgr = Tine.Calendar.colorMgr;

//this.constrains = new Tine.widgets.container.SelectionComboBox({

//this.fireEvent('contextmenu', e);

//this.focus();

//this.grid.getSelectionModel().selectAll(true);

//this.parallelScrollerEventsRegistry = new Tine.Calendar.ParallelEventsRegistry({dtStart: this.startDate, dtEnd: this.endDate});

//this.parallelWholeDayEventsRegistry = new Tine.Calendar.ParallelEventsRegistry({dtStart: this.startDate, dtEnd: this.endDate});

//this.store.each(this.removeEvent, this);

//var calendarSelectionPlugin = this.app.getMainScreen().getWestPanel().getContainerTreePanel().getFilterPlugin();

//var eventEls = event.ui.getEls();

//var row = i%12, col = Math.floor(i/12);

//width: 300,

//{ name: 'attach' },

//{ name: 'contact' },

//{ name: 'exrule' },

//{ name: 'rdate' },

//{ name: 'related' },

//{ name: 'resources' },

//{ name: 'rstatus' },

//{label: i18n._('Created By'),                                                        field: 'created_by',         valueType: 'user'},

//{label: i18n._('Last Modified By'),                                                  field: 'last_modified_by',   valueType: 'user'},

//});
