aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-06-01 09:59:48 +0000
committermistic100 <mistic@piwigo.org>2011-06-01 09:59:48 +0000
commitd29c7cd0a8dd9f4bac86423fdbf06ecabcbc58f8 (patch)
treed43de853fc7988033bf574688e07d26a461ba4c9 /admin/themes/default
parentcb7366f0035df3cac50a384e8b1c8593f327993b (diff)
plugin manager: "Deactivate all" button now works
git-svn-id: http://piwigo.org/svn/trunk@11184 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/plugins_installed.tpl17
1 files changed, 9 insertions, 8 deletions
diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl
index c7480a9e7..5741365d5 100644
--- a/admin/themes/default/template/plugins_installed.tpl
+++ b/admin/themes/default/template/plugins_installed.tpl
@@ -11,9 +11,10 @@ var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}';
{literal}
var queuedManager = jQuery.manageAjax.create('queued', {
queue: true,
- maxRequests: 1,
- complete: function() { location.reload(); }
+ maxRequests: 1
});
+var nb_plugins = jQuery('div.active').size();
+var done = 0;
jQuery(document).ready(function() {
/* group action */
@@ -31,9 +32,9 @@ jQuery(document).ready(function() {
url: 'ws.php',
data: { method: 'pwg.plugins.performAction', action: 'deactivate', plugin: id, pwg_token: pwg_token, format: 'json' },
success: function(data) {
- if (data['stat'] == 'ok') {
- jQuery("#"+id).removeClass('active').addClass('inactive');
- }
+ if (data['stat'] == 'ok') jQuery("#"+id).removeClass('active').addClass('inactive');
+ done++;
+ if (done == nb_plugins) location.reload();
}
});
};
@@ -106,7 +107,7 @@ jQuery(document).ready(function() {
{if $field_name != $plugin.STATE}
{if $field_name != 'null'}
- {if $field_name == 'active'}<div class="deactivate_all"><a>{'Deactivate'|@translate} {'all'|@translate}</a></div>{/if}
+ {if $field_name == 'active'}<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>{/if}
</fieldset>
{/if}
@@ -134,7 +135,7 @@ jQuery(document).ready(function() {
{/if}
{if $plugin_display == 'complete'}
- <div id="{$plugin.ID}" class="pluginBox">
+ <div id="{$plugin.ID}" class="pluginBox {$plugin.STATE}">
<table>
<tr>
<td class="pluginBoxNameCell">
@@ -181,7 +182,7 @@ jQuery(document).ready(function() {
{assign var='version' value=$plugin.VERSION}
{/if}
- <div id="{$plugin.ID}" class="pluginMiniBox">
+ <div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
<div class="pluginMiniBoxNameCell">
{$plugin.NAME}
<a class="showInfo" title="{if !empty($author)}{'By %s'|@translate|@sprintf:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}">i</a>