summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/extension/helper/list.php1
-rw-r--r--lib/plugins/extension/lang/en/lang.php7
-rw-r--r--lib/plugins/extension/script.js21
-rw-r--r--lib/plugins/extension/style.less13
4 files changed, 40 insertions, 2 deletions
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index 8bcd00ec6..11aea1d0e 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -151,6 +151,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
if($extension->isInstalled()) {
$class.=' installed';
$class.= ($extension->isEnabled()) ? ' enabled':' disabled';
+ if($extension->updateAvailable()) $class .= ' updatable';
}
if(!$extension->canModify()) $class.= ' notselect';
if($extension->isProtected()) $class.= ' protected';
diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php
index f545b6da3..79f643629 100644
--- a/lib/plugins/extension/lang/en/lang.php
+++ b/lib/plugins/extension/lang/en/lang.php
@@ -101,4 +101,9 @@ $lang['install_url'] = 'Install from URL:';
$lang['install_upload'] = 'Upload Extension:';
$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.';
-$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; \ No newline at end of file
+$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.';
+
+$lang['js']['display_viewoptions'] = 'View Options:';
+$lang['js']['display_enabled'] = 'enabled';
+$lang['js']['display_disabled'] = 'disabled';
+$lang['js']['display_updatable'] = 'updatable';
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js
index fab88162d..1a0af4e0d 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('.tabs li:first-child, .tabs li:nth-child(2)').hasClass('active') ) {
+ 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 );
+ };
+
+ 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);
+ });
+ }
+});
diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less
index d20689099..fe15da16a 100644
--- a/lib/plugins/extension/style.less
+++ b/lib/plugins/extension/style.less
@@ -281,6 +281,15 @@
* Enabled/Disabled overrides
*/
#extension__list {
+
+ .enabled, .disabled, .updatable {
+ display: none;
+ }
+
+ &.enabled .enabled, &.disabled .disabled, &.updatable .updatable {
+ display: block;
+ }
+
.enabled div.screenshot span {
background: transparent url(images/enabled.png) no-repeat 2px 2px;
}
@@ -361,3 +370,7 @@
display: block;
width: 60%;
}
+
+#viewoptions label {
+ margin-left: 1em;
+}