Commit Graph

278 Commits

Author SHA1 Message Date
Isaac Connor 2f301cf5fe Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-02-12 13:18:08 -05:00
Isaac Connor 5b9bb93703 fix navbar auth 2019-02-12 13:17:55 -05:00
timwsuqld f95e9c0363 Fix comment about hiding navbar (#2521)
Fixes #2520
2019-02-11 17:14:33 -05:00
Isaac Connor 40e0019267 fix all the nav missing when a users Monitors Permission is None 2019-02-11 14:15:24 -05:00
Matthew Noorenberghe 6af2c4ad0e Escape output of WEB_TITLE, HOME_URL, HOME_CONTENT, & WEB_CONSOLE_BANNER. Fixes #2468 2019-02-09 18:06:21 -08:00
Isaac Connor 604dbf8776 fix state changing/etc 2019-01-30 14:36:46 -05:00
Matt N a1a42345e3 More eslint fixes; eslint in php; add eslint to travis (#2419)
* Add eslint to travis.yml

* Update eslint package versions and apply new indent rules

* Enable the brace-style and block-style eslint rules

* Enable the 'curly' eslint rule

* Enable the 'keyword-spacing' eslint rule

* Enable the 'key-spacing' eslint rule

* Enable the 'object-curly-spacing' eslint rule

* Enable the 'no-new-object' eslint rule

* Only disable the no-caller eslint rule in the one affected file

* Enable the 'no-unused-vars' eslint rule for local variables

* Add linting of JS in .php files
2019-01-19 10:32:40 -05:00
Matt N eef113b6a7 Convert some characters to HTML entities (#2417) 2019-01-18 10:02:48 -05:00
Matt N 6bb5aa1b87 More inline JS / nonce conversions (#2415)
* monitor.php: Add nonce and move <script> inside </body>

* export_functions.php: Untested: Add @nonce to <script>

* blank.php: Add @nonce to <script> and add to CSP enforced views

* Enforce CSP on login and privacy views

* group.php: Add nonce and move <script> inside </body>

* filter.php: Add @nonce to <script>

* Fix updateButtons argument on the filter page upon change and page load

* events.php: Add @nonce to <script>
2019-01-18 09:51:06 -05:00
Matt N d33fec9c3f Add a CSP script-src policy with nonce-source and convert more inline event handlers (#2413)
* Add Content-Security-Policy-Report-Only: script-src 'self' 'nonce-' policy

* Use @data-on-click-this to attach inline click event handlers which expect being called with 'this'

Only handle ones that don't return a value.

* Use @data-on-click to attach inline click event handlers with no args and no return value

* Use @data-on-click-true to attach inline click event handlers with 'true' as the only argument

* Enforce a script-src CSP on views without inline JS

* Convert some onchange attributes to data-on-change
2019-01-16 09:59:58 -05:00
Matt N 083f284599 Replace onclick inline event handlers for createPopup (#2410)
* Move <script> before </body>

* Change makePopupLink to not use onclick

* Change makePopupButton to not use onclick

* Use .popup-link in control_functions.php

* Use makePopupButton in controlcaps.php

* Prevent double-encoding in makePopup*

* Use makePopupButton in devices.php

* Use makePopupButton in logout.php

* Use makePopupLink in monitor.php

* Use makePopupLink and .popup-link in montage.php

* Use makePopupButton in options.php

* Use makePopupButton, makePopupLink, and .popup-link in zones.php
2019-01-15 09:01:58 -05:00
Andrew Bauer 4d7e98475f
Merge pull request #2297 from connortechnology/introduce_getBodyTopHTML
Introduce get body top html
2018-12-11 09:35:54 -06:00
Isaac Connor 9ffd77428a fix paths to jquery-ui-theme components, thereby upgrading them to the proper version. This fixes the datetime filters not being shown on skins that don't specify a custom theme for jquery-ui 2018-12-05 09:05:10 -05:00
Isaac Connor c5f7fb7b18 Merge branch 'master' into server_path_prefix 2018-11-22 10:04:33 -05:00
Isaac Connor d76d6bb9d1 include overlay.js when viewing the log, so that export works 2018-11-12 15:09:15 -05:00
Isaac Connor 702143e51b Create a function called getBodyTopHTML that outputs the body tag and anything else that should go at the top.
Things like the we require javascript message, and any other messages like error messages.
Use this on the monitor and console view to stick an error message at the top when saving a monitor fails.

This is a pretty quick, crude implementation.
2018-11-07 12:33:54 -05:00
Isaac Connor 95a6d0666a Improve behaviour and reduce extra logging when db goes away 2018-10-29 09:59:26 -04:00
Isaac Connor 031c96c71d Merge branch 'master' into turn_off_navbar 2018-10-10 14:04:29 -04:00
Isaac Connor a1ab0855db if navbar=0 is given in the url, don't output the navbar 2018-10-10 14:02:46 -04:00
Isaac Connor 48e805c09f Make header flips perisisent based on cookie 2018-10-10 13:11:27 -04:00
Isaac Connor c5b23807a4 put back overlay.js for log view. 2018-09-23 10:51:46 -04:00
Andrew Bauer c66dd25ebb implement collapsible headers (#2203) 2018-09-11 17:39:40 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor ebe55cf6a4 Include new Server.js 2018-07-09 14:10:06 -04:00
Andrew Bauer 015013f247
Center WEB_CONSOLE_BANNER
Center WEB_CONSOLE_BANNER under the server stats
2018-07-06 15:59:10 -05:00
Isaac Connor 54e7b0ac16
create ZM_EXPORT_DIR if needed (#2136) 2018-06-25 13:57:00 -04:00
Isaac Connor db6bd67f59 just fix structure/spacing 2018-06-06 11:40:38 -04:00
Isaac cfbbc238c9 remove extra spaces and parenthesis 2018-05-18 15:51:12 +02:00
Isaac Connor 780cb693c2 google code style 2018-05-16 11:14:11 -04:00
Isaac Connor acd6b5f4a9 limit the # of log lines deleted to 100 to limit the time spent there. 2018-04-30 14:33:41 -04:00
Isaac Connor 970830aee3 tidy up 2018-04-20 13:10:38 -04:00
Isaac Connor 10a191ae5b add event_disk_space to storage to differentiate between real used space versus event used disk space. Use this in the navbar to show actual disk use and also event disk use 2018-04-17 14:14:40 -07:00
Isaac Connor 92cb7dabd5 merge some fixes from other branches 2018-04-17 08:48:59 -07:00
Isaac Connor bb924ee078 add report_event_audit 2018-04-10 13:06:01 -07:00
Isaac Connor 2c85e5e4c6 remove unneccessary type tags. 2018-04-06 11:43:19 -04:00
Pliable Pixels bf57b65ebb reduced 2nd row of navbar text 2018-03-25 09:56:41 -04:00
Pliable Pixels 809e58fae6 acct icon to material 2018-03-25 09:44:30 -04:00
Pliable Pixels 14f638e009 replaced ionic fonts with material design icons 2018-03-25 09:28:00 -04:00
Pliable Pixels a68cc79437 using MIT licensed ion-icons, its smaller than FA, replaced some text with icons 2018-03-24 18:25:39 -04:00
Isaac Connor ad1b9699f1 Remove CssFileExtra 2018-02-11 14:18:40 -05:00
Isaac Connor 1ed8af8aac upgrade jquery-ui to 1.12.1 2018-02-08 13:19:16 -05:00
Isaac Connor 4777808cf0 Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-02-08 13:15:41 -05:00
Isaac Connor 95cfdb327d further separate addBtn and cloneBtn, fixes 2018-02-08 13:15:27 -05:00
Isaac Connor c47c81b810 title is translated, so we can't use it to determine which page we are on, so use view 2018-02-08 09:29:42 -08:00
Isaac Connor 16604e3ee4 fix including jquery in export 2018-02-08 09:29:12 -08:00
Isaac Connor 058b2be9a7 fix chosen sprites 2018-02-02 13:26:44 -05:00
Isaac Connor e8ace6d4dd include base version of jquery-ui-theme 2018-02-02 12:47:51 -05:00
Isaac Connor c35c9c4083 Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-01-25 08:46:38 -05:00
Isaac Connor 0bd1ee5992 Merge branch 'master' into m 2018-01-25 08:43:31 -05:00
Isaac e4c28150fe cleanup, code style, quotes. Include jquery source instead of trying to link to it 2018-01-24 23:07:57 +01:00