Clean up the syntax of html attributes to always use double quotes

Our templates are very inconsistent and sometimes even use single and
double quotes in the same tag. This is an attempt to clean it up a
little and use double quotes everywhere.

In addition, I have run into a problem with single quotes being
incorrectly escaped by the Django compressor, and I want to see if
this will help with the issue.

Change-Id: I2d5137a87ed65c6abef38a49264346f917a1c85a
This commit is contained in:
Radomir Dopieralski 2023-04-04 17:35:30 +02:00
parent 5663e0865b
commit 4a89303231
39 changed files with 118 additions and 118 deletions

View File

@ -1,5 +1,5 @@
<div class='page-header'> <div class="page-header">
<h1>{$ ::header $}</h1> <h1>{$ ::header $}</h1>
<p>{$ ::description $}</p> <p>{$ ::description $}</p>
<ng-transclude></ng-transclude> <ng-transclude></ng-transclude>
</div> </div>

View File

@ -34,7 +34,7 @@
ng-model="ctrl.customItem" ng-model="ctrl.customItem"
validate-unique="ctrl.checkNameUnique"/> validate-unique="ctrl.checkNameUnique"/>
<span class="input-group-btn"> <span class="input-group-btn">
<button type='button' class="btn btn-primary" <button type="button" class="btn btn-primary"
ng-click="ctrl.tree.addCustom(ctrl.customItem); ctrl.customItem=''" ng-click="ctrl.tree.addCustom(ctrl.customItem); ctrl.customItem=''"
ng-disabled="!ctrl.customItem || customItemForm.$invalid"> ng-disabled="!ctrl.customItem || customItemForm.$invalid">
<span class="fa fa-plus"></span> <span class="fa fa-plus"></span>

View File

@ -1,5 +1,5 @@
<dt>{$ ctrl.config.label $}</dt> <dt>{$ ctrl.config.label $}</dt>
<dd> <dd>
<hz-field config='ctrl.config' item='ctrl.item'></hz-field> <hz-field config="ctrl.config" item="ctrl.item"></hz-field>
</dd> </dd>

View File

@ -5,7 +5,7 @@
{% for component in components %} {% for component in components %}
{% if user|has_permissions:component %} {% if user|has_permissions:component %}
<li{% if current.slug == component.slug %} class="active"{% endif %}> <li{% if current.slug == component.slug %} class="active"{% endif %}>
<a href="{{ component.get_absolute_url }}" tabindex='1'>{{ component.name }}</a> <a href="{{ component.get_absolute_url }}" tabindex="1">{{ component.name }}</a>
</li> </li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -10,7 +10,7 @@
{% for panel in filtered_panels %} {% for panel in filtered_panels %}
{% if panel in accessible_panels or current == panel.slug %} {% if panel in accessible_panels or current == panel.slug %}
<li> <li>
<a href="{{ panel.get_absolute_url }}" {% if current == panel.slug %}class="active"{% endif %} tabindex='1'>{{ panel.name }}</a> <a href="{{ panel.get_absolute_url }}" {% if current == panel.slug %}class="active"{% endif %} tabindex="1">{{ panel.name }}</a>
</li> </li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -7,18 +7,18 @@
<div class="modal" data-backdrop="[[modal_backdrop]]"> <div class="modal" data-backdrop="[[modal_backdrop]]">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class='modal-header'> <div class="modal-header">
<a class='close' data-dismiss='modal' href="#"> <a class="close" data-dismiss="modal" href="#">
<span class="fa fa-times"></span> <span class="fa fa-times"></span>
</a> </a>
<h3 class="modal-title">[[title]]</h3> <h3 class="modal-title">[[title]]</h3>
</div> </div>
<div class='modal-body'> <div class="modal-body">
[[[body]]] [[[body]]]
</div> </div>
<div class='modal-footer'> <div class="modal-footer">
<a href='#' class='btn btn-default cancel' data-dismiss='modal'>[[cancel]]</a> <a href="#" class="btn btn-default cancel" data-dismiss="modal">[[cancel]]</a>
<a href='#' class='btn [[confirmCssClass]]'>[[confirm]]</a> <a href="#" class="btn [[confirmCssClass]]">[[confirm]]</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@
{% block table_caption %} {% block table_caption %}
<caption> <caption>
{% if not hidden_title %} {% if not hidden_title %}
<span class='table-title'>{{ table }}</span> <span class="table-title">{{ table }}</span>
{% endif %} {% endif %}
{{ table.render_table_actions }} {{ table.render_table_actions }}
</caption> </caption>

View File

@ -4,7 +4,7 @@
{{ action.verbose_name }} {{ action.verbose_name }}
</button> </button>
{% else %} {% else %}
<a href='{{ action.bound_url }}' title='{{ action.verbose_name }}' {{ action.attr_string|safe }}> <a href="{{ action.bound_url }}" title="{{ action.verbose_name }}" {{ action.attr_string|safe }}>
{% if action.icon != None %}<span class="fa fa-{{ action.icon }}"></span> {% endif %} {% if action.icon != None %}<span class="fa fa-{{ action.icon }}"></span> {% endif %}
{{ action.verbose_name }} {{ action.verbose_name }}
</a> </a>

View File

@ -1,7 +1,7 @@
{% load i18n %} {% load i18n %}
{% block trimmed %} {% block trimmed %}
<div class='input-group date'> <div class="input-group date">
{{ datepicker_input }} {{ datepicker_input }}
<label class="sr-only">{{ datepicker_label }}</label> <label class="sr-only">{{ datepicker_label }}</label>
<span class="input-group-addon datepicker-addon"> <span class="input-group-addon datepicker-addon">

View File

@ -1,4 +1,4 @@
<div class='page-header detail-header'> <div class="page-header detail-header">
<div class="row"> <div class="row">
<div class="detail-title col-xs-12 col-sm-9"> <div class="detail-title col-xs-12 col-sm-9">
<span class="h1 word-wrap">{{ page_title }}</span> <span class="h1 word-wrap">{{ page_title }}</span>
@ -6,7 +6,7 @@
<div class="detail-actions col-xs-12 col-sm-3 text-right"> <div class="detail-actions col-xs-12 col-sm-3 text-right">
{% if actions %} {% if actions %}
<form class='detail-actions-form actions_column' action='{{ url }}' method="POST"> <form class="detail-actions-form actions_column" action="{{ url }}" method="POST">
{% csrf_token %} {% csrf_token %}
{{ actions }} {{ actions }}
</form> </form>

View File

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
{% block page_header %} {% block page_header %}
<div class='page-header'> <div class="page-header">
<h1> <h1>
{% if 'domain_context_name' in request.session %} {% if 'domain_context_name' in request.session %}
<em>{% blocktrans with context_name=request.session.domain_context_name %}{{ context_name }}:{% endblocktrans %}</em> <em>{% blocktrans with context_name=request.session.domain_context_name %}{{ context_name }}:{% endblocktrans %}</em>

View File

@ -17,10 +17,10 @@
<div class="{{ classes.value }} {{ field|wrapper_classes }}"> <div class="{{ classes.value }} {{ field|wrapper_classes }}">
{% with add_item_link=field|add_item_url %} {% with add_item_link=field|add_item_url %}
{% if add_item_link %} {% if add_item_link %}
<div class='input-group'> <div class="input-group">
{{ field|add_bootstrap_class }} {{ field|add_bootstrap_class }}
<span class="input-group-btn"> <span class="input-group-btn">
<a href="{{ add_item_link }}" data-add-to-field="{{ field.auto_id }}" class='btn btn-default ajax-add ajax-modal'> <a href="{{ add_item_link }}" data-add-to-field="{{ field.auto_id }}" class="btn btn-default ajax-add ajax-modal">
<span class="fa fa-plus"></span> <span class="fa fa-plus"></span>
</a> </a>
</span> </span>

View File

@ -1,9 +1,9 @@
{% load i18n %} {% load i18n %}
{% block page_header %} {% block page_header %}
<div class='page-header'> <div class="page-header">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
{% if actions %} {% if actions %}
<form class='actions_column pull-right' action='{{ url }}' method="POST"> <form class="actions_column pull-right" action="{{ url }}" method="POST">
{% csrf_token %} {% csrf_token %}
{{ actions }} {{ actions }}
</form> </form>

