diff options
author | patdenice <patdenice@piwigo.org> | 2011-05-25 09:57:56 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-05-25 09:57:56 +0000 |
commit | 639a18d13fcede5f841aa67529ddd91a4acc1b5d (patch) | |
tree | 4a03369c0c460a3222187575dd6c436f92b98567 /admin/themes/default | |
parent | 663d72e06306108d1b06ae0919c6bf8325c2a9f5 (diff) |
feature:2250
Add obsolete_extensions.list file in install directory.
Incompatible plugins is checked through ajax.
git-svn-id: http://piwigo.org/svn/branches/2.2@11043 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default')
-rw-r--r-- | admin/themes/default/template/plugins_list.tpl | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/admin/themes/default/template/plugins_list.tpl b/admin/themes/default/template/plugins_list.tpl index 618104ca5..ea9ac5108 100644 --- a/admin/themes/default/template/plugins_list.tpl +++ b/admin/themes/default/template/plugins_list.tpl @@ -1,17 +1,26 @@ {footer_script} var incompatible_msg = '{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'javascript'}'; -incompatible_msg += '\n'; -incompatible_msg += '{'Do you want to activate anyway?'|@translate|@escape:'javascript'}'; +var activate_msg = '\n{'Do you want to activate anyway?'|@translate|@escape:'javascript'}'; {literal} jQuery(document).ready(function() { jQuery('.incompatible').click(function() { return confirm(incompatible_msg); }); - jQuery('.warning').tipTip({ - 'delay' : 0, - 'fadeIn' : 200, - 'fadeOut' : 200 + jQuery.ajax({ + method: 'GET', + url: 'admin.php', + data: { page: 'plugins_list', incompatible_plugins: true }, + dataType: 'json', + success: function(data) { + for (i=0;i<data.length;i++) { + jQuery('#plugin_'+data[i]+' .pluginBoxNameCell') + .addClass('warning') + .attr('title', incompatible_msg) + .tipTip({'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200}); + jQuery('#plugin_'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);'); + } + } }); }); {/literal}{/footer_script} @@ -44,10 +53,10 @@ jQuery(document).ready(function() { </legend> {foreach from=$plugins item=plugin name=plugins_loop} {if $plugin.STATE == $plugin_state} - <div class="pluginBox"> + <div class="pluginBox" id="plugin_{$plugin.ID}"> <table> <tr> - <td class="pluginBoxNameCell{if $plugin.INCOMPATIBLE} warning" title="{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'html'}{/if}"> + <td class="pluginBoxNameCell"> {$plugin.NAME} </td> <td>{$plugin.DESC}</td> @@ -58,7 +67,7 @@ jQuery(document).ready(function() { <a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a> {elseif $plugin_state == 'inactive'} - <a href="{$plugin.U_ACTION}&action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a> + <a href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a> | <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> {elseif $plugin_state == 'uninstalled'} |