Browse Source

JS Files translated to english

tags/v2.0.4
Christoph Haas 4 years ago
parent
commit
52c586fbd9
11 changed files with 1515 additions and 1918 deletions
  1. +311
    -34
      .idea/workspace.xml
  2. +19
    -19
      js/ABOUT.js
  3. +42
    -42
      js/data/ResponseHandler.js
  4. +25
    -25
      js/dialogs/ImportContentPanel.js
  5. +559
    -557
      js/dialogs/ImportPanel.js
  6. +0
    -826
      js/dialogs/fields.txt
  7. +276
    -275
      js/plugin.contactimporter.js
  8. +146
    -124
      js/ui/ContextMenu.js
  9. BIN
      languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.mo
  10. +136
    -14
      languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.po
  11. +1
    -2
      php/upload.php

+ 311
- 34
.idea/workspace.xml View File

@@ -2,12 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="aae153d8-808f-4371-b0e9-9ee7ff904cab" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/contactimporter.iml" afterPath="$PROJECT_DIR$/.idea/contactimporter.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config.php" afterPath="$PROJECT_DIR$/config.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/manifest.xml" afterPath="$PROJECT_DIR$/manifest.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/download.php" afterPath="$PROJECT_DIR$/php/download.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/module.contact.php" afterPath="$PROJECT_DIR$/php/module.contact.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/plugin.contactimporter.php" afterPath="$PROJECT_DIR$/php/plugin.contactimporter.php" />
<change type="DELETED" beforePath="$PROJECT_DIR$/js/dialogs/fields.txt" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.mo" afterPath="$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.mo" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/ABOUT.js" afterPath="$PROJECT_DIR$/js/ABOUT.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/data/ResponseHandler.js" afterPath="$PROJECT_DIR$/js/data/ResponseHandler.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/dialogs/ImportContentPanel.js" afterPath="$PROJECT_DIR$/js/dialogs/ImportContentPanel.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/dialogs/ImportPanel.js" afterPath="$PROJECT_DIR$/js/dialogs/ImportPanel.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/plugin.contactimporter.js" afterPath="$PROJECT_DIR$/js/plugin.contactimporter.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/ui/ContextMenu.js" afterPath="$PROJECT_DIR$/js/ui/ContextMenu.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.po" afterPath="$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.po" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/upload.php" afterPath="$PROJECT_DIR$/php/upload.php" />
</list>
<ignored path="contactimporter.iws" />
@@ -28,7 +32,97 @@
<favorites_list name="contactimporter" />
</component>
<component name="FileEditorManager">
<leaf />
<leaf>
<file leaf-file-name="ImportPanel.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/dialogs/ImportPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="17" selection-start-line="1" selection-start-column="17" selection-end-line="1" selection-end-column="59" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ResponseHandler.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/data/ResponseHandler.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1200">
<caret line="80" column="13" selection-start-line="80" selection-start-column="8" selection-end-line="80" selection-end-column="13" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="download.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/php/download.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-225">
<caret line="3" column="15" selection-start-line="3" selection-start-column="15" selection-end-line="3" selection-end-column="57" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="module.contact.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/php/module.contact.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-16319">
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<folding>
<element signature="e#6#919#0#PHP" expanded="true" />
<element signature="e#959#992#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="plugin.contactimporter.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/php/plugin.contactimporter.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="84" column="83" selection-start-line="84" selection-start-column="83" selection-end-line="84" selection-end-column="83" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="upload.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/php/upload.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="780">
<caret line="72" column="1" selection-start-line="72" selection-start-column="1" selection-end-line="72" selection-end-column="1" />
<folding>
<element signature="e#6#911#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="plugin_calendarimporter.po" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.po">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ImportContentPanel.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/dialogs/ImportContentPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="44" column="20" selection-start-line="44" selection-start-column="20" selection-end-line="44" selection-end-column="55" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -38,9 +132,15 @@
<list>
<option value="$PROJECT_DIR$/php/download.php" />
<option value="$PROJECT_DIR$/php/module.contact.php" />
<option value="$PROJECT_DIR$/php/upload.php" />
<option value="$PROJECT_DIR$/php/plugin.contactimporter.php" />
<option value="$PROJECT_DIR$/config.php" />
<option value="$PROJECT_DIR$/js/plugin.contactimporter.js" />
<option value="$PROJECT_DIR$/js/ABOUT.js" />
<option value="$PROJECT_DIR$/js/ui/ContextMenu.js" />
<option value="$PROJECT_DIR$/js/dialogs/ImportContentPanel.js" />
<option value="$PROJECT_DIR$/js/dialogs/ImportPanel.js" />
<option value="$PROJECT_DIR$/js/data/ResponseHandler.js" />
<option value="$PROJECT_DIR$/php/upload.php" />
</list>
</option>
</component>
@@ -115,7 +215,75 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="resources" />
<option name="myItemId" value="php" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="languages" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="en_US.UTF-8" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="languages" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="en_US.UTF-8" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="LC_MESSAGES" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="languages" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="js" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
@@ -129,11 +297,47 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="resources" />
<option name="myItemId" value="js" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="css" />
<option name="myItemId" value="ui" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="js" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="dialogs" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="contactimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="js" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="data" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
@@ -206,18 +410,18 @@
<updated>1480428196914</updated>
<workItem from="1480428199144" duration="44000" />
<workItem from="1480428259775" duration="69000" />
<workItem from="1480428330068" duration="1107000" />
<workItem from="1480428330068" duration="2756000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1220000" />
<option name="totallyTimeSpent" value="2869000" />
</component>
<component name="ToolWindowManager">
<frame x="65" y="24" width="1792" height="999" extended-state="6" />
<editor active="false" />
<editor active="true" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@@ -262,53 +466,126 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/module.contact.php">
<entry file="file://$PROJECT_DIR$/resources/css/contactimporter-main.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="75" selection-start-line="8" selection-start-column="75" selection-end-line="8" selection-end-column="75" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/ABOUT.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="20" selection-end-column="3" />
<folding>
<element signature="e#6#919#0#PHP" expanded="true" />
<element signature="e#959#992#0#PHP" expanded="true" />
<marker date="1480430157843" expanded="true" signature="1216:1220" ph="&lt;" />
<marker date="1480430157843" expanded="true" signature="1246:1250" ph="&gt;" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/upload.php">
<entry file="file://$PROJECT_DIR$/js/plugin.contactimporter.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-196">
<caret line="2" column="55" selection-start-line="2" selection-start-column="55" selection-end-line="2" selection-end-column="55" />
<state relative-caret-position="585">
<caret line="138" column="53" selection-start-line="138" selection-start-column="18" selection-end-line="138" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/plugin.contactimporter.php">
<entry file="file://$PROJECT_DIR$/js/dialogs/fields.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="84" column="83" selection-start-line="84" selection-start-column="83" selection-end-line="84" selection-end-column="83" />
<state relative-caret-position="-3900">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/ui/ContextMenu.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="660">
<caret line="65" column="53" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/dialogs/ImportContentPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="44" column="20" selection-start-line="44" selection-start-column="20" selection-end-line="44" selection-end-column="55" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/dialogs/ImportPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="17" selection-start-line="1" selection-start-column="17" selection-end-line="1" selection-end-column="59" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/ResponseHandler.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1200">
<caret line="80" column="13" selection-start-line="80" selection-start-column="8" selection-end-line="80" selection-end-column="13" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/download.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="615">
<caret line="41" column="0" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="0" />
<state relative-caret-position="-225">
<caret line="3" column="15" selection-start-line="3" selection-start-column="15" selection-end-line="3" selection-end-column="57" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/resources/css/contactimporter-main.css">
<entry file="file://$PROJECT_DIR$/php/module.contact.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state relative-caret-position="-16319">
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<folding>
<element signature="e#6#919#0#PHP" expanded="true" />
<element signature="e#959#992#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/plugin.contactimporter.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="84" column="83" selection-start-line="84" selection-start-column="83" selection-end-line="84" selection-end-column="83" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.php">
<entry file="file://$PROJECT_DIR$/php/upload.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="75" selection-start-line="8" selection-start-column="75" selection-end-line="8" selection-end-column="75" />
<state relative-caret-position="780">
<caret line="72" column="1" selection-start-line="72" selection-start-column="1" selection-end-line="72" selection-end-column="1" />
<folding>
<element signature="e#6#911#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/languages/en_US.UTF-8/LC_MESSAGES/plugin_calendarimporter.po">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>


