From 3f23a1685edafc9b1efdb413cd5b8235a900e5dd Mon Sep 17 00:00:00 2001 From: llj Date: Tue, 12 Apr 2016 11:17:27 +0800 Subject: [PATCH] [icons] modification --- media/css/seahub.css | 13 ++-- media/js/base.js | 4 ++ seahub/share/templates/share/links.html | 12 ++-- seahub/templates/base.html | 8 +-- seahub/templates/base_for_backbone.html | 8 +-- seahub/templates/js/templates.html | 62 +++++++++---------- seahub/templates/view_file_base.html | 6 +- static/scripts/app/views/dirent.js | 4 ++ static/scripts/app/views/group-repo.js | 2 + static/scripts/app/views/group.js | 5 -- static/scripts/app/views/organization-repo.js | 2 + static/scripts/app/views/repo.js | 3 + static/scripts/app/views/shared-repo.js | 4 +- static/scripts/app/views/side-nav.js | 4 +- static/scripts/app/views/starred-file-item.js | 2 + static/scripts/common.js | 3 + 16 files changed, 85 insertions(+), 57 deletions(-) diff --git a/media/css/seahub.css b/media/css/seahub.css index 58ad7baef1..91220fbd2d 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -466,6 +466,9 @@ p { margin:0.5em 0; } .no-deco:hover { text-decoration:none; } +.non-text-link:hover { + text-decoration:none; +} .input-disabled {/* for type="password/text" etc*/ background:#ebebe4; } @@ -1890,6 +1893,10 @@ button.dropdown-toggle:focus { .repo-file-list .icon-star-empty, .repo-file-list .icon-star { font-size:16px; + cursor:pointer; + text-decoration:none; + line-height:19px; + vertical-align:middle; } .repo-file-list .dirent-icon { width:27px; @@ -1927,11 +1934,6 @@ button.dropdown-toggle:focus { -webkit-box-shadow:0 2px 2px -1px #aaa; box-shadow:0 2px 2px -3px #aaa; } -.file-star { - cursor:pointer; - line-height:19px; - vertical-align:middle; -} .repo-file-list .repo-file-op { position:relative; } @@ -3414,6 +3416,7 @@ img.thumbnail { font-size:18px; color:#aaa; cursor:pointer; + border-radius:0; } .grid-view-icon-btn.active, .list-view-icon-btn.active { diff --git a/media/js/base.js b/media/js/base.js index 0a3a825a2c..1d2ce666e7 100644 --- a/media/js/base.js +++ b/media/js/base.js @@ -99,6 +99,8 @@ $(function() { } }); } + + return false; }); $(window).resize(function() { var popup = $('#notice-popup'); @@ -155,6 +157,8 @@ $(function() { } }); } + + return false; }); }); diff --git a/seahub/share/templates/share/links.html b/seahub/share/templates/share/links.html index 4e922710b5..69a88308aa 100644 --- a/seahub/share/templates/share/links.html +++ b/seahub/share/templates/share/links.html @@ -44,8 +44,8 @@ -- {% endif %} - - + + {% endfor %} @@ -75,8 +75,8 @@ {{ link.repo.name }} {{ link.view_cnt }} - - + + {% endfor %} @@ -104,6 +104,8 @@ $(".view-link").click(function() { .val(link).css('width', $('#shared-link').prev().width() + 2) .modal({focus:false}); $('#shared-link').prev().remove(); + + return false; }); // rm download/upload link @@ -121,6 +123,8 @@ $('.rm-link, .rm-upload-link').click(function() { }, error: ajaxErrorHandler }); + + return false; }); $('#shared-link').click(function() { diff --git a/seahub/templates/base.html b/seahub/templates/base.html index d7bbbe2557..dec230f079 100644 --- a/seahub/templates/base.html +++ b/seahub/templates/base.html @@ -47,10 +47,10 @@ {% endif %}
- +

{% trans "Notifications" %}

@@ -64,9 +64,9 @@
- +
diff --git a/seahub/templates/base_for_backbone.html b/seahub/templates/base_for_backbone.html index 2b0372ceec..0cafee06d8 100644 --- a/seahub/templates/base_for_backbone.html +++ b/seahub/templates/base_for_backbone.html @@ -58,10 +58,10 @@ {% endif %}
- +

{% trans "Notifications" %}

@@ -75,9 +75,9 @@
- +
diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index f20d3741f7..a34f24d6e8 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -39,10 +39,10 @@ <% } %>
- - + + <% if (enable_upload_folder) { %>
    -
  • +
  • {% trans "Upload Files" %} -
  • -
  • +
  • +
  • {% trans "Upload Folder" %} -
  • +
<% } %> @@ -131,7 +131,7 @@ <% } %>
- +
<% if (path == '/') { %> @@ -201,14 +201,14 @@
<% if (!repo_encrypted && can_generate_shared_link) { %> - + <% } %> <% if (dirent.perm == 'rw') { %> - + <% } %>
<% if (dirent.perm == 'rw') { %> - + <% } else if (dirent.perm == 'r' && !repo_encrypted) { %> - + @@ -244,9 +244,9 @@ <% if (dirent.starred) { %> - + <% } else { %> - + <% } %> @@ -280,14 +280,14 @@
<% if (!repo_encrypted && can_generate_shared_link) { %> - + <% } %> <% if (dirent.perm == 'rw') { %> - + <% } %>
<% if (dirent.perm == 'rw') { %> - + <% } else if (dirent.perm == 'r' && !repo_encrypted) { %> - + @@ -589,7 +589,7 @@ <%- name %> - + <%= size_formatted %> <%= mtime_relative %> @@ -655,7 +655,7 @@

{% trans "Tools" %}

{% if user.permissions.can_add_repo %} - + {% endif %}
    @@ -712,11 +712,11 @@
    <% if (wiki_enabled) { %> - + <% } %> - - - + + +
@@ -822,7 +822,7 @@ <%- repo_name %> <%= mtime_relative %> - + diff --git a/seahub/templates/view_file_base.html b/seahub/templates/view_file_base.html index 3e9326a73c..4be13811fd 100644 --- a/seahub/templates/view_file_base.html +++ b/seahub/templates/view_file_base.html @@ -11,7 +11,7 @@ {% block main_panel %}

{{ filename }} - + {% if is_pro %} {% trans {% endif %} @@ -145,7 +145,9 @@ $('#file-star').click(function() { op_icon.toggleClass('icon-star-empty icon-star'); }, error: ajaxErrorHandler - }); + }); + + return false; }); {% if can_lock_unlock_file %} diff --git a/static/scripts/app/views/dirent.js b/static/scripts/app/views/dirent.js index 814e627502..d11664a944 100644 --- a/static/scripts/app/views/dirent.js +++ b/static/scripts/app/views/dirent.js @@ -147,6 +147,8 @@ define([ Common.ajaxErrorHandler(xhr); } }); + + return false; }, visitDir: function () { // todo @@ -179,6 +181,8 @@ define([ } else { popup.addClass('hide'); } + + return false; }, share: function() { diff --git a/static/scripts/app/views/group-repo.js b/static/scripts/app/views/group-repo.js index c4fdeebb87..e61c91df4c 100644 --- a/static/scripts/app/views/group-repo.js +++ b/static/scripts/app/views/group-repo.js @@ -67,6 +67,8 @@ define([ Common.feedback(err, 'error'); } }); + + return false; } }); diff --git a/static/scripts/app/views/group.js b/static/scripts/app/views/group.js index 937acb95b7..207f272cf2 100644 --- a/static/scripts/app/views/group.js +++ b/static/scripts/app/views/group.js @@ -23,7 +23,6 @@ define([ events: { 'click #group-settings-icon': 'toggleSettingsPanel', 'click #group-members-icon': 'toggleMembersPanel', - 'click #group-wiki-icon': 'showGroupWiki', 'click #group-discussions-icon': 'toggleDiscussionsPanel', 'click .repo-create': 'createRepo', 'click .by-name': 'sortByName', @@ -209,10 +208,6 @@ define([ return this.settingsView.toggle(); }, - showGroupWiki: function() { - location.href = app.config.siteRoot + 'group/' + this.group.id + '/wiki/'; - }, - toggleMembersPanel: function() { return this.membersView.toggle(); }, diff --git a/static/scripts/app/views/organization-repo.js b/static/scripts/app/views/organization-repo.js index 19a25d8938..82d4f528ae 100644 --- a/static/scripts/app/views/organization-repo.js +++ b/static/scripts/app/views/organization-repo.js @@ -55,6 +55,8 @@ define([ Common.ajaxErrorHandler(xhr); } }); + + return false; } }); diff --git a/static/scripts/app/views/repo.js b/static/scripts/app/views/repo.js index cc6390e44e..c37bd94331 100644 --- a/static/scripts/app/views/repo.js +++ b/static/scripts/app/views/repo.js @@ -105,6 +105,8 @@ define([ } }); }); + + return false; }, share: function() { @@ -119,6 +121,7 @@ define([ 'obj_name': this.model.get('name') }; new ShareView(options); + return false; }, togglePopup: function() { diff --git a/static/scripts/app/views/shared-repo.js b/static/scripts/app/views/shared-repo.js index 20d0083a44..b42096a10c 100644 --- a/static/scripts/app/views/shared-repo.js +++ b/static/scripts/app/views/shared-repo.js @@ -29,7 +29,7 @@ define([ if (_this.collection.length == 0) { $('#repos-shared-to-me table').hide(); $('#repos-shared-to-me .empty-tips').show(); - }; + } }; $.ajax({ @@ -44,6 +44,8 @@ define([ dataType: 'json', success: success_callback }); + + return false; }, render: function() { diff --git a/static/scripts/app/views/side-nav.js b/static/scripts/app/views/side-nav.js index 6d2e09b756..0c62159b6f 100644 --- a/static/scripts/app/views/side-nav.js +++ b/static/scripts/app/views/side-nav.js @@ -47,7 +47,7 @@ define([ 'mods_available': app.pageOptions.user_mods_available, 'mods_enabled': mods_enabled })); - form.modal(); + form.modal({focus:false}); $('#simplemodal-container').css('height', 'auto'); $('.checkbox-orig', form).click(function() { @@ -84,6 +84,8 @@ define([ }); return false; }); + + return false; }, setCurTab: function(cur_tab, options) { diff --git a/static/scripts/app/views/starred-file-item.js b/static/scripts/app/views/starred-file-item.js index 32cb1cfb3f..8621288947 100644 --- a/static/scripts/app/views/starred-file-item.js +++ b/static/scripts/app/views/starred-file-item.js @@ -48,6 +48,8 @@ define([ Common.ajaxErrorHandler(xhr); } }); + + return false; } }); diff --git a/static/scripts/common.js b/static/scripts/common.js index e774d41085..54061e3443 100644 --- a/static/scripts/common.js +++ b/static/scripts/common.js @@ -526,6 +526,8 @@ define([ } }); } + + return false; }); var _this = this; @@ -622,6 +624,7 @@ define([ } }); } + return false; }); $(window).resize(function() { var popup = $('#notice-popup');