Add Google Analitycs to the footer.

This commit is contained in:
Paulo Gustavo Veiga
2012-07-03 00:04:44 -03:00
parent cd178109f3
commit 61d0fcbdf6
12 changed files with 112 additions and 20 deletions

View File

@@ -68,12 +68,12 @@ mail.errorReporterEmail=
registration.email.enabled = false
# Enable captcha confirmation
registration.recaptcha.enabled = true
google.recaptcha.enabled = true
# ReCaptcha is the default captcha. Public and private keys are required.
# More Info: http://www.google.com/recaptcha .
registration.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
registration.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
##################################################################################
# Site configuration
@@ -85,3 +85,9 @@ admin.user = admin@wisemapping.org
# Site URL. This url will be used during sharing emails and public views.
site.baseurl = http://localhost:8080
##################################################################################
# Google Analytics Settings
##################################################################################
google.analytics.enabled=true
google.analytics.account=UA-XXXX

View File

@@ -203,4 +203,5 @@ CHANGE_TEXT_ITALIC=Change Text Italic
DESELECT_ALL_TOPIC=Deselect All Topic
SHORTCUTS=Shortcuts
COLLAPSE_CHILDREN=Collapse Children
KEYBOARD_SHORTCUTS_MSG=Keyboard shortcuts can help you save time by allowing you to never take your hands off the keyboard to use the mouse.

View File

@@ -204,4 +204,5 @@ CHANGE_TEXT_ITALIC=Cambiar Texto a Italica
DESELECT_ALL_TOPIC=Revertir Selecci\u00f3n de T\u00f3picos
SHORTCUTS=Shortcuts
COLLAPSE_CHILDREN=Colapsar Hijos
KEYBOARD_SHORTCUTS_MSG=Los accesos directos pueden ayudarte a salvar tiempo permitiendote no sacar las manos del teclado para usar el mouse.

View File

@@ -15,6 +15,11 @@
<context:annotation-config/>
<mvc:annotation-driven/>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/app.properties"/>
</bean>
<!-- Interceptors Registration -->
<mvc:interceptors>
<bean id="browserSupportInterceptor" class="com.wisemapping.filter.BrowserSupportInterceptor">
@@ -37,11 +42,16 @@
</bean>
<bean id="userLocaleInterceptor" class="com.wisemapping.filter.UserLocaleInterceptor">
</bean>
<bean id="requestInterceptor" class="com.wisemapping.filter.RequestPropertiesInterceptor">
<property name="attributes">
<map>
<entry key="google.analytics.enabled" value="${google.analytics.enabled}"/>
<entry key="google.analytics.account" value="${google.analytics.account}"/>
</map>
</property>
</bean>
</mvc:interceptors>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/app.properties"/>
</bean>
<bean id="exceptionHandlerResolver"
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
@@ -73,8 +83,8 @@
class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>
<bean id="reCaptcha" class="net.tanesha.recaptcha.ReCaptchaImpl">
<property name="privateKey" value="${registration.recaptcha.privateKey}"/>
<property name="publicKey" value="${registration.recaptcha.publicKey}"/>
<property name="privateKey" value="${google.recaptcha.privateKey}"/>
<property name="publicKey" value="${google.recaptcha.publicKey}"/>
<property name="includeNoscript" value="false"/>
</bean>
@@ -84,7 +94,7 @@
<property name="maxUploadSize" value="522240"/>
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" >
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>messages</value>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,4 +1,6 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="footer">
<div style="width:30%; float:left;">&nbsp;</div>
<div style="float:left; width:40%;">
@@ -19,5 +21,24 @@
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-graphics.png" width="66" height="32"
alt="HTML5 Powered with Graphics, 3D &amp; Effects"
title="HTML5 Powered with Graphics, 3D &amp; Effects">
</a></div>
</a>
</div>
<c:if test="${requestScope['google.analytics.enabled']}">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '${requestScope['google.analytics.account']}']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</c:if>
</div>

View File

@@ -2,24 +2,27 @@
<%@ include file="/jsp/init.jsp" %>
<!DOCTYPE HTML>
<p><spring:message code="KEYBOARD_SHORTCUTS_MSG"/></p>
<style type="text/css">
#keyboardTable {
font-family: Arial,verdana,serif;
font-family: Arial, verdana, serif;
font-size: 13px;
}
#keyboardTable td {
padding: 3px;
white-space:nowrap;
white-space: nowrap;
}
#keyboardTable th {
padding: 5px;
white-space:nowrap;
white-space: nowrap;
}
#keyboardTable th {
background-color: #000000;
color:#ffffff;
color: #ffffff;
}
</style>