+ 19
- 19
js/ABOUT.js View File

@@ -1,5 +1,5 @@
/**
* ABOUT.js zarafa contact to vcf im/exporter
* ABOUT.js, Kopano Webapp contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@@ -29,30 +29,30 @@ Ext.namespace('Zarafa.plugins.contactimporter');
* The copyright string holding the copyright notice for the Zarafa contactimporter Plugin.
*/
Zarafa.plugins.contactimporter.ABOUT = ""
+ "<p>Copyright (C) 2012-2016 Christoph Haas &lt;christoph.h@sprinternet.at&gt;</p>"
+ "<p>Copyright (C) 2012-2016 Christoph Haas &lt;christoph.h@sprinternet.at&gt;</p>"

+ "<p>This program is free software; you can redistribute it and/or "
+ "modify it under the terms of the GNU Lesser General Public "
+ "License as published by the Free Software Foundation; either "
+ "version 2.1 of the License, or (at your option) any later version.</p>"
+ "<p>This program is free software; you can redistribute it and/or "
+ "modify it under the terms of the GNU Lesser General Public "
+ "License as published by the Free Software Foundation; either "
+ "version 2.1 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 "
+ "Lesser General Public License for more details.</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 "
+ "Lesser General Public License for more details.</p>"

+ "<p>You should have received a copy of the GNU Lesser General Public "
+ "License along with this program; if not, write to the Free Software "
+ "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>"
+ "<p>You should have received a copy of the GNU Lesser General Public "
+ "License along with this program; if not, write to the Free Software "
+ "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>"

