Minor enhancements
authorEugene Ostroukhov <eugeneo@symbian.org>
Tue, 02 Nov 2010 10:44:05 -0700
changeset 2 2da62bb63910
parent 1 8452783e7980
child 3 b43377c07b0c
Minor enhancements
Eggtimer/basic.css
Eggtimer/basic.js
Eggtimer/images/button.png
Eggtimer/index.html
--- a/Eggtimer/basic.css	Mon Nov 01 14:47:36 2010 -0700
+++ b/Eggtimer/basic.css	Tue Nov 02 10:44:05 2010 -0700
@@ -9,16 +9,6 @@
 	font-size: xx-large;
 }
 
-#pausestart {
-	height: 32px;
-	width: 32px;
-	position: relative;
-	right: -138px;
-	top: -32px;
-	background-image: url('images/button.png');
-	background-position: 0px 32px
-}
-
 .digits {
 	width: 3ex;
 	text-align: center;
--- a/Eggtimer/basic.js	Mon Nov 01 14:47:36 2010 -0700
+++ b/Eggtimer/basic.js	Tue Nov 02 10:44:05 2010 -0700
@@ -4,8 +4,8 @@
 
 var SETUP_ID = 1;
 
-var timervalue = 60;
-var initialTimer = 60;
+var timervalue = 30;
+var initialTimer = 30;
 var timeoutId = null;
 var paused = true;
 var displayUp = true;
@@ -15,6 +15,7 @@
 	showMainWindow();
 	widget.setDisplayPortrait();
 	watchSensorNotifications();
+	startTimer();
 }
 
 // Call this function to add a callback that will be notified of orientation
@@ -123,9 +124,6 @@
 	if (timervalue > 0) {
 		timervalue = timervalue - 1;
 		showValues();
-		if (timervalue == 0) {
-			cancelTimer();
-		}
 	}
 }
 
@@ -161,20 +159,4 @@
 	var item = menu.getMenuItemById(SETUP_ID);
 	menu.remove(item);
 	menu.setRightSoftkeyLabel("Cancel", showMainWindow);
-}
-
-
-function pauseStart() {
-	if (paused) {
-		startCountdown();
-		document.getElementById("pausestart").style.backgroundPosition = "0px 0px";
-		paused = false;
-	} else {
-		if (timeoutId) {
-			window.clearInterval(timeoutId);
-			timeoutId = null;
-		}
-		document.getElementById("pausestart").style.backgroundPosition = "0px 32px";
-		paused = true;
-	}
 }
\ No newline at end of file
Binary file Eggtimer/images/button.png has changed
--- a/Eggtimer/index.html	Mon Nov 01 14:47:36 2010 -0700
+++ b/Eggtimer/index.html	Tue Nov 02 10:44:05 2010 -0700
@@ -11,8 +11,7 @@
 <body onload="javascript:init();">
 <div id="main-window">
 	<div id="remaining-time">
-	<div id="time" ><a href="javascript:showTimerSetup()" id="timervalue">00:01:00</a></div>
-	<div id="pausestart" onclick="pauseStart()">&nbsp;</div>
+	<div id="time" ><a href="javascript:showTimerSetup()" id="timervalue">00:00:30</a></div>
 	</div>
 	<div id="hourglass">
 		<div id="sand">&nbsp;</div>
@@ -22,7 +21,7 @@
 </div>
 <div id="time-setup">
 	Specify time: 
-	<input id="hrs" class="digits" value="00"/>:<input id="min" class="digits" value="01"/>:<input id="sec" class="digits" value="00"/>
+	<input id="hrs" class="digits" value="00"/>:<input id="min" class="digits" value="00"/>:<input id="sec" class="digits" value="30"/>
 	<input type="button" value="Start" onclick="startTimer()"/><input type="button" value="Cancel" onclick="showMainWindow()"/>
 </div>
 </body>