Completed
Push — master ( d5da72...6387aa )
by Maxence
01:37
created

files_elements.updateSettings   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
/*
2
 * Files_FullTextSearch - Index the content of your files
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 2018
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: OCA */
27
/** global: fts_admin_settings */
28
/** global: files_settings */
29
30
31
32
var files_elements = {
33
	files_div: null,
34
	files_local: null,
35
	files_external: null,
36
	files_encrypted: null,
37
	files_federated: null,
38
	files_size: null,
39
	files_office: null,
40
	files_pdf: null,
41
	files_image: null,
42
	files_audio: null,
43
44
	init: function () {
45
		files_elements.files_div = $('#files');
46
		files_elements.files_local = $('#files_local');
47
		files_elements.files_external = $('#files_external');
48
		files_elements.files_encrypted = $('#files_encrypted');
49
		files_elements.files_federated = $('#files_federated');
50
		files_elements.files_size = $('#files_size');
51
		files_elements.files_office = $('#files_office');
52
		files_elements.files_pdf = $('#files_pdf');
53
		files_elements.files_image = $('#files_image');
54
		files_elements.files_audio = $('#files_audio');
55
56
		files_elements.files_local.on('change', files_elements.updateSettings);
57
		files_elements.files_external.on('change', files_elements.updateSettings);
58
		files_elements.files_encrypted.on('change', files_elements.updateSettings);
59
		files_elements.files_federated.on('change', files_elements.updateSettings);
60
		files_elements.files_size.on('change', files_elements.updateSettings);
61
		files_elements.files_office.on('change', files_elements.updateSettings);
62
		files_elements.files_pdf.on('change', files_elements.updateSettings);
63
		files_elements.files_image.on('change', files_elements.updateSettings);
64
		files_elements.files_audio.on('change', files_elements.updateSettings);
65
	},
66
67
68
	updateSettings: function () {
69
		fts_admin_settings.tagSettingsAsNotSaved($(this));
70
		files_settings.saveSettings();
71
	}
72
73
74
};
75
76
77