src/cm/templates/site/macros/timezone.html
author gibus
Thu, 08 Sep 2011 15:15:23 +0200
changeset 375 d6439b3eb2de
parent 0 40c8f766c9b8
permissions -rw-r--r--
replace 'add comment' button
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>