Cleanup formatting in embedded html

This commit is contained in:
Daniel Perna 2018-01-24 23:29:53 +01:00
parent 663fe8d28a
commit 7141cb799e

View file

@ -330,16 +330,16 @@ INDEX = Template(r"""<!DOCTYPE html>
} }
.preloader-background { .preloader-background {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #eee; background-color: #eee;
position: fixed; position: fixed;
z-index: 10000; z-index: 10000;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.modal-content_nopad { .modal-content_nopad {
@ -2081,11 +2081,10 @@ INDEX = Template(r"""<!DOCTYPE html>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){ document.addEventListener("DOMContentLoaded", function(){
$('.preloader-background').delay(800).fadeOut('slow'); $('.preloader-background').delay(800).fadeOut('slow');
$('.preloader-wrapper')
$('.preloader-wrapper') .delay(800)
.delay(800) .fadeOut('slow');
.fadeOut('slow');
}); });
</script> </script>
<script> <script>
@ -2381,11 +2380,11 @@ INDEX = Template(r"""<!DOCTYPE html>
} }
function checkout(){ function checkout(){
$(".collapsible-header").removeClass(function(){ $(".collapsible-header").removeClass(function(){
return "active"; return "active";
}); });
$(".collapsible").collapsible({accordion: true}); $(".collapsible").collapsible({accordion: true});
$(".collapsible").collapsible({accordion: false}); $(".collapsible").collapsible({accordion: false});
} }
function loadfile(filepath) { function loadfile(filepath) {
@ -2664,12 +2663,12 @@ INDEX = Template(r"""<!DOCTYPE html>
function save_check() { function save_check() {
var filepath = document.getElementById('currentfile').value; var filepath = document.getElementById('currentfile').value;
if (filepath.length > 0) { if (filepath.length > 0) {
$('#modal_save').modal('open'); $('#modal_save').modal('open');
} }
else { else {
Materialize.toast('Error: Please provide a filename', 5000); Materialize.toast('Error: Please provide a filename', 5000);
$(".pathtip").bind("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd", function(){ $(".pathtip").bind("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd", function(){
$(this).removeClass("pathtip_color"); $(this).removeClass("pathtip_color");
}).addClass("pathtip_color"); }).addClass("pathtip_color");
} }
} }
@ -3028,8 +3027,7 @@ var lint_timeout;
var lint_status = $('#lint-status'); // speed optimization var lint_status = $('#lint-status'); // speed optimization
var lint_error = ""; var lint_error = "";
function check_lint() function check_lint() {
{
if (document.getElementById('currentfile').value.match(".yaml$")) { if (document.getElementById('currentfile').value.match(".yaml$")) {
try { try {
var text = editor.getValue().replace(/!(include|secret)/g,".$1"); // hack because js-yaml does not like !include/!secret var text = editor.getValue().replace(/!(include|secret)/g,".$1"); // hack because js-yaml does not like !include/!secret
@ -3049,8 +3047,7 @@ function check_lint()
} }
} }
function queue_lint(e) function queue_lint(e) {
{
if (document.getElementById('currentfile').value.match(".yaml$")) { if (document.getElementById('currentfile').value.match(".yaml$")) {
clearTimeout(lint_timeout); clearTimeout(lint_timeout);
lint_timeout = setTimeout(check_lint, 500); lint_timeout = setTimeout(check_lint, 500);
@ -3064,8 +3061,7 @@ function queue_lint(e)
} }
} }
function show_lint_error() function show_lint_error() {
{
if(lint_error) { if(lint_error) {
$("#modal_lint textarea").val(lint_error); $("#modal_lint textarea").val(lint_error);
$("#modal_lint").modal('open'); $("#modal_lint").modal('open');