[Slim-Checkins] r12555 - in /trunk/server/HTML/EN: html/wizard.js settings/server/wizard.html
mherger at svn.slimdevices.com
mherger at svn.slimdevices.com
Tue Aug 14 09:03:23 PDT 2007
Author: mherger
Date: Tue Aug 14 09:03:23 2007
New Revision: 12555
URL: http://svn.slimdevices.com?rev=12555&view=rev
Log:
Bug: n/a
Description: remove the Finish button from the wizard and replace it with changing text on the Next button
Modified:
trunk/server/HTML/EN/html/wizard.js
trunk/server/HTML/EN/settings/server/wizard.html
Modified: trunk/server/HTML/EN/html/wizard.js
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/html/wizard.js?rev=12555&r1=12554&r2=12555&view=diff
==============================================================================
--- trunk/server/HTML/EN/html/wizard.js (original)
+++ trunk/server/HTML/EN/html/wizard.js Tue Aug 14 09:03:23 2007
@@ -3,6 +3,7 @@
pages = new Array('welcome', 'proxy', 'sqn', 'source', 'audiodir', 'playlistdir', 'itunes', 'musicip', 'summary');
folderselectors = new Array();
sqnValidated = false;
+ var nextBtn;
return {
init : function(){
@@ -48,15 +49,9 @@
scope: this
});
- new Ext.Button('next', {
+ this.nextBtn = new Ext.Button('next', {
text: strings['next'],
handler: this.onNext,
- scope: this
- });
-
- new Ext.Button('finish', {
- text: strings['finish'],
- handler: this.onFinish,
scope: this
});
@@ -87,14 +82,30 @@
whichPage : function(oldValue, offset){
// launch verification in the background
- if (pages[oldValue] == 'sqn') {
- this.verifySqnAccount();
+ switch (pages[oldValue]) {
+ case 'sqn' :
+ this.verifySqnAccount();
+ break;
+
+ case 'summary' :
+ if (offset > 0) {
+ document.forms.wizardForm.submit();
+ window.close();
+ }
+ else {
+ this.nextBtn.setText(strings['next']);
+ }
+
+ break;
+
+ default :
+ break;
}
newPage = oldValue + offset;
if (offset < 0) newPage = Math.max(newPage, 0);
else newPage = Math.min(newPage, pages.length-1);
-
+
switch (pages[newPage]) {
case 'proxy' :
if (!showproxy)
@@ -136,6 +147,9 @@
(Ext.get('itunes').dom.checked ? '<li>' + strings['summary_itunes'] + '</li>' : '') +
(Ext.get('musicmagic').dom.checked ? '<li>' + strings['summary_musicmagic'] + '</li>' : '')
);
+
+ this.nextBtn.setText(strings['finish']);
+
break;
default :
@@ -167,11 +181,6 @@
}
}
- },
-
- onFinish : function(){
- document.forms.wizardForm.submit();
-// window.close();
},
onLanguageChange : function(){
Modified: trunk/server/HTML/EN/settings/server/wizard.html
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/settings/server/wizard.html?rev=12555&r1=12554&r2=12555&view=diff
==============================================================================
--- trunk/server/HTML/EN/settings/server/wizard.html (original)
+++ trunk/server/HTML/EN/settings/server/wizard.html Tue Aug 14 09:03:23 2007
@@ -5,29 +5,6 @@
<title>[% "SLIMSERVER" | string %]</title>
<link rel="stylesheet" type="text/css" href="/html/ext/resources/css/ext-all.css" />
- <script type="text/javascript" src="/html/ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="/html/ext/ext-all.js"></script>
-
- <script type="text/javascript">
- var showproxy = [% showProxy ? "true" : "false" %];
- var showitunes = [% showiTunes ? "true" : "false" %];
- var showmusicip = [% showMusicIP ? "true" : "false" %];
-
- var strings = new Array();
- strings['previous'] = "[% "SETUP_WIZARD_PREVIOUS" | string %]";
- strings['next'] = "[% "SETUP_WIZARD_NEXT" | string %]";
- strings['finish'] = "[% "SETUP_WIZARD_FINISH" | string %]";
- strings['sn_verify'] = "[% "SETUP_WIZARD_SQN_VERIFY" | string %]";
- strings['sn_success'] = "[% "SETUP_SN_VALID_LOGIN" | string %]";
-
- strings['summary_none'] = "[% "NONE" | string %]";
- strings['summary_audiodir'] = "[% "SETUP_AUDIODIR" | string %][% "COLON" | string %]";
- strings['summary_itunes'] = "[% "ITUNES_DESC" | string %]";
- strings['summary_musicmagic'] = "[% "MUSICMAGIC_DESC" | string %]";
- </script>
-
- <script type="text/javascript" src="/html/fileselector.js"></script>
- <script type="text/javascript" src="/html/wizard.js"></script>
<style type="text/css">
<!--
@@ -267,6 +244,30 @@
</head>
<body>
+ <script type="text/javascript" src="/html/ext/adapter/ext/ext-base.js"></script>
+ <script type="text/javascript" src="/html/ext/ext-all.js"></script>
+
+ <script type="text/javascript">
+ var showproxy = [% showProxy ? "true" : "false" %];
+ var showitunes = [% showiTunes ? "true" : "false" %];
+ var showmusicip = [% showMusicIP ? "true" : "false" %];
+
+ var strings = new Array();
+ strings['previous'] = "[% "SETUP_WIZARD_PREVIOUS" | string %]";
+ strings['next'] = "[% "SETUP_WIZARD_NEXT" | string %]";
+ strings['finish'] = "[% "SETUP_WIZARD_FINISH" | string %]";
+ strings['sn_verify'] = "[% "SETUP_WIZARD_SQN_VERIFY" | string %]";
+ strings['sn_success'] = "[% "SETUP_SN_VALID_LOGIN" | string %]";
+
+ strings['summary_none'] = "[% "NONE" | string %]";
+ strings['summary_audiodir'] = "[% "SETUP_AUDIODIR" | string %][% "COLON" | string %]";
+ strings['summary_itunes'] = "[% "ITUNES_DESC" | string %]";
+ strings['summary_musicmagic'] = "[% "MUSICMAGIC_DESC" | string %]";
+ </script>
+
+ <script type="text/javascript" src="/html/fileselector.js"></script>
+ <script type="text/javascript" src="/html/wizard.js"></script>
+
<div id="mainbody">
<div id="header">
@@ -437,7 +438,6 @@
<tr>
<td><span id="previous"></span></td>
<td><span id="next"></span></td>
- <td><span id="finish"></span></td>
<tr>
</table>
</div>
More information about the checkins
mailing list