1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-01 23:38:37 +00:00

Merge pull request #1160 from haiwen/accessibility

[accessibility] modified 'file view', 'file edit', 'shared link'
This commit is contained in:
Daniel Pan 2016-04-26 18:33:37 +08:00
commit 9321156ac3
4 changed files with 21 additions and 24 deletions

View File

@ -2382,7 +2382,6 @@ button.dropdown-toggle:focus {
text-align:right;
}
#file-enc {
border:1px solid #ddd;
padding:0;
}
#file-view-tip {

View File

@ -127,8 +127,8 @@
{% if not err and repo.encrypted %}
<form id="repo-decrypt-form" class="hide" action="" method="post">
<h3>{% trans 'Library' %} <span class="op-target">{{repo.name}}</span> {% trans 'is encrypted' %}</h3>
<label>{% trans 'Password' %}</label><br />
<input type="password" name="password" class="input" />
<label for="passwd">{% trans 'Password' %}</label><br />
<input type="password" name="password" class="input" id="passwd" />
<p class="tip">{% trans "The password will be kept in the server for only 1 hour." %}</p>
<p class="error hide"></p>
<input type="submit" class="submit" value="{% trans 'Submit' %}" />

View File

@ -11,9 +11,14 @@
{% block main_panel %}
<div id="view-hd">
<h2>{{ filename }}
<a id="file-star" class="no-deco {% if is_starred %}icon-star{% else %}icon-star-empty{% endif %}" href="#"></a>
{% if is_starred %}
<a id="file-star" class="no-deco icon-star" href="#" title="{% trans "starred" %}" aria-label="{% trans "starred" %}"></a>
{% else %}
<a id="file-star" class="no-deco icon-star-empty" href="#" title="{% trans "unstarred" %}" aria-label="{% trans "unstarred" %}"></a>
{% endif %}
{% 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" %}" />
<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" %}" aria-label="{% trans "locked" %}" />
{% endif %}
</h2>
</div>
@ -100,9 +105,6 @@
<script type="text/javascript" src="{{ MEDIA_URL }}js/findAndReplaceDOMText.js"></script>
{% endif %}
<script type="text/javascript">
// rm 'header', so request for unread notices' num won't be sent
$('#header').remove();
// download
$(function() {
var dld_url = $('#download').attr('href');
@ -239,7 +241,5 @@ $(window).load(function() {
}
});
{% endif %}
$('#main-panel').css('margin-bottom',0);
</script>
{% endblock %}

View File

@ -24,17 +24,17 @@
</p>
<div class="fright">
<a href="?p={{ path|urlencode }}&mode=list" title="{% trans "List" %}" class="mode-link vam{% if mode == 'list' %} cur-mode-link{% endif %} list-mode-link">
<a href="?p={{ path|urlencode }}&mode=list" title="{% trans "List" %}" aria-label="{% trans "List" %}" class="mode-link vam{% if mode == 'list' %} cur-mode-link{% endif %} list-mode-link">
{% if mode == 'list' %}
<img src="{{ MEDIA_URL }}img/list-white.png" alt="" width="20" />
<img src="{{ MEDIA_URL }}img/list-white.png" alt="{% trans "List" %}" width="20" />
{% else %}
<img src="{{ MEDIA_URL }}img/list.png" alt="" width="20" />
<img src="{{ MEDIA_URL }}img/list.png" alt="{% trans "List" %}" width="20" />
{% endif %}
</a><a href="?p={{ path|urlencode }}&mode=grid" title="{% trans "Grid" %}" class="mode-link vam{% if mode == 'grid' %} cur-mode-link{% endif %}">
</a><a href="?p={{ path|urlencode }}&mode=grid" title="{% trans "Grid" %}" aria-label="{% trans "Grid" %}" class="mode-link vam{% if mode == 'grid' %} cur-mode-link{% endif %}">
{% if mode == 'grid' %}
<img src="{{ MEDIA_URL }}img/grid-white.png" alt="" width="20" />
<img src="{{ MEDIA_URL }}img/grid-white.png" alt="{% trans "Grid" %}" width="20" />
{% else %}
<img src="{{ MEDIA_URL }}img/grid.png" alt="" width="20" />
<img src="{{ MEDIA_URL }}img/grid.png" alt="{% trans "Grid" %}" width="20" />
{% endif %}
</a>
{% if not traffic_over_limit %}
@ -65,8 +65,8 @@
<td>{{ dirent.last_modified|translate_seahub_time }}</td>
<td>
{% if not traffic_over_limit %}
<a class="op-icon vh" href="{% url "view_shared_dir" token %}?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&dl=1" title="{% trans 'Download' %}">
<img src="{{MEDIA_URL}}img/download.png" alt="" />
<a class="op-icon vh" href="{% url "view_shared_dir" token %}?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&dl=1" title="{% trans 'Download' %}" aria-label="{% trans 'Download' %}">
<img src="{{MEDIA_URL}}img/download.png" alt="{% trans 'Download' %}" />
</a>
{% endif %}
</td>
@ -97,8 +97,8 @@
<td>{{ dirent.last_modified|translate_seahub_time }}</td>
<td>
{% if not traffic_over_limit %}
<a class="op-icon vh" href="{% url "view_file_via_shared_dir" token %}?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&dl=1" title="{% trans "Download"%}">
<img src="{{MEDIA_URL}}img/download.png" alt="" />
<a class="op-icon vh" href="{% url "view_file_via_shared_dir" token %}?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&dl=1" title="{% trans "Download"%}" aria-label="{% trans "Download"%}">
<img src="{{MEDIA_URL}}img/download.png" alt="{% trans "Download"%}" />
</a>
{% endif %}
</td>
@ -225,13 +225,11 @@ $(function() {
$('.grid-item').hover(
function () {
$('.img-link', $(this)).addClass('hl');
$('.text-link', $(this)).addClass('hl');
$('.img-link, .text-link', $(this)).addClass('hl');
$('.op-icon', $(this)).removeClass('vh');
},
function () {
$('.img-link', $(this)).removeClass('hl');
$('.text-link', $(this)).removeClass('hl');
$('.img-link, .text-link', $(this)).removeClass('hl');
$('.op-icon', $(this)).addClass('vh');
}
);