--- /dev/null
+<%\r
+/**\r
+ * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy\r
+ * of this software and associated documentation files (the "Software"), to deal\r
+ * in the Software without restriction, including without limitation the rights\r
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the Software is\r
+ * furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in\r
+ * all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ */\r
+%>\r
+\r
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>\r
+<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>\r
+<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>\r
+\r
+<%@page import="com.pentila.entSavoie.utils.ENTMainUtilsLocalServiceUtil"%>\r
+<liferay-theme:defineObjects />\r
+\r
+<script type="text/javascript">\r
+ //render du jQueryUploaderProgressWindow\r
+ if(jQueryUploaderProgressWindow != null){\r
+ jQueryUploaderProgressWindow.render(Ext.getBody());\r
+ }\r
+</script>\r
+\r
+<%\r
+ String googleCode = "";\r
+ try {\r
+ googleCode = ENTMainUtilsLocalServiceUtil.getENTGoogleAnalyticsCode(themeDisplay.getCompanyId());\r
+ }\r
+ catch(Exception e) {}\r
+ if (!"".equals(googleCode)) {\r
+%>\r
+<script type="text/javascript">\r
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\r
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\r
+\r
+ var _gaq = _gaq || [];\r
+ _gaq.push(['_setAccount', '<%= googleCode %>']);\r
+ _gaq.push(['_trackPageview']);\r
+ //console.info("Google Analytics trackPageView called");\r
+\r
+ // on patch les ajax request pour fair des call sur google analitycs!!\r
+ Ext.Ajax.on("requestcomplete", function(conn, response, options){\r
+\r
+ //_gaq.push(['_trackEvent', 'category', 'action', 'opt_label', opt_value]);\r
+ var cat = options.url;\r
+ try {\r
+ var optIndex = cat.indexOf('?');\r
+ if (optIndex==-1) {\r
+ cat = "ajaxRequest";\r
+ }\r
+ else {\r
+ cat = cat.substring(0, cat.indexOf('?'));\r
+ cat = cat.substring(cat.lastIndexOf('/')+1, cat.lenght);\r
+ }\r
+ \r
+ }\r
+ catch(e) {}\r
+ _gaq.push(['_setAccount', '<%= googleCode %>']);\r
+ _gaq.push(['_trackEvent', cat, 'complete']);\r
+ //console.info("Google Analytics trackEvent called");\r
+\r
+ });\r
+\r
+\r
+\r
+</script>\r
+\r
+<%\r
+ }\r
+%>\r