source: ether_statistics/web/project/statistics-script.jsp @ 587

Last change on this file since 587 was 587, checked in by vmipsl, 12 years ago

interface _ cloud

File size: 2.9 KB
Line 
1<%@ page import="com.ether.WebHelper" %>
2<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
3
4<script type="text/javascript">
5
6    var InterfaceStatistics = Class.create( {
7        initialize: function()
8        {
9            /** *********** CONTAINERS *********** **/
10            this.containerTitle = $( "#title" );
11            this.containerLanguage = $( "#language" );
12            this.containerTabs = $( "#tab" );
13            this.containerLogin = $( "#login" );
14
15            /** *********** VARIABLES *********** **/
16            this.language = '<spring:message code="language"/>';
17            this.webmaster = "<%=WebHelper.getProperty(request, "mail.webmaster")%>";
18
19            $( ".containerToDrag" ).draggable();
20            this.bindButtons();
21        },
22
23
24        // CREATES AND BINDS ********************************************************
25        bindButtons: function()
26        {
27            $( "#home_button" ).bind( "dblclick", this.onClickHome );
28            $( "#language_button" ).bind( "dblclick", jQuery.proxy( this.onClickLanguage, this ) );
29            $( "#mail_button" ).bind( "dblclick", this.onClickMail );
30            $( "#login_button" ).bind( "dblclick", jQuery.proxy( this.onClickLogin, this ) );
31        },
32
33        // REQUESTS ********************************************************
34        requestChangeLocale: function()
35        {
36            $.ajax( {
37                url: "project?methodName=setLocale&language=<spring:message code="label.language.value.to.switch"/>",
38                success:function()
39                {
40                    location.reload();
41                }
42            } );
43        },
44
45        // HANDLES ******************************************************** = retours ajax
46        handleCreateXML: function( result )
47        {
48            this.loadingRequest.hide();
49            //this.loadingRequest.display();
50
51            var res = jQuery.parseJSON( result ).result;
52            alert( res );
53        },
54
55
56        // EVENTS ********************************************************
57        onClickHome: function()
58        {
59            location.reload();
60        },
61
62        onClickLanguage: function()
63        {
64            this.requestChangeLocale();
65        },
66
67        onClickMail: function()
68        {
69            document.location.href = "mailto:" + this.webmaster + "?subject=[STATISTICS]";
70        },
71
72        onClickLogin: function()
73        {
74            $( "#login_bg" ).animate( {
75                opacity: 0.45,
76                height:'500px',
77                width:'500px'
78            }, 5000, function()
79            {
80                $( "#login_text" ).css( "visibility", "visible" );
81            } );
82
83            $( "#login_button" ).animate( {
84                top:'71px',
85                left: '160px'
86            }, 5000, function()
87            {
88            } );
89        }
90
91        // OTHERS ********************************************************
92
93    } );
94
95</script>
Note: See TracBrowser for help on using the repository browser.