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

accessibility improvement; bugfix & clean up

This commit is contained in:
llj 2016-04-29 16:47:04 +08:00
parent ef980da1ec
commit f466979760
18 changed files with 96 additions and 109 deletions

View File

@ -255,7 +255,8 @@ textarea:focus {
border-color: #66afe9; border-color: #66afe9;
outline: none; outline: none;
} }
input[type="checkbox"]:focus { input[type="checkbox"]:focus,
input[type="radio"]:focus {
outline:#66afe9 auto 1px; outline:#66afe9 auto 1px;
} }
input::-webkit-outer-spin-button, input::-webkit-outer-spin-button,
@ -348,6 +349,7 @@ p { margin:0.5em 0; }
.fright { float:right } .fright { float:right }
.clear { clear:both; } .clear { clear:both; }
.show { display:block } .show { display:block }
.inline-block { display: inline-block; }
.hide { display:none } .hide { display:none }
.error { color:red; } .error { color:red; }
.errorlist { color: red; } .errorlist { color: red; }
@ -363,7 +365,6 @@ p { margin:0.5em 0; }
.label { color:#333; font-size:12px; font-style:normal; } .label { color:#333; font-size:12px; font-style:normal; }
.italic { font-style:italic; } .italic { font-style:italic; }
.alc { text-align: center;} .alc { text-align: center;}
.inline-block { display: inline-block; }
.cspt { cursor:pointer; } .cspt { cursor:pointer; }
.pos-rel { position:relative; } .pos-rel { position:relative; }
.top-tip { .top-tip {
@ -440,12 +441,6 @@ p { margin:0.5em 0; }
display:block; display:block;
margin:1em auto; margin:1em auto;
} }
.icon-plus, .icon-minus, .icon-pencil {
font-size:16px;
line-height:1;
color:#444;
margin-left:3px;
}
.op, .op,
.more { .more {
font-weight:normal; font-weight:normal;
@ -1062,9 +1057,11 @@ textarea:-moz-placeholder {/* for FF */
#simplemodal-container label { #simplemodal-container label {
margin:8px 0 4px; margin:8px 0 4px;
} }
#simplemodal-container .radio-item,
#simplemodal-container .checkbox-option { #simplemodal-container .checkbox-option {
font-weight:normal; font-weight:normal;
} }
#simplemodal-container .radio-item,
#simplemodal-container .checkbox-label { #simplemodal-container .checkbox-label {
margin:4px 0; margin:4px 0;
} }
@ -1307,12 +1304,12 @@ button.dropdown-toggle:focus {
width:350px; width:350px;
padding:3px 5px; padding:3px 5px;
} }
.msg-form .submit { .msg-submit {
color:#fff; color:#fff;
background:#4abb49; background:#4abb49;
border:1px solid #5cb25b; border:1px solid #5cb25b;
} }
.msg-form .submit:hover { .msg-submit:hover {
background:#55ab22; background:#55ab22;
} }
.no-discussion-tip { .no-discussion-tip {
@ -1387,7 +1384,7 @@ button.dropdown-toggle:focus {
#organization-repos .hd { #organization-repos .hd {
position:relative; position:relative;
} }
#group-top .op-icon { .group-top-op-icon {
display:inline-block; display:inline-block;
font-size:22px; font-size:22px;
margin:4px 15px 0 0; margin:4px 15px 0 0;
@ -1433,7 +1430,7 @@ button.dropdown-toggle:focus {
text-decoration:none; text-decoration:none;
border-bottom-color: #eb8205; border-bottom-color: #eb8205;
} }
#right-panel .hd button, .btn-white,
.tabnav button, .tabnav button,
.repo-file-list-topbar .op-btn, .repo-file-list-topbar .op-btn,
.wiki-top .op-btn { .wiki-top .op-btn {
@ -1857,13 +1854,9 @@ button.dropdown-toggle:focus {
.repo-op .op-btn { .repo-op .op-btn {
vertical-align:middle; vertical-align:middle;
} }
#featured-filetype { .set-file-type {
margin:5px 0;
}
#featured-filetype button {
padding: 2px; padding: 2px;
line-height: 1.2; line-height: 1.2;
border: 1px solid #bbb;
margin: 2px 0 5px; margin: 2px 0 5px;
} }
.file-audit-list-topbar .path, .file-audit-list-topbar .path,
@ -2813,24 +2806,11 @@ button.dropdown-toggle:focus {
#search-user-form .submit { #search-user-form .submit {
margin-left:3.5em; margin-left:3.5em;
} }
#myhome-enable-mods, .enable-mods-icon {
#enable-mods {
margin:3px 0 0; margin:3px 0 0;
color:#ccc; color:#ccc;
font-size:18px; font-size:18px;
} }
#edit-index {
color:#d7d7d7;
margin-top:3px;
}
#edit-index:hover {
color:#666;
cursor:pointer;
}
#add-msg .icon-pencil {
font-size:1em;
margin:0 3px 0 0;
}
.help-con { .help-con {
padding:0 0 0 30px; padding:0 0 0 30px;
} }
@ -2848,23 +2828,28 @@ button.dropdown-toggle:focus {
.wiki-index h3 { .wiki-index h3 {
color:#333; color:#333;
} }
.wiki-index-edit-icon {
font-size:16px;
color:#d7d7d7;
margin:3px 0 0;
}
#wiki-index-con { #wiki-index-con {
padding-left:12px; padding-left:12px;
} }
.grp-wiki-index #wiki-index-con { .grp-wiki-index #wiki-index-con {
padding:0; padding:0;
} }
.wiki-index ul { #wiki-index-con ul {
list-style-type: square; list-style-type: square;
padding-left: 1.5em; padding-left: 1.5em;
margin-bottom:5px; margin-bottom:5px;
color:#8c8c8c; color:#8c8c8c;
} }
.wiki-index a { #wiki-index-con a {
font-weight:normal; font-weight:normal;
color:#8c8c8c; color:#8c8c8c;
} }
.wiki-index a:hover { #wiki-index-con a:hover {
color:#f93; color:#f93;
text-decoration:underline; text-decoration:underline;
} }

