Ext.namespace("Zarafa.plugins.pdfbox");Zarafa.plugins.pdfbox.ABOUT='<p>Copyright (C) 2005-2013  Zarafa B.V. &lt;info@zarafa.com&gt;</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 pdfbox plugin contains the following third-party components:</p><h1>pdf.js</h1><p>Copyright (C) 2011 Mozilla Foundation</p><p>Contributors: Andreas Gal &lt;gal@mozilla.com&gt;              Chris G Jones &lt;cjones@mozilla.com&gt;              Shaon Barman &lt;shaon.barman@gmail.com&gt;              Vivien Nicolas &lt;21@vingtetun.org&gt;              Justin D\'Arcangelo &lt;justindarc@gmail.com&gt;              Yury Delendik              Kalervo Kujala              Adil Allawi &lt;@ironymark&gt;              Jakob Miland &lt;saebekassebil@gmail.com&gt;              Artur Adib &lt;aadib@mozilla.com&gt;              Brendan Dahl &lt;bdahl@mozilla.com&gt;              David Quintana &lt;gigaherz@gmail.com&gt;</p><p>Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the "Software"),to deal in the Software without restriction, including without limitationthe rights to use, copy, modify, merge, publish, distribute, sublicense,and/or sell copies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the following conditions:</p><p>The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.</p><p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALLTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHERDEALINGS IN THE SOFTWARE.</p>';
Ext.namespace("Zarafa.plugins.pdfbox");
Zarafa.plugins.pdfbox.PdfBoxPlugin=Ext.extend(Zarafa.core.Plugin,{doOpen:function(a){var b=a.get("name");a={easing:"elasticOut",resizeDuration:0.6,close:"&#215;",hideInfo:"auto",href:a.getInlineImageUrl(),title:b};Ext.ux.PdfBox.open(a)},bidSharedComponent:function(a,b){var c=-1;switch(a){case Zarafa.core.data.SharedComponentType["common.view"]:if(b instanceof Zarafa.core.data.IPMAttachmentRecord){var d=b.get("name");if(Ext.ux.PdfBox.isDocument(d))c=1}break}return c},getSharedComponent:function(a){var b;
switch(a){case Zarafa.core.data.SharedComponentType["common.view"]:b=this;break}return b}});Zarafa.onReady(function(){container.registerPlugin(new Zarafa.core.PluginMetaData({name:"pdfbox",displayName:_("PDF Box Plugin"),about:Zarafa.plugins.pdfbox.ABOUT,pluginConstructor:Zarafa.plugins.pdfbox.PdfBoxPlugin}))});
