diff --git a/app/Resources/assets/js/style.js b/app/Resources/assets/js/style.js
index 862f51f..3555371 100644
--- a/app/Resources/assets/js/style.js
+++ b/app/Resources/assets/js/style.js
@@ -23,7 +23,7 @@ $(document).ready(function(){
onVisible: function() {
$('.image img').visibility('refresh');
},
- history: true,
+ // history: true,
historyType: 'hash'
});
@@ -31,7 +31,7 @@ $(document).ready(function(){
onVisible: function() {
$('.image img').visibility('refresh');
},
- history: true,
+ // history: true,
historyType: 'hash'
});
@@ -52,4 +52,31 @@ $(document).ready(function(){
$('.ui.sidebar')
.sidebar('attach events', '.toc.item')
;
+
+ // save last selected inventory tab to session
+ $('.setTab').click(function() {
+ $tab = $(this).attr('data-tab');
+
+ $.ajax({
+ type: 'POST',
+ url: routes.set_tab.replace("PLACEHOLDER", $tab),
+ async: true,
+ });
+ });
+
+ $('.ui.search')
+ .search({
+ type: 'category',
+ apiSettings: {
+ action: 'search',
+ url: routes.search_autocomplete+'?query={query}',
+ },
+ minCharacters: 3,
+ fields: {
+ title: 'name',
+ description: 'id',
+ url: 'url',
+ image: 'img'
+ }
+ });
});
\ No newline at end of file
diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig
index bb839fa..bd0230c 100644
--- a/app/Resources/views/base.html.twig
+++ b/app/Resources/views/base.html.twig
@@ -106,28 +106,4 @@
{% include 'footer.html.twig' %}
-{% endblock %}
-
-{% block javascripts %}
- {{ parent() }}
-
-
{% endblock %}
\ No newline at end of file
diff --git a/app/Resources/views/html.html.twig b/app/Resources/views/html.html.twig
index b5d7204..d309944 100644
--- a/app/Resources/views/html.html.twig
+++ b/app/Resources/views/html.html.twig
@@ -23,10 +23,16 @@
{% block body %}
{% endblock %}
+
+
+
{% block javascripts %}
-
-
-
+
{% endblock %}