diff --git a/InvenTree/static/script/bootstrap-table-en-US.min.js b/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js similarity index 100% rename from InvenTree/static/script/bootstrap-table-en-US.min.js rename to InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js diff --git a/InvenTree/static/script/bootstrap-table.min.js b/InvenTree/static/script/bootstrap/bootstrap-table.min.js similarity index 100% rename from InvenTree/static/script/bootstrap-table.min.js rename to InvenTree/static/script/bootstrap/bootstrap-table.min.js diff --git a/InvenTree/static/script/bootstrap-treeview.js b/InvenTree/static/script/bootstrap/bootstrap-treeview.js similarity index 100% rename from InvenTree/static/script/bootstrap-treeview.js rename to InvenTree/static/script/bootstrap/bootstrap-treeview.js diff --git a/InvenTree/static/script/bootstrap.min.js b/InvenTree/static/script/bootstrap/bootstrap.min.js similarity index 100% rename from InvenTree/static/script/bootstrap.min.js rename to InvenTree/static/script/bootstrap/bootstrap.min.js diff --git a/InvenTree/static/script/filter_company.js b/InvenTree/static/script/filter_company.js deleted file mode 100644 index feff8dcaca..0000000000 --- a/InvenTree/static/script/filter_company.js +++ /dev/null @@ -1,63 +0,0 @@ - -function add_company(company){ - - var text = "
  • "; - - text += ""; - text += company.name + ""; - - if (company.description){ - text += " - " + company.description; - } - - text += "
  • "; - - $("#company-list").append(text); -} - - -function filter(text){ - - $.ajax( - { - url: "/api/company/", - success: function(result) { - $("#company-list").empty(); - $.each(result.results, function(i, company){ - add_company(company); - }) - }, - data: { - 'search': text, - } - } - ); -} - -$(document).ready(function(){ - $("#company-filter").keyup(function(e) { - - if (e.keyCode == 27){ // Escape key - $("#company-filter").val(''); - cancelTimer(); - filter(''); - } - else { - - var value = $(this).val().toLowerCase(); - - delay(function() { - filter(value); - }, 500); - } - }); - - $("#clear-filter").click(function(){ - clearTimeout(keyDelay); - $("#company-filter").val(''); - filter(''); - }); - - // Initially load the list with all values - filter(''); -}); \ No newline at end of file diff --git a/InvenTree/static/script/delay.js b/InvenTree/static/script/inventree/delay.js similarity index 100% rename from InvenTree/static/script/delay.js rename to InvenTree/static/script/inventree/delay.js diff --git a/InvenTree/static/script/notification.js b/InvenTree/static/script/inventree/notification.js similarity index 100% rename from InvenTree/static/script/notification.js rename to InvenTree/static/script/inventree/notification.js diff --git a/InvenTree/static/script/sidenav.js b/InvenTree/static/script/inventree/sidenav.js similarity index 100% rename from InvenTree/static/script/sidenav.js rename to InvenTree/static/script/inventree/sidenav.js diff --git a/InvenTree/static/script/tables.js b/InvenTree/static/script/inventree/tables.js similarity index 100% rename from InvenTree/static/script/tables.js rename to InvenTree/static/script/inventree/tables.js diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 2ec82aaf51..42c79532b2 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -54,19 +54,20 @@ InvenTree - - - - - - - - - - - + + + + + + + + + + + + {% block js_load %} {% endblock %} diff --git a/wip/ajax_request.js b/wip/ajax_request.js deleted file mode 100644 index 856af8ca47..0000000000 --- a/wip/ajax_request.js +++ /dev/null @@ -1,71 +0,0 @@ -{% load static %} - - - - \ No newline at end of file