aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/extension/script.js
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2015-04-27 08:00:12 +0200
committerGerry Weißbach <gerry.w@gammaproduction.de>2015-04-27 08:00:12 +0200
commit79a3bed0a23b6bef35eb12c6ccbb1f3301f6c621 (patch)
treeed15843219a387e74d750004f31a986f53b67753 /lib/plugins/extension/script.js
parenta7ec353091498e86d606c27f5ca7a808c2d096c0 (diff)
downloaddokuwiki-79a3bed0a23b6bef35eb12c6ccbb1f3301f6c621.tar.gz
dokuwiki-79a3bed0a23b6bef35eb12c6ccbb1f3301f6c621.zip
Generate display options via JS
Since it is a JS function only, the form will be generated by it too.
Diffstat (limited to 'lib/plugins/extension/script.js')
-rw-r--r--lib/plugins/extension/script.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js
index 43af21ee1..825bcc928 100644
--- a/lib/plugins/extension/script.js
+++ b/lib/plugins/extension/script.js
@@ -111,9 +111,19 @@ jQuery(function(){
});
/**
- * Enable all plugin types
- */
- $extmgr.find( '#viewoptions :checkbox' ).change(function(){
+ Create section for enabling/disabling viewing options
+ */
+ var $displayOpts = jQuery('<p>', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' ));
+ $displayOpts.append(LANG.plugins.extension.display_viewoptions);
+
+ var displayOptionsHandler = function(){
jQuery('#extension__list').toggleClass( this.name );
- }).click();
+ };
+
+ 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);
+ });
});