Removed all inline <script> tags

This commit is contained in:
Raphael Michel
2016-04-10 16:44:49 +02:00
parent eafbe95370
commit 5cca426cd3
16 changed files with 157 additions and 87 deletions
+7
View File
@@ -0,0 +1,7 @@
window.setInterval(function () {
$.get(location.href + '?ajax=1', function (data, status) {
if (data === "1") {
location.reload();
}
});
}, 500);
@@ -0,0 +1,7 @@
window.setInterval(function () {
$.get(location.href + '?ajax=1', function (data, status) {
if (data === "1") {
location.reload();
}
});
}, 500);
+16
View File
@@ -1,5 +1,13 @@
/*global $*/
function question_page_toggle_view() {
var show = $("#id_type").val() == "C" || $("#id_type").val() == "M";
$("#answer-options").toggle(show);
show = $("#id_type").val() == "B" && $("#id_required").prop("checked");
$(".alert-required-boolean").toggle(show);
}
$(function () {
"use strict";
@@ -37,4 +45,12 @@ $(function () {
});
$('.collapsible').collapse();
// Question editor
if ($("#answer-options").length) {
$("#id_type").change(question_page_toggle_view);
$("#id_required").change(question_page_toggle_view);
question_page_toggle_view();
}
});
+2 -2
View File
@@ -1,4 +1,4 @@
/*global $, waitingDialog, default_loading_message */
/*global $, waitingDialog, gettext */
var async_task_id = null;
var async_task_timeout = null;
var async_task_check_url = null;
@@ -56,7 +56,7 @@ $(function () {
return;
}
$(this).data('ajaxing', true);
waitingDialog.show(default_loading_message);
waitingDialog.show(gettext('We are processing your request…'));
$.ajax(
{