View File

@ -1,5 +1,5 @@
{% load branding horizon i18n %} {% load branding horizon i18n %}
<nav id='sidebar'> <nav id="sidebar">
{% horizon_nav %} {% horizon_nav %}
</nav> </nav>

View File

@ -6,7 +6,7 @@
<ul id="{{ tab_group.get_id }}" {{ tab_group.attr_string|safe }}> <ul id="{{ tab_group.get_id }}" {{ tab_group.attr_string|safe }}>
{% for tab in tabs %} {% for tab in tabs %}
<li {{ tab.attr_string|safe }}> <li {{ tab.attr_string|safe }}>
<a href="?{{ tab_group.param_name }}={{ tab.get_id }}" data-toggle="tab" data-target="#{{ tab.get_id }}" data-loaded='{{ tab.load|yesno:"true,false" }}'>{{ tab.name }}</a> <a href="?{{ tab_group.param_name }}={{ tab.get_id }}" data-toggle="tab" data-target="#{{ tab.get_id }}" data-loaded="{{ tab.load|yesno:"true,false" }}">{{ tab.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -27,7 +27,7 @@
<!-- source files --> <!-- source files -->
{% for file in HORIZON_CONFIG.js_files %} {% for file in HORIZON_CONFIG.js_files %}
<script src='{{ STATIC_URL }}{{ file }}'></script> <script src="{{ STATIC_URL }}{{ file }}"></script>
{% endfor %} {% endfor %}
{% block source %} {% block source %}
@ -36,7 +36,7 @@
<!-- test files - mock and spec --> <!-- test files - mock and spec -->
{% block spec %} {% block spec %}
{% for file in HORIZON_CONFIG.js_spec_files %} {% for file in HORIZON_CONFIG.js_spec_files %}
<script src='{{ STATIC_URL }}{{ file }}'></script> <script src="{{ STATIC_URL }}{{ file }}"></script>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}

View File

@ -7,17 +7,17 @@
<script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js"></script> <script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/hogan.js"></script> <script src="{{ STATIC_URL }}horizon/lib/hogan.js"></script>
<script src='{{ STATIC_URL }}horizon/lib/jsencrypt/jsencrypt.js'></script> <script src="{{ STATIC_URL }}horizon/lib/jsencrypt/jsencrypt.js"></script>
<script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script> <script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script>
<script src="{{ STATIC_URL }}horizon/js/horizon.instances.js"></script> <script src="{{ STATIC_URL }}horizon/js/horizon.instances.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.forms.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.forms.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.formset_table.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.formset_table.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.messages.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.messages.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.quota.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.quota.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.string.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.string.js"></script>
{% include "horizon/client_side/templates.html" %} {% include "horizon/client_side/templates.html" %}
@ -94,9 +94,9 @@
<table id="flavors" class= <table id="flavors" class=
"table table-bordered table-striped datatable"> "table table-bordered table-striped datatable">
<thead> <thead>
<tr class='table_caption'> <tr class="table_caption">
<th class='table_header' colspan='8'> <th class="table_header" colspan="8">
<h3 class='table_title'>Flavors</h3> <h3 class="table_title">Flavors</h3>
<div class="table_actions clearfix"></div> <div class="table_actions clearfix"></div>
</th> </th>

View File

@ -8,15 +8,15 @@
window.STATIC_URL = '{{ STATIC_URL }}'; window.STATIC_URL = '{{ STATIC_URL }}';
window.WEBROOT = '{{ WEBROOT }}'; window.WEBROOT = '{{ WEBROOT }}';
</script> </script>
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.js' type='text/javascript' charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src='{{ STATIC_URL }}horizon/lib/jquery-ui/ui/jquery-ui.js' type='text/javascript' charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery-ui/ui/jquery-ui.js" type="text/javascript" charset="utf-8"></script>
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery-migrate.js' type='text/javascript' charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery-migrate.js' type="text/javascript" charset="utf-8"></script>
<script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular.js" type="text/javascript" charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/angular/angular.js" type="text/javascript" charset="utf-8"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.js' type='text/javascript' charset='utf-8'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.js" type="text/javascript" charset="utf-8"></script>
<script type='text/javascript' charset='utf-8'> <script type="text/javascript" charset="utf-8">
(function (global) { (function (global) {
'use strict'; 'use strict';
@ -63,9 +63,9 @@
<script src="{{ STATIC_URL }}horizon/lib/spin.js"></script> <script src="{{ STATIC_URL }}horizon/lib/spin.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/spin.jquery.js"></script> <script src="{{ STATIC_URL }}horizon/lib/spin.jquery.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script>
<script> <script>
angular.module('test_app', []).run(updateHorizon); angular.module('test_app', []).run(updateHorizon);

View File

@ -713,13 +713,13 @@ class DataTableTests(test.TestCase):
self.assertContains(resp, update_string, 4) self.assertContains(resp, update_string, 4)
self.assertContains(resp, "data-update-interval", 4) self.assertContains(resp, "data-update-interval", 4)
# Verify no table heading # Verify no table heading
self.assertNotContains(resp, "<h3 class='table_title'") self.assertNotContains(resp, '<h3 class="table_title"')
# Verify our XSS protection # Verify our XSS protection
self.assertContains(resp, '&lt;strong&gt;evil&lt;/strong&gt;', 1) self.assertContains(resp, '&lt;strong&gt;evil&lt;/strong&gt;', 1)
# Hidden Title = False shows the table title # Hidden Title = False shows the table title
self.table._meta.hidden_title = False self.table._meta.hidden_title = False
resp = http.HttpResponse(self.table.render()) resp = http.HttpResponse(self.table.render())
self.assertContains(resp, "<span class='table-title'>", 1) self.assertContains(resp, '<span class="table-title">', 1)
# Filter = False hides the search box # Filter = False hides the search box
self.table._meta.filter = False self.table._meta.filter = False

View File

@ -139,12 +139,12 @@ class TemplateTagTests(test.TestCase):
text = "{% horizon_main_nav %}" text = "{% horizon_main_nav %}"
expected = """ expected = """
<div> <div>
<ul class=\"nav nav-tabs\" role=\"tablist\"> <ul class="nav nav-tabs" role="tablist">
<li> <li>
<a href=\"/cats/\" tabindex='1'>Cats</a> <a href="/cats/" tabindex="1">Cats</a>
</li> </li>
<li> <li>
<a href=\"/dogs/\" tabindex='1'>Dogs</a> <a href="/dogs/" tabindex="1">Dogs</a>
</li> </li>
</ul></div>""" </ul></div>"""

View File

@ -679,7 +679,7 @@
<div class="form-group"> <div class="form-group">
<label translate class="col-lg-2 control-label" for="datepicker">Datepicker</label> <label translate class="col-lg-2 control-label" for="datepicker">Datepicker</label>
<div class="col-lg-10"> <div class="col-lg-10">
<div class='input-group'> <div class="input-group">
<input type="text" class="form-control" id="datepicker"> <input type="text" class="form-control" id="datepicker">
<span class="input-group-addon datepicker-addon"> <span class="input-group-addon datepicker-addon">
<span class="fa fa-calendar"></span> <span class="fa fa-calendar"></span>

View File

@ -2,7 +2,7 @@
<h3>{% trans "Instance Console" %}</h3> <h3>{% trans "Instance Console" %}</h3>
{% if console_url %} {% if console_url %}
<p class='alert alert-info'> <p class="alert alert-info">
{% if console_type != 'SERIAL' %} {% if console_type != 'SERIAL' %}
{% blocktrans %}If console is not responding to keyboard input: click the grey status bar below.{% endblocktrans %} {% blocktrans %}If console is not responding to keyboard input: click the grey status bar below.{% endblocktrans %}
{% endif %} {% endif %}

View File

@ -1,12 +1,12 @@
{% load i18n %} {% load i18n %}
<a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content=" <a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content="
<table class='table table-bordered'> <table class=&quot;table table-bordered&quot;>
<tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr> <tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr>
<tr><th>{% trans 'VCPUs' %}</th><td>{{ vcpus }}</td></tr> <tr><th>{% trans 'VCPUs' %}</th><td>{{ vcpus }}</td></tr>
<tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr> <tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr>
<tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr> <tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr>
</table> </table>
" data-original-title="{% blocktrans %}<span class='word-wrap'>Flavor Details: {{ name }}</span>">{{ name }}{% endblocktrans %}</a> " data-original-title="{% blocktrans %}<span class=&quot;word-wrap&quot;>Flavor Details: {{ name }}</span>">{{ name }}{% endblocktrans %}</a>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function () { $(function () {
var $flavor = $("#flavor_details_{{ id }}"); var $flavor = $("#flavor_details_{{ id }}");

View File

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
<div class='description'> <div class="description">
{% blocktrans trimmed %} {% blocktrans trimmed %}
Resize the canvas by scrolling up/down with your mouse/trackpad on the topology. Resize the canvas by scrolling up/down with your mouse/trackpad on the topology.
Pan around the canvas by clicking and dragging the space behind the topology. Pan around the canvas by clicking and dragging the space behind the topology.

View File

@ -1,4 +1,4 @@
<script type='text/javascript'> <script type="text/javascript">
(function(){ (function(){
$(window).on('message',function(e){ $(window).on('message',function(e){
var message = JSON.parse(e.originalEvent.data); var message = JSON.parse(e.originalEvent.data);

View File

@ -10,7 +10,7 @@
<pattern id="device_normal_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"> <pattern id="device_normal_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="20" height="20">
<g> <g>
<rect width="20" height="20" class="loading_bg_normal"></rect> <rect width="20" height="20" class="loading_bg_normal"></rect>
<path d='M0 20L20 0ZM22 18L18 22ZM-2 2L2 -2Z' stroke-linecap="square" stroke='rgba(0, 0, 0, 0.3)' stroke-width="7"></path> <path d="M0 20L20 0ZM22 18L18 22ZM-2 2L2 -2Z" stroke-linecap="square" stroke="rgba(0, 0, 0, 0.3)" stroke-width="7"></path>
</g> </g>
<animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-20" repeatCount="indefinite"></animate> <animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-20" repeatCount="indefinite"></animate>
</pattern> </pattern>
@ -22,7 +22,7 @@
<pattern id="device_small_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="5" height="5"> <pattern id="device_small_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="5" height="5">
<g> <g>
<rect width="5" height="5" class="loading_bg_small"></rect> <rect width="5" height="5" class="loading_bg_small"></rect>
<path d='M0 5L5 0ZM6 4L4 6ZM-1 1L1 -1Z' stroke-linecap="square" stroke='rgba(0, 0, 0, 0.4)' stroke-width="1.5"></path> <path d="M0 5L5 0ZM6 4L4 6ZM-1 1L1 -1Z" stroke-linecap="square" stroke="rgba(0, 0, 0, 0.4)" stroke-width="1.5"></path>
</g> </g>
<animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-5" repeatCount="indefinite"></animate> <animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-5" repeatCount="indefinite"></animate>
</pattern> </pattern>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.js' type='text/javascript' charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
</head> </head>
<body> <body>
{% include "horizon/_messages.html" %} {% include "horizon/_messages.html" %}

View File

@ -26,7 +26,7 @@
</hz-dynamic-table> </hz-dynamic-table>
</transfer-table> <!-- End Key Pairs Table --> </transfer-table> <!-- End Key Pairs Table -->
<settings-service hz-if-settings='["OPENSTACK_HYPERVISOR_FEATURES.can_set_password"]'> <settings-service hz-if-settings="["OPENSTACK_HYPERVISOR_FEATURES.can_set_password"]">
<div class="admin-password"> <div class="admin-password">
<div class="themable-checkbox"> <div class="themable-checkbox">
<input ng-change="ctrl.setAdminPasswordChange()" <input ng-change="ctrl.setAdminPasswordChange()"

View File

@ -93,7 +93,7 @@
</div> </div>
</div> </div>
<div hz-if-settings='["OPENSTACK_HYPERVISOR_FEATURES.can_set_mount_point"]' <div hz-if-settings="[&quot;OPENSTACK_HYPERVISOR_FEATURES.can_set_mount_point&quot;]"
ng-if="model.newInstanceSpec.vol_create === true"> ng-if="model.newInstanceSpec.vol_create === true">
<label translate>Device Name</label> <label translate>Device Name</label>
<input class="form-control" <input class="form-control"

View File

@ -15,7 +15,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="shortcut icon" href="{% static "dashboard/img/favicon.ico" %}"/> <link rel="shortcut icon" href="{% static "dashboard/img/favicon.ico" %}"/>
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'dashboard/img/apple-touch-icon.png' %}" /> <link rel="apple-touch-icon" sizes="180x180" href="{% static 'dashboard/img/apple-touch-icon.png' %}" />
<link rel="mask-icon" href="{% static 'dashboard/img/safari-pinned-tab.svg' %}" color="#5bbad5" /> <link rel="mask-icon" href="{% static 'dashboard/img/safari-pinned-tab.svg' %}" color="#5bbad5" />

View File

@ -2,8 +2,8 @@
{% load themes %} {% load themes %}
{% compress css %} {% compress css %}
<link href='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/datepicker3.css' type='text/css' media='screen' rel='stylesheet' /> <link href="{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/datepicker3.css" type="text/css" media="screen" rel="stylesheet" />
<link href='{{ STATIC_URL }}horizon/lib/rickshaw/rickshaw.css' type='text/css' media='screen' rel='stylesheet' /> <link href="{{ STATIC_URL }}horizon/lib/rickshaw/rickshaw.css" type="text/css" media="screen" rel="stylesheet" />
{% endcompress %} {% endcompress %}

View File

@ -1,5 +1,5 @@
{% for static_path, template_html in angular_templates %} {% for static_path, template_html in angular_templates %}
<script type='text/javascript' id='{{ static_path }}'> <script type="text/javascript" id="{{ static_path }}">
{% include 'angular/angular_templates.js' %} {% include 'angular/angular_templates.js' %}
</script> </script>
{% endfor %} {% endfor %}

View File

@ -7,8 +7,8 @@
<head> <head>
{% block custom_analytics %} {% block custom_analytics %}
{% endblock %} {% endblock %}
<meta content='IE=edge' http-equiv='X-UA-Compatible' /> <meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% block custom_metadata %} {% block custom_metadata %}
{% include "horizon/_custom_meta.html" %} {% include "horizon/_custom_meta.html" %}
@ -26,23 +26,23 @@
{% endblock %} {% endblock %}
{% block ng_route_base %} {% endblock %} {% block ng_route_base %} {% endblock %}
</head> </head>
<body id="{% block body_id %}{% endblock %}" ng-app='horizon.app' ng-strict-di> <body id="{% block body_id %}{% endblock %}" ng-app="horizon.app" ng-strict-di>
<noscript> <noscript>
<div class="alert alert-danger text-center javascript-disabled"> <div class="alert alert-danger text-center javascript-disabled">
{% trans "This application requires JavaScript to be enabled in your web browser." %} {% trans "This application requires JavaScript to be enabled in your web browser." %}
</div> </div>
</noscript> </noscript>
{% block content %} {% block content %}
<div class='topbar'> <div class="topbar">
{% include "header/_header.html" %} {% include "header/_header.html" %}
</div> </div>
<div id='main_content'> <div id="main_content">
{% include "horizon/_messages.html" %} {% include "horizon/_messages.html" %}
{% block sidebar %} {% block sidebar %}
{% include 'horizon/common/_sidebar.html' %} {% include 'horizon/common/_sidebar.html' %}
{% endblock %} {% endblock %}
<div id='content_body'> <div id="content_body">
<div class='container-fluid'> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="page-breadcrumb"> <div class="page-breadcrumb">

View File

@ -1,7 +1,7 @@
{% if disallow_iframe_embed %} {% if disallow_iframe_embed %}
<style id="anti-clickjack">body{display:none !important;}</style> <style id="anti-clickjack">body{display:none !important;}</style>
<script type='text/javascript' charset="utf-8"> <script type="text/javascript" charset="utf-8">
if (self === top) { if (self === top) {
var antiClickjack = document.getElementById("anti-clickjack"); var antiClickjack = document.getElementById("anti-clickjack");
antiClickjack.parentNode.removeChild(antiClickjack); antiClickjack.parentNode.removeChild(antiClickjack);

View File

@ -6,12 +6,12 @@
{% comment %} Compress 3rd-party (jquery, angular, etc) and top-level Horizon JS. {% endcomment %} {% comment %} Compress 3rd-party (jquery, angular, etc) and top-level Horizon JS. {% endcomment %}
{% compress js %} {% compress js %}
{% for file in HORIZON_CONFIG.xstatic_lib_files %} {% for file in HORIZON_CONFIG.xstatic_lib_files %}
<script src='{{ STATIC_URL }}{{ file }}'></script> <script src="{{ STATIC_URL }}{{ file }}"></script>
{% endfor %} {% endfor %}
<script src='{{ STATIC_URL }}horizon/js/horizon.js' type='text/javascript' charset='utf-8'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.js" type="text/javascript" charset="utf-8"></script>
{% endcompress %} {% endcompress %}
<script type='text/javascript' charset='utf-8'> <script type="text/javascript" charset="utf-8">
(function (global) { (function (global) {
'use strict'; 'use strict';

View File

@ -18,44 +18,44 @@
var WEBROOT = "{{ WEBROOT }}"; var WEBROOT = "{{ WEBROOT }}";
</script> </script>
<script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.bootstrap.wizard.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.bootstrap.wizard.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.string.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.string.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.lists.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.lists.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.communication.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.communication.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.datepickers.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.datepickers.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.forms.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.forms.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.formset_table.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.formset_table.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.loader.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.loader.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.messages.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.messages.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.hacks.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.hacks.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.uuid.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.uuid.js"></script>
<script type="text/javascript"> <script type="text/javascript">
horizon.modals.MODAL_BACKDROP = "{% firstof HORIZON_CONFIG.modal_backdrop 'static' %}"; horizon.modals.MODAL_BACKDROP = "{% firstof HORIZON_CONFIG.modal_backdrop 'static' %}";
</script> </script>
{% if HORIZON_CONFIG.integration_tests_support %} {% if HORIZON_CONFIG.integration_tests_support %}
<script src='{{ STATIC_URL }}horizon/js/horizon.selenium.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.selenium.js"></script>
{% endif %} {% endif %}
<script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.templates.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.users.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.users.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.membership.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.membership.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.d3piechart.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.d3piechart.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.heattop.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.heattop.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.d3linechart.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.d3linechart.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.d3barchart.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.d3barchart.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.sidebar.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.sidebar.js"></script>
<script src='{{ STATIC_URL }}horizon/js/horizon.extensible_header.js'></script> <script src="{{ STATIC_URL }}horizon/js/horizon.extensible_header.js"></script>
<script src='{{ STATIC_URL }}js/horizon.instances.js'></script> <script src="{{ STATIC_URL }}js/horizon.instances.js"></script>
<script src='{{ STATIC_URL }}js/horizon.quota.js'></script> <script src="{{ STATIC_URL }}js/horizon.quota.js"></script>
<script src='{{ STATIC_URL }}js/horizon.metering.js'></script> <script src="{{ STATIC_URL }}js/horizon.metering.js"></script>
<script src='{{ STATIC_URL }}js/horizon.networktopologycommon.js'></script> <script src="{{ STATIC_URL }}js/horizon.networktopologycommon.js"></script>
<script src='{{ STATIC_URL }}js/horizon.flatnetworktopology.js'></script> <script src="{{ STATIC_URL }}js/horizon.flatnetworktopology.js"></script>
<script src='{{ STATIC_URL }}js/horizon.networktopology.js'></script> <script src="{{ STATIC_URL }}js/horizon.networktopology.js"></script>
<script src='{{ STATIC_URL }}js/horizon.volumes.js'></script> <script src="{{ STATIC_URL }}js/horizon.volumes.js"></script>
{% for file in HORIZON_CONFIG.js_files %} {% for file in HORIZON_CONFIG.js_files %}
<script src='{{ STATIC_URL }}{{ file }}'></script> <script src="{{ STATIC_URL }}{{ file }}"></script>
{% endfor %} {% endfor %}
{% block custom_js_files %}{% endblock %} {% block custom_js_files %}{% endblock %}
@ -84,7 +84,7 @@
{% comment %}Locale sensitive js needs to be included outisde the "compress" tag{% endcomment %} {% comment %}Locale sensitive js needs to be included outisde the "compress" tag{% endcomment %}
{% if DATEPICKER_LOCALE and DATEPICKER_LOCALE != 'en' %} {% if DATEPICKER_LOCALE and DATEPICKER_LOCALE != 'en' %}
<script src='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/locales/bootstrap-datepicker.{{ DATEPICKER_LOCALE }}.js'></script> <script src="{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/locales/bootstrap-datepicker.{{ DATEPICKER_LOCALE }}.js"></script>
{% endif %} {% endif %}
{% comment %}Go!{% endcomment %} {% comment %}Go!{% endcomment %}

View File

@ -2,25 +2,25 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta content='IE=edge' http-equiv='X-UA-Compatible' /> <meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>{{page_title}}</title> <title>{{page_title}}</title>
{% load compress %} {% load compress %}
{% compress css %} {% compress css %}
<link rel="stylesheet" href="{{ STATIC_URL }}dashboard/scss/serial_console.scss" type="text/scss" media="screen" /> <link rel="stylesheet" href="{{ STATIC_URL }}dashboard/scss/serial_console.scss" type="text/scss" media="screen" />
{% endcompress %} {% endcompress %}
<script src="{% url 'horizon:jsi18n' 'horizon' %}"></script> <script src="{% url 'horizon:jsi18n' 'horizon' %}"></script>
<script src='{{ STATIC_URL }}horizon/lib/termjs/term.js'></script> <script src="{{ STATIC_URL }}horizon/lib/termjs/term.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular.js"></script> <script src="{{ STATIC_URL }}horizon/lib/angular/angular.js"></script>
<script src="{{ STATIC_URL }}js/angular/directives/serialConsole.js"></script> <script src="{{ STATIC_URL }}js/angular/directives/serialConsole.js"></script>
</head> </head>
<body ng-app='serialConsoleApp'> <body ng-app="serialConsoleApp">
{% if error_message %} {% if error_message %}
{{ error_message }} {{ error_message }}
{% else %} {% else %}
<serial-console connection='"{{console_url}}"' protocols='{{protocols}}'></serial-console> <serial-console connection="&quot;{{console_url}}&quot;" protocols="{{protocols}}"></serial-console>
{% endif %} {% endif %}
</body> </body>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block custom_analytics %} {% block custom_analytics %}
<script src='{{ STATIC_URL }}/themes/example/js/my_analytics_js.js' type='text/javascript' charset='utf-8'></script> <script src="{{ STATIC_URL }}/themes/example/js/my_analytics_js.js" type="text/javascript" charset="utf-8"></script>
{% endblock %} {% endblock %}
{% block custom_metadata %} {% block custom_metadata %}
@ -9,7 +9,7 @@
{% endblock %} {% endblock %}
{% block custom_head_js %} {% block custom_head_js %}
<script src='{{ STATIC_URL }}/themes/example/js/my_custom_js.js' type='text/javascript' charset='utf-8'></script> <script src="{{ STATIC_URL }}/themes/example/js/my_custom_js.js" type="text/javascript" charset="utf-8"></script>
{% endblock %} {% endblock %}
{% block footer %} {% block footer %}

View File

@ -17,7 +17,7 @@
<span class="md-hamburger-layer md-hamburger-menu"></span> <span class="md-hamburger-layer md-hamburger-menu"></span>
</button> </button>
{% theme_dir as theme_dir %} {% theme_dir as theme_dir %}
<script src='{{ STATIC_URL }}{{ theme_dir }}/material/js/material.hamburger.js'></script> <script src="{{ STATIC_URL }}{{ theme_dir }}/material/js/material.hamburger.js"></script>
</div> </div>
{% include "header/_brand.html" %} {% include "header/_brand.html" %}
</div> </div>