diff options
author | Andreas Gohr <andi@splitbrain.org> | 2015-05-16 08:02:23 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2015-05-16 08:02:23 +0200 |
commit | 38175ed45a1a1684e8da55d0f5cd825ee4804c3d (patch) | |
tree | cb0ea509b91873181aa1c29e78556ef4712e4847 /lib/plugins/extension/script.js | |
parent | 1bf270429ba972b600ae94b232d90fcbaf0e9a2d (diff) | |
parent | 526e5abda6d7ab051bb2819eaffbe81af04e6c68 (diff) | |
download | rpg-38175ed45a1a1684e8da55d0f5cd825ee4804c3d.tar.gz rpg-38175ed45a1a1684e8da55d0f5cd825ee4804c3d.tar.bz2 |
Merge pull request #1113 from gamma/extension_manager
Add display options to extension manger
Diffstat (limited to 'lib/plugins/extension/script.js')
-rw-r--r-- | lib/plugins/extension/script.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index fab88162d..bc1bf8b12 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -110,4 +110,23 @@ jQuery(function(){ ); }); -});
\ No newline at end of file + /** + Create section for enabling/disabling viewing options + */ + if ( $extmgr.find('.plugins, .templates').hasClass('active') ) { + var $displayOpts = jQuery('<p>', { id: 'extension__viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + + $displayOpts.append(LANG.plugins.extension.display_viewoptions); + + var displayOptionsHandler = function(){ + jQuery('#extension__list').toggleClass( this.name ); + }; + + jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ + + var $label = jQuery( '<label></label>' ).appendTo($displayOpts); + jQuery( '<input />', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); + jQuery( '<span/>' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); + }); + } +}); |