Reformat export JS code

This commit is contained in:
Christoph Haas 2016-11-30 12:21:49 +01:00
parent 3d8d5d703d
commit 67d0080d6c
2 changed files with 40 additions and 38 deletions

View File

@ -3,8 +3,6 @@
<component name="ChangeListManager"> <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="MODIFICATION" beforePath="$PROJECT_DIR$/js/data/Actions.js" afterPath="$PROJECT_DIR$/js/data/Actions.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/plugin.calendarimporter.js" afterPath="$PROJECT_DIR$/js/plugin.calendarimporter.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/ui/ContextMenu.js" afterPath="$PROJECT_DIR$/js/ui/ContextMenu.js" />
</list> </list>
<ignored path="calendarimporter.iws" /> <ignored path="calendarimporter.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -25,11 +23,11 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="plugin.calendarimporter.js" pinned="false" current-in-tab="false"> <file leaf-file-name="plugin.calendarimporter.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js"> <entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300"> <state relative-caret-position="375">
<caret line="97" column="8" selection-start-line="97" selection-start-column="8" selection-end-line="97" selection-end-column="124" /> <caret line="102" column="6" selection-start-line="102" selection-start-column="6" selection-end-line="102" selection-end-column="6" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -45,24 +43,11 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="module.calendar.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Actions.js" 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="234">
<caret line="216" column="38" selection-start-line="216" selection-start-column="31" selection-end-line="216" selection-end-column="38" />
<folding>
<element signature="e#6#914#0#PHP" expanded="true" />
<element signature="e#1004#1022#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Actions.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/js/data/Actions.js"> <entry file="file://$PROJECT_DIR$/js/data/Actions.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="369"> <state relative-caret-position="675">
<caret line="52" column="92" selection-start-line="52" selection-start-column="92" selection-end-line="52" selection-end-column="92" /> <caret line="65" column="47" selection-start-line="65" selection-start-column="47" selection-end-line="65" selection-end-column="47" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -254,6 +239,24 @@
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" /> <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </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>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="calendarimporter" /> <option name="myItemId" value="calendarimporter" />
@ -344,12 +347,12 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1477949602474</updated> <updated>1477949602474</updated>
<workItem from="1477949603566" duration="9204000" /> <workItem from="1477949603566" duration="9204000" />
<workItem from="1480441197414" duration="10980000" /> <workItem from="1480441197414" duration="11095000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="20184000" /> <option name="totallyTimeSpent" value="20299000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="65" y="24" width="1792" height="999" extended-state="6" /> <frame x="65" y="24" width="1792" height="999" extended-state="6" />
@ -726,14 +729,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="97" column="8" selection-start-line="97" selection-start-column="8" selection-end-line="97" selection-end-column="124" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/php/module.calendar.php"> <entry file="file://$PROJECT_DIR$/php/module.calendar.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234"> <state relative-caret-position="234">
@ -745,6 +740,14 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/js/data/Actions.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="65" column="47" selection-start-line="65" selection-start-column="47" selection-end-line="65" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/ui/ContextMenu.js"> <entry file="file://$PROJECT_DIR$/js/ui/ContextMenu.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="534"> <state relative-caret-position="534">
@ -753,10 +756,10 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/js/data/Actions.js"> <entry file="file://$PROJECT_DIR$/js/plugin.calendarimporter.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="369"> <state relative-caret-position="375">
<caret line="52" column="92" selection-start-line="52" selection-start-column="92" selection-end-line="52" selection-end-column="92" /> <caret line="102" column="6" selection-start-line="102" selection-start-column="6" selection-end-line="102" selection-end-column="6" />
<folding /> <folding />
</state> </state>
</provider> </provider>

View File

@ -41,7 +41,7 @@ Zarafa.plugins.calendarimporter.data.Actions = {
* @param recordIds * @param recordIds
*/ */
exportToICS: function (storeId, recordIds, recordFolder) { exportToICS: function (storeId, recordIds, recordFolder) {
if((typeof recordIds != "undefined" && recordIds.length < 1) || (typeof recordFolder != "undefined" && recordFolder.get('content_count') < 1)) { if ((typeof recordIds != "undefined" && recordIds.length < 1) || (typeof recordFolder != "undefined" && recordFolder.get('content_count') < 1)) {
Zarafa.common.dialogs.MessageBox.show({ Zarafa.common.dialogs.MessageBox.show({
title: dgettext('plugin_calendarimporter', 'Error'), title: dgettext('plugin_calendarimporter', 'Error'),
msg: dgettext('plugin_calendarimporter', 'No events found. Export skipped!'), msg: dgettext('plugin_calendarimporter', 'No events found. Export skipped!'),
@ -61,12 +61,12 @@ Zarafa.plugins.calendarimporter.data.Actions = {
folder: undefined folder: undefined
}; };
if(typeof recordIds != "undefined") { if (typeof recordIds != "undefined") {
exportPayload.records = recordIds; exportPayload.records = recordIds;
recordcount = recordIds.length; recordcount = recordIds.length;
} }
if(typeof recordFolder != "undefined") { if (typeof recordFolder != "undefined") {
exportPayload.folder = recordFolder.get("entryid"); exportPayload.folder = recordFolder.get("entryid");
recordcount = recordFolder.get('content_count'); recordcount = recordFolder.get('content_count');
} }
@ -76,7 +76,6 @@ Zarafa.plugins.calendarimporter.data.Actions = {
container.getNotifier().notify('info', dgettext('plugin_contactimporter', 'Calendar Export'), String.format(dgettext('plugin_calendarimporter', 'Exporting {0} events. Please wait...'), recordcount)); container.getNotifier().notify('info', dgettext('plugin_contactimporter', 'Calendar Export'), String.format(dgettext('plugin_calendarimporter', 'Exporting {0} events. Please wait...'), recordcount));
// request attachment preperation // request attachment preperation
container.getRequest().singleRequest( container.getRequest().singleRequest(
'calendarmodule', 'calendarmodule',