1
0
Fork 0
mirror of https://github.com/dducret/kopano-webapp-passwd synced 2026-07-27 18:42:47 +02:00
kopano-webapp-passwd/js/PasswdPlugin.js
Saket Patel 843f674854 commit initial skeleton of the plugin
nothing is working
2013-07-02 01:35:25 +05:30

56 lines
1.3 KiB
JavaScript

Ext.namespace('Zarafa.plugins.passwd');
/**
* @class Zarafa.plugins.passwd.PasswdPlugin
* @extends Zarafa.core.Plugin
*
* Passwd plugin.
* Allows users to change password from webapp.
*/
Zarafa.plugins.passwd.PasswdPlugin = Ext.extend(Zarafa.core.Plugin, {
/**
* Initialize the plugin by registering to the insertion point
* to add something to the right end of the main tab bar.
* @protected
*/
initPlugin : function()
{
Zarafa.plugins.passwd.PasswdPlugin.superclass.initPlugin.apply(this, arguments);
this.registerInsertionPoint('main.maintabbar.right', this.putTabbarButton, this);
},
/**
* Create the button to add to the insertion point as called
* by init().
* @return A struct with the necessary configuration for the button.
* @private
*/
putTabbarButton : function()
{
return {
text : _('Change Password'),
handler : this.clickPasswdButton
};
},
/**
* Trigger function called when the user clicks the button in the
* main tab bar.
* @private
*/
clickPasswdButton : function()
{
// open a dialog
}
});
Zarafa.onReady(function() {
container.registerPlugin(new Zarafa.core.PluginMetaData({
name : 'passwd',
displayName : _('Password Change Plugin'),
about : Zarafa.plugins.passwd.ABOUT,
pluginConstructor : Zarafa.plugins.passwd.PasswdPlugin
}));
});