Commit 4a70c468b6b2696e24da463fdef40b24ec83796a
1 parent
d6ae13a1
Exists in
master
and in
5 other branches
padding label TF #362
Showing
3 changed files
with
18 additions
and
11 deletions
Show diff stats
core/static/css/base/amadeus.css
exam/static/js/Exam.js
... | ... | @@ -28,7 +28,9 @@ |
28 | 28 | '</div>'+ |
29 | 29 | '</div>'+ |
30 | 30 | '<div class="row form-group">'+ |
31 | - '<button type="button" class="btn btn-raised btn-primary" id="newAlternative_'+questionType_id+'" onclick="functionNewAlternative(radios_'+questionType_id+')">New Alternative</button>'+ | |
31 | + '<div class="col-md-8 col-md-offset-2">'+ | |
32 | + '<button type="button" class="btn btn-raised btn-primary" id="newAlternative_'+questionType_id+'" onclick="functionNewAlternative(radios_'+questionType_id+')">New Alternative</button>'+ | |
33 | + '</div>'+ | |
32 | 34 | '</div>'+ |
33 | 35 | '</div>'; |
34 | 36 | } else if (elem.value == 1) { |
... | ... | @@ -43,9 +45,8 @@ |
43 | 45 | '<div class="row form-group">'+ |
44 | 46 | '<label for="alternative" class="col-md-2 control-label">Alternatives: T/F</label>'+ |
45 | 47 | '<div class="col-md-10" id="radiosTF_'+questionType_id+'">'+ |
46 | - '<div class="radio form-group" value="1">'+ | |
47 | - '<div class="radio">'+ | |
48 | - '<label>'+ | |
48 | + '<div class="radio radio-primary form-group" value="1">'+ | |
49 | + '<label class="primary-label-TF">'+ | |
49 | 50 | '<textarea class="form-control" rows="1" placeholder="Write your alternative"></textarea>'+ |
50 | 51 | '</label>'+ |
51 | 52 | '<label>'+ |
... | ... | @@ -54,10 +55,9 @@ |
54 | 55 | '<label>'+ |
55 | 56 | '<input type="radio" name="true-or-false-1" value="F">'+ |
56 | 57 | '</label>'+ |
57 | - '</div>'+ | |
58 | 58 | '</div>'+ |
59 | - '<div class="radio form-group" value="2">'+ | |
60 | - '<label>'+ | |
59 | + '<div class="radio radio-primary form-group" value="2">'+ | |
60 | + '<label class="primary-label-TF">'+ | |
61 | 61 | '<textarea class="form-control" rows="1" placeholder="Write your alternative"></textarea>'+ |
62 | 62 | '</label>'+ |
63 | 63 | '<label>'+ |
... | ... | @@ -66,11 +66,13 @@ |
66 | 66 | '<label>'+ |
67 | 67 | '<input type="radio" name="true-or-false-2" value="F">'+ |
68 | 68 | '</label>'+ |
69 | - '</div>'+ | |
70 | 69 | '</div>'+ |
71 | 70 | '</div>'+ |
71 | + '</div>'+ | |
72 | 72 | '<div class="row form-group">'+ |
73 | - '<button type="button" class="btn btn-raised btn-primary" id="newAlternative_'+questionType_id+'" onclick="functionNewAlternativeTF(radiosTF_'+questionType_id+')">New Alternative</button>'+ | |
73 | + '<div class="col-md-8 col-md-offset-2">'+ | |
74 | + '<button type="button" class="btn btn-raised btn-primary" id="newAlternative_'+questionType_id+'" onclick="functionNewAlternativeTF(radiosTF_'+questionType_id+')">New Alternative</button>'+ | |
75 | + '</div>'+ | |
74 | 76 | '</div>'+ |
75 | 77 | '</div>'; |
76 | 78 | } else if (elem.value == 3) { |
... | ... | @@ -88,6 +90,7 @@ |
88 | 90 | $('#questionChoice_'+ questionType_id).detach(); |
89 | 91 | } |
90 | 92 | $(questionChoice).insertBefore('#hr_'+questionType_id); |
93 | + $('.primary-label-TF').css('padding-left', '0px'); | |
91 | 94 | $.material.init() //O material deve ser iniciado aqui para funcionar os botoes de radio. |
92 | 95 | } |
93 | 96 | //Bug quando criamos sem ser na ordem |
... | ... | @@ -106,7 +109,7 @@ function functionNewAlternativeTF(Question_Id){ |
106 | 109 | var alternative = parseInt($("div").last().val()) + 1; |
107 | 110 | var element = |
108 | 111 | '<div class="radio form-group">'+ |
109 | - '<label>'+ | |
112 | + '<label class="primary-label-TF" >'+ | |
110 | 113 | '<textarea class="form-control" rows="1" placeholder="Write your alternative"></textarea>'+ |
111 | 114 | '</label>'+ |
112 | 115 | '<label>'+ |
... | ... | @@ -117,5 +120,6 @@ function functionNewAlternativeTF(Question_Id){ |
117 | 120 | '</label>'+ |
118 | 121 | '</div>'; |
119 | 122 | $(Question_Id).append(element); |
123 | + $('.primary-label-TF').css('padding-left', '0px'); | |
120 | 124 | $.material.init() //O material deve ser iniciado aqui para funcionar os botoes de radio. |
121 | 125 | } |
122 | 126 | \ No newline at end of file | ... | ... |