1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-28 16:17:02 +00:00
Files
seahub/templates/seafile_access_check.html

40 lines
1.2 KiB
HTML
Raw Normal View History

{% 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>
{% 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;
$.ajax({
2012-06-23 10:26:37 +08:00
url: '{{ applet_root }}/seafile_access_check/',
dataType: 'jsonp',
jsonpCallback: 'xx',
crossDomain: true,
2012-07-17 20:53:38 +08:00
success: function(version) {
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 }}';
}
}
});
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');
}
}, 3000);
});
</script>
{% endblock %}