+ "<hr />"
+ "<hr />"

+ "<p>The contactimporter plugin contains the following third-party components:</p>"
+ "<p>The contactimporter plugin contains the following third-party components:</p>"

+ "<h1>vCard-parser</h1>"
+ "<h1>vCard-parser</h1>"

+ "<p>Copyright (C) 2016 Jeroen Desloovere</p>"
+ "<p>Copyright (C) 2016 Jeroen Desloovere</p>"

+ "<p>Licensed under the MIT License.</p>"
+ "<p>Licensed under the MIT License.</p>"

+ "<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>"
+ "<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>"

+ 42
- 42
js/data/ResponseHandler.js View File

@@ -1,5 +1,5 @@
/**
* ResponseHandler.js zarafa contact im/exporter
* ResponseHandler.js, Kopano Webapp contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@@ -34,52 +34,52 @@ Ext.namespace('Zarafa.plugins.contactimporter.data');
* Calendar specific response handler.
*/
Zarafa.plugins.contactimporter.data.ResponseHandler = Ext.extend(Zarafa.core.data.AbstractResponseHandler, {
/**
* @cfg {Function} successCallback The function which
* will be called after success request.
*/
successCallback: null,
/**
* @cfg {Function} successCallback The function which
* will be called after success request.
*/
successCallback: null,

/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doLoad: function (response) {
this.successCallback(response);
},
/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doLoad: function (response) {
this.successCallback(response);
},

/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doImport: function (response) {
this.successCallback(response);
},
/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doImport: function (response) {
this.successCallback(response);
},

/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doExport: function (response) {
this.successCallback(response);
},
/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doExport: function (response) {
this.successCallback(response);
},

/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doImportattachment: function (response) {
this.successCallback(response);
},
/**
* Call the successCallback callback function.
* @param {Object} response Object contained the response data.
*/
doImportattachment: function (response) {
this.successCallback(response);
},

/**
* In case exception happened on server, server will return
* exception response with the code of exception.
* @param {Object} response Object contained the response data.
*/
doError: function (response) {
alert("error response code: " + response.error.info.code);
}
/**
* In case exception happened on server, server will return
* exception response with the code of exception.
* @param {Object} response Object contained the response data.
*/
doError: function (response) {
alert("error response code: " + response.error.info.code);
}
});

Ext.reg('contactimporter.contactresponsehandler', Zarafa.plugins.contactimporter.data.ResponseHandler);

+ 25
- 25
js/dialogs/ImportContentPanel.js View File

