Merge pull request #67 from koledas/patch-2

Math.trunc() not work in IE
This commit is contained in:
Hugo Zilliox 2020-05-14 18:12:58 +02:00 committed by GitHub
commit 3cca934fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,7 +213,7 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
o << "<script>"
o << "//<![CDATA[\n"
o << " function resizeTitleInput() {\n"
o << " $('#TitleInput input')[0].size = Math.max(50, Math.trunc(window.innerWidth / 11));\n"
o << " $('#TitleInput input')[0].size = Math.max(50, Math.floor(window.innerWidth / 11));\n"
o << " }\n"
o << " resizeTitleInput();\n"
o << " window.addEventListener('resize', resizeTitleInput);\n"