"Name or Email": "Name or Email",
Next_p: "Next",
Next_g: "Next",
+ Next_n: "Next",
"New connexion detected: tab now offline": "New connexion detected: tab now offline",
"New correspondance game:": "New correspondance game:",
"New game": "New game",
Practice: "Practice",
"Prefix?": "Prefix?",
"Preset challenges": "Preset challenges",
- Previous: "Previous",
+ Previous_n: "Previous",
+ Previous_p: "Previous",
"Processing... Please wait": "Processing... Please wait",
Problems: "Problems",
"Random?": "Random?",
"Name or Email": "Nombre o Email",
Next_p: "Siguiente",
Next_g: "Siguiente",
+ Next_n: "Siguiente",
"New connexion detected: tab now offline": "Nueva conexión detectada: pestaña ahora desconectada",
"New correspondance game:": "Nueva partida por correspondencia:",
"New game": "Nueva partida",
Practice: "Práctica",
"Prefix?": "¿Prefijo?",
"Preset challenges": "Desafíos registrados",
- Previous: "Anterior",
+ Previous_p: "Anterior",
+ Previous_n: "Anterior",
"Processing... Please wait": "Procesando... por favor espere",
Problems: "Problemas",
"Random?": "Aleatorio?",
"Name or Email": "Nom ou Email",
Next_p: "Suivant",
Next_g: "Suivante",
+ Next_n: "Suivante",
"New connexion detected: tab now offline": "Nouvelle connexion détectée : onglet désormais hors ligne",
"New correspondance game:": "Nouvelle partie par corespondance :",
"New game": "Nouvelle partie",
Practice: "Pratiquer",
"Prefix?": "Préfixe ?",
"Preset challenges": "Défis enregistrés",
- Previous: "Précédent",
+ Previous_p: "Précédent",
+ Previous_n: "Précédente",
"Processing... Please wait": "Traitement en cours... Attendez SVP",
Problems: "Problèmes",
"Random?": "Aléatoire?",
| {{ st.tr["Write news"] }}
.news(
v-for="n,idx in newsList"
+ :id="'n' + n.id"
:class="{margintop:idx>0}"
)
span.ndt {{ formatDatetime(n.added) }}
.dev-buttons(v-if="devs.includes(st.user.id)")
button(@click="editNews(n)") {{ st.tr["Edit"] }}
button(@click="deleteNews(n)") {{ st.tr["Delete"] }}
+ button(@click="gotoPrevNext(n, 1)") {{ st.tr["Previous_n"] }}
+ button(@click="gotoPrevNext(n, -1)") {{ st.tr["Next_n"] }}
.news-content(v-html="parseHtml(n.content)")
button#loadMoreBtn(
v-if="hasMore"
this.curnews.content = "";
// No need for added and uid fields: never updated
},
+ gotoPrevNext: function(n, dir) {
+ document.getElementById("n" + n.id)[
+ (dir < 0 ? "previous" : "next") + "ElementSibling"].scrollIntoView();
+ },
showModalNews: function() {
this.resetCurnews();
window.doClick("modalNews");
success: (res) => {
if (edit) {
let n = this.newsList.find(n => n.id == this.curnews.id);
- if (n) n.content = this.curnews.content;
+ if (!!n) n.content = this.curnews.content;
} else {
const newNews = {
content: this.curnews.content,
span.uname ({{ curproblem.uname }})
button.marginleft(@click="backToList()") {{ st.tr["Back to list"] }}
button.nomargin(@click="gotoPrevNext($event,curproblem,1)")
- | {{ st.tr["Previous"] }}
+ | {{ st.tr["Previous_p"] }}
button.nomargin(@click="gotoPrevNext($event,curproblem,-1)")
| {{ st.tr["Next_p"] }}
p.oneInstructions.clickable(