mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
A step towards a Content-Security-Policy without inline scripts. The scripts every page or many pages share now load from static files: the error focus of base.html, the please-wait dialog, the sign-in forms' password toggle and busy button, the jobs pages' reload while a job runs, and the start of the job panel and of the VM list's state poll, whose values come as json_script data. Cancel links go back through a data-history-back attribute instead of a javascript: URL. The IE8 html5shiv/respond.js block, X-UA-Compatible and shrink-to-fit are gone: no supported browser reads them.
9 lines
502 B
JavaScript
9 lines
502 B
JavaScript
// Starts the job panel of a resource page from its settings (job_panel_script tag).
|
|
(function () {
|
|
var settings = JSON.parse(document.getElementById("job-panel-settings").textContent);
|
|
window.resourceJobPanel = jobPanel(document.getElementById("job-panel"), {
|
|
resource: settings.resource,
|
|
job: function (id) { return settings.jobs + id + "/"; },
|
|
cancel: function (id) { return settings.jobs + id + "/cancel/"; },
|
|
}, settings.csrf_token, settings.remembered);
|
|
})();
|