summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/liststudy.js4
-rw-r--r--js/reviewdesu.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/js/liststudy.js b/js/liststudy.js
index 5ff6aef..ab6eede 100644
--- a/js/liststudy.js
+++ b/js/liststudy.js
@@ -88,7 +88,7 @@ function show_contents_table() {
if (notes[items[i].info[0]]) {
var note = notes[items[i].info[0]];
html += '<tr><td class="invisible_td"></td><td class="study_note_td" colspan="'
- + (items[i].info.length) + '">' + note + '</td></tr>';
+ + (items[i].info.length) + '">' + note.replace(/\|\|/g, '<br/>') + '</td></tr>';
}
}
html += '</table>';
@@ -135,7 +135,7 @@ function show_reviews_table() {
function edit_note(id) {
var idd = items[id].info[0];
- var note = prompt("Add note for item: ", notes[idd] || '');
+ var note = prompt("Add note for item:\n(you might want to add a long note, so I'm adding this text to make the prompt box bigger)", notes[idd] || '');
if (note != null) notes[idd] = note;
if (notes[idd] == '') delete notes[idd];
show_contents_table();
diff --git a/js/reviewdesu.js b/js/reviewdesu.js
index 6750b4b..d93bda4 100644
--- a/js/reviewdesu.js
+++ b/js/reviewdesu.js
@@ -96,7 +96,8 @@ function show_answer() {
html = '<h3>Question ' + question_nb + ' of ' + total + '</h3>';
html += '<div class="review_item">';
html += '<div class="box2">' + question.answer + '</div>';
- html += '<div class="boxn" onclick="edit_note();" id="notebox">' + (notes[question.key] || '<em>click to add note...</em>') + '</div>';
+ html += '<div class="boxn" onclick="edit_note();" id="notebox">' +
+ (notes[question.key] || '<em>click to add note...</em>').replace(/\|\|/g, '<br />') + '</div>';
html += '<p><button taborder="1" onclick="answer_question(-1);">fail</button>';
html += '<button taborder="2" id="dunnobtn" onclick="answer_question(0);">dunno</button>';
html += '<button taborder="3" id="winbtn" onclick="answer_question(1);">win</button></p>';
@@ -113,10 +114,10 @@ function answer_question(a) {
function edit_note() {
var idd = question.key;
- var note = prompt("Add note for item:", notes[idd] || '');
+ var note = prompt("Add note for item:\n(you might want to add a long note, so I'm adding this text to make the prompt box bigger)", notes[idd] || '');
if (note != null) notes[idd] = note;
if (notes[idd] == '') delete notes[idd];
- $("notebox").innerHTML = (notes[idd] || '<em>click to add note...</em>');
+ $("notebox").innerHTML = (notes[idd] || '<em>click to add note...</em>').replace(/\|\|/g, '<br />');
new Ajax.Request('index.php?p=brresults-study-' + batchid, {
method: 'post',