Commit 7c03478198da78882f7b34488974ee5f7bc48159
Committed by
Antonio Terceiro
1 parent
7499fae9
Exists in
master
and in
29 other branches
Fixing bug in onResize body event
(ActionItem1753)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/views/layouts/application.rhtml
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | onresize="registerDocumentSize()"> | 42 | onresize="registerDocumentSize()"> |
43 | <script type="text/javascript"> | 43 | <script type="text/javascript"> |
44 | function registerDocumentSize() { | 44 | function registerDocumentSize() { |
45 | - document.body.className = document.body.className.replace(/(^| )docSize.+( |$)/g, " "); | 45 | + document.body.className = document.body.className.replace(/docSize-(G|L)T-\d+/g, ""); |
46 | for ( var x=100; x<=1500; x+=100 ) { | 46 | for ( var x=100; x<=1500; x+=100 ) { |
47 | if ( document.body.clientWidth > x ) { | 47 | if ( document.body.clientWidth > x ) { |
48 | document.body.className += " docSize-GT-" + x; | 48 | document.body.className += " docSize-GT-" + x; |