[Slim-Checkins] r12578 - in /trunk/server/HTML/Maestro: html/index.js index.html

mherger at svn.slimdevices.com mherger at svn.slimdevices.com
Thu Aug 16 08:51:13 PDT 2007


Author: mherger
Date: Thu Aug 16 08:51:13 2007
New Revision: 12578

URL: http://svn.slimdevices.com?rev=12578&view=rev
Log:
Bug: n/a
Description: toggle play/pause button

Modified:
    trunk/server/HTML/Maestro/html/index.js
    trunk/server/HTML/Maestro/index.html

Modified: trunk/server/HTML/Maestro/html/index.js
URL: http://svn.slimdevices.com/trunk/server/HTML/Maestro/html/index.js?rev=12578&r1=12577&r2=12578&view=diff
==============================================================================
--- trunk/server/HTML/Maestro/html/index.js (original)
+++ trunk/server/HTML/Maestro/html/index.js Thu Aug 16 08:51:13 2007
@@ -90,6 +90,11 @@
 							Ext.get('ctrlCurrentArt').update('<img src="/music/' + result.playlist_loop[0].id + '/cover_96x96.jpg">');
 						}
 		
+						modeImg = '<img src="' + webroot + 'html/images/' + (result.mode=='play' ? 'btn_pause_normal.png' : 'btn_pause_normal.png') + '">';
+						el = Ext.get('ctrlMode');
+						el.update(modeImg);
+						Ext.get('ctrlMode').update('<img src="' + webroot + 'html/images/' + (result.mode=='play' ? 'btn_play_normal.png' : 'btn_pause_normal.png') + '">');
+
 						playerStatus = {
 							power: result.power,
 							mode: result.mode,
@@ -208,7 +213,8 @@
 		},
 
 		ctrlNext : function(){ this.playerControl(['playlist', 'index', '+1']) },
-		ctrlPrevious : function(){ this.playerControl(['playlist', 'index', '-1']) }
+		ctrlPrevious : function(){ this.playerControl(['playlist', 'index', '-1']) },
+		ctrlTogglePause : function(){ this.playerControl(['pause']) }
 
 	};   
 }();

Modified: trunk/server/HTML/Maestro/index.html
URL: http://svn.slimdevices.com/trunk/server/HTML/Maestro/index.html?rev=12578&r1=12577&r2=12578&view=diff
==============================================================================
--- trunk/server/HTML/Maestro/index.html (original)
+++ trunk/server/HTML/Maestro/index.html Thu Aug 16 08:51:13 2007
@@ -89,7 +89,7 @@
 														<tr>
 															<td><img src="[% webroot %]html/images/btn_previous_normal.png" alt="" height="22" width="28" border="0" onclick="Main.ctrlPrevious();" /></td>
 															<td><img src="[% webroot %]html/images/spacer.gif" alt="" height="10" width="5" border="0" /></td>
-															<td><img src="[% webroot %]html/images/btn_play_normal.png" alt="" height="22" width="51" border="0" /></td>
+															<td id="ctrlMode" onclick="Main.ctrlTogglePause();"><img src="[% webroot %]html/images/btn_play_normal.png" alt="" height="22" width="51" border="0" /></td>
 															<td><img src="[% webroot %]html/images/spacer.gif" alt="" height="10" width="5" border="0" /></td>
 															<td><img src="[% webroot %]html/images/btn_next_normal.png" alt="" height="22" width="28" border="0" onclick="Main.ctrlNext();" /></td>
 														</tr>



More information about the checkins mailing list