Load password.js only when needed

pull/172/head
Aleksander Machniak 10 years ago
parent 53846f798f
commit 9556f34d75

@ -70,10 +70,15 @@ class password extends rcube_plugin
} }
$this->add_hook('settings_actions', array($this, 'settings_actions')); $this->add_hook('settings_actions', array($this, 'settings_actions'));
$this->register_action('plugin.password', array($this, 'password_init')); $this->register_action('plugin.password', array($this, 'password_init'));
$this->register_action('plugin.password-save', array($this, 'password_save')); $this->register_action('plugin.password-save', array($this, 'password_save'));
if (strpos($rcmail->action, 'plugin.password') === 0) {
$this->include_script('password.js'); $this->include_script('password.js');
} }
}
function settings_actions($args) function settings_actions($args)
{ {

Loading…
Cancel
Save