mirror of
https://github.com/silentsakky/zarafa-webapp-passwd
synced 2026-08-05 23:11:25 +02:00
commit initial skeleton of the plugin
nothing is working
This commit is contained in:
parent
b6c8396ab6
commit
843f674854
7 changed files with 397 additions and 0 deletions
8
js/ABOUT.js
Normal file
8
js/ABOUT.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Ext.namespace('Zarafa.plugins.passwd');
|
||||
|
||||
/**
|
||||
* @class Zarafa.plugins.passwd.ABOUT
|
||||
*
|
||||
* The copyright string holding the copyright notice for the Zarafa passwd Plugin.
|
||||
*/
|
||||
Zarafa.plugins.sugarcrm.ABOUT = "Something should be here";
|
||||
56
js/PasswdPlugin.js
Normal file
56
js/PasswdPlugin.js
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
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
|
||||
}));
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue