Changeset 11010 for trunk/admin/themes/default/template
- Timestamp:
- May 23, 2011, 2:34:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/plugins_list.tpl
r10594 r11010 22 22 if (confirm(confirmMsg)) { 23 23 jQuery('div.active').each(function() { 24 performPlugin Action(jQuery(this).attr('id'), 'deactivate');24 performPluginDeactivate(jQuery(this).attr('id')); 25 25 }); 26 26 } 27 27 }); 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) { 36 29 queuedManager.add({ 37 30 type: 'GET', 38 31 dataType: 'json', 39 32 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' }, 41 34 success: function(data) { 42 35 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'); 47 37 } 48 38 } … … 81 71 <div class="titrePage"> 82 72 <span class="sort"> 83 <form action="" method="get" name="change_ order">73 <form action="" method="get" name="change_display"> 84 74 <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 | 91 75 {'Display'|@translate} : 92 76 <select name="plugin_display" onchange="this.form.submit();"> … … 94 78 <option value="complete" {if $plugin_display=='complete'}selected="selected"{/if}>{'Complete'|@translate}</option> 95 79 </select> 96 | 97 <a class="deactivate_all">{'Deactivate'|@translate} {'all'|@translate}</a>98 {* | 99 <a class="activate_all">{'Activate'|@translate} {'all'|@translate}</a> *}100 80 </form> 101 81 </span> … … 108 88 {foreach from=$plugins item=plugin name=plugins_loop} 109 89 110 {if $ plugin_order == 'state' AND $field_name != $plugin.STATE}90 {if $field_name != $plugin.STATE} 111 91 {if $field_name != 'null'}</fieldset>{/if} 112 <fieldset class="pluginBoxes pluginsByState">92 <fieldset class="pluginBoxes"> 113 93 <legend> 114 94 {if $plugin.STATE == 'active'} … … 123 103 </legend> 124 104 {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} 130 106 {/if} 131 107 … … 148 124 <td>{$plugin.DESC}</td> 149 125 </tr> 150 <tr >126 <tr class="pluginActions"> 151 127 <td> 152 128 {if $plugin.STATE == 'active'} … … 156 132 {elseif $plugin.STATE == 'inactive'} 157 133 <a href="{$plugin.U_ACTION}&action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a> 158 | <a href="{$plugin.U_ACTION}&action=delete" class="plugin-delete"onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>134 | <a href="{$plugin.U_ACTION}&action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a> 159 135 160 136 {elseif $plugin.STATE == 'missing'} 161 <a href="{$plugin.U_ACTION}&action=uninstall" class="plugin-delete"onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>137 <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> 162 138 163 139 {elseif $plugin.STATE == 'merged'} 164 <a href="{$plugin.U_ACTION}&action=delete" class="plugin-delete">{'Delete'|@translate}</a>140 <a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a> 165 141 {/if} 166 142 </td> … … 200 176 {elseif $plugin.STATE == 'inactive'} 201 177 <a href="{$plugin.U_ACTION}&action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a> 202 | <a href="{$plugin.U_ACTION}&action=delete" class="plugin-delete"onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>178 | <a href="{$plugin.U_ACTION}&action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a> 203 179 204 180 {elseif $plugin.STATE == 'missing'} 205 <a href="{$plugin.U_ACTION}&action=uninstall" class="plugin-delete"onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>181 <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> 206 182 207 183 {elseif $plugin.STATE == 'merged'} 208 <a href="{$plugin.U_ACTION}&action=delete" class="plugin-delete">{'Delete'|@translate}</a>184 <a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a> 209 185 {/if} 210 186 </div>
Note: See TracChangeset
for help on using the changeset viewer.