|
1
|
|
|
/* |
|
2
|
|
|
* Circles - Bring cloud-users closer together. |
|
3
|
|
|
* |
|
4
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
|
5
|
|
|
* later. See the COPYING file. |
|
6
|
|
|
* |
|
7
|
|
|
* @author Maxence Lange <[email protected]> |
|
8
|
|
|
* @copyright 2017 |
|
9
|
|
|
* @license GNU AGPL version 3 or any later version |
|
10
|
|
|
* |
|
11
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
12
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
13
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
14
|
|
|
* License, or (at your option) any later version. |
|
15
|
|
|
* |
|
16
|
|
|
* This program is distributed in the hope that it will be useful, |
|
17
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19
|
|
|
* GNU Affero General Public License for more details. |
|
20
|
|
|
* |
|
21
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
22
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
23
|
|
|
* |
|
24
|
|
|
*/ |
|
25
|
|
|
|
|
26
|
|
|
/** global: OC */ |
|
27
|
|
|
/** global: OCA */ |
|
28
|
|
|
/** global: Notyf */ |
|
29
|
|
|
|
|
30
|
|
|
/** global: curr */ |
|
31
|
|
|
/** global: define */ |
|
32
|
|
|
/** global: elements */ |
|
33
|
|
|
|
|
34
|
|
|
var settings = { |
|
35
|
|
|
|
|
36
|
|
|
displaySettings: function (display) { |
|
37
|
|
|
if (display) { |
|
38
|
|
|
settings.initUISettings(); |
|
39
|
|
|
elements.mainUIMembers.hide(define.animationSpeed); |
|
40
|
|
|
elements.settingsPanel.delay(define.animationSpeed).show(define.animationSpeed); |
|
41
|
|
|
} else { |
|
42
|
|
|
elements.settingsPanel.hide(define.animationSpeed); |
|
43
|
|
|
elements.mainUIMembers.delay(define.animationSpeed).show(define.animationSpeed); |
|
44
|
|
|
} |
|
45
|
|
|
}, |
|
46
|
|
|
|
|
47
|
|
|
initUISettings: function () { |
|
48
|
|
|
elements.settingsName.val(curr.circleName); |
|
49
|
|
|
|
|
50
|
|
|
elements.settingsLink.prop('disabled', true); |
|
51
|
|
|
elements.settingsLinkAuto.prop('disabled', true); |
|
52
|
|
|
elements.settingsLinkFiles.prop('disabled', true); |
|
53
|
|
|
elements.settingsEntryLink.fadeTo(0, 0.3); |
|
54
|
|
|
elements.settingsEntryLinkAuto.fadeTo(0, 0.3); |
|
55
|
|
|
elements.settingsEntryLinkFiles.fadeTo(0, 0.3); |
|
56
|
|
|
|
|
57
|
|
|
if (curr.allowed_federated !== '1') { |
|
58
|
|
|
return; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
elements.settingsLink.prop('disabled', false); |
|
62
|
|
|
// elements.settingsLinkAuto.prop('disabled', true); |
|
63
|
|
|
// elements.settingsLinkFiles.prop('disabled', true); |
|
64
|
|
|
elements.settingsEntryLink.fadeTo(0, 1); |
|
65
|
|
|
// elements.settingsEntryLinkAuto.fadeTo(0, 1).fadeTo(2000, 0.3); |
|
66
|
|
|
// elements.settingsEntryLinkFiles.fadeTo(0, 1).fadeTo(2000, 0.3); |
|
67
|
|
|
|
|
68
|
|
|
}, |
|
69
|
|
|
|
|
70
|
|
|
saveSettingsResult: function (result) { |
|
71
|
|
|
console.log(result); |
|
|
|
|
|
|
72
|
|
|
} |
|
73
|
|
|
}; |
|
74
|
|
|
|
|
75
|
|
|
|
|
76
|
|
|
|
|
77
|
|
|
|