Initial Commit
This commit is contained in:
41
js/contacthelper.js
Normal file
41
js/contacthelper.js
Normal file
@@ -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
|
||||
}));
|
||||
});
|
Reference in New Issue
Block a user