@@ -1,5 +1,5 @@
/**
* ImportContentPanel.js zarafa contact to vcf im/exporter
* ImportContentPanel.js, Kopano Webapp contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@@ -36,31 +36,31 @@ Ext.namespace("Zarafa.plugins.contactimporter.dialogs");
*/
Zarafa.plugins.contactimporter.dialogs.ImportContentPanel = Ext.extend(Zarafa.core.ui.ContentPanel, {

/**
* @constructor
* @param config Configuration structure
*/
constructor: function (config) {
config = config || {};
var title = _('Import Contacts');
Ext.applyIf(config, {
layout : 'fit',
title : title,
closeOnSave: true,
width : 620,
height : 465,
//Add panel
items : [
{
xtype : 'contactimporter.importcontactpanel',
filename: config.filename,
folder : config.folder
}
]
});
/**
* @constructor
* @param config Configuration structure
*/
constructor: function (config) {
config = config || {};
var title = dgettext('plugin_contactimporter', 'Import Contacts');
Ext.applyIf(config, {
layout: 'fit',
title: title,
closeOnSave: true,
width: 620,
height: 465,
//Add panel
items: [
{
xtype: 'contactimporter.importcontactpanel',
filename: config.filename,
folder: config.folder
}
]
});

Zarafa.plugins.contactimporter.dialogs.ImportContentPanel.superclass.constructor.call(this, config);
}
Zarafa.plugins.contactimporter.dialogs.ImportContentPanel.superclass.constructor.call(this, config);
}

});


+ 559
- 557
js/dialogs/ImportPanel.js
File diff suppressed because it is too large
View File


+ 0
- 826
js/dialogs/fields.txt View File

@@ -1,826 +0,0 @@
access

2

address_book_long

0

address_book_mv

null

address_type

"SMTP"

anniversary_eventid

""

assistant

""

assistant_telephone_number

""

birthday

null

birthday_eventid

""

body

""

business2_telephone_number

""

business_address

""

business_address_city

""

business_address_country

""

business_address_postal_code

""

business_address_state

""

business_address_street

""

business_fax_number

""

business_home_page

""

business_telephone_number

""

callback_telephone_number

""

car_telephone_number

""

categories

""

cellular_telephone_number

""

company_name

"testcompany"

company_telephone_number

""

contacts

""

contacts_string

""

creation_time

null

department_name

"departm"

display_bcc

""

display_cc

""

display_name

"Dr. testf testm testl Jr."

display_name_prefix

"Dr."

display_to

""

dstendday

""

dstendhour

""

dstendmonth

""

dstendweek

""

dststartday

""

dststarthour

""

dststartmonth

""

dststartweek

""

email_address

""

email_address_1

""

email_address_2

""

email_address_3

""

email_address_display_name_1

""

email_address_display_name_2

""

email_address_display_name_3

""

email_address_display_name_email_1

""

email_address_display_name_email_2

""

email_address_display_name_email_3

""

email_address_entryid_1

""

email_address_entryid_2

""

email_address_entryid_3

""

email_address_type_1

""

email_address_type_2

""

email_address_type_3

""

email_index

-1

fax_1_address_type

""

fax_1_email_address

""

fax_1_original_display_name

""

fax_1_original_entryid

""

fax_2_address_type

""

fax_2_email_address

""

fax_2_original_display_name

""

fax_2_original_entryid

""

fax_3_address_type

""

fax_3_email_address

""

fax_3_original_display_name

""

fax_3_original_entryid

""

fileas

"testl, testf testm"

fileas_selection

-1

generation

"Jr."

given_name

"testf"

hasattach

false

home2_telephone_number

""

home_address

""

home_address_city

""

home_address_country

""

home_address_postal_code

""

home_address_state

""

home_address_street

""

home_fax_number

""

home_telephone_number

""

html_body

"<font face="tahoma"><br></font>"

icon_index

512

im

""

isHTML

false

isdn_number

""

last_modification_time

null

mailing_address

""

manager_name

""

message_class

"IPM.Contact"

message_flags

1

message_size

""

middle_name

"testm"

nickname

"nickn"

normalized_subject

""

object_type

5

office_location

"olocation"

