Skip to content

Commit 1ce19e1

Browse files
committed
more cosmetic updates
1 parent 79109d8 commit 1ce19e1

7 files changed

Lines changed: 33 additions & 35 deletions

File tree

‎v3/composingprograms.html‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080

8181
<div id="signinButton" style="font-size: 8pt;">
8282
<div style="width: 200px; margin-bottom: 8px;">
83-
Teaching staff can sign in with either their Berkeley email or Google
84-
account to identify themselves when chatting.
83+
[Optional] Sign in with either a Berkeley email or Google account to
84+
set your chat username.
8585
</div>
8686

8787
<span
@@ -99,20 +99,19 @@
9999
<button id="signoutButton" style="font-size: 8pt; margin-top: 5px;">Sign out to chat anonymously</button>
100100
</div>
101101

102-
103-
<div>
104102
<button id="sharedSessionBtn" type="button" class="togetherjsBtn">
105103
Start a shared session
106104
</button>
107-
</div>
108105

109-
<div>
110-
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn" style="display: none;">
111-
End shared session
112-
</button>
113-
</div>
106+
<div id="sharedSessionDisplayDiv" style="display: none;">
107+
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn">
108+
End shared session
109+
</button>
114110

115-
<div><button id="syncBtn" type="button" style="display: none;">Force sync</button></div>
111+
<div style="width: 200px; font-size: 8pt; color: #666; margin-top: 5px;">
112+
Your chat logs and code may be recorded, anonymized, and published for research.
113+
</div>
114+
</div>
116115

117116
</td>
118117

‎v3/csc108h.html‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,16 @@
8282
</button>
8383
</div>
8484

85-
<div>
86-
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn" style="display: none;">
87-
End shared session
88-
</button>
85+
<div id="sharedSessionDisplayDiv" style="display: none;">
86+
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn">
87+
End shared session
88+
</button>
89+
90+
<div style="width: 200px; font-size: 8pt; color: #666; margin-top: 5px;">
91+
Your chat logs and code may be recorded, anonymized, and published for research.
92+
</div>
8993
</div>
9094

91-
<div><button id="syncBtn" type="button" style="display: none;">Force sync</button></div>
92-
9395
</td>
9496

9597
<td valign="top" style="padding-left: 20px;">

‎v3/js/composingprograms.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ What did you just learn? <input type="text" id="what-learned" class="surveyQ" si
6161

6262
function TogetherjsReadyHandler() {
6363
populateTogetherJsShareUrl();
64-
$("#togetherjsStatus").append(informedConsentText);
6564
$("#togetherjsStatus").append(postSessionSurvey);
6665

6766
updateChatName();

‎v3/js/csc108h.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ var originFrontendJsFile = 'csc108h.js';
4444

4545
function TogetherjsReadyHandler() {
4646
populateTogetherJsShareUrl();
47-
$("#togetherjsStatus").append(informedConsentText);
4847
}
4948

5049
function TogetherjsCloseHandler() {

‎v3/js/opt-frontend-common.js‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ var pendingCodeOutputScrollTop = null;
102102
var codeMirrorScroller = '#codeInputPane .CodeMirror-scroll';
103103

104104

105-
var informedConsentText = '<div style="font-size: 8pt; color: #666;">Your chat logs and code may be recorded, anonymized, and published for research purposes.</div>';
106-
107-
108105
function requestSync() {
109106
if (TogetherJS.running) {
110107
togetherjsSyncRequested = true;
@@ -373,14 +370,13 @@ function initTogetherJS() {
373370

374371
$("#sharedSessionBtn").click(startSharedSession);
375372
$("#stopTogetherJSBtn").click(TogetherJS); // toggles off
376-
$("#syncBtn").click(requestSync);
377373

378374
// fired when TogetherJS is activated. might fire on page load if there's
379375
// already an open session from a prior page load in the recent past.
380376
TogetherJS.on("ready", function () {
381377
console.log("TogetherJS ready");
382378

383-
$("#stopTogetherJSBtn,#syncBtn").show();
379+
$("#sharedSessionDisplayDiv").show();
384380
$("#sharedSessionBtn").hide();
385381

386382
requestSync(); // immediately try to sync upon startup so that if
@@ -398,7 +394,7 @@ function initTogetherJS() {
398394
console.log("TogetherJS close");
399395

400396
$("#togetherjsStatus").html(''); // clear it
401-
$("#stopTogetherJSBtn,#syncBtn").hide();
397+
$("#sharedSessionDisplayDiv").hide();
402398
$("#sharedSessionBtn").show();
403399

404400
TogetherjsCloseHandler(); // needs to be defined in each frontend
@@ -425,13 +421,16 @@ function populateTogetherJsShareUrl() {
425421
var cleanUrl = $.param.fragment(location.href, {}, 2 /* override */);
426422
var urlToShare = cleanUrl + 'togetherjs=' + TogetherJS.shareId();
427423
$("#togetherjsStatus").html('<div>\
428-
Copy and send this URL to let someone (e.g., a tutor or friend) join your live session:\
424+
Copy and send this URL to let someone (e.g., a tutor or friend) join your session:\
429425
</div>\
430426
<input type="text" style="font-size: 10pt; \
431427
font-weight: bold; padding: 3px;\
432428
margin-bottom: 6pt;" \
433-
id="togetherjsURL" size="80" readonly="readonly"/>');
429+
id="togetherjsURL" size="80" readonly="readonly"/>\
430+
<button id="syncBtn" type="button">Force sync</button>\
431+
');
434432
$("#togetherjsURL").val(urlToShare).attr('size', urlToShare.length + 20);
433+
$("#syncBtn").click(requestSync);
435434
}
436435

437436
// END - shared session stuff

‎v3/js/opt-frontend.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ function TogetherjsReadyHandler() {
8989
else {
9090
populateTogetherJsShareUrl();
9191
}
92-
93-
$("#togetherjsStatus").append(informedConsentText);
9492
}
9593

9694
function TogetherjsCloseHandler() {

‎v3/visualize.html‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,15 @@
109109
</button>
110110
</div>
111111

112-
<div>
113-
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn" style="display: none;">
114-
End shared session
115-
</button>
116-
</div>
112+
<div id="sharedSessionDisplayDiv" style="display: none;">
113+
<button id="stopTogetherJSBtn" type="button" class="togetherjsBtn">
114+
End shared session
115+
</button>
117116

118-
<div><button id="syncBtn" type="button" style="display: none;">Force sync</button></div>
117+
<div style="width: 200px; font-size: 8pt; color: #666; margin-top: 5px;">
118+
Your chat logs and code may be recorded, anonymized, and published for research.
119+
</div>
120+
</div>
119121

120122
</td>
121123
<td valign="top" style="padding-left: 20px;">

0 commit comments

Comments
 (0)