View File

@ -4,18 +4,10 @@
{% block sub_title %}{{group.group_name}} - {% endblock %} {% block sub_title %}{{group.group_name}} - {% endblock %}
{% block cur_group %}cur{% endblock %}
{% block left_panel %} {% block left_panel %}
<div class="side-tabnav"> <div class="side-tabnav">
<div class="hd w100 ovhd"> <h3 class="hd">
<h3 class="fleft"> {% grp_avatar group.props.id 32 %} <a title="{{ group.group_name }}" class="grp-name ellipsis vam" href="{% url 'group_info' group.id %}">{{ group.group_name }}</a>
{% grp_avatar group.props.id 32 %} <a title="{{ group.group_name }}" class="grp-name ellipsis vam" href="{% url 'group_info' group.id %}">{{ group.group_name }}</a> </h3>
</h3>
</div>
</div> </div>
{% endblock %} {% endblock %}
{% block main_panel %}
{% endblock %}

View File

@ -19,7 +19,7 @@
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "Wiki Index" %}</h3> <h3 class="fleft">{% trans "Wiki Index" %}</h3>
{% if repo_perm == 'rw' %} {% if repo_perm == 'rw' %}
<span id="edit-index" class="icon-pencil fright" title="{% trans "Edit" %}"></span> <a id="edit-index" class="wiki-index-edit-icon op-icon icon-pencil fright" title="{% trans "Edit" %}" aria -label="{% trans "Edit" %}" href="#"></a>
{% endif %} {% endif %}
</div> </div>
<div id="wiki-index-con"></div> <div id="wiki-index-con"></div>
@ -227,11 +227,9 @@ $('#wiki-use-lib-form').submit(function() {
{% if wiki_index_exists %} {% if wiki_index_exists %}
$('#wiki-index-con').html(marked('{{ index_content|escapejs }}')); $('#wiki-index-con').html(marked('{{ index_content|escapejs }}'));
{% if repo_perm == 'rw' %} {% if repo_perm == 'rw' %}
$('#edit-index').click(function() {
{% with page_name='index' %} {% with page_name='index' %}
location.href = "{% url 'group_wiki_page_edit' group.id page_name %}"; $('#edit-index').attr('href', "{% url 'group_wiki_page_edit' group.id page_name %}");
{% endwith %} {% endwith %}
});
{% endif %} {% endif %}
{% else %} {% else %}
{% if repo_perm == 'rw' %} {% if repo_perm == 'rw' %}

View File

@ -6,7 +6,7 @@
{% block right_panel %} {% block right_panel %}
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "All Notifications" %}</h3> <h3 class="fleft">{% trans "All Notifications" %}</h3>
<button id="add-n" class="fright">{% trans "Add new notification" %}</button> <button id="add-n" class="fright btn-white">{% trans "Add new notification" %}</button>
</div> </div>
<form action="{% url 'notification_add' %}" method="post" class="hide" id="add-n-form">{% csrf_token %} <form action="{% url 'notification_add' %}" method="post" class="hide" id="add-n-form">{% csrf_token %}
<h3>{% trans "Add new notification" %}</h3> <h3>{% trans "Add new notification" %}</h3>

View File

@ -37,7 +37,7 @@
<div class="hd w100 ovhd"> <div class="hd w100 ovhd">
<h3 class="fleft">{% trans "Tools" %}</h3> <h3 class="fleft">{% trans "Tools" %}</h3>
{% if user.permissions.can_add_repo %} {% 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 enable-mods-icon fright" title="{% trans "Enable Modules" %}" aria-label="{% trans "Enable Modules" %}"></a>
{% endif %} {% endif %}
</div> </div>
<ul class="side-tabnav-tabs"> <ul class="side-tabnav-tabs">

View File

@ -115,7 +115,7 @@
</script> </script>
<script type="text/template" id="admin-devices-tmpl"> <script type="text/template" id="admin-devices-tmpl">
<div class="hd"> <div class="hd ovhd">
<ul class="tab-tabs-nav fleft"> <ul class="tab-tabs-nav fleft">
<li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>"> <li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>">
<a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a> <a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a>
@ -168,7 +168,7 @@
</script> </script>
<script type="text/template" id="admin-device-errors-tmpl"> <script type="text/template" id="admin-device-errors-tmpl">
<div class="hd"> <div class="hd ovhd">
<ul class="tab-tabs-nav fleft"> <ul class="tab-tabs-nav fleft">
<li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>"> <li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>">
<a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a> <a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a>

View File

@ -70,7 +70,7 @@
<td><a href="#group/<%= group_id %>/lib/<%= id %>"><%- name %></a></td> <td><a href="#group/<%= group_id %>/lib/<%= id %>"><%- name %></a></td>
<td class="alc"> <td class="alc">
<% if (is_staff || share_from_me) { %> <% if (is_staff || share_from_me) { %>
<a href="#" class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}"></a> <a href="#" class="sf2-icon-delete sf2-x cancel-share op-icon vh" title="{% trans "Unshare" %}" aria-label="{% trans "Unshare" %}"></a>
<% } %> <% } %>
</td> </td>
<td><%= size_formatted %></td> <td><%= size_formatted %></td>
@ -101,6 +101,15 @@
<button id="del-dirents" title="{% trans 'Delete' %}" class="op-btn sf2-icon-delete op-icon"></button> <button id="del-dirents" title="{% trans 'Delete' %}" class="op-btn sf2-icon-delete op-icon"></button>
<button id="download-dirents" title="{% trans 'Download' %}" class="op-btn sf2-icon-download op-icon"></button> <button id="download-dirents" title="{% trans 'Download' %}" class="op-btn sf2-icon-download op-icon"></button>
</div> </div>
<% } %>
<% if (!encrypted && user_perm == 'r') { %>
<div id="multi-dirents-op" class="hide">
<button id="cp-dirents" title="{% trans 'Copy' %}" class="op-btn sf2-icon-copy op-icon"></button>
</div>
<% } %>
<div id="cur-dir-ops" class="inline-block">
<% if (user_perm == 'rw') { %>
<div id="basic-upload" class="inline-block"> <div id="basic-upload" class="inline-block">
<button class="op-btn basic-upload-btn" >{% trans "Upload" %}</button> <button class="op-btn basic-upload-btn" >{% trans "Upload" %}</button>
<input id="basic-upload-input" class="hide" type="file" name="file" multiple /> <input id="basic-upload-input" class="hide" type="file" name="file" multiple />
@ -124,15 +133,10 @@
<button id="add-new-file" class="op-btn">{% trans "New File" %}</button> <button id="add-new-file" class="op-btn">{% trans "New File" %}</button>
<% } %> <% } %>
<% if (!encrypted && user_perm == 'r') { %>
<div id="multi-dirents-op" class="hide">
<button id="cp-dirents" title="{% trans 'Copy' %}" class="op-btn sf2-icon-copy op-icon"></button>
</div>
<% } %>
<% if (!encrypted && can_generate_shared_link) { %> <% if (!encrypted && can_generate_shared_link) { %>
<button class="op-btn" id="share-cur-dir">{% trans "Share" %}</button> <button class="op-btn" id="share-cur-dir">{% trans "Share" %}</button>
<% } %> <% } %>
</div><!-- div#cur-dir-ops ends here -->
<div class="switch-mode vam"> <div class="switch-mode vam">
<button class="list-view-icon-btn sf2-icon-list-view <% if (mode == 'list') { %>active<% } %>" title="{% trans "List" %}" id="js-switch-list-view" aria-label="{% trans "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" aria-label="{% trans "grid view" %}"></button> <button class="list-view-icon-btn sf2-icon-list-view <% if (mode == 'list') { %>active<% } %>" title="{% trans "List" %}" id="js-switch-list-view" aria-label="{% trans "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" aria-label="{% trans "grid view" %}"></button>
@ -409,20 +413,6 @@
</ul> </ul>
</script> </script>
<script type="text/template" id="group-change-item-tmpl">
<td>
<span class="icon-plus"></span>
</td>
<td><a href="#"><%= repo.name %></a></td>
<td>
<%= desc_human %>
<a class="lsch" >{% trans 'Details' %}</a>
</td>
<td><%= ctime_human %></td>
<td>
<%- creator_nickname %>
</td>
</script>
<script type="text/template" id="share-popup-tmpl"> <script type="text/template" id="share-popup-tmpl">
<h3 class="hd"><%= title %></h3> <h3 class="hd"><%= title %></h3>
<div id="share-tabs" class="left-right-tabs ovhd"> <div id="share-tabs" class="left-right-tabs ovhd">
@ -665,7 +655,7 @@
<div class="hd w100 ovhd"> <div class="hd w100 ovhd">
<h3 class="fleft">{% trans "Tools" %}</h3> <h3 class="fleft">{% trans "Tools" %}</h3>
{% if user.permissions.can_add_repo %} {% if user.permissions.can_add_repo %}
<a href="#" id="enable-mods" class="sf2-icon-cog2 op-icon fright" title="{% trans "Enable Modules" %}" aria-label="{% trans "Enable Modules" %}"></a> <a href="#" id="enable-mods" class="sf2-icon-cog2 op-icon enable-mods-icon fright" title="{% trans "Enable Modules" %}" aria-label="{% trans "Enable Modules" %}"></a>
{% endif %} {% endif %}
</div> </div>
<ul class="side-tabnav-tabs"> <ul class="side-tabnav-tabs">
@ -731,16 +721,16 @@
<p class="path"><a href="{% url 'group_list' %}" class="normal">{% trans "Groups" %}</a> / <%- name %></p> <p class="path"><a href="{% url 'group_list' %}" class="normal">{% trans "Groups" %}</a> / <%- name %></p>
<div class="hd ovhd"> <div class="hd ovhd">
{% if user.permissions.can_add_repo %} {% if user.permissions.can_add_repo %}
<button class="repo-create fleft"><span class="icon-plus-square add vam"></span><span class="vam">{% trans "New Library" %}</span></button> <button class="repo-create btn-white fleft"><span class="icon-plus-square add vam"></span><span class="vam">{% trans "New Library" %}</span></button>
{% endif %} {% endif %}
<div class="fright"> <div class="fright">
<% if (wiki_enabled) { %> <% if (wiki_enabled) { %>
<a href="{{SITE_ROOT}}group/<%= id %>/wiki/" class="sf2-icon-wiki2 op-icon" title="{% trans "Wiki" %}" id="group-wiki-icon"></a> <a href="{{SITE_ROOT}}group/<%= id %>/wiki/" class="sf2-icon-wiki2 op-icon group-top-op-icon" title="{% trans "Wiki" %}" id="group-wiki-icon"></a>
<% } %> <% } %>
<a href="#" class="sf2-icon-cog1 op-icon" title="{% trans "Settings" %}" id="group-settings-icon" aria-label="{% trans "Settings" %}"></a> <a href="#" class="sf2-icon-cog1 op-icon group-top-op-icon" title="{% trans "Settings" %}" id="group-settings-icon" aria-label="{% trans "Settings" %}"></a>
<a href="#" class="sf2-icon-user2 op-icon" title="{% trans "Members" %}" id="group-members-icon" aria-label="{% trans "Members" %}"></a> <a href="#" class="sf2-icon-user2 op-icon group-top-op-icon" title="{% trans "Members" %}" id="group-members-icon" aria-label="{% trans "Members" %}"></a>
<a href="#" class="sf2-icon-msgs2 op-icon" title="{% trans "Discussion" %}" id="group-discussions-icon" aria-label="{% trans "Discussion" %}"></a> <a href="#" class="sf2-icon-msgs2 op-icon group-top-op-icon" title="{% trans "Discussion" %}" id="group-discussions-icon" aria-label="{% trans "Discussion" %}"></a>
</div> </div>
</div> </div>
</script> </script>
@ -846,7 +836,7 @@
<td><%- repo_name %></td> <td><%- repo_name %></td>
<td><%= mtime_relative %></td> <td><%= mtime_relative %></td>
<td> <td>
<a href="#" class="sf2-icon-delete unstar op-icon vh" title="{% trans "Unstar" %}"></a> <a href="#" class="sf2-icon-delete unstar op-icon vh" title="{% trans "Unstar" %}" aria-label="{% trans "Unstar" %}"></a>
</td> </td>
</script> </script>
@ -989,14 +979,14 @@
<img src="<%= avatar_url %>" alt="" width="32" class="avatar-circle fleft" /> <img src="<%= avatar_url %>" alt="" width="32" class="avatar-circle fleft" />
<div class="msg-body"> <div class="msg-body">
<div class="ovhd"> <div class="ovhd">
<div class="msg-ops fright vh">
<span class="msg-op sf2-icon-reply op-icon js-reply-msg" title="{% trans "Reply" %}"></span>
<% if (can_delete_msg) { %>
<span class="msg-op sf2-icon-delete op-icon js-del-msg" title="{% trans "Delete" %}"></span>
<% } %>
</div>
<a class="msg-username ellipsis" title="<%- user_name %>" href="<%= user_profile_url %>"><%- user_name %></a> <a class="msg-username ellipsis" title="<%- user_name %>" href="<%= user_profile_url %>"><%- user_name %></a>
<span class="msg-time" title="<%- time %>"><%- time_from_now %></span> <span class="msg-time" title="<%- time %>"><%- time_from_now %></span>
<div class="msg-ops fright vh">
<a class="msg-op sf2-icon-reply op-icon js-reply-msg" title="{% trans "Reply" %}" aria-label="{% trans "Reply" %}" href="#"></a>
<% if (can_delete_msg) { %>
<a class="msg-op sf2-icon-delete op-icon js-del-msg" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}" href="#"></a>
<% } %>
</div>
</div> </div>
<div class="msg-content"><%= content_marked %></div> <div class="msg-content"><%= content_marked %></div>
</div> </div>
@ -1154,16 +1144,25 @@
<p class="history-settings-notice outstanding-tip hide">{% trans "Setting library history is disabled by Admin" %}</p> <p class="history-settings-notice outstanding-tip hide">{% trans "Setting library history is disabled by Admin" %}</p>
<form action="" method="post"> <form action="" method="post">
<label class="radio-item">
<input type="radio" name="history" value="full_history" class="vam" /> <input type="radio" name="history" value="full_history" class="vam" />
<span class="vam">{% trans "Keep full history" %}</span><br /> <span class="vam">{% trans "Keep full history" %}</span>
</label>
<br />
<label class="radio-item">
<input type="radio" name="history" value="no_history" class="vam" /> <input type="radio" name="history" value="no_history" class="vam" />
<span class="vam">{% trans "Don't keep history" %}</span><br /> <span class="vam">{% trans "Don't keep history" %}</span>
</label>
<br />
<label class="radio-item">
<input type="radio" name="history" value="partial_history" class="vam" /> <input type="radio" name="history" value="partial_history" class="vam" />
<span calss="vam">{% trans "Only keep a period of history:" %} <span calss="vam">{% trans "Only keep a period of history:" %}
<input type="text" name="days" size="4" disabled="disabled" class="input-disabled" value="<%= default_history_limit %>" /> {% trans "days" %} <input type="text" name="days" size="4" disabled="disabled" class="input-disabled" value="<%= default_history_limit %>" /> {% trans "days" %}
</span><br /> </span>
</label>
<br />
<input type="submit" value="{% trans "Submit" %}" class="submit" /> <input type="submit" value="{% trans "Submit" %}" class="submit" />
</form> </form>

