From 61c4c95e56715dcbd327335cbab2cabf0815dd97 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 22 Nov 2015 19:41:40 +0800 Subject: [PATCH] Change to remove branch from window title --- CHANGES.md | 2 + gui/slick/interfaces/default/inc_top.tmpl | 55 +++-------------------- gui/slick/js/inc_top.js | 40 +++++++++++++++++ 3 files changed, 47 insertions(+), 50 deletions(-) create mode 100644 gui/slick/js/inc_top.js diff --git a/CHANGES.md b/CHANGES.md index 726c33cc..3c530b6e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -78,6 +78,8 @@ * Change sickbeard variables to sickgear variables in init-scripts * Change improve the use of multiple plex servers * Change to move JS code out of home template and into dedicated file +* Change to remove branch from window title +* Change to move JS code out of inc_top template and into dedicated file [develop changelog] Enable Alpha Ratio again now that the secure login page over https is fixed diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index 7e93dc9f..69a7d446 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -9,8 +9,8 @@ - SickGear - BRANCH:[$sickbeard.BRANCH] - $title - + SickGear - $title + - #set $tab = 4 diff --git a/gui/slick/js/inc_top.js b/gui/slick/js/inc_top.js new file mode 100644 index 00000000..2af9b287 --- /dev/null +++ b/gui/slick/js/inc_top.js @@ -0,0 +1,40 @@ +function initActions() { + $('#SubMenu a[href*="/home/restart/"]').addClass('btn restart').html('Restart'); + $('#SubMenu a[href*="/home/shutdown/"]').addClass('btn shutdown').html('Shutdown'); + $('#SubMenu a[href*="/home/logout/"]').addClass('btn').html('Logout'); + $('#SubMenu a:contains("Edit")').addClass('btn').html('Edit'); + $('#SubMenu a:contains("Remove")').addClass('btn remove').html('Remove'); + $('#SubMenu a:contains("Clear History")').addClass('btn clearhistory').html('Clear History'); + $('#SubMenu a:contains("Trim History")').addClass('btn trimhistory').html('Trim History'); + $('#SubMenu a[href$="/errorlogs/clearerrors/"]').addClass('btn').html('Clear Errors'); + $('#SubMenu a:contains("Re-scan")').addClass('btn').html('Re-scan'); + $('#SubMenu a:contains("Backlog Overview")').addClass('btn').html('Backlog Overview'); + $('#SubMenu a[href$="/home/updatePLEX/"]').addClass('btn').html('Update PLEX'); + $('#SubMenu a:contains("Force")').addClass('btn').html('Force Full Update'); + $('#SubMenu a:contains("Rename")').addClass('btn').html('Media Renamer'); + $('#SubMenu a[href$="/config/subtitles/"]').addClass('btn').html('Search Subtitles'); + $('#SubMenu a[href*="/home/subtitleShow"]').addClass('btn').html('Download Subtitles'); + $('#SubMenu a:contains("Anime")').addClass('btn').html('Anime'); + $('#SubMenu a:contains("Settings")').addClass('btn').html('Search Settings'); + $('#SubMenu a:contains("Provider")').addClass('btn').html('Search Providers'); + $('#SubMenu a:contains("General")').addClass('btn').html('General'); + $('#SubMenu a:contains("Episode Status")').addClass('btn').html('Episode Status Management'); + $('#SubMenu a:contains("Missed Subtitle")').addClass('btn').html('Missed Subtitles'); + $('#SubMenu a[href$="/home/addShows/"]').addClass('btn').html('Add Show'); + $('#SubMenu a:contains("Processing")').addClass('btn').html('Post-Processing'); + $('#SubMenu a:contains("Manage Searches")').addClass('btn').html('Manage Searches'); + $('#SubMenu a:contains("Manage Torrents")').addClass('btn').html('Manage Torrents'); + $('#SubMenu a:contains("Show Queue Overview")').addClass('btn').html('Show Queue Overview'); + $('#SubMenu a[href$="/manage/failedDownloads/"]').addClass('btn').html('Failed Downloads'); + $('#SubMenu a:contains("Notification")').addClass('btn').html('Notifications'); + $('#SubMenu a:contains("Update show in XBMC")').addClass('btn').html('Update show in XBMC'); + $('#SubMenu a[href$="/home/updateXBMC/"]').addClass('btn').html('Update XBMC'); + $('#SubMenu a:contains("Update show in Kodi")').addClass('btn').html('Update show in Kodi'); + $('#SubMenu a[href$="/home/updateKODI/"]').addClass('btn').html('Update Kodi'); +} + +$(document).ready(function(){ + initActions(); + $('#NAV' + topmenu).addClass('active'); + $('.dropdown-toggle').dropdownHover(); +});