fixes/adjustments 12/28

This commit is contained in:
ntmmfts
2021-12-28 09:34:36 -10:00
parent 1468b3a374
commit cf09767b48
5 changed files with 28 additions and 59 deletions

View File

@@ -30,7 +30,7 @@ import datetime
import pytz import pytz
from copy import deepcopy from copy import deepcopy
__version__ = '0.39.5' __version__ = '0.39.4'
datastore = None datastore = None
@@ -671,7 +671,6 @@ def changedetection_app(config=None, datastore_o=None):
if uuids == '' : if uuids == '' :
flash("No watches selected.") flash("No watches selected.")
return render_template('index')
else : else :
@@ -692,7 +691,7 @@ def changedetection_app(config=None, datastore_o=None):
except KeyError : except KeyError :
pass pass
flash("Rechecking {0} watch{1}.".format(i, "" if i == 1 else "es")) flash("{0} watch{1} {2} rechecking.".format(i, "" if i == 1 else "es", "is" if i == 1 else "are"))
# Clear selected statuses, so we do not see the 'unviewed' class # Clear selected statuses, so we do not see the 'unviewed' class
elif func == 'mark_selected_viewed' : elif func == 'mark_selected_viewed' :
@@ -768,6 +767,8 @@ def changedetection_app(config=None, datastore_o=None):
flash("Invalid parameter received.") flash("Invalid parameter received.")
render_template('index') #ensure flash msgs are seen
if limit_tag == None or limit_tag == 'None' : if limit_tag == None or limit_tag == 'None' :
return redirect(url_for('index')) return redirect(url_for('index'))
else : else :
@@ -1018,7 +1019,7 @@ def changedetection_app(config=None, datastore_o=None):
if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']: if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']:
update_q.put(watch_uuid) update_q.put(watch_uuid)
i += 1 i += 1
flash("{} watches are rechecking.".format(i)) flash("{0} watch{1} {2} rechecking.".format(i, "" if i == 1 else "es", "is" if i == 1 else "are"))
return redirect(url_for('index', tag=tag)) return redirect(url_for('index', tag=tag))
# @todo handle ctrl break # @todo handle ctrl break

View File

