Ext.namespace("Zarafa.plugins.zdeveloper");
Zarafa.plugins.zdeveloper.ZDeveloperPlugin=Ext.extend(Zarafa.core.Plugin,{constructor:function(a){a=a||{};Ext.applyIf(a,{name:"zdeveloper"});Zarafa.plugins.zdeveloper.ZDeveloperPlugin.superclass.constructor.call(this,a)},initPlugin:function(){Zarafa.plugins.zdeveloper.ZDeveloperPlugin.superclass.initPlugin.apply(this,arguments);this.registerInsertionPoint(/(.*?)/,this.putMessageBox,this)},putMessageBox:function(a){if(a==="main.categories")return _("INSERT")+": "+a;else if(a.match(/(.*?).tabs/))return{xtype:"panel",
title:a,listeners:{added:function(){Ext.get(this.tabEl.lastChild).addClass("zdeveloper-insertion-point")},delay:1,single:true}};else if(a=="navigation.center")return{xtype:"zarafa.contextnavigation",items:[{xtype:"box",autoEl:{tag:"div",html:a,cls:"zdeveloper-insertion-point"}}],context:container.getCurrentContext()};else if(a=="context.settings.categories")return{xtype:"zarafa.settingscategory",title:a,iconCls:"zdeveloper-insertion-point",items:[]};else if(a.match(/(.*?)toolbar(.*?)/)&&a!=="previewpanel.toolbar.detaillinks")return{xtype:"button",
text:a,cls:"zdeveloper-insertion-point",listeners:{render:function(){this.text||this.setText(Ext.isObject(this.tooltip)?this.tooltip.title:this.tooltip)}}};else if(a!="main.content")return{xtype:"box",autoEl:{tag:"div",html:a,cls:"zdeveloper-insertion-point"}}}});Zarafa.onReady(function(){container.getSettingsModel().get("zarafa/v1/plugins/zdeveloper/enable")===true&&container.registerPlugin(new Zarafa.plugins.zdeveloper.ZDeveloperPlugin)});
