Ext.namespace("Zarafa.plugins.spreed");Zarafa.plugins.spreed.ABOUT='<p>Copyright (C) 2005 - 2015  Zarafa B.V. &lt;info@zarafa.com&gt; and its licensors</p><p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.</p><p>You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>.</p><hr /><p>The spreed plugin contains the following third-party components:</p><h1>timezones.inc</h1><p>The timezones.inc file distributed with this plugin is Copyright (C) The PHP Group, and covered by the <a href="http://www.php.net/license/3_01.txt" target="_blank">PHP license</a>.</p><h1>xmlrpc.inc</h1><p>Copyright (c) 1999,2000,2002 Edd Dumbill &lt;edd@usefulinc.com&gt; All rights reserved.</p><p>Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditionsare met:</p><li>Redistributions of source code must retain the above copyright     notice, this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above     copyright notice, this list of conditions and the following     disclaimer in the documentation and/or other materials provided     with the distribution.</li><li>Neither the name of the "XML-RPC for PHP" nor the names of its     contributors may be used to endorse or promote products derived     from this software without specific prior written permission.</li><p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>';
Ext.namespace("Zarafa.plugins.spreed");
Zarafa.plugins.spreed.SpreedPlugin=Ext.extend(Zarafa.core.Plugin,{spreedStore:null,sequenceId:0,initPlugin:function(){Zarafa.plugins.spreed.SpreedPlugin.superclass.initPlugin.apply(this,arguments);this.spreedStore=new Zarafa.plugins.spreed.data.SpreedStore;this.spreedStore.on("write",this.onStoreWrite);this.registerInsertionPoint("main.maintoolbar.new.item",this.createNewSpreedButton,this);this.registerInsertionPoint("previewpanel.toolbar.right",this.createNewSpreedFromPreviewButton,this);this.registerInsertionPoint(/context\.mail\.(.*?)\.toolbar\.options/,
this.createNewSpreedFromPreviewButton,this);this.registerInsertionPoint("context.mail.contextmenu.options",this.createNewSpreedFromMailButton,this);this.registerInsertionPoint("context.addressbook.contextmenu.actions",this.createNewSpreedFromAddressbookButton,this);this.registerInsertionPoint("context.contact.contextmenu.options",this.createNewSpreedFromAddressbookButton,this)},createNewSpreedButton:function(){return[{newMenuIndex:10,xtype:"menuitem",text:_("Spreed Meeting"),overflowText:_("Spreed meeting"),
iconCls:"icon_spreed_setup_top_menu",handler:this.createNewSpreedMeeting,scope:this}]},createNewSpreedFromPreviewButton:function(){return{xtype:"button",tooltip:_("Spreed Meeting"),overflowText:_("Spreed meeting"),iconCls:"icon_spreed_setup_mail_context_menu",handler:this.createNewSpreedMeetingFromSelection,scope:this,plugins:["zarafa.recordcomponentupdaterplugin"],update:function(a){this.record=a}}},createNewSpreedFromMailButton:function(){return{xtype:"zarafa.conditionalitem",text:_("Spreed Meeting"),
iconCls:"icon_spreed_setup_mail_context_menu",handler:this.createNewSpreedMeetingFromSelection,scope:this}},createNewSpreedFromAddressbookButton:function(){return{xtype:"zarafa.conditionalitem",text:_("Spreed meeting"),iconCls:"icon_spreed_setup_ab_context_menu",handler:this.createNewSpreedMeetingFromAddressbook,scope:this,beforeShow:this.onSpreedButtonBeforeShow.createDelegate(this)}},onSpreedButtonBeforeShow:function(a,b){for(var c=false,d=0,e=b.length;d<e;d++)if(this.isSpreedButtonVisible(b[d])){c=
true;break}a.setVisible(c)},isSpreedButtonVisible:function(a){if(a.phantom)return false;else if(a instanceof Zarafa.core.data.IPMRecord)if(a.isMessageClass("IPM.Contact")){if(!a.hasEmailAddress())return false}else{if(a.isMessageClass("IPM.Distlist"))return false}else if(a.get("object_type")!==Zarafa.core.mapi.ObjectType.MAPI_MAILUSER)return false;return true},createNewSpreedMeeting:function(){var a=Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,
{id:++this.sequenceId});this.spreedStore.add(a);this.openSpreedDialog(a)},createNewSpreedMeetingFromSelection:function(a){var b=Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,{id:++this.sequenceId});this.spreedStore.add(b);var c=[],d=[];if(a instanceof Ext.Button)d=[a.record];else if(a instanceof Ext.menu.Item)d=a.getRecords();var e=d.length>1;a=0;for(var f=d.length;a<f;a++){var h=d[a];h.isOpened()?this.mergeMailToSpreed(b,h,e):
c.push({fn:function(){var g=h;return function(o,k,i,l){var j=function(m,n){if(n===g){m.un("open",j,i);this.scope.mergeMailToSpreed(k,g,e);l()}};g.getStore().on("open",j,i);g.open()}}(),scope:this})}this.openSpreedDialog(b,{recordComponentPluginConfig:{loadTasks:c}})},createNewSpreedMeetingFromAddressbook:function(a){var b=Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,{id:++this.sequenceId});this.spreedStore.add(b);var c=[];a=a.getRecords();
for(var d=0,e=a.length;d<e;d++){var f=a[d];if(f.isOpened()){var h=this.convertAddressbookUserToParticipant(f);b.getSubStore("recipients").add(h)}else c.push({fn:function(){var g=f;return function(o,k,i,l){var j=function(m,n){if(n===g){m.un("open",j,i);var p=this.scope.convertAddressbookUserToParticipant(f);k.getSubStore("recipients").add(p);l()}};g.getStore().on("open",j,i);g.open()}}(),scope:this})}this.openSpreedDialog(b,{recordComponentPluginConfig:{loadTasks:c}})},mergeMailToSpreed:function(a,
b,c){this.mergeSender(a,b);this.mergeParticipants(a.getSubStore("recipients"),b.getSubStore("recipients"));this.mergeAttachments(a.getSubStore("attachments"),b.getSubStore("attachments"));if(c!==true){a.set("subject",b.get("subject"));a.set("description",b.getBody(false))}},mergeSender:function(a,b){var c=b.get("sent_representing_entryid");c=Ext.isEmpty(c)?{entryid:b.get("sender_entryid"),object_type:Zarafa.core.mapi.ObjectType.MAPI_MAILUSER,display_name:b.get("sender_name"),display_type:Zarafa.core.mapi.DisplayType.DT_MAILUSER,
display_type_ex:Zarafa.core.mapi.DisplayType.DT_MAILUSER,email_address:b.get("sender_email_address"),smtp_address:b.get("sender_email_address"),address_type:b.get("sender_address_type"),recipient_type:Zarafa.core.mapi.RecipientType.MAPI_TO}:{entryid:b.get("sent_representing_entryid"),object_type:Zarafa.core.mapi.ObjectType.MAPI_MAILUSER,display_name:b.get("sent_representing_name"),display_type:Zarafa.core.mapi.DisplayType.DT_MAILUSER,display_type_ex:Zarafa.core.mapi.DisplayType.DT_MAILUSER,email_address:b.get("sent_representing_email_address"),
smtp_address:b.get("sent_representing_email_address"),address_type:b.get("sent_representing_address_type"),recipient_type:Zarafa.core.mapi.RecipientType.MAPI_TO};c=Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,c);var d=a.getSubStore("recipients");this.isAllowedParticipant(d,c)&&d.add(c)},mergeParticipants:function(a,b){b.each(function(c){c=this.convertRecipientToParticipant(c);this.isAllowedParticipant(a,c)&&a.add(c)},
this)},mergeAttachments:function(a,b){b.each(function(c){c=this.convertAttachmentToSpreed(c);a.add(c)},this)},convertRecipientToParticipant:function(a){var b=Zarafa.core.data.RecordFactory,c=Zarafa.core.data.RecordCustomObjectType;a=Ext.apply({},a.data);a.recipient_type=Zarafa.core.mapi.RecipientType.MAPI_TO;return b.createRecordObjectByCustomType(c.ZARAFA_SPREED_PARTICIPANT,a)},convertAddressbookUserToParticipant:function(a){a=a.convertToRecipient(Zarafa.core.mapi.RecipientType.MAPI_TO,true);var b=
[];Ext.isArray(a)||(a=[a]);for(var c=0,d=a.length;c<d;c++)b.push(this.convertRecipientToParticipant(a[c]));return b},convertAttachmentToSpreed:function(a){var b=Zarafa.core.data.RecordFactory,c=Zarafa.core.data.RecordCustomObjectType,d=Ext.apply({},a.data),e=a.store.getParentRecord().get("store_entryid"),f=a.store.getAttachmentParentRecordEntryId(),h=a.store.getId();Ext.apply(d,{original_record_entry_id:f,original_record_store_entry_id:e,original_attachment_store_id:h,original_attach_num:a.get("attach_num")});
return b.createRecordObjectByCustomType(c.ZARAFA_SPREED_ATTACHMENT,d)},isAllowedParticipant:function(a,b){var c=Zarafa.core.EntryId;if(c.compareEntryIds(container.getUser().getEntryId(),b.get("entryid")))return false;return a.findBy(function(d){return c.compareEntryIds(d.get("entryid"),b.get("entryid"))})<0},openSpreedDialog:function(a,b){Zarafa.core.data.UIFactory.openLayerComponent(Zarafa.core.data.SharedComponentType["common.create"],a,b)},bidSharedComponent:function(a,b){var c=-1;if(Ext.isArray(b))b=
b[0];if(b&&b.store||b instanceof Zarafa.addressbook.AddressBookRecord)switch(a){case Zarafa.core.data.SharedComponentType["common.create"]:case Zarafa.core.data.SharedComponentType["common.view"]:if(b instanceof Zarafa.plugins.spreed.data.SpreedRecord)c=2;else if(b.store.customObjectType==Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT)c=2;break;case Zarafa.core.data.SharedComponentType["common.contextmenu"]:if(b.store.customObjectType==Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT)c=
2;break}return c},getSharedComponent:function(a,b){var c;switch(a){case Zarafa.core.data.SharedComponentType["common.create"]:case Zarafa.core.data.SharedComponentType["common.view"]:if(b instanceof Zarafa.plugins.spreed.data.SpreedRecord)c=Zarafa.plugins.spreed.dialogs.SpreedSetupContentPanel;else if(b.store.customObjectType==Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT)c=Zarafa.plugins.spreed.dialogs.EditSpreedParticipantContentPanel;break;case Zarafa.core.data.SharedComponentType["common.contextmenu"]:c=
Zarafa.plugins.spreed.dialogs.SpreedParticipantContextMenu;break}return c},onStoreWrite:function(a,b,c,d,e){if(b==Ext.data.Api.actions.create){var f;if(Ext.isArray(e)){if(e.length>1)f=e[0].get("checkin_url")}else if(e)f=e.get("checkin_url");Ext.isEmpty(f)?Ext.MessageBox.show({title:_("Warning"),height:300,width:300,msg:_("Returned url is empty"),icon:Ext.MessageBox.WARNING,buttons:Ext.MessageBox.OK}):window.open(f,"")}}});
Zarafa.onReady(function(){container.registerPlugin(new Zarafa.core.PluginMetaData({name:"spreed",displayName:_("Spreed Plugin"),about:Zarafa.plugins.spreed.ABOUT,pluginConstructor:Zarafa.plugins.spreed.SpreedPlugin}))});Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedAttachmentRecordFields=[{name:"original_record_entry_id",type:"string",defaultValue:""},{name:"original_record_store_entry_id",type:"string",defaultValue:""},{name:"original_attach_num",type:"int"},{name:"original_attachment_store_id",type:"string",defaultValue:""}];Zarafa.core.data.RecordCustomObjectType.addProperty("ZARAFA_SPREED_ATTACHMENT");
Zarafa.core.data.RecordFactory.setBaseClassToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_ATTACHMENT,Zarafa.core.data.IPMAttachmentRecord);Zarafa.core.data.RecordFactory.addFieldToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_ATTACHMENT,Zarafa.plugins.spreed.data.SpreedAttachmentRecordFields);Zarafa.core.data.RecordFactory.addFieldToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_ATTACHMENT,Zarafa.core.data.IPMAttachmentRecordFields);Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedAttachmentStore=Ext.extend(Zarafa.core.data.IPMAttachmentStore,{constructor:function(a){a=a||{};var b=Zarafa.core.data.RecordFactory.getRecordClassByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_ATTACHMENT);Ext.applyIf(a,{reader:new Zarafa.core.data.JsonAttachmentReader({dynamicRecord:false},b),writer:new Zarafa.plugins.spreed.data.SpreedJsonAttachmentWriter});Zarafa.plugins.spreed.data.SpreedAttachmentStore.superclass.constructor.call(this,a)},
getAttachmentBaseUrl:function(a){var b="index.php?load=download_attachment",c=a.get("original_record_entry_id"),d=a.get("original_record_store_entry_id"),e=null,f=null,h=null,g=null;if(Ext.isEmpty(c)&&Ext.isEmpty(d)){f=this.getAttachmentParentRecordEntryId();h=this.getParentRecord().get("store_entryid");e=this.getId();g=a.get("attach_num")}else{f=c;h=d;e=a.get("original_attachment_store_id");g=a.get("original_attach_num")}b=Ext.urlAppend(b,"dialog_attachments="+e);b=Ext.urlAppend(b,"store="+h);b=
Ext.urlAppend(b,"entryid="+f);return b=a.get("attach_num")!=-1?Ext.urlAppend(b,"attachNum[]="+g):Ext.urlAppend(b,"attachNum[]="+a.get("tmpname"))}});Ext.reg("spreed.attachmentstore",Zarafa.plugins.spreed.data.SpreedAttachmentStore);Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedJsonAttachmentWriter=Ext.extend(Zarafa.core.data.JsonAttachmentWriter,{toPropHash:function(a){a=a.getAttachmentStore();var b={};if(!Ext.isDefined(a))return b;b.attachments={};b.attachments.dialog_attachments=a.getId();a=a.getRange();Ext.each(a,function(c){if(!Ext.isDefined(b.attachments.add))b.attachments.add=[];b.attachments.add.push(c.data)},this);return b}});Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedJsonParticipantWriter=Ext.extend(Zarafa.core.data.JsonRecipientWriter,{toPropHash:function(a){var b=a.getRecipientStore();a={};if(!Ext.isDefined(b))return a;b=b.getRange();if(b.length>0){a.recipients=[];for(var c=0;c<b.length;c++){var d=b[c],e=d.data;d.isMeetingOrganizer()||a.recipients.push(e)}}return a}});Ext.reg("spreed.spreedparticipantwriter",Zarafa.plugins.spreed.data.SpreedJsonParticipantWriter);Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedLanguages=[{value:"aa",name:_("Afar")},{value:"af",name:_("Afrikaans")},{value:"ak",name:_("Akan")},{value:"sq",name:_("Albanian")},{value:"am",name:_("Amharic")},{value:"ar",name:_("Arabic")},{value:"ab",name:_("Abkhazian")},{value:"an",name:_("Aragonese")},{value:"hy",name:_("Armenian")},{value:"as",name:_("Assamese")},{value:"av",name:_("Avaric")},{value:"ae",name:_("Avestan")},{value:"ay",name:_("Aymara")},{value:"az",name:_("Azerbaijani")},{value:"bm",name:_("Bambara")},
{value:"ba",name:_("Bashkir")},{value:"eu",name:_("Basque")},{value:"be",name:_("Belarusian")},{value:"bn",name:_("Bengali")},{value:"bh",name:_("Bihari")},{value:"bi",name:_("Bislama")},{value:"bs",name:_("Bosnian")},{value:"br",name:_("Breton")},{value:"bg",name:_("Bulgarian")},{value:"my",name:_("Burmese")},{value:"ca",name:_("Catalan; Valencian")},{value:"km",name:_("Central Khmer")},{value:"ch",name:_("Chamorro")},{value:"ce",name:_("Chechen")},{value:"ny",name:_("Chichewa; Chewa; Nyanja")},
{value:"zh",name:_("Chinese")},{value:"cu",name:_("Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic")},{value:"cv",name:_("Chuvash")},{value:"kw",name:_("Cornish")},{value:"co",name:_("Corsican")},{value:"cr",name:_("Cree")},{value:"hr",name:_("Croatian")},{value:"cs",name:_("Czech")},{value:"da",name:_("Danish")},{value:"dv",name:_("Divehi; Dhivehi; Maldivian")},{value:"nl",name:_("Dutch; Flemish")},{value:"dz",name:_("Dzongkha")},{value:"en",name:_("English")},{value:"eo",
name:_("Esperanto")},{value:"et",name:_("Estonian")},{value:"ee",name:_("Ewe")},{value:"fo",name:_("Faroese")},{value:"fj",name:_("Fijian")},{value:"fi",name:_("Finnish")},{value:"fr",name:_("French")},{value:"ff",name:_("Fulah")},{value:"gd",name:_("Gaelic; Scottish Gaelic")},{value:"gl",name:_("Galician")},{value:"lg",name:_("Ganda")},{value:"ka",name:_("Georgian")},{value:"de",name:_("German")},{value:"el",name:_("Greek, Modern")},{value:"gn",name:_("Guarani")},{value:"gu",name:_("Gujarati")},
{value:"ht",name:_("Haitian; Haitian Creole")},{value:"ha",name:_("Hausa")},{value:"he",name:_("Hebrew")},{value:"hz",name:_("Herero")},{value:"hi",name:_("Hindi")},{value:"ho",name:_("Hiri Motu")},{value:"hu",name:_("Hungarian")},{value:"is",name:_("Icelandic")},{value:"ig",name:_("Igbo")},{value:"io",name:_("Ido")},{value:"ia",name:_("Interlingua (International Auxiliary Language Association)")},{value:"ie",name:_("Interlingue")},{value:"id",name:_("Indonesian")},{value:"iu",name:_("Inuktitut")},
{value:"ik",name:_("Inupiaq")},{value:"ga",name:_("Irish")},{value:"it",name:_("Italian")},{value:"ja",name:_("Japanese")},{value:"jv",name:_("Javanese")},{value:"kl",name:_("Kalaallisut; Greenlandic")},{value:"kn",name:_("Kannada")},{value:"kr",name:_("Kanuri")},{value:"ks",name:_("Kashmiri")},{value:"kk",name:_("Kazakh")},{value:"ki",name:_("Kikuyu; Gikuyu")},{value:"rw",name:_("Kinyarwanda")},{value:"ky",name:_("Kirghiz; Kyrgyz")},{value:"kv",name:_("Komi")},{value:"kg",name:_("Kongo")},{value:"ko",
name:_("Korean")},{value:"kj",name:_("Kuanyama; Kwanyama")},{value:"ku",name:_("Kurdish")},{value:"lo",name:_("Lao")},{value:"la",name:_("Latin")},{value:"lv",name:_("Latvian")},{value:"li",name:_("Limburgan; Limburger; Limburgish")},{value:"ln",name:_("Lingala")},{value:"lt",name:_("Lithuanian")},{value:"lu",name:_("Luba-Katanga")},{value:"lb",name:_("Luxembourgish; Letzeburgesch")},{value:"mk",name:_("Macedonian")},{value:"mg",name:_("Malagasy")},{value:"ms",name:_("Malay")},{value:"ml",name:_("Malayalam")},
{value:"mt",name:_("Maltese")},{value:"gv",name:_("Manx")},{value:"mi",name:_("Maori")},{value:"mr",name:_("Marathi")},{value:"mh",name:_("Marshallese")},{value:"mo",name:_("Moldavian")},{value:"mn",name:_("Mongolian")},{value:"na",name:_("Nauru")},{value:"nv",name:_("Navajo; Navaho")},{value:"nd",name:_("Ndebele, North; North Ndebele")},{value:"nr",name:_("Ndebele, South; South Ndebele")},{value:"ng",name:_("Ndonga")},{value:"ne",name:_("Nepali")},{value:"se",name:_("Northern Sami")},{value:"no",
name:_("Norwegian")},{value:"nn",name:_("Norwegian Nynorsk; Nynorsk, Norwegian")},{value:"nb",name:_("Norwegian Bokm??l; Bokm??l, Norwegian;")},{value:"oc",name:_("Occitan;  Proven??al")},{value:"oj",name:_("Ojibwa")},{value:"or",name:_("Oriya")},{value:"om",name:_("Oromo")},{value:"os",name:_("Ossetian; Ossetic")},{value:"pi",name:_("Pali")},{value:"pa",name:_("Panjabi; Punjabi")},{value:"fa",name:_("Persian")},{value:"pl",name:_("Polish")},{value:"pt",name:_("Portuguese")},{value:"ps",name:_("Pushto")},
{value:"qu",name:_("Quechua")},{value:"ro",name:_("Romanian")},{value:"rm",name:_("Romansh")},{value:"rn",name:_("Rundi")},{value:"ru",name:_("Russian")},{value:"sm",name:_("Samoan")},{value:"sg",name:_("Sango")},{value:"sa",name:_("Sanskrit")},{value:"sc",name:_("Sardinian")},{value:"sr",name:_("Serbian")},{value:"sn",name:_("Shona")},{value:"ii",name:_("Sichuan Yi")},{value:"sd",name:_("Sindhi")},{value:"si",name:_("Sinhala; Sinhalese")},{value:"sk",name:_("Slovak")},{value:"sl",name:_("Slovenian")},
{value:"so",name:_("Somali")},{value:"st",name:_("Sotho, Southern")},{value:"es",name:_("Spanish; Castilian")},{value:"su",name:_("Sundanese")},{value:"sw",name:_("Swahili")},{value:"ss",name:_("Swati")},{value:"sv",name:_("Swedish")},{value:"tl",name:_("Tagalog")},{value:"ty",name:_("Tahitian")},{value:"tg",name:_("Tajik")},{value:"ta",name:_("Tamil")},{value:"tt",name:_("Tatar")},{value:"te",name:_("Telugu")},{value:"th",name:_("Thai")},{value:"bo",name:_("Tibetan")},{value:"ti",name:_("Tigrinya")},
{value:"to",name:_("Tonga (Tonga Islands)")},{value:"ts",name:_("Tsonga")},{value:"tn",name:_("Tswana")},{value:"tr",name:_("Turkish")},{value:"tk",name:_("Turkmen")},{value:"tw",name:_("Twi")},{value:"ug",name:_("Uighur; Uyghur")},{value:"uk",name:_("Ukrainian")},{value:"ur",name:_("Urdu")},{value:"uz",name:_("Uzbek")},{value:"ve",name:_("Venda")},{value:"vi",name:_("Vietnamese")},{value:"vo",name:_("Volap??k")},{value:"wa",name:_("Walloon")},{value:"cy",name:_("Welsh")},{value:"fy",name:_("Western Frisian")},
{value:"wo",name:_("Wolof")},{value:"xh",name:_("Xhosa")},{value:"yi",name:_("Yiddish")},{value:"yo",name:_("Yoruba")},{value:"za",name:_("Zhuang; Chuang")},{value:"zu",name:_("Zulu")}];Ext.namespace("Zarafa.plugins.spreed.data");Zarafa.plugins.spreed.data.SpreedParticipantRecordFields=[{name:"isModerator",type:"boolean"},{name:"timezone",type:"string"},{name:"language",type:"string"}];Zarafa.core.data.RecordCustomObjectType.addProperty("ZARAFA_SPREED_PARTICIPANT");
Zarafa.core.data.RecordFactory.setBaseClassToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,Zarafa.core.data.IPMRecipientRecord);Zarafa.core.data.RecordFactory.addFieldToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,Zarafa.core.data.IPMRecipientRecordFields);Zarafa.core.data.RecordFactory.addFieldToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,Zarafa.plugins.spreed.data.SpreedParticipantRecordFields);
Zarafa.core.data.RecordFactory.addListenerToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,"createphantom",function(a){var b=container.getSettingsModel();if(Ext.isEmpty(a.get("timezone"))){b=b.get("zarafa/v1/plugins/spreed/default_timezone");a.set("timezone",b)}if(Ext.isEmpty(a.get("language"))){b=container.getSettingsModel().get("zarafa/v1/main/language");a.set("language",b.substr(0,b.indexOf("_")))}});Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedParticipantStore=Ext.extend(Zarafa.core.data.IPMRecipientStore,{constructor:function(a){a=a||{};Ext.applyIf(a,{writer:new Zarafa.plugins.spreed.data.SpreedJsonParticipantWriter,customObjectType:Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,reader:new Zarafa.core.data.JsonRecipientReader({id:"entryid",idProperty:"entryid",dynamicRecord:false,customObjectType:Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT})});Zarafa.plugins.spreed.data.SpreedParticipantStore.superclass.constructor.call(this,
a)}});Ext.reg("spreed.spreedparticipantstore",Zarafa.plugins.spreed.data.SpreedParticipantStore);Ext.namespace("Zarafa.plugins.spreed.data");Zarafa.plugins.spreed.data.SpreedRecordFields=[{name:"subject",type:"string",defaultValue:""},{name:"start_time",type:"date",dateFormat:"timestamp",defaultValue:null},{name:"end_time",type:"date",dateFormat:"timestamp",defaultValue:null},{name:"description",type:"string",defaultValue:""},{name:"timezone",type:"string"},{name:"checkin_url",type:"string",defaultValue:""}];
Zarafa.core.data.RecordCustomObjectType.addProperty("ZARAFA_SPREED");Zarafa.core.data.RecordFactory.addFieldToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,Zarafa.plugins.spreed.data.SpreedRecordFields);Zarafa.core.data.RecordFactory.setSubStoreToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,"recipients",Zarafa.plugins.spreed.data.SpreedParticipantStore);
Zarafa.core.data.RecordFactory.setSubStoreToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,"attachments",Zarafa.plugins.spreed.data.SpreedAttachmentStore);
Zarafa.core.data.RecordFactory.addListenerToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,"createphantom",function(a){var b=container.getSettingsModel();a.afterOpen();Ext.isEmpty(a.get("timezone"))&&a.set("timezone",b.get("zarafa/v1/plugins/spreed/default_timezone"));if(!Ext.isDate(a.get("start_time"))||!Ext.isDate(a.get("end_time"))){var c=b.get("zarafa/v1/contexts/calendar/default_zoom_level");c=(new Date).ceil(Date.MINUTE,c).fromUTC();b=b.get("zarafa/v1/contexts/calendar/default_appointment_period");
b=c.add(Date.MINUTE,b);a.set("start_time",c);a.set("end_time",b)}});Zarafa.plugins.spreed.data.SpreedRecord=Ext.extend(Zarafa.core.data.IPMRecord,{baseIdProperties:["id"],copy:function(a){a=Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,this.data,a||this.id);a.idProperties=this.idProperties.clone();a.phantom=this.phantom;return a.applyData(this)},equals:function(a){return this.id==a.id}});
Zarafa.core.data.RecordFactory.setBaseClassToCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED,Zarafa.plugins.spreed.data.SpreedRecord);Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedStore=Ext.extend(Zarafa.core.data.MAPIStore,{constructor:function(a){a=a||{};Ext.applyIf(a,{reader:new Zarafa.core.data.JsonReader({id:"id",idProperty:"id",dynamicRecord:false},Zarafa.core.data.RecordFactory.getRecordClassByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED)),writer:new Zarafa.core.data.JsonWriter,proxy:new Zarafa.core.data.IPMProxy({listModuleName:"spreedmodule",itemModuleName:"spreedmodule"})});Zarafa.plugins.spreed.data.SpreedStore.superclass.constructor.call(this,
a)},open:function(a,b){if(a.isNeededToOpen())Zarafa.plugins.spreed.data.SpreedStore.superclass.open.call(this,a,b);else{a.afterOpen();this.fireEvent("open",this,a,a)}}});Ext.reg("spreed.spreedstore",Zarafa.plugins.spreed.data.SpreedStore);Ext.namespace("Zarafa.plugins.spreed.data");
Zarafa.plugins.spreed.data.SpreedTimezones=[{value:"Africa/Abidjan",name:_("Africa/Abidjan")+" (GMT 00:00)"},{value:"Africa/Accra",name:_("Africa/Accra")+" (GMT 00:00)"},{value:"Africa/Addis_Ababa",name:_("Africa/Addis Ababa")+" (GMT+03:00)"},{value:"Africa/Algiers",name:_("Africa/Algiers")+" (GMT+01:00)"},{value:"Africa/Asmera",name:_("Africa/Asmera")+" (GMT+03:00)"},{value:"Africa/Bamako",name:_("Africa/Bamako")+" (GMT 00:00)"},{value:"Africa/Bangui",name:_("Africa/Bangui")+" (GMT+01:00)"},{value:"Africa/Banjul",
name:_("Africa/Banjul")+" (GMT 00:00)"},{value:"Africa/Bissau",name:_("Africa/Bissau")+" (GMT 00:00)"},{value:"Africa/Blantyre",name:_("Africa/Blantyre")+" (GMT+02:00)"},{value:"Africa/Brazzaville",name:_("Africa/Brazzaville")+" (GMT+01:00)"},{value:"Africa/Bujumbura",name:_("Africa/Bujumbura")+" (GMT+02:00)"},{value:"Africa/Cairo",name:_("Africa/Cairo")+" (GMT+02:00)"},{value:"Africa/Casablanca",name:_("Africa/Casablanca")+" (GMT 00:00)"},{value:"Africa/Ceuta",name:_("Africa/Ceuta")+" (GMT+01:00)"},
{value:"Africa/Conakry",name:_("Africa/Conakry")+" (GMT 00:00)"},{value:"Africa/Dakar",name:_("Africa/Dakar")+" (GMT 00:00)"},{value:"Africa/Dar_es_Salaam",name:_("Africa/Dar es Salaam")+" (GMT+03:00)"},{value:"Africa/Djibouti",name:_("Africa/Djibouti")+" (GMT+03:00)"},{value:"Africa/Douala",name:_("Africa/Douala")+" (GMT+03:00)"},{value:"Africa/El_Aaiun",name:_("Africa/El Aaiun")+" (GMT+01:00)"},{value:"Africa/Freetown",name:_("Africa/Freetown")+" (GMT 00:00)"},{value:"Africa/Gaborone",name:_("Africa/Gaborone")+
" (GMT+02:00)"},{value:"Africa/Harare",name:_("Africa/Harare")+" (GMT+02:00)"},{value:"Africa/Johannesburg",name:_("Africa/Johannesburg")+" (GMT+02:00)"},{value:"Africa/Kampala",name:_("Africa/Kampala")+" (GMT+03:00)"},{value:"Africa/Khartoum",name:_("Africa/Khartoum")+" (GMT+03:00)"},{value:"Africa/Kigali",name:_("Africa/Kigali")+" (GMT+02:00)"},{value:"Africa/Kinshasa",name:_("Africa/Kinshasa")+" (GMT+01:00)"},{value:"Africa/Lagos",name:_("Africa/Lagos")+" (GMT+01:00)"},{value:"Africa/Libreville",
name:_("Africa/Libreville")+" (GMT+01:00)"},{value:"Africa/Lome",name:_("Africa/Lome")+" (GMT 00:00)"},{value:"Africa/Luanda",name:_("Africa/Luanda")+" (GMT+01:00)"},{value:"Africa/Lubumbashi",name:_("Africa/Lubumbashi")+" (GMT+02:00)"},{value:"Africa/Lusaka",name:_("Africa/Lusaka")+" (GMT+02:00)"},{value:"Africa/Malabo",name:_("Africa/Malabo")+" (GMT+01:00)"},{value:"Africa/Maputo",name:_("Africa/Maputo")+" (GMT+02:00)"},{value:"Africa/Maseru",name:_("Africa/Maseru")+" (GMT+02:00)"},{value:"Africa/Mbabane",
name:_("Africa/Mbabane")+" (GMT+02:00)"},{value:"Africa/Mogadishu",name:_("Africa/Mogadishu")+" (GMT+03:00)"},{value:"Africa/Monrovia",name:_("Africa/Monrovia")+" (GMT 00:00)"},{value:"Africa/Nairobi",name:_("Africa/Nairobi")+" (GMT+03:00)"},{value:"Africa/Ndjamena",name:_("Africa/Ndjamena")+" (GMT+01:00)"},{value:"Africa/Niamey",name:_("Africa/Niamey")+" (GMT+01:00)"},{value:"Africa/Nouakchott",name:_("Africa/Nouakchott")+" (GMT 00:00)"},{value:"Africa/Ouagadougou",name:_("Africa/Ouagadougou")+" (GMT 00:00)"},
{value:"Africa/Porto-Novo",name:_("Africa/Porto-Novo")+" (GMT+01:00)"},{value:"Africa/Sao_Tome",name:_("Africa/Sao Tome")+" (GMT 00:00)"},{value:"Africa/Tripoli",name:_("Africa/Tripoli")+" (GMT+02:00)"},{value:"Africa/Tunis",name:_("Africa/Tunis")+" (GMT+01:00)"},{value:"Africa/Windhoek",name:_("Africa/Windhoek")+" (GMT+01:00)"},{value:"America/Adak",name:_("America/Adak")+" (GMT-09:00)"},{value:"America/Anchorage",name:_("America/Anchorage")+" (GMT-09:00)"},{value:"America/Anguilla",name:_("America/Anguilla")+
" (GMT-04:00)"},{value:"America/Antigua",name:_("America/Antigua")+" (GMT-04:00)"},{value:"America/Araguaina",name:_("America/Araguaina")+" (GMT-03:00)"},{value:"America/Argentina/Buenos_Aires",name:_("America/Argentina/Buenos Aires")+" (GMT-03:00)"},{value:"America/Argentina/Catamarca",name:_("America/Argentina/Catamarca")+" (GMT-03:00)"},{value:"America/Argentina/Cordoba",name:_("America/Argentina/Cordoba")+" (GMT-03:00)"},{value:"America/Argentina/Jujuy",name:_("America/Argentina/Jujuy")+" (GMT-03:00)"},
{value:"America/Argentina/La_Rioja",name:_("America/Argentina/La Rioja")+" (GMT-03:00)"},{value:"America/Argentina/Mendoza",name:_("America/Argentina/Mendoza")+" (GMT-03:00)"},{value:"America/Argentina/Rio_Gallegos",name:_("America/Argentina/Rio Gallegos")+" (GMT-03:00)"},{value:"America/Argentina/Salta",name:_("America/Argentina/Salta")+" (GMT-03:00)"},{value:"America/Argentina/San_Juan",name:_("America/Argentina/San Juan")+" (GMT-03:00)"},{value:"America/Argentina/San_Luis",name:_("America/Argentina/San Luis")+
" (GMT-04:00)"},{value:"America/Argentina/Tucuman",name:_("America/Argentina/Tucuman")+" (GMT-03:00)"},{value:"America/Argentina/Ushuaia",name:_("America/Argentina/Ushuaia")+" (GMT-03:00)"},{value:"America/Aruba",name:_("America/Aruba")+" (GMT-04:00)"},{value:"America/Asuncion",name:_("America/Asuncion")+" (GMT-04:00)"},{value:"America/Atikokan",name:_("America/Atikokan")+" (GMT-05:00)"},{value:"America/Bahia",name:_("America/Bahia")+" (GMT-03:00)"},{value:"America/Bahia_Banderas",name:_("America/Bahia Banderas")+
" (GMT-06:00)"},{value:"America/Barbados",name:_("America/Barbados")+" (GMT-04:00)"},{value:"America/Belem",name:_("America/Belem")+" (GMT-03:00)"},{value:"America/Belize",name:_("America/Belize")+" (GMT-06:00)"},{value:"America/Blanc-Sablon",name:_("America/Blanc-Sablon")+" (GMT-04:00)"},{value:"America/Boa_Vista",name:_("America/Boa Vista")+" (GMT-04:00)"},{value:"America/Bogota",name:_("America/Bogota")+" (GMT-05:00)"},{value:"America/Boise",name:_("America/Boise")+" (GMT-07:00)"},{value:"America/Cambridge_Bay",
name:_("America/Cambridge Bay")+" (GMT-07:00)"},{value:"America/Campo_Grande",name:_("America/Campo Grande")+" (GMT-04:00)"},{value:"America/Cancun",name:_("America/Cancun")+" (GMT-06:00)"},{value:"America/Caracas",name:_("America/Caracas")+" (GMT-04:00)"},{value:"America/Cayenne",name:_("America/Cayenne")+" (GMT-03:00)"},{value:"America/Cayman",name:_("America/Cayman")+" (GMT-05:00)"},{value:"America/Chicago",name:_("America/Chicago")+" (GMT-06:00)"},{value:"America/Chihuahua",name:_("America/Chihuahua")+
" (GMT-07:00)"},{value:"America/Costa_Rica",name:_("America/Costa Rica")+" (GMT-06:00)"},{value:"America/Cuiaba",name:_("America/Cuiaba")+" (GMT-04:00)"},{value:"America/Curacao",name:_("America/Curacao")+" (GMT-04:00)"},{value:"America/Danmarkshavn",name:_("America/Danmarkshavn")+" (GMT 00:00)"},{value:"America/Dawson",name:_("America/Dawson")+" (GMT-08:00)"},{value:"America/Dawson_Creek",name:_("America/Dawson Creek")+" (GMT-07:00)"},{value:"America/Denver",name:_("America/Denver")+" (GMT-05:00)"},
{value:"America/Detroit",name:_("America/Detroit")+" (GMT-07:00)"},{value:"America/Dominica",name:_("America/Dominica")+" (GMT-04:00)"},{value:"America/Edmonton",name:_("America/Edmonton")+" (GMT-07:00)"},{value:"America/Eirunepe",name:_("America/Eirunepe")+" (GMT-04:00)"},{value:"America/El_Salvador",name:_("America/El Salvador")+" (GMT-06:00)"},{value:"America/Fortaleza",name:_("America/Fortaleza")+" (GMT-03:00)"},{value:"America/Glace_Bay",name:_("America/Glace Bay")+" (GMT-04:00)"},{value:"America/Godthab",
name:_("America/Godthab")+" (GMT-03:00)"},{value:"America/Goose_Bay",name:_("America/Goose Bay")+" (GMT-04:00)"},{value:"America/Grand_Turk",name:_("America/Grand Turk")+" (GMT-05:00)"},{value:"America/Grenada",name:_("America/Grenada")+" (GMT-04:00)"},{value:"America/Guadeloupe",name:_("America/Guadeloupe")+" (GMT-04:00)"},{value:"America/Guatemala",name:_("America/Guatemala")+" (GMT-06:00)"},{value:"America/Guayaquil",name:_("America/Guayaquil")+" (GMT-05:00)"},{value:"America/Guyana",name:_("America/Guyana")+
" (GMT-04:00)"},{value:"America/Halifax",name:_("America/Halifax")+" (GMT-04:00)"},{value:"America/Havana",name:_("America/Havana")+" (GMT-05:00)"},{value:"America/Hermosillo",name:_("America/Hermosillo")+" (GMT-07:00)"},{value:"America/Indiana/Indianapolis",name:_("America/Indiana/Indianapolis")+" (GMT-05:00)"},{value:"America/Indiana/Knox",name:_("America/Indiana/Knox")+" (GMT-05:00)"},{value:"America/Indiana/Marengo",name:_("America/Indiana/Marengo")+" (GMT-05:00)"},{value:"America/Indiana/Petersburg",
name:_("America/Indiana/Petersburg")+" (GMT-04:00)"},{value:"America/Indiana/Tell_City",name:_("America/Indiana/Tell City")+" (GMT-05:00)"},{value:"America/Indiana/Vevay",name:_("America/Indiana/Vevay")+" (GMT-05:00)"},{value:"America/Indiana/Vincennes",name:_("America/Indiana/Vincennes")+" (GMT-05:00)"},{value:"America/Indiana/Winamac",name:_("America/Indiana/Winamac")+" (GMT-05:00)"},{value:"America/Inuvik",name:_("America/Inuvik")+" (GMT-07:00)"},{value:"America/Iqaluit",name:_("America/Iqaluit")+
" (GMT-05:00)"},{value:"America/Jamaica",name:_("America/Jamaica")+" (GMT-05:00)"},{value:"America/Juneau",name:_("America/Juneau")+" (GMT-09:00)"},{value:"America/Kentucky/Louisville",name:_("America/Kentucky/Louisville")+" (GMT-05:00)"},{value:"America/Kentucky/Monticello",name:_("America/Kentucky/Monticello")+" (GMT-05:00)"},{value:"America/La_Paz",name:_("America/La Paz")+" (GMT-04:00)"},{value:"America/Lima",name:_("America/Lima")+" (GMT-05:00)"},{value:"America/Los_Angeles",name:_("America/Los Angeles")+
" (GMT-08:00)"},{value:"America/Maceio",name:_("America/Maceio")+" (GMT-03:00)"},{value:"America/Managua",name:_("America/Managua")+" (GMT-06:00)"},{value:"America/Manaus",name:_("America/Manaus")+" (GMT-04:00)"},{value:"America/Marigot",name:_("America/Marigot")+" (GMT-04:00)"},{value:"America/Martinique",name:_("America/Martinique")+" (GMT-04:00)"},{value:"America/Matamoros",name:_("America/Matamoros")+" (GMT-06:00)"},{value:"America/Mazatlan",name:_("America/Mazatlan")+" (GMT-07:00)"},{value:"America/Menominee",
name:_("America/Menominee")+" (GMT-06:00)"},{value:"America/Merida",name:_("America/Merida")+" (GMT-06:00)"},{value:"America/Metlakatla",name:_("America/Metlakatla")+" (GMT-08:00)"},{value:"America/Mexico_City",name:_("America/Mexico City")+" (GMT-06:00)"},{value:"America/Miquelon",name:_("America/Miquelon")+" (GMT-03:00)"},{value:"America/Moncton",name:_("America/Moncton")+" (GMT-04:00)"},{value:"America/Monterrey",name:_("America/Monterrey")+" (GMT-06:00)"},{value:"America/Montevideo",name:_("America/Montevideo")+
" (GMT-03:00)"},{value:"America/Montreal",name:_("America/Montreal")+" (GMT-05:00)"},{value:"America/Montserrat",name:_("America/Montserrat")+" (GMT-04:00)"},{value:"America/Nassau",name:_("America/Nassau")+" (GMT-05:00)"},{value:"America/New_York",name:_("America/New York")+" (GMT-05:00)"},{value:"America/Nipigon",name:_("America/Nipigon")+" (GMT-05:00)"},{value:"America/Nome",name:_("America/Nome")+" (GMT-09:00)"},{value:"America/Noronha",name:_("America/Noronha")+" (GMT-02:00)"},{value:"America/North_Dakota/Beulah",
name:_("America/North Dakota/Beulah")+" (GMT-06:00)"},{value:"America/North_Dakota/Center",name:_("America/North Dakota/Center")+" (GMT-06:00)"},{value:"America/North_Dakota/New_Salem",name:_("America/North Dakota/New Salem")+" (GMT-06:00)"},{value:"America/Ojinaga",name:_("America/Ojinaga")+" (GMT-07:00)"},{value:"America/Panama",name:_("America/Panama")+" (GMT-05:00)"},{value:"America/Pangnirtung",name:_("America/Pangnirtung")+" (GMT-03:00)"},{value:"America/Paramaribo",name:_("America/Paramaribo")+
" (GMT-03:00)"},{value:"America/Phoenix",name:_("America/Phoenix")+" (GMT-07:00)"},{value:"America/Port-au-Prince",name:_("America/Port-au-Prince")+" (GMT-05:00)"},{value:"America/Port_of_Spain",name:_("America/Port of Spain")+" (GMT-04:00)"},{value:"America/Porto_Velho",name:_("America/Porto Velho")+" (GMT-04:00)"},{value:"America/Puerto_Rico",name:_("America/Puerto Rico")+" (GMT-04:00)"},{value:"America/Rainy_River",name:_("America/Rainy River")+" (GMT-06:00)"},{value:"America/Rankin_Inlet",name:_("America/Rankin Inlet")+
" (GMT-06:00)"},{value:"America/Recife",name:_("America/Recife")+" (GMT-03:00)"},{value:"America/Regina",name:_("America/Regina")+" (GMT-06:00)"},{value:"America/Resolute",name:_("America/Resolute")+" (GMT-05:00)"},{value:"America/Rio_Branco",name:_("America/Rio Branco")+" (GMT-05:00)"},{value:"America/Santa_Isabel",name:_("America/Santa Isabel")+" (GMT-08:00)"},{value:"America/Santarem",name:_("America/Santarem")+" (GMT-03:00)"},{value:"America/Santiago",name:_("America/Santiago")+" (GMT-04:00)"},
{value:"America/Santo_Domingo",name:_("America/Santo Domingo")+" (GMT-04:00)"},{value:"America/Sao_Paulo",name:_("America/Sao Paulo")+" (GMT-03:00)"},{value:"America/Scoresbysund",name:_("America/Scoresbysund")+" (GMT-01:00)"},{value:"America/Shiprock",name:_("America/Shiprock")+" (GMT-07:00)"},{value:"America/Sitka",name:_("America/Sitka")+" (GMT-09:00)"},{value:"America/St_Barthelemy",name:_("America/St Barthelemy")+" (GMT-04:00)"},{value:"America/St_Johns",name:_("America/St Johns")+" (GMT-03:30)"},
{value:"America/St_Kitts",name:_("America/St Kitts")+" (GMT-04:00)"},{value:"America/St_Lucia",name:_("America/St Lucia")+" (GMT-04:00)"},{value:"America/St_Thomas",name:_("America/St Thomas")+" (GMT-04:00)"},{value:"America/St_Vincent",name:_("America/St Vincent")+" (GMT-04:00)"},{value:"America/Swift_Current",name:_("America/Swift Current")+" (GMT-06:00)"},{value:"America/Tegucigalpa",name:_("America/Tegucigalpa")+" (GMT-06:00)"},{value:"America/Thule",name:_("America/Thule")+" (GMT-04:00)"},{value:"America/Thunder_Bay",
name:_("America/Thunder Bay")+" (GMT-05:00)"},{value:"America/Tijuana",name:_("America/Tijuana")+" (GMT-08:00)"},{value:"America/Toronto",name:_("America/Toronto")+" (GMT-04:00)"},{value:"America/Tortola",name:_("America/Tortola")+" (GMT-04:00)"},{value:"America/Vancouver",name:_("America/Vancouver")+" (GMT-08:00)"},{value:"America/Whitehorse",name:_("America/Whitehorse")+" (GMT-08:00)"},{value:"America/Winnipeg",name:_("America/Winnipeg")+" (GMT-06:00)"},{value:"America/Yakutat",name:_("America/Yakutat")+
" (GMT-09:00)"},{value:"America/Yellowknife",name:_("America/Yellowknife")+" (GMT-07:00)"},{value:"Antarctica/Casey",name:_("Antarctica/Casey")+" (GMT+08:00)"},{value:"Antarctica/Davis",name:_("Antarctica/Davis")+" (GMT+07:00)"},{value:"Antarctica/DumontDUrville",name:_("Antarctica/DumontDUrville")+" (GMT+10:00)"},{value:"Antarctica/Macquarie",name:_("Antarctica/Macquarie")+" (GMT+10:00)"},{value:"Antarctica/Mawson",name:_("Antarctica/Mawson")+" (GMT+06:00)"},{value:"Antarctica/McMurdo",name:_("Antarctica/McMurdo")+
" (GMT+12:00)"},{value:"Antarctica/Palmer",name:_("Antarctica/Palmer")+" (GMT-04:00)"},{value:"Antarctica/Rothera",name:_("Antarctica/Rothera")+" (GMT-04:00)"},{value:"Antarctica/South_Pole",name:_("Antarctica/South Pole")+" (GMT+12:00)"},{value:"Antarctica/Syowa",name:_("Antarctica/Syowa")+" (GMT+03:00)"},{value:"Antarctica/Vostok",name:_("Antarctica/Vostok")+" (GMT+06:00)"},{value:"Arctic/Longyearbyen",name:_("Arctic/Longyearbyen")+" (GMT+01:00)"},{value:"Asia/Aden",name:_("Asia/Aden")+" (GMT+03:00)"},
{value:"Asia/Almaty",name:_("Asia/Almaty")+" (GMT+06:00)"},{value:"Asia/Amman",name:_("Asia/Amman")+" (GMT+02:00)"},{value:"Asia/Anadyr",name:_("Asia/Anadyr")+" (GMT+12:00)"},{value:"Asia/Aqtau",name:_("Asia/Aqtau")+" (GMT+04:00)"},{value:"Asia/Aqtobe",name:_("Asia/Aqtobe")+" (GMT+05:00)"},{value:"Asia/Ashgabat",name:_("Asia/Ashgabat")+" (GMT+05:00)"},{value:"Asia/Baghdad",name:_("Asia/Baghdad")+" (GMT+03:00)"},{value:"Asia/Bahrain",name:_("Asia/Bahrain")+" (GMT+03:00)"},{value:"Asia/Baku",name:_("Asia/Baku")+
" (GMT+04:00)"},{value:"Asia/Bangkok",name:_("Asia/Bangkok")+" (GMT+07:00)"},{value:"Asia/Beirut",name:_("Asia/Beirut")+" (GMT+02:00)"},{value:"Asia/Bishkek",name:_("Asia/Bishkek")+" (GMT+05:00)"},{value:"Asia/Brunei",name:_("Asia/Brunei")+" (GMT+08:00)"},{value:"Asia/Choibalsan",name:_("Asia/Choibalsan")+" (GMT+08:00)"},{value:"Asia/Chongqing",name:_("Asia/Chongqing")+" (GMT+08:00)"},{value:"Asia/Colombo",name:_("Asia/Colombo")+" (GMT+05:30)"},{value:"Asia/Damascus",name:_("Asia/Damascus")+" (GMT+02:00)"},
{value:"Asia/Dhaka",name:_("Asia/Dhaka")+" (GMT+06:00)"},{value:"Asia/Dili",name:_("Asia/Dili")+" (GMT+09:00)"},{value:"Asia/Dubai",name:_("Asia/Dubai")+" (GMT+04:00)"},{value:"Asia/Dushanbe",name:_("Asia/Dushanbe")+" (GMT+05:00)"},{value:"Asia/Gaza",name:_("Asia/Gaza")+" (GMT+02:00)"},{value:"Asia/Harbin",name:_("Asia/Harbin")+" (GMT+08:00)"},{value:"Asia/Ho_Chi_Minh",name:_("Asia/Ho Chi Minh")+" (GMT+07:00)"},{value:"Asia/Hong_Kong",name:_("Asia/Hong Kong")+" (GMT+08:00)"},{value:"Asia/Hovd",name:_("Asia/Hovd")+
" (GMT+07:00)"},{value:"Asia/Irkutsk",name:_("Asia/Irkutsk")+" (GMT+08:00)"},{value:"Asia/Jakarta",name:_("Asia/Jakarta")+" (GMT+07:00)"},{value:"Asia/Jayapura",name:_("Asia/Jayapura")+" (GMT+09:00)"},{value:"Asia/Jerusalem",name:_("Asia/Jerusalem")+" (GMT+02:00)"},{value:"Asia/Kabul",name:_("Asia/Kabul")+" (GMT+04:30)"},{value:"Asia/Kamchatka",name:_("Asia/Kamchatka")+" (GMT+12:00)"},{value:"Asia/Karachi",name:_("Asia/Karachi")+" (GMT+05:00)"},{value:"Asia/Kashgar",name:_("Asia/Kashgar")+" (GMT+08:00)"},
{value:"Asia/Kathmandu",name:_("Asia/Kathmandu")+" (GMT+05:45)"},{value:"Asia/Kolkata",name:_("Asia/Kolkata")+" (GMT+05:30)"},{value:"Asia/Krasnoyarsk",name:_("Asia/Krasnoyarsk")+" (GMT+07:00)"},{value:"Asia/Kuala_Lumpur",name:_("Asia/Kuala Lumpur")+" (GMT+08:00)"},{value:"Asia/Kuching",name:_("Asia/Kuching")+" (GMT+08:00)"},{value:"Asia/Kuwait",name:_("Asia/Kuwait")+" (GMT+03:00)"},{value:"Asia/Macau",name:_("Asia/Macau")+" (GMT+08:00)"},{value:"Asia/Magadan",name:_("Asia/Magadan")+" (GMT+11:00)"},
{value:"Asia/Makassar",name:_("Asia/Makassar")+" (GMT+08:00)"},{value:"Asia/Manila",name:_("Asia/Manila")+" (GMT+08:00)"},{value:"Asia/Muscat",name:_("Asia/Muscat")+" (GMT+04:00)"},{value:"Asia/Nicosia",name:_("Asia/Nicosia")+" (GMT+02:00)"},{value:"Asia/Novokuznetsk",name:_("Asia/Novokuznetsk")+" (GMT+07:00)"},{value:"Asia/Novosibirsk",name:_("Asia/Novosibirsk")+" (GMT+06:00)"},{value:"Asia/Omsk",name:_("Asia/Omsk")+" (GMT+06:00)"},{value:"Asia/Oral",name:_("Asia/Oral")+" (GMT+05:00)"},{value:"Asia/Phnom_Penh",
name:_("Asia/Phnom Penh")+" (GMT+07:00)"},{value:"Asia/Pontianak",name:_("Asia/Pontianak")+" (GMT+07:00)"},{value:"Asia/Pyongyang",name:_("Asia/Pyongyang")+" (GMT+09:00)"},{value:"Asia/Qatar",name:_("Asia/Qatar")+" (GMT+03:00)"},{value:"Asia/Qyzylorda",name:_("Asia/Qyzylorda")+" (GMT+06:00)"},{value:"Asia/Rangoon",name:_("Asia/Rangoon")+" (GMT+06:30)"},{value:"Asia/Riyadh",name:_("Asia/Riyadh")+" (GMT+03:00)"},{value:"Asia/Sakhalin",name:_("Asia/Sakhalin")+" (GMT+10:00)"},{value:"Asia/Samarkand",
name:_("Asia/Samarkand")+" (GMT+05:00)"},{value:"Asia/Seoul",name:_("Asia/Seoul")+" (GMT+09:00)"},{value:"Asia/Shanghai",name:_("Asia/Shanghai")+" (GMT+08:00)"},{value:"Asia/Singapore",name:_("Asia/Singapore")+" (GMT+08:00)"},{value:"Asia/Taipei",name:_("Asia/Taipei")+" (GMT+08:00)"},{value:"Asia/Tashkent",name:_("Asia/Tashkent")+" (GMT+05:00)"},{value:"Asia/Tbilisi",name:_("Asia/Tbilisi")+" (GMT+03:00)"},{value:"Asia/Tehran",name:_("Asia/Tehran")+" (GMT+03:30)"},{value:"Asia/Thimphu",name:_("Asia/Thimphu")+
" (GMT+06:00)"},{value:"Asia/Tokyo",name:_("Asia/Tokyo")+" (GMT+09:00)"},{value:"Asia/Ulaanbaatar",name:_("Asia/Ulaanbaatar")+" (GMT+08:00)"},{value:"Asia/Urumqi",name:_("Asia/Urumqi")+" (GMT+08:00)"},{value:"Asia/Vientiane",name:_("Asia/Vientiane")+" (GMT+07:00)"},{value:"Asia/Vladivostok",name:_("Asia/Vladivostok")+" (GMT+10:00)"},{value:"Asia/Yakutsk",name:_("Asia/Yakutsk")+" (GMT+09:00)"},{value:"Asia/Yekaterinburg",name:_("Asia/Yekaterinburg")+" (GMT+05:00)"},{value:"Asia/Yerevan",name:_("Asia/Yerevan")+
" (GMT+04:00)"},{value:"Atlantic/Azores",name:_("Atlantic/Azores")+" (GMT-01:00)"},{value:"Atlantic/Bermuda",name:_("Atlantic/Bermuda")+" (GMT-04:00)"},{value:"Atlantic/Canary",name:_("Atlantic/Canary")+" (GMT 00:00)"},{value:"Atlantic/Cape_Verde",name:_("Atlantic/Cape Verde")+" (GMT-01:00)"},{value:"Atlantic/Faroe",name:_("Atlantic/Faroe")+" (GMT 00:00)"},{value:"Atlantic/Madeira",name:_("Atlantic/Madeira")+" (GMT 00:00)"},{value:"Atlantic/Reykjavik",name:_("Atlantic/Reykjavik")+" (GMT 00:00)"},
{value:"Atlantic/South_Georgia",name:_("Atlantic/South Georgia")+" (GMT-02:00)"},{value:"Atlantic/St_Helena",name:_("Atlantic/St Helena")+" (GMT 00:00)"},{value:"Atlantic/Stanley",name:_("Atlantic/Stanley")+" (GMT-04:00)"},{value:"Australia/Adelaide",name:_("Australia/Adelaide")+" (GMT+09:30)"},{value:"Australia/Brisbane",name:_("Australia/Brisbane")+" (GMT+10:00)"},{value:"Australia/Broken_Hill",name:_("Australia/Broken Hill")+" (GMT+09:30)"},{value:"Australia/Currie",name:_("Australia/Currie")+
" (GMT+10:00)"},{value:"Australia/Darwin",name:_("Australia/Darwin")+" (GMT+09:30)"},{value:"Australia/Eucla",name:_("Australia/Eucla")+" (GMT+08:45)"},{value:"Australia/Hobart",name:_("Australia/Hobart")+" (GMT+10:00)"},{value:"Australia/Lindeman",name:_("Australia/Lindeman")+" (GMT+10:00)"},{value:"Australia/Lord_Howe",name:_("Australia/Lord Howe")+" (GMT+10:30)"},{value:"Australia/Melbourne",name:_("Australia/Melbourne")+" (GMT+10:00)"},{value:"Australia/Perth",name:_("Australia/Perth")+" (GMT+08:00)"},
{value:"Australia/Sydney",name:_("Australia/Sydney")+" (GMT+10:00)"},{value:"Europe/Amsterdam",name:_("Europe/Amsterdam")+" (GMT+01:00)"},{value:"Europe/Andorra",name:_("Europe/Andorra")+" (GMT+01:00)"},{value:"Europe/Athens",name:_("Europe/Athens")+" (GMT+02:00)"},{value:"Europe/Belgrade",name:_("Europe/Belgrade")+" (GMT+02:00)"},{value:"Europe/Berlin",name:_("Europe/Berlin")+" (GMT+01:00)"},{value:"Europe/Bratislava",name:_("Europe/Bratislava")+" (GMT+02:00)"},{value:"Europe/Brussels",name:_("Europe/Brussels")+
" (GMT+01:00)"},{value:"Europe/Bucharest",name:_("Europe/Bucharest")+" (GMT+02:00)"},{value:"Europe/Budapest",name:_("Europe/Budapest")+" (GMT+01:00)"},{value:"Europe/Chisinau",name:_("Europe/Chisinau")+" (GMT+02:00)"},{value:"Europe/Copenhagen",name:_("Europe/Copenhagen")+" (GMT+01:00)"},{value:"Europe/Dublin",name:_("Europe/Dublin")+" (GMT 00:00)"},{value:"Europe/Gibraltar",name:_("Europe/Gibraltar")+" (GMT 00:00)"},{value:"Europe/Guernsey",name:_("Europe/Guernsey")+" (GMT 00:00)"},{value:"Europe/Helsinki",
name:_("Europe/Helsinki")+" (GMT+02:00)"},{value:"Europe/Isle_of_Man",name:_("Europe/Isle of Man")+" (GMT 00:00)"},{value:"Europe/Istanbul",name:_("Europe/Istanbul")+" (GMT+02:00)"},{value:"Europe/Jersey",name:_("Europe/Jersey")+" (GMT 00:00)"},{value:"Europe/Kaliningrad",name:_("Europe/Kaliningrad")+" (GMT+02:00)"},{value:"Europe/Kiev",name:_("Europe/Kiev")+" (GMT+02:00)"},{value:"Europe/Lisbon",name:_("Europe/Lisbon")+" (GMT 00:00)"},{value:"Europe/Ljubljana",name:_("Europe/Ljubljana")+" (GMT+01:00)"},
{value:"Europe/London",name:_("Europe/London")+" (GMT 00:00)"},{value:"Europe/Luxembourg",name:_("Europe/Luxembourg")+" (GMT+01:00)"},{value:"Europe/Madrid",name:_("Europe/Madrid")+" (GMT+01:00)"},{value:"Europe/Malta",name:_("Europe/Malta")+" (GMT+01:00)"},{value:"Europe/Mariehamn",name:_("Europe/Mariehamn")+" (GMT+02:00)"},{value:"Europe/Minsk",name:_("Europe/Minsk")+" (GMT+02:00)"},{value:"Europe/Monaco",name:_("Europe/Monaco")+" (GMT+01:00)"},{value:"Europe/Moscow",name:_("Europe/Moscow")+" (GMT+04:00)"},
{value:"Europe/Oslo",name:_("Europe/Oslo")+" (GMT+01:00)"},{value:"Europe/Paris",name:_("Europe/Paris")+" (GMT+01:00)"},{value:"Europe/Podgorica",name:_("Europe/Podgorica")+" (GMT+01:00)"},{value:"Europe/Prague",name:_("Europe/Prague")+" (GMT+01:00)"},{value:"Europe/Riga",name:_("Europe/Riga")+" (GMT+02:00)"},{value:"Europe/Rome",name:_("Europe/Rome")+" (GMT+01:00)"},{value:"Europe/Samara",name:_("Europe/Samara")+" (GMT+04:00)"},{value:"Europe/San_Marino",name:_("Europe/San Marino")+" (GMT+01:00)"},
{value:"Europe/Sarajevo",name:_("Europe/Sarajevo")+" (GMT+01:00)"},{value:"Europe/Simferopol",name:_("Europe/Simferopol")+" (GMT+02:00)"},{value:"Europe/Skopje",name:_("Europe/Skopje")+" (GMT+01:00)"},{value:"Europe/Sofia",name:_("Europe/Sofia")+" (GMT+02:00)"},{value:"Europe/Stockholm",name:_("Europe/Stockholm")+" (GMT+01:00)"},{value:"Europe/Tallinn",name:_("Europe/Tallinn")+" (GMT+02:00)"},{value:"Europe/Tirane",name:_("Europe/Tirane")+" (GMT+01:00)"},{value:"Europe/Uzhgorod",name:_("Europe/Uzhgorod")+
" (GMT+02:00)"},{value:"Europe/Vaduz",name:_("Europe/Vaduz")+" (GMT+01:00)"},{value:"Europe/Vatican",name:_("Europe/Vatican")+" (GMT+01:00)"},{value:"Europe/Vienna",name:_("Europe/Vienna")+" (GMT+01:00)"},{value:"Europe/Vilnius",name:_("Europe/Vilnius")+" (GMT+02:00)"},{value:"Europe/Volgograd",name:_("Europe/Volgograd")+" (GMT+03:00)"},{value:"Europe/Warsaw",name:_("Europe/Warsaw")+" (GMT+01:00)"},{value:"Europe/Zagreb",name:_("Europe/Zagreb")+" (GMT+01:00)"},{value:"Europe/Zaporozhye",name:_("Europe/Zaporozhye")+
" (GMT+02:00)"},{value:"Europe/Zurich",name:_("Europe/Zurich")+" (GMT+01:00)"},{value:"Indian/Antananarivo",name:_("Indian/Antananarivo")+" (GMT+03:00)"},{value:"Indian/Chagos",name:_("Indian/Chagos")+" (GMT+06:00)"},{value:"Indian/Christmas",name:_("Indian/Christmas")+" (GMT+07:00)"},{value:"Indian/Cocos",name:_("Indian/Cocos")+" (GMT+06:30)"},{value:"Indian/Comoro",name:_("Indian/Comoro")+" (GMT+03:00)"},{value:"Indian/Kerguelen",name:_("Indian/Kerguelen")+" (GMT+05:00)"},{value:"Indian/Mahe",name:_("Indian/Mahe")+
" (GMT+04:00)"},{value:"Indian/Maldives",name:_("Indian/Maldives")+" (GMT+05:00)"},{value:"Indian/Mauritius",name:_("Indian/Mauritius")+" (GMT+04:00)"},{value:"Indian/Mayotte",name:_("Indian/Mayotte")+" (GMT+03:00)"},{value:"Indian/Reunion",name:_("Indian/Reunion")+" (GMT+04:00)"},{value:"Pacific/Apia",name:_("Pacific/Apia")+" (GMT-11:00)"},{value:"Pacific/Auckland",name:_("Pacific/Auckland")+" (GMT+12:00)"},{value:"Pacific/Chatham",name:_("Pacific/Chatham")+" (GMT+12:45)"},{value:"Pacific/Chuuk",
name:_("Pacific/Chuuk")+" (GMT+10:00)"},{value:"Pacific/Easter",name:_("Pacific/Easter")+" (GMT-06:00)"},{value:"Pacific/Efate",name:_("Pacific/Efate")+" (GMT+11:00)"},{value:"Pacific/Enderbury",name:_("Pacific/Enderbury")+" (GMT+13:00)"},{value:"Pacific/Fakaofo",name:_("Pacific/Fakaofo")+" (GMT-10:00)"},{value:"Pacific/Fiji",name:_("Pacific/Fiji")+" (GMT+12:00)"},{value:"Pacific/Funafuti",name:_("Pacific/Funafuti")+" (GMT+12:00)"},{value:"Pacific/Galapagos",name:_("Pacific/Galapagos")+" (GMT-06:00)"},
{value:"Pacific/Gambier",name:_("Pacific/Gambier")+" (GMT-09:00)"},{value:"Pacific/Guadalcanal",name:_("Pacific/Guadalcanal")+" (GMT+11:00)"},{value:"Pacific/Guam",name:_("Pacific/Guam")+" (GMT+10:00)"},{value:"Pacific/Honolulu",name:_("Pacific/Honolulu")+" (GMT-10:00)"},{value:"Pacific/Johnston",name:_("Pacific/Johnston")+" (GMT-10:00)"},{value:"Pacific/Kiritimati",name:_("Pacific/Kiritimati")+" (GMT+14:00)"},{value:"Pacific/Kosrae",name:_("Pacific/Kosrae")+" (GMT+11:00)"},{value:"Pacific/Kwajalein",
name:_("Pacific/Kwajalein")+" (GMT+12:00)"},{value:"Pacific/Majuro",name:_("Pacific/Majuro")+" (GMT+12:00)"},{value:"Pacific/Marquesas",name:_("Pacific/Marquesas")+" (GMT-09:30)"},{value:"Pacific/Midway",name:_("Pacific/Midway")+" (GMT-11:00)"},{value:"Pacific/Nauru",name:_("Pacific/Nauru")+" (GMT+12:00)"},{value:"Pacific/Niue",name:_("Pacific/Niue")+" (GMT-11:00)"},{value:"Pacific/Norfolk",name:_("Pacific/Norfolk")+" (GMT+11:30)"},{value:"Pacific/Noumea",name:_("Pacific/Noumea")+" (GMT+11:00)"},
{value:"Pacific/Pago_Pago",name:_("Pacific/Pago Pago")+" (GMT-11:00)"},{value:"Pacific/Palau",name:_("Pacific/Palau")+" (GMT+09:00)"},{value:"Pacific/Pitcairn",name:_("Pacific/Pitcairn")+" (GMT-08:00)"},{value:"Pacific/Pohnpei",name:_("Pacific/Pohnpei")+" (GMT+11:00)"},{value:"Pacific/Port_Moresby",name:_("Pacific/Port Moresby")+" (GMT+10:00)"},{value:"Pacific/Rarotonga",name:_("Pacific/Rarotonga")+" (GMT-10:00)"},{value:"Pacific/Saipan",name:_("Pacific/Saipan")+" (GMT+10:00)"},{value:"Pacific/Tahiti",
name:_("Pacific/Tahiti")+" (GMT-10:00)"},{value:"Pacific/Tarawa",name:_("Pacific/Tarawa")+" (GMT+12:00)"},{value:"Pacific/Tongatapu",name:_("Pacific/Tongatapu")+" (GMT+13:00)"},{value:"Pacific/Wake",name:_("Pacific/Wake")+" (GMT+12:00)"},{value:"Pacific/Wallis",name:_("Pacific/Wallis")+" (GMT+12:00)"}];Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.EditSpreedParticipantContentPanel=Ext.extend(Zarafa.core.ui.ContentPanel,{record:undefined,formPanel:undefined,constructor:function(a){a=a||{};var b=new Ext.data.JsonStore({xtype:"jsonstore",fields:["name","value"],data:Zarafa.plugins.spreed.data.SpreedTimezones});b.sort("name","ASC");var c=new Ext.data.JsonStore({xtype:"jsonstore",fields:["name","value"],data:Zarafa.plugins.spreed.data.SpreedLanguages,sortInfo:{field:"name",direction:"ASC"}}),d=a.record.get("display_name"),
e=a.record.get("smtp_address"),f=a.record.get("isModerator"),h=a.record.get("language"),g=a.record.get("timezone");Ext.applyIf(a,{title:_("Edit Spreed Participant"),layout:"fit",width:400,height:180,items:[{xtype:"form",layout:"form",border:false,ref:"formPanel",items:[{xtype:"textfield",fieldLabel:_("Display Name"),name:"display_name",value:d,anchor:"100%"},{xtype:"textfield",fieldLabel:_("Email Address"),name:"smtp_address",value:e,anchor:"100%"},{xtype:"checkbox",name:"isModerator",fieldLabel:_("Is Moderator"),
checked:f,value:f,anchor:"100%"},{xtype:"combo",name:"timezone",width:150,store:b,value:g,mode:"local",displayField:"name",valueField:"value",triggerAction:"all",forceSelection:true,editable:false,lazyInit:false,fieldLabel:_("Timezone"),anchor:"100%"},{xtype:"combo",name:"language",value:h,fieldLabel:_("Language"),width:200,store:c,mode:"local",triggerAction:"all",displayField:"name",valueField:"value",lazyInit:false,forceSelection:true,editable:false,autoSelect:true,anchor:"100%"}],buttons:[{text:_("Ok"),
handler:this.onOk,scope:this},{text:_("Cancel"),handler:this.onCancel,scope:this}]}]});Zarafa.plugins.spreed.dialogs.EditSpreedParticipantContentPanel.superclass.constructor.call(this,a);this.mon(this,"afterlayout",this.onAfterFirstLayout,this,{single:true})},onAfterFirstLayout:function(){this.formPanel.getForm().loadRecord(this.record)},onOk:function(){this.formPanel.getForm().updateRecord(this.record);this.close()},onCancel:function(){this.close()}});
Ext.reg("spreed.spreededitparticipantcontentpanel",Zarafa.plugins.spreed.dialogs.EditSpreedParticipantContentPanel);Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.SpreedParticipantBox=Ext.extend(Zarafa.common.recipientfield.ui.RecipientBox,{constructor:function(a){a=a||{};Ext.applyIf(a,{});Zarafa.plugins.spreed.dialogs.SpreedParticipantBox.superclass.constructor.call(this,a)},prepareIcon:function(a){if(a.get("isModerator"))return"icon_spreed_mod";else{this.iconEl.removeClass("icon_spreed_mod");return Zarafa.plugins.spreed.dialogs.SpreedParticipantBox.superclass.prepareIcon.apply(this,arguments)}},prepareData:function(a){var b=
Zarafa.plugins.spreed.dialogs.SpreedParticipantBox.superclass.prepareData.apply(this,arguments);b.display_name=a.get("display_name");b.smtp_address=a.get("smtp_address")||a.get("email_address");b.object_type=a.get("object_type");b.isModerator=a.get("isModerator");return b},isValidRecord:function(a){if(a.get("object_type")==Zarafa.core.mapi.ObjectType.MAPI_DISTLIST)return false;return Zarafa.plugins.spreed.dialogs.SpreedParticipantBox.superclass.isValidRecord.call(this,a)}});
Ext.reg("spreed.spreedparticipantbox",Zarafa.plugins.spreed.dialogs.SpreedParticipantBox);Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.SpreedParticipantContextMenu=Ext.extend(Zarafa.common.recipientfield.ui.RecipientContextMenu,{constructor:function(a){a=a||{};Ext.applyIf(a,{items:[{xtype:"zarafa.conditionalitem",text:_("Edit Participant"),handler:this.editRecipient,scope:this},{xtype:"zarafa.conditionalitem",text:_("Email Message"),handler:this.emailRecipient,scope:this},{xtype:"menuseparator"}]});Zarafa.plugins.spreed.dialogs.SpreedParticipantContextMenu.superclass.constructor.call(this,a)}});
Ext.reg("spreed.spreedparticipantcontextmenu",Zarafa.plugins.spreed.dialogs.SpreedParticipantContextMenu);Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.SpreedParticipantField=Ext.extend(Zarafa.common.recipientfield.ui.RecipientField,{constructor:function(a){a=a||{};Ext.applyIf(a,{boxType:"spreed.spreedparticipantbox"});Zarafa.plugins.spreed.dialogs.SpreedParticipantField.superclass.constructor.call(this,a)},handleSelection:function(a){this.boxStore.add(Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,{object_type:a.get("object_type"),display_name:a.get("display_name"),
email_address:a.get("email_address"),smtp_address:a.get("smtp_address")||a.get("email_address"),address_type:a.get("address_type"),isModerator:a.get("isModerator"),recipient_type:a.get("recipientType")||Zarafa.core.mapi.RecipientType.MAPI_TO}))},onBoxDblClick:function(a,b,c){Zarafa.core.data.UIFactory.openCreateRecord(c,{modal:true})}});Ext.reg("spreed.spreedparticipantfield",Zarafa.plugins.spreed.dialogs.SpreedParticipantField);
Zarafa.plugins.spreed.dialogs.SpreedSetupContentPanel=Ext.extend(Zarafa.core.ui.RecordContentPanel,{constructor:function(a){a=a||{};Ext.applyIf(a,{layout:"fit",title:_("Spreed Meeting"),recordComponentPluginConfig:Ext.applyIf(a.recordComponentPluginConfig||{},{allowWrite:true,useShadowStore:false,enableOpenLoadTask:false}),closeOnSave:true,width:940,height:480,items:[{xtype:"spreed.spreedsetuppanel",tbar:{xtype:"spreed.spreedtoolbar"}}]});Zarafa.plugins.spreed.dialogs.SpreedSetupContentPanel.superclass.constructor.call(this,
a)},doClose:function(){this.record.getStore().remove(this.record);Zarafa.plugins.spreed.dialogs.SpreedSetupContentPanel.superclass.doClose.call(this)}});Ext.reg("spreed.spreedsetupcontentpanel",Zarafa.plugins.spreed.dialogs.SpreedSetupContentPanel);Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.SpreedSetupPanel=Ext.extend(Ext.form.FormPanel,{maxParticipants:2,record:undefined,warning:undefined,constructor:function(a){a=a||{};a.plugins=Ext.value(a.plugins,[]);a.plugins.push("zarafa.recordcomponentupdaterplugin");this.maxParticipants=container.getSettingsModel().get("zarafa/v1/plugins/spreed/max_participants");Ext.apply(a,{xtype:"spreed.spreedsetuppanel",layout:{type:"vbox",align:"stretch"},bodyStyle:"background-color: inherit;",defaults:{border:true,bodyStyle:"background-color: inherit; padding: 3px 0px 3px 0px; border-style: none none solid none;"},
items:[this.createParticipantPanel(),this.createSubjectPanel(),this.createTimePanel(),this.createAttachmentsPanel(),this.createDescriptionPanel()]});Zarafa.plugins.spreed.dialogs.SpreedSetupPanel.superclass.constructor.call(this,a)},createParticipantPanel:function(){return[{xtype:"panel",layout:"form",autoHeight:true,items:[{xtype:"zarafa.compositefield",anchor:"100%",hideLabel:true,items:[{xtype:"button",width:100,text:_("Participants")+":",handler:this.addParticipantsFromAddressBook,scope:this},
{xtype:"spreed.spreedparticipantfield",plugins:["zarafa.recordcomponentupdaterplugin"],ref:"../../spreedparticipantfield",flex:1}]},{xtype:"displayfield",anchor:"100%",autoShow:true,ref:"../spreed_warning",cls:"spreed-Warning",hidden:true,value:String.format(_("You have too many participants selected. You are allowed to add {0} additional participants to the web meeting."),this.maxParticipants)}]}]},createSubjectPanel:function(){return{xtype:"panel",layout:"form",autoHeight:false,items:[{xtype:"textfield",
fieldLabel:_("Subject"),name:"subject",labelWidth:100,anchor:"100%",listeners:{scope:this,change:this.onFieldChange}}]}},createTimePanel:function(){var a=new Ext.data.JsonStore({xtype:"jsonstore",fields:["name","value"],data:Zarafa.plugins.spreed.data.SpreedTimezones,sortInfo:{field:"name",direction:"ASC"}}),b=container.getSettingsModel().get("zarafa/v1/contexts/calendar/default_appointment_period"),c=container.getSettingsModel().get("zarafa/v1/contexts/calendar/default_zoom_level"),d=(new Date).ceil(Date.MINUTE,
c);d=new Zarafa.core.DateRange({startDate:d,dueDate:d.add(Date.MINUTE,b)});return{xtype:"panel",layout:"hbox",items:[{xtype:"zarafa.timeperiodfield",timeIncrement:c,defaultValue:d,name:"timeperiod",defaultPeriod:b,defaultPeriodType:Date.MINUTE,ref:"../toTime",listeners:{scope:this,change:this.onTimePeriodFieldChange},spacerConfig:{width:5},startFieldConfig:{name:"start_time",width:80,minValue:(new Date).clearTime(),maxValue:(new Date).clearTime().add(Date.DAY,1)},endFieldConfig:{name:"end_time",minValue:(new Date).clearTime(),
maxValue:(new Date).clearTime().add(Date.DAY,1),width:80},width:220},{xtype:"combo",name:"timezone",plugins:["zarafa.fieldlabeler"],fieldLabel:_("Timezone"),width:275,store:a,value:container.getSettingsModel().get("zarafa/v1/plugins/spreed/default_timezone"),mode:"local",displayField:"name",valueField:"value",triggerAction:"all",forceSelection:true,editable:false,lazyInit:false,listeners:{scope:this,select:this.onTimezoneFieldSelect}}]}},createAttachmentsPanel:function(){return{xtype:"panel",layout:"fit",
border:true,items:[{xtype:"zarafa.compositefield",hideLabel:true,anchor:"100%",autoHeight:true,items:[{xtype:"zarafa.attachmentbutton",width:100,text:_("Attachments")+":",plugins:["zarafa.recordcomponentupdaterplugin"]},{xtype:"zarafa.attachmentfield",boxtype:"zarafa.attachmentbox",plugins:["zarafa.recordcomponentupdaterplugin"],flex:1,hideLabel:true,value:undefined}]}]}},createDescriptionPanel:function(){return{xtype:"panel",flex:1,layout:"fit",border:false,items:[{xtype:"textarea",autoScroll:true,
hideLabel:true,name:"description",listeners:{scope:this,change:this.onFieldChange}}]}},update:function(a){a.isOpened()&&this.tryShowingWarning(a);this.record=a;this.getForm().loadRecord(a);var b=a.get("start_time").toUTC();a=a.get("end_time").toUTC();this.toTime.startField.setValue(b);this.toTime.endField.setValue(a)},updateRecord:function(a){a.beginEdit();this.getForm().updateRecord(a);var b=this.toTime.getValue().getStartDate(),c=this.toTime.getValue().getDueDate();b=b.fromUTC();c=c.fromUTC();a.set("start_time",
b);a.set("end_time",c);a.endEdit()},onFieldChange:function(a,b){this.record.set(a.getName(),b)},onTimePeriodFieldChange:function(a,b){var c=this.record;c.beginEdit();c.set("start_time",b.getStartDate().fromUTC());c.set("end_time",b.getDueDate().fromUTC());c.endEdit()},onTimezoneFieldSelect:function(a,b){var c=this.record;c.set("timezone",b.get(a.valueField));c.isOpened()&&c.getSubStore("recipients").each(function(d){if(Ext.isEmpty(d.get("timezone"))||d.get("timezone")==c.modified.timezone)d.set("timezone",
c.get("timezone"))},this)},addParticipantsFromAddressBook:function(){var a=this.record.copy(),b=a.getSubStore("recipients");Zarafa.common.Actions.openABUserMultiSelectionContent({callback:function(){this.record.applyData(a)},scope:this,store:b,listRestriction:{hide_groups:true,hide_distlist:true},convert:function(c,d){if(c.get("object_type")!=Zarafa.core.mapi.ObjectType.MAPI_DISTLIST)return Zarafa.core.data.RecordFactory.createRecordObjectByCustomType(Zarafa.core.data.RecordCustomObjectType.ZARAFA_SPREED_PARTICIPANT,
{entryid:c.get("entryid"),object_type:c.get("object_type"),display_name:c.get("display_name"),display_type:c.get("display_type"),display_type_ex:c.get("display_type_ex"),smtp_address:c.get("smtp_address")||c.get("email_address"),address_type:c.get("address_type"),recipient_type:d?d.defaultRecipientType:Zarafa.core.mapi.RecipientType.MAPI_TO})},selectionCfg:[{xtype:"zarafa.recipientfield",fieldLabel:_("Participants")+":",height:50,boxStore:b,filterRecipientType:Zarafa.core.mapi.RecipientType.MAPI_TO,
defaultRecipientType:Zarafa.core.mapi.RecipientType.MAPI_TO,flex:1}]})},tryShowingWarning:function(a){if(a.getRecipientStore().getCount()>this.maxParticipants){if(this.spreed_warning.hidden){this.spreed_warning.show();this.doLayout();this.spreed_warning.getEl().fadeIn({block:true,endOpacity:1,easing:"easeIn",duration:1})}}else this.spreed_warning.hidden||this.spreed_warning.getEl().fadeOut({easing:"easeOut",endOpacity:1,duration:1,scope:this,callback:function(){this.spreed_warning.hide();this.doLayout()}})}});
Ext.reg("spreed.spreedsetuppanel",Zarafa.plugins.spreed.dialogs.SpreedSetupPanel);Ext.namespace("Zarafa.plugins.spreed.dialogs");
Zarafa.plugins.spreed.dialogs.SpreedToolBar=Ext.extend(Zarafa.core.ui.ContentPanelToolbar,{constructor:function(a){a=a||{};Ext.applyIf(a,{insertionPointBase:"plugins.spreed.spreedcontentpanel",actionItems:this.createActionButtons()});Zarafa.plugins.spreed.dialogs.SpreedToolBar.superclass.constructor.call(this,a)},createActionButtons:function(){return[{xtype:"button",text:_("Setup Meeting"),tooltip:{title:_("Setup Meeting"),text:_("Setup meeting with provided details")},iconCls:"icon_spreed_setup_button",
handler:this.setUpMeeting,scope:this}]},setUpMeeting:function(){this.dialog.saveRecord()}});Ext.reg("spreed.spreedtoolbar",Zarafa.plugins.spreed.dialogs.SpreedToolBar);
