Commit f8966a18 by Braden MacDonald

Address review comments

parent 2c75c72b
...@@ -108,11 +108,9 @@ ...@@ -108,11 +108,9 @@
} }
.xblock--drag-and-drop .drag-container .option .numerical-input .submit-input { .xblock--drag-and-drop .drag-container .option .numerical-input .submit-input {
box-sizing: border-box;
position: absolute; position: absolute;
left: 150px; left: 150px;
top: 4px; top: 4px;
height: 24px;
} }
.xblock--drag-and-drop .drag-container .option .numerical-input.correct .input-submit, .xblock--drag-and-drop .drag-container .option .numerical-input.correct .input-submit,
......
function DragAndDropBlock(runtime, element, configuration) { function DragAndDropBlock(runtime, element, configuration) {
"use strict"; "use strict";
// Set up a mock for gettext if it isn't available in the client runtime:
if (!window.gettext) { window.gettext = function gettext_stub(string) { return string; }; }
var $element = $(element); var $element = $(element);
// root: root node managed by the virtual DOM // root: root node managed by the virtual DOM
var $root = $element.find('.xblock--drag-and-drop'); var $root = $element.find('.xblock--drag-and-drop');
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
"use strict"; "use strict";
// Set up a mock for gettext if it isn't available in the client runtime: // Set up a mock for gettext if it isn't available in the client runtime:
if (!window.gettext) { if (!window.gettext) { window.gettext = function gettext_stub(string) { return string; }; }
window.gettext = function gettext_stub(string) { return string; };
}
var FocusHook = function() { var FocusHook = function() {
if (!(this instanceof FocusHook)) { if (!(this instanceof FocusHook)) {
......
import json import json
import unittest import unittest
from mock import Mock
from nose.tools import assert_true, assert_false, assert_in
from .utils import ( from .utils import (
make_block, make_block,
load_resource, load_resource,
......
...@@ -16,7 +16,7 @@ class BasicTests(TestCaseMixin, unittest.TestCase): ...@@ -16,7 +16,7 @@ class BasicTests(TestCaseMixin, unittest.TestCase):
self.block = make_block() self.block = make_block()
self.patch_workbench() self.patch_workbench()
def test_templates_contents(self): def test_template_contents(self):
context = {} context = {}
student_fragment = self.block.runtime.render(self.block, 'student_view', context) student_fragment = self.block.runtime.render(self.block, 'student_view', context)
self.assertIn('<section class="xblock--drag-and-drop">', student_fragment.content) self.assertIn('<section class="xblock--drag-and-drop">', student_fragment.content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment