Commit 335a36f1 by polesye

Address comments.

parent 887eea30
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- ${width} = 300 --> <!-- ${width} = 300 -->
<!-- ${height} = 400 --> <!-- ${height} = 400 -->
<span> <div class="imageinput capa_inputtype" id="inputtype_12345">
<input <input
type="hidden" type="hidden"
class="imageinput" class="imageinput"
...@@ -12,13 +12,17 @@ ...@@ -12,13 +12,17 @@
value="" value=""
/> />
<div <div style="position:relative;">
id="imageinput_12345" <div
style="width: 300px; height: 400px; position: relative; left: 0; top: 0; visibility: hidden;" id="imageinput_12345"
> style="width: 300px; height: 400px; position: relative; left: 0; top: 0; visibility: hidden;"
<!-- image will go here --> >
<!-- image will go here -->
</div>
<div id="answer_12345" data-width="100" data-height="100"></div>
</div> </div>
<!-- status == 'unsubmitted' --> <!-- status == 'unsubmitted' -->
<span <span
class="unanswered" class="unanswered"
...@@ -28,4 +32,4 @@ ...@@ -28,4 +32,4 @@
> >
<span class="sr">Status: unanswered</span> <span class="sr">Status: unanswered</span>
</span> </span>
</span> </div>
...@@ -304,17 +304,7 @@ describe 'Problem', -> ...@@ -304,17 +304,7 @@ describe 'Problem', ->
expect($('input#1_2_1').attr('disabled')).not.toEqual('disabled') expect($('input#1_2_1').attr('disabled')).not.toEqual('disabled')
describe 'imageinput', -> describe 'imageinput', ->
imageinput_html=''' imageinput_html = readFixtures('imageinput.html')
<section class="problem">
<div class="imageinput capa_inputtype" id="inputtype_1_2_1">
<input class="imageinput" type="hidden" name="input_1_2_1" id="input_1_2_1">
<div style="position:relative;">
<div id="imageinput_1_2_1">test</div>
<div id="answer_1_2_1" data-width="100" data-height="100"></div>
</div>
</div>
</section>
'''
states = [ states = [
{ {
desc: 'rectangle is drawn correctly', desc: 'rectangle is drawn correctly',
...@@ -342,7 +332,7 @@ describe 'Problem', -> ...@@ -342,7 +332,7 @@ describe 'Problem', ->
stubRequest = (data) => stubRequest = (data) =>
spyOn($, 'postWithPrefix').andCallFake (url, callback) -> spyOn($, 'postWithPrefix').andCallFake (url, callback) ->
callback answers: "1_2_1": data callback answers: "12345": data
getImage = (coords, c_width, c_height) => getImage = (coords, c_width, c_height) =>
types = types =
......
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