2438,6,159,15,243,40,122,36,176,32,346,33,412,51,604,40,445,27,712,32,550,6,2143,14,135,18,161,8,2736,17,155,24,410,18,173,23,767,24,1256,21,1427,28,129,43,342,35,509,22,447,49,1118,23,378,41,686,52,754,56,407,93,317,75,609,67,73,97,557,113,255,113,591,117,216,111,231,90,289,85,337,100,609,115,182,103,131,105,117,109,385,109,442,103,357,107,97,94,842,108,629,94,129,88,613,105,333,87,524,84,374,85,450,113,487,94,1062,85,312,93,358,85,308,95,146,97,418,82,295,86,106,65,828,40,177,43,246,59,933,30,409,37,98,24,335,18,2712,29,452,33,446,47,245,42,742,47,142,19,1042,32,172,40,293,32,694,28,1472,22,213,44,166,53,295,47,459,55,365,32,271,28,1101,22,154,30,4665,54,576,55,735,56,564,37,1008,31,332,23,1846,30,317,48,810,56,465,71,232,50,190,41,783,48,204,37,299,24,286,27,3084,40,52,61,349,54,903,39,824,63,593,67,121,72,745,88,313,80,355,66,110,74,118,62,496,84,1044,95,589,83,421,66,649,80,211,71,454,65,110,61,328,47,714,55,139,44,365,76,321,67,758,48,373,28,448,17,341,36,458,18,674,30,293,31,438,34,275,35,508,21,189,22,274,26,718,51,450,58,759,35,229,39,117,41,103,27,341,20,489,44,523,40,272,44,678,38,208,27,594,21,239,27,2421,44,558,34,1257,48,252,57,972,51,262,37,695,28,415,19,447,22,677,17,224,32,2121,56,496,57,500,39,1003,33,419,18,191,21,3617,44,262,40,249,45,220,41,373,54,200,43,154,43,158,28,1232,37,138,32,669,35,321,22,223,34,4598,52,589,56,194,41,1186,50,1656,35,326,25,505,50,167,38,2754,41,842,42,601,45,120,37,621,40,258,26,1147,36,610,16,1466,33,613,62,751,28,348,23,734,17,732,22,1897,41,584,38,650,43,311,40,808,29,573,23,221,27,240,39,772,58,988,35,907,20,3480,21,575,23,360,42,462,24,681,19,191,20,239,21,267,25,1908,47,572,51,1652,32,365,26,164,28,1432,35,4601,58,571,44,1995,29,393,16,245,17,203,18,492,31,114,39,144,32,191,41,176,40,163,44,432,49,159,53,427,41,478,42,316,46,210,46,134,38,371,46,208,32,532,44,223,59,192,37,1691,55,246,39,879,48,513,41,197,47,241,39,138,34,640,51,210,29,461,41,220,45,157,44,102,45,124,31,747,48,144,50,402,46,130,40,499,19,770,22,2014,29,1915,23,177,33,115,24,954,31,596,42,179,34,439,48,305,40,311,38,155,25,373,19,482,26,698,35,238,20,338,26,257,45,1186,57,133,63,423,52,373,47,420,56,1519,43,971,55,133,56,282,45,356,54,1286,52,117,56,502,77,185,61,195,57,135,54,227,40,2853,52,121,69,522,54,1049,59,204,53,310,51,1071,54,90,58,584,52,388,53,277,42,456,47,167,32,4082,27,243,17,180,18,238,17,674,24,765,18,339,20,1481,42,832,46,1311,27,499,21,245,19,437,32,615,20,383 _info {"project":"app01-settings","branch":"master","version":146,"versionDate":"2024-05-21T09:32:17.000Z","fromVersion":0,"reset":true,"checksumDocs":"339-219301"} 0_shared/_t.ls (function(){ return { settings: { de: "Einstellungen", en: "Settings", fr: "Paramètres", es: "Ajustes", pt: "Configurações" }, settingsUrl: { de: "einstellungen", en: "settings", fr: "parametres", es: "ajustes", pt: "configuracoes" } }; })(); 0_shared/_urlDescription/description.ls (function(){ return function(){ return { pageUrl: T("settingsUrl"), title: T("settings"), metaDescription: "" }; }; })(); 0_shared/addonTopbar/addonTopbar.ls (function(){ return function(o){ return inc("/../app01/addons/topbar2/topbar")({ back: o.back || true, backLabel: o.backLabel || T("settings"), title: o.mainTitle }); }; })(); 0_shared/deviceLogVarRow/row.ls (function(){ return function(varName){ var value, click, row; value = deviceLog['var'](varName) || false; click = function(){ deviceLog['var'](varName, !value); return row.replaceWith(inc(THISFILE)(varName)); }; return row = inc("../genericRow/row")({ type: "button", labelLeft: varName, labelRight: JSON.stringify(value) }).tap(click); }; })(); 0_shared/genericRow/icon/icon.ls (function(){ return function(o){ var svgs, svg; if (!o.type && !o.icon) { return; } svgs = { page: path("/../app01/lib/svg/icon/arrow-right-small.svg") }; svg = o.icon || svgs[o.type]; if (!svg) { return; } return SvgIcon({ svg: svg, color: !o.noIconColor ? Color.grey[400] : void 8, width: "1em" }).addClass("icon").css({ flex: "0 0 auto", marginTop: "0.14em", marginLeft: "0.25em", height: "100%" }); }; })(); 0_shared/genericRow/labelLeftAndSecondary/label.ls (function(){ return function(o){ var that; if ((o != null ? o.labelLeft : void 8) == null) { return; } return Div({ flex: "1 1 auto", textAlign: "left", display: "flex", flexDirection: "column", alignItems: "flex-start", minWidth: o.labelLeftSecondary ? "50%" : void 8 }).append(Div({ flex: "1 1 auto", maxWidth: "100%", color: o.labelColor || Color.black }).secureHtml(o.labelLeft), (that = o.labelLeftSecondary) ? Div({ flex: "1 1 auto", color: o.labelColor || Color.grey[550], paddingTop: "0.2em", overflow: "hidden", textOverflow: "ellipsis", maxWidth: "100%" }).secureHtml(that) : void 8); }; })(); 0_shared/genericRow/labelRight/label.ls (function(){ return function(o){ var div; if ((o != null ? o.labelRight : void 8) == null) { return; } div = Div({ flex: "1 1 auto", textAlign: "right", color: o.labelColor || Color.grey[600], overflow: "hidden", textOverflow: "ellipsis", marginLeft: "1em", minWidth: "4em", maxWidth: "100%" }); if (_.isString(o.labelRight) || !_.isObject(o.labelRight)) { return div.secureHtml(o.labelRight); } else { return div.html(o.labelRight); } }; })(); 0_shared/genericRow/row.ls (function(){ return function(o){ var click, div, b, left, right; click = function(){ if (o.type === "page" && (o != null && o.page)) { return startPage({ path: o.page, animation: o.animation || "slideLeft", params: o.params }); } }; div = Div({ display: "flex", justifyContent: "flex-start", borderTop: b = "1px solid " + Color.grey[150], borderBottom: b, marginTop: "-1px", padding: "1em 0.5em 1em 0.5em", textAlign: "left", lineHeight: "1.5em", cursor: o != null && o.type ? "pointer" : void 8 }).append(left = inc("labelLeftAndSecondary/label")(o), right = inc("labelRight/label")(o), inc("icon/icon")(o)); if (o != null && o.type) { div.tap(click); } div.left = left; div.right = right; return div; }; })(); 0_shared/separator/separator.ls (function(){ return function(o){ return Div({ display: "flex", margin: "1.5em", fontWeight: "bold" }).html(Div({ flex: "1 1 auto" }), o != null && o.icon ? SvgIcon({ svg: o.icon, color: Color.grey[400], width: "1.2em", height: "1.2em" }).css({ marginRight: o != null && o.label ? "0.2em" : void 8 }) : void 8, o != null && o.label ? Div({ flex: "0 0 auto" }).html(o.label) : void 8, !(o != null && o.icon) && !(o != null && o.label) ? Div({ width: "3em", borderBottom: "1px solid " + Color.grey[500] }) : void 8, Div({ flex: "1 1 auto" })); }; })(); _t.ls (function(){ return { deviceSettings: { de: "Geräte-Einstellungen", en: "Device Settings", fr: "Paramètres de l'appareil", es: "Ajustes del dispositivo", pt: "Configurações do dispositivo" }, debugSettings: { de: "Debug-Einstellungen", en: "Debug Settings", fr: "Paramètres Debug", es: "Ajustes-Debug", pt: "Configurações-Debug" }, classKitSettings: { de: "ClassKit-Einstellungen", en: "ClassKit Settings", fr: "Paramètres ClassKit", es: "Ajustes-ClassKit", pt: "Configurações-Classkit" }, info: { de: "Informationen", en: "Information", fr: "Informations", es: "Información", pt: "Informações" }, userSettings: { de: "Nutzerkonto-Einstellungen", en: "Account Settings", fr: "Paramètres du compte", es: "Ajustes de cuenta", pt: "Configurações de conta" }, advancedSettings: { de: "Erweiterte Einstellungen", en: "Advanced Settings", fr: "Paramètres avancés", es: "Configuración avanzada", pt: "Configuração avançada" }, loginSettings: { de: "Anmeldung und Sicherheit", en: "Login and Security", fr: "Connexion et sécurité", es: "Acceso y seguridad", pt: "Acesso e segurança" }, continueButton: { de: "Weiter", en: "Continue", fr: "Continuer", es: "Continuar", pt: "Continuar" }, closeButton: { de: "Schließen", en: "Close", fr: "Fermer", es: "Cerrar", pt: "Fechar" }, cancelButton: { de: "Abbrechen", en: "Cancel", fr: "Annuler", es: "Cancelar", pt: "Cancelar" }, backButton: { de: "Zurück", en: "Back", fr: "Retour", es: "Volver", pt: "Voltar" }, yes: { de: "Ja", en: "Yes", fr: "Oui", es: "Sí", pt: "Sim" }, no: { de: "Nein", en: "No", fr: "Non", es: "No", pt: "Não" }, ok: { de: "Ok", en: "Ok", fr: "OK", es: "Ok", pt: "Ok" }, change: { de: "Ändern", en: "Change", fr: "Changer", es: "Cambiar", pt: "Modificar" }, errorCaptchaFailed: { de: "Sicherheitsprüfung nicht bestanden", en: "Security check failed.", fr: "Le contrôle de sécurité a échoué.", es: "Control de seguridad no aprobado", pt: "Falha na verificação de segurança" }, errorMessage: { de: "Ups, etwas ist schief gegangen.", en: "Oops, something went wrong here.", fr: "Oups… il y a eu un problème.", es: "¡Ups! Algo no salió bien.", pt: "Ops! Algo deu errado aqui." } }; })(); _topbar/_t.ls (function(){ return { settings: { de: "Einstellungen", en: "Settings", fr: "Paramètres", es: "Ajustes", pt: "Configurações" } }; })(); _topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ close: true, closeLabel: T("closeButton"), title: T("settings") }); }; })(); page.ls (function(){ var separator; separator = inc("0_shared/separator/separator"); return function(page){ page.userDescription = inc("/../app01/data/user/calcUserDescription/calc")(); return { top: function(){ return inc("_topbar/topbar")(page); }, urlDescription: function(){ return inc("0_shared/_urlDescription/description")(); }, start: function(){ var div; return page.append(div = Div({ display: "inline-block", maxWidth: "95%", width: "35em", marginTop: "-1px", marginBottom: "2em" }).append(inc("rows/avatar/row")(page), inc("rows/role/row")(page), inc("rows/title/row")(page), inc("rows/name/row")(page), inc("rows/surname/row")(page), separator({ label: T("loginSettings"), icon: path("/../app01/lib/svg/shape/security.svg") }), inc("rows/loginCode/row")(), inc("rows/uniqName/row")(page), inc("rows/email/row")(), inc("rows/phoneNumber/row")(), inc("rows/password/row")(), inc("rows/loginCodeNeedsPassword/row")(), inc("rows/markForDelete/row")(), inc("rows/exportUserData/row")(), separator({ label: T("userSettings"), icon: path("/../app01/lib/svg/shape/user.svg") }), inc("rows/guiLanguageUser/row")(), inc("rows/school/row")(), inc("rows/teacherDirCode/row")(), inc("rows/audioVolume/row")(page), inc("rows/soundEffects/row")(page), inc("rows/levelFinishPageStyle/row")(), inc("rows/adjustCoins/row")(page), inc("rows/redeemVoucher/row")(), inc("rows/antonPlus/row")(page), inc("rows/restorePurchases/row")(page), inc("rows/newsletter/row")(), separator({ label: T("deviceSettings"), icon: inc("/../app01/lib/util/isDesktop/isDesktop")() ? path("/../app01/lib/svg/shape/device-computer.svg") : path("/../app01/lib/svg/shape/phone.svg") }), inc("rows/deviceRememberUser/row")(), inc("rows/deviceUsers/row")(), inc("rows/fontSize/row")(), inc("rows/enableVibrationEffects/row")(), inc("rows/downloadManager/row")(page), window.ClassKitPlugin != null ? inc("rows/schoolWork/row")() : void 8, separator({ label: T("info"), icon: path("/../app01/lib/svg/shape/help.svg") }), engine.guiLanguage === "de" ? inc("rows/jobs/row")() : void 8, inc("rows/privacy/row")(), inc("rows/terms/row")(), inc("rows/about/row")(), inc("rows/version/row")(), engine.isDebug ? [ separator({ label: T("debugSettings"), icon: path("/../app01/lib/svg/shape/debug.svg") }), inc("rows/logId/row")(), inc("rows/publicId/row")(), inc("rows/isTeacher/row")(), inc("rows/isBeta/row")(), inc("rows/bodyScale/row")(), inc("rows/showBottomFreezeZone/row")(), inc("rows/exitKiosk/row")() ] : void 8, page.userDescription.isSolocodeMember ? [ separator({ label: "Solocode-Settings", icon: path("/../app01/lib/svg/shape/debug.svg") }), inc("rows/contentAuthorPreset/row")(), inc("rows/openDebugPopup/row")(), inc("rows/debugCode/row")() ] : void 8)); } }; }; })(); rows/about/_t.ls (function(){ return { imprint: { de: "Impressum", en: "Legal notice", fr: "Mentions légales", es: "Menciones legales", pt: "Informações legais" } }; })(); rows/about/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("imprint") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.append(Div({ width: "35em", maxWidth: "90%", margin: "1em auto" }).append(inc("/../app01/pages/static/about/aboutDiv/div")())); } }; }; })(); rows/about/row.ls (function(){ return function(page){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("imprint") }); }; })(); rows/adjustCoins/_t.ls (function(){ return { coins: { de: "Münzen", en: "Coins", fr: "Pièces", es: "Fichas", pt: "Moedas" }, coinsDirTeachers: { de: "Münzen zum Ausprobieren für Schullizenz-Lehrkräfte", en_gb: "Trial coins for teachers with an ANTON School Licence", en: "Trial coins for teachers with an ANTON School License", fr: "Pièces d'essai offertes aux professeur·es ayant la licence scolaire", es: "Fichas de prueba para docentes con licencia escolar", pt: "Moedas de teste para professores com Licença Escolar" }, maxWarning: { de: "Maximalanzahl an Testmünzen erreicht.", en: "Maximum number of test coins reached.", fr: "Nombre maximal de pièces d'essai atteint.", es: "Número máximo de monedas de prueba alcanzado.", pt: "Número máximo de moedas de teste atingido." } }; })(); rows/adjustCoins/row.ls (function(){ return function(page){ var schools, dirTeacherSchools, startCoins, adjustCoins, button, row, number; schools = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); dirTeacherSchools = _.filter(schools, function(d){ return (d != null ? d.dirRole : void 8) === "teacher"; }); if (dirTeacherSchools.length === 0) { return; } startCoins = page.userDescription.totalCoins; adjustCoins = 0; button = function(label, value){ return Div({ flex: "0 0 auto", width: "1em" }).html(label).tap(function(){ if (startCoins + adjustCoins === 0 && value === -1) { return; } if (startCoins + adjustCoins >= 50000 && value === 1) { inc("/../app01/lib/gui/toast/toast")({ label: T("maxWarning") }); return; } adjustCoins += value; return number.html((startCoins + adjustCoins) + ""); }); }; return row = inc("../../0_shared/genericRow/row")({ labelLeft: T("coins"), labelLeftSecondary: T("coinsDirTeachers"), labelRight: Div({ display: "flex", flex: "0 0 auto", textAlign: "center", justifyContent: "flex-end" }).append(button("-", -1), number = Div().html((startCoins + adjustCoins) + ""), button("+", 1)) }).onDomRemove(function(){ if (adjustCoins !== 0) { return log.log({ event: "adjustCoins", value: adjustCoins, reason: "settings" }); } }); }; })(); rows/antonPlus/_t.ls (function(){ return { labelLeft: { de: "ANTON-Plus", en: "ANTON Plus", fr: "ANTON-Plus", es: "ANTON-Plus", pt: "ANTON-Plus" }, subtitlePlusTeacher: { de: "Lehrer", en: "Teacher", fr: "Professeur", es: "Docente", pt: "Professores" }, subtitlePlusFamily: { de: "Familiengruppe", en: "Family group", fr: "Groupe familial", es: "Grupo familiar", pt: "Grupo familiar" }, subtitlePlusFamilyMember: { de: "Familien-Mitglied", en: "Family member", fr: "Membre de la famille", es: "Miembro de la familia", pt: "Membro da família" }, subtitlePlusSchool: { de: "Schullizenz", en_gb: "School Licence", en: "School License", fr: "Licence scolaire", es: "Licencia escolar", pt: "Licença Escolar" }, validUntil: { de: "gültig bis $1", en: "valid until $1", fr: "valide jusqu'au $1", es: "válido hasta $1", pt: "válido até $1" }, active: { de: "Ja", en: "Yes", fr: "Oui", es: "Sí", pt: "Sim" }, notActive: { de: "Nein", en: "No", fr: "Non", es: "No", pt: "Não" }, deletePurchase: { deDev: "Debug: ANTON-Plus Käufe löschen?", enDev: "Debug: Delete ANTON-Plus purchases?", frDev: "Debug: Supprimer les achats ANTON-Plus ?", esDev: "Debug: ¿Eliminar compras ANTON-Plus?", ptDev: "Debug: Excluir compras do ANTON-Plus?" }, deleteButton: { deDev: "Löschen", enDev: "Delete", frDev: "Effacer", esDev: "Borrar", ptDev: "Apagar" }, cancelButton: { deDev: "Abbrechen", enDev: "Cancel", frDev: "Annuler", esDev: "Cancelar", ptDev: "Cancelar" } }; })(); rows/antonPlus/icon/icon.ls (function(){ return function(d){ if (d.hasPlusAccess) { return path("/../app01/lib/svg/illustration/anton-plus.svg"); } }; })(); rows/antonPlus/labelLeftSecondary/label.ls (function(){ return function(d){ if (d.isPlusTeacher) { return T("subtitlePlusTeacher"); } else if (d.isPlusFamily) { return T("subtitlePlusFamily"); } else if (d.isPlus) { return undefined; } else if (d.isPlusFamilyMember) { return T("subtitlePlusFamilyMember"); } else if (d.isPlusSchoolMember) { return T("subtitlePlusSchool"); } }; })(); rows/antonPlus/labelRight/label.ls (function(){ return function(d){ var product, e, date; product = d.isPlusTeacher ? "plusTeacher" : d.isPlusFamily ? "plusFamily" : d.isPlus ? "plus" : void 8; if (product) { e = log.findLast({ event: "setProduct", productName: product }); date = inc("/../app01/lib/util/formatDate2/format")(e != null ? e.validUntil : void 8); } if (product) { return T("validUntil", date != null ? date.formats.dateShort : void 8); } else if (d.hasPlusAccess) { return T("active"); } else { return T("notActive"); } }; })(); rows/antonPlus/row.ls (function(){ return function(page){ var d; d = page.userDescription; return inc("../../0_shared/genericRow/row")({ labelLeft: T("labelLeft"), labelLeftSecondary: inc("labelLeftSecondary/label")(d), labelRight: inc("labelRight/label")(d), icon: inc("icon/icon")(d), noIconColor: true }).tap(function(){ return startPage({ path: path("/../app01/pages/static/antonPlus/1_products/page"), params: { referrer: "settingsAntonPlusRow" } }); }); }; })(); rows/antonPlus/togglePlusDummyPurchase/toggle.ls (function(){ return function(d){ var prefill; if (d.hasPlusAccess) { return inc("/../app01/lib/gui/confirmPopup/popup")({ label: T("deletePurchase"), yesLabel: T("deleteButton"), noLabel: T("cancelButton"), done: function(confirmed){ if (confirmed) { return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/payment/dummyPurchase/deleteAll/deleteAll"), params: { logId: log.id() }, onOffline: function(){ return debug("du bist offline"); }, onCompleted: function(){ return debug("completed"); } }); } } }); } else { d = inc("/../app01/lib/util/formatDate2/format")(); prefill = d.Y + "-" + d.M + "-" + d.D; return inc("/../app01/lib/gui/promptPopup/popup")({ label: "Debug: ANTON-Plus kaufen (Kaufdatum)?", prefill: prefill, done: function(value){ if (value) { return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/payment/dummyPurchase/create/create"), params: { logId: log.id(), date: value }, onError: debug("error"), onOffline: function(){ return debug("du bist offline"); }, onCompleted: function(){ return debug("completed"); } }); } } }); } }; })(); rows/audioVolume/_t.ls (function(){ return { saveButton: { de: "Speichern", en: "Save", fr: "Enregistrer", es: "Guardar", pt: "Salvar" }, selectVolume: { de: "Wähle die Lautstärke aus.", en: "Select a volume.", fr: "Choisis le volume", es: "Elige el nivel del volumen", pt: "Escolha o nível do volume." }, volume: { de: "Lautstärke", en: "Volume", fr: "Volume", es: "Volumen", pt: "Volume" } }; })(); rows/audioVolume/page/_playSound/play.ls (function(){ return function(page){ var d, loadFile, playSound; d = { voiceLang: "de", voice: "custom", text: "sample-glockenspiel-c4" }; loadFile = function(){ return inc("/../app01/lib/util/downloadContentFile/download")({ fileId: "sound/" + d.voiceLang + "/" + d.voice + "/" + d.text, fileFolder: "media/settings/_sounds", etag: "any", returnFileContent: true, onLoaded: playSound, onError: function(){} }); }; playSound = function(base64){ var ref$, sound; if ((ref$ = page.lastSound) != null) { ref$.stop(); } sound = inc("/../app01/lib/util/sound/sound")({ base64: base64, volume: page.currentVolume }); sound.play(); return page.lastSound = sound; }; return loadFile(); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/_t.ls (function(){ return { popupTitle: { de: "Sound-Test ($1 von $2)", en: "Sound Test ($1 of $2)", fr: "Test son ($1 sur $2)", es: "Test de audio ($1 de $2)", pt: "Teste de som ($1 de $2)" }, question: { de: "War der Sound hörbar?", en: "Was the sound audible?", fr: "As-tu entendu le son ?", es: "¿Escuchaste el audio?", pt: "Foi possível ouvir o som?" }, buttonLabel: { de: "Sound $1", en: "Sound $1", fr: "Son $1", es: "Audio $1", pt: "Som $1" }, finishPopupText: { de: "Der Sound-Test ist nun beendet.", enDev: "Thanks for helping out!", frDev: "Merci de ton aide !", esDev: "Gracias por ayudar.", ptDev: "Obrigado por ajudar!" }, soundTestLabel: { de: "Sound-Test", en: "Sound Test", fr: "Test son", es: "Test-Audio", pt: "Teste de som" } }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/button.ls (function(){ return function(page){ var tap, div; tap = function(){ if (!inc("/../app01/lib/util/isOnline/isOnline")()) { inc("/../app01/lib/offline/offlinePopup/popup")(); return; } return inc("soundTest/start")(); }; return div = Div({ display: "flex", position: "absolute", bottom: 0, right: 0, color: Color.blue[400], padding: "0.55em", fontSize: "0.9em" }).html(T("soundTestLabel")).tap(tap); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/loadSounds/downloadSound/download.ls (function(){ return function(index, fileId, onDone){ return inc("/../app01/lib/util/downloadContentFile/download")({ fileId: fileId, fileFolder: "content/soundTest", etag: "any", returnFileContent: true, onError: function(r){ return onDone(index, r); }, onLoaded: function(r){ return onDone(index, r); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/loadSounds/load.ls (function(){ return function(t, onDone){ var totalDone, loadSounds, onLoaded; totalDone = 0; loadSounds = function(){ var i$, ref$, len$, i, id, results$ = []; for (i$ = 0, len$ = (ref$ = t.soundIds).length; i$ < len$; ++i$) { i = i$; id = ref$[i$]; results$.push(inc("downloadSound/download")(i, id, onLoaded)); } return results$; }; onLoaded = function(i, b64){ totalDone++; if (t.isOffline) { return; } if (b64.error) { t.isOffline = true; inc("/../app01/lib/offline/offlinePopup/popup")(); } t.b64Sounds[i] = b64; if (totalDone === t.soundIds.length) { return onDone(); } }; return loadSounds(); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/log/log.ls (function(){ return function(t, e){ return t.logEvents.push(e); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/getSoundSettings/get.ls (function(){ return function(onDone){ var s, getMuteSwitch, getEventAudioVolume, getDeviceVolume, getAudioOutputs, finish; s = {}; getMuteSwitch = function(){ return inc("getMuteSwitch/get")(s, getEventAudioVolume); }; getEventAudioVolume = function(){ return inc("getEventAudioVolume/get")(s, getDeviceVolume); }; getDeviceVolume = function(){ return inc("getDeviceVolume/get")(s, getAudioOutputs); }; getAudioOutputs = function(){ return inc("getAudioOutputs/get")(s, finish); }; finish = function(){ return onDone(s); }; return getMuteSwitch(); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/getSoundSettings/getAudioOutputs/get.ls (function(){ return function(s, onDone){ if (!engine.isMobileApp || SolocodePlugin.getCurrentAudioOutputs == null) { onDone(); return; } return SolocodePlugin.getCurrentAudioOutputs(function(result){ s.audioOutputs = result; return onDone(); }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/getSoundSettings/getDeviceVolume/get.ls (function(){ return function(s, onDone){ var getVolumeIos, getVolumeAndroid, finish; getVolumeIos = function(){ return cordova.exec(function(volume){ return finish(volume); }, function(volume){ return finish(volume); }, "SolocodePlugin", "getVolume"); }; getVolumeAndroid = function(){ return SolocodePlugin.getVolume(function(volume, error){ return finish(volume); }); }; finish = function(v){ s.deviceVolume = _.round(v, 2); return onDone(); }; if (!engine.isMobileApp) { return onDone(); } else if (engine.isiOsApp) { return getVolumeIos(); } else { return getVolumeAndroid(); } }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/getSoundSettings/getEventAudioVolume/get.ls (function(){ return function(s, onDone){ var v, ref$, ref1$; v = (ref$ = (ref1$ = log.findLast("setAudioVolume")) != null ? ref1$.value : void 8) != null ? ref$ : 1; s.eventAudioVolume = v; return onDone(); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/getSoundSettings/getMuteSwitch/get.ls (function(){ return function(s, onDone){ if (!engine.isMobileApp) { onDone(); return; } return SolocodePlugin.getMuteSwitchEnabled(function(isMuted){ s.muteSwitch = isMuted ? "isMuted" : "isNotMuted"; return onDone(); }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/logResult/log.ls (function(){ return function(t){ var e, k, v; if (t.logEvents.length === 0) { return; } e = { event: "debugSoundTestResult", isDebug: engine.isDebug, userAgent: navigator.userAgent }; t = _.omit(t, "soundIds", "b64Sounds"); for (k in t) { v = t[k]; e[k] = v; } return log.log(e); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/_t.ls (function(){ return { noSoundButton: { de: "Nichts gehört", enDev: "No sound", frDev: "Pas de son", esDev: "Sin sonido", ptDev: "Nada ouvido" }, questionInput: { de: "Welche Zahl hörst du?", enDev: "Which number do you hear?", frDev: "Quel chiffre entends-tu ?", esDev: "¿Qué número escuchas?", ptDev: "Que número você ouve?" } }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonPlay/button.ls (function(){ return function(p, parentDiv){ var tap, button; tap = function(){ inc("../../getSoundSettings/get")(function(s){ var ref$; p.t.log({ event: "playSound", testIndex: p.t.testIndex, testName: p.testName, soundSettings: s }); p.playSound(); p.progressDiv.play(); return ((ref$ = p.form) != null ? ref$.showForm() : void 8) || p.buttonsYesNo.showButtons(); }); return inc("disableButton/disable")(button, p); }; return button = Div({ display: "inline-flex", padding: "0.5em", background: Color.grey[300] }).html(inc("progressDiv/div")(p), inc("icon/icon")(), inc("label/label")(p)).tap(tap); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonPlay/disableButton/disable.ls (function(){ return function(button, p){ button.css({ pointerEvents: "none" }); return setTimeout(function(){ return button.css({ pointerEvents: "" }); }, p.soundDuration); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonPlay/icon/icon.ls (function(){ return function(){ return SvgIcon({ svg: path("/../app01/lib/svg/shape/speaker.svg"), color: Color.black }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonPlay/label/label.ls (function(){ return function(p){ return Div({ marginLeft: "0.5em" }).html(T("buttonLabel", p.t.testIndex)); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonPlay/progressDiv/div.ls (function(){ return function(p){ var div; div = Div({ position: "absolute", top: 0, left: 0, background: Color.blue[200], width: "0%", height: "100%" }); div.play = function(){ return div.keyframeAnimate({ duration: p.soundDuration, keyframes: { "0%": { width: 0, opacity: 1 }, "90%": { opacity: 1 }, "100%": { width: "100%", opacity: 0 } } }); }; return p.progressDiv = div; }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonsYesNo/button/button.ls (function(){ return function(p, label){ var tap; tap = function(){ return inc("../../../getSoundSettings/get")(function(s){ p.t.log({ event: "buttonResult", testIndex: p.t.testIndex, testName: p.testName, result: label, soundSettings: s }); return p.onDone(); }); }; return Div({ display: "flex", padding: "0.5em", background: Color.grey[300], margin: "0.5em", minWidth: "3em" }).html(label === "yes" ? T("yes") : T("no")).tap(tap); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonsYesNo/buttons.ls (function(){ return function(p){ var div; div = Div({ pointerEvents: "none", opacity: 0 }).html(inc("label/label")(), Div({ display: "flex", marginTop: "1em" }).html(inc("button/button")(p, "yes"), inc("button/button")(p, "no"))); div.showButtons = function(){ return div.fadeIn(700).css({ pointerEvents: "auto" }); }; return p.buttonsYesNo = div; }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/buttonsYesNo/label/label.ls (function(){ return function(){ return Div({ marginTop: "1.5em" }).html(T("question")); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/input/input.ls (function(){ return function(p){ var soundId, solution, submitNo, submitYes, logResult, div; soundId = p.t.soundIds[p.t.testIndex - 1]; solution = _.last(soundId.split("/")); submitNo = function(v){ return logResult(false, v); }; submitYes = function(v){ if (!v) { return; } return logResult(true, v); }; logResult = function(hasSound, v){ return inc("../../getSoundSettings/get")(function(s){ var params; params = { event: "inputResult", testIndex: p.t.testIndex, testName: p.testName, result: hasSound ? "yes" : "no", soundSettings: s }; if (v) { params.input = v; params.correct = v === solution; } p.t.log(params); return p.onDone(); }); }; div = Div({ opacity: 0 }).html(inc("inputAndButtons/div")(submitYes, submitNo)); div.showForm = function(){ return div.fadeIn(700).css({ pointerEvents: "" }); }; p.form = div; return div; }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/input/inputAndButtons/div.ls (function(){ return function(submitYes, submitNo){ var input; return Div({ marginTop: "1.5em" }).html(Div({ marginBottom: "0.3em" }).html(T("questionInput")), input = inc("/../app01/lib/gui/input2/input")({ onSubmit: function(){ return submitYes(input.getValue()); }, maxLength: 2, keyboardParentDiv: app.currentPage.popupBottom, keyboardLayout: "numbers" }).css({ marginBottom: "0.5em" }), Div().html(Button(T("noSoundButton")).css({ margin: "0.2em" }).tap(function(){ return submitNo(input.getValue()); }), Button(T("continueButton")).css({ margin: "0.2em" }).tap(function(){ return submitYes(input.getValue()); }))); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/label/label.ls (function(){ return function(p){ return Div({ padding: "1em 0" }).html(T("popupTitle", p.t.testIndex, p.t.totalTests)); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/popup.ls (function(){ return function(p){ var div, popup; p.t.testIndex++; p.t.log({ event: "showTest", index: p.t.testIndex, soundId: p.t.soundIds[p.t.testIndex - 1] }); div = Div({ padding: "1em 2em 2em 2em" }); div.html(inc("label/label")(p), inc("buttonPlay/button")(p, div), p.t.testIndex < 5 ? inc("input/input")(p) : inc("buttonsYesNo/buttons")(p), inc("testNameDebug/testName")(p)); if ((app.currentPopup != null) > 0) { div.fadeIn(700); } return popup = inc("/../app01/lib/gui/popup/popup")({ html: div, animationOnShow: !app.currentPopup, onClose: function(){ return inc("../logResult/log")(p.t); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/00_shared/popup/testNameDebug/testName.ls (function(){ return function(p){ if (!engine.isDebug) { return; } return Div({ color: Color.grey[400], fontSize: "0.7em", height: 0, margin: "1em 0" }).html(SvgIcon({ svg: path("/../app01/lib/svg/shape/debug.svg"), size: "1em", color: Color.grey[400] }).css({ marginRight: "0.3em", verticalAlign: "-0.15em" }), p.testName); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/01_audioTagUrl/popup.ls (function(){ return function(t){ var soundId, playSound, audio; soundId = t.soundIds[0]; playSound = function(){ audio.volume = 0.5; return audio.play(); }; return inc("../00_shared/popup/popup")({ t: t, testName: "audioTagUrl", soundDuration: 2000, playSound: playSound, onDone: function(result){ return inc("../02_soundOld/popup")(t); } }).append(audio = document.createElement("audio").attr({ preload: "auto", src: "https://apis-content-debug.solocode.com/filesCalcDevelop/?fileId=" + soundId + "&etag=any" })); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/02_soundOld/popup.ls (function(){ return function(t){ var sound, playSound; sound = inc("/../app01/lib/util/sound/soundOld/sound")({ base64: t.b64Sounds[1] }); playSound = function(){ return sound.play(); }; return inc("../00_shared/popup/popup")({ t: t, testName: "soundOld", soundDuration: 2000, playSound: playSound, onDone: function(){ return inc("../03_soundNext/popup")(t); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/03_soundNext/popup.ls (function(){ return function(t){ var sound, playSound; sound = inc("/../app01/lib/util/sound/soundNext/sound")({ base64: t.b64Sounds[2] }); playSound = function(){ t.log({ event: "playSoundNextDuration", duration: sound.getDuration() }); return sound.play(); }; return inc("../00_shared/popup/popup")({ t: t, testName: "soundNext", soundDuration: 2000, playSound: playSound, onDone: function(){ return inc("../04_soundSlim/popup")(t); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/04_soundSlim/playSound/generateBuffer/generate.ls (function(){ return function(p){ var data, characters, numbers, i$, len$, i, c, array, buffer, error; try { data = p.base64.split("base64,")[1].trim(); characters = atob(data); numbers = new Array(characters.length); for (i$ = 0, len$ = characters.length; i$ < len$; ++i$) { i = i$; c = characters[i$]; numbers[i] = characters.charCodeAt(i); } array = new Uint8Array(numbers); buffer = array.buffer; } catch (e$) { error = e$; p.onError(error); return; } return p.onOk(buffer); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/04_soundSlim/playSound/play.ls (function(){ return function(t, b64){ var audioContext, generateBuffer, decode, play, onError; audioContext = window.AudioContext ? new AudioContext() : new webkitAudioContext(); generateBuffer = function(){ return inc("generateBuffer/generate")({ base64: b64, onOk: decode, onError: onError }); }; decode = function(buffer){ return audioContext.decodeAudioData(buffer, play, onError); }; play = function(audioData){ var source, gain; source = audioContext.createBufferSource(); source.buffer = audioData; gain = audioContext.createGain(); gain.gain.value = 1; source.connect(gain); gain.connect(audioContext.destination); if (source.start) { source.start(0); } else if (source.play) { source.play(0); } else if (source.noteOn) { source.noteOn(0); } return source.onended = function(){ t.log({ event: "soundSlimEnded" }); return setTimeout(function(){ gain.disconnect(0); source.disconnect(0); return audioContext.close(); }, 500); }; }; onError = function(){ t.log({ event: "soundSlimError" }); return audioContext.close(); }; return generateBuffer(); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/04_soundSlim/popup.ls (function(){ return function(t){ var playSound; playSound = function(){ return inc("playSound/play")(t, t.b64Sounds[3]); }; return inc("../00_shared/popup/popup")({ t: t, testName: "soundSlim", soundDuration: 2000, playSound: playSound, onDone: function(){ return inc("../05_soundBeep/popup")(t); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/05_soundBeep/playBeep/play.ls (function(){ return function(t, b64){ var audioContext, o; audioContext = window.AudioContext ? new AudioContext() : new webkitAudioContext(); o = audioContext.createOscillator(); o.type = "sine"; o.frequency.value = 400; o.connect(audioContext.destination); o.start(); return setTimeout(function(){ o.stop(); return audioContext.close(); }, 1000); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/05_soundBeep/popup.ls (function(){ return function(t){ var playSound; playSound = function(){ return inc("playBeep/play")(t, t.b64Sounds[3]); }; return inc("../00_shared/popup/popup")({ t: t, testName: "soundBeep", soundDuration: 2000, playSound: playSound, onDone: function(){ return inc("../99_finish/popup")(t); } }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/99_finish/buttonClose/button.ls (function(){ return function(){ var tap; tap = function(){ return app.currentPopup.close(); }; return Button(T("closeButton")).tap(tap); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/99_finish/debugLogEvents/debug.ls (function(){ return function(t){ var tap, c; if (!engine.isDebug) { return; } tap = function(){ return debug(t.logEvents); }; return Div({ display: "flex", color: c = Color.blue[200], fontSize: "0.7em", height: "1em", margin: "1em 0" }).html(Div().html(SvgIcon({ svg: path("/../app01/lib/svg/shape/debug.svg"), color: c }).css({ marginRight: "0.3em", verticalAlign: "-0.15em" }), "Show logEvents").tap(tap)); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/99_finish/popup.ls (function(){ return function(t){ var div, popup; inc("../00_shared/logResult/log")(t); div = Div({ padding: "1em 2em 2em 2em" }).html(inc("text/text")(t), inc("buttonClose/button")(t), inc("debugLogEvents/debug")(t)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/popups/99_finish/text/text.ls (function(){ return function(t){ return Div({ margin: "1em 0 2em" }).html(T("finishPopupText")); }; })(); rows/audioVolume/page/_topbar/buttonSoundTest/soundTest/start.ls (function(){ return function(){ var t, lang, voice, loadSounds, showFirstPopup, spinnerOverlay; t = {}; t.totalTests = 5; t.testIndex = 0; t.b64Sounds = {}; lang = engine.guiLanguage; voice = engine.guiLanguage === "en_us" ? "f1Us" : "f1"; t.soundIds = ["sound/" + lang + "/" + voice + "/" + _.random(20, 99), "sound/" + lang + "/" + voice + "/" + _.random(20, 99), "sound/" + lang + "/" + voice + "/" + _.random(20, 99), "sound/" + lang + "/" + voice + "/" + _.random(20, 99)]; t.logEvents = []; t.log = function(e){ return inc("log/log")(t, e); }; loadSounds = function(){ return inc("loadSounds/load")(t, showFirstPopup); }; showFirstPopup = function(){ spinnerOverlay.close(); return inc("popups/01_audioTagUrl/popup")(t); }; spinnerOverlay = inc("/../app01/lib/gui/spinnerOverlay/overlay")(); return loadSounds(); }; })(); rows/audioVolume/page/_topbar/topbar.ls (function(){ return function(page){ return inc("../../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("volume") }).append(inc("buttonSoundTest/button")(page)); }; })(); rows/audioVolume/page/buttonSave/button.ls (function(){ return function(page){ var click; click = function(){ inc("/../app01/data/user/audioVolume/set")(page.currentVolume); return startPage({ history: -1, animation: "slideRight" }); }; return Button(T("saveButton")).tap(click); }; })(); rows/audioVolume/page/buttonsAndNumber/buttonsAndNumber.ls (function(){ return function(page){ var decreaseVolume, increaseVolume, updateAndPlaySound, div, numberDiv; decreaseVolume = function(){ if (page.currentVolume > 0) { page.currentVolume -= 0.1; return updateAndPlaySound(); } }; increaseVolume = function(){ if (page.currentVolume < 1) { page.currentVolume += 0.1; return updateAndPlaySound(); } }; updateAndPlaySound = function(){ page.currentVolume = _.round(page.currentVolume, 1); numberDiv.html(page.currentVolume); return inc("../_playSound/play")(page); }; return div = Div({ display: "flex", padding: "4em" }).append(Button({ icon: path("/../app01/lib/svg/icon/arrow-left.svg") }).css({ height: "2.5em" }).tap(decreaseVolume), numberDiv = Div({ display: "flex", width: "2em", height: "2.5em", backgroundColor: Color.grey[100] }).html(page.currentVolume), Button({ icon: path("/../app01/lib/svg/icon/arrow-right.svg") }).css({ height: "2.5em" }).tap(increaseVolume)); }; })(); rows/audioVolume/page/page.ls (function(){ return function(page){ page.currentVolume = inc("/../app01/data/user/audioVolume/get")(); return { top: function(){ return inc("_topbar/topbar")(page); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.append(inc("title/title")(), inc("buttonsAndNumber/buttonsAndNumber")(page), inc("buttonSave/button")(page)); } }; }; })(); rows/audioVolume/page/title/title.ls (function(){ return function(){ return Div({ display: "flex" }).html(T("selectVolume")); }; })(); rows/audioVolume/row.ls (function(){ return function(page){ var currentVolume, row; currentVolume = inc("/../app01/data/user/audioVolume/get")(); return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("volume"), labelRight: currentVolume, labelColor: currentVolume === 0 ? Color.red[500] : void 8 }); }; })(); rows/avatar/_t.ls (function(){ return { saveButton: { de: "Speichern", en: "Save", fr: "Enregistrer", es: "Guardar", pt: "Salvar" }, dontSave: { de: "Nicht speichern", en: "Don't save", fr: "Ne pas enregistrer", es: "No guardar", pt: "Não salvar" }, avatar: { de: "Avatar ($1)", en: "Avatar ($1)", fr: "Avatar ($1)", es: "Avatar ($1)", pt: "Avatar ($1)" }, human: { de: "Mensch", en: "Human", fr: "Humain", es: "Humano", pt: "Humano" }, monster: { de: "Monster", en: "Monster", fr: "Monstre", es: "Monstruo", pt: "Monstro" }, allRandom: { de: "Alle Werte per Zufall setzen", en: "Set all values randomly", fr: "Définir toutes les valeurs au hasard", es: "Establecer los valores aleatoriamente", pt: "Definir todos os valores aleatoriamente" }, createAvatar: { de: "Hier kannst du einen Avatar für dich erstellen.

Bitte wähle aus:

", en: "Here you can design your avatar.

Please select:

", fr: "Ici tu peux créer ton avatar.

Choisis :

", es: "Aquí puedes diseñar tu propio avatar.

Elige:

", pt: "Aqui você pode criar seu próprio avatar.

Escolha:

" }, youUseOldAvatar: { de: "Du benutzt noch einen alten Avatar, der bald nicht mehr unterstützt wird. Der neue Avatar hat einen Körper und viel mehr Möglichkeiten. Erstelle dir jetzt deinen neuen Avatar!", en: "You are still using an old avatar that will not be supported for much longer. Your new avatar can have a body and many things more. Design your new avatar now!", fr: "Tu utilises un ancien avatar qui ne sera bientôt plus pris en charge. Nos nouveaux avatars peuvent avoir un corps et encore bien d'autres options. Crée ton nouvel avatar dès maintenant !!", es: "Estás usando un avatar viejo que pronto dejará de funcionar. El nuevo avatar puede tener cuerpo entero y muchas más cosas. ¡Diseña tu nuevo avatar ahora!", pt: "Você ainda está usando um avatar antigo que em breve não estará mais compatível. O novo avatar pode ter um corpo inteiro e muito mais opções. Crie seu novo avatar agora!" }, changeAvatar: { de: "Avatar bearbeiten", en: "Edit avatar", fr: "Modifier mon avatar", es: "Modificar mi avatar", pt: "Modificar meu avatar" }, random: { de: "Zufall", en: "Random", fr: "Aléatoire", es: "Aleatorio", pt: "Aleatório" }, designerLocked: { de: "Der Avatar-Designer ist noch
$1 gesperrt für
$2.", en: "The avatar designer will be locked
for the next $1 for
$2 members.", fr: "Le créateur d'avatars va être désactivé
pendant $1 pour
$2 membres.", es: "El diseñador de avatares estará bloqueado por $1 más para el grupo
$2", pt: "O criador de avatares estará bloqueado
por mais $1 para os membros
$2." } }; })(); rows/avatar/avatar/avatar.ls (function(){ return function(userDescription){ var avatarDescription, avatarVersion, avatarSize; avatarDescription = userDescription.avatar; avatarVersion = (avatarDescription != null ? avatarDescription.version : void 8) || 1; avatarSize = avatarVersion === 2 ? "10em" : "5em"; return inc("/../app01/lib/gui/avatar/avatar")(avatarDescription, "half").css({ width: avatarSize, height: avatarSize, marginTop: "0.3em", borderRadius: "999px" }); }; })(); rows/avatar/buttonEdit/button.ls (function(){ return function(click){ var lockedDetails, div; lockedDetails = inc("/../app01/data/group/calcLockedFeature/calc")({ eventName: "lockAvatarDesigner" }); div = Div().append(lockedDetails.seconds > 0 ? inc("lockedInfo/info")() : inc("/../app01/lib/gui/link/link")(T("changeAvatar")).tap({ up: click })); setTimeout(function(){ if (div.isVisible()) { return div.replaceWith(div = inc(THISFILE)(click)); } }, 1000); return div; }; })(); rows/avatar/buttonEdit/lockedInfo/icon/icon.ls (function(){ return function(){ return SvgIcon({ svg: path("/../app01/lib/svg/shape/lock.svg"), color: Color.grey[800] }).css({ width: "0.9em", height: "0.9em", display: "inline-block", marginRight: "0.2em", verticalAlign: "-0.1em" }); }; })(); rows/avatar/buttonEdit/lockedInfo/info.ls (function(){ return function(){ var currentPage, update, div; currentPage = app.currentPage; update = function(){ var lockedDetails; lockedDetails = inc("/../app01/data/group/calcLockedFeature/calc")({ eventName: "lockAvatarDesigner" }); if (lockedDetails.seconds < 1) { div.empty(); } else { div.empty().append(Div({ width: "35em", maxWidth: "90%", padding: "0.5em", margin: "1em auto", hyphens: "auto", lineHeight: "1.5em", backgroundColor: Color.red[100] }).secureHtml(inc("icon/icon")(), inc("text/text")(lockedDetails))); } return setTimeout(function(){ if (currentPage === app.currentPage || div.isVisible()) { return requestAnimationFrame(update); } }, 1000); }; div = Div(); if (window.log != null) { update(); } return div; }; })(); rows/avatar/buttonEdit/lockedInfo/text/text.ls (function(){ return function(d){ var groupName; groupName = d.groupDescription.name; return T("designerLocked", d.label, groupName); }; })(); rows/avatar/row.ls (function(){ return function(page){ var userDescription, startNewEditor, div, ref$; userDescription = page.userDescription; startNewEditor = function(){ var lockedDetails, includeCheck, startPagePath, ref$; lockedDetails = inc("/../app01/data/group/calcLockedFeature/calc")({ eventName: "lockAvatarDesigner" }); if (lockedDetails.seconds > 0) { return; } includeCheck = inc("/../app01-avatar/pages/avatarFirstTime/page", { silentError: true }); startPagePath = ((ref$ = userDescription.avatar) != null ? ref$.version : void 8) !== 2 && !includeCheck.includeError ? path("/../app01-avatar/pages/avatarFirstTime/page") : path("/../app01-avatar/pages/avatarFull/page"); return startPage({ path: startPagePath, animation: "slideLeft" }); }; div = Div({ margin: "1.4em 1em 1.3em" }).append(((ref$ = userDescription.avatar) != null ? ref$.version : void 8) !== 2 ? inc("rowOldAvatar/row")(startNewEditor, userDescription) : [inc("rowNewAvatar/row")(startNewEditor, userDescription), inc("buttonEdit/button")(startNewEditor)]); return div; }; })(); rows/avatar/rowNewAvatar/row.ls (function(){ return function(startNew, userDescription){ return Div({ marginTop: "-1em" }).append(inc("../avatar/avatar")(userDescription).tap({ up: startNew })); }; })(); rows/avatar/rowOldAvatar/badge/badge.ls (function(){ return function(){ return Div({ position: "absolute", top: "-7px", left: "-7px", backgroundColor: Color.red[600], color: "white", fontSize: "0.8em", width: "1.4em", height: "1.4em", borderRadius: "999px", filter: 'drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4))' }).html(1); }; })(); rows/avatar/rowOldAvatar/row.ls (function(){ return function(click, userDescription){ return Div({ display: "flex", backgroundColor: Color.grey[100], border: "1px solid " + Color.grey[300], borderRadius: "0.3em", maxWidth: "35em", margin: "0 auto 0.4em" }).append(inc("../avatar/avatar")(userDescription).css({ flex: "0 0 auto", marginRight: "-0.7em", marginLeft: "-0.3em" }), Div().html(T("youUseOldAvatar")).css({ flex: "1 1 auto", color: Color.grey[700], fontSize: "0.9em", padding: "0.6em", textAlign: "left" }), SvgIcon({ svg: path("/../app01/lib/svg/icon/arrow-right-small.svg"), color: Color.grey[500] }).css({ flex: "0 0 auto", marginRight: "0.3em", marginLeft: "-0.2em" }), inc("badge/badge")()).tap(click); }; })(); rows/bodyScale/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: "bodyScale" }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var setScale, d, b; setScale = function(scale){ body.setBodyScale(scale); return startPage({ history: 0 }); }; d = function(){ return Div({ marginBottom: "1em" }); }; b = function(l){ return Button(l).css({ margin: "0.2em" }); }; return page.append(Div({ display: "inline-block", textAlign: "left", maxWidth: "100%" }).append(d().html("devicePixelRatio = " + _.round(window.devicePixelRatio, 3)), d().html("device = " + _.round(screen.width * window.devicePixelRatio) + " x " + _.round(screen.height * window.devicePixelRatio)), d().html("ratio = " + _.round(screen.width / screen.height, 2)), d().html("window = " + window.innerWidth + " x " + window.innerHeight), d().html("body = " + _.round(body.width()) + " x " + _.round(body.height())), d().html("bodyScale = " + _.round(body.bodyScale || 1, 3)), d().html("body.fontSize = " + _.round(+body.css('fontSize').replace("px", ""), 1)), d().html("unscaled fontSize = " + _.round(body.css('fontSize').replace("px", "") * (body.bodyScale || 1), 1))), "
", b("scale = 1").tap(function(){ return setScale(1); }), b("scale 0.7").tap(function(){ return setScale(0.7); }), b("scale auto").tap(function(){ return setScale(1 / window.devicePixelRatio); })); } }; }; })(); rows/bodyScale/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: "bodyScale", labelRight: _.round(body.bodyScale, 4) || 1 }); }; })(); rows/contentAuthorPreset/confirmPopup/_t.ls (function(){ return { confirmActivate: "Möchtest du wirklich den Content Author Preset aktivieren?", activateButton: "Aktivieren", cancelButton: "Abbrechen" }; })(); rows/contentAuthorPreset/confirmPopup/label/label.ls (function(){ return function(){ return Div().html(Span().html(T("confirmActivate")), Div({ height: "1em" }), Span({ fontSize: "0.85em", color: Color.grey[600] }).html("(aktiviert folgende Properties: debugMode, config: CONTENT IDE, loadDevelopContent, showScreenKeyboard)")); }; })(); rows/contentAuthorPreset/confirmPopup/popup.ls (function(){ return function(){ var submit; submit = function(){ deviceLog.log({ event: "deviceSetDebug", value: true }); deviceLog['var']("loadDevelopContent", true); deviceLog['var']("showScreenKeyboard", true); return inc("setConfig/set")(function(){ return location.reload(); }); }; return inc("/../app01/lib/gui/confirmPopup/popup")({ label: inc("label/label")(), onConfirm: submit, yesLabel: T("activateButton"), noLabel: T("cancelButton") }); }; })(); rows/contentAuthorPreset/confirmPopup/setConfig/set.ls (function(){ return function(onDone){ return inc("/../app01/lib/util/loadProject/load")("server-config", function(){ var presets, options, contentIDEOption; presets = inc("/../server-config/**"); options = helpers.getServerConfigOptions(presets); contentIDEOption = _.find(options, { name: "content IDE" }); contentIDEOption.action(); return onDone(); }); }; })(); rows/contentAuthorPreset/row.ls (function(){ return function(){ var click; click = function(){ return inc("confirmPopup/popup")(); }; return inc("../../0_shared/genericRow/row")({ type: "button", icon: path("/../app01/lib/svg/shape/bulb.svg"), labelLeft: "Content Author Preset" }).tap(click); }; })(); rows/debugCode/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: "Debug Code" }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var lastCode, update, timer, codeDiv; update = function(){ var code, percent, svg; code = inc("/../app01/data/debug/calcDebugCode/calc")(); if (code.code !== (lastCode != null ? lastCode.code : void 8)) { codeDiv.html(code.code); lastCode = code; } percent = code.validFor / code.changeInterval; timer.html(svg = inc("/../app01/lib/gui/svgPieChart/svgPieChart")({ slices: { percent: percent, color: percent > 0.25 ? Color.green[500] : percent > 0.125 ? Color.orange[500] : Color.red[500] } }).css({ width: "100%", height: "100%" })); if (codeDiv.isVisible()) { return setTimeout(update, 1000); } }; page.append(Div({ display: "flex", flexDirection: "column" }).append(timer = Div({ margin: "0.5em", width: "2em", height: "2em" }), codeDiv = Div({ color: Color.grey[700], userSelect: "text", fontSize: "200%" }))); return update(); } }; }; })(); rows/debugCode/row.ls (function(){ return function(){ return inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: "Debug Code" }); }; })(); rows/deviceRememberUser/_t.ls (function(){ return { switchToNoText: { de: "Jetzt auf „Nein“ umschalten?

Alle gespeicherten Nutzer/innen auf der Startseite werden dann bei App-Start nicht mehr angezeigt.

Man muss sich jedes Mal neu anmelden.", en: "Switch to \"No\"?

The accounts of previous ANTON users on this device will not be shown on the homepage when the app is started.

You will need to sign in again each time.", fr: "Changer pour “Non” ?

Tous les comptes qui étaient enregistrés sur la page d'accueil de cette appareil ne seront plus affiché au démarrage de l'application.

Tu devras te reconnecter à chaque fois.", es: "¿Cambiar a \"No\"?

Las cuentas que se utilicen en este dispositivo no aparecerán en la página de inicio.

Tendrás que ingresar tus datos de acceso cada vez que abras la aplicación.", pt: "Mudar para \"Não\"?

As contas salvas na tela inicial deste dispositivo não aparecerão mais no início do aplicativo.

Voce precisará efetuar o login toda vez que abrir o aplicativo." }, switchToNo: { de: "Auf „Nein“ umschalten", en: "Switch to \"No\"", fr: "Changer pour “Non”", es: "Cambiar a \"No\"", pt: "Mudar para \"Não\"" }, stayLoggedIn: { de: "Angemeldet bleiben", en: "Stay logged in", fr: "Rester connecté", es: "Permanecer conectado", pt: "Permanecer conectado" }, rememberUsers: { de: "Nutzer/innen auf der Startseite speichern", en: "Save user accounts on the homepage.", fr: "Enregistrer les comptes sur la page d'accueil", es: "Recordar las cuentas en la página de inicio", pt: "Salvar as contas na página inicial" }, yes: { de: "Ja", en: "Yes", fr: "Oui", es: "Sí", pt: "Sim" }, no: { de: "Nein", en: "No", fr: "Non", es: "No", pt: "Não" }, switchToYes: { de: "Auf „Ja“ umschalten", en: "Switch to \"Yes\"", fr: "Changer pour “Oui”", es: "Cambiar a \"Sí\"", pt: "Mudar para \"Sim\"" }, switchToYesDescription: { de: "Jetzt auf „Ja“ umschalten?

Alle Nutzer/innen werden dann auf der Startseite gespeichert und müssen nicht jedes Mal ihre Anmeldedaten eingeben.", en: "Switch to \"Yes\"?

All user accounts on this device will be saved and appear on the homepage when the app is started. You will not have to enter your login information each time.", fr: "Changer pour “Oui” ?

Tous les comptes utilisés sur cet appareil sont mémorisés et les utilisateur·rices n'ont plus à entrer leurs données de connexion à chaque fois.", es: "Cambiar a \"Sí\"?

Todas las cuentas que se utilicen en este dispositivo aparecerán en la pantalla de inicio. De este modo, no será necesario ingresar los datos de acceso nuevamente al iniciar sesión con ellas.", pt: "Mudar para \"Sim\"

Todos as contas que utilizam este dispositivo aparecerão na tela inicial. Assim, não será necessário efetuar login cada vez que for usar o aplicativo." }, verifyEmailOrPhone: { de: "Dies ist eine Geräte-Einstellung, die für alle Nutzer/innen auf diesem Gerät umgestellt wird. Sie kann nur von Nutzer/innen, die ihre E-Mail-Adresse verifiziert haben, verändert werden.

Gehe zurück zu den Einstellungen, um deine E-Mail-Adresse zu verifizieren oder logge dich alternativ mit einem Nutzerkonto mit verifizierter E-Mail-Adresse ein. ", en: "This is a device setting and will be changed for all users on this device. It can only be changed by users with a verified email address.

Go back to settings to add an email address or log in with another user account that has a verified email address.", fr: "Il s'agit d'un paramètre de l'appareil qui sera appliqué à tous les comptes de cet appareil. Il ne peut être changé que par des utilisateur·rices ayant une adresse e-mail confirmée.

Retourne aux paramètres pour ajouter une adresse e-mail ou connecte-toi avec un autre compte dont l'adresse e-mail a été confirmée.", es: "Este es un ajuste del dispositivo y será modificado para todas las cuentas registratadas en este dispositivo. Sólo puede ser modificado por los y las usuarias que tengan una dirección de correo electrónico verificada.

Vuelve a los ajustes para añadir una dirección de correo electrónico o inicia sesión con una cuenta que tenga una dirección de correo electrónico verificada.", pt: "Esta é uma configuração do aparelho que será alterada para todos os usuários deste dispositivo. Ela só pode ser alterada por usuários que tenham um endereço de e-mail validado.

Para fazer isso, volte às configurações ou faça o login com uma conta que tenha um endereço de e-mail validado." }, rememberUser: { de: "Nutzer/innen speichern", en: "Save user account", fr: "Mémoriser les comptes", es: "Recordar cuentas", pt: "Lembrar contas" } }; })(); rows/deviceRememberUser/page/changeToNoPopup/popup.ls (function(){ return function(){ var submit, div, popup; submit = function(){ inc("/../app01/lib/util/storedUsers/removeAll/remove")(); deviceLog.log({ event: "deviceSetRememberUser", value: false }); popup.close(); return startPage({ history: -1 }); }; div = Div({ margin: "1em 0" }).append(Div({ padding: "1em", lineHeight: "1.4em" }).html(T("switchToNoText")), Button(T("switchToNo")).css({ minWidth: "6em", margin: "0.4em" }).addClass("keyManager-enter").bind("keyManager", submit).tap(submit)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/deviceRememberUser/page/changeToYesPopup/popup.ls (function(){ return function(){ var submit, div, popup; submit = function(){ Store("deviceRememberUser", true); inc("/../app01/lib/util/storedUsers/removeAll/remove")(); inc("/../app01/lib/util/storedUsers/addUser/add")(log.id()); window.userLogs = {}; window.userLogs[log.id()] = log; deviceLog.log({ event: "deviceSetRememberUser", value: true }); popup.close(); return startPage({ history: -1 }); }; div = Div({ margin: "1em 0" }).append(Div({ padding: "1em", lineHeight: "1.4em" }).html(T("switchToYesDescription")), Button(T("switchToYes")).css({ minWidth: "6em", margin: "0.4em" }).addClass("keyManager-enter").bind("keyManager", submit).tap(submit)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/deviceRememberUser/page/checkEMailOrPhone/check.ls (function(){ return function(){ var hasVerifiedEmail, ref$, hasVerifiedPhone, ref1$; hasVerifiedEmail = ((ref$ = log.findLast("setEMail")) != null ? ref$.isVerified : void 8) || inc("/../app01/lib/util/cache/get/get")("verifiedEMail"); hasVerifiedPhone = ((ref1$ = log.findLast("setPhoneNumber")) != null ? ref1$.isVerified : void 8) || inc("/../app01/lib/util/cache/get/get")("verifiedPhoneNumber"); if (!hasVerifiedPhone && !hasVerifiedEmail) { inc("/../app01/lib/gui/errorPopup/popup")({ label: T("verifyEmailOrPhone") }); return false; } return true; }; })(); rows/deviceRememberUser/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("rememberUser") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var update, submit, label; update = function(){ var ref$; return label.html(((ref$ = Store("deviceRememberUser")) != null ? ref$ : true) ? T("yes") : T("no")); }; submit = function(){ var ref$; if (!inc("checkEMailOrPhone/check")()) { return; } if ((ref$ = Store("deviceRememberUser")) != null ? ref$ : true) { return inc("changeToNoPopup/popup")(); } else { return inc("changeToYesPopup/popup")(); } }; page.append(Div().html(T("rememberUsers") + (engine.guiLanguage === "fr" ? " " : ""), ":"), label = Div({ display: "inline-block", padding: "0.7em", marginTop: "1em", marginBottom: "1em" }), inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submit: submit, submitLabel: T("change"), cancel: false })); return update(); } }; }; })(); rows/deviceRememberUser/row.ls (function(){ return function(){ var show, ref$, row; show = (ref$ = Store("deviceRememberUser")) != null ? ref$ : true; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("stayLoggedIn"), labelLeftSecondary: T("rememberUsers"), labelRight: show ? T("yes") : T("no") }); }; })(); rows/deviceUsers/_t.ls (function(){ return { hideUserQuestion: { de: "Soll diese/r gespeicherte Nutzer/in von der Startseite entfernt werden?", en: "Would you like to remove this saved user account from the homepage?", fr: "Ce compte doit-il être retiré de la page d'accueil ?", es: "¿Quieres que esta cuenta deje de aparecer en la página de inicio?", pt: "Você quer remover esta conta da página inicial?" }, hideCurrentUserQuestion: { de: "Möchtest du, dass du von der Startseite entfernt und abgemeldet wirst?", en: "Would you like to log out and be removed from the homepage? ", fr: "Est-ce que tu veux retirer ton compte de la page d'accueil et te déconnecter ?", es: "¿Ya no quieres que tu cuenta aparezca en la página de inicio?", pt: "Você gostaria de sair da sua conta e ser removido da página inicial?" }, userOnDevice: { de: "Gespeicherte Nutzer/innen auf der Startseite", en: "User accounts saved on the homepage", fr: "Comptes enregistrés sur la page d'accueil", es: "Cuentas en la página de inicio", pt: "Contas salvas na página inicial" }, logout: { de: "Abmelden", en: "Log out", fr: "Déconnecter", es: "Cerrar sesión", pt: "Sair" }, logoutUser: { de: "Gespeicherte Nutzer/innen von der Startseite entfernen", en: "Remove saved user accounts from the homepage", fr: "Retirer des comptes de la page d'accueil", es: "Retirar cuentas de la página de inicio", pt: "Remover contas da página inicial" }, me: { de: "ich", en: "me", fr: "moi", es: "yo", pt: "eu" }, yesDelete: { de: "Ja (entfernen)", en: "Yes (remove)", fr: "Oui (retirer)", es: "Sí (retirar cuenta)", pt: "Sim (remover conta)" }, yesLogout: { de: "Ja (abmelden)", en: "Yes (log out)", fr: "Oui (déconnecter)", es: "Sí (cerrar sesión)", pt: "Sim (sair)" }, noAbort: { de: "Nein (abbrechen)", en: "No (cancel)", fr: "Non (annuler)", es: "No (Cancelar)", pt: "Não (cancelar)" } }; })(); rows/deviceUsers/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("userOnDevice") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.append(inc("users/users")()); } }; }; })(); rows/deviceUsers/page/users/user/popup/popup.ls (function(){ return function(userLog){ var clickRemove, clickAbort, div, popup; clickRemove = function(){ return inc("remove/remove")(userLog, popup); }; clickAbort = function(){ return popup.close(); }; div = Div({ marginBottom: "1em" }).append(Div({ padding: "1em", lineHeight: "1.5em" }).html(userLog !== log ? T("hideUserQuestion") : T("hideCurrentUserQuestion")), Button({ key: "enter", action: clickRemove, label: userLog !== log ? T("yesDelete") : T("yesLogout"), icon: path("/../app01/lib/svg/icon/bin.svg") }).css({ minWidth: "10em", margin: "0.5em" }), Button({ label: T("noAbort"), type: "secondary", icon: path("/../app01/lib/svg/icon/close-small.svg"), action: clickAbort }).css({ margin: "0.5em", minWidth: "10em" })); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/deviceUsers/page/users/user/popup/remove/remove.ls (function(){ return function(userLog, popup){ delete window.userLogs[userLog.id()]; inc("/../app01/lib/util/storedUsers/removeUser/remove")(userLog.id()); userLog.unsubscribe(function(){ if (engine.isMobileApp) { return inc("removeLogFiles/remove")(userLog); } }); popup.close(); if (userLog !== log) { return startPage({ path: path("../../../../page"), replace: true }); } else { return startPage({ path: path("/../app01/pages/start/exitUser/page") }); } }; })(); rows/deviceUsers/page/users/user/popup/remove/removeLogFiles/remove.ls (function(){ return function(userLog){ var f1, f2; f1 = "logger/events_" + userLog.id() + ".json"; f2 = "logger/events_" + userLog.id() + "_unsent.json"; app.fileSystem.removeFile(f1); return app.fileSystem.removeFile(f2); }; })(); rows/deviceUsers/page/users/user/removeSvg/svg.ls (function(){ return function(){ return SvgIcon({ svg: path("/../app01/lib/svg/icon/bin.svg"), color: Color.grey[400] }).css({ position: "absolute", top: "1.6em", right: "0.7em" }); }; })(); rows/deviceUsers/page/users/user/user.ls (function(){ return function(userLog){ var description, name, n, tap, b; description = inc("/../app01/data/user/calcUserDescription/calc")(userLog); name = description.displayName; if (_.includes(userLog.authToken, "invalid")) { n = userLog.authToken || ""; n = n.split("[[displayName: ")[1] || "???"; n = n.split("]]")[0]; name = n; } if (userLog === log) { name += " (" + T("me") + ")"; } tap = function(){ return inc("popup/popup")(userLog); }; return Div({ display: "block", padding: "1.5em 2em 1.3em 3em", whiteSpace: "nowrap", cursor: "pointer", borderTop: b = "1px solid " + Color.grey[300], borderBottom: b, marginTop: "-1px", overflow: "hidden", textOverflow: "ellipsis" }).secureHtml(name).append(inc("userSvg/svg")(description), inc("removeSvg/svg")()).tap(tap); }; })(); rows/deviceUsers/page/users/user/userSvg/svg.ls (function(){ return function(description){ return inc("/../app01/lib/gui/avatar/avatar")(description).css({ position: "absolute", top: "0.4em", left: "0.2em", width: "2.5em", height: "2.8em" }); }; })(); rows/deviceUsers/page/users/users.ls (function(){ return function(){ var l; return Div({ textAlign: "left", display: "inline-block", width: "20em", maxWidth: "90%" }).html((function(){ var i$, ref$, results$ = []; for (i$ in ref$ = window.userLogs) { l = ref$[i$]; results$.push(inc("user/user")(l)); } return results$; }())); }; })(); rows/deviceUsers/row.ls (function(){ return function(){ var totalUsers, row; totalUsers = _.keys(window.userLogs).length; if (totalUsers > 0) { return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("logout"), labelLeftSecondary: T("logoutUser") }); } }; })(); rows/downloadManager/_t.ls (function(){ return { turnOffAndDeleteData: { de: "Ausschalten & Dateien löschen", en: "Turn off and delete data", fr: "Désactiver et effacer les données", es: "Desactivar y borrar datos", pt: "Desativar e apagar dados" }, turnOff: { de: "Ausschalten", en: "Turn off", fr: "Désactiver", es: "Desactivar", pt: "Desativar" }, updatedAt: { de: "Aktualisiert: vor $1", en: "Updated: $1 ago", fr: "Actualisé : il y a $1", es: "Actualizado: $1 ago", pt: "Atualizado: há $1" }, notYetUpdated: { de: "Aktualisiert: noch nie", en: "Updated: not yet", fr: "Actualisé : pas encore", es: "Actualizado: aún no", pt: "Atualizado: ainda não" }, memoryUsage: { de: "Speicherbedarf (mehr): ... Mb", en: "Required memory (more): ... Mb", fr: "Mémoire requise (plus) : ... Mb", es: "Memoria requerida (más): ... Mb", pt: "Memória requerida (mais):...Mb" }, memoryUsage2: { de: "Speicherbedarf (mehr): $1 Mb", en: "Required memory (more): $1 Mb", fr: "Mémoire requise (plus) : $1 Mb", es: "Memoria requerida (más): $1 Mb", pt: "Memória requerida (mais): $1 Mb" }, disableAutomaticDownloadGroup: { de: "Soll der automatische Offline-Download von dieser Gruppe ausgeschaltet werden?", en: "Switch off automatic download for this group?", fr: "Désactiver le téléchargement automatique pour ce group ?", es: "¿Desactivar la descarga automática para este grupo?", pt: "Você deseja desativar o download automático para este grupo?" }, disableAutomaticDownloadPlan: { de: "Soll der automatische Offline-Download von diesem Fach ausgeschaltet werden?", en: "Switch off automatic download for this subject?", fr: "Désactiver le téléchargement automatique pour cette matière ?", es: "¿Desactivar la descarga automática para esta materia?", pt: "Você deseja desativar o download automático para esta matéria?" }, switchOn: { de: "Einschalten", en: "Turn on", fr: "Activer", es: "Activar", pt: "Ativar" }, switchOnAutomaticDownload: { de: "Soll der automatische Offline-Download eingeschaltet werden?", en: "Switch on automatic download?", fr: "Activer le téléchargement automatique ?", es: "¿Activar descarga automática?", pt: "Ativar download automático?" }, subjects: { de: "Fächer", en: "Subjects", fr: "Matières", es: "Materias", pt: "Disciplinas" }, subjects2: { de: "Fächer ($1)", en: "Subjects ($1)", fr: "Matières ($1)", es: "Materias ($1)", pt: "Disciplinas ($1)" }, groups: { de: "Gruppen", en: "Groups", fr: "Groupes", es: "Grupos", pt: "Grupos" }, groups2: { de: "Gruppen ($1)", en: "Groups ($1)", fr: "Groupes ($1)", es: "Grupos ($1)", pt: "Grupos ($1)" }, offlineDownload: { de: "Offline-Download", en: "Offline download", fr: "Téléchargement", es: "Descarga sin conexión", pt: "Conteúdos baixados" }, freeSpace: { de: "Freier Speicher: $1 MB", en: "Available memory: $1 MB", fr: "Mémoire disponible : $1 MB", es: "Memoria disponible: $1 MB", pt: "Memória disponível: $1 MB" }, loadedLevels: { de: "Geladene Übungen: $1", en: "Lessons loaded: $1", fr: "Exercices téléchargés : $1", es: "Ejercicios descargados: $1", pt: "Exercícios baixados: $1" } }; })(); rows/downloadManager/pageGroups/page.ls (function(){ return inc("../pagePlans/page"); })(); rows/downloadManager/pagePlans/freeSpace/debugInfos/infos.ls (function(){ return function(manager){ var prep, lev; prep = manager.currentlyPreparingPlansTotal; lev = manager.currentlyLoadingLevels; return Div({ marginTop: "1em" }).html(SvgIcon({ svg: path("/../app01/lib/svg/shape/debug.svg"), color: Color.grey[400], size: "1em" }).css({ verticalAlign: "-0.15em" }), " prep" + prep + ", lev" + lev); }; })(); rows/downloadManager/pagePlans/freeSpace/freeSpace.ls (function(){ return function(page){ var manager, getFreeSpace, onResult, refreshTimeout, onError, div; if (!engine.isMobileApp) { return; } manager = page.downloadManager; getFreeSpace = function(){ if (page === app.currentPage) { return cordova.exec(onResult, onError, "File", "getFreeDiskSpace", []); } }; onResult = function(space){ var spaceMb; spaceMb = engine.isiOsApp ? space / 1024 / 1024 : engine.isAndroidApp ? space / 1024 : void 8; spaceMb = spaceMb > 1 ? _.round(spaceMb, 0) : spaceMb > 0 ? _.round(spaceMb, 1) : 0; div.html(T("freeSpace", spaceMb), engine.isDebug ? inc("debugInfos/infos")(manager) : void 8); return refreshTimeout(); }; refreshTimeout = function(){ return setTimeout(getFreeSpace, 1000); }; onError = function(error){ return debug("free space error", error); }; div = Div({ padding: "1.4em", color: Color.grey[400] }).html(" "); getFreeSpace(); return div; }; })(); rows/downloadManager/pagePlans/page.ls (function(){ return function(page){ page.downloadManager = inc("/../app01/lib/util/downloadManager/manager")(); page.planDescriptions = inc("/../app01/data/content/calcPlanDescriptions/calc")(); page.groupDescriptions = inc("/../app01/data/group/calcGroupDescriptions/calc")(); return { top: function(){ return inc("topbar/topbar")(page); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var descriptions; if (!engine.isMobileApp && engine.isDebug) { debug("Download page on desktop only visible for debug!"); } page.downloadManager.preparePlans(); descriptions = _.includes(app.currentPagePath, "pagePlans") ? page.planDescriptions : page.groupDescriptions; return page.append(inc("freeSpace/freeSpace")(page), inc("rows/rows")(page, descriptions)); } }; }; })(); rows/downloadManager/pagePlans/rows/row/checkIcon/checkIcon.ls (function(){ return function(id, page){ var manager, enabled, update, div; manager = page.downloadManager; enabled = manager.getPlanInfo(id).enabled; update = function(){ if (manager.getPlanInfo(id).enabled !== enabled) { return div.replaceWith(inc(THISFILE)(id, page)); } }; div = Div({ display: "flex", paddingRight: "0.5em" }).addClass("onDownloadManagerUpdate-" + id).append(SvgIcon({ svg: enabled ? path("/../app01/lib/svg/icon/check-on.svg") : path("/../app01/lib/svg/icon/check-off.svg") }).css({ verticalAlign: "-0.18em" })); div.onDownloadManagerUpdate = update; return div; }; })(); rows/downloadManager/pagePlans/rows/row/downloadBar/downloadBar.ls (function(){ return function(id, page){ return page.downloadManager.getDownloadBar(id).css({ width: "3.5em" }); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/buttons/buttons.ls (function(){ return function(id, page, rowDiv){ var manager, clickDisable, clickDisableAndRemove; manager = page.downloadManager; clickDisable = function(){ manager.disablePlan(id); app.currentPopup.close(); return page.topbar.update(); }; clickDisableAndRemove = function(){ var overlay; rowDiv.append(overlay = inc("overlayRemoving/overlay")()); app.currentPopup.close(); manager.disablePlan(id); page.topbar.update(); return manager.removeFiles(id, function(){ return overlay.remove(); }); }; return Div({ paddingTop: "0.8em" }).append(Button(T("turnOff")).css({ margin: "0.3em" }).tap(clickDisable), _.includes(id, "GROUP") !== true ? Button(T("turnOffAndDeleteData")).css({ margin: "0.3em" }).tap(clickDisableAndRemove) : void 8); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/buttons/overlayRemoving/overlay.ls (function(){ return function(){ return Div({ display: "flex", position: "absolute", left: 0, top: 0, right: 0, bottom: 0, backgroundColor: "white", opacity: 0.8, paddingRight: "0.5em", justifyContent: "flex-end" }).append(inc("/../app01/lib/gui/spinner/spinner")().css({ width: "1em", height: "1em" })); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/completedAt/completedAt.ls (function(){ return function(groupCode, page){ var planInfo, time, ref$; planInfo = page.downloadManager.getPlanInfo(groupCode); time = (ref$ = inc("/../app01/lib/util/formatDateAsAgeString/format")(planInfo.completedAt)) != null ? ref$.labelLong : void 8; return Div({ padding: "0.4em" }).html(time ? T("updatedAt", time) : T("notYetUpdated")); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/name/name.ls (function(){ return function(name){ return Div({ fontWeight: "bold", padding: "0.8em" }).html(name); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/planName/planName.ls (function(){ return function(pd){ return Div({ fontWeight: "bold", padding: "0.8em" }).html(pd.displayName); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/popup.ls (function(){ return function(page, id, name, rowDiv){ var div, popup; div = Div({ margin: "1em 0.3em" }).append(Div({ paddingTop: "0.4em", lineHeight: "1.5em" }).html(_.startsWith(id, "GROUP") ? T("disableAutomaticDownloadGroup") : T("disableAutomaticDownloadPlan")), inc("name/name")(name), inc("totalLevels/totalLevels")(id, page), inc("completedAt/completedAt")(id, page), inc("buttons/buttons")(id, page, rowDiv)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/size/calcFolderDetails/calc.ls (function(){ return function(pd, onDone){ var fileFolder, folderNames, folderDetails, totalDone, calcFolderDetails, onFolderDetails, finish; fileFolder = "content/" + pd.project; folderNames = ["plan", "levels", "_images", "_svgs", "_sounds", "_lsgs"]; folderDetails = {}; totalDone = 0; calcFolderDetails = function(){ var i$, ref$, len$, f, results$ = []; for (i$ = 0, len$ = (ref$ = folderNames).length; i$ < len$; ++i$) { f = ref$[i$]; results$.push(inc("calcFolder/calc")({ folderName: f, folderPath: fileFolder + "/" + f, onDone: onFolderDetails })); } return results$; }; onFolderDetails = function(d){ totalDone++; folderDetails[d.folderName] = d; if (totalDone === folderNames.length) { return finish(); } }; finish = function(){ var totalSize, totalFiles, i$, ref$, d; totalSize = 0; totalFiles = 0; for (i$ in ref$ = folderDetails) { d = ref$[i$]; totalSize += d.totalSize; totalFiles += d.totalFiles; } return onDone({ totalSize: totalSize, totalFiles: totalFiles, folders: folderDetails }); }; return calcFolderDetails(); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/size/calcFolderDetails/calcFolder/calc.ls (function(){ return function(p){ var getList, onList; getList = function(){ return inc("/../app01/lib/util/fileDirectoryList/list/list")({ folderPath: p.folderPath, onDone: onList }); }; onList = function(list){ var totalSize, i$, len$, n, fileSize, details; totalSize = 0; for (i$ = 0, len$ = list.length; i$ < len$; ++i$) { n = list[i$]; fileSize = parseInt(n.split("-")[1]); totalSize += fileSize; } details = { folderName: p.folderName, folderPath: p.folderPath, totalFiles: list.length, totalSize: totalSize, fileNames: list }; return p.onDone(details); }; return getList(); }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/size/showDebugDetails/show.ls (function(){ return function(details){ var i$, ref$, d, n, f, s, results$ = []; for (i$ in ref$ = details.folders) { d = ref$[i$]; n = d.folderName.replace("_", ""); f = d.totalFiles; s = _.round(d.totalSize / 1024 / 1024, 1); if (n === "levels") { f = _.filter(d.fileNames, fn$).length; } results$.push(debug(n + " " + f + "x " + s + " Mb")); } return results$; function fn$(n){ return !_.includes(n, ".ok"); } }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/size/size.ls (function(){ return function(pd){ var details, calcFolderDetails, onDetails, showDebugDetails, div; details = null; calcFolderDetails = function(){ return inc("calcFolderDetails/calc")(pd, onDetails); }; onDetails = function(d){ var sizeMb; details = d; sizeMb = details.totalSize / 1024 / 1025; sizeMb = sizeMb > 1 ? _.round(sizeMb, 0) : sizeMb > 0 ? _.round(sizeMb, 1) : 0; return div.html(T("memoryUsage2", sizeMb)); }; showDebugDetails = function(){ return inc("showDebugDetails/show")(details); }; div = Div({ padding: "0.4em" }).html(T("memoryUsage")).tap(engine.isDebug ? showDebugDetails : void 8); calcFolderDetails(); return div; }; })(); rows/downloadManager/pagePlans/rows/row/popupDisable/totalLevels/totalLevels.ls (function(){ return function(groupCode, page){ var planInfo; planInfo = page.downloadManager.getPlanInfo(groupCode); return Div({ padding: "0.4em" }).html(T("loadedLevels", planInfo.totalLevels || 0)); }; })(); rows/downloadManager/pagePlans/rows/row/popupEnable/buttons/buttons.ls (function(){ return function(id, page){ var manager, clickEnable, clickAbort, c; manager = page.downloadManager; clickEnable = function(){ manager.enablePlan(id); app.currentPopup.close(); return page.topbar.update(); }; clickAbort = function(){ return app.currentPopup.close(); }; return Div({ paddingTop: "0.8em" }).append(Button(T("switchOn")).css(c = { margin: "0.3em" }).tap(clickEnable), Button(T("cancelButton")).css(c).tap(clickAbort)); }; })(); rows/downloadManager/pagePlans/rows/row/popupEnable/name/name.ls (function(){ return function(name){ return Div({ fontWeight: "bold", padding: "0.8em" }).html(name); }; })(); rows/downloadManager/pagePlans/rows/row/popupEnable/popup.ls (function(){ return function(page, id, name){ var div, popup; div = Div({ margin: "1em 0.3em" }).append(Div({ paddingTop: "0.4em", lineHeight: "1.5em" }).html(T("switchOnAutomaticDownload")), inc("name/name")(name), inc("buttons/buttons")(id, page)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/downloadManager/pagePlans/rows/row/row.ls (function(){ return function(description, page){ var id, name, tap, rowDiv, b; id = description.project || description.groupCode; name = description.displayName || description.name; tap = function(){ var manager, enabled; manager = page.downloadManager; enabled = manager.getPlanInfo(id).enabled; if (!enabled) { return inc("popupEnable/popup")(page, id, name); } else { return inc("popupDisable/popup")(page, id, name, rowDiv); } }; return rowDiv = Div({ display: "flex", borderTop: b = "1px solid " + Color.grey[200], borderBottom: b, marginTop: "-1px", padding: "0.5em 0.3em" }).append(inc("checkIcon/checkIcon")(id, page), inc("title/title")(name), inc("downloadBar/downloadBar")(id, page)).tap(tap); }; })(); rows/downloadManager/pagePlans/rows/row/title/title.ls (function(){ return function(name){ return Div({ flex: "1 1 auto", padding: "0.4em 0.2em", textAlign: "left" }).secureHtml(name); }; })(); rows/downloadManager/pagePlans/rows/rows.ls (function(){ return function(page, descriptions){ var description; return Div({ width: "35em", maxWidth: "95%", margin: "0 auto" }).append((function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = descriptions).length; i$ < len$; ++i$) { description = ref$[i$]; results$.push(inc("row/row")(description, page)); } return results$; }())); }; })(); rows/downloadManager/pagePlans/topbar/tabMenuItems/calcTotalEnabled/calc.ls (function(){ return function(page, descriptions){ var total, i$, len$, d, id, planInfo; total = 0; for (i$ = 0, len$ = descriptions.length; i$ < len$; ++i$) { d = descriptions[i$]; id = d.project || d.groupCode; planInfo = page.downloadManager.getPlanInfo(id); if (planInfo.enabled) { total++; } } return total; }; })(); rows/downloadManager/pagePlans/topbar/tabMenuItems/tabMenuItems.ls (function(){ return function(page){ var totalEnabledPlans, totalEnabledGroups, items; totalEnabledPlans = inc("calcTotalEnabled/calc")(page, page.planDescriptions); totalEnabledGroups = inc("calcTotalEnabled/calc")(page, page.groupDescriptions); return items = [ { label: totalEnabledPlans === 0 ? T("subjects") : T("subjects2", totalEnabledPlans), selected: _.includes(app.currentPagePath, "pagePlans"), click: function(){ return startPage({ path: path("../../../pagePlans/page"), replace: true }); } }, { label: totalEnabledGroups === 0 ? T("groups") : T("groups2", totalEnabledGroups), selected: _.includes(app.currentPagePath, "pageGroups"), click: function(){ return startPage({ path: path("../../../pageGroups/page"), replace: true }); } } ]; }; })(); rows/downloadManager/pagePlans/topbar/topbar.ls (function(){ return function(page){ var topbar; topbar = inc("/../app01/addons/topbar2/topbar")({ back: true, title: T("offlineDownload"), tabMenuItems: function(){ return inc("tabMenuItems/tabMenuItems")(page); } }); topbar.update = function(){ var topbarNew; topbar.replaceWith(topbarNew = inc(THISFILE)(page)); return page.topbar = topbarNew; }; return topbar; }; })(); rows/downloadManager/row.ls (function(){ return function(page){ var showStopPopup; if (!engine.isMobileApp) { return; } showStopPopup = function(){ return inc("/../app01/pages/static/antonPlus/0_stopDownloadPopup/popup")(); }; return inc("../../0_shared/genericRow/row")({ type: page.userDescription.hasPlusAccess ? "page" : "button", labelLeft: T("offlineDownload"), page: path("pagePlans/page") }).tap(!page.userDescription.hasPlusAccess ? showStopPopup : void 8); }; })(); rows/email/_t.ls (function(){ return { emailNoBreak: { de: "E-Mail-Adresse", en: "Email address", fr: "Adresse e-mail", es: "Correo electrónico", pt: "Endereço de e-mail" }, notYetVerified: { de: "Noch nicht bestätigt.", en: "Not verified yet.", fr: "Pas encore confirmée.", es: "No ha sido verificado.", pt: "Ainda não validado." } }; })(); rows/email/labelRight/labelRight.ls (function(){ return function(mail, isVerified){ return Div({ display: "flex" }).append(Div({ flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }).secureHtml(mail), SvgIcon({ svg: isVerified ? path("/../app01/lib/svg/shape/validated.svg") : path("/../app01/lib/svg/shape/unvalidated.svg"), color: isVerified ? Color.green[500] : Color.red[400] }).css({ flex: "0 0 1em", marginLeft: "0.3em", marginTop: "0.1em" })); }; })(); rows/email/row.ls (function(){ return function(){ var e, mail, isVerified, row, hiddenMail; e = log.findLast({ event: "setEMail" }); mail = e != null ? e.value : void 8; isVerified = (e != null ? e.isVerified : void 8) || inc("/../app01/lib/util/cache/get/get")("verifiedEMail"); return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("/../app01/pages/misc/email/show/page"), params: { context: "settings" }, labelLeft: T("emailNoBreak"), labelLeftSecondary: mail && !isVerified ? T("notYetVerified") : void 8, labelRight: mail ? (hiddenMail = inc("/../app01/lib/util/calcHiddenMail/calc")(mail), inc("labelRight/labelRight")(hiddenMail, isVerified)) : "-" }); }; })(); rows/enableSoundEffects/_t.ls (function(){ return { soundEffects: { de: "Soundeffekte", en: "Sound effects", fr: "Effets sonores", es: "Efectos de sonido", pt: "Efeitos sonoros" }, enabled: { de: "Ein", en: "On", fr: "Oui", es: "Sí", pt: "Sim" }, disabled: { de: "Aus", en: "Off", fr: "Non", es: "No", pt: "Não" } }; })(); rows/enableSoundEffects/row.ls (function(){ return function(){ var varName, value, ref$, click, row; varName = "enableSoundEffects"; value = (ref$ = deviceLog['var'](varName)) != null ? ref$ : true; click = function(){ deviceLog['var'](varName, !value); return row.replaceWith(inc(THISFILE)()); }; return row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: T("soundEffects"), labelRight: value ? T("enabled") : T("disabled") }).tap(click); }; })(); rows/enableVibrationEffects/_t.ls (function(){ return { vibration: { de: "Vibrationen", en: "Vibrations", fr: "Vibration", es: "Vibración", pt: "Vibração" }, enabled: { de: "Ein", en: "On", fr: "Oui", es: "Sí", pt: "Ligada" }, disabled: { de: "Aus", en: "Off", fr: "Non", es: "No", pt: "Desligada" } }; })(); rows/enableVibrationEffects/row.ls (function(){ return function(){ var varName, value, ref$, click, row; if (!engine.isAndroidApp && window.TapticEngine == null) { return; } varName = "enableVibrationEffects"; value = (ref$ = deviceLog['var'](varName)) != null ? ref$ : true; click = function(){ deviceLog['var'](varName, !value); return row.replaceWith(inc(THISFILE)()); }; return row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: T("vibration"), labelRight: value ? T("enabled") : T("disabled") }).tap(click); }; })(); rows/exitKiosk/_t.ls (function(){ return { exitKioskMode: { de: "Exit Kiosk mode", en: "Exit kiosk mode", fr: "Quitter le mode plein écran", es: "Salir del modo quiosco", pt: "Sair do modo quiosque" } }; })(); rows/exitKiosk/row.ls (function(){ return function(){ var click, row; if (window.KioskPlugin == null) { return; } click = function(){ return KioskPlugin.exitKiosk(); }; row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: T("exitKioskMode") }).tap(click); return row; }; })(); rows/exportUserData/_t.ls (function(){ return { exportUserData: { de: "Nutzerdaten herunterladen", en: "Download user data", fr: "Télécharger mes données", es: "Descargar datos de usuario", pt: "Baixar dados de usuário" }, popupText: { de: "Klicke auf den Button, um deine ANTON-Nutzerdaten herunterzuladen.", en: "Click on the button to download your ANTON user data.", fr: "Appuie sur le bouton pour télécharger les données personnelles recueillies par ANTON.", es: "Presiona el botón para descargar tus datos de usuario en ANTON. ", pt: "Clique no botão para baixar seus dados de usuário em ANTON." }, buttonLabel: { de: "Herunterladen", en_gb: "Download", en: "Download", fr: "Télécharger", es: "Descargar", pt: "Baixar" } }; })(); rows/exportUserData/popup/buttonDownload/button.ls (function(){ return function(){ var tap, saveToFile, div; tap = function(){ return inc("submit/submit")(saveToFile); }; saveToFile = function(jsonString){ var ref$; inc("/../app01/lib/util/downloadCsvToFile/download")(jsonString, "ANTON-user-data.json"); return (ref$ = app.currentPopup) != null ? ref$.close() : void 8; }; return div = Button({ label: T("buttonLabel"), icon: path("/../app01/lib/svg/shape/arrow-download.svg") }).tap(tap); }; })(); rows/exportUserData/popup/buttonDownload/submit/submit.ls (function(){ return function(onDone){ var spinnerOverlay; spinnerOverlay = inc("/../app01/lib/gui/spinnerOverlay/overlay")(); return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/user/exportUserData/export/export"), params: { logId: log.id() }, onError: function(){ spinnerOverlay.remove(); return inc("/../app01/lib/gui/errorPopup/popup")(); }, onOffline: function(){ spinnerOverlay.remove(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }, onCompleted: function(result){ var jsonString; spinnerOverlay.remove(); if (result.status !== "ok") { return inc("/../app01/lib/gui/errorPopup/popup")(); } else { jsonString = JSON.stringify(_.omit(result, "status", "logId")); return onDone(jsonString); } } }); }; })(); rows/exportUserData/popup/popup.ls (function(){ return function(page){ var div; div = Div({ margin: "1.5em 1em" }).html(inc("title/title")(), inc("text/text")(), inc("buttonDownload/button")()); return inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/exportUserData/popup/text/text.ls (function(){ return function(){ return Div({ lineHeight: "1.5em", padding: "0.8em" }).html(T("popupText")); }; })(); rows/exportUserData/popup/title/title.ls (function(){ return function(){ return Div({ fontWeight: "bold" }).html(T("exportUserData")); }; })(); rows/exportUserData/row.ls (function(){ return function(){ var e, click, row; e = log.findLast("enableExportUserData"); if (!e) { return; } if (new Date(e.validUntil) < new Date()) { return; } click = function(){ return inc("popup/popup")(); }; return row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: T("exportUserData") }).tap(click); }; })(); rows/fontSize/_t.ls (function(){ return { save: { de: "Speichern", en: "Save", fr: "Enregistrer", es: "Guardar", pt: "Salvar" }, changeFontSize: { de: "Hier kannst du die Schriftgröße einstellen:", en: "Change font size here:", fr: "Changer la taille des caractères", es: "Aquí puedes cambiar el tamaño de la fuente:", pt: "Aqui você pode modificar o tamanho da fonte:" }, fontSize: { de: "Schriftgröße", en: "Font size", fr: "Taille des caractères", es: "Tamaño de fuente", pt: "Tamanho da fonte" } }; })(); rows/fontSize/page/adjustFontSize/adjust.ls (function(){ return function(page, delta){ var maxScale, minScale, editScale; maxScale = 1.5; minScale = 0.5; editScale = page.editScale + delta * 0.1; editScale = _.round(editScale, 2); if (editScale >= maxScale) { editScale = maxScale; page.increaseButton.setState("disabled"); } if (editScale <= minScale) { editScale = minScale; page.decreaseButton.setState("disabled"); } page.scaleDiv.html(editScale); page.example.css({ fontSize: editScale / page.originalScale + "em" }); return page.editScale = editScale; }; })(); rows/fontSize/page/buttonSave/button.ls (function(){ return function(page){ var tap; tap = function(){ inc("/../app01/lib/util/fontSize/setFontScale/set")(page.editScale); return startPage({ history: -1, animation: "slideRight" }); }; return Div({ paddingTop: "2em" }).html(Button(T("save")).tap(tap)); }; })(); rows/fontSize/page/buttonsAdjust/buttons.ls (function(){ return function(page){ return Div({ display: "flex", height: "2.5em", alignItems: "stretch" }).html(page.decreaseButton = Button({ icon: path("/../app01/lib/svg/icon/arrow-left.svg") }).css({ height: "100%" }).tap(function(){ page.adjustFontSize(-0.5); return page.increaseButton.setState("normal"); }), page.scaleDiv = Div({ display: "flex", width: "2em", height: "100%", padding: "0 1.5em", backgroundColor: Color.grey[100] }).html(page.editScale), page.increaseButton = Button({ icon: path("/../app01/lib/svg/icon/arrow-right.svg") }).css({ height: "100%" }).tap(function(){ page.adjustFontSize(0.5); return page.decreaseButton.setState("normal"); })); }; })(); rows/fontSize/page/example/example.ls (function(){ return function(page){ return Div({ margin: "0.5em auto", maxWidth: "90%", display: "flex", minHeight: "4em" }).html(page.example = Div({ flex: "1 1 auto" }).html(T("changeFontSize"))); }; })(); rows/fontSize/page/page.ls (function(){ return function(page){ page.originalScale = inc("/../app01/lib/util/fontSize/calcFontScale/calc")(); page.editScale = page.originalScale; page.adjustFontSize = function(delta){ return inc("adjustFontSize/adjust")(page, delta); }; return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("fontSize") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.html(inc("example/example")(page), inc("buttonsAdjust/buttons")(page), inc("buttonSave/button")(page)); } }; }; })(); rows/fontSize/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("fontSize"), labelRight: inc("/../app01/lib/util/fontSize/calcFontScale/calc")() }); }; })(); rows/guiLanguageUser/_t.ls (function(){ return { languageVersion: { de: "Sprachversion", en: "Language version", fr: "Langue d'affichage", es: "Idioma", pt: "Idioma" }, save: { de: "Speichern", en: "Save", fr: "Enregistrer", es: "Guardar", pt: "Salvar" }, info: { de: "ANTON bietet verschiedene Sprach­versionen an, zurzeit Deutsch, US-amerikanisches Englisch, britisches Englisch, Französisch, Spanisch und brasilianisches Portugiesisch. Wenn du die Sprach­version änderst, passt sich die Sprache der App an und es gibt andere Fächer und Übungen.", en_gb: "ANTON can be used in several different language versions, which currently include German, English (US), English (UK), French, Spanish and Portuguese. When you change the language version, the app will appear in that language and offer different subjects and exercises.", en: "ANTON can be used in several languages which currently include German, American and British English, French, Spanish and Brazilian Portuguese. When you change the language version, the app will then appear in that language and offer different subjects and exercises.", fr: "Plusieurs langues d'affichage sont disponibles sur ANTON. Actuellement : français, anglais britannique, anglais américain, allemand, portugais du Brésil et espagnol. Quand tu changes la langue d'affichage, l'application apparaît dans cette langue et offre d'autres matières et d'autres exercices.", es: "ANTON ofrece, por el momento, 6 versiones en diferentes idiomas: alemán, inglés americano, inglés británico, francés, español y portugués. Cuando cambias de versión, cambia el idioma en toda la aplicación. Cada versión ofrece diferentes materias y diferentes contenidos.", pt: "O ANTON oferece 6 versões em diferentes idiomas: alemão, inglês americano, inglês britânico, francês, espanhol e português do Brasil. Quando você muda a versão nas configurações, o idioma é modificado em todo o aplicativo. Além disso, cada versão oferece diferentes disciplinas e conteúdos." }, saveNow: { de: "Möchtest du die Änderung der Sprache speichern?", en: "Do you want to save this change?", fr: "Veux-tu enregistrer ce changement ?", es: "¿Quieres guardar el cambio de idioma?", pt: "Você deseja salvar as alterações de idioma?" }, saveChanges: { de: "Speichern", en: "Save", fr: "Enregistrer", es: "Guardar", pt: "Salvar" }, cancelButton: { de: "Abbrechen", en: "Cancel", fr: "Annuler", es: "Cancelar", pt: "Cancelar" } }; })(); rows/guiLanguageUser/page/_topbar/topbar.ls (function(){ return function(o, onSave){ var close; close = function(){ return startPage({ history: -1, animation: "slideRight" }); }; return inc("../../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("languageVersion"), back: function(){ if (o.guiLanguage === engine.guiLanguage) { return close(); } else { return inc("/../app01/lib/gui/confirmPopup/popup")({ label: T("saveNow"), yesLabel: T("saveChanges"), noLabel: T("cancelButton"), done: function(confirm){ if (confirm) { return onSave(close); } else { return close(); } } }); } } }); }; })(); rows/guiLanguageUser/page/page.ls (function(){ return function(page){ var o, onChange, onSave; o = { guiLanguage: engine.guiLanguage }; onChange = function(){ o.rowDe.update(); o.rowEnUs.update(); o.rowEnGb.update(); o.rowPt.update(); o.rowFr.update(); return o.rowEs.update(); }; onSave = function(callback){ callback == null && (callback = function(){ return startPage({ history: -1, animation: "slideRight" }); }); if (o.guiLanguage === engine.guiLanguage) { callback(); return; } inc("/../app01/lib/util/setGuiLanguageUser/set")(o.guiLanguage); return callback(); }; return { top: function(){ return inc("_topbar/topbar")(o, onSave); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.css({ width: "30em", maxWidth: "90%", margin: "1em auto" }).html(Div({ textAlign: "justify", hyphens: "auto" }).html(T("info")), Div({ height: "1.5em" }), o.rowDe = inc("row/row")(o, "de", onChange), o.rowEnUs = inc("row/row")(o, "en_us", onChange), o.rowEnGb = inc("row/row")(o, "en_gb", onChange), o.rowFr = inc("row/row")(o, "fr", onChange), o.rowEs = inc("row/row")(o, "es", onChange), o.rowPt = inc("row/row")(o, "pt", onChange), Button(T("save")).css({ marginTop: "1.5em" }).tap(function(){ return onSave(); })); } }; }; })(); rows/guiLanguageUser/page/row/checkIcon/icon.ls (function(){ return function(o, guiLanguage){ return SvgIcon({ svg: o.guiLanguage === guiLanguage ? path("/../app01/lib/svg/icon/check-on.svg") : path("/../app01/lib/svg/icon/check-off.svg") }).css({ marginRight: "0.2em", flex: "0 0 auto" }); }; })(); rows/guiLanguageUser/page/row/description/description.ls (function(){ return function(lang){ return Div({ color: Color.grey[550] }).append(lang === "de" ? "Mathe, Deutsch, Englisch, Sachunterricht, Geographie, Biologie, Chemie, Physik, Geschichte, DaZ, weitere Sprachen und Musik von der Vorschule bis zum Abitur" : lang === "en_gb" ? "English, maths, science, languages, geography, music and PSHE - Reception to KS3" : lang === "en_us" ? "English language arts, math, science, biology, physics, social studies, music, Spanish and other languages for Grades Pre-K–8" : lang === "fr" ? "Français, maths, sciences, musique, anglais, espagnol et bien d'autres langues vivantes pour l'école maternelle et l'école élémentaire" : lang === "es" ? "Matemáticas, Español, Ciencias, Música, Historia, Inglés y muchos idiomas más para preescolar, primaria y secundaria" : lang === "pt" ? "Matemática, língua portuguesa, ciências, inglês, espanhol e outros idiomas, desde a Educação Infantil até o Ensino Fundamental I." : void 8); }; })(); rows/guiLanguageUser/page/row/language/language.ls (function(){ return function(lang){ return Div({ marginTop: "-0.05em" }).append(lang === "de" ? "Deutsch" : lang === "fr" ? "Français" : lang === "es" ? "Español" : lang === "pt" ? "Português (BR)" : lang === "en_gb" ? "English (UK)" : "English (US)"); }; })(); rows/guiLanguageUser/page/row/row.ls (function(){ return function(o, guiLanguage, onChange){ var div, update; div = null; update = function(){ return div.replaceWith(div = inc(THISFILE)(o, guiLanguage, onChange)); }; div = Div({ display: "flex", alignItems: "flex-start", marginBottom: "1em" }).append(Div({ display: "flex", flexDirection: "column", flex: "1 1 auto", textAlign: "left", alignItems: "flex-start", marginLeft: "0.3em" }).append(Div({ display: "flex", verticalAlign: "top" }).append(inc("checkIcon/icon")(o, guiLanguage), inc("language/language")(guiLanguage)), inc("description/description")(guiLanguage))).tap(function(){ o.guiLanguage = guiLanguage; return onChange(); }); div.update = update; return div; }; })(); rows/guiLanguageUser/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", labelLeft: T("languageVersion"), labelRight: Div({ wordBreak: "nowrap" }).html(twitch({ de: "Deutsch", fr: "Français", en_us: "English (US)", en_gb: "English (UK)", es: "Español", pt: "Português (BR)" })) }).tap(function(){ return startPage({ path: path("page/page"), animation: "slideLeft" }); }); }; })(); rows/isBeta/row.ls (function(){ return function(){ var isBeta, click, update, row, right; isBeta = inc("/../app01/data/user/isBeta/get")(); click = function(){ isBeta = !isBeta; inc("/../app01/data/user/isBeta/set")(isBeta); return update(); }; update = function(){ return right.html(JSON.stringify(isBeta)); }; row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: "isBeta", labelRight: right = Div() }).tap(click); update(); return row; }; })(); rows/isTeacher/row.ls (function(){ return function(){ var click, update, row, labelRight; click = function(){ var isTeacher, ref$, ref1$; isTeacher = (ref$ = (ref1$ = log.findLast("isTeacher")) != null ? ref1$.value : void 8) != null ? ref$ : false; log.log({ event: "isTeacher", value: !isTeacher }); return update(); }; update = function(){ var isTeacher, ref$, ref1$; isTeacher = (ref$ = (ref1$ = log.findLast("isTeacher")) != null ? ref1$.value : void 8) != null ? ref$ : false; return labelRight.html(JSON.stringify(isTeacher)); }; row = inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: "isTeacher", labelRight: labelRight = Div() }).tap(click); update(); return row; }; })(); rows/jobs/row.ls (function(){ return function(page){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("/../app01/pages/static/jobs/page"), labelLeft: "Jobs", params: { isSettingsLink: true } }); }; })(); rows/levelFinishPageStyle/_t.ls (function(){ return { disableLevelFinishCharacters: { de: "Animationen am Übungsende", en: "Animations after levels", fr: "Animations de fin d'exercices", es: "Animaciones al terminar los ejercicios", pt: "Animações ao final dos exercícios" }, disableLevelFinishCharactersSecondary: { de: "Tanzende Figuren und Sprüche anzeigen", en: "Dancing characters and motivational messages", fr: "Personnages animés et messages sonores", es: "Personajes animados y frases motivacionales", pt: "Personagens animados e frases de motivação" }, switchToYes: { de: "Auf „Ja“ umschalten", en: "Switch to \"Yes\"", fr: "Changer pour \"Oui\"", es: "Cambiar a \"Sí\"", pt: "Mudar para \"Sim\"" }, switchToNoText: { de: "Jetzt auf „Nein“ umschalten?

Du siehst dann keine tanzenden Figuren mehr und hörst keine Sprüche mehr am Ende einer Übung.", en: "Switch to \"No\"?

Dancing characters and motivational messages will not be played at the end of each level anymore.", fr: "Changer pour \"Non\" ?

Tu n'auras ni les personnages animés, ni les messages sonores en fin d'exercice.", es: "¿Cambiar a \"No\"?

No se mostrarán personajes animados ni frases motivacionales al terminar los ejercicios.", pt: "Mudar para \"Não\"?

Não serão mais mostrados personagens animados e frases de motivação ao final dos exercícios." }, switchToNo: { de: "Auf „Nein“ umschalten", en: "Switch to \"No\"", fr: "Changer pour \"Non\"", es: "Cambiar a \"No\"", pt: "Mudar para \"Não\"?" }, switchToYesText: { de: "Jetzt auf „Ja“ umschalten?

Du siehst dann wieder tanzenden Figuren und hörst Sprüche am Ende einer Übung.", en: "Switch to \"Yes\"?

Dancing characters and motivational messages will be played at the end of each level.", fr: "Changer pour \"Oui\" ?

Tu verras les personnages animés et tu entendras les messages sonores en fin d'exercice.", es: "¿Cambiar a \"Sí\"?

Se mostrarán personajes animados y frases motivacionales al terminar los ejercicios.", pt: "Mudar para \"Sim\"?

Serão mostrados personagens animados e frases de motivação ao final dos exercícios." } }; })(); rows/levelFinishPageStyle/page/changeToNoPopup/popup.ls (function(){ return function(){ var submit, div, popup; submit = function(){ log.log({ event: "setLevelFinishPageStyle", value: "simple" }); popup.close(); return startPage({ history: -1 }); }; div = Div({ margin: "1em 0" }).append(Div({ padding: "1em" }).html(T("switchToNoText")), Button(T("switchToNo")).css({ minWidth: "6em", margin: "0.4em" }).addClass("keyManager-enter").bind("keyManager", submit).tap(submit)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/levelFinishPageStyle/page/changeToYesPopup/popup.ls (function(){ return function(){ var submit, div, popup; submit = function(){ log.log({ event: "setLevelFinishPageStyle", value: "children" }); popup.close(); return startPage({ history: -1 }); }; div = Div({ margin: "1em 0" }).append(Div({ padding: "1em" }).html(T("switchToYesText")), Button(T("switchToYes")).css({ minWidth: "6em", margin: "0.4em" }).addClass("keyManager-enter").bind("keyManager", submit).tap(submit)); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/levelFinishPageStyle/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("disableLevelFinishCharacters") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var update, submit, label; update = function(){ var ref$; return label.html(((ref$ = log.findLast("setLevelFinishPageStyle")) != null ? ref$.value : void 8) === "simple" ? T("no") : T("yes")); }; submit = function(){ var ref$; if (((ref$ = log.findLast("setLevelFinishPageStyle")) != null ? ref$.value : void 8) === "simple") { return inc("changeToYesPopup/popup")(); } else { return inc("changeToNoPopup/popup")(); } }; page.append(Div().html(T("disableLevelFinishCharacters")), label = Div({ display: "inline-block", padding: "0.7em", marginTop: "1em", marginBottom: "1em" }), inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submit: submit, submitLabel: T("change"), cancel: false })); return update(); } }; }; })(); rows/levelFinishPageStyle/row.ls (function(){ return function(){ var disabled, ref$, row; disabled = ((ref$ = log.findLast("setLevelFinishPageStyle")) != null ? ref$.value : void 8) === "simple"; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("disableLevelFinishCharacters"), labelLeftSecondary: T("disableLevelFinishCharactersSecondary"), labelRight: disabled ? T("no") : T("yes") }); }; })(); rows/logId/row.ls (function(){ return function(){ var row; row = inc("../../0_shared/genericRow/row")({ labelLeft: "logId", labelRight: log.id() }); row.right.css({ userSelect: "text" }); return row; }; })(); rows/loginCode/_t.ls (function(){ return { popup1: { de: "Öffne ANTON als App oder im Browser unter www.anton.app auf einem anderen Gerät.", en: "Open the ANTON app or go to ANTON in the browser at www.anton.app on another device.", fr: "Ouvre ANTON en tant qu'appli ou dans ton navigateur avec www.anton.app sur un autre appareil.", es: "Abre ANTON como aplicación o en el navegador bajo www.anton.app en otro dispositivo.", pt: "Abra o ANTON pelo aplicativo ou pelo navegador em www.anton.app em outro aparelho." }, popup2: { de: "Wähle auf der ANTON-Startseite \"Login mit Code, E-Mail...\" aus (falls es schon ein gespeichertes Nutzerkonto auf der Startseite gibt, musst du zuerst \"Anderes Nutzerkonto\" auswählen).", en: "On the ANTON homepage, select \"Log in with code, email...\" (if there is already a saved account on the homepage, you must first select \"Log in with another account\").", fr: "Sur la page d'accueil d'ANTON, choisis \"Me connecter avec un code, un e-mail…\" (si un compte est déjà enregistré sur la page d'accueil, appuie d'abord sur \"Autre compte\".", es: "En la página de inicio de ANTON, presiona \"Iniciar sesión con clave, correo-e...\" (si hay cuentas guardadas en la página de inicio, primero debes presionar \"Otra cuenta\").", pt: "Na página inicial do ANTON selecione \"Efetuar login com código de acesso, e-mail...\" (Se já houver uma outra conta salva na página inicial, você precisa primeiro selecionar \"Criar nova conta\"." }, popup3: { de: "Trage hier deinen Code ein oder scanne/fotografiere deinen QR-Code, falls das mit deinem Gerät möglich ist.", en: "Enter your code here or scan/photograph your QR code if possible with your device.", fr: "Entre ton code ici ou scanne/photographie ton code QR si ton appareil le permet.", es: "Utiliza tu clave o escanea tu código QR, si la cámara de tu dispositivo lo permite.", pt: "Insira seu código aqui ou escaneie/fotografe seu código QR, caso seja possível no seu dispositivo." }, popup4: { de: "Nun kannst du auf dem neuen Gerät lernen.", en_gb: "Now you can use ANTON on the new device.", en: "Now you can use ANTON on the new device.", fr: "Et voilà ! Tu peux apprendre sur le nouvel appareil.", es: "¡Listo! Ya puedes estudiar con el dispositivo nuevo.", pt: "Pronto! Agora você pode estudar neste novo dispositivo." }, myLoginCode: { de: "Mein ANTON-Anmelde-Code", en: "My ANTON login code", fr: "Mon code de connexion ANTON", es: "Mi clave de acceso ANTON", pt: "Meu código de acesso ANTON" }, loginCode: { de: "Anmelde-Code", en: "Login code", fr: "Code de connexion", es: "Clave de acceso", pt: "Código de acesso" }, loginCodes: { de: "Anmelde-Codes", en: "Login codes", fr: "Codes de connexion", es: "Claves de acceso", pt: "Códigos de acesso" }, howDoesItWork: { de: "Wie funktioniert das?", en: "How does it work?", fr: "Comment ça fonctionne ?", es: "¿Cómo funciona?", pt: "Como funciona?" }, print: { de: "Drucken", en: "Print", fr: "Imprimer", es: "Imprimir", pt: "Imprimir" }, allCodes: { de: "Alle Codes", en: "All codes", fr: "Tous les codes", es: "Todas las claves", pt: "Todos os códigos" }, youCanLoginToOtherDevices: { de: "Damit kannst du dich auf anderen Geräten anmelden.", en: "This will allow you to sign in on other devices.", fr: "Pour te connecter sur d'autres appareils", es: "Esto te permitirá conectarte en otros dispositivos.", pt: "Isto permitirá que você se conecte em outros dispositivos." }, group: { de: "Gruppe: $1", en: "Group: $1", fr: "Groupe : $1", es: "Grupo: $1", pt: "Grupo: $1" } }; })(); rows/loginCode/page/_popupInfo/item/item.ls (function(){ return function(i, t){ return Div({ display: "flex", alignItems: "stretch", padding: "0.3em", lineHeight: "1.4em", textAlign: "left" }).html(Div({ flex: "0 0 auto", marginRight: "0.5em" }).html(i + "."), Div({ flex: "1 1 auto" }).html(t)); }; })(); rows/loginCode/page/_popupInfo/popup.ls (function(){ return function(){ var i, html; i = inc("item/item"); html = Div({ margin: "1em" }).html(i(1, T("popup1")), i(2, T("popup2")), i(3, T("popup3")), i(4, T("popup4"))); return inc("/../app01/lib/gui/popup/popup")({ html: html }); }; })(); rows/loginCode/page/_popupPrint/card/card.ls (function(){ return function(loginCode){ var d; d = inc("/../app01/data/user/calcUserDescription/calc")(); return inc("/../qrcode/userCard/userCard")({ loginCode: loginCode, name: d.name, surname: d.surname }); }; })(); rows/loginCode/page/_popupPrint/popup.ls (function(){ return function(loginCode){ var print, html, userCard; print = function(){ return inc("/../app01/lib/util/print/print")({ div: userCard, title: T("myLoginCode") }); }; html = Div({ margin: "1em 0" }).append(userCard = inc("card/card")(loginCode), "
", inc("printButton/button")(print)); return inc("/../app01/lib/gui/popup/popup")({ html: html }); }; })(); rows/loginCode/page/_popupPrint/printButton/button.ls (function(){ return function(print){ return Button({ label: T("print"), icon: path("/../app01/lib/svg/shape/print.svg"), iconColor: Color.grey[600] }).css({ marginTop: "1.5em" }).tap(print); }; })(); rows/loginCode/page/groupName/groupName.ls (function(){ return function(groupName){ if (!groupName) { return; } return Div({ marginBottom: "1em" }).secureHtml(T("group", groupName) + ""); }; })(); rows/loginCode/page/loginCode/loginCode.ls (function(){ return function(loginCode){ return Div({ margin: "0.5em", fontSize: "1.5em", userSelect: "text" }).secureHtml(loginCode.toLowerCase()); }; })(); rows/loginCode/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("loginCode"), backLabel: page.event ? T("loginCodes") : void 8 }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var event, ref$, loginCode, loginCodeUrl, groupName; event = (ref$ = page.params.event) != null ? ref$ : log.findLast("setLoginCode"); loginCode = event.value; loginCodeUrl = "anton://login/" + loginCode; groupName = event.groupName; return page.append(inc("qrCode/qrCode")(loginCodeUrl), inc("loginCode/loginCode")(loginCode), inc("/../app01/lib/gui/link/link")(T("howDoesItWork")).tap(function(){ return inc("_popupInfo/popup")(); }), "
", inc("/../app01/lib/gui/link/link")(T("print")).tap(function(){ return inc("_popupPrint/popup")(loginCode, loginCodeUrl); }), !page.params.event && engine.isDebug ? [ "
", Div({ display: "flex" }).append(inc("/../app01/lib/gui/link/link")(T("allCodes")).tap(function(){ return startPage({ path: path("../pageList/page") }); }), SvgIcon({ svg: path("/../app01/lib/svg/shape/debug.svg"), size: "1em" }).css({ flex: "0 0 auto", marginRight: "0.3em" })) ] : void 8); } }; }; })(); rows/loginCode/page/qrCode/qrCode.ls (function(){ return function(loginCodeUrl){ return inc("/../qrcode/qrCode/qrCode")(loginCodeUrl, 175).css({ margin: "0 auto" }); }; })(); rows/loginCode/pageList/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("loginCodes"), backLabel: T("loginCode") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var events, div, event; events = log.list("setLoginCode"); return page.append(div = Div({ display: "inline-block", maxWidth: "95%", width: "35em", marginTop: "-1px" }).append((function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = events).length; i$ < len$; ++i$) { event = ref$[i$]; results$.push(inc("row/row")(event)); } return results$; }()))); } }; }; })(); rows/loginCode/pageList/row/row.ls (function(){ return function(event){ var groupName, row; groupName = event.groupName ? T("group", event.groupName) : void 8; return row = inc("../../../../0_shared/genericRow/row")({ type: "page", page: path("../../page/page"), params: { event: event }, labelLeft: event.value, labelLeftSecondary: groupName }); }; })(); rows/loginCode/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("loginCode"), labelLeftSecondary: T("youCanLoginToOtherDevices") }); }; })(); rows/loginCodeNeedsPassword/_t.ls (function(){ return { secureLoginCode: { de: "Anmelde-Code mit Passwort absichern", en: "Secure login code with password", fr: "Sécuriser le code de connexion", es: "Proteger clave de acceso con contraseña", pt: "Proteger código de acesso com senha" }, emptyPassword: { de: "Das Passwort darf nicht leer sein.", en: "The password cannot be left blank.", fr: "Le mot de passe ne peut pas rester vide.", es: "La contraseña no puede quedar en blanco.", pt: "A senha não pode ficar em branco." }, passwordNeeded: { de: "Du musst erst ein Passwort setzen, bevor du diese Funktion aktivieren kannst.", en: "Please set a password before enabling this option.", fr: "Tu dois définir un mot de passe avant d'activer cette option.", es: "Por favor, establece una contraseña antes de activar esta opción.", pt: "Por favor, crie uma senha para poder ativar esta função." }, emailOrPhoneNeeded: { de: "Du benötigst eine verifizierte E-Mail-Adresse oder Telefonnummer, um diese Option zu aktivieren.", en_gb: "You need a verified email address or mobile phone number to be able to activate this option.", en: "You need a verified email address or cell phone number to be able to activate this feature.", fr: "Tu as besoin d'une adresse e-mail ou d'un numéro de téléphone confirmé pour pouvoir activer cette option.", es: "Para activar esta opción necesitas haber verificado un correo electrónico o un número de teléfono.", pt: "Para ativar esta opção você precisa ter um endereço de e-mail ou um telefone validado." }, changeTo: { de: "Ändern zu '$1'", en: "Switch to '$1'", fr: "Changer pour “$1”", es: "Cambiar a '$1'", pt: "Mudar para '$1'" }, infoText: { de: "Hier kannst du einstellen, dass du bei der Anmeldung mit deinem Anmelde-Code zusätzlich noch dein Passwort eingeben musst. Damit wird deine Anmeldung besonders sicher.

Um diese Funktion zu aktivieren, musst du eine verifizierte E-Mail-Adresse oder Telefon­nummer hinterlegt haben. Dafür musst du mindestens 16 Jahre alt sein oder deine Eltern bitten, das für dich zu tun.", en_gb: "Here, you can change your settings so that we will ask for your password when you try to log in with just your login code. This will make your account more secure.

To activate this feature, you must have a verified email address or mobile phone number. To provide contact details, you must be at least 16 years old. If you are younger than 16, you can ask your parents to do it for you.", en: "Here you can change your settings so that we will ask for your password when you try to log in with just your login code. This will make your account more secure.

To activate this feature, you must have a verified email address or cell phone number. To provide contact details, you must be at least 16 years old. If you are younger than 16, you can ask your parents to do it for you.", fr: "Ici tu peux changer tes paramètres pour qu'on te demande ton mot de passe quand tu essaies de te connecter avec ton seul code de connexion. Ça sécurisera l'accès à ton compte.

Pour activer cette fonction, tu dois avoir une adresse e-mail ou un numéro de téléphone confirmé. Pour partager ces informations, tu dois avoir 16 ans ou plus. Si tu as moins de 16 ans, tu peux demander à tes parents de le faire pour toi.", es: "Aquí puedes hacer los ajustes para que, además de tu clave de acceso, tengas que ingresar tu contraseña. Esto hará el acceso a tu cuenta aún más seguro.

Para activar esta opción necesitas haber verificado un correo electrónico o un número de teléfono. Para poder hacerlo, debes tener por lo menos 16 años de edad o preguntarle a tu padre o a tu madre que lo haga por ti.", pt: "Aqui, você pode alterar suas configurações para que, além de digitar seu código de acesso, tenha que inserir também a sua senha. Isso tornará sua conta mais segura.

Para ativar esta função, você deve inserir um endereço de e-mail ou um número de telefone verificado. Para fazer isso, você precisa ter pelo menos 16 anos ou pedir aos seus pais para fazerem isso pra você." }, enterPassword: { de: "Bitte gib dein Passwort ein, um diese Funktion umzustellen:", en: "Please enter your password to change this setting:", fr: "Tu dois entrer ton mot de passe pour changer cette fonction :", es: "Necesitas ingresar tu contraseña para cambiar esta función:", pt: "Por favor, insira sua senha para modificar esta função:" }, wrongPassword: { de: "Dein Passwort ist nicht korrekt.", en: "Your password is incorrect.", fr: "Ton mot de passe est incorrect.", es: "Tu contraseña es incorrecta.", pt: "Sua senha está incorreta." } }; })(); rows/loginCodeNeedsPassword/page/onError/onError.ls (function(){ return function(page){ return function(result){ var status, label; page.buttons.css({ pointerEvents: "" }); page.buttons.hideSpinner(); status = result != null ? result.status : void 8; label = status === "error_emptyPassword" ? T("emptyPassword") : status === "error_noPassword" ? T("passwordNeeded") : status === "error_missingPhoneOrMail" ? T("emailOrPhoneNeeded") : status === "error_wrongPassword" ? T("wrongPassword") : status === "error_captcha_failed" ? T("errorCaptchaFailed") : void 8; return inc("/../app01/lib/gui/errorPopup/popup")({ label: label }); }; }; })(); rows/loginCodeNeedsPassword/page/onOffline/onOffline.ls (function(){ return function(page){ return function(){ page.buttons.css({ pointerEvents: "" }); page.buttons.hideSpinner(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }; }; })(); rows/loginCodeNeedsPassword/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("secureLoginCode") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var ref$, ref1$, label; page.enabled = (ref$ = (ref1$ = log.findLast("setLoginCodeNeedsPassword")) != null ? ref1$.value : void 8) != null ? ref$ : false; page.submit = inc("submit/submit")(page); page.onError = inc("onError/onError")(page); page.onOffline = inc("onOffline/onOffline")(page); return page.css({ margin: "1em 0" }).append(Div({ margin: "0 auto", width: "30em", maxWidth: "90%", lineHeight: "1.5em", hyphens: "auto", textAlign: "left" }).html(T("infoText")), Div({ paddingTop: "1.5em", margin: "1.5em auto 0", width: "30em", maxWidth: "90%", borderTop: "1px solid " + Color.grey[300] }).html(T("secureLoginCode") + ":"), label = Div({ display: "inline-block", padding: "0.7em" }).html(page.enabled ? T("yes") : T("no")), page.buttons = inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submit: page.submit, submitLabel: T("changeTo", page.enabled ? T("no") : T("yes")), cancel: false })); } }; }; })(); rows/loginCodeNeedsPassword/page/submit/submit.ls (function(){ return function(page){ return function(){ var submit, checkPassword, set, onCompleted; submit = function(){ var hasVerifiedEmail, ref$, hasVerifiedPhone, ref1$, hasPassword; hasVerifiedEmail = (ref$ = log.findLast("setEMail")) != null ? ref$.isVerified : void 8; hasVerifiedPhone = (ref1$ = log.findLast("setPhoneNumber")) != null ? ref1$.isVerified : void 8; hasPassword = log.findLast("setPasswordSetAt") != null; if (!hasPassword) { return page.onError({ status: "error_noPassword" }); } else if (!hasVerifiedEmail && !hasVerifiedPhone) { return page.onError({ status: "error_missingPhoneOrMail" }); } else { return checkPassword(); } }; checkPassword = function(){ var enable; page.buttons.css({ pointerEvents: "none" }); enable = !page.enabled; return inc("/../app01/lib/gui/confirmPasswordPopup/popup")({ label: T("enterPassword"), onDone: function(isCorrect, password){ if (isCorrect) { return set(enable, password); } else { return page.onError({ status: "error_wrongPassword" }); } }, onOffline: page.onOffline, onError: page.onError, onAborted: function(){ return page.buttons.css({ pointerEvents: "" }); } }); }; set = function(enable, password){ page.buttons.showSpinner(); return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/user/setLoginCodeNeedsPassword/set"), params: { logId: log.id(), password: password, value: enable }, requiredVisibleDiv: page, onCompleted: function(){ return onCompleted(enable); }, onError: page.onError, onOffline: page.onOffline }); }; onCompleted = function(enable){ return log.sync(function(){ return startPage({ history: -1 }); }); }; return submit(); }; }; })(); rows/loginCodeNeedsPassword/row.ls (function(){ return function(){ var enabled, ref$, row; enabled = (ref$ = log.findLast("setLoginCodeNeedsPassword")) != null ? ref$.value : void 8; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("secureLoginCode"), labelRight: enabled ? T("yes") : T("no") }); }; })(); rows/markForDelete/_t.ls (function(){ return { markForDelete: { de: "Nutzerkonto löschen", en: "Delete account", fr: "Supprimer le compte", es: "Eliminar cuenta", pt: "Excluir conta" }, willBeDeleted: { de: "wird am $1 gelöscht", en: "will be deleted on $1", fr: "sera supprimé le $1", es: "se eliminará el $1", pt: "será excluída em $1" }, cancel: { de: "Abbrechen", en: "Cancel", fr: "Annuler", es: "Cancelar", pt: "Cancelar" }, 'delete': { de: "Löschen", en: "Delete", fr: "Supprimer", es: "Eliminar", pt: "Excluir" } }; })(); rows/markForDelete/dirAdminDeleteFinish/finish.ls (function(){ return function(){ return startPage({ history: function(path){ return !_.includes(path, "cancelDeletionDirAdmin"); }, animation: "slideDown" }); }; })(); rows/markForDelete/popupConfirm/_t.ls (function(){ return { confirmInfoText1Pupil: { de: "Möchtest du dein Nutzerkonto wirklich löschen?
Dein Lernfortschritt wird dann unwiderruflich gelöscht.", en: "Are you sure you want to delete your account?
Your progress will then be irreversibly deleted.", fr: "Tu veux vraiment supprimer ton compte ?
L'historique de ce que tu as appris sera définitivement effacé.", es: "¿Realmente quieres eliminar tu cuenta?
Tu progreso de aprendizaje será eliminado de manera definitiva.", pt: "Tem certeza que deseja excluir sua conta?
Seu progresso de aprendizado será apagado de forma definitiva." }, confirmInfoText1Teacher: { de: "Möchtest du dein Nutzerkonto wirklich löschen?
Alle Gruppen, in denen du die einzige Lehrkraft bist, werden dann unwiderruflich gelöscht.", en: "Do you really want to delete your account?
All groups in which you are the only teacher will then be irreversibly deleted.", fr: "Tu veux vraiment supprimer ton compte ?
Tous les groupes dans lesquels tu es le·la seul·e professeur·e seront définitivement effacés.", es: "¿Realmente quieres eliminar tu cuenta?
Todos los grupos en los que seas la o el único docente se borrarán de manera definitiva.", pt: "Tem certeza que deseja excluir sua conta?
Todos os grupos, nos quais você é o(a) único(a) professor(a), serão apagados de forma definitiva." }, confirmInfoText2: { de: "Durch Klick auf \"Löschen\" wird deine Löschung zunächst nur vorbereitet. In 30 Tagen wird dein Nutzerkonto dann endgültig gelöscht. Bis dahin hast du die Möglichkeit, den Löschvorgang jederzeit wieder abzubrechen.", en: "Clicking on \"Delete\" only starts the process of deleting your account. In 30 days, your account will be permanently deleted. Until this time you can cancel the deletion process and keep your account at any time.", fr: "En appuyant sur “Supprimer”, tu engages seulement la suppression de ton compte qui se fera 30 jours plus tard. Pendant 30 jours, tu pourras donc encore à tout moment annuler la suppression définitive de ton compte.", es: "Al presionar \"Eliminar\", tu cuenta sólo será marcada para la eliminación. Después de un periodo de 30 días, tu cuenta se eliminára definitivamente. Hasta ese momento, tienes la posibilidad de interrumpir el proceso de eliminación en cualquier momento.", pt: "Ao clicar em \"Excluir\", sua conta será apenas marcada para ser excluída.Somente depois de um período de 30 dias, sua conta será excluída definitivamente.Até então, você terá a possibilidade de, a qualquer momento, interromper este processo." }, cancel: { de: "Abbrechen", en: "Cancel", fr: "Annuler", es: "Cancelar", pt: "Cancelar" }, 'delete': { de: "Löschen", en: "Delete", fr: "Supprimer", es: "Eliminar", pt: "Excluir" } }; })(); rows/markForDelete/popupConfirm/popup.ls (function(){ return function(){ var tapClose, tapDelete, isTeacher, div, popup; tapClose = function(){ return popup.close(); }; tapDelete = function(){ popup.close(); return inc("../submit/submit")(true); }; isTeacher = inc("/../app01/data/user/isTeacher/get")(); div = Div({ padding: "1em 0.5em 1.5em" }).append(SvgIcon({ svg: path("/../app01/lib/svg/illustration/alert.svg"), size: "5em" }), Div({ margin: "0.5em 0.5em 1em", lineHeight: "1.6em", textAlign: "justify", hyphens: "auto" }).html(isTeacher && engine.guiLanguage === "de" ? T("confirmInfoText1Teacher") : T("confirmInfoText1Pupil"), "

", T("confirmInfoText2")), Div({ display: "flex" }).append(Button(T("cancel")).css({ marginRight: "1em" }).tap(tapClose), Button(T("delete")).tap(tapDelete))); return popup = inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/markForDelete/popupDirDisabled/_t.ls (function(){ return { askAdminText: { de: "Du kannst dein Nutzerkonto nicht selbst löschen. Bitte den Administrator deiner Schule darum, dein Nutzerkonto zu löschen.", en: "You can't delete your account by yourself. Please ask your school admin for help.", fr: "Tu ne peux pas supprimer toi-même ton compte. Merci de demander de l'aide à la personne responsable de ton école.", es: "No puedes eliminar tu cuenta tú solo. Por favor, pide ayuda a la administración de la escuela.", pt: "Você não pode excluir sua conta por conta própria. Por favor, peça ajuda à administração da sua escola." } }; })(); rows/markForDelete/popupDirDisabled/popup.ls (function(){ return function(){ return inc("/../app01/lib/gui/infoPopup/popup")({ label: T("askAdminText") }); }; })(); rows/markForDelete/popupResult/_t.ls (function(){ return { scheduledText: { de: "Dein Nutzerkonto wurde zur Löschung vorgemerkt.", en: "Your account will be deleted in 30 days.", fr: "Ton compte sera supprimé dans 30 jours.", es: "Tu cuenta se eliminará en 30 días.", pt: "Sua conta será apagada em 30 dias." }, cancelledText: { de: "Dein Nutzerkonto wird nun nicht mehr gelöscht.", en: "Your account will no longer be deleted.", fr: "Ton compte ne sera plus supprimé.", es: "Tu cuenta ya no será eliminada.", pt: "Sua conta ainda não será apagada." }, 'continue': { de: "Weiter", en: "Continue", fr: "Continuer", es: "Continuar", pt: "Continuar" } }; })(); rows/markForDelete/popupResult/popup.ls (function(){ return function(mark){ return inc("/../app01/lib/gui/infoPopup/popup")({ label: mark ? T("scheduledText") : T("cancelledText"), buttonLabel: T("continue"), onClose: function(){ return startPage({ history: 0, animation: "none" }); } }); }; })(); rows/markForDelete/row.ls (function(){ return function(page){ var e, leftSecondary, ref$, tap; e = log.findLast("markForDelete"); leftSecondary = T("willBeDeleted", (ref$ = inc("/../app01/lib/util/formatDate2/format")(e != null ? e.dueDate : void 8)) != null ? ref$.formats.dateShort : void 8); tap = function(){ var schoolDescriptions, hasDirRole; schoolDescriptions = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); hasDirRole = _.find(schoolDescriptions, "dirRole"); if (e) { if (e.reason === "dirAdminDelete") { return startPage({ path: path("/../app01/pages/static/cancelDeletionDirAdmin/01_start/page"), animation: "slideUp", params: { finishFunctionPath: path("dirAdminDeleteFinish/finish") } }); } else { return inc("submit/submit")(false); } } else if (hasDirRole) { return inc("popupDirDisabled/popup")(); } else { return inc("popupConfirm/popup")(); } }; return inc("../../0_shared/genericRow/row")({ labelLeft: T("markForDelete"), labelLeftSecondary: e ? Div({ color: Color.red[500] }).html(leftSecondary) : void 8, labelRight: e ? T("cancel") : SvgIcon({ svg: path("/../app01/lib/svg/icon/bin.svg"), color: Color.grey[550] }) }).tap(tap); }; })(); rows/markForDelete/submit/submit.ls (function(){ return function(mark){ var spinnerOverlay; spinnerOverlay = inc("/../app01/lib/gui/spinnerOverlay/overlay")(); return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/user/markForDelete/mark"), params: { mark: mark }, onError: function(){ spinnerOverlay.remove(); return inc("/../app01/lib/gui/errorPopup/popup")(); }, onOffline: function(){ spinnerOverlay.remove(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }, onCompleted: function(){ spinnerOverlay.remove(); return log.sync(function(){ return inc("../popupResult/popup")(mark); }); } }); }; })(); rows/name/_t.ls (function(){ return { firstName: { de: "Vorname", en_gb: "First name", en: "First Name", fr: "Prénom", es: "Nombre", pt: "Nome" }, nickName: { de: "Spitzname", en: "Nickname", fr: "Surnom", es: "Apodo", pt: "Apelido" }, yourFirstName: { de: "Dein Vorname:", en: "Your first name:", fr: "Ton prénom :", es: "Tu nombre:", pt: "Seu nome:" }, yourNickName: { de: "Dein Spitzname:", en: "Your nickname:", fr: "Ton surnom :", es: "Tu apodo:", pt: "Seu apelido" }, changeNameInDays: { de: "Du kannst deinen Spitznamen erst in ((einem Tag | $1 Tagen)) wieder ändern.", en: "You can change your nickname in ((one day | $1 days)) again.", fr: "Tu peux changer à nouveau ton surnom dans ((un jour | $1 jours)).", es: "Podrás cambiar tu apodo nuevamente en ((one day | $1 days)).", pt: "Você poderá mudar seu apelido novamente em ((um dia | $1 dias))." }, changeNameInDaysDirTeacher: { de: "Eine Lehrkraft hat deinen Spitznamen geändert. Du kannst diesen erst in ((einem Tag | $1 Tagen)) wieder selbstständig ändern.", en: "A teacher has changed your nickname. You will be able to change this again yourself in ((1 day | $1 days)).", fr: "Un·e professeur·e a changé ton surnom. Tu pourras le modifier à nouveau toi-même dans ((un jour | $1 jours)).", es: "Algún docente ha modificado tu apodo. Podrás cambiarlo nuevamente en ((1 día | $1 días)).", pt: "Um(a) professor(a) mudou seu apelido. Você só poderá alterá-lo novamente em ((um dia | $1 dias))." } }; })(); rows/name/calcLockedDays/calc.ls (function(){ return function(name, created){ var age, d, sevenDays, isLockedByExternalRename, lockedDays; age = new Date() - created; d = 7 - age / (1000 * 60 * 60 * 24); d = Math.max(1, _.round(d)); sevenDays = 1000 * 60 * 60 * 24 * 7; isLockedByExternalRename = inc("calcIsLockedByExternalRename/calc")(age, sevenDays); lockedDays = isLockedByExternalRename.isLocked ? d : inc("/../app01/data/user/isTeacher/get")() ? 0 : engine.isDebug ? 0 : name === "-" ? 0 : age <= 1000 * 60 * 10 ? 0 : age >= sevenDays ? 0 : d; return { days: lockedDays, reason: isLockedByExternalRename.reason || "selfRename" }; }; })(); rows/name/calcLockedDays/calcIsLockedByExternalRename/calc.ls (function(){ return function(age, sevenDays){ var lastEvent, isInappropriateRename, isDirTeacherRename, schoolDescriptions, isDirPupil, isLocked; lastEvent = log.findLast("setName"); isInappropriateRename = (lastEvent != null ? lastEvent.renameReason : void 8) === "inappropriateName"; isDirTeacherRename = (lastEvent != null ? lastEvent.renameReason : void 8) === "dirTeacherRename"; if (isDirTeacherRename) { schoolDescriptions = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); isDirPupil = _.some(schoolDescriptions, { dirRole: "pupil" }); } isLocked = age < sevenDays && (isInappropriateRename || (isDirTeacherRename && isDirPupil)); return { isLocked: isLocked, reason: lastEvent != null ? lastEvent.renameReason : void 8 }; }; })(); rows/name/page/form/form.ls (function(){ return function(isTeacher, submit, name){ var form; return form = inc("/../app01/lib/gui/inputForm/inputForm")({ label: isTeacher ? T("yourFirstName") : T("yourNickName"), submitLabel: T("change"), submit: submit, value: name, placeholder: isTeacher ? T("firstName") : T("nickName"), forceShowButtons: true, cancel: false }); }; })(); rows/name/page/page.ls (function(){ return function(page){ var isTeacher; isTeacher = inc("/../app01/data/user/isTeacher/get")(); return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: isTeacher ? T("firstName") : T("nickName") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var name, ref$, submit, form; name = (ref$ = log.findLast("setName")) != null ? ref$.value : void 8; submit = function(){ var v; v = form.input.getValue(); if (v.length > 0) { log.changeEvent({ to: { event: "setName", value: v } }); return startPage({ history: -1 }); } }; page.append(form = inc("form/form")(isTeacher, submit, name)); return form.input.start(); } }; }; })(); rows/name/row.ls (function(){ return function(page){ var name, created, lockedDaysInfo, tap; name = page.userDescription.name || "-"; created = page.userDescription.nameCreated; lockedDaysInfo = inc("calcLockedDays/calc")(name, created); tap = function(){ return inc("/../app01/lib/gui/infoPopup/popup")({ label: lockedDaysInfo.reason === "dirTeacherRename" ? T("changeNameInDaysDirTeacher", lockedDaysInfo.days) : T("changeNameInDays", lockedDaysInfo.days) }); }; return inc("../../0_shared/genericRow/row")({ type: lockedDaysInfo.days > 0 ? "button" : "page", page: path("page/page"), labelLeft: inc("/../app01/data/user/isTeacher/get")() ? T("firstName") : T("nickName"), labelRight: name }).tap(lockedDaysInfo.days > 0 ? tap : void 8); }; })(); rows/newsletter/_t.ls (function(){ return { registered: { de: "Angemeldet", en: "Subscribed", fr: "Abonné·e", es: "Suscrito/a", pt: "Assinante" }, notRegistered: { de: "Nicht angemeldet", en: "Not subscribed", fr: "Pas abonné·e", es: "No suscrito", pt: "Não assinante" }, needEmailForRegister: { de: "Um dich zum ANTON-Newsletter anzumelden, brauchst du eine bestätigte E-Mail-Adresse.", en: "In order to subscribe to the newsletter you need a verified e-mail address.", fr: "Pour t'abonner à la Newsletter d'ANTON, tu dois avoir une adresse e-mail confirmée.", es: "Para suscribirte al boletín de ANTON necesitas haber verificado tu correo electrónico.", pt: "Para assinar a Newsletter do ANTON você precisa validar seu endereço de e-mail." }, signOf: { de: "Abmelden", en: "Unsubscribe", fr: "Me désabonner", es: "Cancelar suscripcion", pt: "Cancelar assinatura" }, signIn: { de: "Anmelden", en: "Subscribe", fr: "M'abonner", es: "Suscribirme", pt: "Assinar" }, notYetRegistered: { de: "Noch nicht angemeldet", en: "Not yet subscribed", fr: "Pas encore abonné·e", es: "Aún no suscrito/a", pt: "Ainda não assinante" }, antonNewsletter: { de: "ANTON-Newsletter", en: "ANTON Newsletter", fr: "La Newsletter d'ANTON", es: "Boletín de ANTON", pt: "Newsletter do ANTON" }, signInToNewsletterText: { de: "Melde dich zum ANTON-Newsletter an und erhalte regelmäßige E-Mails zu Neuentwicklungen bei ANTON.", en_gb: "Sign up for the ANTON newsletter and receive regular emails about the latest developments.", en: "Sign up for the ANTON newsletter and receive regular emails about the latest developments.", fr: "Abonne-toi à la Newsletter d'ANTON et reçois régulièrement des e-mails sur nos dernières nouveautés.", es: "Suscríbete al boletín de ANTON y recibe regularmente correos con las novedades de ANTON.", pt: "Assine a Newsletter do ANTON e receba regularmente e-mails com novidades do ANTON." } }; })(); rows/newsletter/labelRight/labelRight.ls (function(){ return function(){ var isEnabled, ref$; isEnabled = (ref$ = log.findLast("enableNewsletter")) != null ? ref$.value : void 8; return Div({ display: "flex" }).append(Div({ flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }).html(isEnabled ? T("registered") : T("notRegistered")), SvgIcon({ svg: isEnabled ? path("/../app01/lib/svg/shape/validated.svg") : path("/../app01/lib/svg/shape/unvalidated.svg"), color: isEnabled ? Color.green[500] : Color.red[400] }).css({ flex: "0 0 1em", marginLeft: "0.3em", marginTop: "0.1em" })); }; })(); rows/newsletter/page/button/button.ls (function(){ return function(enabled){ var isVerified, ref$, isEnabled, ref1$, toggle, div; isVerified = (ref$ = log.findLast({ event: "setEMail" })) != null ? ref$.isVerified : void 8; isEnabled = (ref1$ = log.findLast({ event: "enableNewsletter" })) != null ? ref1$.value : void 8; toggle = function(){ if (!isEnabled && !isVerified) { inc("popup/popup")(); return; } log.log({ event: "enableNewsletter", value: !isEnabled }); isEnabled = !isEnabled; enabled.update(); return div.html(isEnabled ? T("signOf") : T("signIn")); }; div = Button({ label: isEnabled ? T("signOf") : T("signIn") }).css({ margin: "1em" }).tap(toggle); return div; }; })(); rows/newsletter/page/button/popup/popup.ls (function(){ return function(){ var html, popup; html = Div({ margin: "1em" }).append(Div({ marginBottom: "0.75em" }).html(T("needEmailForRegister")), Button({ label: T("continueButton") }).tap(function(){ return popup.close(); })); return popup = inc("/../app01/lib/gui/popup/popup")({ html: html }); }; })(); rows/newsletter/page/enabled/enabled.ls (function(){ return function(){ var isEnabled, ref$, div; isEnabled = (ref$ = log.findLast({ event: "enableNewsletter" })) != null ? ref$.value : void 8; div = Div().append(Div({ display: "inline-flex" }).append(SvgIcon({ svg: isEnabled ? path("/../app01/lib/svg/shape/validated.svg") : path("/../app01/lib/svg/shape/unvalidated.svg"), color: isEnabled ? Color.green[500] : Color.red[500] }).css({ flex: "0 0 auto", marginRight: "0.2em" }), Div({ flex: "0 0 auto", color: Color.grey[600] }).append(isEnabled === true ? T("registered") : isEnabled === false ? T("notRegistered") : T("notYetRegistered")))); div.update = function(){ var ref$; isEnabled = (ref$ = log.findLast({ event: "enableNewsletter" })) != null ? ref$.value : void 8; return div.replaceWith(div = inc(THISFILE)()); }; return div; }; })(); rows/newsletter/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("antonNewsletter") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var enabled; return page.append(SvgIcon({ svg: path("/../app01/lib/svg/shape/news.svg"), size: "4em" }), Div({ margin: "0.5em auto 1em", width: "25em", maxWidth: "90%", lineHeight: "1.5em" }).html(T("signInToNewsletterText")), enabled = inc("enabled/enabled")(), inc("button/button")(enabled)); } }; }; })(); rows/newsletter/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", labelLeft: T("antonNewsletter"), page: path("page/page"), labelRight: inc("labelRight/labelRight")() }); }; })(); rows/openDebugPopup/row.ls (function(){ return function(){ var click; click = function(){ return inc("/../app01/lib/init/debugToggle/popup/popup")(); }; return inc("../../0_shared/genericRow/row")({ type: "button", labelLeft: "openDebugPopup" }).tap(click); }; })(); rows/password/01_infoFirstTime/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("password") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var submit; submit = function(){ return startPage({ path: path("/../app01/pages/misc/password/set/page"), animation: "slideUp", params: { firstTime: true, context: "settings" } }); }; return page.append(Div({ width: "30em", maxWidth: "90%", margin: "0 auto", lineHeight: "1.5em" }).html(Div({ marginBottom: "1.5em", lineHeight: "1.5em", textAlign: "justify", hyphens: "auto" }).html(T("passwordDescription")), inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submit: submit, cancel: false }))); } }; }; })(); rows/password/01_infoReset/forgotPasswordButton/button.ls (function(){ return function(page){ var click; click = function(){ var that, e, email, phone, uniqName, loginCode; if (that = log.findLast("setEMail")) { e = that; if (e.isVerified) { email = e.value; } } if (that = log.findLast("setPhoneNumber")) { e = that; if (e.isVerified) { phone = e.value; } } if (!email && !phone) { inc("/../app01/lib/gui/infoPopup/popup")({ label: T("infoMissing") }); return; } uniqName = (that = log.findLast("setUniqName")) ? that.value : void 8; loginCode = (that = log.findLast("setLoginCode")) ? that.value : void 8; return startPage({ path: path("/../app01/pages/misc/password/reset/01_forgot/page"), animation: "slideUp", params: { context: "settings", uniqName: uniqName, email: email, phone: phone, loginCode: loginCode, recoveryOptions: { hasPhone: phone != null, hasEMail: email != null } } }); }; return Div({ marginTop: "1em" }).html(Button(T("forgotPassword")).css({ backgroundColor: "white", textDecoration: "underline" }).tap(click)); }; })(); rows/password/01_infoReset/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("password") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var date, submit; date = page.params.date; if (!(_.startsWith(date, T("today")) || _.startsWith(date, T("yesterday")))) { date = T("onDate", date); } submit = function(){ return startPage({ path: path("/../app01/pages/misc/password/set/page"), animation: "slideLeft", params: { context: "settings" } }); }; return page.append(Div({ width: "30em", maxWidth: "90%", margin: "0 auto" }).html(Div({ marginBottom: "1.5em", lineHeight: "1.5em" }).html(T("changePassword", date)), inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submitLabel: T("createNew"), submit: submit, cancel: false }), inc("forgotPasswordButton/button")(page))); } }; }; })(); rows/password/_t.ls (function(){ return { password: { de: "Passwort", en: "Password", fr: "Mot de passe", es: "Contraseña", pt: "Senha" }, forgotPassword: { de: "Passwort vergessen?", en: "Forgot your password?", fr: "Mot de passe oublié ?", es: "¿Olvidaste tu contraseña?", pt: "Esqueceu sua senha?" }, passwordDescription: { de: "Wenn du hier ein Passwort festlegst, kannst du dich anschließend mit deinem Nutzernamen und diesem Passwort bei ANTON einloggen.
Um ein Passwort festzulegen, benötigst du eine verifizierte E-Mail-Adresse oder Telefonnummer. Diese kannst du dann auch anstelle des Nutzernamens nutzen, um dich zusammen mit deinem Passwort bei ANTON einzuloggen.

Merke dir das Passwort gut und verrate es bitte niemandem!", en: "If you create your password here, you will then be able to log into ANTON with your username and password. If you have provided an email address or telephone number, you can use one of these along with your password to log in.

Remember your password and do not give it to anyone!", fr: "Si tu crées un mot de passe ici, tu pourras te connecter à ton compte en utilisant ton nom d'utilisateur·rice et ce mot de passe.
Si tu as enregistré ton adresse e-mail ou ton numéro de téléphone, tu pourras aussi les utiliser avec ce mot de passe pour te connecter.

N'oublie pas ton mot de passe et surtout, ne le donne à personne !", es: "Si registras aquí una contraseña, podrás iniciar sesión en ANTON con tu nombre de cuenta y tu contraseña. Si registras tu dirección de correo electrónico o tu número de teléfono, también pudes inciciar sesión con estos datos y tu contraseña.

¡Intenta recordar tu contraseña y no se la digas a nadie!", pt: "Se você definir uma senha aqui, poderá fazer login no ANTON com seu nome de usuário(a) e esta senha.
Se você tiver um endereço de e-mail ou um número de telefone validado, também poderá usá-los para fazer login no ANTON junto com sua senha.

Tente se lembrar da sua senha e não a revele à ninguém!" }, changePassword: { de: "Du hast dein Passwort zuletzt $1 gespeichert.", en: "You last saved your password $1.", fr: "Tu as enregistré ton mot de passe pour la dernière fois $1.", es: "La última vez que guardaste tu contraseña fue $1.", pt: "A última vez que salvou sua senha foi $1." }, createNew: { de: "Passwort ändern", en: "Change password", fr: "Changer le mot du passe", es: "Cambiar contraseña", pt: "Trocar senha" }, saved: { de: "gespeichert $1", en: "saved $1", fr: "enregistré $1", es: "guardada $1", pt: "salva $1" }, today: { de: "heute", en: "today", fr: "aujourd'hui", es: "hoy", pt: "hoje" }, yesterday: { de: "gestern", en: "yesterday", fr: "hier", es: "ayer", pt: "ontem" }, onDate: { de: "am $1", en: "on $1", fr: "le $1", es: "el $1", pt: "em $1" }, infoMissing: { de: "Du benötigst eine verifizierte Handynummer oder E-Mail-Adresse, um dein Passwort zurücksetzen zu können.", en_gb: "You need a verified mobile phone number or email address to reset your password.", en: "You need a verified cell phone number or email address to reset your password.", fr: "Tu dois avoir un numéro de téléphone confirmé ou une adresse e-mail confirmée pour pouvoir réinitialiser ton mot de passe.", es: "Necesitas tener un correo electrónico o un número de teléfono verificado para restablecer tu contraseña.", pt: "Você precisa ter um endereço de e-mail ou número de telefone validado para poder redefinir sua senha." } }; })(); rows/password/row.ls (function(){ return function(){ var e, date, age, l, row; e = log.findLast({ event: "setPasswordSetAt" }); date = inc("/../app01/lib/util/formatDate2/format")(e != null ? e.created : void 8); age = e ? new Date() - e.created : 0; date = age > 1000 * 60 * 60 * 24 * 2 ? date.formats.dateShort : date.formats.fullShort; l = e ? T("saved", date) : "-"; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: !e ? path("01_infoFirstTime/page") : path("01_infoReset/page"), params: { date: date }, labelLeft: T("password"), labelRight: Div().html(l) }); }; })(); rows/phoneNumber/_t.ls (function(){ return { phoneNumber: { de: "Telefonnummer", en_gb: "Mobile phone number", en: "Cell phone number", fr: "Numéro de téléphone", es: "Número de teléfono", pt: "Número de celular" }, notYetVerified: { de: "Noch nicht bestätigt.", en: "Not verified yet.", fr: "Pas encore confirmé.", es: "No ha sido verificado.", pt: "Ainda não validado." } }; })(); rows/phoneNumber/labelRight/labelRight.ls (function(){ return function(number, isVerified){ return Div({ display: "flex" }).append(Div({ flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }).secureHtml(number), SvgIcon({ svg: isVerified ? path("/../app01/lib/svg/shape/validated.svg") : path("/../app01/lib/svg/shape/unvalidated.svg"), color: isVerified ? Color.green[500] : Color.red[400] }).css({ flex: "0 0 1em", marginLeft: "0.3em", marginTop: "0.1em" })); }; })(); rows/phoneNumber/row.ls (function(){ return function(){ var e, number, isVerified, row, hiddenNumber; e = log.findLast({ event: "setPhoneNumber" }); number = e != null ? e.value : void 8; isVerified = (e != null ? e.isVerified : void 8) || inc("/../app01/lib/util/cache/get/get")("verifiedPhoneNumber"); return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("/../app01/pages/misc/phoneNumber/show/page"), labelLeft: T("phoneNumber"), labelLeftSecondary: number && !isVerified ? T("notYetVerified") : void 8, labelRight: number ? (hiddenNumber = inc("/../app01/lib/util/calcHiddenPhoneNumber/calc")(number), inc("labelRight/labelRight")(hiddenNumber, isVerified)) : "-" }); }; })(); rows/privacy/_t.ls (function(){ return { privacyPolicy: { de: "Datenschutzbestimmungen", en: "Privacy policy", fr: "Données personnelles", es: "Política de privacidad", pt: "Política de privacidade" } }; })(); rows/privacy/row.ls (function(){ return function(page){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("/../app01/pages/static/privacy/page"), labelLeft: T("privacyPolicy"), params: { isSettingsLink: true } }); }; })(); rows/publicId/row.ls (function(){ return function(){ var row, ref$; row = inc("../../0_shared/genericRow/row")({ labelLeft: "publicId", labelRight: ((ref$ = log.findLast("setPublicId")) != null ? ref$.value : void 8) || "-" }); row.right.css({ userSelect: "text" }); return row; }; })(); rows/redeemVoucher/_t.ls (function(){ return { redeemVoucher: { de: "Gutschein einlösen", en: "Redeem voucher", fr: "Utiliser un code-cadeau", es: "Canjear vale", pt: "Utilizar cupom" }, formLabel: { de: "Gutscheincode:", en: "Voucher code:", fr: "Code du code-cadeau :", es: "Código del vale:", pt: "Código do cupom" }, submitLabel: { de: "Einlösen", en: "Redeem", fr: "Valider", es: "Hacer válido", pt: "Validar" }, emptyCode: { de: "Bitte gib deinen Gutscheincode ein", en: "Please enter your voucher code", fr: "Merci d'écrire le code-cadeau", es: "Por favor, ingresa el código del vale", pt: "Por favor, insira o código do cupom" }, errorBlocked: { de: "Du hast zu viele Anfragen innerhalb kurzer Zeit gemacht. Versuche es in einer Minute noch einmal.", en: "You've made too many attempts in a short period of time. Please try again in one minute.", fr: "Tu as fait trop d'essais en peu de temps. Merci de réessayer dans une minute.", es: "Has hecho demasiados intentos seguidos. Espera un minuto y vuelve a intentarlo.", pt: "Você fez solicitações demais em pouco tempo. Por favor, tente novamente em alguns minutos." }, errorInvalidCode: { de: "Der Code ist nicht gültig.", en: "This code is invalid.", fr: "Ce code n'est pas valide.", es: "Este código no es válido.", pt: "Este código não é válido." }, plusTitle: { de: "ANTON-Plus", en: "ANTON Plus", fr: "ANTON-Plus", es: "ANTON-Plus", pt: "ANTON-Plus" }, plusFamilyTitle: { de: "ANTON-Plus Familie", en: "ANTON Plus Family", fr: "ANTON-Plus Famille", es: "ANTON-Plus Familia", pt: "ANTON-Plus Família" }, plusTeacherTitle: { de: "ANTON-Plus Lehrer", en: "ANTON Plus Teacher", fr: "ANTON-Plus Prof", es: "ANTON-Plus Docente", pt: "ANTON-Plus Professores" }, onSuccess: { de: "Dein $1 ist nun gültig bis $2.", en: "Your $1 is valid until $2.", fr: "Ton $1 est valable jusqu'au $2.", es: "Tu $1 está vigente hasta el $2.", pt: "Seu $1 agora é válido até $2." } }; })(); rows/redeemVoucher/page/inputForm/inputForm.ls (function(){ return function(page){ var validate, change, submit, form; validate = function(value, key){ value = value.trim(); return value; }; change = function(key){ var value, validated; if (key === "") { return; } value = form.input.getValue(); validated = validate(value, key); if (value !== validated) { return form.input.setValue(validated); } }; submit = function(){ return inc("submit/submit")(form); }; return form = inc("/../app01/lib/gui/inputForm/inputForm")({ label: T("formLabel"), submitLabel: T("submitLabel"), submit: submit, change: change }); }; })(); rows/redeemVoucher/page/inputForm/submit/submit.ls (function(){ return function(form){ var code, onError, onOffline, onCompleted, finish; code = form.input.getValue().trim(); if (code === "") { form.error.html(T("emptyCode")); form.input.start(); return; } form.showSpinner(); onError = function(error){ var message; form.hideSpinner(); message = error.status === "error_blocked" ? T("errorBlocked") : error.status === "error_invalid_code" ? T("errorInvalidCode") : error.status === "error_captcha_failed" ? T("errorCaptchaFailed") : T("errorMessage"); return form.error.html(message); }; onOffline = function(){ form.hideSpinner(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }; onCompleted = function(result){ if (result.status !== "ok") { return onError(result); } else { return finish(result); } }; finish = function(result){ return log.sync(function(error){ var validUntil, ref$, product; if (error) { return onOffline(); } else { validUntil = (ref$ = inc("/../app01/lib/util/formatDate2/format")(result.validUntil)) != null ? ref$.formats.dateShort : void 8; product = (function(){ switch (result.product) { case "plus": return T("plusTitle"); case "plusFamily": return T("plusFamilyTitle"); case "plusTeacher": return T("plusTeacherTitle"); } }()); return inc("/../app01/lib/gui/infoPopup/popup")({ label: T("onSuccess", product, validUntil), onClose: function(){ return startPage({ history: -1 }); } }); } }); }; return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/payment/vouchers/redeem/redeem"), params: { code: code, checkCaptcha: true }, requiredVisibleDiv: form, onCompleted: onCompleted, onError: onError, onOffline: onOffline }); }; })(); rows/redeemVoucher/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("redeemVoucher") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var form; page.html(form = inc("inputForm/inputForm")(page)); return form.input.start(); } }; }; })(); rows/redeemVoucher/row.ls (function(){ return function(page){ return inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("redeemVoucher") }); }; })(); rows/restorePurchases/_t.ls (function(){ return { antonPlusNoBreak: { de: "ANTON-Plus", en: "ANTON Plus", fr: "ANTON-Plus", es: "ANTON-Plus", pt: "ANTON-Plus" }, antonPlusFamilyNoBreak: { de: "ANTON-Plus-Family", en: "ANTON Plus-Family", fr: "ANTON-Plus-Famille", es: "ANTON-Plus-Familia", pt: "ANTON-Plus-Familia" }, antonPlusTeacherNoBreak: { de: "ANTON-Plus-Lehrer", en: "ANTON Plus-Teacher", fr: "ANTON-Plus-Prof", es: "ANTON-Plus-Docente", pt: "ANTON-Plus-Professores" }, unknown: { de: "Unbekannt", en: "Unknown", fr: "inconnu", es: "Desconocido", pt: "Desconhecido" }, validUntil: { de: "Gültig bis", en: "Valid until", fr: "Valable jusqu'au", es: "Válido hasta", pt: "Válido até" }, restorePurchases: { de: "Käufe wiederherstellen", en: "Restore purchases", fr: "Restaurer les achats", es: "Restaurar compra", pt: "Restaurar compra" }, howDoesItWork: { de: "Wie funktioniert das?", en: "How does it work?", fr: "Comment ça fonctionne ?", es: "¿Cómo funciona?", pt: "Como funciona?" }, print: { de: "Drucken", en: "Print", fr: "Imprimer", es: "Imprimir", pt: "Imprimir" }, myLoginCode: { de: "Mein ANTON-Anmelde-Code", en: "My ANTON login code", fr: "Mon code de connexion ANTON", es: "Mi clave de acceso ANTON", pt: "Meu código de acesso ANTON" } }; })(); rows/restorePurchases/page/page.ls (function(){ return function(page){ var onSuccess, onStoreError; return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("restorePurchases") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, finish: function(){ if (!(engine.isAmazonDevice && window.amazonStore)) { store.off(onSuccess); return store.off(onStoreError); } }, start: function(){ var ref$, restoredPurchases, logEvent, showResult, onError, onAmazonSuccess, resultContainer, spinner, ref1$; if (engine.isiOsApp) { log.log({ event: "debugSetAppStoreReceipt", receipt: (ref$ = window.storekit) != null ? ref$.appStoreReceipt : void 8 }); } restoredPurchases = []; logEvent = function(o){ var event; event = o.event === "restored" ? "internalPurchaseRestored" : o.event === "error" ? "internalPurchaseError" : void 8; if (event == null) { return; } o.event = event; o.store = engine.isiOsApp ? "appstore" : engine.isAmazonDevice && window.amazonStore != null ? "amazon-appstore" : engine.isAndroidApp ? "playstore" : "paypal"; o.step = "onRestore"; o.referrer = "restorePurchases"; return log.log(o); }; showResult = function(result){ var existing, ref$; spinner.hide(); existing = _.find(restoredPurchases, function(p){ var ref$, ref1$, ref2$, ref3$; return p.sku === result.sku && ((ref$ = p.product.validationResult) != null ? (ref1$ = ref$.user) != null ? ref1$.publicId : void 8 : void 8) === ((ref2$ = result.product.validationResult) != null ? (ref3$ = ref2$.user) != null ? ref3$.publicId : void 8 : void 8); }); if (!((ref$ = result.product.validationResult) != null && ref$.user.publicId)) { debug(result); } if (!existing) { restoredPurchases.push(result); return resultContainer.append(inc("result/result")(result)); } }; onSuccess = function(p){ var ref$, ref1$, ref2$; if (((ref$ = p.validationResult) != null && ref$.isValid) && ((ref1$ = p.validationResult) != null && ref1$.isNewPurchase)) { logEvent({ event: "restored", sku: p.id, price: p.price, title: p.title }); return log.sync(function(){ var ref$, ref1$; return showResult({ restored: true, product: p, sku: (ref$ = (ref1$ = p.validationResult) != null ? ref1$.product : void 8) != null ? ref$ : p.id }); }); } else if ((ref2$ = p.validationResult) != null && ref2$.isValid) { return showResult({ restored: false, product: p }); } }; onError = function(e, data){ logEvent({ event: "error", message: e != null ? e.message : void 8, code: e != null ? e.code : void 8, data: data }); spinner.hide(); return inc("/../app01/lib/gui/errorPopup/popup")({ label: e != null ? e.message : void 8 }); }; onStoreError = function(e){ return onError(e); }; onAmazonSuccess = function(result){ var ref$, products, i$, ref1$, len$, r, product, data, results$ = []; log.log({ event: "debugSetAmazonAppStoreReceipt", receipts: result }); if (((ref$ = result.receipts) != null ? ref$.length : void 8) === 0) { spinner.hide(); } products = inc("/../app01/lib/init/setupAppstore/products/products")(); for (i$ = 0, len$ = (ref1$ = result.receipts).length; i$ < len$; ++i$) { r = ref1$[i$]; if (r.cancelDate != null) { continue; } product = _.find(products, fn$); if (product == null) { continue; } results$.push(helpers.httpRequest.post(inc("/../app01/lib/util/serverUrl/serverUrl")("payment") + "/purchase", data = { logId: log.id(), transactionId: r.receiptId, receipt64: { receipt: r, userData: result.amazonUserData }, store: "amazon-appstore", product: product.sku, priceMicros: product.priceMicros, currency: product.currency }, fn1$)); } return results$; function fn$(p){ return p.sku.indexOf(r.sku + ".") === 0; } function fn1$(error, result){ if (error != null) { return onError(error, { sku: product.sku, price: product.price, title: product.title, step: "onRestore", details: data }); } else { if (result.status === "ok") { amazonStore.notifyFulfillment(function(res){}, function(err){}, data.transactionId); product.validationResult = result; return onSuccess(product); } } } }; page.append(resultContainer = Div({ display: "flex", width: "35em", maxWidth: "90%", margin: "1em auto", alignItems: "stretch", flexDirection: "column" }), spinner = inc("/../app01/lib/gui/spinner/spinner")()); if (engine.isAmazonDevice && window.amazonStore) { return amazonStore.getPurchaseUpdates(onAmazonSuccess, onStoreError, true); } else { store.when("product").verified(onSuccess); store.error(onStoreError); return (ref1$ = store.refresh()) != null ? typeof ref1$.finished == 'function' ? ref1$.finished(function(){ return spinner != null ? spinner.hide() : void 8; }) : void 8 : void 8; } } }; }; })(); rows/restorePurchases/page/result/loginCodePopup/popup.ls (function(){ return function(user){ var div, card; div = Div({ padding: "0 0 1em 0" }).html(card = inc("/../qrcode/userCard/userCard")({ loginCode: user.loginCode, name: user.name }), inc("/../app01/lib/gui/link/link")(T("howDoesItWork")).tap(function(){ return inc("/rows/loginCode/page/_popupInfo/popup")(); }).css({ marginTop: "1em" }), "
", inc("/../app01/lib/gui/link/link")(T("print")).tap(function(){ return inc("/../app01/lib/util/print/print")({ div: card, title: T("myLoginCode") }); })); return inc("/../app01/lib/gui/popup/popup")({ html: div }); }; })(); rows/restorePurchases/page/result/result.ls (function(){ return function(result){ var restored, sku, ref$, ref1$, message, user, ref2$, product, productName, validUntil, ref3$, isValid; restored = result.restored; sku = (ref$ = (ref1$ = result.product.validationResult) != null ? ref1$.product : void 8) != null ? ref$ : result.product.id; message = (ref$ = result.product.validationResult) != null ? ref$.message : void 8; user = (ref2$ = result.product.validationResult) != null ? ref2$.user : void 8; product = sku.split(".")[4]; productName = product === "plus" ? T("antonPlusNoBreak") : product === "plusFamily" || product === "plusfamily" ? T("antonPlusFamilyNoBreak") : product === "plusTeacher" || product === "plusteacher" ? T("antonPlusTeacherNoBreak") : T("unknown"); validUntil = (ref3$ = result.product.validationResult) != null ? ref3$.validUntil : void 8; isValid = false; if (validUntil) { isValid = validUntil > new Date().toISOString(); validUntil = inc("/../app01/lib/util/formatDate2/format")(new Date(validUntil)); validUntil = validUntil.formats.dateShort; } if (!isValid) { return; } return Div({ display: "flex", flex: "1 1 auto", padding: "1em 0em", borderBottom: "1px solid " + Color.grey[300], borderTop: "1px solid " + Color.grey[300], marginTop: "-1px" }).html(user != null ? Div({ display: "flex", flex: "0 0 auto", flexDirection: "column", marginRight: "1em" }).append(inc("/../app01/lib/gui/avatar/avatar")(user.avatar).css({ width: "2em", height: "2em", borderRadius: "50%" }), Div().secureHtml(user.name), Div({ color: Color.grey[500], fontSize: "50%", fontWeight: "bold" }).secureHtml(user.loginCode)) : void 8, Div({ flex: "1 1 auto", display: "flex", flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start", wordBreak: "break-word" }).html(productName), Div({ display: "flex", flex: "0 0 auto", flexDirection: "column" }).append(Div().html(T("validUntil")), Div().html(validUntil))).tap(user != null ? function(){ return inc("loginCodePopup/popup")(user); } : void 8); }; })(); rows/restorePurchases/row.ls (function(){ return function(){ var row; if (!engine.isMobileApp) { return; } if (engine.isAmazonDevice) { if (!window.amazonStore) { return; } } else { if ((typeof store != 'undefined' && store !== null ? store.CONSUMABLE : void 8) == null) { return; } } return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("restorePurchases") }); }; })(); rows/role/_t.ls (function(){ return { userType: { de: "Nutzertyp", en: "Account type", fr: "Type de compte", es: "Tipo de cuenta", pt: "Tipo de conta" }, teacher: { de: "Lehrkraft", en: "Teacher", fr: "Professeur·e", es: "Docente", pt: "Professores" } }; })(); rows/role/row.ls (function(){ return function(){ if (!inc("/../app01/data/user/isTeacher/get")()) { return; } return inc("../../0_shared/genericRow/row")({ labelLeft: T("userType"), labelRight: T("teacher") }); }; })(); rows/school/_t.ls (function(){ return { school: { de: "Schule", en: "School", fr: "École", es: "Escuela", pt: "Escola" }, schools: { de: "Schulen", en: "Schools", fr: "Écoles", es: "Escuelas", pt: "Escolas" }, settings: { de: "Einstellungen", en: "Settings", fr: "Paramètres", es: "Ajustes", pt: "Configurações" }, more: { de: "$1 weitere", en: "$1 more", fr: "$1 de plus", es: "$1 adicionales", pt: "$1 adicionais" }, noSchool: { de: "keine", en: "none", fr: "aucune", es: "ninguna", pt: "nenhuma" } }; })(); rows/school/labelLeft/label.ls (function(){ return function(d){ if (d.length < 2) { return T("school"); } else { return T("schools"); } }; })(); rows/school/labelRight/_arrow/arrow.ls (function(){ return function(){ return SvgIcon({ svg: path("/../app01/lib/svg/icon/arrow-right-small.svg"), color: Color.grey[400] }); }; })(); rows/school/labelRight/label.ls (function(){ return function(schoolDescriptions){ if (schoolDescriptions.lengths === 0) { return inc("noSchool/label")(); } else { return inc("schools/label")(schoolDescriptions); } }; })(); rows/school/labelRight/noSchool/label.ls (function(){ return function(){ return Div({ display: "flex" }).append(Div({ flex: "1 1 auto", marginRight: "0.3em" }).html(T("noSchool")), inc("../_arrow/arrow")()); }; })(); rows/school/labelRight/schools/label.ls (function(){ return function(schoolDescriptions){ return Div({ display: "flex" }).append(inc("list/list")(schoolDescriptions), inc("../_arrow/arrow")()); }; })(); rows/school/labelRight/schools/list/list.ls (function(){ return function(schoolDescriptions){ var i, d; return Div({ flex: "1 1 auto" }).append((function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = schoolDescriptions).length; i$ < len$; ++i$) { i = i$; d = ref$[i$]; if (i === 3) { break; } else { results$.push(inc("school/school")(d)); } } return results$; }()), schoolDescriptions.length > 3 ? inc("more/more")(schoolDescriptions) : void 8); }; })(); rows/school/labelRight/schools/list/more/more.ls (function(){ return function(schoolDescriptions){ var t; t = schoolDescriptions.length - 3; return Div({ paddingRight: "1.9em" }).html(T("more", t)); }; })(); rows/school/labelRight/schools/list/school/school.ls (function(){ return function(d){ var name, ref$; name = (ref$ = d != null ? d.name : void 8) != null ? ref$ : "..."; return Div({ display: "flex", margin: "0.4em 0.2em 0.4em 0" }).append(Div({ flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", paddingRight: "0.3em", whiteSpace: "nowrap" }).secureHtml(name), inc("/../app01/pages/school/_shared/schoolIcon/icon")({ schoolDescription: d, size: "mini" })); }; })(); rows/school/pages/_actionNewSchool/_t.ls (function(){ return { newSchool: { de: "Neue Schule", en: "New school", fr: "Nouvelle école", es: "Nueva escuela", pt: "Nova escola" }, askAddSchool: { de: "Möchtest du eine weitere Schule hinzufügen?", en: "Do you want to add another school?", fr: "Veux-tu ajouter une autre école ?", es: "¿Quieres agregar una escuela más?", pt: "Você gostaria de adicionar mais uma escola?" }, add: { de: "Hinzufügen", en: "Add", fr: "Ajouter", es: "Agregar", pt: "Adicionar" } }; })(); rows/school/pages/_actionNewSchool/new.ls (function(){ return function(page){ if (!page.showAddSchool) { return; } return { label: T("newSchool"), icon: path("/../app01/lib/svg/shape/plus.svg"), click: function(){ return inc("/../app01/pages/schoolSearch/start")({ finishFunctionPath: path("/../app01/pages/school/_shared/joinSchool/join") }); } }; }; })(); rows/school/pages/details/_row/arrow/arrow.ls (function(){ return function(showArrow){ if (!showArrow) { return; } return SvgIcon({ svg: path("/../app01/lib/svg/icon/arrow-right-small.svg"), color: Color.grey[400] }).css({ marginLeft: "0.3em" }); }; })(); rows/school/pages/details/_row/label/label.ls (function(){ return function(label){ return Div({ flex: "1 1 auto", paddingRight: "0.6em", textAlign: "left" }).html(label); }; })(); rows/school/pages/details/_row/row.ls (function(){ return function(o){ var b; return Div({ display: "flex", textAlign: "left", padding: "1.2em 0.5em", borderBottom: b = "1px solid " + Color.grey[200], borderTop: b, marginTop: "-1px", alignItems: "center", background: "white" }).append(inc("label/label")(o.label), inc("value/value")(o.value), inc("arrow/arrow")(o.arrow), o.icon ? o.icon : void 8); }; })(); rows/school/pages/details/_row/value/value.ls (function(){ return function(value){ return Div({ flex: "1 1 auto", userSelect: "text", color: Color.grey[700], overflow: "hidden", textOverflow: "ellipsis", textAlign: "right" }).secureHtml(value); }; })(); rows/school/pages/details/_t.ls (function(){ return { rowLabelLocation: { de: "Ort", en: "Location", fr: "Lieu", es: "Lugar", pt: "Lugar" }, rowLabelName: { de: "Name", en: "Name", fr: "Nom", es: "Nombre", pt: "Nome" }, rowLabelDirDisplayName: { de: "Schulverzeichnis-Eintrag", en: "School directory entry", fr: "Entrée du répertoire scolaire", es: "Entrada en el directorio escolar", pt: "Entrada no Diretório Escolar" }, exitSchool: { de: "Schule verlassen", en: "Leave school", fr: "Quitter l'école", es: "Abandonar la escuela", pt: "Sair da escola" } }; })(); rows/school/pages/details/_topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ back: true, backLabel: page.params.backLabel, title: page.params.schoolName, actions: inc("../../_actionNewSchool/new")(page) }); }; })(); rows/school/pages/details/dirDisplayName/dirDisplayName.ls (function(){ return function(page){ var d; d = page.schoolDescription.dirDisplayName; if (!d) { return; } return inc("../_row/row")({ label: T("rowLabelDirDisplayName"), value: d }); }; })(); rows/school/pages/details/exit/_t.ls (function(){ return { schoolGroupWarning: { de: "Bevor du aus der Schule austreten kannst, musst du diese Schule aus den folgenden Gruppen entfernen:
$1

Gehe dazu in die Gruppe, dort auf den Reiter Einstellungen, auf Schule und dann auf Gruppe aus Schule entfernen.", en: "Before you can leave the school, please first remove the assigned school from the following groups:
$1

In order to do this, go to group settings, click on School and then Remove group from school.", fr: "Avant de pouvoir quitter cette école, tu dois d'abord retirer le(s) groupe(s) suivant(s) de l'école :
$1

Pour le faire, va dans les paramètres du groupe, appuie sur École et ensuite sur Retirer le groupe de l'école.", es: "Antes de que puedas abandonar la escuela, necesitas retirar a los siguientes grupos de la escuela:
$1

Para retirarlos, ve a los ajustes del grupo, presiona Escuela y luego Retirar el grupo de la escuela.", pt: "Antes de poder sair da escola, você deve retirar a escola dos seguintes grupos:
$1

Para fazer isso, vá até Configurações, selecione Escola e depois Retirar o grupo da escola." }, confirmExitSchool: { de: "Möchtest du diese Schule jetzt verlassen?", en: "Do you want to leave this school now?", fr: "Veux-tu quitter cette école maintenant ?", es: "¿Quieres abandonar esta escuela ahora?", pt: "Tem certeza que deseja sair dessa escola?" }, cancelButton: { de: "Abbrechen", en: "Cancel", fr: "Annuler", es: "Cancelar", pt: "Cancelar" }, leave: { de: "Verlassen", en: "Leave", fr: "Quitter", es: "Abandonar", pt: "Sair" } }; })(); rows/school/pages/details/exit/confirmPopup/confirm.ls (function(){ return function(page){ return inc("/../app01/lib/gui/confirmPopup/popup")({ yesLabel: T("leave"), noLabel: T("cancelButton"), label: T("confirmExitSchool"), onConfirm: function(){ return inc("../submit/submit")(page); } }); }; })(); rows/school/pages/details/exit/exit.ls (function(){ return function(page){ var sd, tap; sd = page.schoolDescription; if (sd.dirRole != null) { return; } tap = function(){ var groups, schoolGroups, groupNames; groups = inc("/../app01/data/group/calcGroupDescriptions/calc")(); schoolGroups = _.filter(groups, function(g){ var ref$; return g.type !== "family" && g.userRoles.teacher && g.userRoles.admin && ((ref$ = g.school) != null ? ref$.schoolCode : void 8) === sd.schoolCode; }); if (schoolGroups.length > 0) { groupNames = _.map(schoolGroups, function(g){ return "'" + g.name + "'"; }).join(", "); return inc("/../app01/lib/gui/infoPopup/popup")({ label: T("schoolGroupWarning", groupNames) }); } else { return inc("confirmPopup/confirm")(page); } }; return inc("../_row/row")({ label: T("exitSchool"), icon: SvgIcon({ svg: path("/../app01/lib/svg/shape/exit.svg"), color: Color.grey[600] }) }).tap(tap); }; })(); rows/school/pages/details/exit/submit/submit.ls (function(){ return function(page){ var schoolCode, publicId, ref$; schoolCode = page.schoolDescription.schoolCode; publicId = (ref$ = log.findLast("setPublicId")) != null ? ref$.value : void 8; return inc("/../app01/data/school/memberRemove/remove")({ schoolCode: schoolCode, publicId: publicId, onOffline: function(){ return inc("/../app01/lib/offline/offlinePopup/popup")(); }, onCompleted: function(){ return log.sync(function(){ return startPage({ animation: "slideRight", history: -1 }); }); } }); }; })(); rows/school/pages/details/image/image.ls (function(){ return function(page){ return inc("/../app01/pages/school/_shared/schoolIcon/icon")({ schoolDescription: page.schoolDescription, size: "big" }).css({ margin: "0 auto 2em" }); }; })(); rows/school/pages/details/location/location.ls (function(){ return function(page){ var d, location; d = page.schoolDescription; location = d.zip ? d.zip + " " + d.city + ", " + d.country : d.location; return inc("../_row/row")({ label: T("rowLabelLocation"), value: location }); }; })(); rows/school/pages/details/name/name.ls (function(){ return function(page){ return inc("../_row/row")({ label: T("rowLabelName"), value: page.schoolDescription.name }); }; })(); rows/school/pages/details/page.ls (function(){ return function(page){ page.showAddSchool = page.params.showAddSchool; page.schoolDescription = inc("/../app01/data/school/calcSchoolDescription/calc")(page.params.schoolCode); return { top: function(){ return inc("_topbar/topbar")(page); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ return page.css({ width: "35em", maxWidth: "95%", margin: "1em auto" }).append(inc("image/image")(page), inc("schoolCode/schoolCode")(page), inc("name/name")(page), inc("location/location")(page), inc("dirDisplayName/dirDisplayName")(page), inc("exit/exit")(page)); } }; }; })(); rows/school/pages/details/schoolCode/schoolCode.ls (function(){ return function(page){ if (!engine.isDebug) { return; } return Div({ margin: "-1.5em 0 1em", userSelect: "text", fontSize: "0.9em", color: Color.grey[400] }).html(page.params.schoolCode); }; })(); rows/school/pages/list/_t.ls (function(){ return { titleMySchools: { de: "Meine Schulen", en: "My schools", fr: "Mes écoles", es: "Mis escuelas", pt: "Minhas escolas" }, noSchoolsYet: { de: "Du hast noch keine Schule
für dich ausgewählt.", en_gb: "You have not chosen
your school yet.", en: "You have not yet chosen
your school.", fr: "Tu n'as pas encore choisi
ton école.", es: "Aún no has elegido
tu escuela.", pt: "Você ainda não selecionou
nenhuma escola." } }; })(); rows/school/pages/list/_topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ back: true, backLabel: page.params.backLabel, title: T("titleMySchools"), actions: inc("../../_actionNewSchool/new")(page) }); }; })(); rows/school/pages/list/noSchool/icon/icon.ls (function(){ return function(){ return inc("/../app01/pages/school/_shared/schoolIcon/icon")({ size: "medium" }).css({ margin: "1em auto 0.5em" }); }; })(); rows/school/pages/list/noSchool/noSchool.ls (function(){ return function(){ return Div().append(inc("icon/icon")(), inc("text/text")()); }; })(); rows/school/pages/list/noSchool/text/text.ls (function(){ return function(){ return Div({ lineHeight: "1.5em", paddingBottom: "2em" }).html(T("noSchoolsYet")); }; })(); rows/school/pages/list/page.ls (function(){ return function(page){ page.showAddSchool = true; page.schoolDescriptions = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); return { top: function(){ return inc("_topbar/topbar")(page); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var schoolDescription; return page.css({ width: "35em", maxWidth: "95%", margin: "1em auto" }).html(page.schoolDescriptions.length === 0 ? inc("noSchool/noSchool")() : (function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = page.schoolDescriptions).length; i$ < len$; ++i$) { schoolDescription = ref$[i$]; results$.push(inc("rowSchool/row")(schoolDescription, page)); } return results$; }())); } }; }; })(); rows/school/pages/list/rowSchool/arrow/arrow.ls (function(){ return function(){ return SvgIcon({ svg: path("/../app01/lib/svg/icon/arrow-right-small.svg"), color: Color.grey[400] }); }; })(); rows/school/pages/list/rowSchool/center/center.ls (function(){ return function(d){ var name, location; name = d.name; location = d.zip ? d.zip + " " + d.city + ", " + d.country : d.location; return Div({ display: "flex", flex: "1 1 auto", textAlign: "left", alignItems: "stretch", flexDirection: "column", padding: "0 0.2em 0 0.7em" }).append(Div().secureHtml(name), Div({ color: Color.grey[600], paddingTop: "0.1em" }).secureHtml(location)); }; })(); rows/school/pages/list/rowSchool/icon/icon.ls (function(){ return function(d){ return inc("/../app01/pages/school/_shared/schoolIcon/icon")({ schoolDescription: d }); }; })(); rows/school/pages/list/rowSchool/row.ls (function(){ return function(d){ var tap, b; tap = function(){ return startPage({ path: path("../../details/page"), animation: "slideLeft", params: { schoolCode: d.schoolCode, schoolName: d.name } }); }; return Div({ display: "flex", textAlign: "left", padding: "0.9em 0.2em", borderBottom: b = "1px solid " + Color.grey[200], borderTop: b, marginTop: "-1px", alignItems: "center", background: "white" }).append(inc("icon/icon")(d), inc("center/center")(d), inc("arrow/arrow")()).tap(tap); }; })(); rows/school/row.ls (function(){ return function(){ var sds; sds = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); return inc("../../0_shared/genericRow/row")({ labelLeft: inc("labelLeft/label")(sds), labelRight: inc("labelRight/label")(sds) }).tap(function(){ if (sds.length === 0) { return inc("/../app01/pages/schoolSearch/start")({ finishFunctionPath: path("/../app01/pages/school/_shared/joinSchool/join") }); } else if (sds.length < 2) { return startPage({ path: path("pages/details/page"), animation: "slideLeft", params: { schoolCode: sds[0].schoolCode, schoolName: sds[0].name, showAddSchool: true, backLabel: T("settings") } }); } else { return startPage({ path: path("pages/list/page"), animation: "slideLeft", params: { backLabel: T("settings") } }); } }); }; })(); rows/schoolWork/_t.ls (function(){ return { updated: { de: "aktualisiert $1", en: "updated $1", fr: "actualisé $1", es: "Actualizado $1", pt: "Atualizado $1" }, notUpdated: { de: "nicht aktualisiert", en: "not updated", fr: "pas actualisé", es: "no actualizado", pt: "não atualizado" }, failed: { de: "fehlgeschlagen", en: "failed", fr: "échec", es: "fallido", pt: "fracassado" }, appleSchoolWork: { de: "Apple Schoolwork", en: "Apple Schoolwork", fr: "App Pour l'école", es: "Apple Schoolwork", pt: "Apple Schoolwork" }, schoolWorkDescription: { de: "Hier kannst du das Synchronisieren der Lerninhalte mit Apple Schoolwork manuell starten. \n\nUm mehr über Schoolwork zu erfahren, besuche\nhttps://www.apple.com/de/education/teaching-tools/", en_gb: "Here you can start synchronising learning material manually with Apple Schoolwork.\n\nTo find out more about Schoolwork, visit\nhttps://www.apple.com/education/k12/teaching-tools/", en: "Here you can start synchronizing learning material manually with Apple Schoolwork.\n\nTo find out more about Schoolwork, visit\nhttps://www.apple.com/education/k12/teaching-tools/", fr: "Ici tu peux commencer à synchroniser le contenu d'apprentissage manuellement avec l'app Pour l'école.\n\nPour en savoir plus sur l'app “Pour l'école”, visite\nhttps://www.apple.com/fr/education/teaching-tools/", es: " Aquí puedes empezar a sincronizar el contenido académico con Apple Schoolwork de forma manual.\n\n Para conocer más sobre Schoolwork, visita\n https://www.apple.com/mx/education/teaching-tools/", pt: " Aqui você pode começar a sincronizar o conteúdo de aprendizagem com o Apple Schoolwork manualmente.\n\n Para conhecer mais sobre Schoolwork, visite\n https://www.apple.com/mx/education/teaching-tools/" }, status: { de: "Status: ", en: "Status: ", fr: "Statut : ", es: "Estatus: ", pt: "Status: " }, sync: { de: "Synchronisieren", en_gb: "Synchronise", en: "Synchronize", fr: "Synchroniser", es: "Sincronizar", pt: "Sincronizar" } }; })(); rows/schoolWork/page/page.ls (function(){ return function(page){ var loading, label, button, getDateString, updateLabel, click; loading = false; getDateString = function(){ var date, dateString, age, l; date = Store("classKitContentSetAt"); if (date != null && (date = new Date(date))) { dateString = inc("/../app01/lib/util/formatDate2/format")(date).formats.fullShort; } else { dateString = "-"; } age = date != null ? new Date() - date : 0; l = date != null ? T("updated", dateString) : T("notUpdated"); if (age > 1000 * 60 * 60 * 24 * 2) { l = l.substring(0, l.length - 6); } return l; }; updateLabel = function(error){ if (error != null) { if (error.offline) { inc("/../app01/lib/offline/offlinePopup/popup")(); } else { label.css({ color: Color.red[500] }); if (engine.isDebug) { label.html(error); } else { label.html(T("failed")); } return; } } return label.css({ color: "" }).html(getDateString()); }; click = function(){ if (loading) { return; } loading = true; button.setEnabled(false); label.html(inc("/../app01/lib/gui/spinner/spinner")({ small: true })); return inc("/../app01/lib/init/classKit/setContent/setContent")(function(error){ updateLabel(error); loading = false; return button.setEnabled(true); }); }; return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("appleSchoolWork") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ page.append(Div({ maxWidth: "90%", margin: "0 auto", width: "30em", wordWrap: "break-word" }).html(T("schoolWorkDescription")), Div({ margin: "2em auto 2em auto", width: "20em", maxWidth: "80%", backgroundColor: Color.grey[300], height: "1px" }), Div({ display: "flex", width: "30em", maxWidth: "90%", flexWrap: "wrap", margin: "0 auto" }).append(Div().html(T("status")), label = Div()), button = Button(T("sync")).css({ marginTop: "1em" }).tap(click)); return updateLabel(); } }; }; })(); rows/schoolWork/row.ls (function(){ return function(){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("appleSchoolWork") }); }; })(); rows/showBottomFreezeZone/row.ls (function(){ return function(){ return inc("../../0_shared/deviceLogVarRow/row")("showBottomFreezeZone"); }; })(); rows/soundEffects/_t.ls (function(){ return { soundEffects: { de: "Soundeffekte", en: "Sound effects", fr: "Effets sonores", es: "Efectos de sonido", pt: "Efeitos sonoros" }, pageLabel: { de: "Stelle hier ein, ob du in den Übungen und am Übungsende Soundeffekte („Pling“-Geräusche) hören möchtest.", en_gb: "Here you can turn off the sound effects (“Pling”) that you hear after solving an exercise.", en: "Here you can turn off the sound effects (“pling”) that you hear after solving an exercise.", fr: "Ici tu peux activer ou non les effets sonores (“Bling”) que tu entends pendant et après les exercices.", es: "Aquí puedes establecer si deseas escuchar efectos de sonido (pling) durante y al final de los ejercicios.", pt: "Defina aqui se você deseja escutar os efeitos sonoros (pling) durante e ao final dos exercícios." }, disabled: { de: "Aus", en: "Off", fr: "Non", es: "No", pt: "Não" }, enabled: { de: "Ein", en: "On", fr: "Oui", es: "Sí", pt: "Sim" } }; })(); rows/soundEffects/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("soundEffects") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var enabled, ref$, ref1$, submit; enabled = (ref$ = (ref1$ = log.findLast("setEnableSoundEffects")) != null ? ref1$.value : void 8) != null ? ref$ : true; submit = inc("submit/submit")(page); return page.append(inc("title/title")(), inc("row/row")({ label: T("soundEffects") + ":", submit: submit, selected: enabled })); } }; }; })(); rows/soundEffects/page/row/label/label.ls (function(){ return function(p){ return Div({ flex: "0 1 auto", textAlign: "left", padding: "0.4em 0.2em", overflow: "hidden", textOverflow: "ellipsis" }).html(p.label); }; })(); rows/soundEffects/page/row/row.ls (function(){ return function(p){ var selected, tap, div; selected = undefined; p.page = app.currentPage; p.selected == null && (p.selected = false); tap = function(){ p.selected = !p.selected; selected.replaceWith(selected = inc("selected/selected")(p)); return p.submit(p.selected); }; return div = Div({ display: "inline-flex", padding: "0.4em 0" }).html(inc("label/label")(p), selected = inc("selected/selected")(p)).tap(tap); }; })(); rows/soundEffects/page/row/selected/selected.ls (function(){ return function(p){ return Div({ flex: "0 0 auto", width: "1.6em", display: "flex", paddingLeft: "0.2em", alignSelf: "stretch" }).html(SvgIcon({ color: Color.grey[600], svg: p.selected ? path("/../app01/lib/svg/icon/check-on.svg") : path("/../app01/lib/svg/icon/check-off.svg") })); }; })(); rows/soundEffects/page/submit/submit.ls (function(){ return function(page){ return _.debounce(function(enabled){ var e; e = log.findLast({ event: "setEnableSoundEffects" }); if ((e != null ? e.value : void 8) === enabled) { return; } if (e) { log.deleteEvent(e); } return log.log({ event: "setEnableSoundEffects", value: enabled }); }, 300); }; })(); rows/soundEffects/page/title/title.ls (function(){ return function(){ return Div({ width: "30em", maxWidth: "90%", margin: "0 auto 0.5em", lineHeight: "1.5em" }).html(T("pageLabel")); }; })(); rows/soundEffects/row.ls (function(){ return function(page){ var enabled, ref$, ref1$, row; enabled = (ref$ = (ref1$ = log.findLast("setEnableSoundEffects")) != null ? ref1$.value : void 8) != null ? ref$ : true; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("soundEffects"), labelRight: enabled ? T("enabled") : T("disabled") }); }; })(); rows/surname/_t.ls (function(){ return { surname: { de: "Nachname", en_gb: "Surname", en: "Last name", fr: "Nom de famille", es: "Apellido(s)", pt: "Sobrenome" }, yourName: { de: "Dein Nachname:", en_gb: "Your surname:", en: "Your last name:", fr: "Ton nom de famille :", es: "Tu(s) apellido(s)", pt: "Seu sobrenome:" }, teacherOnly: { de: "nur für Lehrkräfte", en: "for teachers only", fr: "Uniquement pour les professeur·es", es: "Sólo para docentes", pt: "Somente para professores" } }; })(); rows/surname/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("surname") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var name, ref$, submit; name = (ref$ = log.findLast("setSurname")) != null ? ref$.value : void 8; submit = function(){ return inc("submit/submit")(page, name); }; page.append(page.form = inc("/../app01/lib/gui/inputForm/inputForm")({ label: T("yourName"), submitLabel: T("change"), submit: submit, value: name, placeholder: T("surname"), forceShowButtons: true, cancel: false })); if (!name) { return page.form.input.start(); } } }; }; })(); rows/surname/page/submit/submit.ls (function(){ return function(page, name){ var v; v = page.form.input.getValue(); if (v === name) { return; } log.changeEvent({ to: { event: "setSurname", value: v } }); return startPage({ history: -1, animation: "slideRight" }); }; })(); rows/surname/row.ls (function(){ return function(page){ var surname; if (!inc("/../app01/data/user/isTeacher/get")()) { return; } surname = page.userDescription.surname || "-"; return inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("surname"), labelLeftSecondary: T("teacherOnly"), labelRight: surname }); }; })(); rows/teacherDirCode/_t.ls (function(){ return { activateSchoolDirCode: { de: "Schulverzeichnis-Lehrer-Code eintragen", en: "Enter school directory teacher code", fr: "Rejoindre un répertoire scolaire", es: "Unirse al directorio escolar", pt: "Entrar no Diretório Escolar" } }; })(); rows/teacherDirCode/pages/01_enterCode/_t.ls (function(){ return { pageTitle: { de: "Wenn deine Schule eine ANTON-Schullizenz hat, trage hier bitte den Code ein, den du von deinem Schul-Admin oder von uns bekommen hast.", en_gb: "If your school has an ANTON School Licence, please enter the code you received from your school administrator or from us.", en: "If your school has an ANTON School License, please enter the code you received from your school administrator or from us.", fr: "Si ton école a une licence scolaire ANTON, entre ici le code qui t'a été donné.", es: "Si tu escuela tiene una licencia escolar ANTON, ingresa la clave que te ha sido proporcionada aquí.", pt: "Se a sua escola tiver uma Licença Escolar ANTON, por favor, insira aqui o código que lhe foi disponibilizado." }, alreadyDirMemberIn: { de: "Du bist bereits Schulverzeichnis-Mitglied in folgenden Schulen:
", en: "You are already a school directory member in the following school(s):
", fr: "Tu es déjà membre du répertoire scolaire de l'école suivante :
", es: "Ya eres miembro del directorio escolar de las siguientes escuelas:
", pt: "Você já é membro do Diretório Escolar das seguintes escolas:
" } }; })(); rows/teacherDirCode/pages/01_enterCode/_topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ back: true, title: T("topbarTitle") }); }; })(); rows/teacherDirCode/pages/01_enterCode/dirSchoolInfos/infos.ls (function(){ return function(){ var schools, dirSchools; schools = inc("/../app01/data/school/calcSchoolDescriptions/calc")(); dirSchools = _.filter(schools, function(d){ return d.dirRole != null; }); if (dirSchools.length === 0) { return; } return Div({ width: "30em", maxWidth: "90%", margin: "1.5em auto 0" }).secureHtml(T("alreadyDirMemberIn"), Div({ height: "0.3em" }), _.map(dirSchools, "name").join(", ")); }; })(); rows/teacherDirCode/pages/01_enterCode/form/form.ls (function(){ return function(page, submit){ return inc("/../app01/lib/gui/inputForm/inputForm")({ label: T("pageTitle"), submitLabel: T("continueButton"), submit: submit, cancel: false, forceShowButtons: true, screenKeyboardLayout: twitch({ en: "loginEN", fr: "loginFR", es: "loginES", pt: "loginPT", def: "login" }) }).css({ maxWidth: "90%", margin: "0 auto" }); }; })(); rows/teacherDirCode/pages/01_enterCode/page.ls (function(){ return function(page){ return { top: function(){ return inc("_topbar/topbar")(page); }, start: function(){ var submit, form, dirSchoolInfos, c; submit = function(){ return inc("submit/submit")(page, form); }; page.append(form = inc("form/form")(page, submit), dirSchoolInfos = inc("dirSchoolInfos/infos")()); if (c = page.params.dirCode) { form.input.setValue(c); } return form.input.start(); } }; }; })(); rows/teacherDirCode/pages/01_enterCode/submit/submit.ls (function(){ return function(page, form){ var dirCode, publicId, ref$; dirCode = form.input.getValue(); publicId = (ref$ = log.findLast("setPublicId")) != null ? ref$.value : void 8; if (dirCode.length === 0) { form.error.html(T("errorEmpty")); form.input.start(); return; } form.showSpinner(); return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/school/admin/activateTeacherDirCode/step01/step01"), params: { dirCode: dirCode, publicId: publicId, checkCaptcha: true }, requiredVisibleDiv: page, onError: function(error){ form.hideSpinner(); return inc("/../app01/lib/gui/errorPopup/popup")(); }, onOffline: function(){ form.hideSpinner(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }, onCompleted: function(result){ var errors, l; if (result.status !== "ok") { form.hideSpinner(); errors = { error_invalid_code: T("errorInvalidCode"), error_not_prepared: T("errorInvalidCode"), error_code_already_assigned: T("errorCodeAssigned"), error_no_subscription: T("errorNoSubscription"), error_pupil_code: T("errorPupilCode"), error_already_member: T("errorDirMember"), error_not_teacher: T("errorMustBeTeacher"), error_captcha_failed: T("errorCaptchaFailed") }; l = errors[result.status]; if (l) { return form.error.html(l); } else { return inc("/../app01/lib/gui/errorPopup/popup")(); } } else { page.params.dirCode = dirCode; return startPage({ path: path("../../02_confirm/page"), animation: "slideLeft", params: _.omit(result, ["status", "publicId"]) }); } } }); }; })(); rows/teacherDirCode/pages/02_confirm/_t.ls (function(){ return { title: { de: "Möchtest du jetzt dem Schulverzeichnis beitreten?", en: "Would you like to join the school directory?", fr: "Veux-tu devenir membre du répertoire scolaire ?", es: "¿Quieres unirte al directorio escolar?", pt: "Você gostaria de entrar no Diretório Escolar?" }, rowSchool: { de: "Schule", en: "School", fr: "École", es: "Escuela", pt: "Escola" }, rowDirDisplayName: { de: "Schulverzeichnis-Eintrag", en: "School directory entry", fr: "Entrée du répertoire scolaire", es: "Entrada en el directorio escolar", pt: "Entrar no Diretório Escolar" }, rowType: { de: "Nutzertyp", en: "Account Type", fr: "Type de compte", es: "Tipo de cuenta", pt: "Tipo de conta" }, teacher: { de: "Lehrkraft", en: "Teacher", fr: "Professeur·e", es: "Docente", pt: "Professor(a)" }, admin: { de: "Admin", en: "Admin", fr: "Admin", es: "Admin", pt: "Admin." }, add: { de: "Beitreten", en: "Join", fr: "Devenir membre", es: "Unirse", pt: "Entrar" } }; })(); rows/teacherDirCode/pages/02_confirm/_topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ back: true, title: T("topbarTitle") }); }; })(); rows/teacherDirCode/pages/02_confirm/buttons/buttons.ls (function(){ return function(page){ return page.buttons = inc("/../app01/lib/gui/buttonsSubmitCancel/buttons")({ submitLabel: T("add"), submit: page.submit, cancelLabel: T("backButton"), cancel: function(){ return startPage({ history: -1, animation: "slideRight" }); } }); }; })(); rows/teacherDirCode/pages/02_confirm/page.ls (function(){ return function(page){ return { top: function(){ return inc("_topbar/topbar")(page); }, start: function(){ page.submit = function(){ return inc("submit/submit")(page); }; return page.css({ width: "35em", maxWidth: "90%", margin: "0 auto" }).append(inc("title/title")(), inc("values/values")(page), inc("buttons/buttons")(page)); } }; }; })(); rows/teacherDirCode/pages/02_confirm/submit/submit.ls (function(){ return function(page){ var dirCode, publicId, ref$; dirCode = page.params.dirCode; publicId = (ref$ = log.findLast("setPublicId")) != null ? ref$.value : void 8; page.buttons.showSpinner(); return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/school/admin/activateTeacherDirCode/step02/step02"), params: { dirCode: dirCode, publicId: publicId }, requiredVisibleDiv: page, timeout: 60000, onError: function(error){ debug(error); page.buttons.hideSpinner(); return inc("/../app01/lib/gui/errorPopup/popup")(); }, onOffline: function(){ page.buttons.hideSpinner(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }, onCompleted: function(result){ var message; if (result.status !== "ok") { page.buttons.hideSpinner(); debug(result.status); message = result.status === "error_invalid_code" ? T("errorInvalidCode") : result.status === "error_code_already_assigned" ? T("errorCodeAssigned") : result.status === "error_not_teacher" ? T("errorNotTeacher") : result.status === "error_already_member" ? T("errorAlreadyMember") : T("errorMessage"); return inc("/../app01/lib/gui/errorPopup/popup")({ label: message }); } else { return startPage({ path: path("../../03_done/page"), animation: "slideLeft", params: result }); } } }); }; })(); rows/teacherDirCode/pages/02_confirm/title/title.ls (function(){ return function(){ return Div({ paddingBottom: "2em", lineHeight: "1.5em" }).html(T("title")); }; })(); rows/teacherDirCode/pages/02_confirm/values/_row/row.ls (function(){ return function(label, value){ return Div({ display: "flex", padding: "0.7em", borderTop: "1px solid " + Color.grey[300], borderBottom: "1px solid " + Color.grey[300], marginBottom: "-1px", textAlign: "left", minWidth: "12em" }).append(Div({ flex: "0 0 auto", alignSelf: "flex-start", display: "inline-block", width: "10em", verticalAlign: "top" }).html(label), Div({ flex: "1 1 auto", alignSelf: "flex-start", display: "inline-block", verticalAlign: "top" }).secureHtml(value)); }; })(); rows/teacherDirCode/pages/02_confirm/values/dirDisplayName/dirDisplayName.ls (function(){ return function(page){ var n; n = inc("/../app01/data/school/calcDirDisplayName/calc")(page.params, "long"); return inc("../_row/row")(T("rowDirDisplayName"), n); }; })(); rows/teacherDirCode/pages/02_confirm/values/school/school.ls (function(){ return function(page){ var n; n = page.params.schoolName; if (!_.isString(n)) { n = n[engine.guiLanguage] || _.values(n)[0]; } return inc("../_row/row")(T("rowSchool"), n); }; })(); rows/teacherDirCode/pages/02_confirm/values/type/type.ls (function(){ return function(page){ return inc("../_row/row")(T("rowType"), page.params.isAdmin ? T("admin") : T("teacher")); }; })(); rows/teacherDirCode/pages/02_confirm/values/values.ls (function(){ return function(page){ return Div({ display: "inline-block", maxWidth: "90%", marginBottom: "2em" }).append(inc("school/school")(page), inc("dirDisplayName/dirDisplayName")(page), inc("type/type")(page)); }; })(); rows/teacherDirCode/pages/03_done/_t.ls (function(){ return { textTeacher: { de: "Du bist nun Lehrkraft im Schulverzeichnis.", en: "You now are a teacher in the school directory.", fr: "Tu es maintenant professeur·e dans le répertoire scolaire.", es: "Ya eres docente dentro del directorio escolar.", pt: "Você já é professor(a) dentro do Diretório Escolar." }, textAdmin: { de: "Du bist nun Admin im Schulverzeichnis.", en: "You are now an admin in the school directory.", fr: "Tu es maintenant admin dans le répertoire scolaire.", es: "Eres admin. en el directorio escolar.", pt: "Você agora é um(a) administrador(a) do Diretório Escolar." }, add: { de: "Hinzufügen", en: "Add", fr: "Ajouter", es: "Agregar", pt: "Adicionar" }, notNow: { de: "Nicht jetzt", en: "Not now", fr: "Pas maintenant", es: "Ahora no", pt: "Agora não" }, groupAddInfo: { de: "Um die Schullizenz mit deinen Gruppen nutzen zu können, müssen diese zur richtigen Schule hinzugefügt werden. Wähle bitte alle Gruppen aus, die du zu „$1“ hinzufügen möchtest. (Du kannst es auch später manuell in den Gruppeneinstellungen machen.)", en_gb: "To use the school licence with your groups, they need to be added to the correct school. Select all groups that you want to add to the school ‘$1’. (You can also do this later in the group settings.)", en: "To use the school license with your groups, they need to be added to the correct school. Select all groups that you want to add to the school ‘$1’. (You can also do this later in the group settings.)", fr: "Pour utiliser la licence scolaire avec tes groupes, tu dois les ajouter à la bonne école. Sélectionne tous les groupes que tu veux ajouter à l'école ‘$1’. (Tu peux aussi le faire plus tard dans les paramètres des groupes)", es: "Para poder usar la licencia escolar con tus grupos, estos tienen que ser agregados a la escuela correcta. Elige todos los grupos que quieras agregar a la escuela ‘$1’. (también lo puedes hacer más tarde en los ajustes del grupo.)", pt: "Para poder utilizar a Licença Escolar com seus grupos,eles devem ser adicionados à escola correta.Selecione todos os grupos que deseja adicionar à escola '$1'.(também é possível fazer isso mais tarde nas configurações de grupo.)" }, groupAddSuccessInfoSingular: { de: "Deine Gruppe $1 wurde erfolgreich zur Schule hinzugefügt.", en: "Your group $1 was added to the school successfully.", fr: "Ton groupe $1 a bien été ajouté à l'école.", es: "Tu grupo $1 fue agregado exitosamente a la escuela.", pt: "Seu grupo $1 foi adicionado à escola com sucesso." }, groupAddSuccessInfoPlural: { de: "Deine Gruppen $1 wurden erfolgreich zur Schule hinzugefügt.", en: "Your groups $1 were added to the school successfully.", fr: "Tes groupes $1 ont bien été ajoutés à l'école.", es: "Tus grupos $1 fueron agregados exitosamente a la escuela.", pt: "Seus grupos $1 foram adicionados à escola com sucesso." } }; })(); rows/teacherDirCode/pages/03_done/_topbar/topbar.ls (function(){ return function(page){ return inc("/../app01/addons/topbar2/topbar")({ title: T("topbarTitle") }); }; })(); rows/teacherDirCode/pages/03_done/buttonAdd/addGroupsToSchool/add.ls (function(){ return function(groups, schoolCode, onDone){ var i, add; i = -1; add = function(){ var g; i++; g = groups[i]; if (!g) { return onDone(); } else { return inc("/../app01/data/school/groupAdd/add")({ groupCode: g.groupCode, schoolCode: schoolCode, onCompleted: add, onError: function(error){ debug(error); inc("/../app01/lib/gui/errorPopup/popup")(); return onDone("error"); }, onOffline: function(){ inc("/../app01/lib/offline/offlinePopup/popup")(); return onDone("offline"); } }); } }; return add(); }; })(); rows/teacherDirCode/pages/03_done/buttonAdd/button.ls (function(){ return function(page){ var spinner, schoolCode, tap, div; schoolCode = page.params.schoolCode; tap = function(){ var selectedGroups; selectedGroups = page.groupsDiv.getSelectedGroups(); if (_.every(selectedGroups, function(g){ return !g; })) { return; } spinner = inc("/../app01/lib/gui/spinnerDivOverlay/overlay")(div); return inc("addGroupsToSchool/add")(selectedGroups, schoolCode, function(error){ var addedGroupNames, g; spinner.stop(); if (!error) { addedGroupNames = (function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = selectedGroups).length; i$ < len$; ++i$) { g = ref$[i$]; results$.push("'" + g.name + "'"); } return results$; }()).join(", "); return inc("/../app01/lib/gui/infoPopup/popup")({ label: selectedGroups.length === 1 ? T("groupAddSuccessInfoSingular", addedGroupNames) : T("groupAddSuccessInfoPlural", addedGroupNames), onClose: function(){ return startPage({ history: -3, animation: "slideRight" }); } }); } }); }; return div = Button(T("add")).css({ minWidth: "5em" }).tap(tap); }; })(); rows/teacherDirCode/pages/03_done/buttonContinue/button.ls (function(){ return function(page){ var tap, div; tap = function(){ return startPage({ history: -3, animation: "slideRight" }); }; return div = Button(T("ok")).css({ minWidth: "5em" }).tap(tap); }; })(); rows/teacherDirCode/pages/03_done/calcGroups/calc.ls (function(){ return function(){ var groups, teacherGroupsWithoutSchool; groups = inc("/../app01/data/group/calcGroupDescriptions/calc")(); return teacherGroupsWithoutSchool = _.filter(groups, function(g){ return g.type !== "family" && g.userRoles.teacher && g.userRoles.admin && g.school == null; }); }; })(); rows/teacherDirCode/pages/03_done/groups/groups.ls (function(){ return function(page){ var getSelectedGroups, schoolName, div, rows, g; getSelectedGroups = function(){ var seletedGroups, i$, ref$, len$, i, row; seletedGroups = []; for (i$ = 0, len$ = (ref$ = rows).length; i$ < len$; ++i$) { i = i$; row = ref$[i$]; if (row.getSelected()) { seletedGroups.push(page.groups[i]); } } return seletedGroups; }; schoolName = _.isString(page.params.schoolName) ? page.params.schoolName : page.params.schoolName ? page.params.schoolName[engine.guiLanguage] || page.params.schoolName[_.keys(page.params.schoolName)[0]] || "-" : void 8; div = Div({ lineHeight: "1.7em" }).secureHtml(T("groupAddInfo", schoolName)).append(Div({ display: "flex", margin: "1em auto" }).html(Div({ display: "flex", flexDirection: "column", maxWidth: "90%", alignItems: "flex-start" }).html(rows = (function(){ var i$, ref$, len$, results$ = []; for (i$ = 0, len$ = (ref$ = page.groups).length; i$ < len$; ++i$) { g = ref$[i$]; results$.push(inc("row/row")(g)); } return results$; }())))); div.getSelectedGroups = getSelectedGroups; return div; }; })(); rows/teacherDirCode/pages/03_done/groups/name/name.ls (function(){ return function(name){ return Div({ flex: "1 1 auto" }).html(name); }; })(); rows/teacherDirCode/pages/03_done/groups/row/icon/icon.ls (function(){ return function(){ var selected, toggle, div, iconOff, iconOn; selected = false; toggle = function(){ selected = !selected; if (selected) { iconOff.hide(); return iconOn.show(); } else { iconOn.hide(); return iconOff.show(); } }; div = Div({ flex: "0 0 auto" }).append(iconOff = SvgIcon({ svg: path("/../app01/lib/svg/icon/check-off.svg") }).css({ marginTop: "0.2em" }), iconOn = SvgIcon({ svg: path("/../app01/lib/svg/icon/check-on.svg") }).css({ marginTop: "0.2em" }).hide()); div.toggle = toggle; div.getSelected = function(){ return selected; }; return div; }; })(); rows/teacherDirCode/pages/03_done/groups/row/row.ls (function(){ return function(g){ var div, icon; div = Div({ display: "flex", justifyChildren: "flex-start", padding: "0.2em", maxWidth: "100%" }).html(icon = inc("icon/icon")(), Div({ marginLeft: "0.2em", flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }).secureHtml(g.name)).tap(icon.toggle); div.getSelected = icon.getSelected; return div; }; })(); rows/teacherDirCode/pages/03_done/notNowLink/link.ls (function(){ return function(page){ var tap; tap = function(){ return startPage({ history: -3, animation: "slideRight" }); }; return inc("/../app01/lib/gui/link/link")({ label: T("notNow"), iconColor: "black" }).css({ marginTop: "0.8em", padding: "0.5em" }).tap(tap); }; })(); rows/teacherDirCode/pages/03_done/page.ls (function(){ return function(page){ page.groups = inc("calcGroups/calc")(); return { top: function(){ return inc("_topbar/topbar")(page); }, start: function(){ return page.css({ width: "35em", maxWidth: "90%", margin: "1em auto" }).append(inc("text/text")(page), page.groups.length > 0 ? [page.groupsDiv = inc("groups/groups")(page), inc("buttonAdd/button")(page), "
", inc("notNowLink/link")(page)] : inc("buttonContinue/button")(page)); } }; }; })(); rows/teacherDirCode/pages/03_done/text/text.ls (function(){ return function(page){ return Div({ lineHeight: "1.5em", marginBottom: "0.8em" }).html(page.params.isAdmin ? T("textAdmin") : T("textTeacher")); }; })(); rows/teacherDirCode/pages/_t.ls (function(){ return { topbarTitle: { de: "Schulverzeichnis-Lehrer-Code eintragen", en: "Enter school directory teacher code", fr: "Rejoindre un répertoire scolaire avec un code", es: "Ingresar clave-docente en el directorio escolar", pt: "Digitar código-professores do Diretório Escolar" }, errorEmpty: { de: "Das Feld darf nicht leer sein.", en: "This field cannot be left blank.", fr: "Ce champ ne peut pas rester vide.", es: "Este campo no puede quedar en blanco.", pt: "Este campo não pode ficar em branco." }, errorInvalidCode: { de: "Der Code ist ungültig.", en: "This code is invalid.", fr: "Ce code n'est pas valide.", es: "La clave no es válida.", pt: "O código é inválido." }, errorCodeAssigned: { de: "Der Code ist schon einem Nutzer zugeordnet.", en: "This code is already assigned to an account.", fr: "Ce code est déjà attribué à un·e utilisateur·rice.", es: "La clave ya ha sido asignada a otro u otra usuaria.", pt: "Este código foi designado à outro(a) usuário(a)." }, errorMustBeTeacher: { de: "Der Code ist nur für Lehrkräfte gültig.", en: "This code is only valid for teachers.", fr: "Le code est valable uniquement pour des professeur·es.", es: "La clave sólo es válida para docentes.", pt: "O código só é válido para professores." }, errorDirMember: { de: "Du hast schon einen Schulverzeichnis-Eintrag.", en: "You already have a school directory entry.", fr: "Tu as déjà une entrée dans le répertoire scolaire.", es: "Ya tienes una entrada en el directorio escolar.", pt: "Você já possui uma entrada no Diretório Escolar." }, errorNotTeacher: { de: "Der Nutzer muss Lehrkraft sein!", en: "The user must be a teacher", fr: "L'utilisateur·rice doit être professeur·e.", es: "El o la usuaria tiene que ser docente.", pt: "A conta deve ser de um(a) professor(a)." }, errorAlreadyMember: { de: "Der Nutzer ist bereits im Schulverzeichnis.", en: "This user is already in the school directory.", fr: "L'utilisateur·rice est déjà dans le répertoire scolaire.", es: "El o la usuaria ya existe en el directorio escolar.", pt: "Esta conta já existe no Diretório Escolar." }, errorPupilCode: { de: "Dies ist ein Schüler-Code. Du benötigst einen Lehrer-Code, um dem Schulverzeichnis als Lehrkraft beizutreten.", en_gb: "This is a pupil code. You need a teacher code to join the school directory as a teacher.", en: "This is a student code. You need a teacher code to join the school directory as a teacher.", fr: "Il s'agit d'un code-élève. Tu dois avoir un code-professeur pour rejoindre le répertoire scolaire en tant que professeur·e.", es: "Esta es una clave-estudiante. Necesitas una clave-docente para unirte al directorio escolar como docente.", pt: "Este é um código-alunos. Você precisa de um código-professores para poder entrar no Diretório Escolar como professor(a)." }, errorNoSubscription: { de: "Du kannst dem Schulverzeichnis nicht beitreten. Eventuell ist deine Schullizenz erst ab einem zukünftigen Datum oder nicht mehr gültig. Bei weiteren Fragen wende dich an support@anton.app.", en_gb: "You are unable to join the school directory. This may be due to the fact that your school licence is not yet valid or your school licence has expired. If you have further questions, please contact support@anton.app.", en: "You are unable to join the school directory. This may be due to the fact that your school license will not be valid until a future date or is no longer valid. If you have further questions, please contact support@anton.app.", fr: "Tu ne peux pas rejoindre le répertoire scolaire. La licence scolaire de l'école n'est peut-être pas encore active ou elle n'est plus valide. En cas de question, tu peux nous écrire à support@anton.app.", es: "No te puedes unir al directorio escolar. Tal vez, la validez de tu licencia escolar aún no comienza o ya expiró. Si tienes dudas, envíanos un correo a support@anton.app.", pt: "Você não pode entrar no Diretório Escolar. A validade da sua Licença Escolar pode ainda não ter começado ou talvez ela já tenha expirado. Se você tiver alguma dúvida, envie-nos um e-mail para support@anton.app." } }; })(); rows/teacherDirCode/row.ls (function(){ return function(){ if (!inc("/../app01/data/user/isTeacher/get")()) { return; } return inc("../../0_shared/genericRow/row")({ type: "page", page: path("pages/01_enterCode/page"), labelLeft: T("activateSchoolDirCode") }); }; })(); rows/terms/_t.ls (function(){ return { termsOfService: { de: "Nutzungsbedingungen", en: "Terms of service", fr: "Conditions d'utilisation", es: "Condiciones de uso", pt: "Termos de uso" } }; })(); rows/terms/row.ls (function(){ return function(page){ var row; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("/../app01/pages/static/terms/page"), labelLeft: T("termsOfService"), params: { isSettingsLink: true } }); }; })(); rows/title/_t.ls (function(){ return { title: { de: "Anrede", en: "Title", fr: "Titre", es: "Título", pt: "Título" }, yourTitle: { de: "Deine Anrede (z.B. Frau, Herr, Dr.)", en: "Your title (e.g. Ms., Mrs., Mr., Dr.)", fr: "Ton titre (ex: Mme, M., Dr)", es: "Tu título (ej. Sr., Srta., Mtro., Dra.)", pt: "Seu título (ex. Sr., Sra., Srta, Dr., Dra.)" }, mrMrsDr: { de: "Frau, Herr, Dr.", en: "Ms., Mrs., Mr., Dr.", fr: "Mme, M., Dr", es: "Sr., Sra., Mtro., Mtra., Dr., Dra.", pt: "ex. Sr., Sra., Srta, Dr., Dra." }, teacherOnly: { de: "nur für Lehrkräfte", en: "for teachers only", fr: "Uniquement pour les professeur·es", es: "Sólo para docentes", pt: "Somente para professores" } }; })(); rows/title/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("title") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var title, ref$, submit, form; title = (ref$ = log.findLast("setTitle")) != null ? ref$.value : void 8; submit = function(){ var v; v = form.input.getValue(); log.changeEvent({ to: { event: "setTitle", value: v } }); return startPage({ history: -1 }); }; page.append(form = inc("/../app01/lib/gui/inputForm/inputForm")({ label: T("yourTitle"), submitLabel: T("change"), submit: submit, value: title, placeholder: T("mrMrsDr"), forceShowButtons: true, cancel: false })); return form.input.start(); } }; }; })(); rows/title/row.ls (function(){ return function(page){ var title, row; if (!inc("/../app01/data/user/isTeacher/get")()) { return; } title = page.userDescription.title || "-"; return row = inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("title"), labelLeftSecondary: T("teacherOnly"), labelRight: title }); }; })(); rows/uniqName/_t.ls (function(){ return { emptyName: { de: "Der Nutzername darf nicht leer sein!", en: "The username cannot be left blank!", fr: "L'identifiant ne peut pas rester vide.", es: "El nombre de usuario no puede quedar vacío.", pt: "O nome de usuário não pode ficar em branco." }, whitespaceInName: { de: "Der Nutzername darf keine Leerzeichen enthalten!", en: "The username cannot contain any spaces!", fr: "L'identifiant ne peut pas comporter d'espace.", es: "El nombre de usuario no puede contener espacios.", pt: "O nome de usuário não pode conter espaços." }, errorNoName: { de: "Kein Name gefunden", en: "No name found", fr: "Aucun nom trouvé", es: "No se encontró ningún nombre", pt: "Nenhum nome encontrado" }, errorNoSuggestion: { de: "Wir konnten keinen gültigen Nutzernamen vorschlagen.", en: "We couldn't suggest a valid username.", fr: "Nous n'avons pu suggérer aucun nom valide.", es: "No pudimos sugerir un nombre de usuario válido.", pt: "Não foi possível sugerir nenhum nome de usuário(a) válido." }, errorUnavailable: { de: "Der Nutzername ist bereits vergeben.", en: "This username is already taken.", fr: "Cet identifiant est déjà pris.", es: "Este nombre de usuario ya existe.", pt: "Este nome de usuário já existe." }, userName: { de: "Nutzername:", en: "Username:", fr: "Identifiant :", es: "Nombre de usuario:", pt: "Nome de usuário:" }, userName2: { de: "Nutzername", en: "Username", fr: "Identifiant", es: "Nombre de usuario", pt: "Nome de usuário" } }; })(); rows/uniqName/page/inputForm/inputForm.ls (function(){ return function(page, uniqName){ var validate, change, submit, form; validate = function(value, key){ value = value.replace(/[^a-zA-Z0-9?\-_+éè!'.@,öüäßÖÜÄ]/g, ''); value = value.toLowerCase(); return value; }; change = function(key){ var value, validated; if (key === "") { return; } value = form.input.getValue(); validated = validate(value, key); if (value !== validated) { return form.input.setValue(validated); } }; submit = function(){ return inc("submit/submit")(form, uniqName); }; return form = inc("/../app01/lib/gui/inputForm/inputForm")({ label: T("userName"), submitLabel: T("change"), submit: submit, change: change, placeholder: T("userName2"), forceShowButtons: true, cancel: false, screenKeyboardLayout: twitch({ en: "loginEN", fr: "loginFR", es: "loginES", pt: "loginPT", def: "login" }) }); }; })(); rows/uniqName/page/inputForm/submit/submit.ls (function(){ return function(form, oldName){ var uniqName, onError, onOffline, onCompleted; uniqName = form.input.getValue(); if (uniqName === oldName) { form.input.start(); return; } if (uniqName === "") { form.error.html(T("emptyName")); form.input.start(); return; } if (_.includes(uniqName, " ")) { form.error.html(T("whitespaceInName")); form.input.start(); return; } form.showSpinner(); onError = function(error){ var message; form.hideSpinner(); message = error.status === "error_no_name_found" ? T("errorNoName") : error.status === "error_no_suggestion" ? T("errorNoSuggestion") : error.status === "error_unavailable" ? T("errorUnavailable") : T("errorMessage"); return form.error.html(message); }; onOffline = function(){ form.input.start(); form.hideSpinner(); return inc("/../app01/lib/offline/offlinePopup/popup")(); }; onCompleted = function(result){ if (result.status !== "ok") { return onError(result); } else { return log.sync(function(error){ if (error) { return onOffline(); } else { return startPage({ history: -1 }); } }); } }; return inc("/../app01/lib/util/pllsCall/call")({ path: path("/../server-apis-db2/apis/user/setUniqName/set"), params: { logId: log.id(), uniqName: uniqName }, requiredVisibleDiv: form, onCompleted: onCompleted, onError: onError, onOffline: onOffline }); }; })(); rows/uniqName/page/page.ls (function(){ return function(page){ return { top: function(){ return inc("../../../0_shared/addonTopbar/addonTopbar")({ mainTitle: T("userName2") }); }, urlDescription: function(){ return inc("/0_shared/_urlDescription/description")(); }, start: function(){ var uniqName, ref$, form; uniqName = (ref$ = log.findLast("setUniqName")) != null ? ref$.value : void 8; page.append(form = inc("inputForm/inputForm")(page, uniqName)); form.input.setValue(uniqName); return form.input.start(); } }; }; })(); rows/uniqName/row.ls (function(){ return function(page){ var uniqName; uniqName = page.userDescription.uniqName || "-"; return inc("../../0_shared/genericRow/row")({ type: "page", page: path("page/page"), labelLeft: T("userName2"), labelRight: uniqName }); }; })(); rows/version/_t.ls (function(){ return { appversion: { de: "App-Version", en: "App version", fr: "Version de l'app", es: "Versión de la app", pt: "Versão do aplicativo" }, versionCopied: { de: "App-Version in die Zwischenablage kopiert.", en: "App version copied to the clipboard.", fr: "La version est copiée dans le presse-papiers.", es: "La versión se copió al portapapeles.", pt: "Versão do aplicativo copiada para a área de transferência." } }; })(); rows/version/onFrame/onFrame.ls (function(){ return function(span){ var logId, src, lastValue, f; logId = typeof log != 'undefined' && log !== null ? log.id().substr(0, 4) : void 8; src = Store('sourceId'); lastValue = null; f = function(){ if (span.parent().isVisible() && window.log != null) { if (typeof log != 'undefined' && log !== null) { log.getDetails(function(d){ var s; s = engine.clientVersion + " " + logId + " " + src + " " + "u" + d.totalUnsentEvents + " " + "tl" + d.totalLocalEvents; if (s !== lastValue) { lastValue = s; return span.html(s); } }); } return requestAnimationFrame(f); } }; return requestAnimationFrame(f); }; })(); rows/version/row.ls (function(){ return function(){ var row, d; row = inc("../../0_shared/genericRow/row")({ labelLeft: T("appversion"), labelRight: d = Div() }); row.right.css({ userSelect: "text" }).tap(function(){ inc("/../app01/lib/util/copyToClipboard/copy")(d.text()); return inc("/../app01/lib/gui/toast/toast")({ label: T("versionCopied") }); }); inc("onFrame/onFrame")(d); return row; }; })();