- Timestamp:
- Apr 21, 2011, 5:12:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/intro.tpl
r9553 r10538 2 2 3 3 {footer_script require='jquery.cluetip'} 4 jQuery().ready(function(){ldelim} 5 jQuery('.cluetip').cluetip({ldelim} 4 var piwigo_need_update_msg = '<a href="admin.php?page=updates">{"A new version of Piwigo is available."|@translate|@escape:"javascript"}</a>'; 5 var ext_need_update_msg = '<a href="admin.php?page=updates&tab=ext">{"Some upgrades are available for extensions."|@translate|@escape:"javascript"}</a>'; 6 7 {literal} 8 jQuery().ready(function(){ 9 jQuery('.cluetip').cluetip({ 6 10 width: 300, 7 11 splitTitle: '|', 8 12 positionBy: 'bottomTop' 9 13 }); 14 jQuery.ajax({ 15 type: 'GET', 16 url: 'ws.php', 17 dataType: 'json', 18 data: { method: 'pwg.extensions.checkUpdates', format: 'json' }, 19 timeout: 5000, 20 success: function (data) { 21 if (data['stat'] != 'ok') 22 return; 23 piwigo_update = data['result']['piwigo_need_update']; 24 ext_update = data['result']['ext_need_update'] 25 if ((piwigo_update || ext_update) && !jQuery(".warnings").is('div')) 26 jQuery("#content").prepend('<div class="warnings"><ul></ul></div>'); 27 if (piwigo_update) 28 jQuery(".warnings ul").append('<li>'+piwigo_need_update_msg+'</li>'); 29 if (ext_update) 30 jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>'); 31 } 32 }); 10 33 }); 34 {/literal} 11 35 {/footer_script} 12 36 -
trunk/admin/themes/default/template/updates_ext.tpl
r10512 r10538 28 28 }); 29 29 } 30 }; 31 32 function ignoreAll() { 33 jQuery('.ignoreExtension').each( function() { 34 if (jQuery(this).parents('div').css('display') == 'block') 35 jQuery(this).click(); 36 }); 30 37 }; 31 38 … … 40 47 jQuery(".pluginBox, fieldset").show(); 41 48 jQuery("#update_all").show(); 49 jQuery("#ignore_all").show(); 42 50 jQuery("#up_to_date").hide(); 43 51 jQuery("#reset_ignore").hide(); … … 68 76 if (total == 0) { 69 77 jQuery("#update_all").hide(); 78 jQuery("#ignore_all").hide(); 70 79 jQuery("#up_to_date").show(); 71 80 } … … 97 106 98 107 function ignoreExtension(type, id) { 99 jQuery.ajax({108 queuedManager.add({ 100 109 type: 'GET', 101 110 url: 'ws.php', … … 138 147 <br> 139 148 <input type="submit" id="update_all" value="{'Update All'|@translate}" onClick="updateAll(); return false;"> 149 <input type="submit" id="ignore_all" value="{'Ignore All'|@translate}" onClick="ignoreAll(); return false;"> 140 150 <input type="submit" id="reset_ignore" value="{'Reset ignored updates'|@translate}" onClick="resetIgnored(); return false;" {if !$SHOW_RESET}style="display:none;"{/if}> 141 151 </div> 142 152 <div class="autoupdate_bar" style="display:none;"> 143 {' Update in progress... Please wait.'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif">153 {'Please wait...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"> 144 154 </div> 145 155 … … 160 170 <a href="#" onClick="updateExtension('plugins', '{$plugin.EXT_ID}', {$plugin.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a> 161 171 | <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a> 162 | <a href="#" onClick="ignoreExtension('plugins', '{$plugin.EXT_ID}'); return false;" >{'Ignore this update'|@translate}</a>172 | <a href="#" onClick="ignoreExtension('plugins', '{$plugin.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a> 163 173 </td> 164 174 </tr> … … 202 212 <a href="#" onClick="updateExtension('themes', '{$theme.EXT_ID}', {$theme.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a> 203 213 | <a href="{$theme.URL_DOWNLOAD}">{'Download'|@translate}</a> 204 | <a href="#" onClick="ignoreExtension('themes', '{$theme.EXT_ID}'); return false;" >{'Ignore this update'|@translate}</a>214 | <a href="#" onClick="ignoreExtension('themes', '{$theme.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a> 205 215 </td> 206 216 </tr> … … 244 254 <a href="#" onClick="updateExtension('languages', '{$language.EXT_ID}', {$language.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a> 245 255 | <a href="{$language.URL_DOWNLOAD}">{'Download'|@translate}</a> 246 | <a href="#" onClick="ignoreExtension('languages', '{$language.EXT_ID}'); return false;" >{'Ignore this update'|@translate}</a>256 | <a href="#" onClick="ignoreExtension('languages', '{$language.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a> 247 257 </td> 248 258 </tr> -
trunk/include/ws_functions.inc.php
r10511 r10538 2846 2846 $conf['updates_ignored'] = unserialize($conf['updates_ignored']); 2847 2847 2848 // Reset ignored extension 2848 2849 if ($params['reset']) 2849 2850 { … … 2872 2873 return true; 2873 2874 } 2875 2876 function ws_extensions_checkupdates($params, &$service) 2877 { 2878 global $conf; 2879 2880 define('IN_ADMIN', true); 2881 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 2882 include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php'); 2883 $update = new updates(); 2884 2885 if (!is_admin()) 2886 { 2887 return new PwgError(401, 'Access denied'); 2888 } 2889 2890 $result = array(); 2891 2892 if (!isset($_SESSION['need_update'])) 2893 $update->check_piwigo_upgrade(); 2894 2895 $result['piwigo_need_update'] = $_SESSION['need_update']; 2896 2897 $conf['updates_ignored'] = unserialize($conf['updates_ignored']); 2898 2899 if (!isset($_SESSION['extensions_need_update'])) 2900 $update->check_extensions(); 2901 else 2902 $update->check_updated_extensions(); 2903 2904 if (!is_array($_SESSION['extensions_need_update'])) 2905 $result['ext_need_update'] = null; 2906 else 2907 $result['ext_need_update'] = !empty($_SESSION['extensions_need_update']); 2908 2909 return $result; 2910 } 2874 2911 ?> -
trunk/language/en_UK/admin.lang.php
r10511 r10538 823 823 $lang['Unable to send template directory.'] = 'Unable to send template directory.'; 824 824 $lang['Unable to dump database.'] = 'Unable to dump database.'; 825 $lang['Some upgrades are available for extensions.'] = 'Some upgrades are available for extensions.'; 826 $lang['Please wait...'] = 'Please wait...'; 827 $lang['Ignore All'] = 'Ignore All'; 825 828 ?> -
trunk/language/fr_FR/admin.lang.php
r10511 r10538 834 834 $lang['Unable to send template directory.'] = 'Impossible d\'envoyer le dossier template.'; 835 835 $lang['Unable to dump database.'] = 'Impossible de sauvegarder la base de données.'; 836 $lang['Some upgrades are available for extensions.'] = 'Des mises à jour sont disponibles pour les extensions.'; 837 $lang['Please wait...'] = 'Please wait...'; 838 $lang['Ignore All'] = 'Tout ignorer'; 836 839 ?> -
trunk/ws.php
r10511 r10538 446 446 <br>If reset parameter is true, all ignored extensions will be reinitilized.' 447 447 ); 448 449 $service->addMethod( 450 'pwg.extensions.checkUpdates', 451 'ws_extensions_checkupdates', 452 array(), 453 'Check if piwigo or extensions are up to date.' 454 ); 448 455 } 449 456
Note: See TracChangeset
for help on using the changeset viewer.