euscanwww: Report problems is hided and can be shown with a click

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-07-17 19:05:26 +02:00
parent d70e4cb617
commit 8268e634f0
2 changed files with 57 additions and 45 deletions

View File

@ -168,9 +168,9 @@
<hr/>
<h3>Report problems</h3>
<form action="." method="post" class="form-horizontal">
<h3 class="report-problems-toggle cursor-pointer">Report problems</h3>
<div class="report-problems hide">
<form action="." method="post" class="form-horizontal">
<div class="control-group {% if problem_form.version.errors %}error{% endif %}">
<label class="control-label" for="version">{{ problem_form.version.label }}</label>
<div class="controls">
@ -198,9 +198,11 @@
<input class="btn" type="submit" value="Submit" />
</div>
</div>
</form>
</form>
</div>
<script type="text/javascript">
$(document).ready(function () {
$(".refresh-button").click(function() {
var url = "{% url "refresh_package" "XXX" "YYY" %}";
$.post(url.replace("XXX", $(this).data("category")).replace("YYY", $(this).data("package")),
@ -222,6 +224,12 @@
$(".unfavourite-button").addClass("hide");
});
});
$(".report-problems-toggle").click(function () {
$(".report-problems").toggle("slow");
});
});
</script>
{% endblock %}

View File

@ -238,6 +238,10 @@ th {
padding: 10px;
}
.cursor-pointer {
cursor: pointer;
}
textarea {
width: inherit;
}