+
- |
- {% trans "Message" %} |
- {% trans "Time" %} |
+ |
+ {% trans "Message" %} |
+ {% trans "Time" %} |
{% for notice in notices %}
- {{notice.avatar|safe}} |
-
+ |  |
+
{% if notice.is_group_msg %}
- {% blocktrans with user=notice.notice_from grp_url=notice.group_url grp_name=notice.group_name%}{{user}} posted a new discussion in {{grp_name}}{% endblocktrans %}
+ {% blocktrans with user=notice.notice_from grp_url=notice.group_url grp_name=notice.group_name%}{{user}} posted a new discussion in {{grp_name}}{% endblocktrans %}
{% if notice.grp_msg %}
- {{notice.grp_msg}}
+ {{notice.grp_msg}}
{% endif %}
{% elif notice.is_grpmsg_reply %}
- {% blocktrans with user=notice.notice_from reply_url=notice.group_msg_reply_url%}{{user}} replied your group discussion{% endblocktrans %}
+ {% blocktrans with user=notice.notice_from reply_url=notice.group_msg_reply_url%}{{user}} replied your group discussion{% endblocktrans %}
{% if notice.grp_reply_msg %}
-
+
{% if notice.grpmsg_topic %}
- {{notice.grpmsg_topic}}
+ {{notice.grpmsg_topic|truncatechars:45}}
{% endif %}
- {{notice.grp_reply_msg}}
+ {{notice.grp_reply_msg}}
{% endif %}
{% elif notice.is_repo_share_msg %}
- {% blocktrans with user=notice.notice_from lib_url=notice.repo_url lib_name=notice.repo_name%}{{user}} has shared a library named {{lib_name}} to you.{% endblocktrans %}
+ {% blocktrans with user=notice.notice_from lib_url=notice.repo_url lib_name=notice.repo_name%}{{user}} has shared a library named {{lib_name}} to you.{% endblocktrans %}
{% elif notice.is_priv_file_share_msg %}
- {% blocktrans with user=notice.notice_from file_url=notice.priv_shared_file_url file_name=notice.priv_shared_file_name %}{{user}} has shared a file named {{file_name}} to you.{% endblocktrans %}
+ {% blocktrans with user=notice.notice_from file_url=notice.priv_shared_file_url file_name=notice.priv_shared_file_name %}{{user}} has shared a file named {{file_name}} to you.{% endblocktrans %}
{% elif notice.is_user_message %}
- {% blocktrans with msg_url=notice.user_msg_url user=notice.notice_from %}You have received a new message from {{user}}.{% endblocktrans %}
+ {% blocktrans with msg_url=notice.user_msg_url user=notice.notice_from %}You have received a new message from {{user}}.{% endblocktrans %}
{% if notice.user_msg %}
- {{notice.user_msg}}
+ {{notice.user_msg}}
{% endif %}
{% elif notice.is_file_uploaded_msg %}
- {% blocktrans with file_url=notice.file_link file_name=notice.file_name folder_url=notice.folder_link folder_name=notice.folder_name %}A file named {{file_name}} is uploaded to your folder {{folder_name}}.{% endblocktrans %}
+ {% blocktrans with file_url=notice.file_link file_name=notice.file_name folder_url=notice.folder_link folder_name=notice.folder_name %}A file named {{file_name}} is uploaded to your folder {{folder_name}}.{% endblocktrans %}
{% elif notice.is_group_join_request %}
- {% blocktrans with user_url=notice.grpjoin_user_profile_url user=notice.notice_from grp_url=notice.grpjoin_group_url grp_name=notice.grpjoin_group_name msg=notice.grpjoin_request_msg %}User {{user}} has asked to join group {{grp_name}}, verification message: {{msg}}{% endblocktrans %}
+ {% blocktrans with user_url=notice.grpjoin_user_profile_url user=notice.notice_from grp_url=notice.grpjoin_group_url grp_name=notice.grpjoin_group_name msg=notice.grpjoin_request_msg %}User {{user}} has asked to join group {{grp_name}}, verification message: {{msg}}{% endblocktrans %}
{% endif %}
|
- {{ notice.timestamp|date:"Y-m-d G:i:s"}} |
+ {{ notice.timestamp|date:"Y-m-d G:i:s"}} |
{% endfor %}
diff --git a/seahub/notifications/templates/notifications/user_notification_tr.html b/seahub/notifications/templates/notifications/user_notification_tr.html
index 57544a8203..f20e35e949 100644
--- a/seahub/notifications/templates/notifications/user_notification_tr.html
+++ b/seahub/notifications/templates/notifications/user_notification_tr.html
@@ -10,7 +10,7 @@
{% if notice.msg_from %}
{% avatar notice.msg_from 32 %}
{% else %}
-
+
{% endif %}
@@ -25,7 +25,7 @@
{% if notice.format_grpmsg_reply_detail %}
{% if notice.format_grpmsg_reply_topic %}
- {{ notice.format_grpmsg_reply_topic|truncatechars:45 }}
+ {{ notice.format_grpmsg_reply_topic|truncatechars:60 }}
{% endif %}
{{ notice.format_grpmsg_reply_detail }}
diff --git a/seahub/templates/myhome.html b/seahub/templates/myhome.html
index e15fcfff0a..4009d83d61 100644
--- a/seahub/templates/myhome.html
+++ b/seahub/templates/myhome.html
@@ -73,6 +73,11 @@ $(function() {$('#guide-for-new').modal({appendTo: '#main', focus:false});});
var cur_tab = $('.ui-tabs-selected .a');
var lib_create_btn = $('#repo-create'),
sublib_create_btn = $('#sub-lib-create');
+// for 'long language' such as german
+if (sublib_create_btn.text().length > 15) { // 'new Sub-library'.length is 15
+ $('span', sublib_create_btn).text(trimFilename(sublib_create_btn.text(),14));;
+}
+
// for initial state
if (cur_tab.attr('id') == 'mylib-tab') {
lib_create_btn.removeClass('hide');
diff --git a/seahub/templates/repo.html b/seahub/templates/repo.html
index 8c901d7255..c8488b38df 100644
--- a/seahub/templates/repo.html
+++ b/seahub/templates/repo.html
@@ -936,14 +936,13 @@ $('#upload-file').click(function () {
});
{% else %}
$('#upload-file').click(function () {
- var upload_success = false;
var uploaded_files = [];
$('#upload-file-dialog').modal({
focus:false,
containerCss: {width:600, height:$(window).height()/1.5},
onClose: function() {
$.modal.close();
- if (upload_success) {
+ if (uploaded_files.length > 0) {
if ($('.file-item').length == 0) { // there is no file before this upload
reqDirData('{% url 'repo_dir_data' repo.id %}?p=' + e(cur_path));
} else {
@@ -985,39 +984,39 @@ $('#upload-file').click(function () {
parent_dir.val(cur_path);
- $.ajax({
- url: '{% url 'get_file_op_url' repo.id %}?op_type=' + e('upload'),
- cache: false,
- dataType: 'json',
- success: function(data) {
- form.attr('action', data['url']);
-
- try {
- // Initialize the jQuery File Upload widget, which needs to use form action
- form.fileupload({
- //singleFileUploads: false // using 1 request to upload all files of a selection
- sequentialUploads: true
- })
- .bind('fileuploaddone', function(e, data) {
- if (data.textStatus == 'success') {
- upload_success = true;
- uploaded_files.push(data.result[0]);
+ try {
+ // Initialize the jQuery File Upload widget, which needs to use form action
+ form.fileupload({
+ //singleFileUploads: false // using 1 request to upload all files of a selection
+ sequentialUploads: true
+ })
+ .bind('fileuploadadd', function(e, data) {
+ // get url(token) for every file
+ $.ajax({
+ url: '{% url 'get_file_op_url' repo.id %}?op_type=upload',
+ cache: false,
+ dataType: 'json',
+ success: function(ret) {
+ data.url = ret['url'];
}
});
-
- // Enable iframe cross-domain access via redirect option:
- form.fileupload(
- 'option',
- 'redirect',
- window.location.href.replace(/\/repo\/[-a-z0-9]{36}\/.*/, '/media/cors/result.html?%s')
- );
- } catch(e) { // in case the fileupload js file has not been loaded
- form.append('' + "{% trans "Error. Please try later." %}" + ' ');
- setTimeout(function() { $.modal.close(); }, 1600);
+ })
+ .bind('fileuploaddone', function(e, data) {
+ if (data.textStatus == 'success') {
+ uploaded_files.push(data.result[0]);
}
- },
- error: ajaxErrorHandler
- });
+ });
+
+ // Enable iframe cross-domain access via redirect option:
+ form.fileupload(
+ 'option',
+ 'redirect',
+ window.location.href.replace(/\/repo\/[-a-z0-9]{36}\/.*/, '/media/cors/result.html?%s')
+ );
+ } catch(e) { // in case the fileupload js file has not been loaded
+ form.append('' + "{% trans "Error. Please try later." %}" + ' ');
+ setTimeout(function() { $.modal.close(); }, 1600);
+ }
});
{% endif %}
diff --git a/seahub/templates/snippets/file_content_html.html b/seahub/templates/snippets/file_content_html.html
index ebc12dd431..454b4c9df3 100644
--- a/seahub/templates/snippets/file_content_html.html
+++ b/seahub/templates/snippets/file_content_html.html
@@ -49,7 +49,7 @@ For details please refer to 'snippets/file_content_js.html'.
{% endif %}
{% if filetype == 'OpenDocument' %}
-
+
{% endif %}
{% else %}
diff --git a/seahub/templates/snippets/my_owned_repos.html b/seahub/templates/snippets/my_owned_repos.html
index 0fe499ae43..3cb9f55e4e 100644
--- a/seahub/templates/snippets/my_owned_repos.html
+++ b/seahub/templates/snippets/my_owned_repos.html
@@ -1,7 +1,7 @@
{% load seahub_tags i18n %}
-
+
@@ -25,9 +25,9 @@
|
{% trans "Name" %} |
- {% trans "Description" %} |
- {% trans "Last Update" %} |
- {% trans "Operations" %} |
+ {% trans "Description" %} |
+ {% trans "Last Update" %} |
+ {% trans "Operations" %} |
{% for repo in owned_repos %}
{% if not ENABLE_SUB_LIBRARY or not repo.is_virtual %}
@@ -72,9 +72,9 @@
|
{% trans "Name" %} |
- {% trans "Origin" %} |
- {% trans "Last Update" %} |
- {% trans "Operations" %} |
+ {% trans "Origin" %} |
+ {% trans "Last Update" %} |
+ {% trans "Operations" %} |
{% for repo in sub_repos %}
diff --git a/seahub/templates/snippets/notice_html.html b/seahub/templates/snippets/notice_html.html
index 20ab1deab1..05097a6182 100644
--- a/seahub/templates/snippets/notice_html.html
+++ b/seahub/templates/snippets/notice_html.html
@@ -23,7 +23,7 @@
{% if notice.format_grpmsg_reply_detail %}
{% if notice.format_grpmsg_reply_topic %}
- {{ notice.format_grpmsg_reply_topic|truncatechars:25 }}
+ {{ notice.format_grpmsg_reply_topic|truncatechars:35 }}
{% endif %}
{{ notice.format_grpmsg_reply_detail }}
diff --git a/seahub/templates/view_file_base.html b/seahub/templates/view_file_base.html
index e19d494d01..c66acfa426 100644
--- a/seahub/templates/view_file_base.html
+++ b/seahub/templates/view_file_base.html
@@ -239,20 +239,17 @@ function setToolbarPos() {
$('#to-group').css({'top': parseInt(toolbar.css('top')) + 59});
}
$(window).load(function() {
- // if page needs scroll, show 'back-to-top' icon
- if ($(document).height() > $(window).height()) {
- var to_top = $('');
- to_top.click(function() {
- $(window).scrollTop(0);
- }).appendTo($('#fileview-toolbar'));
- $(window).scroll(function() {
- if ($(window).scrollTop() > 0) {
- to_top.show();
- } else {
- to_top.hide();
- }
- });
- }
+ var to_top = $('');
+ to_top.click(function() {
+ $(window).scrollTop(0);
+ }).appendTo($('#fileview-toolbar'));
+ $(window).scroll(function() {
+ if ($(window).scrollTop() > 0) {
+ to_top.show();
+ } else {
+ to_top.hide();
+ }
+ });
setToolbarPos();
}).resize(setToolbarPos);
diff --git a/seahub/templates/view_file_opendocument.html b/seahub/templates/view_file_opendocument.html
index 0803fad05d..4fb1b6a337 100644
--- a/seahub/templates/view_file_opendocument.html
+++ b/seahub/templates/view_file_opendocument.html
@@ -4,7 +4,7 @@
{% block file_view %}
{% if not err %}
-
+
{% endif %}
{% endblock %}
diff --git a/seahub/templates/view_shared_upload_link.html b/seahub/templates/view_shared_upload_link.html
index 3bf2c1d9fe..6b3ee81b46 100644
--- a/seahub/templates/view_shared_upload_link.html
+++ b/seahub/templates/view_shared_upload_link.html
@@ -23,7 +23,7 @@
{% if no_quota %}
{% trans "The owner of this library has run out of space." %}
{% else %}
- |