Changeset 10538 for trunk/admin/themes/default/template/intro.tpl
- Timestamp:
- Apr 21, 2011, 5:12:38 PM (13 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.