Permalink
Browse files

add preview buttons to questions in exam edit page

fixes #80
  • Loading branch information...
christianp committed Aug 28, 2012
1 parent fe58339 commit f775f9475f7ae2a4e9298c32ae370d6a9d7e99ae
Showing with 10 additions and 0 deletions.
  1. +8 −0 editor/static/css/exam/edit.css
  2. +2 −0 editor/templates/exam/editable.html
@@ -50,6 +50,14 @@
cursor: pointer;
}
+.question .preview {
+ background-image: url(../../images/play_alt_16x16.png);
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+}
+
+
.question.ui-sortable-helper .number {
display: none;
}
@@ -168,6 +168,7 @@
<span class="handle"></span>
<span class="number" data-bind="text: ($index()+1)+'.'"/>
<a data-bind="attr:{href: url}, text: name" target="_blank"></a>
+ <a class="preview" data-bind="attr: {href: url()+'preview/'}" target="_blank" title="Test run this question"></a>
<button class="delete delete-grey" data-bind="click:remove"></button>
<div class="description" data-bind="visible: description.length>0, html: description, mathjax: true"></div>
</li>
@@ -177,6 +178,7 @@
<li class="question questionResult">
<span class="handle" data-bind="click: add"></span>
<a data-bind="attr: {href: url}, text: name" target="_blank"></a>
+ <a class="preview" data-bind="attr: {href: url()+'preview/'}" target="_blank" title="Test run this question"></a>
<div class="description" data-bind="visible: description.length>0, html: description, mathjax: true"></div>
</li>
</script>

0 comments on commit f775f94

Please sign in to comment.