diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 3d1cf6f7..311160da 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -306,6 +306,7 @@ def changedetection_app(config=None, datastore_o=None): datastore.needs_write = True return redirect(url_for('index', tag = limit_tag)) + # Sort by last_changed and add the uuid which is usually the key.. sorted_watches = [] for uuid, watch in datastore.data['watching'].items(): diff --git a/changedetectionio/static/js/tbltools.js b/changedetectionio/static/js/tbltools.js index 5c90932b..71f910c2 100644 --- a/changedetectionio/static/js/tbltools.js +++ b/changedetectionio/static/js/tbltools.js @@ -39,9 +39,7 @@ function load_functions() { // retrieve saved sorting getSort(); // sort if not default - //if (sort_column != 9 || sort_order != 1) { sortTable(sort_column); - //} // search if (isSessionStorageSupported()) { // retrieve search @@ -54,7 +52,7 @@ function load_functions() { // sorting function sortTable(n) { - var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0; + var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0, sortimgs, sortableimgs; table = document.getElementById("watch-table"); switching = true; //Set the sorting direction, either default 9, 1 or saved @@ -129,7 +127,7 @@ function sortTable(n) { } // hide all asc/desc sort arrows sortimgs = document.querySelectorAll('[id^="sort-"]'); - for (var i = 0; i < sortimgs.length; i++) { + for (i = 0; i < sortimgs.length; i++) { sortimgs[i].style.display = "none"; } // show current asc/desc sort arrow and set sort_order var @@ -141,7 +139,7 @@ function sortTable(n) { } // show all sortable indicators sortableimgs = document.querySelectorAll('[id^="sortable-"]'); - for (var i = 0; i < sortableimgs.length; i++) { + for (i = 0; i < sortableimgs.length; i++) { sortableimgs[i].style.display = ""; } // hide sortable indicator from current column @@ -155,21 +153,22 @@ function sortTable(n) { // check/uncheck all checkboxes function checkAll(e) { + var i; var checkboxes = document.getElementsByName('check'); var checkboxFunctions = document.querySelectorAll('[id=checkbox-functions]'); if (e.checked) { - for (var i = 0; i < checkboxes.length; i++) { + for (i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = true; } - for (var i = 0; i < checkboxFunctions.length; i++) { + for (i = 0; i < checkboxFunctions.length; i++) { checkboxFunctions[i].style.display = ""; } } else { - for (var i = 0; i < checkboxes.length; i++) { + for (i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = false; } - for (var i = 0; i < checkboxFunctions.length; i++) { + for (i = 0; i < checkboxFunctions.length; i++) { checkboxFunctions[i].style.display = "none"; } } @@ -177,6 +176,7 @@ function checkAll(e) { // check/uncheck checkall checkbox if all other checkboxes are checked/unchecked function checkChange(){ + var i; var totalCheckbox = document.querySelectorAll('input[name="check"]').length; var totalChecked = document.querySelectorAll('input[name="check"]:checked').length; var checkboxFunctions = document.querySelectorAll('[id=checkbox-functions]'); @@ -187,12 +187,12 @@ function checkChange(){ document.getElementsByName("showhide")[0].checked=false; } if(totalChecked == 0) { - for (var i = 0; i < checkboxFunctions.length; i++) { + for (i = 0; i < checkboxFunctions.length; i++) { checkboxFunctions[i].style.display = "none"; } } else { - for (var i = 0; i < checkboxFunctions.length; i++) { + for (i = 0; i < checkboxFunctions.length; i++) { checkboxFunctions[i].style.display = ""; } } @@ -226,7 +226,7 @@ function tblSearch(evt) { // restripe after searching or sorting function restripe () { - var visrows = []; + var i, visrows = []; var table = document.getElementById("watch-table"); var rows = table.getElementsByTagName("tr"); @@ -235,7 +235,7 @@ function restripe () { visrows.push(rows[i]); } } - for (var i=0 ; i 0 ) { let output = []; - for (var i = 0; i < checkedArr.length; i++ ) { + for (i = 0; i < checkedArr.length; i++ ) { output.push( checkedArr[i].parentNode.parentNode.getAttribute("id") ); } - var uuids = ""; - for (var i = 0; i < checkedArr.length; i++ ) { + for (i = 0; i < checkedArr.length; i++ ) { if (i < checkedArr.length - 1 ) { uuids += output[i] + ","; } else { uuids += output[i]; } } - } else { - uuids = ''; } return uuids; } // process selected watches function processChecked(func, tag) { + var uuids, result; + if ( func == 'mark_all_notviewed' ) { uuids = getChecked('all'); } diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 6177c02d..a7bd3a1c 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -114,35 +114,16 @@ section.content { color: #fff; font-weight: normal; } -#play-pause { - line-height: .8em; -} -#checkbox-functions { - position: fixed; - left: 10%; - text-align: left; - /*display: grid;*/ -} -#checkbox-functions .pure-button { - background: #0078e7; - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} -#danger .pure-button { - background: #e7096e; -} .watch-table td.title-col, #actions { text-align: center; } -.watch-table #clickable { +.watch-table .clickable { cursor: pointer; } -.watch-table #sortarrow { +.watch-table .sortarrow { color: #0078e7; } -.watch-table #hidden { +.watch-table .hidden { display: none; } .watch-table tr.unviewed { @@ -181,18 +162,24 @@ section.content { display: flex; justify-content: center; } -#post-list-buttons, #post-list-buttons-top { - +#post-list-buttons { padding: 0; margin: 0; } -#post-list-buttons li, #post-list-buttons-top li { +#post-list-buttons-top { + display: grid; + padding-left: 0; +} +#post-list-buttons li { display: inline-block; } #flexlayout { display: flex; justify-content: space-between; } +#flexlayout-bottom { + float: right; +} #categories { text-align: left; margin-top: auto; @@ -201,18 +188,6 @@ section.content { text-align: right; margin-top: auto; } -#recheck-and-rss { - display: inline-flex; -} -#controls-bottom { - text-align: right; - margin-bottom: auto; - direction: rtl; -} -.watch-table tfoot { - bottom: 0; - position: fixed; -} #post-list-buttons-top a { border-top-left-radius: 5px; border-top-right-radius: 5px; @@ -225,6 +200,63 @@ section.content { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } +#post-list-buttons-top a { + display: grid; + display: -ms-grid; +} +#checkbox-functions ul { + padding-left: 0px; +} +#post-list-buttons-top-grid li { + list-style-type: none; +} +#checkbox-functions { + position: fixed; + left: 10%; + text-align: left; + font-family: monospace; + display: grid; + display: -ms-grid; /* IE grid support */ + -ms-grid-columns: 1fr; /* IE grid support */ +} +#grid-item-1 { /* IE grid support */ + -ms-grid-column: 1; + -ms-grid-row: 1; +} +#grid-item-2 { /* IE grid support */ + -ms-grid-column: 1; + -ms-grid-row: 2; +} +#grid-item-3 { /* IE grid support */ + -ms-grid-column: 1; + -ms-grid-row: 3; +} +#grid-item-4 { /* IE grid support */ + -ms-grid-column: 1; + -ms-grid-row: 4; +} +#checkbox-functions .pure-button { + background: #0078e7; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; +} +#recheck-and-rss { + margin-top: auto; +} +#recheck-and-rss ul { + display: inline-flex; +} +#controls-bottom { + text-align: right; + margin-bottom: auto; + direction: rtl; + } +.watch-table tfoot { + bottom: 0; + position: fixed; +} body:after { content: ""; background: linear-gradient(130deg, #ff7a18, #af002d 41.07%, #319197 76.05%); @@ -508,6 +540,9 @@ body:before { border-bottom-left-radius: initial; border-bottom-right-radius: initial; } +#checkbox-functions .pure-button.button-tag.danger { + background: #e70069; +} .button-tag.active { background: #9c9c9c; font-weight: bold; diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index cd69b550..e6110419 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -2,7 +2,7 @@ {% block content %} {% from '_helpers.jinja' import render_simple_field %} - +
@@ -27,51 +27,52 @@ {% endif %} {% endfor %}
-
-
+ +
+ +
- - - - - - - - - + + + + + + + + + @@ -109,16 +110,16 @@ {{ watch.tag}} {% endif %} - + - + - +
{{ watch.title if watch.title else watch.url }} {{watch|format_last_checked_time}}{{ watch.last_checked }} {% if watch.history|length >= 2 and watch.last_changed %} {{watch.last_changed|format_timestamp_timeago}} {% else %} Not yet {% endif %} {{ watch.last_changed }} Recheck @@ -137,18 +138,21 @@
-
- + +
- {% endblock %} + + +{% endblock %}