Last active
August 29, 2015 14:20
-
-
Save dudesl/dae9bc0196190e5ea27f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generateHtmlTag = { attrs-> | |
def browser = request.getHeader("user-agent") ?: 'MSIE 7.0' | |
def cssClass = "no-js" | |
if(browser.contains('MSIE 7.0')){ | |
cssClass = "no-js ie7" | |
} | |
else if(browser.contains('MSIE 8.0')){ | |
cssClass = "no-js ie8" | |
} | |
else if(browser.contains('MSIE 9.0')){ | |
cssClass = "no-js ie9" | |
} | |
else if(browser.contains('MSIE 10.0')){ | |
cssClass = "no-js ie10" | |
} | |
else if(browser.contains('MSIE')){ | |
cssClass = "no-js ie6" | |
} | |
out<<"""<html lang="${t9n.tr(s:'es-AR')}" class="${cssClass)}"> """ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment