Added Translation

This commit is contained in:
Christoph Haas 2016-11-29 19:58:23 +01:00
parent e70894c048
commit 010bd521bc
31 changed files with 4831 additions and 3842 deletions

View File

@ -1,7 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e7c9c2bb-66f1-4e37-904c-d33d8c113bde" name="Default" comment="" />
<list default="true" id="e7c9c2bb-66f1-4e37-904c-d33d8c113bde" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/backend/.htaccess" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Makefile" afterPath="$PROJECT_DIR$/Makefile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build.xml" afterPath="$PROJECT_DIR$/build.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/changelog.txt" afterPath="$PROJECT_DIR$/changelog.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config.php" afterPath="$PROJECT_DIR$/config.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/ABOUT.js" afterPath="$PROJECT_DIR$/js/ABOUT.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/data/Actions.js" afterPath="$PROJECT_DIR$/js/data/Actions.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/data/timezones.js" afterPath="$PROJECT_DIR$/js/data/timezones.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.calendarimporter.js" afterPath="$PROJECT_DIR$/js/plugin.calendarimporter.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js" afterPath="$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/SettingsWidget.js" afterPath="$PROJECT_DIR$/js/settings/SettingsWidget.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js" afterPath="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js" afterPath="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js" afterPath="$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/settings/ui/CalSyncPanel.js" afterPath="$PROJECT_DIR$/js/settings/ui/CalSyncPanel.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/ui/ContextMenu.js" afterPath="$PROJECT_DIR$/js/ui/ContextMenu.js" />
<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.calendar.php" afterPath="$PROJECT_DIR$/php/module.calendar.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/plugin.calendarimporter.php" afterPath="$PROJECT_DIR$/php/plugin.calendarimporter.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/php/upload.php" afterPath="$PROJECT_DIR$/php/upload.php" />
</list>
<ignored path="calendarimporter.iws" />
<ignored path=".idea/workspace.xml" />
<ignored path=".idea/dataSources.local.xml" />
@ -20,104 +46,70 @@
<favorites_list name="calendarimporter" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="CalSyncEditPanel.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1480">
<caret line="101" column="30" selection-start-line="101" selection-start-column="30" selection-end-line="101" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CalSyncGrid.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="ContextMenu.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/ui/ContextMenu.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="504">
<caret line="85" column="59" selection-start-line="85" selection-start-column="59" selection-end-line="85" selection-end-column="59" />
<caret line="101" column="8" selection-start-line="101" selection-start-column="8" selection-end-line="104" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SettingsCalSyncWidget.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js">
<file leaf-file-name="plugin.calendarimporter.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="729">
<caret line="104" column="16" selection-start-line="104" selection-start-column="16" selection-end-line="104" selection-end-column="142" />
<caret line="320" column="54" selection-start-line="320" selection-start-column="31" selection-end-line="320" selection-end-column="54" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sync.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/backend/sync.php">
<file leaf-file-name="module.calendar.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/php/module.calendar.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="47" selection-start-line="24" selection-start-column="47" selection-end-line="24" selection-end-column="47" />
<state relative-caret-position="301">
<caret line="329" column="17" selection-start-line="329" selection-start-column="17" selection-end-line="329" selection-end-column="17" />
<folding>
<element signature="e#21#926#0#PHP" expanded="true" />
<element signature="e#6#914#0#PHP" expanded="true" />
<element signature="n#__construct#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#execute#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#randomstring#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#getDurationStringFromMintues#0;n#CalendarModule#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="changelog.txt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/changelog.txt">
<file leaf-file-name="Makefile" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Makefile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
<state relative-caret-position="15">
<caret line="1" column="92" selection-start-line="1" selection-start-column="92" selection-end-line="1" selection-end-column="92" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="manifest.xml" pinned="false" current-in-tab="false">
<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="144">
<caret line="28" column="35" selection-start-line="28" selection-start-column="35" selection-end-line="28" selection-end-column="35" />
<folding>
<element signature="e#7#908#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="manifest.xml" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/manifest.xml">
<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="functions.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/backend/functions.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="26" selection-start-line="5" selection-start-column="26" selection-end-line="5" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README.txt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/backend/README.txt">
<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="config.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/backend/config.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" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CalSyncEditContentPanel.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="63" selection-start-line="0" selection-start-column="63" selection-end-line="0" selection-end-column="63" />
<state relative-caret-position="135">
<caret line="9" column="62" selection-start-line="9" selection-start-column="62" selection-end-line="9" selection-end-column="62" />
<folding />
</state>
</provider>
@ -138,21 +130,33 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/php/plugin.calendarimporter.php" />
<option value="$PROJECT_DIR$/config.php" />
<option value="$PROJECT_DIR$/js/plugin.calendarimporter.js" />
<option value="$PROJECT_DIR$/php/module.calendar.php" />
<option value="$PROJECT_DIR$/js/data/CalendarHelper.js" />
<option value="$PROJECT_DIR$/js/data/Actions.js" />
<option value="$PROJECT_DIR$/js/dialogs/ImportPanel.js" />
<option value="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js" />
<option value="$PROJECT_DIR$/js/settings/SettingsWidget.js" />
<option value="$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js" />
<option value="$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js" />
<option value="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js" />
<option value="$PROJECT_DIR$/backend/sync.php" />
<option value="$PROJECT_DIR$/backend/functions.php" />
<option value="$PROJECT_DIR$/changelog.txt" />
<option value="$PROJECT_DIR$/Makefile" />
<option value="$PROJECT_DIR$/manifest.xml" />
<option value="$PROJECT_DIR$/php/upload.php" />
<option value="$PROJECT_DIR$/php/download.php" />
<option value="$PROJECT_DIR$/php/plugin.calendarimporter.php" />
<option value="$PROJECT_DIR$/build.xml" />
<option value="$PROJECT_DIR$/js/ABOUT.js" />
<option value="$PROJECT_DIR$/js/ui/ContextMenu.js" />
<option value="$PROJECT_DIR$/js/settings/SettingsWidget.js" />
<option value="$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js" />
<option value="$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js" />
<option value="$PROJECT_DIR$/js/settings/ui/CalSyncPanel.js" />
<option value="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js" />
<option value="$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js" />
<option value="$PROJECT_DIR$/js/dialogs/ImportPanel.js" />
<option value="$PROJECT_DIR$/js/dialogs/ImportContentPanel.js" />
<option value="$PROJECT_DIR$/js/data/ResponseHandler.js" />
<option value="$PROJECT_DIR$/js/data/Actions.js" />
<option value="$PROJECT_DIR$/js/data/timezones.js" />
<option value="$PROJECT_DIR$/backend/.htaccess" />
<option value="$PROJECT_DIR$/config.php" />
<option value="$PROJECT_DIR$/js/plugin.calendarimporter.js" />
<option value="$PROJECT_DIR$/php/module.calendar.php" />
</list>
</option>
</component>
@ -162,6 +166,9 @@
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpServers">
<servers />
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="65" />
@ -213,6 +220,20 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<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="calendarimporter" />
@ -245,86 +266,6 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<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="settings" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<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="settings" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<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="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<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="settings" />
<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="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<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="calendarimporter" />
@ -343,20 +284,6 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="backend" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
@ -386,6 +313,12 @@
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
@ -412,6 +345,9 @@
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="e7c9c2bb-66f1-4e37-904c-d33d8c113bde" name="Default" comment="" />
@ -419,12 +355,13 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1477949602474</updated>
<workItem from="1477949603566" duration="9042000" />
<workItem from="1477949603566" duration="9204000" />
<workItem from="1480441197414" duration="4152000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="9042000" />
<option name="totallyTimeSpent" value="13356000" />
</component>
<component name="ToolWindowManager">
<frame x="65" y="24" width="1792" height="999" extended-state="6" />
@ -432,19 +369,19 @@
<layout>
<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="-1" 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="-1" 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" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32900432" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32900432" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32900432" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" 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="-1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Terminal" 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="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" 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="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>
@ -467,131 +404,17 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/Makefile">
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.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="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/composer.json">
<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>
<entry file="file://$PROJECT_DIR$/php/upload.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" />
<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="-456">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="n#!!doc" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/module.calendar.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1057">
<caret line="467" column="64" selection-start-line="467" selection-start-column="64" selection-end-line="467" selection-end-column="64" />
<folding>
<element signature="n#__construct#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#execute#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#randomstring#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#getDurationStringFromMintues#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#exportCalendar#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#importCalendar#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#getAttachmentPath#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#loadCalendar#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#parseCalendarToArray#0;n#CalendarModule#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="60" selection-start-line="4" selection-start-column="12" selection-end-line="4" selection-end-column="60" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/plugin.calendarimporter.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="569">
<caret line="82" column="40" selection-start-line="82" selection-start-column="29" selection-end-line="82" selection-end-column="40" />
<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="-171">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="n#!!doc" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/CalendarHelper.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="0" selection-end-column="0" />
<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="332">
<caret line="245" column="12" selection-start-line="245" selection-start-column="12" selection-end-line="245" selection-end-column="226" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/Actions.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="133" column="67" selection-start-line="133" selection-start-column="22" selection-end-line="133" selection-end-column="67" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/SettingsWidget.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="83" column="82" selection-start-line="83" selection-start-column="82" selection-end-line="83" selection-end-column="82" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-51">
<caret line="262" column="12" selection-start-line="262" selection-start-column="12" selection-end-line="262" selection-end-column="12" />
<state relative-caret-position="1515">
<caret line="101" column="30" selection-start-line="101" selection-start-column="30" selection-end-line="101" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="504">
<state relative-caret-position="1275">
<caret line="85" column="59" selection-start-line="85" selection-start-column="59" selection-end-line="85" selection-end-column="59" />
<folding />
</state>
@ -599,12 +422,62 @@
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="729">
<state relative-caret-position="1560">
<caret line="104" column="16" selection-start-line="104" selection-start-column="16" selection-end-line="104" selection-end-column="142" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/backend/sync.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="24" column="47" selection-start-line="24" selection-start-column="47" selection-end-line="24" selection-end-column="47" />
<folding>
<element signature="e#21#926#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/changelog.txt">
<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>
<entry file="file://$PROJECT_DIR$/manifest.xml">
<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>
<entry file="file://$PROJECT_DIR$/backend/functions.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="26" selection-start-line="5" selection-start-column="26" selection-end-line="5" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/backend/README.txt">
<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>
<entry file="file://$PROJECT_DIR$/backend/config.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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -613,14 +486,14 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js">
<entry file="file://$PROJECT_DIR$/php/composer.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1480">
<caret line="101" column="30" selection-start-line="101" selection-start-column="30" selection-end-line="101" selection-end-column="30" />
<folding />
<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>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/CalendarHelper.js" />
<entry file="file://$PROJECT_DIR$/backend/functions.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
@ -637,6 +510,139 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/backend/sync.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="24" column="47" selection-start-line="24" selection-start-column="47" selection-end-line="24" selection-end-column="47" />
<folding>
<element signature="e#21#926#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/changelog.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="30" selection-start-line="2" selection-start-column="30" selection-end-line="2" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="56" selection-start-line="2" selection-start-column="56" selection-end-line="2" selection-end-column="56" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/ABOUT.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="744">
<caret line="61" column="71" selection-start-line="61" selection-start-column="71" selection-end-line="61" selection-end-column="71" />
<folding>
<marker date="1480442383471" expanded="true" signature="1214:1218" ph="&lt;" />
<marker date="1480442383471" expanded="true" signature="1244:1248" ph="&gt;" />
<marker date="1480442383471" expanded="true" signature="2881:2885" ph="&lt;" />
<marker date="1480442383471" expanded="true" signature="2905:2909" ph="&gt;" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/SettingsCalSyncWidget.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="945">
<caret line="63" column="55" selection-start-line="63" selection-start-column="55" selection-end-line="63" selection-end-column="55" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/ui/CalSyncGrid.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="435">
<caret line="44" column="93" selection-start-line="44" selection-start-column="57" selection-end-line="44" selection-end-column="93" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/ui/CalSyncPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="744">
<caret line="65" column="17" selection-start-line="65" selection-start-column="17" selection-end-line="65" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/SettingsWidget.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 />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditContentPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="624">
<caret line="48" column="55" selection-start-line="48" selection-start-column="55" selection-end-line="48" selection-end-column="55" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/external/Ext.util.base64.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="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/settings/dialogs/CalSyncEditPanel.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="147" column="28" selection-start-line="147" selection-start-column="28" selection-end-line="147" selection-end-column="64" />
<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="774">
<caret line="63" column="2" selection-start-line="63" selection-start-column="2" selection-end-line="63" selection-end-column="2" />
<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="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="n#!!doc" expanded="true" />
</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="15">
<caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/timezones.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-9350">
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/backend/README.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -645,28 +651,111 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/backend/sync.php">
<entry file="file://$PROJECT_DIR$/backend/.htaccess">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="47" selection-start-line="24" selection-start-column="47" selection-end-line="24" selection-end-column="47" />
<state relative-caret-position="0">
<caret line="0" column="13" selection-start-line="0" selection-start-column="13" selection-end-line="0" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor 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 />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="59" selection-start-line="2" selection-start-column="54" selection-end-line="2" selection-end-column="59" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/plugin.calendarimporter.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-90">
<caret line="36" column="5" selection-start-line="36" selection-start-column="5" selection-end-line="36" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/upload.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-314">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#21#926#0#PHP" expanded="true" />
<element signature="e#6#905#0#PHP" expanded="true" />
</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="504">
<caret line="101" column="8" selection-start-line="101" selection-start-column="8" selection-end-line="104" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/download.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="28" column="35" selection-start-line="28" selection-start-column="35" selection-end-line="28" selection-end-column="35" />
<folding>
<element signature="e#7#908#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/data/Actions.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1191">
<caret line="45" column="63" selection-start-line="45" selection-start-column="63" selection-end-line="45" selection-end-column="63" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="729">
<caret line="320" column="54" selection-start-line="320" selection-start-column="31" selection-end-line="320" selection-end-column="54" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/module.calendar.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="301">
<caret line="329" column="17" selection-start-line="329" selection-start-column="17" selection-end-line="329" selection-end-column="17" />
<folding>
<element signature="e#6#914#0#PHP" expanded="true" />
<element signature="n#__construct#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#execute#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#randomstring#0;n#CalendarModule#0;n#!!top" expanded="false" />
<element signature="n#getDurationStringFromMintues#0;n#CalendarModule#0;n#!!top" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Makefile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="92" selection-start-line="1" selection-start-column="92" selection-end-line="1" selection-end-column="92" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/manifest.xml">
<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>
<entry file="file://$PROJECT_DIR$/changelog.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
<state relative-caret-position="135">
<caret line="9" column="62" selection-start-line="9" selection-start-column="62" selection-end-line="9" selection-end-column="62" />
<folding />
</state>
</provider>

View File

@ -1,2 +1,2 @@
default:
ant deploy; cp -r /home/osboxes/Documents/kopano-webapp-3.2.0.285/deploy/plugins/calendarimporter /usr/share/kopano-webapp/plugins/
rm -rf /home/osboxes/Documents/kopano-webapp-3.2.0.285/deploy/plugins/calendarimporter; ant deploy; cp -r /home/osboxes/Documents/kopano-webapp-3.2.0.285/deploy/plugins/calendarimporter /usr/share/kopano-webapp/plugins/

1
backend/.htaccess Normal file
View File

@ -0,0 +1 @@
deny from all

View File

@ -1,9 +1,10 @@
<project default="all">
<property environment="env"/>
<property name="root-folder" value="${basedir}/../../"/>
<property name="root-folder" value="${basedir}/../.."/>
<property name="tools-folder" value="${root-folder}/tools/"/>
<property name="target-folder" value="${root-folder}/deploy/plugins"/>
<property name="server-folder" value="${root-folder}/server"/>
<property name="language-folder" value="${basedir}/languages"/>
<import file="${tools-folder}/antutil.xml"/>
@ -13,7 +14,7 @@
</classpath>
</typedef>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${tools-folder}/lib/ant-contrib-1.0b3.jar"/>
</classpath>
@ -49,13 +50,14 @@
<target name="concat">
<!-- Concatenate plugin JS file -->
<if>
<available file="js" type="dir" />
<available file="js" type="dir"/>
<then>
<mkdir dir="${target-folder}/${plugin-folder}/js"/>
<echo message="Concatenating: ${plugin-debugfile}"/>
<zConcat outputFolder="${target-folder}/${plugin-folder}/js" outputFile="${plugin-debugfile}" prioritize="\w+">
<zConcat outputFolder="${target-folder}/${plugin-folder}/js" outputFile="${plugin-debugfile}"
prioritize="\w+">
<concatfiles>
<fileset dir="js" includes="**/*.js" />
<fileset dir="js" includes="**/*.js"/>
</concatfiles>
</zConcat>
</then>
@ -63,13 +65,14 @@
<!-- Concatenate plugin CSS files -->
<if>
<available file="${plugin-css-folder}" type="dir" />
<available file="${plugin-css-folder}" type="dir"/>
<then>
<mkdir dir="${target-folder}/${plugin-folder}/${plugin-css-folder}"/>
<echo message="Concatenating: ${plugin-css-file}"/>
<zConcat outputFolder="${target-folder}/${plugin-folder}/${plugin-css-folder}" outputFile="${plugin-css-file}">
<zConcat outputFolder="${target-folder}/${plugin-folder}/${plugin-css-folder}"
outputFile="${plugin-css-file}">
<concatfiles>
<fileset dir="${plugin-css-folder}" includes="**/*.css" />
<fileset dir="${plugin-css-folder}" includes="**/*.css"/>
</concatfiles>
</zConcat>
</then>
@ -79,7 +82,7 @@
<!-- Preformat the Concatenated Javascript files to improve compilation -->
<target name="preformat" depends="concat">
<if>
<available file="${target-folder}/${plugin-folder}/js/${plugin-debugfile}" type="file" />
<available file="${target-folder}/${plugin-folder}/js/${plugin-debugfile}" type="file"/>
<then>
<echo message="Preformatting: ${plugin-debugfile}"/>
<replaceregexp byline="true">
@ -94,10 +97,11 @@
<!-- Compress JavaScript -->
<target name="compress" depends="preformat">
<if>
<available file="${target-folder}/${plugin-folder}/js/${plugin-debugfile}" type="file" />
<available file="${target-folder}/${plugin-folder}/js/${plugin-debugfile}" type="file"/>
<then>
<echo message="Compiling: ${plugin-debugfile}" />
<zCompile inputFolder="${target-folder}/${plugin-folder}/js" inputFile="${plugin-debugfile}" outputFolder="${target-folder}/${plugin-folder}/js" outputFile="${plugin-file}">
<echo message="Compiling: ${plugin-debugfile}"/>
<zCompile inputFolder="${target-folder}/${plugin-folder}/js" inputFile="${plugin-debugfile}"
outputFolder="${target-folder}/${plugin-folder}/js" outputFile="${plugin-file}">
<externs>
var Ext = {};
var Zarafa = {};
@ -119,10 +123,10 @@
<!-- syntax check all PHP files -->
<target name="validate">
<if>
<available file="php" filepath="${env.PATH}" />
<available file="php" filepath="${env.PATH}"/>
<then>
<if>
<available file="config.php" type="file" />
<available file="config.php" type="file"/>
<then>
<antcall target="syntax-check">
<param name="file" value="config.php"/>
@ -130,12 +134,12 @@
</then>
</if>
<if>
<available file="php" type="dir" />
<available file="php" type="dir"/>
<then>
<foreach target="syntax-check" param="file">
<path>
<fileset dir=".">
<exclude name="php/vendor/**" />
<exclude name="php/vendor/**"/>
<include name="**/*.php"/>
</fileset>
</path>
@ -157,13 +161,56 @@
</exec>
</target>
<!-- Generate language files -->
<target name="language">
<if>
<available file="msgfmt" filepath="${env.PATH}"/>
<then>
<for param="file" parallel="true">
<fileset dir="${language-folder}">
<include name="**/LC_MESSAGES/*.po"/>
</fileset>
<sequential>
<antcall target="msgfmt">
<param name="file" value="@{file}"/>
</antcall>
</sequential>
</for>
</then>
<else>
<echo message="WARNING: msgfmt not available, not generating *.mo files for translations"/>
<!-- just copy files -->
<copy todir="${target-folder}/${plugin-folder}">
<fileset dir=".">
<include name="languages/**/*.mo"/>
<include name="languages/**/*.txt"/>
</fileset>
</copy>
</else>
</if>
</target>
<target name="msgfmt">
<propertyregex property="outfile" input="${file}" regexp=".*\/(languages\/.*)\.po"
replace="${target-folder}/${plugin-folder}/\1\.mo"/>
<echo message="Converting ${file} to ${outfile}"/>
<dirname property="outdir" file="${outfile}"/>
<mkdir dir="${outdir}"/>
<exec executable="msgfmt" failonerror="true">
<arg value="-v"/>
<arg value="-o"/>
<arg value="${outfile}"/>
<arg value="${file}"/>
</exec>
</target>
<!-- Install all files into the target folder -->
<target name="deploy" depends="compress, validate">
<target name="deploy" depends="compress, validate, language">
<mkdir dir="${target-folder}/${plugin-folder}"/>
<!-- Copy (and validate) manifest.xml -->
<if>
<available file="xmllint" filepath="${env.PATH}" />
<available file="xmllint" filepath="${env.PATH}"/>
<then>
<exec executable="xmllint" output="${target-folder}/${plugin-folder}/manifest.xml" failonerror="true">
<arg value="--valid"/>

View File

@ -1,3 +1,7 @@
calendarimporter 2.2.1:
- finally supporting Kopano Webapp 3.1.x
- translation to german added
calendarimporter 2.2.0:
- support for Kopano Webapp 3.1.1
- Code rework

View File

@ -1,13 +1,12 @@
<?php
/** Disable the import plugin for all clients */
define('PLUGIN_CALENDARIMPORTER_USER_DEFAULT_ENABLE', true);
/** Disable the sync feature for all clients */
define('PLUGIN_CALENDARIMPORTER_USER_DEFAULT_ENABLE_SYNC', true); // not yet implemented
/** Disable the import plugin for all clients */
define('PLUGIN_CALENDARIMPORTER_USER_DEFAULT_ENABLE', false);
/** Disable the sync feature for all clients */
define('PLUGIN_CALENDARIMPORTER_USER_DEFAULT_ENABLE_SYNC', true);
/** The default calendar to import to*/
define('PLUGIN_CALENDARIMPORTER_DEFAULT', "Kalender");
define('PLUGIN_CALENDARIMPORTER_DEFAULT_TIMEZONE', "Europe/Vienna");
/** The default calendar to import to*/
define('PLUGIN_CALENDARIMPORTER_DEFAULT', "Kalender");
define('PLUGIN_CALENDARIMPORTER_DEFAULT_TIMEZONE', "Europe/Vienna");
/** Tempory path for uploaded files... */
define('PLUGIN_CALENDARIMPORTER_TMP_UPLOAD', "/var/lib/kopano-webapp/tmp/");
?>
/** Tempory path for uploaded files... */
define('PLUGIN_CALENDARIMPORTER_TMP_UPLOAD', "/var/lib/kopano-webapp/tmp/");

View File

