From 471c5533eed5296115fdc033e721ec63bfe7a8e1 Mon Sep 17 00:00:00 2001 From: ntmmfts Date: Wed, 5 Jan 2022 04:59:26 -1000 Subject: [PATCH] fixed check behavior and added cancel button to checkbox functions menu --- changedetectionio/static/js/tbltools.js | 17 +++++++++++++++- changedetectionio/static/styles/styles.css | 20 +++++++++++-------- .../templates/watch-overview.html | 3 +++ 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/changedetectionio/static/js/tbltools.js b/changedetectionio/static/js/tbltools.js index 1acf0def..73070a6f 100644 --- a/changedetectionio/static/js/tbltools.js +++ b/changedetectionio/static/js/tbltools.js @@ -218,7 +218,13 @@ function checkChange(e) { var i; var totalCheckbox = document.querySelectorAll('input[name="check"]').length; var totalChecked = document.querySelectorAll('input[name="check"]:checked').length; - var checkboxFunctions = document.getElementById('checkbox-functions'); //document.querySelectorAll('[id=checkbox-functions]'); + var checkboxFunctions = document.getElementById('checkbox-functions'); + if(totalCheckbox == totalChecked) { + document.getElementsByName("showhide")[0].checked=true; + } + else { + document.getElementsByName("showhide")[0].checked=false; + } if (totalChecked > 0) { checkboxFunctions.style.display = ""; checkboxFunctions.style.left = offsetLeft + 30 + "px"; @@ -388,4 +394,13 @@ function getSort() { //alert("Your web browser does not support retaining sorting and page position."); } } +} + +function closeGridDisplay() { + document.getElementsByName("showhide")[0].checked = false; + var checkboxes = document.getElementsByName('check'); + for (i = 0; i < checkboxes.length; i++) { + checkboxes[i].checked = false; + } + document.getElementById("checkbox-functions").style.display = "none"; } \ No newline at end of file diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 17f764dd..687e395a 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -179,18 +179,18 @@ section.content { #post-list-buttons li { display:inline-block } +#post-list-buttons a { + border-top-left-radius:initial; + border-top-right-radius:initial; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; +} #post-list-buttons-top-grid { margin: 0px; } #post-list-buttons-top-grid li { list-style-type: none; } -#post-list-buttons a { - border-top-left-radius:initial; - border-top-right-radius:initial; - border-bottom-left-radius:5px; - border-bottom-right-radius:5px -} #checkbox-functions ul { padding-left: 0px; } @@ -219,10 +219,14 @@ section.content { -ms-grid-column: 1; -ms-grid-row: 4; } +#grid-item-5 { /* IE grid support */ + -ms-grid-column: 1; + -ms-grid-row: 5; +} #checkbox-functions .pure-button { background: #0078e7; - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; } diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 53b76bf8..a72209f3 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -42,6 +42,9 @@
  • Delete  
  • +
  • + Cancel   +