From 1e14eaab7e4fa1131cc57f36046fbe9e5ec5d16e Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 2 Nov 2016 00:59:17 +0100 Subject: [PATCH] Initial Commit --- Makefile | 2 + build.xml | 200 ++++++++++++++++++++++++++++++++++++++++++++ js/contacthelper.js | 41 +++++++++ manifest.xml | 24 ++++++ 4 files changed, 267 insertions(+) create mode 100644 Makefile create mode 100644 build.xml create mode 100644 js/contacthelper.js create mode 100644 manifest.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9ddca06 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +default: + ant deploy; cp -r /home/osboxes/Documents/kopano-webapp-3.2.0.285/deploy/plugins/contacthelper /usr/share/kopano-webapp/plugins/ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..dba3f1c --- /dev/null +++ b/build.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + var Ext = {}; + var Zarafa = {}; + var container = {}; + var _ = function(key, domain) {}; + var dgettext = function(domain, msgid) {}; + var dngettext = function(domain, msgid, msgid_plural, count) {}; + var dnpgettext = function(domain, msgctxt, msgid, msgid_plural, count) {}; + var dpgettext = function(domain, msgctxt, msgid) {}; + var ngettext = function(msgid, msgid_plural, count) {}; + var npgettext = function(msgctxt, msgid, msgid_plural, count) {}; + var pgettext = function(msgctxt, msgid) {}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/contacthelper.js b/js/contacthelper.js new file mode 100644 index 0000000..f7abc17 --- /dev/null +++ b/js/contacthelper.js @@ -0,0 +1,41 @@ +Ext.namespace('Zarafa.plugins.contacthelper'); + + +Zarafa.plugins.contacthelper.ContactHelper = Ext.extend(Zarafa.core.Plugin, { + /** + * Initialize the plugin by calling {@link #registerInsertionPoint}. + * @protected + */ + initPlugin : function() + { + Zarafa.plugins.contacthelper.ContactHelper.superclass.initPlugin.apply(this, arguments); + this.registerInsertionPoint('context.contact.contextmenu.actions', this.createBulkCategoriesContextItem, this); + }, + + createBulkCategoriesContextItem : function() + { + return { + text : _('Multiple Categories'), + iconCls : 'icon_categories', + scope : this, + handler : this.onContextItemCategories, + beforeShow : function(item, records) { + var visible = records.length > 1; + item.setVisible(visible); + } + }; + }, + + onContextItemCategories : function(item) + { + Zarafa.common.Actions.openCategoriesContent(item.parentMenu.records); + } +}); + +Zarafa.onReady(function() { + container.registerPlugin(new Zarafa.core.PluginMetaData({ + name : 'contacthelper', + displayName : _('Contact Helper'), + pluginConstructor : Zarafa.plugins.contacthelper.ContactHelper + })); +}); diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..e76e9b5 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,24 @@ + + + + + 1.0.0 + contacthelper + Contcat Helper Plugin + Christoph Haas + http://www.sprinternet.at + Bulk modify contacts + + + + + + js/contacthelper.js + js/contacthelper-debug.js + + js/contacthelper.js + + + + +