View File

@ -11,7 +11,7 @@
<script type="text/template" id="my-own-repos-tmpl"> <script type="text/template" id="my-own-repos-tmpl">
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "Mine" %}</h3> <h3 class="fleft">{% trans "Mine" %}</h3>
<button class="repo-create fright"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "New Library" %}</span></button> <button class="repo-create btn-white fright"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "New Library" %}</span></button>
</div> </div>
<table class="my-own-repos-table hide"> <table class="my-own-repos-table hide">
<thead></thead> <thead></thead>
@ -39,11 +39,11 @@
</script> </script>
<script type="text/template" id="organization-repos-tmpl"> <script type="text/template" id="organization-repos-tmpl">
<div class="hd"> <div class="hd">{# no 'ovhd' as there is a .dropdown-menu in it #}
<h3 class="fleft">{% trans "Organization" %}</h3> <h3 class="fleft">{% trans "Organization" %}</h3>
{% if can_add_pub_repo %} {% if can_add_pub_repo %}
<div class="fright dropdown js-add-pub-lib-dropdown"> <div class="fright dropdown js-add-pub-lib-dropdown">
<button class="dropdown-toggle"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "Add Library"%}</span></button> <button class="btn-white dropdown-toggle"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "Add Library"%}</span></button>
<ul class="dropdown-menu hide"> <ul class="dropdown-menu hide">
<li><a class="op share-existing" href="#">{% trans "Share existing libraries" %}</a></li> <li><a class="op share-existing" href="#">{% trans "Share existing libraries" %}</a></li>
<li><a class="op create-new" href="#">{% trans "Create a new library" %}</a></li> <li><a class="op create-new" href="#">{% trans "Create a new library" %}</a></li>
@ -68,7 +68,7 @@
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "My Groups" %}</h3> <h3 class="fleft">{% trans "My Groups" %}</h3>
{% if user.permissions.can_add_group %} {% if user.permissions.can_add_group %}
<button id="add-group" class="fright"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "New Group" %}</span></button> <button id="add-group" class="btn-white fright"><span aria-hidden="true" class="icon-plus-square add vam"></span><span class="vam">{% trans "New Group" %}</span></button>
{% endif %} {% endif %}
</div> </div>
@ -154,7 +154,7 @@
<img src="{% avatar_url request.user 64 %}" alt="" width="32" class="avatar-circle fleft" /> <img src="{% avatar_url request.user 64 %}" alt="" width="32" class="avatar-circle fleft" />
<div class="msg-body"> <div class="msg-body">
<textarea name="message" placeholder="{% trans "Add a discussion..." %}" class="msg-input"></textarea> <textarea name="message" placeholder="{% trans "Add a discussion..." %}" class="msg-input"></textarea>
<button type="submit" class="submit">{% trans "Submit" %}</button> <button type="submit" class="submit msg-submit">{% trans "Submit" %}</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -18,7 +18,7 @@
{% else %} {% else %}
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "Wiki Index" %}</h3> <h3 class="fleft">{% trans "Wiki Index" %}</h3>
<span id="edit-index" class="icon-pencil fright" title="{% trans "Edit" %}"></span> <a id="edit-index" class="wiki-index-edit-icon op-icon icon-pencil fright" title="{% trans "Edit" %}" aria-label="{% trans "Edit" %}" href="#"></a>
</div> </div>
<div id="wiki-index-con"></div> <div id="wiki-index-con"></div>
{% endif %} {% endif %}
@ -220,9 +220,7 @@ $('#wiki-use-lib-form').submit(function() {
{% if wiki_index_exists %} {% if wiki_index_exists %}
$('#wiki-index-con').html(marked('{{ index_content|escapejs }}')); $('#wiki-index-con').html(marked('{{ index_content|escapejs }}'));
{% with page_name='index' %} {% with page_name='index' %}
$('#edit-index').click(function() { $('#edit-index').attr('href', "{% url 'personal_wiki_page_edit' page_name %}");
location.href = "{% url 'personal_wiki_page_edit' page_name %}";
});
{% endwith %} {% endwith %}
{% else %} {% else %}
$('#create-index').click(function() { $('#create-index').click(function() {

View File

@ -65,6 +65,7 @@ define([
_this.$days_input.prop('disabled', false).removeClass('input-disabled'); _this.$days_input.prop('disabled', false).removeClass('input-disabled');
_this.$days_input.attr('value', data.keep_days); _this.$days_input.attr('value', data.keep_days);
} }
_this.$radios.filter(':checked').focus();
if (!app.pageOptions.enable_repo_history_setting) { if (!app.pageOptions.enable_repo_history_setting) {
_this.$('.history-settings-notice').removeClass('hide'); _this.$('.history-settings-notice').removeClass('hide');

View File

@ -546,6 +546,7 @@ define([
focus: false, focus: false,
containerCss: {'padding':'20px 25px'} containerCss: {'padding':'20px 25px'}
}); });
file_name.focus();
$('#simplemodal-container').css({'height':'auto'}); $('#simplemodal-container').css({'height':'auto'});
$('.set-file-type', form).click(function() { $('.set-file-type', form).click(function() {
@ -781,7 +782,7 @@ define([
var $all_dirent_checkbox = this.$('[type=checkbox]'); var $all_dirent_checkbox = this.$('[type=checkbox]');
var $dirents_op = this.$('#multi-dirents-op'); var $dirents_op = this.$('#multi-dirents-op');
var $curDirOps = this.$('#upload-file, #add-new-dir, #add-new-file, #share-cur-dir'); var $curDirOps = this.$('#cur-dir-ops');
if ($el.prop('checked')) { if ($el.prop('checked')) {
$all_dirent_checkbox.prop('checked', true); $all_dirent_checkbox.prop('checked', true);

View File

@ -103,7 +103,7 @@ define([
} }
}); });
var $curDirOps = dirView.$('#upload-file, #add-new-dir, #add-new-file, #share-cur-dir'); var $curDirOps = dirView.$('#cur-dir-ops');
if (checked_num > 0) { if (checked_num > 0) {
$dirents_op.css({'display':'inline-block'}); $dirents_op.css({'display':'inline-block'});
@ -211,6 +211,7 @@ define([
}).append(form); }).append(form);
$op.hide(); $op.hide();
$name.hide(); $name.hide();
$('[name="newname"]', form).focus();
this._hideMenu(); this._hideMenu();
app.ui.freezeItemHightlight = true; app.ui.freezeItemHightlight = true;

View File

@ -17,6 +17,7 @@ define([
events: { events: {
'mouseenter': 'highlight', 'mouseenter': 'highlight',
'mouseleave': 'rmHighlight', 'mouseleave': 'rmHighlight',
'focus *': 'focusItem',
'click .js-del-msg': 'delMessage', 'click .js-del-msg': 'delMessage',
'click .js-reply-msg': 'reply' 'click .js-reply-msg': 'reply'
}, },
@ -67,8 +68,17 @@ define([
this.$('.msg-ops').addClass('vh'); this.$('.msg-ops').addClass('vh');
}, },
focusItem: function() {
$('.msg.hl', this.$el.parent())
.removeClass('hl')
.find('.msg-ops').addClass('vh');
this.highlight();
},
reply: function() { reply: function() {
this.parentView.replyTo(this.model.get("user_name")); this.parentView.replyTo(this.model.get("user_name"));
return false;
}, },
delMessage: function() { delMessage: function() {
@ -86,6 +96,7 @@ define([
Common.feedback(err, 'error'); Common.feedback(err, 'error');
} }
}); });
return false;
} }
}); });

View File

@ -115,7 +115,7 @@ define([
} }
}); });
$("#group").append(this.$el); $("#group-discussions-icon").after(this.$el);
this.$(".msg-input").focus(); this.$(".msg-input").focus();
app.router.navigate('group/' + this.groupView.group.id + '/discussions/'); app.router.navigate('group/' + this.groupView.group.id + '/discussions/');
}, },

