src/cm/templates/site/macros/timezone.html
author rbernard
Fri, 12 Feb 2010 21:58:53 +0100
changeset 172 9a355903350d
parent 0 40c8f766c9b8
permissions -rw-r--r--
renaming variables
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
<script type="text/javascript">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
<!--
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
{% if tz_installed %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
    {% if tz %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
        var tz = '{{ tz }}';
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
    {% else %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     7
        $(function() {
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
            var d = new Date();
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
            var tz = -d.getTimezoneOffset()/60;
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    10
            /*tz = 'America/Chicago';*/
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
            $.post("{% url timezone_set %}", { tz: tz }, function(data){
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    12
                window.location = window.location;
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    13
            });
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14
        })
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    15
    {% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    16
{% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    17
-->
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    18
</script>