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

[address book] modification

This commit is contained in:
llj
2018-04-25 16:19:15 +08:00
parent f1a24470ad
commit 5e5813072c
6 changed files with 36 additions and 30 deletions

View File

@@ -77,7 +77,7 @@ define([
Common.disableButton($submitBtn);
$.ajax({
url: Common.getUrl({
'name':'admin-address-book-group',
'name':'admin-group',
'group_id': model.get('id')
}),
type: 'PUT',
@@ -112,7 +112,16 @@ define([
data['time'] = created_at.format('LLLL');
data['time_from_now'] = Common.getRelativeTimeStr(created_at);
data['quota_shown'] = data['quota'] == -2 ? '--' : Common.quotaSizeFormat(data['quota']);
switch(data['quota']) {
case -2: // no limit
data['quota_shown'] = '--';
break;
case -1: // not set or error
data['quota_shown'] = 0;
break;
default:
data['quota_shown'] = Common.quotaSizeFormat(data['quota']);
}
this.$el.html(this.template(data));

View File

@@ -26,13 +26,13 @@ define([
del: function() {
var _this = this;
var repo_name = this.model.get('repo_name');
var repo_name = this.model.get('repo_name') || this.model.get('name');
var popupTitle = gettext("Delete Library");
var popupContent = gettext("Are you sure you want to delete %s ?").replace('%s', '<span class="op-target ellipsis ellipsis-op-target" title="' + Common.HTMLescape(repo_name) + '">' + Common.HTMLescape(repo_name) + '</span>');
var yesCallback = function() {
$.ajax({
url: Common.getUrl({
'name': 'group_owned_library',
'name': 'admin-group-owned-library',
'group_id': _this.group_id,
'repo_id': _this.model.get('repo_id')
}),

View File

@@ -245,7 +245,7 @@ define([
$.ajax({
url: Common.getUrl({
'name': 'group_owned_libraries',
'name': 'admin-group-owned-libraries',
'group_id': _this.options.group_id
}),
type: 'POST',