diff options
| author | marktaiwan <mark.taiwan@gmail.com> | 2015-03-06 20:59:47 +0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 12:16:17 +0200 |
| commit | 3e579ee1d483e3a5b26b980762c7ccbd9e33850a (patch) | |
| tree | e8a2992e327627e29cdfadbd09fbffc6240da854 /js/inline-expanding.js | |
| parent | deefe7225d1992b67912a267cb2bba7ec93d1698 (diff) | |
Bugfix: reset multifile container width
#371
Diffstat (limited to 'js/inline-expanding.js')
| -rw-r--r-- | js/inline-expanding.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 8405ee6a..78e5dc68 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -113,6 +113,10 @@ $(document).ready(function(){ if (e.which == 2 || e.ctrlKey) // open in new tab return true; if (!$(this).data('expanded')) { + + if (~this.parentNode.className.indexOf('multifile')) + $(this).data('width') = this.parentNode.style.width; + this.parentNode.removeAttribute('style'); $(this).data('expanded', 'true'); @@ -144,7 +148,7 @@ $(document).ready(function(){ } if (~this.parentNode.className.indexOf('multifile')) - this.parentNode.style.width = (parseInt($(this).data('width'))+40)+'px'; + this.parentNode.style.width = $(this).data('width'); thumb.style.opacity = ''; thumb.style.display = ''; |
