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

[dir shared items] modification

This commit is contained in:
llj
2015-07-15 14:55:23 +08:00
parent 0b61259b9d
commit eaa93960f0
2 changed files with 11 additions and 2 deletions

View File

@@ -639,7 +639,7 @@
<script type="text/template" id="folder-perm-item-tmpl">
<% if (for_user) { %>
<td>
<a href="{{ SITE_ROOT }}profile/<% print(encodeURIComponent(user)); %>/" target="_blank" title="<%- user %>"><%- user_name %></a>
<a href="{{ SITE_ROOT }}profile/<% print(encodeURIComponent(user)); %>/" target="_blank"><%- user_name %></a>
</td>
<% } else { %>
<td>

View File

@@ -48,6 +48,15 @@ define([
if (!this.is_virtual && this.is_repo_owner) {
this.dirUserSharePanelInit();
this.dirGroupSharePanelInit();
var _this = this;
$(document).on('click', function(e) {
var target = e.target || event.srcElement;
if (!_this.$('.perm-edit-icon, .perm-toggle-select').is(target)) {
_this.$('.perm').removeClass('hide');
_this.$('.perm-toggle-select').addClass('hide');
}
});
}
}
},
@@ -594,7 +603,7 @@ define([
$add_item.after(new_item.el);
});
emails_input.select2("val", "");
if (data.failed) {
if (data.failed.length > 0) {
var err_msg = gettext("Failed to share to {placeholder}")
.replace('{placeholder}', Common.HTMLescape(data.failed.join(', ')));
$('.error', panel).html(err_msg).removeClass('hide');