@@ -41,6 +41,10 @@ document.onkeyup=function(e){
} }
// page load functions // page load functions
window.addEventListener('DOMContentLoaded', (event) => {
load_functions();
});
function load_functions() { function load_functions() {
// loading // loading
loading = true; loading = true;
@@ -359,7 +363,7 @@ function getSort() {
sort_order = sessionStorage.getItem("sort_order"); sort_order = sessionStorage.getItem("sort_order");
} }
else { else {
sort_column = 9; // last changed sort_column = 7; // last changed
sort_order = 1; // desc sort_order = 1; // desc
//alert("Your web browser does not support retaining sorting and page position."); //alert("Your web browser does not support retaining sorting and page position.");
} }

View File

@@ -160,18 +160,7 @@ section.content {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
/* #post-list-buttons { #flexlayout {
padding: 0;
margin: 0;
}
#post-list-buttons-top {
display: grid;
padding-left: 0;
}
#post-list-buttons li {
display: inline-block;
}
*/#flexlayout {
float: right; float: right;
} }
#categories { #categories {
@@ -198,34 +187,10 @@ section.content {
border-bottom-left-radius:5px; border-bottom-left-radius:5px;
border-bottom-right-radius:5px border-bottom-right-radius:5px
} }
#checkbox-functions ul {
/* #post-list-buttons-top a {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: initial;
border-bottom-right-radius: initial;
}
#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 a {
display: grid;
display: -ms-grid;
}
*/#checkbox-functions ul {
padding-left: 0px; padding-left: 0px;
} }
/* #post-list-buttons-top-grid li { #checkbox-functions {
list-style-type: none;
}
*/#checkbox-functions {
position: fixed; position: fixed;
left: 10%; left: 10%;
text-align: left; text-align: left;
@@ -725,7 +690,6 @@ footer {
} }
.watch-table { .watch-table {
display: inline-block; display: inline-block;
padding: 5px;
} }
.search-box input[type=text]:focus,input[type=text]:not(:placeholder-shown) { .search-box input[type=text]:focus,input[type=text]:not(:placeholder-shown) {
width: 150px; width: 150px;

View File

@@ -13,7 +13,7 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</head> </head>
<body onload="load_functions()"> <body>
<div class="header"> <div class="header">

View File

@@ -30,16 +30,16 @@
<div id="controls-top"> <div id="controls-top">
<div id="checkbox-functions" style="display: none;"> <div id="checkbox-functions" style="display: none;">
<ul id="post-list-buttons-top-grid"> <ul id="post-list-buttons-top-grid">
<li #id="grid-item-1"> <li id="grid-item-1">
<a href="javascript:processChecked('recheck_selected', '{{ active_tag }}');" class="pure-button button-tag " title="Recheck Selected{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Recheck&nbsp;</a> <a href="javascript:processChecked('recheck_selected', '{{ active_tag }}');" class="pure-button button-tag " title="Recheck Selected{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Recheck&nbsp;</a>
</li> </li>
<li #id="grid-item-2"> <li id="grid-item-2">
<a href="javascript:processChecked('mark_selected_notviewed', '{{ active_tag }}');" class="pure-button button-tag " title="Mark Selected as Unviewed{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Unviewed</a> <a href="javascript:processChecked('mark_selected_notviewed', '{{ active_tag }}');" class="pure-button button-tag " title="Mark Selected as Unviewed{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Unviewed</a>
</li> </li>
<li #id="grid-item-3"> <li id="grid-item-3">
<a href="javascript:processChecked('mark_selected_viewed', '{{ active_tag }}');" class="pure-button button-tag " title="Mark Selected as Viewed{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Viewed&nbsp;&nbsp;</a> <a href="javascript:processChecked('mark_selected_viewed', '{{ active_tag }}');" class="pure-button button-tag " title="Mark Selected as Viewed{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Viewed&nbsp;&nbsp;</a>
</li> </li>
<li #id="grid-item-4"> <li id="grid-item-4">
<a href="javascript:processChecked('delete_selected', '{{ active_tag }}');" class="pure-button button-tag danger " title="Delete Selected{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Delete&nbsp;&nbsp;</a> <a href="javascript:processChecked('delete_selected', '{{ active_tag }}');" class="pure-button button-tag danger " title="Delete Selected{%if active_tag%} in &quot;{{active_tag}}&quot;{%endif%}">Delete&nbsp;&nbsp;</a>
</li> </li>
</ul> </ul>
@@ -51,12 +51,12 @@
<thead> <thead>
<tr id="header"> <tr id="header">
<th class="inline chkbox-header"><input type="checkbox" name="showhide" onchange="checkAll(this)" title="Check/Uncheck All">&nbsp;&nbsp;#</th> <th class="inline chkbox-header"><input type="checkbox" name="showhide" onchange="checkAll(this)" title="Check/Uncheck All">&nbsp;&nbsp;#</th>
<th class="pause-resume-header" onclick="sortTable(1)"><span class="clickable" title="Sort by Pause/Resume"><a href="{{url_for('index', pause='pause-all', tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='pause.svg')}}" alt="Pause" title="Pause All {%if active_tag%}in &quot;{{active_tag}}&quot; {%endif%}"/></a>&nbsp;<a href="{{url_for('index', pause='resume-all', tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='play.svg')}}" alt="Resume" title="Resume All {%if active_tag%}in &quot;{{active_tag}}&quot; {%endif%}"/></a>&nbsp;&nbsp;<span id="sortable-1"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" /></span><span class="sortarrow"><span id="sort-1a" style="display:none;">&#9650;</span><span id="sort-1d" style="display:none;">&#9660;</span></span></span></th> <th class="pause-resume-header" onclick="sortTable(1)"><span class="clickable" title="Sort by Pause/Resume"><a href="{{url_for('index', pause='pause-all', tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='pause.svg')}}" alt="Pause" title="Pause All {%if active_tag%}in &quot;{{active_tag}}&quot; {%endif%}"/></a>&nbsp;<a href="{{url_for('index', pause='resume-all', tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='play.svg')}}" alt="Resume" title="Resume All {%if active_tag%}in &quot;{{active_tag}}&quot; {%endif%}"/></a>&nbsp;&nbsp;<span id="sortable-1"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" alt="sort" /></span><span class="sortarrow"><span id="sort-1a" style="display:none;">&#9650;</span><span id="sort-1d" style="display:none;">&#9660;</span></span></span></th>
<th onclick="sortTable(3)"><span class="clickable" title="Sort by Title">Title&nbsp;&nbsp;<span id="sortable-3"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" /></span><span class="sortarrow"><span id="sort-3a" style="display:none;">&#9650;</span><span id="sort-3d" style="display:none;">&#9660;</span></span></span></th> <th onclick="sortTable(3)"><span class="clickable" title="Sort by Title">Title&nbsp;&nbsp;<span id="sortable-3"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" alt="sort" /></span><span class="sortarrow"><span id="sort-3a" style="display:none;">&#9650;</span><span id="sort-3d" style="display:none;">&#9660;</span></span></span></th>
<th class="hidden-col"></th> <th class="hidden-col"></th>
<th onclick="sortTable(5)"><span class="clickable" title="Sort by Last Checked">Checked&nbsp;&nbsp;<span id="sortable-5"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" /></span><span class="sortarrow"><span id="sort-5a" style="display:none;">&#9650;</span><span id="sort-5d" style="display:none;">&#9660;</span></span></span></th> <th onclick="sortTable(5)"><span class="clickable" title="Sort by Last Checked">Checked&nbsp;&nbsp;<span id="sortable-5"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" alt="sort" /></span><span class="sortarrow"><span id="sort-5a" style="display:none;">&#9650;</span><span id="sort-5d" style="display:none;">&#9660;</span></span></span></th>
<th class="hidden-col"></th> <th class="hidden-col"></th>
<th onclick="sortTable(7)"><span class="clickable" title="Sort by Last Changed">Changed&nbsp;&nbsp;<span id="sortable-7" style="display:none;"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" /></span><span class="sortarrow"><span id="sort-7a" style="display:none;">&#9650;</span><span id="sort-7d">&#9660;</span></span></span></th> <th onclick="sortTable(7)"><span class="clickable" title="Sort by Last Changed">Changed&nbsp;&nbsp;<span id="sortable-7" style="display:none;"><img src="{{url_for('static_content', group='images', filename='sortable.svg')}}" alt="sort" /></span><span class="sortarrow"><span id="sort-7a" style="display:none;">&#9650;</span><span id="sort-7d">&#9660;</span></span></span></th>
<th class="hidden-col"></th> <th class="hidden-col"></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
@@ -68,7 +68,7 @@
{% if watch.last_error is defined and watch.last_error != False %}error{% endif %} {% if watch.last_error is defined and watch.last_error != False %}error{% endif %}
{% if watch.paused is defined and watch.paused != False %}paused{% endif %} {% if watch.paused is defined and watch.paused != False %}paused{% endif %}
{% if watch.newest_history_key| int > watch.last_viewed| int %}unviewed{% endif %}"> {% if watch.newest_history_key| int > watch.last_viewed| int %}unviewed{% endif %}">
<td class="inline chkbox"><input id="{{watch.uuid}}" type="checkbox" name="check" onchange="checkChange();">&nbsp;&nbsp;{{ loop.index }}</td> <td class="inline chkbox"><input type="checkbox" name="check" onchange="checkChange();">&nbsp;&nbsp;{{ loop.index }}</td>
<td class="inline pause-resume"> <td class="inline pause-resume">
{% if watch.paused %} {% if watch.paused %}
<a href="{{url_for('index', pause=watch.uuid, tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='play.svg')}}" alt="Resume" title="Resume"/></a> <a href="{{url_for('index', pause=watch.uuid, tag=active_tag)}}"><img src="{{url_for('static_content', group='images', filename='play.svg')}}" alt="Resume" title="Resume"/></a>
@@ -86,17 +86,17 @@
<span class="watch-tag-list">{{ watch.tag}}</span> <span class="watch-tag-list">{{ watch.tag}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="hidden-col">{{ watch.title if watch.title else watch.url }}</td> <!-- for title sorting --> <td class="hidden-col">{{ watch.title if watch.title else watch.url }}</td>
<td class="last-checked">{{watch|format_last_checked_time}}</td> <td class="last-checked">{{watch|format_last_checked_time}}</td>
<td class="hidden-col">{{ watch.last_checked }}</td> <!-- for last_checked sorting --> <td class="hidden-col">{{ watch.last_checked }}</td>
<td class="last-changed">{% if watch.history|length >= 2 and watch.last_changed %} <td class="last-changed">{% if watch.history|length >= 2 and watch.last_changed %}
{{watch.last_changed|format_timestamp_timeago}} {{watch.last_changed|format_timestamp_timeago}}
{% else %} {% else %}
Not yet Not yet
{% endif %} {% endif %}
</td> </td>
<td class="hidden-col">{{ watch.last_changed }}</td> <!-- for last_changed sorting --> <td class="hidden-col">{{ watch.last_changed }}</td>
<td id="actions"> <td>
<a href="{{ url_for('api_watch_checknow', uuid=watch.uuid, tag=request.args.get('tag')) }}" <a href="{{ url_for('api_watch_checknow', uuid=watch.uuid, tag=request.args.get('tag')) }}"
class="pure-button button-small pure-button-primary">Recheck</a> class="pure-button button-small pure-button-primary">Recheck</a>
<a href="{{ url_for('edit_page', uuid=watch.uuid)}}" class="pure-button button-small pure-button-primary">Edit</a> <a href="{{ url_for('edit_page', uuid=watch.uuid)}}" class="pure-button button-small pure-button-primary">Edit</a>
@@ -123,7 +123,7 @@
all {% if active_tag%}in "{{active_tag}}"{%endif%}</a> all {% if active_tag%}in "{{active_tag}}"{%endif%}</a>
</li> </li>
<li> <li>
<a href="{{ url_for('rss', tag=active_tag , token=app_rss_token)}}"><img id="feed-icon" src="{{url_for('static_content', group='images', filename='Generic_Feed-icon.svg')}}" height="15px"></a> <a href="{{ url_for('rss', tag=active_tag , token=app_rss_token)}}"><img id="feed-icon" src="{{url_for('static_content', group='images', filename='Generic_Feed-icon.svg')}}" alt="" style="height:15px"></a>
</li> </li>
</ul> </ul>
</div> </div>