MDL-43089 quiz editing: fix some qbank popup JS issues.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 9 Oct 2014 16:22:22 +0000 (17:22 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 9 Oct 2014 16:22:22 +0000 (17:22 +0100)
mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-debug.js
mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-min.js
mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank.js
mod/quiz/yui/src/quizquestionbank/js/quizquestionbank.js

index db71663..d71d5f2 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-debug.js differ
index 83c5ba2..4de9b38 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-min.js and b/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank-min.js differ
index 951a2d1..b6e30df 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank.js and b/mod/quiz/yui/build/moodle-mod_quiz-quizquestionbank/moodle-mod_quiz-quizquestionbank.js differ
index 8c6841e..d921045 100644 (file)
@@ -58,7 +58,8 @@ Y.extend(POPUP, Y.Base, {
             extraClasses: ['mod_quiz_qbank_dialogue']
         };
         this.dialogue = new M.core.dialogue(config);
-        this.dialogue.bodyNode.delegate('click', this.link_clicked, 'a[href]', this);
+        this.dialogue.bodyNode.delegate('click', this.link_clicked,
+                '.paging a[href], thead tr a[href]', this);
         this.dialogue.hide();
 
         this.loadingDiv = this.dialogue.bodyNode.getHTML();
@@ -131,6 +132,20 @@ Y.extend(POPUP, Y.Base, {
             Y.later(0, this.dialogue, this.dialogue.centerDialogue);
         }
         M.question.qbankmanager.init();
+
+        if (Y.one('#advancedsearch')) {
+            M.util.init_collapsible_region(Y, "advancedsearch", "question_bank_advanced_search",
+                    M.util.get_string('clicktohideshow'));
+        }
+
+        this.dialogue.fire('widget:contentUpdate');
+        // TODO MDL-47602 really, the base class should listen for the even fired
+        // on the previous line, and fix things like makeResponsive.
+        // However, it does not. So the next two lines are a hack to fix up
+        // display issues (e.g. overall scrollbars on the page). Once the base class
+        // is fixed, this comment and the following two lines should be deleted.
+        this.dialogue.hide();
+        this.dialogue.show();
     },
 
     load_failed: function() {