diff --git a/extensions/webmail/static/css/webmail.css b/extensions/webmail/static/css/webmail.css index f2700f672..8ca29d45f 100644 --- a/extensions/webmail/static/css/webmail.css +++ b/extensions/webmail/static/css/webmail.css @@ -74,6 +74,7 @@ tr.selected { background: transparent; color: black; text-decoration: none; + margin-left: 5px; } .box a:hover { @@ -83,7 +84,6 @@ tr.selected { .box img { float: left; - margin-right: 2px; border: 0; } @@ -104,6 +104,7 @@ li.subfolders { } th { + cursor: pointer; /*-moz-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset; -webkit-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset;*/ } @@ -165,11 +166,11 @@ textarea:hover { width: 98%; } -input { +#mailheader input { width: 80%; padding: 0; } #mailheader { padding-bottom: 5px; -} \ No newline at end of file +} diff --git a/extensions/webmail/templates/compose.html b/extensions/webmail/templates/compose.html index d6572f28e..76cb4dbc9 100644 --- a/extensions/webmail/templates/compose.html +++ b/extensions/webmail/templates/compose.html @@ -13,3 +13,4 @@ {% endif %} + diff --git a/extensions/webmail/templates/index.html b/extensions/webmail/templates/index.html index 4373ee16f..a9fb1165f 100644 --- a/extensions/webmail/templates/index.html +++ b/extensions/webmail/templates/index.html @@ -84,7 +84,7 @@ loadCompose = function(event) { event.stop(); - current_anchor.baseurl("compose/").update(); + current_anchor.baseurl("compose").update(); } register_callback("compose", compose_callback); @@ -106,10 +106,16 @@ loadFolder = function(event, obj) { if (!$defined(obj)) { - obj = event.target; + obj = $(event.target); } event.stop(); - current_anchor.parse_string(obj.get("href"), true).setparams(navparams); + // the following code prevents a bug under IE7 + // because fullpath is returned instead of a relative one. + // (even if mootools uses getAttribute("href", 2), this is not working with AJAX requests) + var url = obj.get("href"); + var baseurl = "http://" + location.host + location.pathname; + url = url.replace(baseurl, ""); + current_anchor.parse_string(url, true).setparams(navparams); current_anchor.update(); } register_callback("folder", function(resp) { diff --git a/extensions/webmail/views.py b/extensions/webmail/views.py index 62a973924..411b2ff1b 100644 --- a/extensions/webmail/views.py +++ b/extensions/webmail/views.py @@ -8,6 +8,7 @@ from django.utils import simplejson from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required +from django.views.decorators.cache import cache_control, never_cache from mailng.admin.models import Mailbox from mailng.lib import parameters, _render, _render_error, getctx, is_not_localadmin from mailng.lib.email_listing import parse_search_parameters @@ -24,6 +25,7 @@ def __get_current_url(request): @login_required @is_not_localadmin() +@cache_control(must_revalidate=True, private=True, no_cache=True) def folder(request, name, updatenav=True): if not name: name = "INBOX" @@ -66,6 +68,7 @@ def folder(request, name, updatenav=True): @login_required @is_not_localadmin() +@cache_control(must_revalidate=True, private=True, no_cache=True) def index(request): #try: navp = request.session.has_key("navparams") \ @@ -251,6 +254,8 @@ def send_mail(request, withctx=False, origmsg=None, posturl=None): @login_required @is_not_localadmin() +#@cache_control(no_cache=True, expires=-1) +@never_cache def compose(request): if request.method == "POST": return send_mail(request, posturl=reverse(compose)) diff --git a/static/css/default.css b/static/css/default.css index 0226555c4..39943f331 100644 --- a/static/css/default.css +++ b/static/css/default.css @@ -145,8 +145,8 @@ div#footer { margin: 0; padding: 0; list-style: none; - width: 100%; color: #2a4069; + float: left; } .menubar li { @@ -365,4 +365,4 @@ div.row label { float: left; display: inline; color: red; -} \ No newline at end of file +} diff --git a/static/js/common.js b/static/js/common.js index 247101b20..69ab1e599 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -77,9 +77,13 @@ function HashWrapper(deflocation) { this.reset(); } this.base = (splits[0] == "") ? this.deflocation : splits[0]; - if (this.base[this.base.length - 1] != '/') { + /*if (this.base[this.base.length - 1] != '/') { this.base += '/'; - } + }*/ + var re = new RegExp("/$"); + if (!this.base.match(re)) { + this.base += '/'; + } if (splits.length > 1) { params = splits[1].split('&'); for (var i = 0; i < params.length; i++) { @@ -106,7 +110,7 @@ function HashWrapper(deflocation) { }; this.update = function(force) { - location.hash = this.serialize(); + window.location.hash = this.serialize(); if ($defined(force)) { this.force = force; } @@ -147,9 +151,10 @@ function HashWrapper(deflocation) { this.baseurl = function(value) { this.reset(); this.base = value; - if (this.base[this.base.length - 1] != '/') { - this.base += '/'; - } + var re = new RegExp("/$"); + if (!this.base.match(re)) { + this.base += '/'; + } return this; }; diff --git a/templates/common/email_listing.html b/templates/common/email_listing.html index e0a179f35..d5c637ddd 100644 --- a/templates/common/email_listing.html +++ b/templates/common/email_listing.html @@ -39,7 +39,7 @@ window.addEvent("domready", function() { viewmail = function(event) { event.stop(); if (event.target.parentNode.id) { - var url = event.target.parentNode.id + "/"; + var url = event.target.parentNode.id; event.target.parentNode.setStyle("background", "#ffffcc"); {% if reset_wm_url %} current_anchor.baseurl(url).update();