Commit Graph

3823 Commits

Author SHA1 Message Date
Adam Warner
0970406701 Merge pull request #1415 from pi-hole/revert-1300-XhmikosR-patch-7
Revert "header: Move license header at the top"
2020-06-01 18:01:25 +01:00
Adam Warner
ace21fb47c Merge pull request #1413 from pi-hole/XhmikosR-patch-1
network.js: minor consistency changes
2020-06-01 17:51:43 +01:00
XhmikosR
e9fc5a20ca Revert "header: Move license header at the top"
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-31 15:56:10 +03:00
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
Adam Warner
ccbb0d238f Merge pull request #1406 from pi-hole/prop-disabled
Use `prop()` for the `disabled` attribute.
2020-05-30 15:37:46 +01:00
Adam Warner
89ce5d139b Merge pull request #1405 from pi-hole/fix-sidebar
Fix sidebar docs link
2020-05-30 15:36:18 +01:00
Adam Warner
be54d1563d Merge pull request #1402 from pi-hole/XhmikosR-patch-3
Move animate.min.css style in the pages that use it
2020-05-30 15:35:09 +01:00
Adam Warner
0fac8a5a0b Merge pull request #1380 from pi-hole/update-daterangepicker
Update daterangepicker and add minified build
2020-05-30 15:34:35 +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
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
XhmikosR
758bd21870 Merge pull request #1366 from pi-hole/css-cleanup
CSS cleanup
2020-05-30 08:31:34 +03:00
XhmikosR
4e5cc31134 Move animate.min.css style in the pages that use it
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 08:28:45 +03:00
XhmikosR
11f621d574 Make daterangepicker use the same font as everywhere else.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 08:26:44 +03:00
XhmikosR
876e7d8bd9 Use minified daterangepicker builds.
The official distribution doesn't include minified files, so just minify the files ourselves.

It's in maintenance mode anyway.

Commands for future reference:

* cleancss --compatibility ie9 -O1 specialComments:0 -o daterangepicker.min.css daterangepicker.css
* terser daterangepicker.js --compress typeofs=false --mangle --source-map url=daterangepicker.min.js.map -o daterangepicker.min.js

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 08:26:44 +03:00
XhmikosR
6997122519 Update daterangepicker to v3.1.0.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 08:26:17 +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
3e144f4fbc Merge pull request #1401 from pi-hole/XhmikosR-patch-2
Update CI config
2020-05-29 23:45:20 +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
b9c5a8496c Merge pull request #1390 from pi-hole/XhmikosR-patch-10
Remove duplicate token `div`
2020-05-29 22:09:43 +02:00
DL6ER
77532e550a Merge pull request #1388 from pi-hole/no-console
No console
2020-05-29 22:09:14 +02:00
DL6ER
427143381a Merge pull request #1400 from pi-hole/XhmikosR-patch-1
Guard `gethostname()` calls
2020-05-29 22:08:42 +02:00
XhmikosR
d55f0ce8bf Make IE 11 the minimum supported version
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 17:24:28 +03: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
7304acc0b9 Add eslint-plugin-compat
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 16:51:42 +03:00
XhmikosR
37d75b9c46 Update CI config
* only run the workflows for pushes to master and develop branches and for all PRs
* remove moot `strategy` since we use one Node.js version

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 11:24:50 +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
e1e0fc695d Enable ESLint's no-console rule
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 10:39:12 +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
d92c4ef160 index.php: remove duplicate class attribute
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 09:11:59 +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
c108f7eef0 Remove duplicate token div
This is already added in header.php

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 07:54:58 +03:00
XhmikosR
2464ffe71f network.php: move the scripts above footer
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-29 07:43:14 +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