From 554be92c3944d48280e4db5aff817f6289ff6998 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 23 Dec 2019 22:30:49 -0800 Subject: [PATCH] Update go to setting links --- .../interfaces/default/newsletter_config.html | 2 +- data/interfaces/default/notifier_config.html | 2 +- data/interfaces/default/settings.html | 36 +++++++++++-------- plexpy/notifiers.py | 32 ++++++++--------- 4 files changed, 39 insertions(+), 33 deletions(-) diff --git a/data/interfaces/default/newsletter_config.html b/data/interfaces/default/newsletter_config.html index 54ccfdf1..67f56302 100644 --- a/data/interfaces/default/newsletter_config.html +++ b/data/interfaces/default/newsletter_config.html @@ -271,7 +271,7 @@

Select an existing notification agent where the subject and body text will be sent.
- Note: Self-hosted newsletters must be enabled under Newsletters to include a link to the newsletter. + Note: Self-hosted newsletters must be enabled under Newsletters to include a link to the newsletter.

diff --git a/data/interfaces/default/notifier_config.html b/data/interfaces/default/notifier_config.html index 43bf3a91..e38e4d09 100644 --- a/data/interfaces/default/notifier_config.html +++ b/data/interfaces/default/notifier_config.html @@ -485,7 +485,7 @@ '
' + '' + '

Facebook requires HTTPS for authorization. ' + - 'Please enable HTTPS for Tautulli under Web Interface.

' + + 'Please enable HTTPS for Tautulli under Web Interface.

' + '
' ); $('#facebook_redirect_uri').val('HTTPS not enabled'); diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 9e6fd230..bda52397 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -1008,7 +1008,7 @@

Note: The ${http_root}newsletter endpoint on your domain must be publicly accessible from the internet.

-

Warning: Public Tautulli domain not set under Web Interface.

+

Warning: Public Tautulli domain not set under Web Interface.

@@ -1022,7 +1022,7 @@

Select the authentication method to use for self-hosted newsletters.

-

Warning: Guest Access is not enabled under Web Interface.

+

Warning: Guest Access is not enabled under Web Interface.

@@ -1204,7 +1204,7 @@ Add a new newsletter agent, or configure an existing newsletter agent by clicking the settings icon on the right.

- Warning: The Image Hosting setting must be enabled for images to display on the newsletter. + Warning: The Image Hosting setting must be enabled for images to display on the newsletter.


@@ -1316,7 +1316,7 @@

Register a new device using a QR code, or configure an existing device by clicking the settings icon on the right.

-

The API must be enabled under Web Interface to use the app.

+

Warning: The API must be enabled under Web Interface to use the app.

Loading registered devices...
@@ -2773,20 +2773,26 @@ $(document).ready(function() { $('#allow_guest_access').click(function () { newsletterPasswordEnabled(); - }) + }); + + function gotoSetting(tab, setting){ + $("a[href=#tabs-" + tab + "]").click(); + if (setting) { + _setting = '#' + setting; + if ($(_setting).closest('.advanced-setting').length && !$('#menu_link_show_advanced_settings').hasClass('active')) { + $('#menu_link_show_advanced_settings').click() + } + var body_container = $('.body-container'); + var scroll_pos = setting ? body_container.scrollTop() + $(_setting).offset().top - 100 : 0; + body_container.animate({scrollTop: scroll_pos}); + $(_setting).closest('.form-group, .checkbox').delay(500).fadeOut().fadeIn('slow').fadeOut().fadeIn('slow'); + } + } $('body').on('click', 'a[data-tab-destination]', function () { var tab = $(this).data('tab-destination'); - $("a[href=#" + tab + "]").click(); - var scroll_destination = $(this).data('target'); - if (scroll_destination) { - if ($(scroll_destination).closest('.advanced-setting').length && !$('#menu_link_show_advanced_settings').hasClass('active')) { - $('#menu_link_show_advanced_settings').click() - } - var body_container = $('.body-container') - var scroll_pos = scroll_destination ? body_container.scrollTop() + $(scroll_destination).offset().top - 100 : 0; - body_container.animate({scrollTop: scroll_pos}); - } + var setting = $(this).data('target'); + gotoSetting(tab, setting) }); $('#resources-xml').on('tripleclick', function () { diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index e2dad604..c7d61379 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -999,8 +999,8 @@ class ANDROIDAPP(Notifier): config_option.append({ 'label': 'Device', 'description': 'No devices registered. ' - 'Get the Android App and register a device.', + '' + 'Get the Android App and register a device.', 'input_type': 'help' }) else: @@ -1009,8 +1009,8 @@ class ANDROIDAPP(Notifier): 'value': self.config['device_id'], 'name': 'androidapp_device_id', 'description': 'Set your Android app device or ' - 'register a new device with Tautulli.', + '' + 'register a new device with Tautulli.', 'input_type': 'select', 'select_options': devices }) @@ -1264,8 +1264,8 @@ class DISCORD(Notifier): 'value': self.config['incl_card'], 'name': 'discord_incl_card', 'description': 'Include an info card with a poster and metadata with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.', 'input_type': 'checkbox' }, @@ -1639,8 +1639,8 @@ class FACEBOOK(Notifier): 'value': self.config['incl_card'], 'name': 'facebook_incl_card', 'description': 'Include an info card with a poster and metadata with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.', 'input_type': 'checkbox' }, @@ -1962,8 +1962,8 @@ class HIPCHAT(Notifier): 'value': self.config['incl_card'], 'name': 'hipchat_incl_card', 'description': 'Include an info card with a poster and metadata with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.
' 'Note: This will change the notification type to HTML and emoticons will no longer work.', 'input_type': 'checkbox' @@ -2184,8 +2184,8 @@ class JOIN(Notifier): 'value': self.config['incl_poster'], 'name': 'join_incl_poster', 'description': 'Include a poster with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.', 'input_type': 'checkbox' }, @@ -3348,8 +3348,8 @@ class SLACK(Notifier): 'value': self.config['incl_card'], 'name': 'slack_incl_card', 'description': 'Include an info card with a poster and metadata with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.', 'input_type': 'checkbox' }, @@ -3593,8 +3593,8 @@ class TWITTER(Notifier): 'value': self.config['incl_poster'], 'name': 'twitter_incl_poster', 'description': 'Include a poster with the notifications.
' - 'Note: Image Hosting ' + 'Note: Image Hosting ' 'must be enabled under the notifications settings tab.', 'input_type': 'checkbox' }