same treatment for html

This commit is contained in:
Matthias 2021-05-06 14:33:03 +02:00
parent f2b0717d10
commit a77d9d9de7
51 changed files with 103 additions and 103 deletions

View File

@ -86,7 +86,7 @@
}
);
});
$("#btn-order-parts").click(function() {
launchModalForm("/order/purchase-order/order-parts/", {
data: {
@ -94,7 +94,7 @@
},
});
});
{% endif %}
{% endblock %}

View File

@ -230,5 +230,5 @@ src="{% static 'img/blank_image.png' %}"
}
);
});
{% endblock %}

View File

@ -17,9 +17,9 @@
<div class='col-sm-6'>
</div>
<hr>
<div id='button-toolbar'>
<div class='button-toolbar container-fluid' style='float: right;'>
<div class='btn-group'>
@ -66,7 +66,7 @@
<script type='text/javascript'>
function loadOrderEvents(calendar) {
var start = startDate(calendar);
var end = endDate(calendar);
@ -85,7 +85,7 @@
var prefix = '{% settings_value "BUILDORDER_REFERENCE_PREFIX" %}';
for (var idx = 0; idx < response.length; idx++) {
var order = response[idx];
var date = order.creation_date;
@ -155,7 +155,7 @@ $('#view-calendar').click(function() {
$(".fixed-table-pagination").hide();
$(".columns-right").hide();
$(".search").hide();
$("#build-order-calendar").show();
$("#view-list").show();
});
@ -164,7 +164,7 @@ $("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#build-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();

View File

@ -17,7 +17,7 @@
</li>
{% if build.active %}
<li class='list-group-item {% if tab == "allocate" %}active{% endif %}' title='{% trans "Allocate Stock" %}'>
<a href='{% url "build-allocate" build.id %}'>
<span class='fas fa-tools'></span>

View File

@ -20,11 +20,11 @@
<hr>
<form method='POST'>
{% csrf_token %}
{{ form }}
<hr>
<button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form>
{{ form.media }}

View File

@ -75,5 +75,5 @@
{% endblock %}
{% block js_ready %}
{{ block.super }}
{% endblock %}

View File

@ -6,7 +6,7 @@
{% trans "Are you sure you want to delete the following Manufacturer Parts?" %}
</div>
{% for part in parts %}
{% endfor %}
{% endblock %}
@ -17,7 +17,7 @@
<table class='table table-striped table-condensed'>
<tr>
<input type='hidden' name='manufacturer-part-{{ part.id}}' value='manufacturer-part-{{ part.id }}'/>
<td>
{% include "hover_image.html" with image=part.part.image %}
{{ part.part.full_name }}

View File

@ -33,6 +33,6 @@
{% block js_ready %}
{{ block.super }}
{% endblock %}

View File

@ -53,7 +53,7 @@ $('#supplier-create').click(function () {
});
$("#supplier-part-delete").click(function() {
var selections = $("#supplier-table").bootstrapTable("getSelections");
var parts = [];

View File

@ -24,7 +24,7 @@
</a>
</li>
{% endif %}
{% if company.is_supplier or company.is_manufacturer %}
<li class='list-group-item {% if tab == "supplier_parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
<a href='{% url "company-detail-supplier-parts" company.id %}'>

View File

@ -18,11 +18,11 @@
{% if editing %}
<form method='POST'>
{% csrf_token %}
{{ form }}
<hr>
<button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form>
{{ form.media }}
@ -43,5 +43,5 @@ $("#edit-notes").click(function() {
location.href = "{% url 'company-notes' company.id %}?edit=1";
});
{% endif %}
{% endblock %}

View File

@ -12,7 +12,7 @@
{% for part in parts %}
<tr>
<input type='hidden' name='supplier-part-{{ part.id}}' value='supplier-part-{{ part.id }}'/>
<td>
{% include "hover_image.html" with image=part.part.image %}
{{ part.part.full_name }}

View File

@ -43,6 +43,6 @@
{% block js_ready %}
{{ block.super }}
{% endblock %}

View File

@ -19,7 +19,7 @@
</div>
</div>
{% endif %}
<table class='table table-striped table-condensed po-table' id='purchase-order-table' data-toolbar='#button-bar'>
</table>

View File

@ -90,7 +90,7 @@ $('#price-break-table').inventreeTable({
html += makeIconButton('fa-trash-alt icon-red', 'button-price-break-delete', row.pk, '{% trans "Delete price break" %}');
html += `</div>`;
return html;
}
},

View File

@ -44,7 +44,7 @@ $("#new-attachment").click(function() {
$("#attachment-table").on('click', '.attachment-edit-button', function() {
var button = $(this);
var url = `/order/purchase-order/attachment/${button.attr('pk')}/edit/`;
launchModalForm(url, {

View File

@ -193,11 +193,11 @@ $("#po-table").inventreeTable({
});
},
sorter: function(valA, valB, rowA, rowB) {
if (rowA.received == 0 && rowB.received == 0) {
return (rowA.quantity > rowB.quantity) ? 1 : -1;
}
var progressA = parseFloat(rowA.received) / rowA.quantity;
var progressB = parseFloat(rowB.received) / rowB.quantity;

View File

@ -83,7 +83,7 @@
var title = `${prefix}${order.reference} - ${order.supplier_detail.name}`;
var color = '#4c68f5';
if (order.complete_date) {
color = '#25c235';
} else if (order.overdue) {
@ -143,7 +143,7 @@ $('#view-calendar').click(function() {
$(".columns-right").hide();
$(".search").hide();
$('#filter-list-salesorder').hide();
$("#purchase-order-calendar").show();
$("#view-list").show();
});
@ -152,7 +152,7 @@ $("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#purchase-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();

View File

@ -51,13 +51,13 @@ $("#new-so-line").click(function() {
{% if order.status == SalesOrderStatus.PENDING %}
function showAllocationSubTable(index, row, element) {
// Construct a table showing stock items which have been allocated against this line item
var html = `<div class='sub-table'><table class='table table-striped table-condensed' id='allocation-table-${row.pk}'></table></div>`;
element.html(html);
var lineItem = row;
var table = $(`#allocation-table-${row.pk}`);
table.bootstrapTable({
@ -70,7 +70,7 @@ function showAllocationSubTable(index, row, element) {
title: '{% trans "Quantity" %}',
formatter: function(value, row, index, field) {
var text = '';
if (row.serial != null && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
} else {
@ -91,10 +91,10 @@ function showAllocationSubTable(index, row, element) {
field: 'buttons',
title: '{% trans "Actions" %}',
formatter: function(value, row, index, field) {
var html = "<div class='btn-group float-right' role='group'>";
var pk = row.pk;
{% if order.status == SalesOrderStatus.PENDING %}
html += makeIconButton('fa-edit icon-blue', 'button-allocation-edit', pk, '{% trans "Edit stock allocation" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
@ -248,11 +248,11 @@ $("#so-lines-table").inventreeTable({
var A = rowA.fulfilled;
var B = rowB.fulfilled;
{% endif %}
if (A == 0 && B == 0) {
return (rowA.quantity > rowB.quantity) ? 1 : -1;
}
var progressA = parseFloat(A) / rowA.quantity;
var progressB = parseFloat(B) / rowB.quantity;
@ -271,7 +271,7 @@ $("#so-lines-table").inventreeTable({
var html = `<div class='btn-group float-right' role='group'>`;
var pk = row.pk;
if (row.part) {
var part = row.part_detail;
@ -284,13 +284,13 @@ $("#so-lines-table").inventreeTable({
if (part.purchaseable) {
html += makeIconButton('fa-shopping-cart', 'button-buy', row.part, '{% trans "Purchase stock" %}');
}
if (part.assembly) {
html += makeIconButton('fa-tools', 'button-build', row.part, '{% trans "Build stock" %}');
}
}
html += makeIconButton('fa-edit icon-blue', 'button-edit', pk, '{% trans "Edit line item" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, '{% trans "Delete line item " %}');

View File

@ -141,7 +141,7 @@ $('#view-calendar').click(function() {
$(".columns-right").hide();
$(".search").hide();
$('#filter-list-salesorder').hide();
$("#sales-order-calendar").show();
$("#view-list").show();
});
@ -150,7 +150,7 @@ $("#view-list").click(function() {
// Hide the calendar view, show the list view
$("#sales-order-calendar").hide();
$("#view-list").hide();
$(".fixed-table-pagination").show();
$(".columns-right").show();
$(".search").show();

View File

@ -46,5 +46,5 @@
part: {{ part.id }},
}
});
{% endblock %}

View File

@ -198,7 +198,7 @@
})
$("#part-export").click(function() {
var url = "{% url 'part-export' %}?category={{ category.id }}";
location.href = url;

View File

@ -262,5 +262,5 @@
},
);
});
{% endblock %}

View File

@ -58,7 +58,7 @@
});
$("#manufacturer-part-delete").click(function() {
var selections = $("#manufacturer-table").bootstrapTable("getSelections");
var parts = [];

View File

@ -20,12 +20,12 @@
{% if editing %}
<form method='POST'>
{% csrf_token %}
{{ form }}
<hr>
<button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form>
{{ form.media }}

View File

@ -49,7 +49,7 @@
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -151,7 +151,7 @@
<td>{% decimal allocated %}</td>
</tr>
{% endif %}
{% if not part.is_template %}
{% if part.assembly %}
<tr>
@ -177,11 +177,11 @@
</table>
</div>
</div>
</div>
<div class='panel panel-default panel-inventree'>
<div class='panel-heading'>
<h4>
{% block heading %}
@ -272,7 +272,7 @@
function onSelectImage(response) {
// Callback when the image-selection modal form is displayed
// Populate the form with image data (requested via AJAX)
$("#modal-form").find("#image-select-table").bootstrapTable({
pagination: true,
pageSize: 25,
@ -301,9 +301,9 @@
}
});
}
{% if roles.part.change %}
{% settings_value "INVENTREE_DOWNLOAD_FROM_URL" as allow_download %}
{% if allow_download %}
$("#part-image-url").click(function() {

View File

@ -11,7 +11,7 @@
<form method='post' action='' class='js-modal-form' enctype='multipart/form-data'>
{% csrf_token %}
{% load crispy_forms_tags %}
<input id='image-input' name='image' type='hidden' value="{{ part.image }}">
<table id='image-select-table' class='table table-striped table-condensed table-img-grid'>

View File

@ -4,10 +4,10 @@
{% block form %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% load crispy_forms_tags %}
<label class='control-label'>Parts</label>
<p class='help-block'>{% trans "Set category for the following parts" %}</p>
<table class='table table-striped'>
<tr>
<th>{% trans "Part" %}</th>
@ -36,8 +36,8 @@
</tr>
{% endfor %}
</table>
{% crispy form %}
</form>
{% endblock %}

View File

@ -11,7 +11,7 @@
{% block category_content %}
<div class='panel panel-default panel-inventree'>
<div class='panel-heading'>
<h4>{% trans "Subcategories" %}</h4>
</div>

View File

@ -62,7 +62,7 @@
});
$("#supplier-part-delete").click(function() {
var selections = $("#supplier-table").bootstrapTable("getSelections");
var parts = [];

View File

@ -98,7 +98,7 @@ content: "v{{report_revision}} - {{ date.isoformat }}";
<div class='details-image'>
<img class='part-image' src="{% part_image part %}">
</div>
<div class='details-container'>
<table class='details-table'>

View File

@ -13,7 +13,7 @@
font-family: Arial, Helvetica, sans-serif;
font-size: 75%;
{% endblock %}
@top-left {
{% block top_left %}
{% endblock %}
@ -98,7 +98,7 @@
{% block page_content %}
{% endblock %}
</div>
<div class='footer'>
{% block footer_content %}
{% endblock %}

View File

@ -35,7 +35,7 @@
{% endif %}
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'>
</table>
{% endblock %}
{% block js_ready %}

View File

@ -124,7 +124,7 @@
</div>
<div class='btn-group action-buttons' role='group'>
{% if barcodes %}
<!-- Barcode actions menu -->
<div class='btn-group'>

View File

@ -32,7 +32,7 @@
</div>
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='test-result-table'></table>
{% endblock %}

View File

@ -163,10 +163,10 @@
submit_text: '{% trans "Export" %}',
success: function(response) {
var url = "{% url 'stock-export' %}";
url += "?format=" + response.format;
url += "&cascade=" + response.cascade;
{% if location %}
url += "&location={{ location.id }}";
{% endif %}
@ -224,9 +224,9 @@
}
});
});
$('#print-label').click(function() {
var locs = [{{ location.pk }}];
printStockLocationLabels(locs);
@ -254,7 +254,7 @@
}
});
});
loadStockTable($("#stock-table"), {
buttons: [
'#stock-options',

View File

@ -31,7 +31,7 @@
</a>
</li>
{% endif %}
{% endif %}
{% if item.child_count > 0 %}

View File

@ -10,7 +10,7 @@
{% load crispy_forms_tags %}
<input type='hidden' name='stock_action' value='{{ stock_action }}'/>
<table class='table table-condensed table-striped' id='stock-table'>
<tr>
<th>{% trans "Stock Item" %}</th>
@ -44,7 +44,7 @@
</tr>
{% endfor %}
</table>
{% crispy form %}
</form>

View File

@ -32,7 +32,7 @@
</div>
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='sublocation-table'></table>
</div>

View File

@ -84,7 +84,7 @@ function addHeaderAction(label, title, icon, options) {
// Connect a callback to the table
$(`#table-${label}`).on('load-success.bs.table', function() {
var count = $(`#table-${label}`).bootstrapTable('getData').length;
$(`#badge-${label}`).html(count);
if (count > 0) {

View File

@ -91,7 +91,7 @@
$("#search-item-list").children('li').each(function() {
$(this).removeClass('index-action-selected');
});
// Add css class to the action we are interested in
$(`#search-item-${label}`).addClass('index-action-selected');
});
@ -215,7 +215,7 @@
var name = row.part_detail.full_name;
html = imageHoverIcon(thumb) + renderLink(name, url);
return html;
}
},
@ -355,6 +355,6 @@
{% endif %}
{% endblock %}

View File

@ -37,7 +37,7 @@
{% block js_ready %}
{{ block.super }}
{# Convert dropdown to select2 format #}
$(document).ready(function() {
attachSelect('#category-select');
@ -103,7 +103,7 @@
var button = $(this);
var url = "/part/category/{{ category.pk }}/parameters/" + button.attr('pk') + "/delete/";
launchModalForm(url, {
success: function() {
$("#param-table").bootstrapTable('refresh');

View File

@ -113,7 +113,7 @@
var button = $(this);
var url = "/part/parameter/template/" + button.attr('pk') + "/delete/";
launchModalForm(url, {
success: function() {
$("#param-table").bootstrapTable('refresh');

View File

@ -19,7 +19,7 @@
{% include "InvenTree/settings/tabs.html" %}
{% endblock %}
</div>
<div class='settings-content'>
<h3>
{% block subtitle %}

View File

@ -79,26 +79,26 @@
</div>
<div class='inventree-navs'>
<div class='sidenav sidenav-left' id='sidenav-left'>
{% block sidenav %}
<!-- Sidenav code here -->
{% endblock %}
</div>
<div class='sidenav sidenav-right' id='sidenav-right'>
{% block menubar %}
<!-- Menubar code here -->
{% endblock %}
</div>
<div class="container container-fluid inventree-content" id='inventree-content'>
{% block content %}
<!-- Each view fills in here.. -->
{% endblock %}
</div>
{% block post_content %}
{% endblock %}
@ -173,7 +173,7 @@ $(document).ready(function () {
{% endblock %}
inventreeDocReady();
showCachedAlerts();
{% if barcodes %}

View File

@ -20,10 +20,10 @@
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% block form_data %}
{% endblock %}
{% crispy form %}
</form>

View File

@ -55,7 +55,7 @@
</div>
</div>
</div>
<div class='modal fade modal-fixed-footer' tabindex='-1' role='dialog' id='modal-question-dialog'>
<div class='modal-dialog'>

View File

@ -37,7 +37,7 @@
<!--
Background Image Attribution: https://unsplash.com/photos/Ixvv3YZkd7w
-->
<div class='main body-wrapper login-screen'>
<div class='login-container'>
@ -66,7 +66,7 @@
</div>
</div>
</div>
<div id="div_id_password" class="form-group">
<label for="id_password" class="control-label requiredField">{% trans "Password" %}<span class="asteriskField">*</span></label>
<div class='controls'>
@ -78,15 +78,15 @@
</div>
</div>
</div>
{% if form.errors %}
<div class='login-error'>
<b>{% trans "Username / password combination is incorrect" %}</b>
</div>
{% endif %}
<hr>
<button class='pull-right btn btn-primary login-button' type="submit">{% trans "Login" %}</button>
</form>

View File

@ -62,5 +62,5 @@
</div>
</div>
</div>
</body>

View File

@ -11,7 +11,7 @@
{% block header_panel %}
<div class='panel panel-default panel-inventree'>
{% block header_pre_content %}
{% endblock %}