other_address

""

other_address_city

""

other_address_country

""

other_address_postal_code

""

other_address_state

""

other_address_street

""

other_telephone_number

""

pager_telephone_number

""

primary_fax_number

""

primary_telephone_number

""

private

false

profession

"profess"

radio_telephone_number

""

read_receipt_requested

false

sender_address_type

""

sender_email_address

""

sender_entryid

""

sender_name

""

sender_search_key

""

sensitivity

0

sent_representing_address_type

""

sent_representing_email_address

""

sent_representing_entryid

""

sent_representing_name

""

sent_representing_search_key

""

spouse_name

""

subject

"testf testm testl"

surname

"testl"

telex_telephone_number

""

timezone

""

timezonedst

""

title

"jobt"

ttytdd_telephone_number

""

unk

""

webpage

""

wedding_anniversary

null

+ 276
- 275
js/plugin.contactimporter.js View File

@@ -1,5 +1,5 @@
/**
* plugin.contactimporter.js zarafa contactimporter
* plugin.contactimporter.js, Kopano Webapp contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@@ -24,274 +24,275 @@ Ext.namespace("Zarafa.plugins.contactimporter"); // Assign the right nam

Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, { // create new import plugin

/**
* @constructor
* @param {Object} config Configuration object
*
*/
constructor: function (config) {
config = config || {};

Zarafa.plugins.contactimporter.ImportPlugin.superclass.constructor.call(this, config);
},

/**
* initialises insertion point for plugin
* @protected
*/
initPlugin: function () {
Zarafa.plugins.contactimporter.ImportPlugin.superclass.initPlugin.apply(this, arguments);

/* our panel */
Zarafa.core.data.SharedComponentType.addProperty('plugins.contactimporter.dialogs.importcontacts');

/* directly import received vcfs */
this.registerInsertionPoint('common.contextmenu.attachment.actions', this.createAttachmentImportButton, this);

/* export a contact via rightclick */
this.registerInsertionPoint('context.contact.contextmenu.actions', this.createItemExportInsertionPoint, this);
},

/**
* This method hooks to the contact context menu and allows users to export users to vcf.
*
* @param include
* @param btn
* @returns {Object}
*/
createItemExportInsertionPoint: function (include, btn) {
return {
text : dgettext('plugin_files', 'Export vCard'),
handler: this.exportToVCF.createDelegate(this, [btn]),
scope : this,
iconCls: 'icon_contactimporter_export'
};
},

/**
* Generates a request to download the selected records as vCard.
* @param {Ext.Button} btn
*/
exportToVCF: function (btn) {
if (btn.records.length == 0) {
return; // skip if no records where given!
}

var recordIds = [];

for (var i = 0; i < btn.records.length; i++) {
recordIds.push(btn.records[i].get("entryid"));
}

var responseHandler = new Zarafa.plugins.contactimporter.data.ResponseHandler({
successCallback: this.downloadVCF,
scope : this
});

// request attachment preperation
container.getRequest().singleRequest(
'contactmodule',
'export',
{
storeid: btn.records[0].get("store_entryid"),
records: recordIds
},
responseHandler
);
},

