diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index d5c26a5f..8a9d0a5b 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -268,9 +268,23 @@ def changedetection_app(config=None, datastore_o=None): # @todo In the future make this a configurable link back (see work on BASE_URL https://github.com/dgtlmoon/changedetection.io/pull/228) guid = "{}/{}".format(watch['uuid'], watch['last_changed']) fe = fg.add_entry() - fe.title(watch['url']) - fe.link(href=watch['url']) - fe.description(watch['url']) + + + # Include a link to the diff page, they will have to login here to see if password protection is enabled. + # Description is the page you watch, link takes you to the diff JS UI page + base_url = datastore.data['settings']['application']['base_url'] + if base_url == '': + base_url = "" + + diff_link = {'href': "{}{}".format(base_url, url_for('diff_history_page', uuid=watch['uuid']))} + + # @todo use title if it exists + fe.link(link=diff_link) + fe.title(title=watch['url']) + + # @todo in the future Any code html is valid.]]> + fe.description(description=watch['url']) + fe.guid(guid, permalink=False) dt = datetime.datetime.fromtimestamp(int(watch['newest_history_key'])) dt = dt.replace(tzinfo=pytz.UTC) @@ -283,7 +297,6 @@ def changedetection_app(config=None, datastore_o=None): @app.route("/", methods=['GET']) @login_required def index(): - import uuid limit_tag = request.args.get('tag') pause_uuid = request.args.get('pause') @@ -455,11 +468,11 @@ def changedetection_app(config=None, datastore_o=None): update_obj = {'url': form.url.data.strip(), 'minutes_between_check': form.minutes_between_check.data, - 'seconds_between_check': form.seconds_between_check.data, - 'minutes_or_seconds': form.minutes_or_seconds.data, 'tag': form.tag.data.strip(), 'title': form.title.data.strip(), 'headers': form.headers.data, + 'body': form.body.data, + 'method': form.method.data, 'fetch_backend': form.fetch_backend.data, 'trigger_text': form.trigger_text.data, 'notification_title': form.notification_title.data, diff --git a/changedetectionio/static/js/tabs.js b/changedetectionio/static/js/tabs.js index 98fbd790..2a15d309 100644 --- a/changedetectionio/static/js/tabs.js +++ b/changedetectionio/static/js/tabs.js @@ -48,39 +48,3 @@ function focus_error_tab() { } return false; } - -function use_seconds_change() { - // var isChecked = document.querySelectorAll('input[id="use_seconds"]:checked').length - // var labelIntegerField = document.querySelector("label[for=minutes_between_check]"); - // var msgDefault = document.getElementById("minutes-message-default"); - // var msgNonDefault = document.getElementById("minutes-message-non-default"); - // var msgWarning = document.getElementById("seconds-warning"); - // if (isChecked) { - // labelIntegerField.innerHTML = "Maximum time in seconds until recheck"; - // try { - // msgDefault.style.display = "none"; - // } catch(error) { - //continue, won't be present if not default interval - // } - // try { - // msgNonDefault.style.display = "none"; - // } catch(error) { - //continue, won't be present if not default interval - // } - // msgWarning.style.display = ""; - // } - // else { - // labelIntegerField.innerHTML = "Maximum time in minutes until recheck"; - // try { - // msgDefault.style.display = ""; - // } catch(error) { - //continue, won't be present if not default interval - // } - // try { - // msgNonDefault.style.display = ""; - // } catch(error) { - //continue, won't be present if not default interval - // } - // msgWarning.style.display = "none"; - // } -} \ No newline at end of file diff --git a/changedetectionio/static/js/tbltools.js b/changedetectionio/static/js/tbltools.js index 7ebd2c05..73070a6f 100644 --- a/changedetectionio/static/js/tbltools.js +++ b/changedetectionio/static/js/tbltools.js @@ -399,7 +399,7 @@ function getSort() { function closeGridDisplay() { document.getElementsByName("showhide")[0].checked = false; var checkboxes = document.getElementsByName('check'); - for (var i = 0; i < checkboxes.length; i++) { + for (i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = false; } document.getElementById("checkbox-functions").style.display = "none"; diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 748a023e..8fb2e1b6 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -32,22 +32,17 @@ Organisational tag/group name used in the main listing page
- - {{ render_field(form.minutes_between_check) }} - + {{ render_field(form.minutes_between_check) }} {% if using_default_minutes %} - Currently using the Currently using the default global settings, change to another value if you want to be specific. {% else %} - Set to blank to use the Set to blank to use the default global settings. {% endif %}
- - + {{ render_field(form.extract_title_as_title) }}