Last change
on this file since 4844 was
4835,
checked in by patdenice, 14 years ago
|
Force the ajax response charset to UTF-8.
Add some missing traductions.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[4699] | 1 | {html_head} |
---|
| 2 | <script type="text/javascript"> |
---|
| 3 | var mess_error = '{'Unable to check upgrades...'|@translate}<br><a href="admin.php?action=check_autoupdate">{'Click here to check upgrades now'|@translate}</a>'; |
---|
| 4 | |
---|
| 5 | window.onload = function () {ldelim} |
---|
| 6 | jQuery.ajax({ldelim} |
---|
| 7 | type: 'GET', |
---|
| 8 | url: '{$ROOT_URL|@cat:"plugins/autoupdate/remote.php"}', |
---|
| 9 | dataType: 'text', |
---|
| 10 | timeout: 10000, // 10 sec timeout |
---|
| 11 | success: function (data) {ldelim} |
---|
| 12 | var reg = new RegExp("(warning|notice)","i"); |
---|
| 13 | if (data.match(reg)) {ldelim} |
---|
| 14 | data = mess_error; |
---|
| 15 | } |
---|
| 16 | jQuery('#autoupdate').html(data); |
---|
| 17 | }, |
---|
| 18 | error: function() {ldelim} |
---|
| 19 | jQuery('#autoupdate').html(mess_error); |
---|
| 20 | } |
---|
| 21 | }); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | function confirm_autoupdate() {ldelim} |
---|
| 25 | conf = confirm('{'autoupdate_alert'|@translate}'); |
---|
| 26 | if (conf) jQuery('#autoupdate').html('Upgrade in progress... Please wait.'); |
---|
| 27 | return conf; |
---|
| 28 | } |
---|
| 29 | </script> |
---|
| 30 | {/html_head} |
---|
[4835] | 31 | <p id="autoupdate"><img src="plugins/autoupdate/ajax-loader.gif"> {'Checking upgrades for gallery and plugins...'|@translate}</p> |
---|
Note: See
TracBrowser
for help on using the repository browser.