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:
@@ -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));
|
||||
|
||||
|
@@ -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')
|
||||
}),
|
||||
|
@@ -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',
|
||||
|
Reference in New Issue
Block a user