Skip to content

Commit 549100c

Browse files
committed
Sync app project with current full app
1 parent 590e843 commit 549100c

5 files changed

Lines changed: 28 additions & 23 deletions

File tree

OSX_build/MacGap1/MacGap/JS Timer-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.1</string>
20+
<string>2.1</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

OSX_build/MacGap1/MacGap/en.lproj/Credits.rtf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400
2-
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\froman\fcharset0 Times-Roman;}
1+
{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
2+
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\froman\fcharset0 Times-Roman;}
33
{\colortbl;\red255\green255\blue255;}
44
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
55
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
@@ -11,6 +11,7 @@
1111
Uses the following libraries and components:\
1212
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720
1313
\ls1\ilvl0\cf0 {\listtext \'95 }Chart.js by Nick Downie (www.chartjs.org)\
14+
{\listtext \'95 }jQuery by the jQuery foundation\
1415
\pard\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
1516
\cf0 \
1617
This Mac App release uses code form the MacGap project.\

OSX_build/MacGap1/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div id="presets" class="runpreset">
1717
</div>
1818
<div id="stdButtons" class="runpreset">
19-
<button id="demo" onClick="startTimer(10,5)">Demo<br/>10s / 5s</button>
19+
<button id="demo" onClick="setTimer(10,5)">Demo<br/>10s / 5s</button>
2020
<button onClick="showClock()">Real-time<br/>clock</button>
2121
</div>
2222
<hr/>
@@ -32,7 +32,7 @@
3232
Use Q&amp;A
3333
</form>
3434
<div class="runpreset">
35-
<button onClick="startTimer(0,0)">Resume countdown</button>
35+
<button onClick="beginTiming()">Resume countdown</button>
3636
</div>
3737
<hr/>
3838
<button onClick="goConfigure()">Configure</button>

OSX_build/MacGap1/public/timer.js

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,10 @@ function pageStartup() {
3333
}
3434

3535
function userTimer(F) {
36-
startTimer(F.userTalk.value*60, F.userQA.value*60);
36+
setTimer(F.userTalk.value*60, F.userQA.value*60);
3737
}
38-
function startTimer(talkSecs, qaSecs) {
39-
elapsed=0;
40-
qaTime=0;
41-
if (talkSecs>0) {
42-
$("#mode").html(jstConfig["presVocab"]);
43-
ticks=talkSecs;
44-
talkPart=1;
45-
qaTime=qaSecs;
46-
} else {
47-
if (qaSecs>0) {
48-
$("#mode").html(jstConfig["qaVocab"]);
49-
talkPart=2;
50-
ticks=qaSecs;
51-
}
52-
}
38+
// Just start timing - don't reset the counters
39+
function beginTiming() {
5340
updateDisplay();
5441
$("#graphholder").show("slow");
5542
$("#gui").hide("fast");
@@ -59,6 +46,23 @@ function startTimer(talkSecs, qaSecs) {
5946
clearInterval(counter);
6047
counter=setInterval(timerFunc, 1000);
6148
}
49+
// Set the timing counters and start the clock timing
50+
function setTimer(talkSecs, qaSecs) {
51+
qaTime=0;
52+
if (talkSecs>0) {
53+
elapsed=0;
54+
$("#mode").html(jstConfig["presVocab"]);
55+
ticks=talkSecs;
56+
talkPart=1;
57+
qaTime=qaSecs;
58+
} else if (qaSecs>0) {
59+
elapsed=0;
60+
$("#mode").html(jstConfig["qaVocab"]);
61+
talkPart=2;
62+
ticks=qaSecs;
63+
}
64+
beginTiming();
65+
}
6266
function updateDisplay() {
6367
var clock=$("#timer");
6468
var x=document.getElementById('autoQA');
@@ -149,7 +153,7 @@ function setupGui() {
149153
var p=jstConfig.presets[i];
150154
psec=p.pres*60;
151155
qsec=p.qa*60;
152-
bStr="<button id='preset"+i+"' onClick='startTimer("+psec+","+
156+
bStr="<button id='preset"+i+"' onClick='setTimer("+psec+","+
153157
qsec+")'>"+p.name+"<br/>"+p.pres+" / "+p.qa+"</button>";
154158
presetpane.append(bStr);
155159
}
@@ -192,7 +196,7 @@ function handleKey(evt) {
192196
// Space bar - pause, or resume
193197
case 32:
194198
if(running) { showGui(); }
195-
else { startTimer(0,0); }
199+
else { beginTiming(); }
196200
break;
197201
// C key - display clock
198202
case 99:

0 commit comments

Comments
 (0)