Ext.namespace("Zarafa.plugins.titlecounter");Zarafa.plugins.titlecounter.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/">http://www.gnu.org/licenses/</a>.</p>';
Ext.namespace("Zarafa.plugins.titlecounter");
Zarafa.plugins.titlecounter.TitleCounter=Ext.extend(Zarafa.core.Plugin,{baseTitle:Ext.getDoc().dom.title,initPlugin:function(){Zarafa.plugins.titlecounter.TitleCounter.superclass.initPlugin.apply(this,arguments);container.getHierarchyStore().on("load",this.updateTitle,this,{single:true});container.getHierarchyStore().on("updateFolder",this.updateTitle,this)},updateTitle:function(){var a=container.getHierarchyStore().getDefaultFolder("inbox").get("content_unread");if(a>0)Ext.getDoc().dom.title="("+
a+") "+this.baseTitle;else Ext.getDoc().dom.title=this.baseTitle}});Zarafa.onReady(function(){container.registerPlugin(new Zarafa.core.PluginMetaData({name:"titlecounter",displayName:_("Title Counter Plugin"),about:Zarafa.plugins.titlecounter.ABOUT,pluginConstructor:Zarafa.plugins.titlecounter.TitleCounter}))});
