2012-05-14 21:51:55 +08:00
|
|
|
{% extends "myhome_base.html" %}
|
|
|
|
|
2012-06-14 15:01:49 +08:00
|
|
|
{% block main_panel %}
|
|
|
|
<div class="text-panel">
|
2012-07-17 20:53:38 +08:00
|
|
|
<p id="msg-client" class="error hide">请确认本地Seafile程序已启动。</p>
|
|
|
|
<p id="msg-version" class="error hide">你的 Seafile 客户端版本太旧,请升级到最新版本。<a href="http://www.seafile.com/download">点击下载</a></p>
|
2012-06-14 15:01:49 +08:00
|
|
|
</div>
|
2012-05-14 21:51:55 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
var req_success = false;
|
2012-07-17 20:53:38 +08:00
|
|
|
var version_mismatch = false;
|
2012-05-14 21:51:55 +08:00
|
|
|
$.ajax({
|
2012-06-23 10:26:37 +08:00
|
|
|
url: '{{ applet_root }}/seafile_access_check/',
|
2012-05-14 21:51:55 +08:00
|
|
|
dataType: 'jsonp',
|
|
|
|
jsonpCallback: 'xx',
|
|
|
|
crossDomain: true,
|
2012-07-17 20:53:38 +08:00
|
|
|
success: function(version) {
|
2012-08-11 10:32:48 +08:00
|
|
|
if (version < 2) {
|
2012-07-17 20:53:38 +08:00
|
|
|
version_mismatch = true;
|
|
|
|
} else {
|
|
|
|
req_success = true;
|
|
|
|
location.href = '{{ SITE_ROOT }}download/repo/?repo_id={{ repo_id }}';
|
|
|
|
}
|
2012-05-14 21:51:55 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
setTimeout(function() {
|
2012-07-17 20:53:38 +08:00
|
|
|
if (version_mismatch) {
|
|
|
|
$('#msg-version').removeClass('hide');
|
|
|
|
} else if (!req_success) {
|
|
|
|
$('#msg-client').removeClass('hide');
|
2012-05-14 21:51:55 +08:00
|
|
|
}
|
2012-08-03 11:29:00 +08:00
|
|
|
}, 3000);
|
2012-05-14 21:51:55 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|