diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-02-27 21:59:27 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-08-07 12:17:36 +0200 |
commit | d63f7cf5b8a25bba0de8ee11202edda3ca062eb4 (patch) | |
tree | 62a0ba8e7df90f9ee110d57e57f6deca200e1dc6 /tpl/default/js | |
parent | dfb058c616a29cc712832e7e00a25e2f96eb44ce (diff) | |
download | Shaarli-d63f7cf5b8a25bba0de8ee11202edda3ca062eb4.tar.gz Shaarli-d63f7cf5b8a25bba0de8ee11202edda3ca062eb4.tar.zst Shaarli-d63f7cf5b8a25bba0de8ee11202edda3ca062eb4.zip |
Desktop search fields
Diffstat (limited to 'tpl/default/js')
-rw-r--r-- | tpl/default/js/shaarli.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index c401af1d..cbce0617 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -39,4 +39,14 @@ | |||
39 | }); | 39 | }); |
40 | 40 | ||
41 | window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu); | 41 | window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu); |
42 | })(this, this.document); \ No newline at end of file | 42 | })(this, this.document); |
43 | |||
44 | var searchInputs = document.querySelectorAll('#search input[type="text"]'); | ||
45 | [].forEach.call(searchInputs, function(searchInput) { | ||
46 | searchInput.addEventListener('focus', function(event) { | ||
47 | event.target.style.width = '250px'; | ||
48 | }); | ||
49 | searchInput.addEventListener('blur', function(event) { | ||
50 | event.target.style.width = '140px'; | ||
51 | }); | ||
52 | }); \ No newline at end of file | ||