mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[my libs, dir view] improvement: enlarge clickable area, and etc.
This commit is contained in:
@@ -232,7 +232,7 @@ a.table-sort-op {
|
||||
}
|
||||
a.mobile-table-sort-op {
|
||||
display:inline-block;
|
||||
margin: 0 5px 0 10px;
|
||||
margin: 0 7px 0 10px;
|
||||
}
|
||||
a.table-sort-op:hover,
|
||||
a.table-sort-op:focus {
|
||||
@@ -568,6 +568,12 @@ a.op-icon:focus {
|
||||
margin-top:4px;
|
||||
font-size:12px;
|
||||
}
|
||||
@media (max-width:767px) {
|
||||
.more-op-icon {
|
||||
padding:6px;
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
.big-more-btn {
|
||||
padding:.5em 0;
|
||||
color:#777;
|
||||
@@ -2196,6 +2202,12 @@ button.sf-dropdown-toggle:focus {
|
||||
.repo-file-list .dirent-name {
|
||||
display:inline-block;
|
||||
}
|
||||
@media (max-width:767px) {
|
||||
.repo-file-list .dirent-name,
|
||||
.repo-file-list .img-name-link {
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
.repo-file-list .file-locked-icon {
|
||||
position:absolute;
|
||||
right:0;
|
||||
|
@@ -86,9 +86,6 @@
|
||||
<span class="repo-meta-info"><%= mtime_relative %></span>
|
||||
</span>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td>{% trans "Broken (please contact your administrator to fix this library)" %}</td>
|
||||
<% } %>
|
||||
<td class="repo-op-td">
|
||||
<div class="op-container">
|
||||
<div class="sf-dropdown sf-dropdown-inline">
|
||||
@@ -112,6 +109,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td>{% trans "Broken (please contact your administrator to fix this library)" %}</td>
|
||||
<td></td>
|
||||
<% } %>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="group-repo-tmpl">
|
||||
@@ -550,8 +551,8 @@
|
||||
<a class="normal img-name-link" href="<%= url %>" target="_blank"><%- dirent.obj_name %></a>
|
||||
<% } else { %>
|
||||
<a class="normal" href="<%= url %>" target="_blank"><%- dirent.obj_name %></a>
|
||||
<% } %>
|
||||
<br />
|
||||
<% } %>
|
||||
<span class="dirent-meta-info"><%= dirent.file_size %></span>
|
||||
<span class="dirent-meta-info">
|
||||
<% if (dirent.last_modified) { %>
|
||||
|
@@ -81,6 +81,7 @@ define([
|
||||
events: {
|
||||
'click .select': 'select',
|
||||
'click .file-star': 'starFile',
|
||||
'click .dirent-name': 'visitDirent',
|
||||
'click .img-name-link': 'viewImageWithPopup',
|
||||
|
||||
// mv by 'drag & drop'
|
||||
@@ -337,6 +338,13 @@ define([
|
||||
return false;
|
||||
},
|
||||
|
||||
visitDirent: function() {
|
||||
if ($(window).width() < 768 &&
|
||||
!this.model.get('is_img')) { // dir or non image file
|
||||
location.href = this.$('.dirent-name a').attr('href');
|
||||
}
|
||||
},
|
||||
|
||||
viewImageWithPopup: function() {
|
||||
var index = $('.img-name-link', this.dirView.$dirent_list).index(this.$('.img-name-link'));
|
||||
$.magnificPopup.open(this.dirView.magnificPopupOptions, index);
|
||||
|
@@ -24,6 +24,7 @@ define([
|
||||
transferTemplate: _.template($('#repo-transfer-form-tmpl').html()),
|
||||
|
||||
events: {
|
||||
'click td:lt(2)': 'visitRepo',
|
||||
'click .repo-delete-btn': 'del',
|
||||
'click .repo-share-btn': 'share',
|
||||
'click .js-repo-rename': 'rename',
|
||||
@@ -64,6 +65,12 @@ define([
|
||||
return this;
|
||||
},
|
||||
|
||||
visitRepo: function() {
|
||||
if ($(window).width() < 768) {
|
||||
location.href = this.$('.repo-name-span a').attr('href');
|
||||
}
|
||||
},
|
||||
|
||||
del: function() {
|
||||
var _this = this;
|
||||
var repo_name = this.model.get('name');
|
||||
|
Reference in New Issue
Block a user