MDL-52290 assignfeedback_editpdf: show number of pages in page select
authorDavo Smith <git@davosmith.co.uk>
Mon, 4 Jan 2016 11:51:08 +0000 (11:51 +0000)
committerDavo Smith <git@davosmith.co.uk>
Tue, 5 Jan 2016 10:01:45 +0000 (10:01 +0000)
mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js
mod/assign/feedback/editpdf/yui/src/editor/js/editor.js

index 10e533c..c1dfa7a 100644 (file)
@@ -54,7 +54,9 @@ Feature: In an assignment, teacher can annotate PDF files during grading
     And I click on "Grade" "link" in the "Submitted for grading" "table_row"
     And I follow "Launch PDF editor..."
     And I change window size to "large"
+    And I should see "Page 1 of 3"
     And I click on ".navigate-next-button" "css_element"
+    And I should see "Page 2 of 3"
     And I click on ".stampbutton" "css_element"
     And I click on ".linebutton" "css_element"
     And I click on ".commentcolourbutton" "css_element"
index 286c0f3..311826c 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js differ
index 28d56f5..eccd7d0 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js differ
index 286c0f3..311826c 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js differ
index 4f38c87..82f9ef5 100644 (file)
@@ -1035,6 +1035,7 @@ EDITOR.prototype = {
     setup_navigation : function() {
         var pageselect,
             i,
+            strinfo,
             option,
             previousbutton,
             nextbutton;
@@ -1046,7 +1047,8 @@ EDITOR.prototype = {
             for (i = 0; i < this.pages.length; i++) {
                 option = Y.Node.create('<option/>');
                 option.setAttribute('value', i);
-                option.setHTML(M.util.get_string('pagenumber', 'assignfeedback_editpdf', i+1));
+                strinfo = {page: i+1, total: this.pages.length};
+                option.setHTML(M.util.get_string('pagexofy', 'assignfeedback_editpdf', strinfo));
                 pageselect.append(option);
             }
         }