diff -Nru bibledit-5.0.901/assets/editor.js bibledit-5.0.903/assets/editor.js --- bibledit-5.0.901/assets/editor.js 1970-01-01 00:00:00.000000000 +0000 +++ bibledit-5.0.903/assets/editor.js 2020-07-19 12:54:21.000000000 +0000 @@ -0,0 +1,49 @@ +/* +Copyright (©) 2003-2020 Teus Benschop. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + + +function assetsEditorAddNote (quill, style, caller, noteId, chapter, verse) // Todo +{ + //

1 + .

+ //

1 + 1.1 keyword Footnote text.

+ // Footnote uses \fr \fk \ft. + // Cross reference uses \xo \xk \xt. + var length = quill.getLength (); + quill.insertText (length, "\n", "paragraph", style, "user"); + quill.insertText (length, caller, "character", "notebody" + noteId, "user"); + length++; + quill.insertText (length, " + ", "character", "", "user"); + length += 3; + var referenceText = chapter + "." + verse; + var referenceStyle = "fr"; + if (style == "x") referenceStyle = "xo"; + quill.insertText (length, referenceText, "character", referenceStyle, "user"); + length += referenceText.length; + var keywordStyle = "fk"; + if (style == "x") keywordStyle = "xk"; + quill.insertText (length, " ", "character", keywordStyle, "user"); + length++; + quill.insertText (length, "keyword", "character", keywordStyle, "user"); + length += 7; + var textStyle = "ft"; + if (style == "x") textStyle = "xt"; + quill.insertText (length, " ", "character", textStyle, "user"); + length++; + quill.insertText (length, "Text.", "character", textStyle, "user"); +} + diff -Nru bibledit-5.0.901/bb/logic.cpp bibledit-5.0.903/bb/logic.cpp --- bibledit-5.0.901/bb/logic.cpp 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/bb/logic.cpp 2020-07-19 12:54:21.000000000 +0000 @@ -426,11 +426,15 @@ for (auto & conflict : conflicts) { + // Add the passage to the subject. + string newsubject = conflict.subject; + if (conflict.book) newsubject.append (" | " + filter_passage_display (conflict.book, conflict.chapter, "")); + // Create the body of the email. xml_document document; xml_node node; node = document.append_child ("h3"); - node.text ().set (conflict.subject.c_str()); + node.text ().set (newsubject.c_str()); // Storage of the changes the user sent, and the result that was saved, in raw USFM, per verse. vector change_usfm; @@ -452,7 +456,7 @@ // Add some information for the user. node = document.append_child ("p"); - node.text ().set ("You sent changes to the Cloud. The Cloud crossed the parts below out, and replaced it with the bold text below."); + node.text ().set ("You sent changes to the Cloud. The changes were merged with other changes already in the Cloud. The crossed out parts below could not be merged. They were replaced with the bold text below. You may want to check the changes or resend them."); // Go over each verse where the change differs from the resulting text that was saved. // For each verse, outline the difference between the change and the result. @@ -469,13 +473,12 @@ // Add some information for the user. document.append_child ("hr"); document.append_child ("br"); - document.append_child ("br"); xml_node div_node; div_node = document.append_child ("div"); - div_node.append_attribute ("style") = "font-size: xx-small"; + div_node.append_attribute ("style") = "font-size: 30%"; node = div_node.append_child ("p"); - node.text ().set ("Here are some details."); + node.text ().set ("Full details follow below."); // Add the base text. div_node.append_child ("br"); @@ -512,7 +515,7 @@ // Schedule the mail for sending to the user(s). for (auto user : users) { - email_schedule (user, conflict.subject, html); + email_schedule (user, newsubject, html); } } } diff -Nru bibledit-5.0.901/classes/merge.h bibledit-5.0.903/classes/merge.h --- bibledit-5.0.901/classes/merge.h 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/classes/merge.h 2020-07-19 12:54:21.000000000 +0000 @@ -32,6 +32,10 @@ string prioritized_change; string result; string subject; + // The following show the passage where the conflict occurred. + // But this is not yet implemented throughout, only where it matters. + int book = 0; + int chapter = 0; }; diff -Nru bibledit-5.0.901/configure bibledit-5.0.903/configure --- bibledit-5.0.901/configure 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/configure 2020-07-19 12:54:21.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for bibledit 5.0.901. +# Generated by GNU Autoconf 2.69 for bibledit 5.0.903. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='bibledit' PACKAGE_TARNAME='bibledit' -PACKAGE_VERSION='5.0.901' -PACKAGE_STRING='bibledit 5.0.901' +PACKAGE_VERSION='5.0.903' +PACKAGE_STRING='bibledit 5.0.903' PACKAGE_BUGREPORT='http://bibledit.org' PACKAGE_URL='' @@ -1308,7 +1308,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bibledit 5.0.901 to adapt to many kinds of systems. +\`configure' configures bibledit 5.0.903 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1377,7 +1377,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bibledit 5.0.901:";; + short | recursive ) echo "Configuration of bibledit 5.0.903:";; esac cat <<\_ACEOF @@ -1486,7 +1486,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bibledit configure 5.0.901 +bibledit configure 5.0.903 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1826,7 +1826,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bibledit $as_me 5.0.901, which was +It was created by bibledit $as_me 5.0.903, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2689,7 +2689,7 @@ # Define the identity of the package. PACKAGE='bibledit' - VERSION='5.0.901' + VERSION='5.0.903' cat >>confdefs.h <<_ACEOF @@ -2804,7 +2804,7 @@ # Define the identity of the package. PACKAGE='bibledit' - VERSION='5.0.901' + VERSION='5.0.903' cat >>confdefs.h <<_ACEOF @@ -7107,7 +7107,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bibledit $as_me 5.0.901, which was +This file was extended by bibledit $as_me 5.0.903, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7173,7 +7173,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bibledit config.status 5.0.901 +bibledit config.status 5.0.903 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru bibledit-5.0.901/configure.ac bibledit-5.0.903/configure.ac --- bibledit-5.0.901/configure.ac 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/configure.ac 2020-07-19 12:54:21.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([bibledit],[5.0.901],[http://bibledit.org]) +AC_INIT([bibledit],[5.0.903],[http://bibledit.org]) AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE([tar-ustar subdir-objects]) AC_CANONICAL_BUILD diff -Nru bibledit-5.0.901/debian/changelog bibledit-5.0.903/debian/changelog --- bibledit-5.0.901/debian/changelog 2020-07-11 16:16:11.000000000 +0000 +++ bibledit-5.0.903/debian/changelog 2020-07-19 12:59:41.000000000 +0000 @@ -1,3 +1,9 @@ +bibledit (5.0.903-1) unstable; urgency=medium + + * New upstream version 5.0.903 + + -- Teus Benschop Sun, 19 Jul 2020 14:59:41 +0200 + bibledit (5.0.901-1) unstable; urgency=medium * New upstream version 5.0.901 diff -Nru bibledit-5.0.901/developer/index.html bibledit-5.0.903/developer/index.html --- bibledit-5.0.901/developer/index.html 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/developer/index.html 2020-07-19 12:54:21.000000000 +0000 @@ -11,6 +11,10 @@

Connect to https://ipv6.google.com

Database maintenance

Neural Machine Translation

+

+ Show alert and block keyboard for a short time + +

##success##

##error##


diff -Nru bibledit-5.0.901/developer/index.js bibledit-5.0.903/developer/index.js
--- bibledit-5.0.901/developer/index.js	2020-07-11 16:11:47.000000000 +0000
+++ bibledit-5.0.903/developer/index.js	2020-07-19 12:54:21.000000000 +0000
@@ -28,3 +28,17 @@
   });
 }
 
+
+function showAlertWithTimeout ()
+{
+  notifyItSuccess ("The keyboard is blocked for a short while")
+  $("#textinput").prop ("readonly", true);
+  setTimeout (enableTextInput, 1000);
+}
+
+
+function enableTextInput ()
+{
+  $("#textinput").prop ("readonly", false);
+}
+
diff -Nru bibledit-5.0.901/edit/index.html bibledit-5.0.903/edit/index.html
--- bibledit-5.0.901/edit/index.html	2020-07-11 16:11:47.000000000 +0000
+++ bibledit-5.0.903/edit/index.html	2020-07-19 12:54:21.000000000 +0000
@@ -36,5 +36,6 @@
 
 
 
+
 
 ##navigationCode##
diff -Nru bibledit-5.0.901/edit/index.js bibledit-5.0.903/edit/index.js
--- bibledit-5.0.901/edit/index.js	2020-07-11 16:11:47.000000000 +0000
+++ bibledit-5.0.903/edit/index.js	2020-07-19 12:54:21.000000000 +0000
@@ -218,7 +218,7 @@
         editorLoadDate = new Date();
         var seconds = (editorLoadDate.getTime() - editorSaveDate.getTime()) / 1000;
         if ((seconds < 2) || reload) {
-          if (editorWriteAccess) alert (editorChapterVerseUpdatedLoaded);
+          if (editorWriteAccess) editorReloadAlert (editorChapterVerseUpdatedLoaded); // Todo
         }
       } else {
         // Checksum error: Reload.
@@ -275,7 +275,7 @@
       editorSaveDate = new Date();
       var seconds = (editorSaveDate.getTime() - editorLoadDate.getTime()) / 1000;
       if (seconds < 2) {
-        if (editorWriteAccess) alert (editorChapterVerseUpdatedLoaded);
+        if (editorWriteAccess) editorReloadAlert (editorChapterVerseUpdatedLoaded); // Todo
       }
     },
   });
@@ -888,7 +888,7 @@
 var editorInsertedNotesCount = 0;
 
 
-function applyNotesStyle (style)
+function applyNotesStyle (style) // Todo
 {
   if (!editorWriteAccess) return;
 
@@ -912,14 +912,9 @@
   quill.setSelection (caret, 0);
   quill.insertText (caret, caller, "character", "notecall" + noteId, "user");
 
-  // Append note text to notes section:
-  // 

1 + .

- var length = quill.getLength (); - quill.insertText (length, "\n", "paragraph", style, "user"); - quill.insertText (length, caller, "character", "notebody" + noteId, "user"); - length++; - quill.insertText (length, " + .", "character", "", "user"); - + // Append note text to notes section. Todo + assetsEditorAddNote (quill, style, caller, noteId, editorNavigationChapter, editorNavigationVerse); + editorInsertedNotesCount++; editorActiveStylesFeedback (); @@ -1055,3 +1050,27 @@ } +/* + +Section for reload notifications. + +*/ + + +function editorReloadAlert (message) // Todo +{ + // Take action only if the editor has focus and the user can type in it. + if (quill.hasFocus ()) { + notifyItSuccess (message) + quill.enable (false); + setTimeout (editorReloadAlertTimeout, 3000); + } +} + + +function editorReloadAlertTimeout () +{ + quill.enable (editorWriteAccess); + quill.focus (); +} + diff -Nru bibledit-5.0.901/editone/index.html bibledit-5.0.903/editone/index.html --- bibledit-5.0.901/editone/index.html 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/editone/index.html 2020-07-19 12:54:21.000000000 +0000 @@ -34,5 +34,6 @@ + ##navigationCode## diff -Nru bibledit-5.0.901/editone/index.js bibledit-5.0.903/editone/index.js --- bibledit-5.0.901/editone/index.js 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/editone/index.js 2020-07-19 12:54:21.000000000 +0000 @@ -237,7 +237,7 @@ if (oneverseVerseLoading in oneverseEditorSaveDate) { var seconds = (oneverseEditorLoadDate[oneverseVerseLoading].getTime() - oneverseEditorSaveDate[oneverseVerseLoading].getTime()) / 1000; if ((seconds < 2) | oneverseReloadFlag) { - if (oneverseEditorWriteAccess) alert (oneverseEditorVerseUpdatedLoaded); + if (oneverseEditorWriteAccess) oneverseReloadAlert (oneverseEditorVerseUpdatedLoaded); // Todo } } oneverseReloadFlag = false; @@ -737,7 +737,7 @@ var oneverseInsertedNotesCount = 0; -function oneverseApplyNotesStyle (style) +function oneverseApplyNotesStyle (style) // Todo { if (!oneverseEditorWriteAccess) return; @@ -762,13 +762,8 @@ quill.setSelection (caret, 0); quill.insertText (caret, caller, "character", "notecall" + noteId, "user"); - // Append note text to notes section: - //

