diff --git a/media/css/seahub.css b/media/css/seahub.css
index 5cbb494dce..b129892dc9 100644
--- a/media/css/seahub.css
+++ b/media/css/seahub.css
@@ -3191,9 +3191,13 @@ button.sf-dropdown-toggle:focus {
border-bottom:1px solid #e8e8e8;
}
#wiki-page-list {
- line-height:1.8;
margin-top:1.6em;
}
+.wiki-page-list-item {
+ word-break:break-all;
+ line-height:1.6;
+ margin:3px 0;
+}
.wiki-page-link,
.wiki-page-link:hover {
font-size:1.15em;
@@ -3202,11 +3206,11 @@ button.sf-dropdown-toggle:focus {
margin-left:5px;
}
#wiki-area {
- padding: 30px 0 0;
+ padding:30px 0 0;
}
#wiki-last-modified,
#wiki-page-last-modified {
- margin-top: 10px;
+ margin-top:40px;
font-size:12px;
color: #666;
}
diff --git a/seahub/templates/home_base.html b/seahub/templates/home_base.html
index 7acce56c91..0060651824 100644
--- a/seahub/templates/home_base.html
+++ b/seahub/templates/home_base.html
@@ -53,17 +53,30 @@
{% trans "Invite People" %}
{% endif %}
-
-
{% trans "Share Admin" %}
-
-
{% endblock %}
@@ -100,5 +113,11 @@ $('#group-nav a:first').on('click', function() {
$('#group-nav .grp-list').slideToggle();
return false;
});
+$('#share-admin-nav').on('click', 'a:first', function() {
+ var $shareAdmin = $('#share-admin-nav');
+ $('.toggle-icon', $shareAdmin).toggleClass('icon-caret-left icon-caret-down');
+ $('ul', $shareAdmin).slideToggle(250);
+ return false;
+});
{% endblock %}
diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html
index b5f22ab18c..633a49884b 100644
--- a/seahub/templates/js/templates.html
+++ b/seahub/templates/js/templates.html
@@ -1401,8 +1401,12 @@
{% endif %}
- {% trans "Share Admin" %}
+ {% trans "Share Admin" %}
+ <% if (show_share_admin) { %>
+
+ <% } else { %>
+ <% } %>
<% if (can_add_repo) { %>
-
#{% trans "Libraries" %}
diff --git a/seahub/templates/wiki/wiki.html b/seahub/templates/wiki/wiki.html
index 9c5210532d..d6ac88bfd6 100644
--- a/seahub/templates/wiki/wiki.html
+++ b/seahub/templates/wiki/wiki.html
@@ -38,7 +38,7 @@
@@ -109,7 +109,7 @@ function showCurrentPage() {
success: function(data) { // { meta: {wiki page object}, content: string }
$error.hide();
- $('#wiki-page-name').html(HTMLescape(data.meta.name));
+ //$('#wiki-page-name').html(HTMLescape(data.meta.name));
$('#wiki-content')
.html(addAnchorsToHeaders(marked(data.content)))
@@ -152,6 +152,15 @@ function showCurrentPage() {
showCurrentPage();
// show page list
+var isHiDPI = function() {
+ var pixelRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
+ if (pixelRatio > 1) {
+ return true;
+ } else {
+ return false;
+ }
+};
+
(function() {
var $container = $('#wiki-pages-container');
var $list = $('ul', $container);
@@ -165,6 +174,7 @@ showCurrentPage();
success: function(data) {
var str = '';
var pages = data.data;
+ var icon_size = isHiDPI() ? 192 : 24;
// sort by name
pages.sort(function(a, b) {
// make 'home' as the first one
@@ -182,7 +192,7 @@ showCurrentPage();
}
});
$(pages).each(function(index, item) {
- str += '
' + HTMLescape(item.name) + ' ';
+ str += '
' + HTMLescape(item.name) + ' ';
});
$list.html($(str)).show();
},
diff --git a/static/scripts/app/router.js b/static/scripts/app/router.js
index 98b3d32a2a..ad805bfd81 100644
--- a/static/scripts/app/router.js
+++ b/static/scripts/app/router.js
@@ -283,25 +283,25 @@ define([
showShareAdminRepos: function() {
this.switchCurrentView(this.shareAdminReposView);
this.shareAdminReposView.show();
- this.sideNavView.setCurTab('share-admin-repos');
+ this.sideNavView.setCurTab('share-admin-repos', {'show_share_admin': true});
},
showShareAdminFolders: function() {
this.switchCurrentView(this.shareAdminFoldersView);
this.shareAdminFoldersView.show();
- this.sideNavView.setCurTab('share-admin-folders');
+ this.sideNavView.setCurTab('share-admin-folders', {'show_share_admin': true});
},
showShareAdminShareLinks: function() {
this.switchCurrentView(this.shareAdminShareLinksView);
this.shareAdminShareLinksView.show();
- this.sideNavView.setCurTab('share-admin-links');
+ this.sideNavView.setCurTab('share-admin-links', {'show_share_admin': true});
},
showShareAdminUploadLinks: function() {
this.switchCurrentView(this.shareAdminUploadLinksView);
this.shareAdminUploadLinksView.show();
- this.sideNavView.setCurTab('share-admin-links');
+ this.sideNavView.setCurTab('share-admin-links', {'show_share_admin': true});
}
});
diff --git a/static/scripts/app/views/side-nav.js b/static/scripts/app/views/side-nav.js
index 2d57fbd27f..9133b4355e 100644
--- a/static/scripts/app/views/side-nav.js
+++ b/static/scripts/app/views/side-nav.js
@@ -25,6 +25,7 @@ define([
'show_group_list': this.group_expanded, // when cur_tab is not 'group'
'groups': app.pageOptions.groups,
'mods_enabled': app.pageOptions.user_mods_enabled,
+ 'show_share_admin': false, // show 'share admin' nav list or not
'can_add_repo': app.pageOptions.can_add_repo,
'can_generate_share_link': app.pageOptions.can_generate_share_link,
'can_generate_upload_link': app.pageOptions.can_generate_upload_link