diff --git a/extensions/webmail/templates/index.html b/extensions/webmail/templates/index.html index ef364a67d..0025340b6 100644 --- a/extensions/webmail/templates/index.html +++ b/extensions/webmail/templates/index.html @@ -288,7 +288,8 @@ ul.visible { "text-align" : "center", "height" : "25px", "border" : "1px solid #333", - "background" : "white"}) + "background" : "white", + "z-index" : 3}) .setStyles(item.getPosition()) .inject(document.body); block.set("html", "Moving " + selectedRows.length + " messages"); diff --git a/lib/__init__.py b/lib/__init__.py index a7eff6145..1db957d45 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -8,10 +8,10 @@ from django.template.loader import render_to_string from django.utils.translation import ugettext as _ from mailng.lib import parameters -def exec_cmd(cmd): +def exec_cmd(cmd, **kwargs): import subprocess - p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, **kwargs) output = p.communicate()[0] return p.returncode, output diff --git a/lib/templatetags/libextras.py b/lib/templatetags/libextras.py index 692c15423..4e76f0dc2 100644 --- a/lib/templatetags/libextras.py +++ b/lib/templatetags/libextras.py @@ -1,4 +1,5 @@ import os +from django.conf import settings from django import template from mailng.lib import exec_cmd @@ -6,13 +7,13 @@ register = template.Library() @register.simple_tag def get_version(): - if os.path.isdir(".hg"): + if os.path.isdir("%s/.hg" % settings.MAILNG_DIR): version = "dev-" - code, output = exec_cmd("hg id -i") + code, output = exec_cmd("hg id -i", cwd=settings.MAILNG_DIR) version += output.rstrip() return version - elif os.path.exists("VERSION"): - code, output = exec_cmd("cat VERSION") + elif os.path.exists("%s/VERSION" % settings.MAILNG_DIR): + code, output = exec_cmd("cat %s/VERSION" % settings.MAILNG_DIR) return output.rstrip() else: return "Unknown"