Ignore:
Timestamp:
May 23, 2011, 2:34:08 PM (14 years ago)
Author:
mistic100
Message:

plugin manager : delete ordering by name, fiw some styles

File:
1 edited

Legend:

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

    r10594 r11010  
    2222    if (confirm(confirmMsg)) {
    2323      jQuery('div.active').each(function() {
    24         performPluginAction(jQuery(this).attr('id'), 'deactivate');
     24        performPluginDeactivate(jQuery(this).attr('id'));
    2525      });
    2626    }
    2727  });
    28   jQuery('a.activate_all').click(function() {
    29     if (confirm(confirmMsg)) {
    30       jQuery('div.inactive').each(function() {
    31         performPluginAction(jQuery(this).attr('id'), 'activate');
    32       });
    33     }
    34   });
    35   function performPluginAction(id, action) {
     28  function performPluginDeactivate(id) {
    3629   queuedManager.add({
    3730      type: 'GET',
    3831      dataType: 'json',
    3932      url: 'ws.php',
    40       data: { method: 'pwg.plugins.performAction', action: action, plugin: id, pwg_token: pwg_token, format: 'json' },
     33      data: { method: 'pwg.plugins.performAction', action: 'deactivate', plugin: id, pwg_token: pwg_token, format: 'json' },
    4134      success: function(data) {
    4235        if (data['stat'] == 'ok') {
    43           if (action == 'deactivate')
    44             jQuery("#"+id).removeClass('active').addClass('inactive');
    45           else
    46             jQuery("#"+id).removeClass('inactive').addClass('active');
     36          jQuery("#"+id).removeClass('active').addClass('inactive');
    4737        }
    4838      }
     
    8171<div class="titrePage">
    8272  <span class="sort">
    83     <form action="" method="get" name="change_order">
     73    <form action="" method="get" name="change_display">
    8474      <input type="hidden" name="page" value="plugins"/>
    85       {'Sort order'|@translate} :
    86       <select name="plugin_order" onchange="this.form.submit();">
    87         <option value="status" {if $plugin_order=='state'}selected="selected"{/if}>{'Status'|@translate}</option>
    88         <option value="name" {if $plugin_order=='name'}selected="selected"{/if}>{'Name'|@translate}</option>
    89       </select>
    90       &nbsp;&nbsp;|&nbsp;&nbsp;
    9175      {'Display'|@translate} :
    9276      <select name="plugin_display" onchange="this.form.submit();">
     
    9478        <option value="complete" {if $plugin_display=='complete'}selected="selected"{/if}>{'Complete'|@translate}</option>
    9579      </select>
    96       &nbsp;&nbsp;|&nbsp;&nbsp;
    97       <a class="deactivate_all">{'Deactivate'|@translate} {'all'|@translate}</a>
    98       {* &nbsp;&nbsp;|&nbsp;&nbsp;
    99       <a class="activate_all">{'Activate'|@translate} {'all'|@translate}</a> *}
    10080    </form>
    10181  </span>
     
    10888{foreach from=$plugins item=plugin name=plugins_loop}
    10989   
    110 {if $plugin_order == 'state' AND $field_name != $plugin.STATE}
     90{if $field_name != $plugin.STATE}
    11191  {if $field_name != 'null'}</fieldset>{/if}
    112   <fieldset class="pluginBoxes pluginsByState">
     92  <fieldset class="pluginBoxes">
    11393    <legend>
    11494    {if $plugin.STATE == 'active'}
     
    123103    </legend>
    124104  {assign var='field_name' value=$plugin.STATE}
    125 
    126 {elseif $field_name == 'null'}
    127   <fieldset class="pluginBoxes pluginsByName">
    128   {assign var='field_name' value='not_null'}
    129 
     105  {if $field_name == 'active'}<a class="deactivate_all">{'Deactivate'|@translate} {'all'|@translate}</a>{/if}
    130106{/if}
    131107
     
    148124          <td>{$plugin.DESC}</td>
    149125        </tr>
    150         <tr>
     126        <tr class="pluginActions">
    151127          <td>
    152128          {if $plugin.STATE == 'active'}
     
    156132          {elseif $plugin.STATE == 'inactive'}
    157133            <a href="{$plugin.U_ACTION}&amp;action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a>
    158             | <a href="{$plugin.U_ACTION}&amp;action=delete" class="plugin-delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
     134            | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
    159135
    160136          {elseif $plugin.STATE == 'missing'}
    161             <a href="{$plugin.U_ACTION}&amp;action=uninstall" class="plugin-delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
     137            <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
    162138
    163139          {elseif $plugin.STATE == 'merged'}
    164             <a href="{$plugin.U_ACTION}&amp;action=delete" class="plugin-delete">{'Delete'|@translate}</a>
     140            <a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
    165141          {/if}
    166142          </td>
     
    200176        {elseif $plugin.STATE == 'inactive'}
    201177          <a href="{$plugin.U_ACTION}&amp;action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a>
    202           | <a href="{$plugin.U_ACTION}&amp;action=delete"  class="plugin-delete"onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
     178          | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
    203179
    204180        {elseif $plugin.STATE == 'missing'}
    205           <a href="{$plugin.U_ACTION}&amp;action=uninstall" class="plugin-delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
     181          <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
    206182
    207183        {elseif $plugin.STATE == 'merged'}
    208           <a href="{$plugin.U_ACTION}&amp;action=delete" class="plugin-delete">{'Delete'|@translate}</a>
     184          <a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
    209185        {/if}
    210186        </div>
Note: See TracChangeset for help on using the changeset viewer.