DL6ER
c3336f781a
Remove superfluous copy-paste remnants in API /clients call
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-05-03 20:06:41 +02:00
DL6ER
10ca38da47
Use new special POST :batchDelete callbacks for /api/groups, /api/domains/, /api/clients, and /api/lists and remove some code duplication along the way. Also ensure that the "Default" group cannot be selected for deletion (we already suppress the trash button for this entry)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-07 19:00:59 +01:00
DL6ER
a39c8a5c0a
Escape only where we are displaying
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-11-18 22:38:01 +01:00
DL6ER
bc1c6bc117
Explicitly set contentType to avoid promotion to jsonp
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-11-18 12:54:41 +01:00
DL6ER
7c0812b52b
Apply necessary code styling changes
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-11-17 10:36:38 +01:00
DL6ER
9815602ecd
Call initTable() from getGroups() when finished to avoid a possible race-collision
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-11-17 10:33:38 +01:00
RD WebDesign
eeb07535ad
Clear input fields after successfully adding new items
...
Applies to Clients, Domains and Lists.
2023-11-14 19:58:41 -03:00
DL6ER
4d3c0cded9
Fix errors happening when editing groups/clients/domains/lists not being shown. Also fix logic of the strings "enabling/disabling" as the variable "enabled" already has the new (not the current state). This was correct in groups.js, but not the others
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-11-05 21:54:40 +01:00
DL6ER
402017798e
Merge branch 'development-v6' into tweak/domain_array
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-14 16:23:31 +02:00
DL6ER
43c8ede674
Add "processData: false" to all JSON data we send
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-13 09:44:01 +02:00
DL6ER
1146248964
Revert "Fix AJAX JSON data ( #2742 )"
...
This reverts commit 340d373711 , reversing
changes made to 1ed1efdc91 .
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-13 09:41:10 +02:00
DL6ER
d2701f7955
We should not use JSON.stringify() but leave escaping to AJAX itself
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-10 19:28:14 +02:00
DL6ER
d516aec5ce
Give details about sucessfully added and failed items to domains, groups, lists and clients
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-08 10:56:45 +02:00
DL6ER
a6ba2a8eb8
Implement support for adding multiple domains, clients, groups, and list addresses at once
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-07 21:38:10 +02:00
DL6ER
4d3d64b904
Ported groups-domains.lp and groups-adlists.lp
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-05-06 20:07:26 +02:00
DL6ER
f3d7eb296a
Ported groups-clients.lp
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-05-06 07:27:37 +02:00
Christian König
4473955291
Don't use idstring in messages when it's not necessary
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2023-01-20 16:57:34 +01:00
Christian König
acac90f79d
Tweak deleting message
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2023-01-20 16:57:34 +01:00
RD WebDesign
f0bd5d725e
Fixing minor inconsistencies
...
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br >
2022-05-07 15:37:39 -03:00
RD WebDesign
a2cb6821dc
Fixing weird bug
...
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br >
2022-05-07 00:30:07 -03:00
RD WebDesign
9a019a64ee
Applying the reviewer's suggestions
...
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br >
2022-04-30 14:34:22 -03:00
RD WebDesign
f8ab31f431
Allow delete multiple items - Group pages
...
- add checkboxes, buttons and functions to groups page;
- add checkboxes, buttons and functions to clients page;
- add checkboxes, buttons and functions to domains page;
- add checkboxes, buttons and functions to adlists page;
- move function to `utils.js`;
- fix CSS after insert a new table column;
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br >
2022-04-22 22:22:03 -03:00
Christian König
01de8fa3a8
Add navigation above all datatables
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-02-06 21:47:44 +01:00
RD WebDesign
035d8f981d
Fix layout on small screens (Group Mgmt tables) ( #2078 )
...
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br >
2022-01-14 22:41:41 +01:00
Christian König
78aace3403
Revert "Remove duplicated code as it is already part of utils.stateLoadCallback"
...
This reverts commit 395b1b6c1f .
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-11-14 22:38:18 +01:00
yubiuser
5aeb52ee50
Merge pull request #1948 from pi-hole/tweak/datatables
...
Tweak to datatables column rendering
2021-10-28 20:21:01 +02:00
yubiuser
98ec9ee2fc
Set stateDuration to 0 for all saved datatables to store the state indefinitely ( #1944 )
...
* Set stateDuration to 0 for all saved datatables to store the state indefinite
Signed-off-by: Christian König <ckoenig@posteo.de >
* Move stateDuration to utils.js
Signed-off-by: Christian König <ckoenig@posteo.de >
* Remove duplicated code as it is already part of utils.stateLoadCallback
Signed-off-by: Christian König <ckoenig@posteo.de >
* Fix function
Signed-off-by: Christian König <ckoenig@posteo.de >
* Revert "Fix function"
This reverts commit 2f54f5f988 .
Signed-off-by: Christian König <ckoenig@posteo.de >
* Revert "Move stateDuration to utils.js"
This reverts commit 6a3e7786bc .
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-10-27 20:06:02 +01:00
Adam Warner
0e483a8eea
Force all columns in any declared datatable to render using datatables render.text function to prevent possible (very low risk, requiring authenticated dashboard anyway) XSS.
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2021-10-27 19:49:46 +01:00
Adam Warner
01191c7a1b
Merge pull request from GHSA-mhr8-7rvg-8r43
...
* Prevent possible XSS attack vector on add_client
Update JS code to prevent possible XSS vector
Co-authored-by: Harold Kim <root@stypr.com >
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
* Fix both addClient and deleteClient to prevent XSS
Signed-off-by: Harold Kim <root@stypr.com >
Co-authored-by: Harold Kim <root@stypr.com >
2021-10-23 19:26:07 +01:00
a1346054
48c63c0a0b
Fix spelling
...
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com >
2021-09-15 21:22:59 +00:00
DL6ER
0d0a8dba67
Change prettier option trailingComma from "none" to the new default "es5" (see https://prettier.io/docs/en/options.html#trailing-commas )
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-06-23 11:26:43 +02:00
Adam Warner
638a7db036
Merge pull request #1603 from thislooksfun/devel
...
Fix html escaping showing up in input fields. (#1584 )
2020-11-08 15:40:04 +00:00
Adam Warner
280d31c00f
Merge branch 'devel' into fix/group_sel_simple_pages
2020-11-08 13:57:52 +00:00
thislooksfun
8f55dfa03b
Fix html escaping showing up in input fields. ( #1584 )
...
Signed-off-by: thislooksfun <thislooksfun@repbot.org >
2020-10-12 12:26:49 -05:00
DL6ER
1b129bcad0
Merge branch 'release/v5.2' into new/mac_clients
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-07-30 21:56:21 +02:00
XhmikosR
ea1fd6c323
Remove HTML from titles when not needed.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-06-22 08:53:48 +03:00
Adam Warner
c949516ee1
make use of utils.escapeHtml on the JS side of things, and html_entity_decode/htmlentities in PHP
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-06-13 18:50:36 +01:00
DL6ER
a901489a96
Merge branch 'devel' into new/mac_clients
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-05 22:24:17 +02: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
f04647fc9e
Ignore the remaining console errors for now.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-29 10:42:21 +03: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
DL6ER
eb3c672545
Show explicitly which hostname belongs to which IP address when hovering over the hostnames. Note that the IP addresses and host names were already in the same order, before.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-27 19:59:53 +02:00
DL6ER
7214a0f025
Fix initial visibility of group selector on simplified black- and whitelist pages.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-26 23:18:08 +02:00
DL6ER
b6d1392948
Merge pull request #1351 from pi-hole/redundant-var
...
Remove redundant variable
2020-05-25 20:17:49 +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
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
XhmikosR
4247c973c9
Rename function.
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2020-05-23 10:29:50 +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