Commit Graph

1357 Commits

Author SHA1 Message Date
XhmikosR ee40ea3d36 Fix sidebar docs link
Also work around us using Font Awesome 5.x with AdminLTE 2.x.

We should fix the FA classes later.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 10:16:09 +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 a284f71bd7 Merge pull request #1389 from pi-hole/js-move
Move JS files where they are used.
2020-05-29 23:39:51 +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
DL6ER 7abeb2b434 Merge pull request #1404 from pi-hole/been-a-while-since-we-touched-this
remove outdated local help page, link to docs instead
2020-05-29 23:15:58 +02:00
Adam Warner 0d7040921e Merge pull request #1361 from pi-hole:rm-jquery-ui
Remove the unused jQuery UI.
2020-05-29 21:42:16 +01:00
Adam Warner 1390a6dd5a remove outdated local help page, link to docs instead
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-29 21:41:11 +01:00
DL6ER e213dce308 Merge pull request #1394 from pi-hole/ren-fa-folder
Remove version number from the Font Awesome folder.
2020-05-29 22:10:25 +02:00
DL6ER 77532e550a Merge pull request #1388 from pi-hole/no-console
No console
2020-05-29 22:09:14 +02: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 2b93d569dd Move the gethostname() call to a variable.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 09:49:51 +03:00
XhmikosR f1eb744ff5 Guard gethostname() calls
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 09:24:07 +03:00
XhmikosR 95219703a1 Remove the unused jQuery UI.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 08:31:06 +03:00
XhmikosR 469d491260 Move JS files where they are used.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 07:43: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 e762b47eb7 Merge pull request #1383 from pi-hole:libs
Update bootstrap-select and add missing .map files
2020-05-28 21:58:30 +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 2d7f563e45 Add the missing bootstrap-toggle.min.js.map file.
This is to get rid of browser console warnings.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-27 21:49:11 +03:00
XhmikosR f4f5fa19fb Update bootstrap-select to v1.3.17.
Also, add its map file to get rid of console warnings

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-27 21:49:10 +03:00
XhmikosR bf4ba1b5b9 Use $ instead of jQuery.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-27 11:56:02 +03:00
XhmikosR f5d68ffd88 Remove version number from the Font Awesome folder.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-27 09:22:37 +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
Adam Warner c2a634f80f Allow for ; in adlist urls
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-26 20:58:18 +01:00
DL6ER 2fac217943 Re-implement api.php?list actions for add, sub and get.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-26 18:40:33 +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
DL6ER a4f9068b32 Merge pull request #1368 from pi-hole/sidebar-toggle
Use `fa5` class on the sidebar toggle
2020-05-25 20:36:19 +02:00
DL6ER 68cd72a3c0 Merge pull request #1381 from pi-hole/XhmikosR-patch-2
Update settings.js
2020-05-25 20:31:06 +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
XhmikosR 36eb877a31 Tweak footer.php
* add a new row for the version info
* add links to the current tags
* make the updates URLs go to the latest GitHub release
* color the heart icon red
* remove "Version" from links; the tags are prefixed with "v"

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-25 21:22:18 +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 3bfef7b8a8 Merge pull request #1326 from pi-hole/tweak/notAnError
Remove an error log output that was presumably leftover from debugging
2020-05-25 20:00:40 +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 30776108ee Use fa5 class on the sidebar toggle
This was added in AdminLTE v2.4.13.

Also, remove unneeded related custom CSS while at it.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-24 21:12:15 +03:00
XhmikosR b20b6797c1 HTML hidden attribute does not need a value.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-23 19:03:02 +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