diff --git a/foundation/public/css/erpnext-org-theme.css b/foundation/public/css/erpnext-org-theme.css
index cab403b1..29958090 100644
--- a/foundation/public/css/erpnext-org-theme.css
+++ b/foundation/public/css/erpnext-org-theme.css
@@ -6,15 +6,18 @@ a {
color: var(--dark-grey);
/* */
}
+
.js-search-form {
- position: relative;
+ right: 0.75rem;
}
+
.js-search-input-icon {
position: absolute;
- right: 1.5rem;
+ right: 1.75rem;
top: 50%;
transform: translateY(-50%);
}
+
.js-search-icon {
cursor: pointer;
}
diff --git a/foundation/public/js/index.js b/foundation/public/js/index.js
new file mode 100644
index 00000000..5042c2bf
--- /dev/null
+++ b/foundation/public/js/index.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ready(function(){
+
+ var searchButton = document.querySelector(".js-search-icon");
+ var searchForm = document.querySelector(".js-search-form");
+ var searchInput = document.querySelector(".js-search-input");
+ var searchInputButton = document.querySelector(".js-search-input-icon");
+
+ searchButton.addEventListener("click", function(){
+ searchForm.classList.remove("display-none");
+ });
+
+ searchInput.addEventListener("blur", function(){
+ // this is not working... todo_fn
+ searchForm.classList.add("display-none");
+ }, false)
+
+ searchInputButton.addEventListener("click", function(){
+ searchForm.classList.add("display-none");
+ })
+})
\ No newline at end of file
diff --git a/foundation/templates/base.html b/foundation/templates/base.html
index cb299903..0054b8da 100644
--- a/foundation/templates/base.html
+++ b/foundation/templates/base.html
@@ -26,7 +26,11 @@
{%- endfor -%}
- {%- block script %}{%- endblock %}
+ {%- block script %}
+
+ {%- endblock %}