View File

@ -77,7 +77,7 @@ define([
_this.$error.html(err_msg).show(); _this.$error.html(err_msg).show();
} }
}); });
$("#group").append(this.$el); $("#group-members-icon").after(this.$el);
} }
}); });

View File

@ -53,7 +53,7 @@ define([
'wiki_enabled': this.groupView.group.wiki_enabled 'wiki_enabled': this.groupView.group.wiki_enabled
})); }));
$("#group").append(this.$el); $("#group-settings-icon").after(this.$el);
}, },
highlightItem: function(e) { highlightItem: function(e) {
@ -99,7 +99,7 @@ define([
var _this = this; var _this = this;
var $form = $(this.renameTemplate()); var $form = $(this.renameTemplate());
$form.modal({focus:false}); $form.modal();
$('#simplemodal-container').css({'width':'auto', 'height':'auto'}); $('#simplemodal-container').css({'width':'auto', 'height':'auto'});
$form.submit(function() { $form.submit(function() {

View File

@ -13,7 +13,7 @@ define([
'use strict'; 'use strict';
var OrganizationView = Backbone.View.extend({ var OrganizationView = Backbone.View.extend({
id: 'organization-repos-tmpl', id: 'organization',
template: _.template($('#organization-repos-tmpl').html()), template: _.template($('#organization-repos-tmpl').html()),
reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()), reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()),

View File

@ -63,9 +63,9 @@ define([
.replace('{lib_name}', '<span class="op-target">' + Common.HTMLescape(this.model.get('name')) + '</span>'); .replace('{lib_name}', '<span class="op-target">' + Common.HTMLescape(this.model.get('name')) + '</span>');
var confirm_popup = $(this.repoDelConfirmTemplate({ var confirm_popup = $(this.repoDelConfirmTemplate({
content: confirm_msg content: confirm_msg
})) }));
.appendTo(op_container) del_icon.after(confirm_popup);
.css({ confirm_popup.css({
'left': del_icon.position().left, 'left': del_icon.position().left,
'top': del_icon.position().top + del_icon.height() + 2, 'top': del_icon.position().top + del_icon.height() + 2,
'width': 180 'width': 180
@ -144,6 +144,7 @@ define([
}).append(form); }).append(form);
$op_td.hide(); $op_td.hide();
$name_span.hide(); $name_span.hide();
$('[name="newname"]', form).focus();
this.togglePopup(); this.togglePopup();
app.ui.freezeItemHightlight = true; app.ui.freezeItemHightlight = true;