diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-12-12 05:56:49 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-12-12 05:56:49 +0100 |
commit | 0d46b90b44b52bb9c511b18d51752dc16eb5e61b (patch) | |
tree | d2c93497f83ea006f5b1848161183a4ce8b6ea16 /tpl/default/js | |
parent | e722fde6e3ab4145e7d48bfc8b78627dd424833f (diff) | |
download | Shaarli-0d46b90b44b52bb9c511b18d51752dc16eb5e61b.tar.gz Shaarli-0d46b90b44b52bb9c511b18d51752dc16eb5e61b.tar.zst Shaarli-0d46b90b44b52bb9c511b18d51752dc16eb5e61b.zip |
Remove the green header
Diffstat (limited to 'tpl/default/js')
-rw-r--r-- | tpl/default/js/shaarli.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 3afec7f3..24d11cdb 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -53,20 +53,6 @@ function getParentByClass(el, className) { | |||
53 | window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu); | 53 | window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu); |
54 | })(this, this.document); | 54 | })(this, this.document); |
55 | 55 | ||
56 | |||
57 | /** | ||
58 | * Expend search fields on focus. | ||
59 | */ | ||
60 | var searchInputs = document.querySelectorAll('#search input[type="text"]'); | ||
61 | [].forEach.call(searchInputs, function(searchInput) { | ||
62 | searchInput.addEventListener('focus', function(event) { | ||
63 | event.target.style.width = '250px'; | ||
64 | }); | ||
65 | searchInput.addEventListener('blur', function(event) { | ||
66 | event.target.style.width = '140px'; | ||
67 | }); | ||
68 | }); | ||
69 | |||
70 | /** | 56 | /** |
71 | * Fold/Expand shaares description and thumbnail. | 57 | * Fold/Expand shaares description and thumbnail. |
72 | */ | 58 | */ |
@@ -184,4 +170,18 @@ if (hiddenReturnurl != null) { | |||
184 | var autofocusElements = document.querySelector('.autofocus'); | 170 | var autofocusElements = document.querySelector('.autofocus'); |
185 | if (autofocusElements != null) { | 171 | if (autofocusElements != null) { |
186 | autofocusElements.focus(); | 172 | autofocusElements.focus(); |
187 | } \ No newline at end of file | 173 | } |
174 | |||
175 | /** | ||
176 | * Hide search bar, and display it on search click. | ||
177 | */ | ||
178 | var searchBar = document.getElementById('search'); | ||
179 | var searchButton = document.getElementById('search-button'); | ||
180 | if (searchBar != null && searchButton != null) { | ||
181 | searchBar.classList.toggle('closed'); | ||
182 | searchButton.addEventListener('click', function(event) { | ||
183 | event.preventDefault(); | ||
184 | searchBar.classList.toggle('closed'); | ||
185 | searchBar.classList.toggle('open'); | ||
186 | }); | ||
187 | } | ||