MDL-45314 core_grade: a JS fix for the grader report
authorAndrew Davis <andrew@moodle.com>
Fri, 2 May 2014 02:47:27 +0000 (10:47 +0800)
committerMarina Glancy <marina@moodle.com>
Fri, 2 May 2014 03:13:45 +0000 (11:13 +0800)
grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-debug.js
grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-min.js
grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview.js
grade/report/grader/yui/src/scrollview/js/scrollview.js

index 86000f9..3fbb8b1 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-debug.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-debug.js differ
index 4c13fae..33c8b8d 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-min.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview-min.js differ
index a61827d..0ffaa7c 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-scrollview/moodle-gradereport_grader-scrollview.js differ
index 1c67dff..1cf46ac 100644 (file)
@@ -58,10 +58,9 @@ M.gradereport_grader.scrollview = {
             node = Y.one('.topscroll');
         }
 
-        var _this = this;
         Y.on('domready', function () {
-            M.gradereport_grader.scrollview.resize();
-        });
+            this.resize();
+        }, this);
 
         Y.one(src).on('scroll', function() {
             node.set('scrollLeft', Y.one(src).get('scrollLeft'));
@@ -74,7 +73,7 @@ M.gradereport_grader.scrollview = {
     },
 
     resize: function() {
-        var width = Y.one(M.gradereport_grader.scrollview.SELECTORS.GRADETABLE).get('offsetWidth');
+        var width = Y.one(this.SELECTORS.GRADETABLE).get('offsetWidth');
         Y.one('.topscrollcontent').setStyle('width', width + 'px');
     }
 };