XhmikosR
ff16f4889b
network.js: minor consistency changes
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-30 18:20:18 +03:00
Adam Warner
105d880473
final null check on stateLoadCallBack ( #1411 )
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-30 17:52:34 +03:00
Adam Warner
3e36980e7c
Merge pull request #1408 from pi-hole/js-doc-ready
...
Use `$(fn)`
2020-05-30 15:41:32 +01:00
Adam Warner
bba9f22090
Merge pull request #1407 from pi-hole/js-removeAttr
...
gravity.js: replace `removeAttr()` with `prop()`
2020-05-30 15:38:02 +01:00
XhmikosR
cecb5aa88c
Use $(fn)
...
This is the recommended way in jQuery 3.x.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-30 10:24:55 +03:00
XhmikosR
d3da7b4339
gravity.js: replace removeAttr() with prop()
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-30 10:23:12 +03:00
XhmikosR
af47854a2d
Use prop() for the disabled attribute.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-30 10:22:35 +03:00
Adam Warner
05c11db514
Merge pull request #1403 from pi-hole/eslint-plugin-compat
...
Add `eslint-plugin-compat`
2020-05-29 23:47:45 +01:00
Adam Warner
7700d9b44a
Merge pull request #1387 from pi-hole/new/api_add_sub_get_lists
...
(Re-)Add API endpoints for list manipulations
2020-05-29 23:30:40 +01:00
Adam Warner
dd678da9c6
Merge pull request #1376 from pi-hole:deduplicate-js
...
Deduplicate js
2020-05-29 23:09:59 +01:00
XhmikosR
e7eb4bef9d
Ignore the EventSource() errors
...
We have code checking for the presence of this, so it's OK to ignore these errors.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 17:24:28 +03:00
XhmikosR
7caabf7d2a
index.js: assorted simplifications
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
* rename `colors` variable to avoid shadowing and be more clear
* remove function used only once
* simplify a couple of for loops
2020-05-29 11:11:34 +03:00
XhmikosR
61c29cafc4
Move padNumber() to utils.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 11:11:34 +03:00
XhmikosR
7f71f1d5fe
Move objectToArray() to utils.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 11:11:32 +03:00
XhmikosR
f04647fc9e
Ignore the remaining console errors for now.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 10:42:21 +03:00
XhmikosR
7e2b48adcc
Remove unneeded console.log
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 10:39:13 +03:00
XhmikosR
eab6485edb
Move escapeHtml to utils.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 07:41:05 +03:00
Adam Warner
ac8ece7d05
Merge pull request #1385 from pi-hole:XhmikosR-patch-3
...
Use `$` instead of `jQuery`.
2020-05-28 22:04:39 +01:00
Adam Warner
2cb6a6ede6
Merge pull request #1384 from pi-hole:XhmikosR-patch-2
...
Replace `$.each` with native methods.
2020-05-28 22:03:50 +01:00
Adam Warner
39ac2026b0
Check data for null before trying to manipulate it. Closes #1391
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-28 21:38:14 +01:00
XhmikosR
bf4ba1b5b9
Use $ instead of jQuery.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-27 11:56:02 +03:00
DL6ER
cce92ccde4
Remove obsolete add.php script, use groups.php everywhere instead.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-26 23:07:20 +02:00
XhmikosR
9b3d8b81e7
Replace $.each with native methods.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-26 06:34:27 +03:00
Paul Mannarino
256aff73a6
Replace custom httpGet() with $.ajax()" ( #1371 )
...
Signed-off-by: Paul Mannarino <paul.mannarino@gmail.com >
2020-05-25 21:59:18 +03:00
DL6ER
c86515e028
Merge pull request #1372 from pi-hole/indexOf
...
Always use `!== -1` to check for a string's existence
2020-05-25 20:42:02 +02:00
XhmikosR
792abf8624
Update settings.js
...
* cache variable
* camelcase variable name
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-25 21:27:36 +03:00
DL6ER
b6d1392948
Merge pull request #1351 from pi-hole/redundant-var
...
Remove redundant variable
2020-05-25 20:17:49 +02:00
DL6ER
fc78d470a8
Merge pull request #1358 from pi-hole/XhmikosR-patch-2
...
db_graph.js: move variable where it's used
2020-05-25 20:14:08 +02:00
DL6ER
b6ad648842
Merge pull request #1329 from pi-hole/new/somepeoplelikecurves
...
Add checkbox (save state in localstorage) to toggle between bar and smooth
2020-05-25 20:08:42 +02:00
DL6ER
184c8e47e1
Merge pull request #1332 from pi-hole/tweak/dhcp_save_state
...
Remember last used sort column/direction on DHCP lease tables
2020-05-25 20:05:45 +02:00
DL6ER
61a3ec1b2b
Merge pull request #1298 from pi-hole/XhmikosR-patch-5
...
Enable `no-zero-fractions` rule
2020-05-25 19:48:01 +02:00
XhmikosR
c7e3be4b07
footer.js: remove duplicate function.
...
There's already a function checking for cookies in the previous document.ready function.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-25 09:41:21 +03:00
XhmikosR
4356bd5f04
Always use !== -1 to check for a string's existence
...
`String.indexOf()` returns -1 if the string isn't found so this is consistent with the rest of the codebase.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-25 09:38:47 +03:00
XhmikosR
138e4b6e1a
db_graph.js: move variable where it's used
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 13:14:47 +03:00
XhmikosR
e70e108cce
Use .hidden/.show for showing/hiding the reset buttons
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 13:04:13 +03:00
XhmikosR
9c5fb734c4
Remove redundant variable.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 11:27:59 +03:00
Adam Warner
3957e9eef1
Move some duplicated code to utils.js
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-23 11:04:30 +03:00
Adam Warner
eb05394b66
Add saveState/loadState callbacks
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-23 10:53:34 +03:00
Adam Warner
6b1340cfdf
Add staveSave property bool to DHCP tables to remember last used sort direction/column
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-23 10:53:32 +03:00
XhmikosR
4247c973c9
Rename function.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 10:29:50 +03:00
XhmikosR
444e97b2b9
Rename groups-common.js to utils.js.
...
It's not used only in group pages, and we should try to move more common stuff here later.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 10:29:48 +03:00
XhmikosR
0fa7de82b0
JS: Enforce camelcase.
...
It's a common convention to use camelcase for variable names.
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 10:29:44 +03:00
Adam Warner
8729995ed1
Merge pull request #1342 from pi-hole/XhmikosR-patch-2
...
Update settings.js
2020-05-23 08:14:51 +01:00
Adam Warner
685f262b91
Merge pull request #1341 from pi-hole/rm-glyphicons
...
Remove glyphicons again.
2020-05-23 08:12:22 +01:00
Adam Warner
2de1c94a5f
Merge pull request #1333 from pi-hole/auditlog-row-fix
...
auditlog: fix buttons grouping
2020-05-23 08:03:58 +01:00
XhmikosR
617447e534
Update settings.js
...
* fix "Pi-hole" case
* remove moot modal class
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-21 15:39:15 +03:00
XhmikosR
f158e25d2e
Remove glyphicons again.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-21 09:55:36 +03:00
Adam Warner
7b2d396295
require auth for the customDNS page
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-20 08:26:21 +01:00
XhmikosR
3202c10c2c
auditlog: fix buttons grouping
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-19 10:23:43 +03:00
Adam Warner
c4091a7b3b
Add checkbox (save state in localstorage) to toggle between bar and smooth charts
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-18 20:56:21 +01:00