@@ -193,7 +193,7 @@ document.getElementById("check-app-updates-button").onclick = function () {
193193 else if ( arg [ 0 ] === 4 ) {
194194 // downloading...
195195 var progressObj = arg [ 1 ] ;
196- var download_data = "Downloading " + progressObj . transferred + "/" + progressObj . total + " at " + ( progressObj . bytesPerSecond / 1000 ) + " kbps " ;
196+ var download_data = "Downloading " + ( Math . round ( ( progressObj . transferred / 1000000 ) * 100 ) / 100 ) + "MB /" + ( Math . round ( ( progressObj . total / 1000000 ) * 100 ) / 100 ) + "MB at " + ( Math . round ( ( progressObj . bytesPerSecond / 1000 ) * 100 ) / 100 ) + " kBps " ;
197197 var download_percent = progressObj . percent ;
198198
199199 if ( arg [ 1 ] = 100 ) {
@@ -245,21 +245,23 @@ document.getElementById("addfilebutton").onclick = function () {
245245 addFilesPrompt ( proj_name ) ;
246246}
247247
248- document . getElementById ( "projinfobutton" ) . onclick = function ( ) {
248+ document . getElementById ( "projinfobutton" ) . onclick = function ( ) { //
249249 logger . debug ( "projinfo button" ) ;
250- $ ( "#proj-info-files-ul" ) . empty ( ) ;
251- $ ( "#proj-info-files-ul" ) . html ( $ ( "#proj-files-ul" ) . html ( ) ) ;
252- $ ( "#proj-info-files-ul li" ) . removeAttr ( "onclick" ) ;
253- $ ( "#proj-info-files-ul li" ) . removeAttr ( "style" ) ;
254- $ ( "#proj-info-files-ul li" ) . removeAttr ( "data-temp" ) ;
255- $ ( "#proj-info-files-ul li" ) . removeAttr ( "data-done" ) ;
256- $ ( "#proj-info-files-ul li" ) . removeAttr ( "onmouseover" ) ;
257- $ ( "#proj-info-files-ul li" ) . removeAttr ( "onmouseout" ) ;
258- var value = $ ( "#footer-nav-btn4" ) . val ( ) ;
250+
251+ var value = $ ( "#footer-nav-btn3" ) . val ( ) ;
259252 if ( value === "information" ) {
260253 // do NOTHING
261254 }
262255 else {
256+ $ ( "#proj-info-files-ul" ) . empty ( ) ;
257+ $ ( "#proj-info-files-ul" ) . html ( $ ( "#proj-files-ul" ) . html ( ) ) ;
258+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "onclick" ) ;
259+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "style" ) ;
260+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "data-temp" ) ;
261+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "data-done" ) ;
262+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "onmouseover" ) ;
263+ $ ( "#proj-info-files-ul li" ) . removeAttr ( "onmouseout" ) ;
264+
263265 var docpath = remote . app . getPath ( 'documents' ) ;
264266 var proj_base = path . join ( docpath , 'SLIPPS DECSV\\Projects\\' + window . currentProject + '\\' ) ;
265267 var options = {
@@ -326,7 +328,7 @@ document.getElementById("projinfobutton").onclick = function () {
326328 toggleViewMode ( 10 ) ;
327329}
328330
329- document . getElementById ( "projstartbutton" ) . onclick = function ( ) {
331+ document . getElementById ( "projstartbutton" ) . onclick = function ( ) { //
330332 logger . debug ( "projectstart button" ) ;
331333 toggleViewMode ( 1 ) ;
332334 toggleViewMode ( 9 ) ;
@@ -420,8 +422,13 @@ document.getElementById("back-to-start-button").onclick = function () {
420422
421423document . getElementById ( "loginbutton" ) . onclick = function ( ) {
422424 logger . debug ( "login button" ) ;
423- toggleViewMode ( 5 ) ;
424- toggleViewMode ( 10 ) ;
425+ if ( ( $ ( '#footer-nav-btn3' ) . val ( ) === "login" ) || ( $ ( '#footer-nav-btn3' ) . val ( ) === "register" ) || ( $ ( '#footer-nav-btn3' ) . val ( ) === "forgotPW" ) ) {
426+ // do nothing. already in login.
427+ }
428+ else {
429+ toggleViewMode ( 5 ) ;
430+ toggleViewMode ( 10 ) ;
431+ }
425432}
426433
427434
@@ -532,11 +539,12 @@ tionStart == "number")
532539
533540/* Index div footer */
534541
535- document . getElementById ( "footer-nav-btn1" ) . onclick = function ( ) {
542+ document . getElementById ( "footer-nav-btn1" ) . onclick = function ( ) { //
536543 var value = $ ( this ) . val ( ) ;
537544 logger . debug ( "btn1: " + value ) ;
538545 if ( value === "preview" ) {
539- $ ( this ) . text ( "Previous file" ) ;
546+ //$(this).text("Previous file");
547+ logger . debug ( "Moving to previous file" ) ;
540548 }
541549 //preview move to previous file
542550}
@@ -545,7 +553,7 @@ document.getElementById("footer-nav-btn2").onclick = function () {
545553 logger . debug ( "btn2: " + value ) ;
546554}
547555
548- document . getElementById ( "footer-nav-btn3" ) . onclick = function ( ) {
556+ document . getElementById ( "footer-nav-btn3" ) . onclick = function ( ) { //
549557 var value = $ ( this ) . val ( ) ;
550558 logger . debug ( "btn3: " + value ) ;
551559 //create project createProjAsync();
@@ -577,9 +585,18 @@ document.getElementById("footer-nav-btn3").onclick = function () {
577585 }
578586 else if ( value === "login" ) {
579587 //login
588+ logger . debug ( "Now we would try to log in..." ) ;
589+ logger . debug ( "Username: " + $ ( "#login-username" ) . val ( ) ) ;
590+ logger . debug ( "Password: " + $ ( "#login-pass" ) . val ( ) ) ;
580591 }
581592 else if ( value === "register" ) {
582593 //register
594+ logger . debug ( "Now we would try to register..." ) ;
595+ logger . debug ( "Username: " + $ ( "#register-username" ) . val ( ) ) ;
596+ logger . debug ( "Email: " + $ ( "#register-email" ) . val ( ) ) ;
597+ logger . debug ( "Real name: " + $ ( "#register-realname" ) . val ( ) ) ;
598+ logger . debug ( "Password: " + $ ( "#register-pass" ) . val ( ) ) ;
599+ logger . debug ( "Retype Password: " + $ ( "#register-retype-pass" ) . val ( ) ) ;
583600 }
584601 else if ( value === "settings" ) {
585602 var options = {
@@ -595,6 +612,7 @@ document.getElementById("footer-nav-btn3").onclick = function () {
595612 saveSettings ( ) ;
596613 }
597614 else {
615+ //
598616 }
599617 } ) ;
600618 //save settings
607625 }
608626 else if ( value === "forgotPW" ) {
609627 //
628+ logger . debug ( "Now we would try to ask for password change..." ) ;
629+ logger . debug ( "Email: " + $ ( "#forgot-email" ) . val ( ) ) ;
610630 }
611631}
612632document . getElementById ( "footer-nav-btn4" ) . onclick = function ( ) {
@@ -647,7 +667,7 @@ document.getElementById("footer-nav-btn4").onclick = function () {
647667 updateSettingsUI ( ) ;
648668 // revert changes in settings
649669 }
650- else if ( value === "forgotPW" ) {
670+ else if ( value === "forgotPW" ) {
651671
652672 toggleViewMode ( 5 ) ;
653673 toggleViewMode ( 10 ) ;
@@ -656,7 +676,7 @@ document.getElementById("footer-nav-btn4").onclick = function () {
656676}
657677
658678document . getElementById ( "footer-nav-btn5" ) . onclick = function ( ) {
659- var value = $ ( this ) . val ( ) ;
679+ var value = $ ( this ) . val ( ) ;
660680 logger . debug ( "btn5: " + value ) ;
661681
662682 if ( value === "preview" ) {
@@ -683,12 +703,13 @@ document.getElementById("footer-nav-btn5").onclick = function () {
683703 }
684704
685705}
686- document . getElementById ( "footer-nav-btn6" ) . onclick = function ( ) {
706+ document . getElementById ( "footer-nav-btn6" ) . onclick = function ( ) { //
687707 var value = $ ( this ) . val ( ) ;
688708 logger . debug ( "btn6: " + value ) ;
689709
690710 if ( value === "preview" ) {
691- // Move to next file
711+ logger . debug ( "Moving to next file" ) ;
712+ // Move to next file QWERTY
692713 }
693714 else if ( value === "login" ) {
694715 toggleViewMode ( 14 ) ;
@@ -1905,7 +1926,7 @@ function toggleViewMode(mode) {
19051926 }
19061927 else {
19071928 $ ( "#proj-files-ul" ) . removeClass ( "element-disabled" ) ;
1908- $ ( "#file-chosen-kw-ul" ) . addClass ( "element-disabled" ) ;
1929+ $ ( "#file-chosen-kw-ul" ) . removeClass ( "element-disabled" ) ;
19091930 }
19101931
19111932 $ ( "#start-div" ) . removeClass ( "is-shown" ) ;
@@ -2029,10 +2050,8 @@ function toggleViewMode(mode) {
20292050 $ ( "#information-div" ) . removeClass ( "is-shown" ) ;
20302051 $ ( "#create-proj-div" ) . removeClass ( "is-shown" ) ;
20312052
2032- $ ( "#loginchoices_1" ) . removeClass ( "no-display" ) ;
2033- $ ( "#loginchoices_2" ) . removeClass ( "no-display" ) ;
2034- $ ( "#registerchoices_1" ) . addClass ( "no-display" ) ;
2035- $ ( "#registerchoices_2" ) . addClass ( "no-display" ) ;
2053+ $ ( "#loginchoices" ) . removeClass ( "no-display" ) ;
2054+ $ ( "#registerchoices" ) . addClass ( "no-display" ) ;
20362055
20372056 $ ( "#login-username" ) . val ( "" ) ;
20382057 $ ( "#login-pass" ) . val ( "" ) ;
@@ -2057,15 +2076,13 @@ function toggleViewMode(mode) {
20572076 $ ( "#information-div" ) . removeClass ( "is-shown" ) ;
20582077 $ ( "#create-proj-div" ) . removeClass ( "is-shown" ) ;
20592078
2060- $ ( "#loginchoices_1" ) . addClass ( "no-display" ) ;
2061- $ ( "#loginchoices_2" ) . removeClass ( "no-display" ) ;
2062- $ ( "#registerchoices_1" ) . removeClass ( "no-display" ) ;
2063- $ ( "#registerchoices_2" ) . removeClass ( "no-display" ) ;
2079+ $ ( "#loginchoices" ) . addClass ( "no-display" ) ;
2080+ $ ( "#registerchoices" ) . removeClass ( "no-display" ) ;
20642081
20652082 $ ( "#register-username" ) . val ( "" ) ;
20662083 $ ( "#register-email" ) . val ( "" ) ;
20672084 $ ( "#register-realname" ) . val ( "" ) ;
2068- $ ( "#login -pass" ) . val ( "" ) ;
2085+ $ ( "#register -pass" ) . val ( "" ) ;
20692086 $ ( "#register-retype-pass" ) . val ( "" ) ;
20702087 $ ( "#login-register-title" ) . text ( "Register" ) ;
20712088
@@ -2159,10 +2176,8 @@ function toggleViewMode(mode) {
21592176 $ ( "#information-div" ) . removeClass ( "is-shown" ) ;
21602177 $ ( "#create-proj-div" ) . removeClass ( "is-shown" ) ;
21612178
2162- $ ( "#loginchoices_1" ) . addClass ( "no-display" ) ;
2163- $ ( "#loginchoices_2" ) . addClass ( "no-display" ) ;
2164- $ ( "#registerchoices_1" ) . addClass ( "no-display" ) ;
2165- $ ( "#registerchoices_2" ) . addClass ( "no-display" ) ;
2179+ $ ( "#loginchoices" ) . addClass ( "no-display" ) ;
2180+ $ ( "#registerchoices" ) . addClass ( "no-display" ) ;
21662181
21672182 $ ( "#forgot_password_choices" ) . removeClass ( "no-display" ) ;
21682183 $ ( "#forgot-email" ) . val ( "" ) ;
@@ -2454,6 +2469,9 @@ function paintEmAll(word, mode) {
24542469// SETTING UP SELECTING WORDS
24552470function setupCensorSelect ( ) {
24562471 logger . debug ( "setupCensorSelect" ) ;
2472+ $ ( "#edit-A-edit-text .word" ) . off ( "click" ) ;
2473+ $ ( "#edit-B-edit-text .word" ) . off ( "click" ) ;
2474+ $ ( "#edit-C-edit-text .word" ) . off ( "click" ) ;
24572475
24582476 $ ( "#edit-A-edit-text .word" ) . on ( "click" , function ( ) {
24592477 //console.log($("#secBcontent").text());
0 commit comments