1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00

[icons] modification

This commit is contained in:
llj
2016-04-12 11:17:27 +08:00
parent b3d5cb07b7
commit 3f23a1685e
16 changed files with 85 additions and 57 deletions

View File

@@ -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 {

View File

@@ -99,6 +99,8 @@ $(function() {
}
});
}
return false;
});
$(window).resize(function() {
var popup = $('#notice-popup');
@@ -155,6 +157,8 @@ $(function() {
}
});
}
return false;
});
});

View File

@@ -44,8 +44,8 @@
<td>--</td>
{% endif %}
<td>
<span class="sf2-icon-link view-link op-icon vh" data-link="{{ fs.shared_link }}" title="{% trans "View"%}"></span>
<span class="sf2-icon-delete rm-link op-icon vh" data-token="{{ fs.token }}" title="{% trans "Remove"%}"></span>
<a href="#" class="sf2-icon-link view-link op-icon vh" data-link="{{ fs.shared_link }}" title="{% trans "View"%}"></a>
<a href="#" class="sf2-icon-delete rm-link op-icon vh" data-token="{{ fs.token }}" title="{% trans "Remove"%}"></a>
</td>
</tr>
{% endfor %}
@@ -75,8 +75,8 @@
<td><a href="{% url 'view_common_lib_dir' link.repo.id '' %}">{{ link.repo.name }}</a></td>
<td>{{ link.view_cnt }}</td>
<td>
<span class="sf2-icon-link view-link op-icon vh" data-link="{{ link.shared_link }}" title="{% trans "View"%}"></span>
<span class="sf2-icon-delete rm-upload-link op-icon vh" data-token="{{ link.token }}" title="{% trans "Remove"%}"></span>
<a href="#" class="sf2-icon-link view-link op-icon vh" data-link="{{ link.shared_link }}" title="{% trans "View"%}"></a>
<a href="#" class="sf2-icon-delete rm-upload-link op-icon vh" data-token="{{ link.token }}" title="{% trans "Remove"%}"></a>
</td>
</tr>
{% 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() {

View File

@@ -47,10 +47,10 @@
{% endif %}
<div data-url="{% url 'unseen_notices_count' %}" id="msg-count" class="fleft">
<div id="notice-icon" class="cspt" title="{% trans "Notifications" %}">
<a href="#" class="non-text-link" id="notice-icon" title="{% trans "Notifications" %}">
<span class="sf2-icon-bell"></span>
<span class="num hide">0</span>
</div>
</a>
<div id="notice-popup" class="hide" data-url="{% url 'get_popup_notices' %}">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<h3 class="hd">{% trans "Notifications" %}</h3>
@@ -64,9 +64,9 @@
</div>
<div id="account" class="fright">
<div id="my-info">
<a id="my-info" href="#" class="non-text-link">
{% avatar request.user 36 %} <span class="icon-caret-down vam"></span>
</div>
</a>
<div id="user-info-popup" class="top-info-popup hide">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<div class="item ovhd">

View File

@@ -58,10 +58,10 @@
{% endif %}
<div id="msg-count" class="fleft">
<div id="notice-icon" class="cspt" title="{% trans "Notifications" %}">
<a href="#" class="non-text-link" id="notice-icon" title="{% trans "Notifications" %}">
<span class="sf2-icon-bell"></span>
<span class="num hide">0</span>
</div>
</a>
<div id="notice-popup" class="hide">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<h3 class="hd">{% trans "Notifications" %}</h3>
@@ -75,9 +75,9 @@
</div>
<div id="account" class="fright">
<div id="my-info">
<a id="my-info" href="#" class="non-text-link">
{% avatar request.user 36 %} <span class="icon-caret-down vam"></span>
</div>
</a>
<div id="user-info-popup" class="top-info-popup hide">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<div class="item ovhd">

View File

@@ -39,10 +39,10 @@
<% } %>
<td class="repo-op-td">
<div class="op-container">
<span class="sf2-icon-share sf2-x repo-share-btn op-icon vh" title="{% trans "Share" %}"></span>
<span class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}"></span>
<a href="#" class="sf2-icon-share sf2-x repo-share-btn op-icon vh" title="{% trans "Share" %}"></a>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}"></a>
<div class="dropdown dropdown-inline">
<span class="sf2-icon-caret-down more-op-icon op-icon vh dropdown-toggle" title="{% trans "More operations" %}"></span>
<a href="#" class="sf2-icon-caret-down more-op-icon op-icon vh dropdown-toggle" title="{% trans "More operations" %}"></a>
<ul class="hidden-op repo-hidden-op hide dropdown-menu">
<li><a class="op js-repo-rename" href="#">{% trans "Rename" %}</a></li>
<li><a class="op js-repo-transfer" href="#">{% trans "Transfer" %}</a></li>
@@ -70,7 +70,7 @@
<td><a href="#group/<%= group_id %>/lib/<%= id %>"><%- name %></a></td>
<td class="alc">
<% if (is_staff || share_from_me) { %>
<span class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}"></span>
<a href="#" class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}"></a>
<% } %>
</td>
<td><%= size_formatted %></td>
@@ -86,7 +86,7 @@
<td><a href="#org/lib/<%= id %>"><%- name %></a></td>
<td class="alc">
<% if (app.pageOptions.is_staff || owner == app.pageOptions.username) { %>
<span class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}"></span>
<a href="#" class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}"></a>
<% } %>
</td>
<td><%- size_formatted %></td>
@@ -131,7 +131,7 @@
<% } %>
<div class="switch-mode vam">
<span class="list-view-icon-btn sf2-icon-list-view <% if (mode == 'list') { %>active<% } %>" title="{% trans "List" %}" id="js-switch-list-view"></span><span class="grid-view-icon-btn sf2-icon-grid-view <% if (mode == 'grid') { %>active<% } %>" title="{% trans "Grid" %}" id="js-switch-grid-view"></span>
<button class="list-view-icon-btn sf2-icon-list-view <% if (mode == 'list') { %>active<% } %>" title="{% trans "List" %}" id="js-switch-list-view"></button><button class="grid-view-icon-btn sf2-icon-grid-view <% if (mode == 'grid') { %>active<% } %>" title="{% trans "Grid" %}" id="js-switch-grid-view"></button>
</div>
<% if (path == '/') { %>
@@ -201,14 +201,14 @@
<div class="displayed-op">
<a class="op-icon download sf2-icon-download sf2-x" href="<%= download_url %>" title="{% trans "Download" %}"></a>
<% if (!repo_encrypted && can_generate_shared_link) { %>
<span class="op-icon share sf2-icon-share sf2-x" title="{% trans "Share" %}"></span>
<a href="#" class="op-icon share sf2-icon-share sf2-x" title="{% trans "Share" %}"></a>
<% } %>
<% if (dirent.perm == 'rw') { %>
<span class="op-icon delete sf2-icon-delete sf2-x" title="{% trans "Delete" %}"></span>
<a href="#" class="op-icon delete sf2-icon-delete sf2-x" title="{% trans "Delete" %}"></a>
<% } %>
</div>
<% if (dirent.perm == 'rw') { %>
<span class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></span>
<a href="#" class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></a>
<ul class="hidden-op dirent-hidden-op hide dropdown-menu">
<li><a class="op rename" href="#">{% trans "Rename" %}</a></li>
<li><a class="op mv" href="#">{% trans "Move" %}</a></li>
@@ -219,7 +219,7 @@
<li><a class="op open-via-client" href="seafile://openfile?repo_id=<%- repo_id %>&path=<% print(encodeURIComponent(dirent_path + '/')); %>">{% trans "Open via Client" %}</a></li>
</ul>
<% } else if (dirent.perm == 'r' && !repo_encrypted) { %>
<span class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></span>
<a href="#" class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></a>
<ul class="hidden-op dirent-hidden-op hide dropdown-menu">
<li><a class="op cp" href="#">{% trans "Copy" %}</a></li>
</ul>
@@ -244,9 +244,9 @@
</td>
<td class="star alc">
<% if (dirent.starred) { %>
<span title="{% trans "starred" %}" class="icon-star file-star"></span>
<a href="#" title="{% trans "starred" %}" class="icon-star file-star"></a>
<% } else { %>
<span title="{% trans "unstarred" %}" class="icon-star-empty file-star"></span>
<a href="#" title="{% trans "unstarred" %}" class="icon-star-empty file-star"></a>
<% } %>
</td>
<td class="dirent-icon">
@@ -280,14 +280,14 @@
<div class="displayed-op">
<a class="op-icon download sf2-icon-download sf2-x" href="<%= download_url %>" title="{% trans "Download" %}"></a>
<% if (!repo_encrypted && can_generate_shared_link) { %>
<span class="op-icon share sf2-icon-share sf2-x" title="{% trans "Share" %}"></span>
<a href="#" class="op-icon share sf2-icon-share sf2-x" title="{% trans "Share" %}"></a>
<% } %>
<% if (dirent.perm == 'rw') { %>
<span class="op-icon delete sf2-icon-delete sf2-x" title="{% trans "Delete" %}"></span>
<a href="#" class="op-icon delete sf2-icon-delete sf2-x" title="{% trans "Delete" %}"></a>
<% } %>
</div>
<% if (dirent.perm == 'rw') { %>
<span class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More Operations"%}"></span>
<a href="#" class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More Operations"%}"></a>
<ul class="hidden-op dirent-hidden-op hide dropdown-menu">
<li><a class="op rename" href="#">{% trans "Rename" %}</a></li>
<li><a class="op mv" href="#">{% trans "Move" %}</a></li>
@@ -309,7 +309,7 @@
<li><a class="op open-via-client" href="seafile://openfile?repo_id=<%- repo_id %>&path=<% print(encodeURIComponent(dirent_path)); %>">{% trans "Open via Client" %}</a></li>
</ul>
<% } else if (dirent.perm == 'r' && !repo_encrypted) { %>
<span class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></span>
<a class="more-op-icon sf2-icon-caret-down op-icon" title="{% trans "More operations" %}"></a>
<ul class="hidden-op dirent-hidden-op hide dropdown-menu">
<li><a class="op cp" href="#">{% trans "Copy" %}</a></li>
</ul>
@@ -589,7 +589,7 @@
</td>
<td><a href="#shared-libs/lib/<%= id %>"><%- name %></a></td>
<td class="alc">
<span class="sf2-icon-delete sf2-x unshare-btn op-icon vh" title="{% trans "Leave Share" %}"></span>
<a href="#" class="sf2-icon-delete sf2-x unshare-btn op-icon vh" title="{% trans "Leave Share" %}"></a>
</td>
<td><%= size_formatted %></td>
<td><%= mtime_relative %></td>
@@ -655,7 +655,7 @@
<div class="hd w100 ovhd">
<h3 class="fleft">{% trans "Tools" %}</h3>
{% if user.permissions.can_add_repo %}
<span id="enable-mods" class="sf2-icon-cog2 op-icon fright" title="{% trans "Enable Modules" %}"></span>
<a href="#" id="enable-mods" class="sf2-icon-cog2 op-icon fright" title="{% trans "Enable Modules" %}"></a>
{% endif %}
</div>
<ul class="side-tabnav-tabs">
@@ -712,11 +712,11 @@
<div class="fright">
<% if (wiki_enabled) { %>
<span class="sf2-icon-wiki2 op-icon" title="{% trans "Wiki" %}" id="group-wiki-icon"></span>
<a href="{{SITE_ROOT}}group/<%= id %>/wiki/" class="sf2-icon-wiki2 op-icon" title="{% trans "Wiki" %}" id="group-wiki-icon"></a>
<% } %>
<span class="sf2-icon-cog1 op-icon" title="{% trans "Settings" %}" id="group-settings-icon"></span>
<span class="sf2-icon-user2 op-icon" title="{% trans "Members" %}" id="group-members-icon"></span>
<span class="sf2-icon-msgs2 op-icon" title="{% trans "Discussion" %}" id="group-discussions-icon"></span>
<a href="#" class="sf2-icon-cog1 op-icon" title="{% trans "Settings" %}" id="group-settings-icon"></a>
<a href="#" class="sf2-icon-user2 op-icon" title="{% trans "Members" %}" id="group-members-icon"></a>
<a href="#" class="sf2-icon-msgs2 op-icon" title="{% trans "Discussion" %}" id="group-discussions-icon"></a>
</div>
</div>
</script>
@@ -822,7 +822,7 @@
<td><%- repo_name %></td>
<td><%= mtime_relative %></td>
<td>
<span class="sf2-icon-delete unstar op-icon vh" title="{% trans "Unstar" %}"></span>
<a href="#" class="sf2-icon-delete unstar op-icon vh" title="{% trans "Unstar" %}"></a>
</td>
</script>

View File

@@ -11,7 +11,7 @@
{% block main_panel %}
<div id="view-hd">
<h2>{{ filename }}
<span id="file-star" class="{% if is_starred %}icon-star{% else %}icon-star-empty{% endif %} cspt"></span>
<a id="file-star" class="non-text-link {% if is_starred %}icon-star{% else %}icon-star-empty{% endif %}" href="#"></a>
{% if is_pro %}
<img class="file-locked-icon cspt vam {% if not file_locked %}hide{% endif %}" width="16" src="{{ MEDIA_URL }}img/file-locked-32.png" alt="{% trans "locked" %}" title="{% trans "locked" %}" />
{% endif %}
@@ -146,6 +146,8 @@ $('#file-star').click(function() {
},
error: ajaxErrorHandler
});
return false;
});
{% if can_lock_unlock_file %}

View File

@@ -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() {

View File

@@ -67,6 +67,8 @@ define([
Common.feedback(err, 'error');
}
});
return false;
}
});

View File

@@ -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();
},

View File

@@ -55,6 +55,8 @@ define([
Common.ajaxErrorHandler(xhr);
}
});
return false;
}
});

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -48,6 +48,8 @@ define([
Common.ajaxErrorHandler(xhr);
}
});
return false;
}
});

View File

@@ -526,6 +526,8 @@ define([
}
});
}
return false;
});
var _this = this;
@@ -622,6 +624,7 @@ define([
}
});
}
return false;
});
$(window).resize(function() {
var popup = $('#notice-popup');