@ -1,5 +1,5 @@
/**
* ABOUT.js zarafa calender to ics im/exporter
* ABOUT.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -59,7 +59,7 @@ Zarafa.plugins.calendarimporter.ABOUT = ""
+ "<h1>Ics-parser</h1>"
+ "<p>Copyright 2002-2007 Martin Thoma <info@martin-thoma.de></p>"
+ "<p>Copyright 2002-2007 Martin Thoma &lt;info@martin-thoma.de&gt;</p>"
+ "<p>Licensed under the MIT License.</p>"

View File

@ -41,9 +41,9 @@ Zarafa.plugins.calendarimporter.data.Actions = {
downloadICS: 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,
title: dgettext('plugin_calendarimporter', 'Warning'),
msg: response.message,
icon: Zarafa.common.dialogs.MessageBox.WARNING,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
} else {
@ -87,10 +87,10 @@ Zarafa.plugins.calendarimporter.data.Actions = {
]);
} else {
allFolders.push({
display_name : folder.get("display_name"),
entryid : folder.get("entryid"),
display_name: folder.get("display_name"),
entryid: folder.get("entryid"),
store_entryid: folder.get("store_entryid"),
is_public : false
is_public: false
});
}
}
@ -108,10 +108,10 @@ Zarafa.plugins.calendarimporter.data.Actions = {
]);
} else {
allFolders.push({
display_name : folder.get("display_name"),
entryid : folder.get("entryid"),
display_name: folder.get("display_name"),
entryid: folder.get("entryid"),
store_entryid: folder.get("store_entryid"),
is_public : true
is_public: true
});
}
}

View File

@ -1,5 +1,5 @@
/**
* ResponseHandler.js zarafa calender to ics im/exporter
* ResponseHandler.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/**
* ImportContentPanel.js zarafa calender to ics im/exporter
* ImportContentPanel.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -40,20 +40,20 @@ Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel = Ext.extend(Zarafa.c
* @constructor
* @param config Configuration structure
*/
constructor : function(config) {
constructor: function (config) {
config = config || {};
Ext.applyIf(config, {
layout : 'fit',
title : _('Import Calendar File'),
closeOnSave : true,
width : 800,
height : 700,
layout: 'fit',
title: dgettext('plugin_calendarimporter', 'Import Calendar File'),
closeOnSave: true,
width: 800,
height: 700,
//Add panel
items : [
items: [
{
xtype : 'calendarimporter.importpanel',
filename : config.filename,
folder : config.folder
xtype: 'calendarimporter.importpanel',
filename: config.filename,
folder: config.folder
}
]
});
@ -63,4 +63,4 @@ Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel = Ext.extend(Zarafa.c
});
Ext.reg('calendarimporter.contentpanel' ,Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel);
Ext.reg('calendarimporter.contentpanel', Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel);

View File

@ -1,5 +1,5 @@
/**
* ImportPanel.js zarafa calender to ics im/exporter
* ImportPanel.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -55,13 +55,13 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
store: null,
/* selected folder */
folder : null,
folder: null,
/**
* @constructor
* @param {object} config
*/
constructor : function (config) {
constructor: function (config) {
config = config || {};
var self = this;
this.timezone = container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_timezone");
@ -94,20 +94,20 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
});
Ext.apply(config, {
xtype : 'calendarimporter.importpanel',
ref : "importpanel",
id : "importpanel",
layout : {
type : 'form',
align : 'stretch'
xtype: 'calendarimporter.importpanel',
ref: "importpanel",
id: "importpanel",
layout: {
type: 'form',
align: 'stretch'
},
anchor : '100%',
bodyStyle : 'background-color: inherit;',
defaults : {
border : true,
bodyStyle : 'background-color: inherit; padding: 3px 0px 3px 0px; border-style: none none solid none;'
anchor: '100%',
bodyStyle: 'background-color: inherit;',
defaults: {
border: true,
bodyStyle: 'background-color: inherit; padding: 3px 0px 3px 0px; border-style: none none solid none;'
},
items : [
items: [
this.createSelectBox(),
this.createTimezoneBox(),
this.createDaylightSavingCheckBox(),
@ -121,9 +121,9 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
],
listeners: {
afterrender: function (cmp) {
this.loadMask = new Ext.LoadMask(this.getEl(), {msg:'Loading...'});
this.loadMask = new Ext.LoadMask(this.getEl(), {msg: dgettext('plugin_calendarimporter', 'Loading...')});
if(this.icsfile != null) { // if we have got the filename from an attachment
if (this.icsfile != null) { // if we have got the filename from an attachment
this.parseCalendar(this.icsfile, this.timezone, this.ignoredst);
}
},
@ -139,11 +139,11 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* posted and contains the attachments
* @private
*/
initForm : function () {
initForm: function () {
return {
xtype: 'form',
ref: 'addFormPanel',
layout : 'column',
layout: 'column',
fileUpload: true,
autoWidth: true,
autoHeight: true,
@ -162,13 +162,13 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* Reloads the data of the grid
* @private
*/
reloadGridStore: function(eventdata) {
reloadGridStore: function (eventdata) {
var parsedData = [];
if(eventdata !== null) {
if (eventdata !== null) {
parsedData = new Array(eventdata.events.length);
var i = 0;
for(i = 0; i < eventdata.events.length; i++) {
for (i = 0; i < eventdata.events.length; i++) {
parsedData[i] = [
eventdata.events[i]["subject"],
new Date(parseInt(eventdata.events[i]["startdate"]) * 1000),
@ -197,7 +197,7 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* posted and contains the attachments
* @private
*/
createGrid : function() {
createGrid: function () {
return {
xtype: 'grid',
ref: 'eventgrid',
@ -206,10 +206,10 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
store: this.store,
width: '100%',
height: 300,
title: 'Select events to import',
title: dgettext('plugin_calendarimporter', 'Select events to import'),
frame: false,
viewConfig:{
forceFit:true
viewConfig: {
forceFit: true
},
colModel: new Ext.grid.ColumnModel({
defaults: {
@ -217,25 +217,53 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
sortable: true
},
columns: [
{id: 'Summary', header: 'Title', width: 200, sortable: true, dataIndex: 'subject'},
{header: 'Start', width: 200, sortable: true, dataIndex: 'startdate', renderer : Zarafa.common.ui.grid.Renderers.datetime},
{header: 'End', width: 200, sortable: true, dataIndex: 'enddate', renderer : Zarafa.common.ui.grid.Renderers.datetime},
{header: 'Location', width: 150, sortable: true, dataIndex: 'location'},
{header: 'Description', sortable: true, dataIndex: 'body'},
{header: "Priority", dataIndex: 'priority', hidden: true},
{header: "Label", dataIndex: 'label', hidden: true},
{header: "Busystatus", dataIndex: 'busy', hidden: true},
{header: "Privacystatus", dataIndex: 'class', hidden: true},
{header: "Organizer", dataIndex: 'organizer', hidden: true},
{header: "Alarm", dataIndex: 'alarms', hidden: true, renderer : Zarafa.common.ui.grid.Renderers.datetime},
{header: "Timezone", dataIndex: 'timezone', hidden: true}
{
id: 'Summary',
header: dgettext('plugin_calendarimporter', 'Title'),
width: 200,
sortable: true,
dataIndex: 'subject'
},
{
header: dgettext('plugin_calendarimporter', 'Start'),
width: 200,
sortable: true,
dataIndex: 'startdate',
renderer: Zarafa.common.ui.grid.Renderers.datetime
},
{
header: dgettext('plugin_calendarimporter', 'End'),
width: 200,
sortable: true,
dataIndex: 'enddate',
renderer: Zarafa.common.ui.grid.Renderers.datetime
},
{
header: dgettext('plugin_calendarimporter', 'Location'),
width: 150,
sortable: true,
dataIndex: 'location'
},
{header: dgettext('plugin_calendarimporter', 'Description'), sortable: true, dataIndex: 'body'},
{header: dgettext('plugin_calendarimporter', 'Priority'), dataIndex: 'priority', hidden: true},
{header: dgettext('plugin_calendarimporter', 'Label'), dataIndex: 'label', hidden: true},
{header: dgettext('plugin_calendarimporter', 'Busystatus'), dataIndex: 'busy', hidden: true},
{header: dgettext('plugin_calendarimporter', 'Privacystatus'), dataIndex: 'class', hidden: true},
{header: dgettext('plugin_calendarimporter', 'Organizer'), dataIndex: 'organizer', hidden: true},
{
header: dgettext('plugin_calendarimporter', 'Alarm'),
dataIndex: 'alarms',
hidden: true,
renderer: Zarafa.common.ui.grid.Renderers.datetime
},
{header: dgettext('plugin_calendarimporter', 'Timezone'), dataIndex: 'timezone', hidden: true}
]
}),
sm: new Ext.grid.RowSelectionModel({multiSelect:true})
sm: new Ext.grid.RowSelectionModel({multiSelect: true})
}
},
createSelectBox: function() {
createSelectBox: function () {
var myStore = Zarafa.plugins.calendarimporter.data.Actions.getAllCalendarFolders(true);
return {
@ -245,19 +273,19 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
name: "choosen_calendar",
value: Ext.isEmpty(this.folder) ? Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByName(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_calendar")).entryid : this.folder,
width: 100,
fieldLabel: "Select folder",
fieldLabel: dgettext('plugin_calendarimporter', 'Select folder'),
store: myStore,
mode: 'local',
labelSeperator: ":",
border: false,
anchor: "100%",
scope: this,
hidden : Ext.isEmpty(this.folder) ? false : true,
hidden: Ext.isEmpty(this.folder) ? false : true,
allowBlank: false
}
},
createTimezoneBox: function() {
createTimezoneBox: function () {
return {
xtype: "selectbox",
ref: 'timezoneselector',
@ -265,7 +293,7 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
name: "choosen_timezone",
value: Zarafa.plugins.calendarimporter.data.Timezones.unMap(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_timezone")),
width: 100,
fieldLabel: "Timezone",
fieldLabel: dgettext('plugin_calendarimporter', 'Timezone'),
store: Zarafa.plugins.calendarimporter.data.Timezones.store,
labelSeperator: ":",
mode: 'local',
@ -280,14 +308,14 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
}
},
createDaylightSavingCheckBox: function() {
createDaylightSavingCheckBox: function () {
return {
xtype: "checkbox",
ref: 'dstcheck',
name: "dst_check",
width: 100,
fieldLabel: "Ignore DST",
boxLabel: 'This will ignore "Daylight saving time" offsets.',
fieldLabel: dgettext('plugin_calendarimporter', 'Ignore DST'),
boxLabel: dgettext('plugin_calendarimporter', 'This will ignore "Daylight saving time" offsets.'),
labelSeperator: ":",
border: false,
anchor: "100%",
@ -300,17 +328,17 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
}
},
createUploadField: function() {
createUploadField: function () {
return {
xtype: "fileuploadfield",
ref: 'fileuploadfield',
columnWidth: 1.0,
id: 'form-file',
name: 'icsdata',
emptyText: 'Select an .ics calendar',
emptyText: dgettext('plugin_calendarimporter', 'Select an .ics calendar'),
border: false,
anchor: "100%",
height : "30",
height: "30",
scope: this,
allowBlank: false,
listeners: {
@ -320,40 +348,40 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
}
},
createSubmitButton: function() {
createSubmitButton: function () {
return {
xtype: "button",
ref: "../submitButton",
disabled: true,
width: 100,
border: false,
text: _("Import"),
text: dgettext('plugin_calendarimporter', 'Import'),
anchor: "100%",
handler: this.importCheckedEvents,
scope: this
}
},
createSubmitAllButton: function() {
createSubmitAllButton: function () {
return {
xtype: "button",
ref: "../submitAllButton",
disabled: true,
width: 100,
border: false,
text: _("Import All"),
text: dgettext('plugin_calendarimporter', 'Import All'),
anchor: "100%",
handler: this.importAllEvents,
scope: this
}
},
createCancelButton: function() {
createCancelButton: function () {
return {
xtype: "button",
width: 100,
border: false,
text: _("Cancel"),
text: dgettext('plugin_calendarimporter', 'Cancel'),
anchor: "100%",
handler: this.close,
scope: this
@ -366,10 +394,10 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* @param {Ext.data.Record} record
* @param {Number} index
*/
onTimezoneSelected : function(combo, record, index) {
onTimezoneSelected: function (combo, record, index) {
this.timezone = record.data.field1;
if(this.icsfile != null) {
if (this.icsfile != null) {
this.parseCalendar(this.icsfile, this.timezone, this.ignoredst);
}
},
@ -379,10 +407,10 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* @param {Ext.form.CheckBox} checkbox
* @param {boolean} checked
*/
onDstChecked : function(checkbox, checked) {
onDstChecked: function (checkbox, checked) {
this.ignoredst = checked;
if(this.icsfile != null) {
if (this.icsfile != null) {
this.parseCalendar(this.icsfile, this.timezone, this.ignoredst);
}
},
@ -392,30 +420,30 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
* in the {@link Ext.ux.form.FileUploadField} and the dialog is closed
* @param {Ext.ux.form.FileUploadField} uploadField being added a file to
*/
onFileSelected : function(uploadField) {
onFileSelected: function (uploadField) {
var form = this.addFormPanel.getForm();
if (form.isValid()) {
form.submit({
waitMsg: 'Uploading and parsing calendar...',
waitMsg: dgettext('plugin_calendarimporter', 'Uploading and parsing calendar...'),
url: 'plugins/calendarimporter/php/upload.php',
failure: function(file, action) {
failure: function (file, action) {
this.submitButton.disable();
this.submitAllButton.disable();
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _(action.result.error),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
buttons : Zarafa.common.dialogs.MessageBox.OK
title: _('Error'),
msg: _(action.result.error),
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
},
success: function(file, action){
success: function (file, action) {
uploadField.reset();
this.icsfile = action.result.ics_file;
this.parseCalendar(this.icsfile, this.timezone, this.ignoredst);
},
scope : this
scope: this
});
}
},
@ -440,16 +468,16 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
);
},
handleParsingResult: function(response) {
handleParsingResult: function (response) {
var self = this.scope;
self.loadMask.hide();
if(response["status"] == true) {
if (response["status"] == true) {
self.submitButton.enable();
self.submitAllButton.enable();
if(typeof response.parsed.calendar["X-WR-TIMEZONE"] !== "undefined") {
if (typeof response.parsed.calendar["X-WR-TIMEZONE"] !== "undefined") {
self.timezone = response.parsed.calendar["X-WR-TIMEZONE"];
self.timezoneselector.setValue(Zarafa.plugins.calendarimporter.data.Timezones.unMap(this.timezone));
}
@ -458,10 +486,10 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
self.submitButton.disable();
self.submitAllButton.disable();
Zarafa.common.dialogs.MessageBox.show({
title : _('Parser Error'),
msg : _(response["message"]),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
buttons : Zarafa.common.dialogs.MessageBox.OK
title: dgettext('plugin_calendarimporter', 'Parser Error'),
msg: response["message"],
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
}
},
@ -491,20 +519,20 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
//receive existing calendar store
var calValue = this.calendarselector.getValue();
if(Ext.isEmpty(calValue)) { // no calendar choosen
if (Ext.isEmpty(calValue)) { // no calendar choosen
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _('You have to choose a calendar!'),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
buttons : Zarafa.common.dialogs.MessageBox.OK
title: dgettext('plugin_calendarimporter', 'Error'),
msg: dgettext('plugin_calendarimporter', 'You have to choose a calendar!'),
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
} else {
if(this.eventgrid.selModel.getCount() < 1) {
if (this.eventgrid.selModel.getCount() < 1) {
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _('You have to choose at least one event to import!'),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
buttons : Zarafa.common.dialogs.MessageBox.OK
title: dgettext('plugin_calendarimporter', 'Error'),
msg: dgettext('plugin_calendarimporter', 'You have to choose at least one event to import!'),
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
} else {
var calendarFolder = Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(calValue);
@ -513,7 +541,7 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
var uids = [];
//receive Records from grid rows
Ext.each(events, function(newRecord) {
Ext.each(events, function (newRecord) {
uids.push(newRecord.data.record.internal_fields.event_uid);
}, this);
@ -526,9 +554,9 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
'calendarmodule',
'import',
{
storeid : calendarFolder.store_entryid,
folderid : calendarFolder.entryid,
uids : uids,
storeid: calendarFolder.store_entryid,
folderid: calendarFolder.entryid,
uids: uids,
ics_filepath: this.icsfile
},
responseHandler
@ -550,9 +578,9 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
container.getNotifier().notify('info', 'Imported', 'Imported ' + response.count + ' events. Please reload your calendar!');
} else {
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _('Import failed: ') + response.message,
icon : Zarafa.common.dialogs.MessageBox.ERROR,
title: dgettext('plugin_calendarimporter', 'Error'),
msg: String.format(dgettext('plugin_calendarimporter', 'Import failed: {0}'), response.message),
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
}

View File

@ -1,5 +1,5 @@
/**
* plugin.calendarimporter.js zarafa calender to ics im/exporter
* plugin.calendarimporter.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -73,9 +73,9 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*/
createItemExportInsertionPoint: function (include, btn) {
return {
text : dgettext('plugin_files', 'Export Event'),
text: dgettext('plugin_calendarimporter', 'Export Event'),
handler: this.exportToICS.createDelegate(this, [btn]),
scope : this,
scope: this,
iconCls: 'icon_calendarimporter_export'
};
},
@ -97,9 +97,14 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
var responseHandler = new Zarafa.plugins.calendarimporter.data.ResponseHandler({
successCallback: Zarafa.plugins.calendarimporter.data.Actions.downloadICS,
scope : this
scope: this
});
// Notify user
// # TRANSLATORS: {0} will be replaced by the number of contacts that will be exported
container.getNotifier().notify('info', dgettext('plugin_contactimporter', 'Calendar Export'), String.format(dgettext('plugin_calendarimporter', 'Exporting {0} events. Please wait...'), recordIds.length));
// request attachment preperation
container.getRequest().singleRequest(
'calendarmodule',
@ -143,10 +148,10 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*/
createAttachmentImportButton: function (include, btn) {
return {
text : _('Import to Calendar'),
handler : this.getAttachmentFileName.createDelegate(this, [btn]),
scope : this,
iconCls : 'icon_calendarimporter_button',
text: dgettext('plugin_calendarimporter', 'Import to Calendar'),
handler: this.getAttachmentFileName.createDelegate(this, [btn]),
scope: this,
iconCls: 'icon_calendarimporter_button',
beforeShow: function (item, record) {
var extension = record.data.name.split('.').pop().toLowerCase();
@ -167,9 +172,9 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
this.scope.openImportDialog(response.tmpname);
} else {
Zarafa.common.dialogs.MessageBox.show({
title : _('Error'),
msg : _(response["message"]),
icon : Zarafa.common.dialogs.MessageBox.ERROR,
title: dgettext('plugin_calendarimporter', 'Error'),
msg: response["message"],
icon: Zarafa.common.dialogs.MessageBox.ERROR,
buttons: Zarafa.common.dialogs.MessageBox.OK
});
}
@ -180,12 +185,12 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*/
getAttachmentFileName: function (btn, callback) {
Zarafa.common.dialogs.MessageBox.show({
title : 'Please wait',
msg : 'Loading attachment...',
progressText: 'Initializing...',
width : 300,
progress : true,
closable : false
title: dgettext('plugin_calendarimporter', 'Please wait'),
msg: dgettext('plugin_calendarimporter', 'Loading attachment...'),
progressText: dgettext('plugin_calendarimporter', 'Initializing...'),
width: 300,
progress: true,
closable: false
});
// progress bar... ;)
@ -194,7 +199,8 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
if (v == 100) {
Zarafa.common.dialogs.MessageBox.hide();
} else {
Zarafa.common.dialogs.MessageBox.updateProgress(v / 100, Math.round(v) + '% loaded');
// # TRANSLATORS: {0} will be replaced by the percentage value (0-100)
Zarafa.common.dialogs.MessageBox.updateProgress(v / 100, String.format(dgettext('plugin_calendarimporter', '{0}% loaded'), Math.round(v)));
}
};
};
@ -220,7 +226,7 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
var responseHandler = new Zarafa.plugins.calendarimporter.data.ResponseHandler({
successCallback: this.gotAttachmentFileName,
scope : this
scope: this
});
// request attachment preperation
@ -228,11 +234,11 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
'calendarmodule',
'importattachment',
{
entryid : entryid,
store : store,
attachNum : attachNum,
entryid: entryid,
store: store,
attachNum: attachNum,
dialog_attachments: dialog_attachments,
filename : filename
filename: filename
},
responseHandler
);
@ -246,7 +252,7 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
var componentType = Zarafa.core.data.SharedComponentType['plugins.calendarimporter.dialogs.importevents'];
var config = {
filename: filename,
modal : true
modal: true
};
Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
@ -311,9 +317,9 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*############################################################################################################################*/
Zarafa.onReady(function () {
container.registerPlugin(new Zarafa.core.PluginMetaData({
name : 'calendarimporter',
displayName : _('Calendarimporter Plugin'),
about : Zarafa.plugins.calendarimporter.ABOUT,
name: 'calendarimporter',
displayName: dgettext('plugin_calendarimporter', 'Calendarimporter Plugin'),
about: Zarafa.plugins.calendarimporter.ABOUT,
pluginConstructor: Zarafa.plugins.calendarimporter.ImportPlugin
}));
});

View File

@ -1,3 +1,25 @@
/**
* SettingsCalSyncWidget.js, Kopano calender to ics 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.calendarimporter.settings');
/**
@ -10,45 +32,45 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
/**
* @cfg {Zarafa.settings.SettingsContext} settingsContext
*/
settingsContext : undefined,
settingsContext: undefined,
/**
* @constructor
* @param {Object} config Configuration object
*/
constructor : function(config) {
constructor: function (config) {
config = config || {};
var store = new Ext.data.JsonStore({
fields : [
{ name : 'id', type : 'int' },
{ name : 'icsurl' },
{ name : 'user' },
{ name : 'pass' },
{ name : 'intervall', type : 'int' },
{ name : 'calendar' },
{ name : 'calendarname' },
{ name : 'lastsync' }
fields: [
{name: 'id', type: 'int'},
{name: 'icsurl'},
{name: 'user'},
{name: 'pass'},
{name: 'intervall', type: 'int'},
{name: 'calendar'},
{name: 'calendarname'},
{name: 'lastsync'}
],
sortInfo : {
field : 'id',
direction : 'ASC'
sortInfo: {
field: 'id',
direction: 'ASC'
},
autoDestroy : true
autoDestroy: true
});
Ext.applyIf(config, {
height : 400,
title : _('Calendar Sync settings'),
xtype : 'calendarimporter.settingscalsyncwidget',
layout : {
height: 400,
title: dgettext('plugin_calendarimporter', 'Calendar Sync settings'),
xtype: 'calendarimporter.settingscalsyncwidget',
layout: {
// override from SettingsWidget
type : 'fit'
type: 'fit'
},
items : [{
xtype : 'calendarimporter.calsyncpanel',
store : store,
ref : 'calsyncPanel'
items: [{
xtype: 'calendarimporter.calsyncpanel',
store: store,
ref: 'calsyncPanel'
}]
});
@ -62,14 +84,14 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
* {@link Zarafa.settings.SettingsModel} into the UI of this category.
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to load
*/
update : function(settingsModel) {
update: function (settingsModel) {
this.model = settingsModel;
// Convert the signatures into Store data
var icslinks = settingsModel.get('zarafa/v1/contexts/calendar/icssync', true);
var syncArray = [];
for (var key in icslinks) {
if(icslinks.hasOwnProperty(key)) { // skip inherited props
if (icslinks.hasOwnProperty(key)) { // skip inherited props
syncArray.push(Ext.apply({}, icslinks[key], {id: key}));
}
}
@ -85,7 +107,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
* This is used to update the settings from the UI into the {@link Zarafa.settings.SettingsModel settings model}.
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to update
*/
updateSettings : function(settingsModel) {
updateSettings: function (settingsModel) {
settingsModel.beginEdit();
// Start reading the Grid store and convert the contents back into
@ -96,13 +118,13 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
var icslink = icslinks[i];
icslinkData[icslink.get('id')] = {
'icsurl' : icslink.get('icsurl'),
'intervall' : icslink.get('intervall'),
'user' : icslink.get('user'),
'pass' : icslink.get('pass'),
'lastsync' : icslink.get('lastsync'),
'calendar' : icslink.get('calendar'),
'calendarname' : Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(icslink.get('calendar')).display_name
'icsurl': icslink.get('icsurl'),
'intervall': icslink.get('intervall'),
'user': icslink.get('user'),
'pass': icslink.get('pass'),
'lastsync': icslink.get('lastsync'),
'calendar': icslink.get('calendar'),
'calendarname': Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(icslink.get('calendar')).display_name
};
}
settingsModel.set('zarafa/v1/contexts/calendar/icssync', icslinkData);

View File

@ -1,3 +1,25 @@
/**
* SettingsWidget.js, Kopano calender to ics 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.calendarimporter.settings');
/**
@ -10,26 +32,25 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
/**
* @cfg {Zarafa.settings.SettingsContext} settingsContext
*/
settingsContext : undefined,
settingsContext: undefined,
/**
* @constructor
* @param {Object} config Configuration object
*/
constructor : function(config)
{
constructor: function (config) {
config = config || {};
Ext.applyIf(config, {
title : _('Calendar Import/Export plugin settings'),
xtype : 'calendarimporter.settingswidget',
items : [
title: dgettext('plugin_calendarimporter', 'Calendar Import/Export plugin settings'),
xtype: 'calendarimporter.settingswidget',
items: [
{
xtype : 'checkbox',
name : 'zarafa/v1/plugins/calendarimporter/enable_sync',
ref : 'enableSync',
fieldLabel : 'Enable ical sync',
lazyInit : false
xtype: 'checkbox',
name: 'zarafa/v1/plugins/calendarimporter/enable_sync',
ref: 'enableSync',
fieldLabel: dgettext('plugin_calendarimporter', 'Enable ical sync'),
lazyInit: false
},
this.createSelectBox(),
this.createTimezoneBox()
@ -39,17 +60,17 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
Zarafa.plugins.calendarimporter.settings.SettingsWidget.superclass.constructor.call(this, config);
},
createSelectBox: function() {
createSelectBox: function () {
var myStore = Zarafa.plugins.calendarimporter.data.Actions.getAllCalendarFolders(true);
return {
xtype: "selectbox",
ref : 'defaultCalendar',
ref: 'defaultCalendar',
editable: false,
name: "zarafa/v1/plugins/calendarimporter/default_calendar",
value: Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByName(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_calendar")).entryid,
width: 100,
fieldLabel: "Default calender",
fieldLabel: dgettext('plugin_calendarimporter', 'Default calender'),
store: myStore,
mode: 'local',
labelSeperator: ":",
@ -60,15 +81,15 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
}
},
createTimezoneBox: function() {
createTimezoneBox: function () {
return {
xtype: "selectbox",
ref : 'defaultTimezone',
ref: 'defaultTimezone',
editable: false,
name: "zarafa/v1/plugins/calendarimporter/default_timezone",
value: Zarafa.plugins.calendarimporter.data.Timezones.unMap(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_timezone")),
width: 100,
fieldLabel: "Default timezone",
fieldLabel: dgettext('plugin_calendarimporter', 'Default timezone'),
store: Zarafa.plugins.calendarimporter.data.Timezones.store,
labelSeperator: ":",
mode: 'local',
@ -86,7 +107,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* {@link Zarafa.settings.SettingsModel} into the UI of this category.
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to load
*/
update : function(settingsModel) {
update: function (settingsModel) {
this.enableSync.setValue(settingsModel.get(this.enableSync.name));
this.defaultCalendar.setValue(Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByName(settingsModel.get(this.defaultCalendar.name)).entryid);
this.defaultTimezone.setValue(settingsModel.get(this.defaultTimezone.name));
@ -98,19 +119,19 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* This is used to update the settings from the UI into the {@link Zarafa.settings.SettingsModel settings model}.
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to update
*/
updateSettings : function(settingsModel) {
updateSettings: function (settingsModel) {
// check if the user changed a value
var changed = false;
if(settingsModel.get(this.enableSync.name) != this.enableSync.getValue()) {
if (settingsModel.get(this.enableSync.name) != this.enableSync.getValue()) {
changed = true;
} else if(settingsModel.get(this.defaultCalendar.name) != Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(this.defaultCalendar.getValue()).display_name) {
} else if (settingsModel.get(this.defaultCalendar.name) != Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(this.defaultCalendar.getValue()).display_name) {
changed = true;
} else if(settingsModel.get(this.defaultTimezone.name) != this.defaultTimezone.getValue()) {
} else if (settingsModel.get(this.defaultTimezone.name) != this.defaultTimezone.getValue()) {
changed = true;
}
if(changed) {
if (changed) {
// Really save changes
settingsModel.set(this.enableSync.name, this.enableSync.getValue());
settingsModel.set(this.defaultCalendar.name, Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(this.defaultCalendar.getValue()).display_name); // store name
@ -126,8 +147,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* settings which were saved to the server.
* @private
*/
onUpdateSettings : function()
{
onUpdateSettings: function () {
var message = _('Your WebApp needs to be reloaded to make the changes visible!');
message += '<br/><br/>';
message += _('WebApp will automatically restart in order for these changes to take effect');
@ -135,17 +155,17 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
Zarafa.common.dialogs.MessageBox.addCustomButtons({
title: _('Restart WebApp'),
msg : message,
msg: message,
icon: Ext.MessageBox.QUESTION,
fn : this.restartWebapp,
customButton : [{
text : _('Restart'),
name : 'restart'
fn: this.restartWebapp,
customButton: [{
text: _('Restart'),
name: 'restart'
}, {
text : _('Cancel'),
name : 'cancel'
text: _('Cancel'),
name: 'cancel'
}],
scope : this
scope: this
});
},
@ -156,8 +176,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* @param {String} button The button which user pressed.
* @private
*/
restartWebapp : function(button)
{
restartWebapp: function (button) {
if (button === 'restart') {
var contextModel = this.ownerCt.settingsContext.getModel();
var realModel = contextModel.getRealSettingsModel();
@ -165,7 +184,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
realModel.save();
this.loadMask = new Zarafa.common.ui.LoadMask(Ext.getBody(), {
msg : '<b>' + _('Webapp is reloading, Please wait.') + '</b>'
msg: '<b>' + _('Webapp is reloading, Please wait.') + '</b>'
});
this.loadMask.show();
@ -183,8 +202,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* settings which were saved to the server.
* @private
*/
onSettingsSave : function(model, parameters)
{
onSettingsSave: function (model, parameters) {
this.mun(model, 'save', this.onSettingsSave, this);
Zarafa.core.Util.reloadWebapp();
},
@ -200,8 +218,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsWidget = Ext.extend(Zarafa.sett
* @param {Object} response The response object as received from the PHP-side
* @private
*/
onSettingsException : function(model, type, action, options, response)
{
onSettingsException: function (model, type, action, options, response) {
this.loadMask.hide();
// Remove event handlers

View File

@ -1,3 +1,25 @@
/**
* CalSyncEditContentPanel.js, Kopano calender to ics 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.calendarimporter.settings.dialogs');
/**
@ -12,22 +34,22 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditContentPanel = Ext.e
* @constructor
* @param config Configuration structure
*/
constructor : function(config) {
constructor: function (config) {
config = config || {};
// Add in some standard configuration data.
Ext.applyIf(config, {
// Override from Ext.Component
xtype : 'calendarimporter.calsynceditcontentpanel',
layout : 'fit',
model : true,
autoSave : false,
width : 400,
height : 400,
title : _('ICAL Sync'),
items : [{
xtype : 'calendarimporter.calsynceditpanel',
item : config.item
xtype: 'calendarimporter.calsynceditcontentpanel',
layout: 'fit',
model: true,
autoSave: false,
width: 400,
height: 400,
title: dgettext('plugin_calendarimporter', 'ICAL Sync'),
items: [{
xtype: 'calendarimporter.calsynceditpanel',
item: config.item
}]
});

View File

@ -1,3 +1,25 @@
/**
* CalSyncEditPanel.js, Kopano calender to ics 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.calendarimporter.settings.dialogs');
/**
@ -12,24 +34,24 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
/**
* the id of the currently edited item
*/
currentItem : undefined,
currentItem: undefined,
/**
* @constructor
* @param config Configuration structure
*/
constructor : function(config) {
constructor: function (config) {
config = config || {};
if(config.item)
if (config.item)
this.currentItem = config.item;
Ext.applyIf(config, {
// Override from Ext.Component
xtype : 'calendarimporter.calsynceditpanel',
labelAlign : 'top',
xtype: 'calendarimporter.calsynceditpanel',
labelAlign: 'top',
defaultType: 'textfield',
items : this.createPanelItems(config),
items: this.createPanelItems(config),
buttons: [{
text: _('Save'),
handler: this.doSave,
@ -48,19 +70,19 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
/**
* close the dialog
*/
doClose : function() {
doClose: function () {
this.dialog.close();
},
/**
* save the data to the store
*/
doSave : function() {
doSave: function () {
var store = this.dialog.store;
var id = 0;
var record = undefined;
if(!this.currentItem) {
if (!this.currentItem) {
record = new store.recordType({
id: this.hashCode(this.icsurl.getValue()),
icsurl: this.icsurl.getValue(),
@ -68,13 +90,13 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
user: this.user.getValue(),
pass: Ext.util.base64.encode(this.pass.getValue()),
calendar: this.calendar.getValue(),
calendarname : Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(this.calendar.getValue()).display_name,
calendarname: Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(this.calendar.getValue()).display_name,
lastsync: "never"
});
}
if(this.icsurl.isValid()) {
if(record) {
if (this.icsurl.isValid()) {
if (record) {
store.add(record);
} else {
this.currentItem.set('icsurl', this.icsurl.getValue());
@ -93,8 +115,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
* @return {Array} array of items that should be added to panel.
* @private
*/
createPanelItems : function(config)
{
createPanelItems: function (config) {
var icsurl = "";
var intervall = "15";
var user = "";
@ -103,7 +124,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
var calendar = Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByName(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/default_calendar")).entryid;
var myStore = Zarafa.plugins.calendarimporter.data.Actions.getAllCalendarFolders(true);
if(config.item){
if (config.item) {
icsurl = config.item.get('icsurl');
intervall = config.item.get('intervall');
user = config.item.get('user');
@ -115,7 +136,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
return [{
xtype: 'fieldset',
title: _('ICAL Information'),
title: dgettext('plugin_calendarimporter', 'ICAL Information'),
defaultType: 'textfield',
layout: 'form',
flex: 1,
@ -124,15 +145,15 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
flex: 1
},
items: [{
fieldLabel: 'ICS Url',
fieldLabel: dgettext('plugin_calendarimporter', 'ICS Url'),
name: 'icsurl',
ref: '../icsurl',
value: icsurl,
allowBlank: false
},
{
xtype:'selectbox',
fieldLabel: _('Destination Calendar'),
xtype: 'selectbox',
fieldLabel: dgettext('plugin_calendarimporter', 'Destination Calendar'),
name: 'calendar',
ref: '../calendar',
value: calendar,
@ -146,8 +167,8 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
allowBlank: false
},
{
xtype:'numberfield',
fieldLabel: _('Sync Intervall (minutes)'),
xtype: 'numberfield',
fieldLabel: dgettext('plugin_calendarimporter', 'Sync Intervall (minutes)'),
name: 'intervall',
ref: '../intervall',
value: intervall,
@ -156,21 +177,21 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
},
{
xtype: 'fieldset',
title: _('Authentication (optional)'),
title: dgettext('plugin_calendarimporter', 'Authentication (optional)'),
defaultType: 'textfield',
layout: 'form',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: _('Username'),
fieldLabel: dgettext('plugin_calendarimporter', 'Username'),
name: 'user',
ref: '../user',
value: user,
allowBlank: true
},
{
fieldLabel: _('Password'),
fieldLabel: dgettext('plugin_calendarimporter', 'Password'),
name: 'pass',
ref: '../pass',
value: pass,
@ -184,7 +205,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
* Java String.hashCode() implementation
* @private
*/
hashCode : function(str){
hashCode: function (str) {
var hash = 0;
var chr = 0;
var i = 0;
@ -192,7 +213,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
if (str.length == 0) return hash;
for (i = 0; i < str.length; i++) {
chr = str.charCodeAt(i);
hash = ((hash<<5)-hash)+chr;
hash = ((hash << 5) - hash) + chr;
hash = hash & hash; // Convert to 32bit integer
}
return Math.abs(hash);

View File

@ -1,3 +1,25 @@
/**
* CalSyncGrid.js, Kopano calender to ics 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.calendarimporter.settings.ui');
/**
@ -11,25 +33,24 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @constructor
* @param {Object} config Configuration structure
*/
constructor : function(config)
{
constructor: function (config) {
config = config || {};
Ext.applyIf(config, {
xtype : 'calendarimporter.calsyncgrid',
border : true,
store : config.store,
viewConfig : {
forceFit : true,
emptyText : '<div class=\'emptytext\'>' + _('No ICAL sync entry exists') + '</div>'
xtype: 'calendarimporter.calsyncgrid',
border: true,
store: config.store,
viewConfig: {
forceFit: true,
emptyText: '<div class=\'emptytext\'>' + dgettext('plugin_calendarimporter', 'No ICAL sync entry exists') + '</div>'
},
loadMask : this.initLoadMask(),
columns : this.initColumnModel(),
selModel : this.initSelectionModel(),
listeners : {
viewready : this.onViewReady,
rowdblclick : this.onRowDblClick,
scope : this
loadMask: this.initLoadMask(),
columns: this.initColumnModel(),
selModel: this.initSelectionModel(),
listeners: {
viewready: this.onViewReady,
rowdblclick: this.onRowDblClick,
scope: this
}
});
@ -40,12 +61,11 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* initialize events for the grid panel.
* @private
*/
initEvents : function()
{
initEvents: function () {
Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid.superclass.initEvents.call(this);
// select first icssync when store has finished loading
this.mon(this.store, 'load', this.onViewReady, this, {single : true});
this.mon(this.store, 'load', this.onViewReady, this, {single: true});
},
/**
@ -53,8 +73,7 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @return {String}
* @private
*/
renderAuthColumn : function(value, p, record)
{
renderAuthColumn: function (value, p, record) {
return value ? "true" : "false";
},
@ -63,8 +82,7 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @return {String}
* @private
*/
renderCalendarColumn : function(value, p, record)
{
renderCalendarColumn: function (value, p, record) {
return Zarafa.plugins.calendarimporter.data.Actions.getCalendarFolderByEntryid(value).display_name;
},
@ -73,31 +91,30 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @return {Ext.grid.ColumnModel} column model object
* @private
*/
initColumnModel : function()
{
initColumnModel: function () {
return [{
dataIndex : 'icsurl',
header : _('ICS File'),
renderer : Zarafa.common.ui.grid.Renderers.text
dataIndex: 'icsurl',
header: dgettext('plugin_calendarimporter', 'ICS File'),
renderer: Zarafa.common.ui.grid.Renderers.text
},
{
dataIndex : 'calendarname',
header : _('Destination Calender'),
renderer : Zarafa.common.ui.grid.Renderers.text
dataIndex: 'calendarname',
header: dgettext('plugin_calendarimporter', 'Destination Calender'),
renderer: Zarafa.common.ui.grid.Renderers.text
},
{
dataIndex : 'user',
header : _('Authentication'),
renderer : this.renderAuthColumn
dataIndex: 'user',
header: dgettext('plugin_calendarimporter', 'Authentication'),
renderer: this.renderAuthColumn
},
{
dataIndex : 'intervall',
header : _('Sync Intervall')
dataIndex: 'intervall',
header: dgettext('plugin_calendarimporter', 'Sync Intervall')
},
{
dataIndex : 'lastsync',
header : _('Last Synchronisation'),
renderer : Zarafa.common.ui.grid.Renderers.text
dataIndex: 'lastsync',
header: dgettext('plugin_calendarimporter', 'Last Synchronisation'),
renderer: Zarafa.common.ui.grid.Renderers.text
}]
},
@ -106,10 +123,9 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @return {Ext.grid.RowSelectionModel} selection model object
* @private
*/
initSelectionModel : function()
{
initSelectionModel: function () {
return new Ext.grid.RowSelectionModel({
singleSelect : true
singleSelect: true
});
},
@ -119,10 +135,9 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* @return {Ext.LoadMask} The configuration object for {@link Ext.LoadMask}
* @private
*/
initLoadMask : function()
{
initLoadMask: function () {
return {
msg : _('Loading ics sync entries') + '...'
msg: dgettext('plugin_calendarimporter', 'Loading ics sync entries...')
};
},
@ -131,19 +146,17 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* select the first row in the grid.
* @private
*/
onViewReady : function()
{
onViewReady: function () {
this.getSelectionModel().selectFirstRow();
},
/**
* Function will be called to remove a ics sync entry.
*/
removeIcsSyncAs : function()
{
removeIcsSyncAs: function () {
var icsRecord = this.getSelectionModel().getSelected();
if(!icsRecord) {
Ext.Msg.alert(_('Alert'), _('Please select a ics sync entry.'));
if (!icsRecord) {
Ext.Msg.alert(dgettext('plugin_calendarimporter', 'Alert'), dgettext('plugin_calendarimporter', 'Please select a ics sync entry.'));
return;
}
@ -155,12 +168,11 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
* it will call generic function to handle the functionality.
* @private
*/
onRowDblClick : function(grid, rowIndex)
{
onRowDblClick: function (grid, rowIndex) {
Zarafa.core.data.UIFactory.openLayerComponent(Zarafa.core.data.SharedComponentType['plugins.calendarimporter.settings.dialogs.calsyncedit'], undefined, {
store : grid.getStore(),
item : grid.getStore().getAt(rowIndex),
manager : Ext.WindowMgr
store: grid.getStore(),
item: grid.getStore().getAt(rowIndex),
manager: Ext.WindowMgr
});
}
});

View File

@ -1,3 +1,25 @@
/**
* CalSyncPanel.js, Kopano calender to ics 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.calendarimporter.settings.ui');
/**
@ -9,28 +31,27 @@ Ext.namespace('Zarafa.plugins.calendarimporter.settings.ui');
Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel, {
// store
store : undefined,
store: undefined,
/**
* @constructor
* @param config Configuration structure
*/
constructor : function(config)
{
constructor: function (config) {
config = config || {};
if(config.store)
if (config.store)
this.store = config.store;
Ext.applyIf(config, {
// Override from Ext.Component
xtype : 'calendarimporter.calsyncpanel',
border : false,
layout : {
type : 'vbox',
align : 'stretch',
pack : 'start'
xtype: 'calendarimporter.calsyncpanel',
border: false,
layout: {
type: 'vbox',
align: 'stretch',
pack: 'start'
},
items : this.createPanelItems(this.store)
items: this.createPanelItems(this.store)
});
Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel.superclass.constructor.call(this, config);
@ -41,52 +62,51 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
* @return {Array} array of items that should be added to panel.
* @private
*/
createPanelItems : function(store)
{
createPanelItems: function (store) {
return [{
xtype : 'displayfield',
value : _('Setup calendars you want to subscribe to.'),
fieldClass : 'x-form-display-field'
xtype: 'displayfield',
value: dgettext('plugin_calendarimporter', 'Setup calendars you want to subscribe to.'),
fieldClass: 'x-form-display-field'
}, {
xtype : 'container',
flex : 1,
layout : {
type : 'hbox',
align : 'stretch',
pack : 'start'
xtype: 'container',
flex: 1,
layout: {
type: 'hbox',
align: 'stretch',
pack: 'start'
},
items : [{
xtype : 'calendarimporter.calsyncgrid',
ref : '../calsyncGrid',
store : store,
flex : 1
items: [{
xtype: 'calendarimporter.calsyncgrid',
ref: '../calsyncGrid',
store: store,
flex: 1
}, {
xtype : 'container',
width : 160,
defaults : {
width : 140
xtype: 'container',
width: 160,
defaults: {
width: 140
},
layout : {
type : 'vbox',
align : 'center',
pack : 'start'
layout: {
type: 'vbox',
align: 'center',
pack: 'start'
},
items : [{
xtype : 'button',
text : _('Add') + '...',
handler : this.onCalSyncAdd,
ref : '../../addButton',
scope : this
items: [{
xtype: 'button',
text: _('Add') + '...',
handler: this.onCalSyncAdd,
ref: '../../addButton',
scope: this
}, {
xtype : 'spacer',
height : 20
xtype: 'spacer',
height: 20
}, {
xtype : 'button',
text : _('Remove') + '...',
disabled : true,
ref : '../../removeButton',
handler : this.onCalSyncRemove,
scope : this
xtype: 'button',
text: _('Remove') + '...',
disabled: true,
ref: '../../removeButton',
handler: this.onCalSyncRemove,
scope: this
}]
}]
}];
@ -96,8 +116,7 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
* initialize events for the panel.
* @private
*/
initEvents : function()
{
initEvents: function () {
Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel.superclass.initEvents.call(this);
// register event to enable/disable buttons
@ -108,12 +127,11 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
* Handler function will be called when user clicks on 'Add' button.
* @private
*/
onCalSyncAdd : function()
{
onCalSyncAdd: function () {
Zarafa.core.data.UIFactory.openLayerComponent(Zarafa.core.data.SharedComponentType['plugins.calendarimporter.settings.dialogs.calsyncedit'], undefined, {
store : this.store,
item : undefined,
manager : Ext.WindowMgr
store: this.store,
item: undefined,
manager: Ext.WindowMgr
});
},
@ -122,8 +140,7 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
* has been changed
* @param {Ext.grid.RowSelectionModel} selectionModel selection model that fired the event
*/
onGridSelectionChange : function(selectionModel)
{
onGridSelectionChange: function (selectionModel) {
var noSelection = (selectionModel.hasSelection() === false);
this.removeButton.setDisabled(noSelection);
@ -133,24 +150,21 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
* Handler function will be called when user clicks on 'Remove' button.
* @private
*/
onCalSyncRemove : function()
{
onCalSyncRemove: function () {
this.calsyncGrid.removeIcsSyncAs();
},
/**
* Function will be used to reload data in the store.
*/
discardChanges : function()
{
discardChanges: function () {
this.store.load();
},
/**
* Function will be used to save changes in the store.
*/
saveChanges : function()
{
saveChanges: function () {
this.store.save();
}
});

View File

@ -1,5 +1,5 @@
/**
* ContectMenu.js zarafa calender to ics im/exporter
* ContectMenu.js, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -63,9 +63,9 @@ Zarafa.plugins.calendarimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.
return [{
xtype: 'menuseparator'
}, {
text : _('Import Calendar'),
iconCls : 'icon_calendarimporter_import',
handler : this.onContextItemImport,
text: dgettext('plugin_calendarimporter', 'Import Calendar'),
iconCls: 'icon_calendarimporter_import',
handler: this.onContextItemImport,
beforeShow: function (item, record) {
var access = record.get('access') & Zarafa.core.mapi.Access.ACCESS_MODIFY;
if (!access || (record.isIPMSubTree() && !record.getMAPIStore().isDefaultStore())) {
@ -75,9 +75,9 @@ Zarafa.plugins.calendarimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.
}
}
}, {
text : _('Export Calendar'),
iconCls : 'icon_calendarimporter_export',
handler : this.onContextItemExport,
text: dgettext('plugin_calendarimporter', 'Export Calendar'),
iconCls: 'icon_calendarimporter_export',
handler: this.onContextItemExport,
beforeShow: function (item, record) {
var access = record.get('access') & Zarafa.core.mapi.Access.ACCESS_READ;
if (!access || (record.isIPMSubTree() && !record.getMAPIStore().isDefaultStore())) {
@ -96,16 +96,20 @@ Zarafa.plugins.calendarimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.
onContextItemExport: function () {
var responseHandler = new Zarafa.plugins.calendarimporter.data.ResponseHandler({
successCallback: Zarafa.plugins.calendarimporter.data.Actions.downloadICS,
scope : this
scope: this
});
// Notify user
// # TRANSLATORS: {0} will be replaced by the number of contacts that will be exported
container.getNotifier().notify('info', dgettext('plugin_contactimporter', 'Calendar Export'), String.format(dgettext('plugin_calendarimporter', 'Exporting {0} events. Please wait...'), this.records.get('content_count')));
// request attachment preperation
container.getRequest().singleRequest(
'calendarmodule',
'export',
{
storeid: this.records.get("store_entryid"),
folder : this.records.get("entryid")
folder: this.records.get("entryid")
},
responseHandler
);
@ -118,7 +122,7 @@ Zarafa.plugins.calendarimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.
onContextItemImport: function () {
var componentType = Zarafa.core.data.SharedComponentType['plugins.calendarimporter.dialogs.importevents'];
var config = {
modal : true,
modal: true,
folder: this.records.get("entryid")
};

View File

@ -0,0 +1,350 @@
msgid ""
msgstr ""
"Project-Id-Version: Plugin Calendarimporter\n"
"POT-Creation-Date: 2016-11-29 19:49+0100\n"
"PO-Revision-Date: 2016-11-29 19:49+0100\n"
"Last-Translator: \n"
"Language-Team: Christoph Haas <christoph.h@sprinternet.at>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.7.1\n"
"X-Poedit-Basepath: ../../..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: php\n"
"X-Poedit-SearchPath-1: js\n"
#: js/data/Actions.js:44
msgid "Warning"
msgstr "Warnung"
#: js/dialogs/ImportContentPanel.js:47
msgid "Import Calendar File"
msgstr "Kalender Datei importieren"
#: js/dialogs/ImportPanel.js:124
msgid "Loading..."
msgstr "Lade..."
#: js/dialogs/ImportPanel.js:209
msgid "Select events to import"
msgstr "Termine zum importieren auswählen"
#: js/dialogs/ImportPanel.js:222
msgid "Title"
msgstr "Titel"
#: js/dialogs/ImportPanel.js:228
msgid "Start"
msgstr "Beginn"
#: js/dialogs/ImportPanel.js:235
msgid "End"
msgstr "Ende"
#: js/dialogs/ImportPanel.js:242
msgid "Location"
msgstr "Ort"
#: js/dialogs/ImportPanel.js:247
msgid "Description"
msgstr "Beschreibung"
#: js/dialogs/ImportPanel.js:248
msgid "Priority"
msgstr "Priorität"
#: js/dialogs/ImportPanel.js:249
msgid "Label"
msgstr "Label"
#: js/dialogs/ImportPanel.js:250
msgid "Busystatus"
msgstr "Beschäftigt"
#: js/dialogs/ImportPanel.js:251
msgid "Privacystatus"
msgstr "Privat"
#: js/dialogs/ImportPanel.js:252
msgid "Organizer"
msgstr "Ersteller"
#: js/dialogs/ImportPanel.js:254
msgid "Alarm"
msgstr "Erinnerung"
#: js/dialogs/ImportPanel.js:259 js/dialogs/ImportPanel.js:296
msgid "Timezone"
msgstr "Zeitzone"
#: js/dialogs/ImportPanel.js:276
msgid "Select folder"
msgstr "Ordner auswählen"
#: js/dialogs/ImportPanel.js:317
msgid "Ignore DST"
msgstr "DST ignorieren"
#: js/dialogs/ImportPanel.js:318
msgid "This will ignore \"Daylight saving time\" offsets."
msgstr ""
"Durch diese Einstellung wird die Sommer bzw. Winterzeit Abweichung ignoriert."
#: js/dialogs/ImportPanel.js:338
msgid "Select an .ics calendar"
msgstr ".ics Kalender Datei wählen"
#: js/dialogs/ImportPanel.js:358
msgid "Import"
msgstr "Importieren"
#: js/dialogs/ImportPanel.js:372
msgid "Import All"
msgstr "Alle Importieren"
#: js/dialogs/ImportPanel.js:384 js/settings/SettingsWidget.js:165
#: js/settings/dialogs/CalSyncEditPanel.js:61
msgid "Cancel"
msgstr "Abbrechen"
#: js/dialogs/ImportPanel.js:428
msgid "Uploading and parsing calendar..."
msgstr "Kalender wird hochgeladen und verarbeitet..."
#: js/dialogs/ImportPanel.js:434 js/dialogs/ImportPanel.js:524
#: js/dialogs/ImportPanel.js:532 js/dialogs/ImportPanel.js:581
#: js/plugin.calendarimporter.js:175
msgid "Error"
msgstr "Fehler"
#: js/dialogs/ImportPanel.js:489
msgid "Parser Error"
msgstr "Verarbeitungsfehler"
#: js/dialogs/ImportPanel.js:525
msgid "You have to choose a calendar!"
msgstr "Es muss ein Kalender ausgewählt werden!"
#: js/dialogs/ImportPanel.js:533
msgid "You have to choose at least one event to import!"
msgstr "Es muss mindestens ein Termin zum Importieren ausgewählt werden."
#: js/dialogs/ImportPanel.js:582
msgid "Import failed: {0}"
msgstr "Importieren fehlgeschalgen: {0}"
#: js/plugin.calendarimporter.js:76
msgid "Export Event"
msgstr "Termin exportieren"
#. TRANSLATORS: {0} will be replaced by the number of contacts that will be exported
#. TRANSLATORS: {0} will be replaced by the number of contacts that will be exported
#: js/plugin.calendarimporter.js:105 js/ui/ContextMenu.js:104
msgid "Calendar Export"
msgstr "Kalenderexport"
#: js/plugin.calendarimporter.js:105 js/ui/ContextMenu.js:104
msgid "Exporting {0} events. Please wait..."
msgstr "Exportiere {0} Termine. Bitte warten..."
#: js/plugin.calendarimporter.js:151
msgid "Import to Calendar"
msgstr "Kalender importieren"
#: js/plugin.calendarimporter.js:188
msgid "Please wait"
msgstr "Bitte warten"
#: js/plugin.calendarimporter.js:189
msgid "Loading attachment..."
msgstr "Lade Anhang..."
#: js/plugin.calendarimporter.js:190
msgid "Initializing..."
msgstr "Initialisierung..."
#. TRANSLATORS: {0} will be replaced by the percentage value (0-100)
#: js/plugin.calendarimporter.js:203
msgid "{0}% loaded"
msgstr "{0}% geladen"
#: js/plugin.calendarimporter.js:321
msgid "Calendarimporter Plugin"
msgstr "Kalender Plugin"
#: js/settings/SettingsCalSyncWidget.js:64
msgid "Calendar Sync settings"
msgstr "Kalender Synchronisierung - Einstellungen"
#: js/settings/SettingsWidget.js:45
msgid "Calendar Import/Export plugin settings"
msgstr "Kalender Import/Export Einstellungen"
#: js/settings/SettingsWidget.js:52
msgid "Enable ical sync"
msgstr "iCAL Synchronisierung aktivieren"
#: js/settings/SettingsWidget.js:73
msgid "Default calender"
msgstr "Standard Kalender"
#: js/settings/SettingsWidget.js:92
msgid "Default timezone"
msgstr "Standard Zeitzone"
#: js/settings/SettingsWidget.js:151
msgid "Your WebApp needs to be reloaded to make the changes visible!"
msgstr "Your WebApp needs to be reloaded to make the changes visible!"
#: js/settings/SettingsWidget.js:153
msgid ""
"WebApp will automatically restart in order for these changes to take effect"
msgstr ""
"WebApp will automatically restart in order for these changes to take effect"
#: js/settings/SettingsWidget.js:157
msgid "Restart WebApp"
msgstr "Restart WebApp"
#: js/settings/SettingsWidget.js:162
msgid "Restart"
msgstr "Restart"
#: js/settings/SettingsWidget.js:187
msgid "Webapp is reloading, Please wait."
msgstr "Webapp is reloading, Please wait."
#: js/settings/dialogs/CalSyncEditContentPanel.js:49
msgid "ICAL Sync"
msgstr "iCAL Synchronisierung"
#: js/settings/dialogs/CalSyncEditPanel.js:56
msgid "Save"
msgstr "Save"
#: js/settings/dialogs/CalSyncEditPanel.js:139
msgid "ICAL Information"
msgstr "iCAL Informationen"
#: js/settings/dialogs/CalSyncEditPanel.js:148
msgid "ICS Url"
msgstr "ICS Url"
#: js/settings/dialogs/CalSyncEditPanel.js:156
msgid "Destination Calendar"
msgstr "Ziel-Kalender"
#: js/settings/dialogs/CalSyncEditPanel.js:171
msgid "Sync Intervall (minutes)"
msgstr "Synchronisationsintervall (Minuten)"
#: js/settings/dialogs/CalSyncEditPanel.js:180
msgid "Authentication (optional)"
msgstr "Anmelden (optional)"
#: js/settings/dialogs/CalSyncEditPanel.js:187
msgid "Username"
msgstr "Benutzername"
#: js/settings/dialogs/CalSyncEditPanel.js:194
msgid "Password"
msgstr "Passwort"
#: js/settings/ui/CalSyncGrid.js:45
msgid "No ICAL sync entry exists"
msgstr "Es existiert kein Synchronisierungs Eintrag"
#: js/settings/ui/CalSyncGrid.js:97
msgid "ICS File"
msgstr "ICS Datei"
#: js/settings/ui/CalSyncGrid.js:102
msgid "Destination Calender"
msgstr "Ziel-Kalender"
#: js/settings/ui/CalSyncGrid.js:107
msgid "Authentication"
msgstr "Anmeldung"
#: js/settings/ui/CalSyncGrid.js:112
msgid "Sync Intervall"
msgstr "Synchronisierungs Intervall"
#: js/settings/ui/CalSyncGrid.js:116
msgid "Last Synchronisation"
msgstr "Letzte Synchronisation"
#: js/settings/ui/CalSyncGrid.js:140
msgid "Loading ics sync entries..."
msgstr "Lade Synchronisierungseinträge..."
#: js/settings/ui/CalSyncGrid.js:159
msgid "Alert"
msgstr "Achtung"
#: js/settings/ui/CalSyncGrid.js:159
msgid "Please select a ics sync entry."
msgstr "Bitte einen Eintrag auswählen."
#: js/settings/ui/CalSyncPanel.js:68
msgid "Setup calendars you want to subscribe to."
msgstr "Kalender zur Synchronisation verwalten."
#: js/settings/ui/CalSyncPanel.js:96
msgid "Add"
msgstr "Add"
#: js/settings/ui/CalSyncPanel.js:105
msgid "Remove"
msgstr "Remove"
#: js/ui/ContextMenu.js:66
msgid "Import Calendar"
msgstr "Kalender importieren"
#: js/ui/ContextMenu.js:78
msgid "Export Calendar"
msgstr "Kalender exportieren"
#. TRANSLATORS: Filename suffix for exported files
#: php/module.calendar.php:341
msgid "_events.ics"
msgstr "_Termine.ics"
#: php/module.calendar.php:344
msgid "No events found. Export skipped!"
msgstr "Keine Termine gefunden. Export abgebrochen!"
#: php/module.calendar.php:456
msgid "ICS file empty!"
msgstr "ICS enthält keine Termine!"
#: php/module.calendar.php:594
msgid "Store could not be opened!"
msgstr "Datenbank kann nicht geöffnet werden!"
#: php/module.calendar.php:600
msgid "Wrong call, store and entryid have to be set!"
msgstr "Inkorrekter Aufruf!"
#: php/module.calendar.php:634
msgid "No event in ics file"
msgstr "ICS enthält keine Termine!"
#: php/module.calendar.php:647
msgid "File could not be read by server"
msgstr "Datei konnte vom Server nicht gelesen werden"
#: php/upload.php:69
msgid ""
"File could not be moved to TMP path! Check plugin config and folder "
"permissions!"
msgstr "Temporärer Pfad ist nicht beschreibbar!"
#: php/upload.php:72
msgid "File could not be read by server, upload error!"
msgstr ""
"Datei konnte vom Server nicht gelesen werden. Hochladen fehlgeschlagen!"

View File

@ -0,0 +1,2 @@
Deutsch
deu_DEU

View File

@ -0,0 +1,349 @@
msgid ""
msgstr ""
"Project-Id-Version: Plugin Calendarimporter\n"
"POT-Creation-Date: 2016-11-29 19:21+0100\n"
"PO-Revision-Date: 2016-11-29 19:39+0100\n"
"Last-Translator: \n"
"Language-Team: Christoph Haas <christoph.h@sprinternet.at>\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.7.1\n"
"X-Poedit-Basepath: ../../..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: php\n"
"X-Poedit-SearchPath-1: js\n"
#: js/data/Actions.js:44
msgid "Warning"
msgstr "Warning"
#: js/dialogs/ImportContentPanel.js:47
msgid "Import Calendar File"
msgstr "Import Calendar File"
#: js/dialogs/ImportPanel.js:124
msgid "Loading..."
msgstr "Loading..."
#: js/dialogs/ImportPanel.js:209
msgid "Select events to import"
msgstr "Select events to import"
#: js/dialogs/ImportPanel.js:222
msgid "Title"
msgstr "Title"
#: js/dialogs/ImportPanel.js:228
msgid "Start"
msgstr "Start"
#: js/dialogs/ImportPanel.js:235
msgid "End"
msgstr "End"
#: js/dialogs/ImportPanel.js:242
msgid "Location"
msgstr "Location"
#: js/dialogs/ImportPanel.js:247
msgid "Description"
msgstr "Description"
#: js/dialogs/ImportPanel.js:248
msgid "Priority"
msgstr "Priority"
#: js/dialogs/ImportPanel.js:249
msgid "Label"
msgstr "Label"
#: js/dialogs/ImportPanel.js:250
msgid "Busystatus"
msgstr "Busystatus"
#: js/dialogs/ImportPanel.js:251
msgid "Privacystatus"
msgstr "Privacystatus"
#: js/dialogs/ImportPanel.js:252
msgid "Organizer"
msgstr "Organizer"
#: js/dialogs/ImportPanel.js:254
msgid "Alarm"
msgstr "Alarm"
#: js/dialogs/ImportPanel.js:259 js/dialogs/ImportPanel.js:296
msgid "Timezone"
msgstr "Timezone"
#: js/dialogs/ImportPanel.js:276
msgid "Select folder"
msgstr "Select folder"
#: js/dialogs/ImportPanel.js:317
msgid "Ignore DST"
msgstr "Ignore DST"
#: js/dialogs/ImportPanel.js:318
msgid "This will ignore \"Daylight saving time\" offsets."
msgstr "This will ignore \"Daylight saving time\" offsets."
#: js/dialogs/ImportPanel.js:338
msgid "Select an .ics calendar"
msgstr "Select an .ics calendar"
#: js/dialogs/ImportPanel.js:358
msgid "Import"
msgstr "Import"
#: js/dialogs/ImportPanel.js:372
msgid "Import All"
msgstr "Import All"
#: js/dialogs/ImportPanel.js:384 js/settings/SettingsWidget.js:165
#: js/settings/dialogs/CalSyncEditPanel.js:61
msgid "Cancel"
msgstr "Cancel"
#: js/dialogs/ImportPanel.js:428
msgid "Uploading and parsing calendar..."
msgstr "Uploading and parsing calendar..."
#: js/dialogs/ImportPanel.js:434 js/dialogs/ImportPanel.js:524
#: js/dialogs/ImportPanel.js:532 js/dialogs/ImportPanel.js:581
#: js/plugin.calendarimporter.js:170
msgid "Error"
msgstr "Error"
#: js/dialogs/ImportPanel.js:489
msgid "Parser Error"
msgstr "Parser Error"
#: js/dialogs/ImportPanel.js:525
msgid "You have to choose a calendar!"
msgstr "You have to choose a calendar!"
#: js/dialogs/ImportPanel.js:533
msgid "You have to choose at least one event to import!"
msgstr "You have to choose at least one event to import!"
#: js/dialogs/ImportPanel.js:582
msgid "Import failed: {0}"
msgstr "Import failed: {0}"
#: js/plugin.calendarimporter.js:76
msgid "Export Event"
msgstr "Export Event"
#: js/plugin.calendarimporter.js:146
msgid "Import to Calendar"
msgstr "Import to Calendar"
#: js/plugin.calendarimporter.js:183
msgid "Please wait"
msgstr "Please wait"
#: js/plugin.calendarimporter.js:184
msgid "Loading attachment..."
msgstr "Loading attachment..."
#: js/plugin.calendarimporter.js:185
msgid "Initializing..."
msgstr "Initializing..."
#. TRANSLATORS: {0} will be replaced by the percentage value (0-100)
#: js/plugin.calendarimporter.js:198
msgid "{0}% loaded"
msgstr "{0}% loaded"
#: js/plugin.calendarimporter.js:316
msgid "Calendarimporter Plugin"
msgstr "Calendarimporter Plugin"
#: js/settings/SettingsCalSyncWidget.js:64
msgid "Calendar Sync settings"
msgstr "Calendar Sync settings"
#: js/settings/SettingsWidget.js:45
msgid "Calendar Import/Export plugin settings"
msgstr "Calendar Import/Export plugin settings"
#: js/settings/SettingsWidget.js:52
msgid "Enable ical sync"
msgstr "Enable ical sync"
#: js/settings/SettingsWidget.js:73
msgid "Default calender"
msgstr "Default calender"
#: js/settings/SettingsWidget.js:92
msgid "Default timezone"
msgstr "Default timezone"
#: js/settings/SettingsWidget.js:151
msgid "Your WebApp needs to be reloaded to make the changes visible!"
msgstr "Your WebApp needs to be reloaded to make the changes visible!"
#: js/settings/SettingsWidget.js:153
msgid ""
"WebApp will automatically restart in order for these changes to take effect"
msgstr ""
"WebApp will automatically restart in order for these changes to take effect"
#: js/settings/SettingsWidget.js:157
msgid "Restart WebApp"
msgstr "Restart WebApp"
#: js/settings/SettingsWidget.js:162
msgid "Restart"
msgstr "Restart"
#: js/settings/SettingsWidget.js:187
msgid "Webapp is reloading, Please wait."
msgstr "Webapp is reloading, Please wait."
#: js/settings/dialogs/CalSyncEditContentPanel.js:49
msgid "ICAL Sync"
msgstr "ICAL Sync"
#: js/settings/dialogs/CalSyncEditPanel.js:56
msgid "Save"
msgstr "Save"
#: js/settings/dialogs/CalSyncEditPanel.js:139
msgid "ICAL Information"
msgstr "ICAL Information"
#: js/settings/dialogs/CalSyncEditPanel.js:148
msgid "ICS Url"
msgstr "ICS Url"
#: js/settings/dialogs/CalSyncEditPanel.js:156
msgid "Destination Calendar"
msgstr "Destination Calendar"
#: js/settings/dialogs/CalSyncEditPanel.js:171
msgid "Sync Intervall (minutes)"
msgstr "Sync Intervall (minutes)"
#: js/settings/dialogs/CalSyncEditPanel.js:180
msgid "Authentication (optional)"
msgstr "Authentication (optional)"
#: js/settings/dialogs/CalSyncEditPanel.js:187
msgid "Username"
msgstr "Username"
#: js/settings/dialogs/CalSyncEditPanel.js:194
msgid "Password"
msgstr "Password"
#: js/settings/ui/CalSyncGrid.js:45
msgid "No ICAL sync entry exists"
msgstr "No ICAL sync entry exists"
#: js/settings/ui/CalSyncGrid.js:97
msgid "ICS File"
msgstr "ICS File"
#: js/settings/ui/CalSyncGrid.js:102
msgid "Destination Calender"
msgstr "Destination Calender"
#: js/settings/ui/CalSyncGrid.js:107
msgid "Authentication"
msgstr "Authentication"
#: js/settings/ui/CalSyncGrid.js:112
msgid "Sync Intervall"
msgstr "Sync Intervall"
#: js/settings/ui/CalSyncGrid.js:116
msgid "Last Synchronisation"
msgstr "Last Synchronisation"
#: js/settings/ui/CalSyncGrid.js:140
msgid "Loading ics sync entries..."
msgstr "Loading ics sync entries..."
#: js/settings/ui/CalSyncGrid.js:159
msgid "Alert"
msgstr "Alert"
#: js/settings/ui/CalSyncGrid.js:159
msgid "Please select a ics sync entry."
msgstr "Please select a ics sync entry."
#: js/settings/ui/CalSyncPanel.js:68
msgid "Setup calendars you want to subscribe to."
msgstr "Setup calendars you want to subscribe to."
#: js/settings/ui/CalSyncPanel.js:96
msgid "Add"
msgstr "Add"
#: js/settings/ui/CalSyncPanel.js:105
msgid "Remove"
msgstr "Remove"
#: js/ui/ContextMenu.js:66
msgid "Import Calendar"
msgstr "Import Calendar"
#: js/ui/ContextMenu.js:78
msgid "Export Calendar"
msgstr "Export Calendar"
#. TRANSLATORS: {0} will be replaced by the number of contacts that will be exported
#: js/ui/ContextMenu.js:104
msgid "Calendar Export"
msgstr "Calendar Export"
#: js/ui/ContextMenu.js:104
msgid "Exporting {0} events. Please wait..."
msgstr "Exporting {0} events. Please wait..."
#. TRANSLATORS: Filename suffix for exported files
#: php/module.calendar.php:341
msgid "_events.ics"
msgstr "_events.ics"
#: php/module.calendar.php:344
msgid "No events found. Export skipped!"
msgstr "No events found. Export skipped!"
#: php/module.calendar.php:456
msgid "ICS file empty!"
msgstr "ICS file empty!"
#: php/module.calendar.php:594
msgid "Store could not be opened!"
msgstr "Store could not be opened!"
#: php/module.calendar.php:600
msgid "Wrong call, store and entryid have to be set!"
msgstr "Wrong call, store and entryid have to be set!"
#: php/module.calendar.php:634
msgid "No event in ics file"
msgstr "No event in ics file"
#: php/module.calendar.php:647
msgid "File could not be read by server"
msgstr "File could not be read by server"
#: php/upload.php:69
msgid ""
"File could not be moved to TMP path! Check plugin config and folder "
"permissions!"
msgstr ""
"File could not be moved to TMP path! Check plugin config and folder "
"permissions!"
#: php/upload.php:72
msgid "File could not be read by server, upload error!"
msgstr "File could not be read by server, upload error!"

View File

@ -0,0 +1,2 @@
English (US)
eng_USA

View File

@ -2,13 +2,16 @@
<!DOCTYPE plugin SYSTEM "manifest.dtd">
<plugin version="2">
<info>
<version>2.2.0</version>
<version>2.2.1</version>
<name>calendarimporter</name>
<title>ICS Calendar Importer/Exporter</title>
<author>Christoph Haas</author>
<authorURL>http://www.sprinternet.at</authorURL>
<description>Import or Export a ICS file to/from the zarafa calendar</description>
<description>Import or Export a ICS file to/from the Kopano calendar</description>
</info>
<translations>
<translationsdir>languages</translationsdir>
</translations>
<config>
<configfile>config.php</configfile>
</config>

View File

@ -1,7 +1,7 @@
<?php
/**
* download.php, zarafa calendar to ics im/exporter
* download.php, Kopano calendar to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
@ -27,7 +27,6 @@ class DownloadHandler
{
/**
* Download the given vcf file.
* @return bool
*/
public static function doDownload()
{

View File

@ -1,9 +1,9 @@
<?php
/**
* module.calendar.php, zarafa calender to ics im/exporter
* module.calendar.php, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2014 Christoph Haas
* 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
@ -28,7 +28,7 @@ use Sabre\VObject;
class CalendarModule extends Module
{
private $DEBUG = true; // enable error_log debugging
private $DEBUG = false; // enable error_log debugging
private $busystates = null;
@ -166,12 +166,12 @@ class CalendarModule extends Module
return "";
}
private function getDurationStringFromMintues($minutes, $pos = false) {
private function getDurationStringFromMintues($minutes, $pos = false)
{
$pos = $pos === true ? "+" : "-";
$str = $pos . "P";
// variables for holding values
$mins = intval($minutes);
$hours = 0;
@ -179,30 +179,30 @@ class CalendarModule extends Module
$weeks = 0;
// calculations
if ( $mins >= 60 ) {
if ($mins >= 60) {
$hours = (int)($mins / 60);
$mins = $mins % 60;
}
if ( $hours >= 24 ) {
if ($hours >= 24) {
$days = (int)($hours / 24);
$hours = $hours % 60;
}
if ( $days >= 7 ) {
if ($days >= 7) {
$weeks = (int)($days / 7);
$days = $days % 7;
}
// format result
if ( $weeks ) {
if ($weeks) {
$str .= "{$weeks}W";
}
if ( $days ) {
if ($days) {
$str .= "{$days}D";
}
if ( $hours ) {
if ($hours) {
$str .= "{$hours}H";
}
if ( $mins ) {
if ($mins) {
$str .= "{$mins}M";
}
@ -289,12 +289,12 @@ class CalendarModule extends Module
]);
// Add organizer
$vevent->add('ORGANIZER','mailto:' . $this->getProp($messageProps, "sender_email_address"));
$vevent->add('ORGANIZER', 'mailto:' . $this->getProp($messageProps, "sender_email_address"));
$vevent->ORGANIZER['CN'] = $this->getProp($messageProps, "sender_name");
// Add Attendees
if(isset($messageProps["recipients"]) && count($messageProps["recipients"]["item"]) > 0) {
foreach($messageProps["recipients"]["item"] as $attendee) {
if (isset($messageProps["recipients"]) && count($messageProps["recipients"]["item"]) > 0) {
foreach ($messageProps["recipients"]["item"] as $attendee) {
$att = $vevent->add('ATTENDEE', "mailto:" . $this->getProp($attendee, "email_address"));
$att["CN"] = $this->getProp($attendee, "display_name");
$att["ROLE"] = $this->attendeetype[intval($this->getProp($attendee, "recipient_type"))];
@ -302,7 +302,7 @@ class CalendarModule extends Module
}
// Add alarms
if(!empty($this->getProp($messageProps, "reminder")) && $this->getProp($messageProps, "reminder") == 1) {
if (!empty($this->getProp($messageProps, "reminder")) && $this->getProp($messageProps, "reminder") == 1) {
$valarm = $vevent->add('VALARM', [
'ACTION' => 'DISPLAY',
'DESCRIPTION' => $this->getProp($messageProps, "subject") // reuse the event summary
@ -319,14 +319,14 @@ class CalendarModule extends Module
}
// Add location
if(!empty($this->getProp($messageProps, "location"))) {
$vevent->add('LOCATION',$this->getProp($messageProps, "location"));
if (!empty($this->getProp($messageProps, "location"))) {
$vevent->add('LOCATION', $this->getProp($messageProps, "location"));
}
// Add description
$body = $this->getProp($messageProps, "isHTML") ? $this->getProp($messageProps, "html_body") : $this->getProp($messageProps, "body");
if(!empty($body)) {
$vevent->add('DESCRIPTION',$body);
if (!empty($body)) {
$vevent->add('DESCRIPTION', $body);
}
}
@ -337,10 +337,11 @@ class CalendarModule extends Module
if (count($records) > 0) {
$response['status'] = true;
$response['download_token'] = $token;
$response['filename'] = count($records) . "events.ics";
// TRANSLATORS: Filename suffix for exported files
$response['filename'] = count($records) . dgettext("plugin_calendarimporter", "_events.ics");
} else {
$response['status'] = false;
$response['message'] = "No events found. Export skipped!";
$response['message'] = dgettext("plugin_calendarimporter", "No events found. Export skipped!");
}
$this->addActionData($actionType, $response);
@ -386,7 +387,7 @@ class CalendarModule extends Module
$parser = null;
try {
$parser = VObject\Reader::read(
fopen($icsfile,'r')
fopen($icsfile, 'r')
);
} catch (Exception $e) {
$error = true;
@ -420,7 +421,7 @@ class CalendarModule extends Module
// parse the arraykeys
foreach ($event as $key => $value) {
if ($key !== "internal_fields") {
if(isset($properties[$key])) {
if (isset($properties[$key])) {
$propValuesMAPI[$properties[$key]] = $value;
}
}
@ -452,7 +453,7 @@ class CalendarModule extends Module
} else {
$response['status'] = false;
$response['count'] = 0;
$response['message'] = $error ? $error_msg : "ICS file empty!";
$response['message'] = $error ? $error_msg : dgettext("plugin_calendarimporter", "ICS file empty!");
}
$this->addActionData($actionType, $response);
@ -590,13 +591,13 @@ class CalendarModule extends Module
}
} else {
$response['status'] = false;
$response['message'] = "Store could not be opened!";
$response['message'] = dgettext("plugin_calendarimporter", "Store could not be opened!");
$this->addActionData($actionType, $response);
$GLOBALS["bus"]->addData($this->getResponseData());
}
} else {
$response['status'] = false;
$response['message'] = "Wrong call, store and entryid have to be set!";
$response['message'] = dgettext("plugin_calendarimporter", "Wrong call, store and entryid have to be set!");
$this->addActionData($actionType, $response);
$GLOBALS["bus"]->addData($this->getResponseData());
}
@ -617,7 +618,7 @@ class CalendarModule extends Module
try {
$parser = VObject\Reader::read(
fopen($actionData["ics_filepath"],'r')
fopen($actionData["ics_filepath"], 'r')
);
//error_log(print_r($parser->VTIMEZONE, true));
} catch (Exception $e) {
@ -630,7 +631,7 @@ class CalendarModule extends Module
} else {
if (count($parser->VEVENT) == 0) {
$response['status'] = false;
$response['message'] = "No event in ics file";
$response['message'] = dgettext("plugin_calendarimporter", "No event in ics file");
} else {
$response['status'] = true;
$response['parsed_file'] = $actionData["ics_filepath"];
@ -643,7 +644,7 @@ class CalendarModule extends Module
}
} else {
$response['status'] = false;
$response['message'] = "File could not be read by server";
$response['message'] = dgettext("plugin_calendarimporter", "File could not be read by server");
}
$this->addActionData($actionType, $response);
@ -685,7 +686,7 @@ class CalendarModule extends Module
//$properties["trigger"] = (string)$vEvent->COMMENT;
$properties["priority"] = (string)$vEvent->PRIORITY;
$properties["private"] = ((string)$vEvent->CLASS) == "PRIVATE" ? true : false;
if(!empty((string)$vEvent->{'X-ZARAFA-LABEL'})) {
if (!empty((string)$vEvent->{'X-ZARAFA-LABEL'})) {
$properties["label"] = array_search((string)$vEvent->{'X-ZARAFA-LABEL'}, $this->labels);
}
$properties["last_modification_time"] = (string)$vEvent->{'LAST-MODIFIED'}->getDateTime()->getTimestamp();
@ -694,8 +695,8 @@ class CalendarModule extends Module
// Attendees
$properties["attendees"] = array();
if(isset($vEvent->ATTENDEE) && count($vEvent->ATTENDEE) > 0) {
foreach($vEvent->ATTENDEE as $attendee) {
if (isset($vEvent->ATTENDEE) && count($vEvent->ATTENDEE) > 0) {
foreach ($vEvent->ATTENDEE as $attendee) {
$properties["attendees"][] = array(
"name" => (string)$attendee["CN"],
"mail" => (string)$attendee,
@ -707,8 +708,8 @@ class CalendarModule extends Module
// Alarms
$properties["alarms"] = array();
if(isset($vEvent->VALARM) && count($vEvent->VALARM) > 0) {
foreach($vEvent->VALARM as $alarm) {
if (isset($vEvent->VALARM) && count($vEvent->VALARM) > 0) {
foreach ($vEvent->VALARM as $alarm) {
$properties["alarms"][] = array(
"description" => (string)$alarm->DESCRIPTION,
"trigger" => (string)$alarm->TRIGGER,
@ -723,7 +724,3 @@ class CalendarModule extends Module
return $events;
}
}
;
?>

View File

@ -1,9 +1,9 @@
<?php
/**
* plugin.calendarimporter.php, zarafa calender to ics im/exporter
* plugin.calendarimporter.php, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2014 Christoph Haas
* 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
@ -33,7 +33,9 @@ class Plugincalendarimporter extends Plugin
/**
* Constructor
*/
function __construct() {}
function __construct()
{
}
/**
* Function initializes the Plugin and registers all hooks
@ -90,5 +92,3 @@ class Plugincalendarimporter extends Plugin
));
}
}
?>

View File

@ -1,9 +1,9 @@
<?php
/**
* upload.php, zarafa calender to ics exporter
* upload.php, Kopano calender to ics im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2014 Christoph Haas
* 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
@ -26,11 +26,12 @@ require_once("../config.php");
/* disable error printing - otherwise json communication might break... */
ini_set('display_errors', '0');
/**
/**
* respond/echo JSON
* @param $arr
*/
function respondJSON($arr) {
function respondJSON($arr)
{
echo json_encode($arr);
}
@ -39,11 +40,12 @@ function respondJSON($arr) {
* @param $length the lenght of the generated string
* @return string a random string
*/
function randomstring($length = 6) {
function randomstring($length = 6)
{
// $chars - all allowed charakters
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
srand((double)microtime()*1000000);
srand((double)microtime() * 1000000);
$i = 0;
$pass = "";
while ($i < $length) {
@ -58,15 +60,14 @@ function randomstring($length = 6) {
$destpath = PLUGIN_CALENDARIMPORTER_TMP_UPLOAD;
$destpath .= $_FILES['icsdata']['name'] . randomstring();
if(is_readable ($_FILES['icsdata']['tmp_name'])) {
$result = move_uploaded_file($_FILES['icsdata']['tmp_name'],$destpath);
if (is_readable($_FILES['icsdata']['tmp_name'])) {
$result = move_uploaded_file($_FILES['icsdata']['tmp_name'], $destpath);
if($result) {
respondJSON(array ('success'=>true, 'ics_file'=>$destpath));
if ($result) {
respondJSON(array('success' => true, 'ics_file' => $destpath));
} else {
respondJSON(array ('success'=>false,'error'=>"File could not be moved to TMP path! Check plugin config and folder permissions!"));
respondJSON(array('success' => false, 'error' => dgettext("plugin_calendarimporter", "File could not be moved to TMP path! Check plugin config and folder permissions!")));
}
} else {
respondJSON(array ('success'=>false,'error'=>"File could not be read by server, upload error!"));
respondJSON(array('success' => false, 'error' => dgettext("plugin_calendarimporter", "File could not be read by server, upload error!")));
}
?>