From d8718a6d73cb203f3875f31dc38c2978e0484834 Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 25 May 2011 10:54:59 +0000 Subject: merge r11043 from branch 2.2 to trunk feature:2250 Add obsolete_extensions.list file in install directory. Incompatible plugins is checked through ajax. git-svn-id: http://piwigo.org/svn/trunk@11047 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/plugins_list.tpl | 49 +++++++++++++++++--------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'admin/themes/default/template') diff --git a/admin/themes/default/template/plugins_list.tpl b/admin/themes/default/template/plugins_list.tpl index 1f11865b2..c7480a9e7 100644 --- a/admin/themes/default/template/plugins_list.tpl +++ b/admin/themes/default/template/plugins_list.tpl @@ -3,8 +3,7 @@ {footer_script require='jquery.ajaxmanager'} /* incompatible message */ 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'}'; /* group action */ var pwg_token = '{$PWG_TOKEN}'; @@ -39,18 +38,36 @@ jQuery(document).ready(function() { }); }; - /* incompatible message */ - jQuery('.incompatible a.incompatible').click(function() { - return confirm(incompatible_msg); + /* incompatible plugins */ + jQuery(document).ready(function() { + jQuery.ajax({ + method: 'GET', + url: 'admin.php', + data: { page: 'plugins_installed', incompatible_plugins: true }, + dataType: 'json', + success: function(data) { + for (i=0;i') + {else} + jQuery('#'+data[i]+' .pluginMiniBoxNameCell').prepend('') + {/if} + {literal} + jQuery('#'+data[i]).addClass('incompatible'); + jQuery('#'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);'); + } + jQuery('.warning').tipTip({ + 'delay' : 0, + 'fadeIn' : 200, + 'fadeOut' : 200, + 'maxWidth':'250px' + }); + } + }); }); /* TipTips */ - jQuery('.warning').tipTip({ - 'delay' : 0, - 'fadeIn' : 200, - 'fadeOut' : 200, - 'maxWidth':'250px' - }); jQuery('.plugin-restore').tipTip({ 'delay' : 0, 'fadeIn' : 200, @@ -117,11 +134,10 @@ jQuery(document).ready(function() { {/if} {if $plugin_display == 'complete'} -
+
@@ -133,7 +149,7 @@ jQuery(document).ready(function() { | {'Restore'|@translate} {elseif $plugin.STATE == 'inactive'} - {'Activate'|@translate} + {'Activate'|@translate} | {'Delete'|@translate} {elseif $plugin.STATE == 'missing'} @@ -165,9 +181,8 @@ jQuery(document).ready(function() { {assign var='version' value=$plugin.VERSION} {/if} -
+
- {if $plugin.INCOMPATIBLE}{/if} {$plugin.NAME} i
@@ -178,7 +193,7 @@ jQuery(document).ready(function() { | {'Restore'|@translate} {elseif $plugin.STATE == 'inactive'} - {'Activate'|@translate} + {'Activate'|@translate} | {'Delete'|@translate} {elseif $plugin.STATE == 'missing'} -- cgit v1.2.3
- {if $plugin.INCOMPATIBLE}{/if} {$plugin.NAME} {$plugin.DESC}