[Slim-Checkins] r11402 - in /trunk/server: HTML/EN/html/common.js HTML/Fishbone/html/scripts.js Slim/Buttons/Home.pm Slim/Plugin/DigitalInput/Plugin.pm Slim/Web/Pages/Home.pm
kdf at svn.slimdevices.com
kdf at svn.slimdevices.com
Sun Feb 11 15:35:17 PST 2007
Author: kdf
Date: Sun Feb 11 15:35:17 2007
New Revision: 11402
URL: http://svn.slimdevices.com?rev=11402&view=rev
Log:
Bug: 4758
Description: remove digital input plugin from sppearing on non-transporter pages. fix a bug that wasn't reloading settings pages on player change, so that these changes can now take effect
Modified:
trunk/server/HTML/EN/html/common.js
trunk/server/HTML/Fishbone/html/scripts.js
trunk/server/Slim/Buttons/Home.pm
trunk/server/Slim/Plugin/DigitalInput/Plugin.pm
trunk/server/Slim/Web/Pages/Home.pm
Modified: trunk/server/HTML/EN/html/common.js
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/html/common.js?rev=11402&r1=11401&r2=11402&view=diff
==============================================================================
--- trunk/server/HTML/EN/html/common.js (original)
+++ trunk/server/HTML/EN/html/common.js Sun Feb 11 15:35:17 2007
@@ -132,9 +132,8 @@
parent.playlist.location="playlist.html?player"+newPlayer;
window.location="status_header.html?player"+newPlayer;
- if (doc.location.href.indexOf('setup') == -1 &&
- doc.location.href.indexOf('home') == -1 &&
- doc.location.href.indexOf('settings' == -1)) {
+ if (doc.location.href.indexOf('home') == -1 &&
+ doc.location.href.indexOf('settings') == -1) {
for (var j=0;j < doc.document.links.length; j++) {
var myString = new String(doc.document.links[j].href);
Modified: trunk/server/HTML/Fishbone/html/scripts.js
URL: http://svn.slimdevices.com/trunk/server/HTML/Fishbone/html/scripts.js?rev=11402&r1=11401&r2=11402&view=diff
==============================================================================
--- trunk/server/HTML/Fishbone/html/scripts.js (original)
+++ trunk/server/HTML/Fishbone/html/scripts.js Sun Feb 11 15:35:17 2007
@@ -14,7 +14,7 @@
var args = 'player='+player+'&ajaxRequest=1&s='+Math.random();
getStatusData(args, refreshNewPlayer);
- if (parent.browser.location.href.indexOf('setup') == -1) {
+ if (parent.browser.location.href.indexOf('settings') == -1) {
newHref(parent.browser.document,newPlayer);
newHref(parent.header.document,newPlayer);
newValue(parent.browser.document,unescape(player));
Modified: trunk/server/Slim/Buttons/Home.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Home.pm?rev=11402&r1=11401&r2=11402&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Home.pm (original)
+++ trunk/server/Slim/Buttons/Home.pm Sun Feb 11 15:35:17 2007
@@ -677,6 +677,11 @@
delete $menuChoices{$plugin} if defined $menuChoices{$plugin};
}
+ # Leakage from Digital Input Plugin
+ if (defined $menuChoices{'PLUGIN_DIGITAL_INPUT'} && !$client->hasDigitalIn) {
+ delete $menuChoices{'PLUGIN_DIGITAL_INPUT'};
+ }
+
for my $usedOption (@{$homeChoices{$client}}) {
delete $menuChoices{$usedOption};
}
Modified: trunk/server/Slim/Plugin/DigitalInput/Plugin.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Plugin/DigitalInput/Plugin.pm?rev=11402&r1=11401&r2=11402&view=diff
==============================================================================
--- trunk/server/Slim/Plugin/DigitalInput/Plugin.pm (original)
+++ trunk/server/Slim/Plugin/DigitalInput/Plugin.pm Sun Feb 11 15:35:17 2007
@@ -167,11 +167,16 @@
# This plugin leaks into the main server, Slim::Web::Pages::Home() needs to
# call this function to decide to show the Digital Input menu or not.
sub webPages {
- my $class = shift;
+ my $class = shift;
+ my $hasDigitalIn = shift;
my $urlBase = 'plugins/DigitalInput';
- Slim::Web::Pages->addPageLinks("browse", { 'PLUGIN_DIGITAL_INPUT' => "$urlBase/list.html" });
+ if ($hasDigitalIn) {
+ Slim::Web::Pages->addPageLinks("browse", { 'PLUGIN_DIGITAL_INPUT' => "$urlBase/list.html" });
+ } else {
+ Slim::Web::Pages->addPageLinks("browse", { 'PLUGIN_DIGITAL_INPUT' => undef });
+ }
Slim::Web::HTTP::addPageFunction("$urlBase/list.html", \&handleWebList);
Slim::Web::HTTP::addPageFunction("$urlBase/set.html", \&handleSetting);
Modified: trunk/server/Slim/Web/Pages/Home.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Web/Pages/Home.pm?rev=11402&r1=11401&r2=11402&view=diff
==============================================================================
--- trunk/server/Slim/Web/Pages/Home.pm (original)
+++ trunk/server/Slim/Web/Pages/Home.pm Sun Feb 11 15:35:17 2007
@@ -98,11 +98,8 @@
# More leakage from the DigitalInput 'plugin'
#
- # If our current player has digital inputs, show the menu.
- if ($client && $client->hasDigitalIn) {
-
- Slim::Plugin::DigitalInput::Plugin->webPages;
- }
+ # If our current player has digital inputs, show the menu only when digital Input is available
+ Slim::Plugin::DigitalInput::Plugin->webPages($client->hasDigitalIn);
$params->{'additionalLinks'} = \%Slim::Web::Pages::additionalLinks;
More information about the checkins
mailing list