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

Make table sort operations focusable (#1128)

This commit is contained in:
Daniel Pan
2016-04-19 14:41:17 +08:00
parent a6ff7e1a69
commit 8bb44749eb
7 changed files with 27 additions and 6 deletions

View File

@@ -183,6 +183,17 @@ a:focus {
a.black {
color:#322;
}
a.table-sort-op {
color:inherit;
font-weight:normal;
display:block;
}
a.table-sort-op:hover,
a.table-sort-op:focus {
outline:none;
font-weight:bold;
text-decoration:none;
}
img { border:none; }
textarea {
overflow: auto; /* rm default vertical scrollbar in ie */

View File

@@ -175,10 +175,10 @@
</th>
<th class="star"></th>
<th class="dirent-icon"></th>
<th class="by-name cspt"><span class="dirent-name">{% trans "Name"%} <span class="sort-icon icon-caret-up"></span></span></th>
<th><a class="table-sort-op by-name" href="#"><span class="dirent-name">{% trans "Name"%} <span class="sort-icon icon-caret-up"></span></span></a></th>
<th class="dirent-op"><span class="sr-only">{% trans "Actions" %}</span></th>
<th class="dirent-size">{% trans "Size"%}</th>
<th class="dirent-update by-time cspt">{% trans "Last Update" %} <span class="sort-icon icon-caret-down hide" aria-hidden="true"></span></th>
<th class="dirent-update"><a class="table-sort-op by-time" href="#">{% trans "Last Update" %} <span class="sort-icon icon-caret-down hide" aria-hidden="true"></span></a></th>
</tr>
</script>
@@ -849,19 +849,19 @@
<script type="text/template" id="my-repos-hd-tmpl">
<tr>
<th width="4%"><span class="sr-only">{% trans "Library Type" %}</span><!--icon--></th>
<th width="42%" class="by-name cspt">{% trans "Name" %} <span class="sort-icon icon-caret-down hide"></span></th>
<th width="42%"><a class="table-sort-op by-name" href="#">{% trans "Name" %} <span class="sort-icon icon-caret-down hide"></span></a></th>
<th width="14%"><span class="sr-only">{% trans "Actions" %}</span></th>
<th width="20%">{% trans "Size" %}</th>
<th width="20%" class="by-time cspt">{% trans "Last Update" %} <span class="sort-icon icon-caret-up"></span></th>
<th width="20%"><a class="table-sort-op by-time" href="#">{% trans "Last Update" %} <span class="sort-icon icon-caret-up"></span></a></th>
</tr>
</script>
<script type="text/template" id="shared-repos-hd-tmpl">
<tr>
<th width="4%"><span class="sr-only">{% trans "Library Type" %}</span><!--icon--></th>
<th width="40%" class="by-name cspt">{% trans "Name" %} <span class="sort-icon icon-caret-down hide"></span></th>
<th width="40%"><a class="table-sort-op by-name" href="#">{% trans "Name" %} <span class="sort-icon icon-caret-down hide"></span></a></th>
<th width="8%"><span class="sr-only">{% trans "Actions" %}</span><!--op--></th>
<th width="14%">{% trans "Size" %}</th>
<th width="18%" class="by-time cspt">{% trans "Last Update" %} <span class="sort-icon icon-caret-up"></span></th>
<th width="18%"><a class="table-sort-op by-time" href="#">{% trans "Last Update" %} <span class="sort-icon icon-caret-up"></span></a></th>
<th width="16%">{% trans "Shared By" %}</th>
</tr>
</script>

View File

@@ -645,6 +645,7 @@ define([
this.$dirent_list_body.empty();
this.render_dirents_slice(0, this.dir.limit);
this.dir.comparator = null;
return false;
},
sortByTime: function () {
@@ -663,6 +664,7 @@ define([
this.$dirent_list_body.empty();
this.render_dirents_slice(0, this.dir.limit);
this.dir.comparator = null;
return false;
},
sortDirents: function(sort_mode) {

View File

@@ -184,6 +184,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
},
sortByTime: function() {
@@ -202,6 +203,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
},
toggleSettingsPanel: function() {

View File

@@ -130,6 +130,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
},
sortByTime: function() {
@@ -148,6 +149,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
}
});

View File

@@ -118,6 +118,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
},
sortByTime: function() {
@@ -136,6 +137,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
}
});

View File

@@ -139,6 +139,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
},
sortByTime: function() {
@@ -157,6 +158,7 @@ define([
repos.each(this.addOne, this);
el.toggleClass('icon-caret-up icon-caret-down').show();
repos.comparator = null;
return false;
}
});