/**
* Callback for the export request.
* @param {Object} response
*/
downloadVCF: function (response) {
if (response.status == false) {
Zarafa.common.dialogs.MessageBox.show({
title : dgettext('plugin_files', 'Warning'),
msg : dgettext('plugin_files', response.message),
icon : Zarafa.common.dialogs.MessageBox.WARNING,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
} else {
var downloadFrame = Ext.getBody().createChild({
tag: 'iframe',
cls: 'x-hidden'
});

var url = document.URL;
var link = url.substring(0, url.lastIndexOf('/') + 1);

link += "index.php?sessionid=" + container.getUser().getSessionId() + "&load=custom&name=download_vcf";
link = Ext.urlAppend(link, "token=" + encodeURIComponent(response.download_token));
link = Ext.urlAppend(link, "filename=" + encodeURIComponent(response.filename));

downloadFrame.dom.contentWindow.location = link;
}
},

/**
* Insert import button in all attachment suggestions

* @return {Object} Configuration object for a {@link Ext.Button button}
*/
createAttachmentImportButton: function (include, btn) {
return {
text : _('Import to Contacts'),
handler : this.getAttachmentFileName.createDelegate(this, [btn]),
scope : this,
iconCls : 'icon_contactimporter_button',
beforeShow: function (item, record) {
var extension = record.data.name.split('.').pop().toLowerCase();

if (record.data.filetype == "text/vcard" || record.data.filetype == "text/x-vcard" || extension == "vcf" || extension == "vcard") {
item.setVisible(true);
} else {
item.setVisible(false);
}
}
};
},

/**
* Callback for getAttachmentFileName
* @param {Object} response
*/
gotAttachmentFileName: function (response) {
if (response.status == true) {
this.openImportDialog(response.tmpname);
} else {
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _(response["message"]),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
}
},

/**
* Clickhandler for the button
* @param {Ext.Button} btn
*/
getAttachmentFileName: function (btn) {
Zarafa.common.dialogs.MessageBox.show({
title : 'Please wait',
msg : 'Loading attachment...',
progressText: 'Initializing...',
width : 300,
progress : true,
closable : false
});

// progress bar... ;)
var f = function (v) {
return function () {
if (v == 100) {
Zarafa.common.dialogs.MessageBox.hide();
} else {
Zarafa.common.dialogs.MessageBox.updateProgress(v / 100, Math.round(v) + '% loaded');
}
};
};

for (var i = 1; i < 101; i++) {
setTimeout(f(i), 20 * i);
}

/* store the attachment to a temporary folder and prepare it for uploading */
var attachmentRecord = btn.records;
var attachmentStore = attachmentRecord.store;

var store = attachmentStore.getParentRecord().get('store_entryid');
var entryid = attachmentStore.getAttachmentParentRecordEntryId();
var attachNum = new Array(1);
if (attachmentRecord.get('attach_num') != -1) {
attachNum[0] = attachmentRecord.get('attach_num');
} else {
attachNum[0] = attachmentRecord.get('tmpname');
}
var dialog_attachments = attachmentStore.getId();
var filename = attachmentRecord.data.name;

var responseHandler = new Zarafa.plugins.contactimporter.data.ResponseHandler({
successCallback: this.gotAttachmentFileName.createDelegate(this),
scope : this
});

// request attachment preperation
container.getRequest().singleRequest(
'contactmodule',
'importattachment',
{
entryid : entryid,
store : store,
attachNum : attachNum,
dialog_attachments: dialog_attachments,
filename : filename
},
responseHandler
);
},

/**
* Open the import dialog.
* @param {String} filename
*/
openImportDialog: function (filename) {
var componentType = Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts'];
var config = {
filename: filename,
modal : true
};

Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
},

/**
* Bid for the type of shared component
* and the given record.
* This will bid on calendar.dialogs.importcontacts
* @param {Zarafa.core.data.SharedComponentType} type Type of component a context can bid for.
* @param {Ext.data.Record} record Optionally passed record.
* @return {Number} The bid for the shared component
*/
bidSharedComponent: function (type, record) {
var bid = -1;
switch (type) {
case Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts']:
bid = 1;
break;
case Zarafa.core.data.SharedComponentType['common.contextmenu']:
if (record instanceof Zarafa.core.data.MAPIRecord) {
if (record.get('object_type') == Zarafa.core.mapi.ObjectType.MAPI_FOLDER && record.get('container_class') == "IPF.Contact") {
bid = 2;
}
}
break;
}
return bid;
},

/**
* Will return the reference to the shared component.
* Based on the type of component requested a component is returned.
* @param {Zarafa.core.data.SharedComponentType} type Type of component a context can bid for.
* @param {Ext.data.Record} record Optionally passed record.
* @return {Ext.Component} Component
*/
getSharedComponent: function (type, record) {
var component;
switch (type) {
case Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts']:
component = Zarafa.plugins.contactimporter.dialogs.ImportContentPanel;
break;
case Zarafa.core.data.SharedComponentType['common.contextmenu']:
component = Zarafa.plugins.contactimporter.ui.ContextMenu;
break;
}

return component;
}
/**
* @constructor
* @param {Object} config Configuration object
*
*/
constructor: function (config) {
config = config || {};

Zarafa.plugins.contactimporter.ImportPlugin.superclass.constructor.call(this, config);
},

/**
* initialises insertion point for plugin
* @protected
*/
initPlugin: function () {
Zarafa.plugins.contactimporter.ImportPlugin.superclass.initPlugin.apply(this, arguments);

/* our panel */
Zarafa.core.data.SharedComponentType.addProperty('plugins.contactimporter.dialogs.importcontacts');

/* directly import received vcfs */
this.registerInsertionPoint('common.contextmenu.attachment.actions', this.createAttachmentImportButton, this);

/* export a contact via rightclick */
this.registerInsertionPoint('context.contact.contextmenu.actions', this.createItemExportInsertionPoint, this);
},

/**
* This method hooks to the contact context menu and allows users to export users to vcf.
*
* @param include
* @param btn
* @returns {Object}
*/
createItemExportInsertionPoint: function (include, btn) {
return {
text: dgettext('plugin_contactimporter', 'Export vCard'),
handler: this.exportToVCF.createDelegate(this, [btn]),
scope: this,
iconCls: 'icon_contactimporter_export'
};
},

/**
* Generates a request to download the selected records as vCard.
* @param {Ext.Button} btn
*/
exportToVCF: function (btn) {
if (btn.records.length == 0) {
return; // skip if no records where given!
}

var recordIds = [];

for (var i = 0; i < btn.records.length; i++) {
recordIds.push(btn.records[i].get("entryid"));
}

var responseHandler = new Zarafa.plugins.contactimporter.data.ResponseHandler({
successCallback: this.downloadVCF,
scope: this
});

// request attachment preperation
container.getRequest().singleRequest(
'contactmodule',
'export',
{
storeid: btn.records[0].get("store_entryid"),
records: recordIds
},
responseHandler
);
},

/**
* Callback for the export request.
* @param {Object} response
*/
downloadVCF: function (response) {
if (response.status == false) {
Zarafa.common.dialogs.MessageBox.show({
title: dgettext('plugin_contactimporter', 'Warning'),
msg: response.message,
icon: Zarafa.common.dialogs.MessageBox.WARNING,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
} else {
var downloadFrame = Ext.getBody().createChild({
tag: 'iframe',
cls: 'x-hidden'
});

var url = document.URL;
var link = url.substring(0, url.lastIndexOf('/') + 1);

link += "index.php?sessionid=" + container.getUser().getSessionId() + "&load=custom&name=download_vcf";
link = Ext.urlAppend(link, "token=" + encodeURIComponent(response.download_token));
link = Ext.urlAppend(link, "filename=" + encodeURIComponent(response.filename));

downloadFrame.dom.contentWindow.location = link;
}
},

/**
* Insert import button in all attachment suggestions

* @return {Object} Configuration object for a {@link Ext.Button button}
*/
createAttachmentImportButton: function (include, btn) {
return {
text: dgettext('plugin_contactimporter', 'Import to Contacts'),
handler: this.getAttachmentFileName.createDelegate(this, [btn]),
scope: this,
iconCls: 'icon_contactimporter_button',
beforeShow: function (item, record) {
var extension = record.data.name.split('.').pop().toLowerCase();

if (record.data.filetype == "text/vcard" || record.data.filetype == "text/x-vcard" || extension == "vcf" || extension == "vcard") {
item.setVisible(true);
} else {
item.setVisible(false);
}
}
};
},

/**
* Callback for getAttachmentFileName
* @param {Object} response
*/
gotAttachmentFileName: function (response) {
if (response.status == true) {
this.openImportDialog(response.tmpname);
} else {
Zarafa.common.dialogs.MessageBox.show({
title: dgettext('plugin_contactimporter', 'Error'),
msg: _(response["message"]),
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
}
},

/**
* Clickhandler for the button
* @param {Ext.Button} btn
*/
getAttachmentFileName: function (btn) {
Zarafa.common.dialogs.MessageBox.show({
title: dgettext('plugin_contactimporter', 'Please wait'),
msg: dgettext('plugin_contactimporter', 'Loading attachment...'),
progressText: dgettext('plugin_contactimporter', 'Initializing...'),
width: 300,
progress: true,
closable: false
});

// progress bar... ;)
var f = function (v) {
return function () {
if (v == 100) {
Zarafa.common.dialogs.MessageBox.hide();
} else {
// # TRANSLATORS: {0} will be replaced by the percentage value (0-100)
Zarafa.common.dialogs.MessageBox.updateProgress(v / 100, String.format(dgettext('plugin_contactimporter', '{0}% loaded'), Math.round(v)));
}
};
};

for (var i = 1; i < 101; i++) {
setTimeout(f(i), 20 * i);
}

/* store the attachment to a temporary folder and prepare it for uploading */
var attachmentRecord = btn.records;
var attachmentStore = attachmentRecord.store;

var store = attachmentStore.getParentRecord().get('store_entryid');
var entryid = attachmentStore.getAttachmentParentRecordEntryId();
var attachNum = new Array(1);
if (attachmentRecord.get('attach_num') != -1) {
attachNum[0] = attachmentRecord.get('attach_num');
} else {
attachNum[0] = attachmentRecord.get('tmpname');
}
var dialog_attachments = attachmentStore.getId();
var filename = attachmentRecord.data.name;

var responseHandler = new Zarafa.plugins.contactimporter.data.ResponseHandler({
successCallback: this.gotAttachmentFileName.createDelegate(this),
scope: this
});

// request attachment preperation
container.getRequest().singleRequest(
'contactmodule',
'importattachment',
{
entryid: entryid,
store: store,
attachNum: attachNum,
dialog_attachments: dialog_attachments,
filename: filename
},
responseHandler
);
},

/**
* Open the import dialog.
* @param {String} filename
*/
openImportDialog: function (filename) {
var componentType = Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts'];
var config = {
filename: filename,
modal: true
};

Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
},

/**
* Bid for the type of shared component
* and the given record.
* This will bid on calendar.dialogs.importcontacts
* @param {Zarafa.core.data.SharedComponentType} type Type of component a context can bid for.
* @param {Ext.data.Record} record Optionally passed record.
* @return {Number} The bid for the shared component
*/
bidSharedComponent: function (type, record) {
var bid = -1;
switch (type) {
case Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts']:
bid = 1;
break;
case Zarafa.core.data.SharedComponentType['common.contextmenu']:
if (record instanceof Zarafa.core.data.MAPIRecord) {
if (record.get('object_type') == Zarafa.core.mapi.ObjectType.MAPI_FOLDER && record.get('container_class') == "IPF.Contact") {
bid = 2;
}
}
break;
}
return bid;
},

/**
* Will return the reference to the shared component.
* Based on the type of component requested a component is returned.
* @param {Zarafa.core.data.SharedComponentType} type Type of component a context can bid for.
* @param {Ext.data.Record} record Optionally passed record.
* @return {Ext.Component} Component
*/
getSharedComponent: function (type, record) {
var component;
switch (type) {
case Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts']:
component = Zarafa.plugins.contactimporter.dialogs.ImportContentPanel;
break;
case Zarafa.core.data.SharedComponentType['common.contextmenu']:
component = Zarafa.plugins.contactimporter.ui.ContextMenu;
break;
}

return component;
}
});


@@ -299,10 +300,10 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
* STARTUP
*############################################################################################################################*/
Zarafa.onReady(function () {
container.registerPlugin(new Zarafa.core.PluginMetaData({
name : 'contactimporter',
displayName : _('Contactimporter Plugin'),
about : Zarafa.plugins.contactimporter.ABOUT,
pluginConstructor: Zarafa.plugins.contactimporter.ImportPlugin
}));
container.registerPlugin(new Zarafa.core.PluginMetaData({
name: 'contactimporter',
displayName: dgettext('plugin_contactimporter', 'Contactimporter Plugin'),
about: Zarafa.plugins.contactimporter.ABOUT,
pluginConstructor: Zarafa.plugins.contactimporter.ImportPlugin
}));
});

+ 146
- 124
js/ui/ContextMenu.js View File

@@ -1,3 +1,25 @@
/**
* ContextMenu.js, Kopano Webapp contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/

Ext.namespace('Zarafa.plugins.contactimporter.ui');

/**
@@ -7,130 +29,130 @@ Ext.namespace('Zarafa.plugins.contactimporter.ui');