Completed
Push — master ( 199950...76b7f4 )
by Maxence
03:21
created

js/admin.elements.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 19
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
dl 0
loc 19
rs 10
cc 0
nc 1
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A bookmarks_elements.init 0 6 1
A bookmarks_elements.updateSettings 0 4 1
1
/*
2
 * Bookmarks_FullTextSearch - Indexing bookmarks
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: bookmarks_settings */
29
30
31
32
var bookmarks_elements = {
33
	bookmarks_div: null,
34
	bookmarks_local: null,
35
36
	init: function () {
37
		bookmarks_elements.bookmarks_div = $('#bookmarks');
38
		bookmarks_elements.bookmarks_ttl = $('#bookmarks_ttl');
39
40
		bookmarks_elements.bookmarks_ttl.on('change', bookmarks_elements.updateSettings);
41
	},
42
43
44
	updateSettings: function () {
45
		fts_admin_settings.tagSettingsAsNotSaved($(this));
46
		bookmarks_settings.saveSettings();
47
	}
48
49
50
};
51
52
53