CLIENT GUI Framework
[vnfsdk/refrepo.git] / openo-portal / portal-common / src / main / webapp / common / css / ZteIctIcons / demo-files / demo.js
1 if (!('boxShadow' in document.body.style)) {\r
2     document.body.setAttribute('class', 'noBoxShadow');\r
3 }\r
4 \r
5 document.body.addEventListener("click", function(e) {\r
6     var target = e.target;\r
7     if (target.tagName === "INPUT" &&\r
8         target.getAttribute('class').indexOf('liga') === -1) {\r
9         target.select();\r
10     }\r
11 });\r
12 \r
13 (function() {\r
14     var fontSize = document.getElementById('fontSize'),\r
15         testDrive = document.getElementById('testDrive'),\r
16         testText = document.getElementById('testText');\r
17     function updateTest() {\r
18         testDrive.innerHTML = testText.value || String.fromCharCode(160);\r
19         if (window.icomoonLiga) {\r
20             window.icomoonLiga(testDrive);\r
21         }\r
22     }\r
23     function updateSize() {\r
24         testDrive.style.fontSize = fontSize.value + 'px';\r
25     }\r
26     fontSize.addEventListener('change', updateSize, false);\r
27     testText.addEventListener('input', updateTest, false);\r
28     testText.addEventListener('change', updateTest, false);\r
29     updateSize();\r
30 }());\r