1 + .

- var length = quill.getLength (); - quill.insertText (length, "\n", "paragraph", style, "user"); - quill.insertText (length, caller, "character", "notebody" + noteId, "user"); - length++; - quill.insertText (length, " + .", "character", "", "user"); + // Append note text to notes section. Todo + assetsEditorAddNote (quill, style, caller, noteId, oneverseNavigationChapter, oneverseNavigationVerse); oneverseInsertedNotesCount++; @@ -888,3 +883,28 @@ parent.window.navigatePreviousVerse (event); } } + + +/* + +Section for reload notifications. + +*/ + + +function oneverseReloadAlert (message) // Todo +{ + // Take action only if the editor has focus and the user can type in it. + if (quill.hasFocus ()) { + notifyItSuccess (message) + quill.enable (false); + setTimeout (oneverseReloadAlertTimeout, 3000); + } +} + + +function oneverseReloadAlertTimeout () +{ + quill.enable (oneverseEditorWriteAccess); + quill.focus (); +} diff -Nru bibledit-5.0.901/editusfm/index.js bibledit-5.0.903/editusfm/index.js --- bibledit-5.0.901/editusfm/index.js 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/editusfm/index.js 2020-07-19 12:54:21.000000000 +0000 @@ -108,7 +108,7 @@ usfmBook = usfmNavigationBook; usfmChapter = usfmNavigationChapter; usfmIdChapter = 0; - if (usfmEditorWriteAccess) $ ("#usfmeditor").focus; + if (usfmEditorWriteAccess) $ ("#usfmeditor").focus (); usfmCaretPosition = usfmGetCaretPosition (); $.ajax ({ url: "load", @@ -146,7 +146,7 @@ usfmLoadDate = new Date(); var seconds = (usfmLoadDate.getTime() - usfmSaveDate.getTime()) / 1000; if ((seconds < 2) | usfmReload) { - if (usfmEditorWriteAccess) alert (usfmEditorVerseUpdatedLoaded); + if (usfmEditorWriteAccess) usfmEditorReloadAlert (usfmEditorVerseUpdatedLoaded); // Todo } usfmReload = false; } else { @@ -208,7 +208,7 @@ usfmSaveDate = new Date(); var seconds = (usfmSaveDate.getTime() - usfmLoadDate.getTime()) / 1000; if (seconds < 2) { - if (usfmEditorWriteAccess) alert (usfmEditorVerseUpdatedLoaded); + if (usfmEditorWriteAccess) usfmEditorReloadAlert (usfmEditorVerseUpdatedLoaded); // Todo } } }); @@ -525,6 +525,34 @@ }); } + +/* + +Section for reload notifications. + +*/ + + +function usfmEditorReloadAlert (message) // Todo +{ + // Take action only if the editor has focus and the user can type in it. + var editor = $ ("#usfmeditor"); + if (editor.is (":focus")) { + notifyItSuccess (message) + editor.attr('contenteditable', false); + setTimeout (usfmEditorReloadAlertTimeout, 3000); + } +} + + +function usfmEditorReloadAlertTimeout () +{ + var editor = $ ("#usfmeditor"); + editor.attr('contenteditable', usfmEditorWriteAccess); + editor.focus (); +} + + // Note that some focus operations were removed for a situation where the workspace has two editors, and the user edits in the visual editor, and then the USFM editor grabs focus, and then the user keeps typing, so he or she was expecting to type in the visual editor but is now typing in the USFM editor. // Due to removing the focus operations, the caret positioner no longer works when the USFM editor is not focused. // A new USFM chapter editor could be having multiple editors: One for each line, or rather one for each verse. These editors could be loaded from the server separately, each time it loads a verse line. This system makes placing the caret and scrolling the caret into view easier. Because the javascript just places the caret in a known
and scrolls that
into view. diff -Nru bibledit-5.0.901/help/changelog.html bibledit-5.0.903/help/changelog.html --- bibledit-5.0.901/help/changelog.html 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/help/changelog.html 2020-07-19 12:54:21.000000000 +0000 @@ -1,5 +1,10 @@

ChangeLog

+

5.0.903: If a Bible editor has focus, and its text is reloaded, it will be read-only for some seconds.

+

5.0.903: If a Bible editor has focus, it shows a notification when the text is reloaded.

+

5.0.903: Entering a cross reference adds the reference, the keyword, and the cross reference text.

+

5.0.903: Entering a footnote adds the reference, the keyword, and the footnote text.

+

5.0.902: The merge anomaly email contains the passage.

5.0.901: Better layout of the merge anomaly email.

5.0.899: Fixed: Displays an alert about "text reloaded" while saving text in the verse editor.

5.0.898: Type Ctrl-G to enter the passage to focus through the keyboard.

diff -Nru bibledit-5.0.901/locale/logic.cpp bibledit-5.0.903/locale/logic.cpp --- bibledit-5.0.901/locale/logic.cpp 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/locale/logic.cpp 2020-07-19 12:54:21.000000000 +0000 @@ -210,10 +210,6 @@ { string message; message.append (translate("Updated Bible text was loaded.")); - message.append (" "); - message.append (translate("Press Enter to continue.")); - message.append (" "); - message.append (translate("Please check the updated text.")); return message; } diff -Nru bibledit-5.0.901/paratext/logic.h bibledit-5.0.903/paratext/logic.h --- bibledit-5.0.901/paratext/logic.h 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/paratext/logic.h 2020-07-19 12:54:21.000000000 +0000 @@ -23,6 +23,7 @@ #include #include +#include class Paratext_Logic diff -Nru bibledit-5.0.901/pkgdata/files.txt bibledit-5.0.903/pkgdata/files.txt --- bibledit-5.0.901/pkgdata/files.txt 2020-07-11 16:11:47.000000000 +0000 +++ bibledit-5.0.903/pkgdata/files.txt 2020-07-19 12:54:21.000000000 +0000 @@ -1,6 +1,7 @@ /access /assets /assets/checkbox.js +/assets/editor.js /assets/error.html /assets/external.js /assets/footer.html