Changeset 11184 for trunk/admin


Ignore:
Timestamp:
Jun 1, 2011, 11:59:48 AM (13 years ago)
Author:
mistic100
Message:

plugin manager: "Deactivate all" button now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/plugins_installed.tpl

    r11048 r11184  
    1212var queuedManager = jQuery.manageAjax.create('queued', {
    1313  queue: true, 
    14   maxRequests: 1,
    15   complete: function() { location.reload(); }
     14  maxRequests: 1
    1615});
     16var nb_plugins = jQuery('div.active').size();
     17var done = 0;
    1718
    1819jQuery(document).ready(function() {
     
    3233      data: { method: 'pwg.plugins.performAction', action: 'deactivate', plugin: id, pwg_token: pwg_token, format: 'json' },
    3334      success: function(data) {
    34         if (data['stat'] == 'ok') {
    35           jQuery("#"+id).removeClass('active').addClass('inactive');
    36         }
     35        if (data['stat'] == 'ok') jQuery("#"+id).removeClass('active').addClass('inactive');
     36        done++;
     37        if (done == nb_plugins) location.reload();
    3738      }
    3839    });
     
    107108{if $field_name != $plugin.STATE}
    108109  {if $field_name != 'null'}
    109     {if $field_name == 'active'}<div class="deactivate_all"><a>{'Deactivate'|@translate} {'all'|@translate}</a></div>{/if}
     110    {if $field_name == 'active'}<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>{/if}
    110111  </fieldset>
    111112  {/if}
     
    135136   
    136137  {if $plugin_display == 'complete'}
    137     <div id="{$plugin.ID}" class="pluginBox">
     138    <div id="{$plugin.ID}" class="pluginBox {$plugin.STATE}">
    138139      <table>
    139140        <tr>
     
    182183    {/if}
    183184         
    184     <div id="{$plugin.ID}" class="pluginMiniBox">
     185    <div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
    185186      <div class="pluginMiniBoxNameCell">
    186187        {$plugin.NAME}
Note: See TracChangeset for help on using the changeset viewer.