source: extensions/autoupdate/template/head.tpl @ 6167

Last change on this file since 6167 was 6167, checked in by patdenice, 14 years ago

Upgrade work for 2.1.
Language keys have not been inserted yet.

File size: 872 bytes
Line 
1{html_head}
2<script type="text/javascript">
3var mess_error = '{'Unable to check upgrades...'|@translate}<br><a href="admin.php?action=check_autoupdate">{'Click here to check upgrades now'|@translate}</a>';
4
5window.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</script>
24{/html_head}
25<p id="autoupdate"><img src="plugins/autoupdate/template/ajax-loader.gif"> &nbsp; {'Checking upgrades for gallery and plugins...'|@translate}</p>
Note: See TracBrowser for help on using the repository browser.