1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-21 12:48:24 +00:00
seahub/static/scripts/sysadmin-app/collection/address-book-groups.js
2018-08-17 14:01:48 +08:00

32 lines
759 B
JavaScript

define([
'underscore',
'backbone',
'common'
], function(_, Backbone, Common) {
'use strict';
var collection = Backbone.Collection.extend({
url: function() {
var url_options;
if (app.pageOptions.org_id) { // org admin
url_options = {
name: 'org-admin-address-book-groups',
org_id: app.pageOptions.org_id
};
} else {
url_options = {
name: 'admin-address-book-groups'
};
}
return Common.getUrl(url_options);
},
parse: function(data) {
return data.data; // return the array
}
});
return collection;
});