blob: 371cc96df5eed3f5f34e4c02d5f0ad72cf803fd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
(function() {
if (!OC.Share) {
OC.Share = {};
OC.Share.Types = {};
}
var ShareConfigModel = OC.Backbone.Model.extend({
defaults: {
publicUploadEnabled: false
},
/**
* @returns {boolean}
*/
isPublicUploadEnabled: function() {
var publicUploadEnabled = $('#filestable').data('allow-public-upload');
return !_.isUndefined(publicUploadEnabled);
},
/**
* @returns {boolean}
*/
isMailPublicNotificationEnabled: function() {
return $('input:hidden[name=mailPublicNotificationEnabled]').val() === 'yes';
},
/**
* @returns {boolean}
*/
isDefaultExpireDateEnforced: function() {
return oc_appconfig.core.defaultExpireDateEnforced === true;
},
/**
* @returns {number}
*/
getDefaultExpireDate: function () {
return oc_appconfig.core.defaultExpireDate;
}
});
OC.Share.ShareConfigModel = ShareConfigModel;
})();
|