Few fixes.

This commit is contained in:
Antoine Nguyen
2013-12-11 11:48:44 +01:00
parent 7c3496bdbf
commit 5f4a5eeee5
4 changed files with 7 additions and 17 deletions
+3 -1
View File
@@ -629,8 +629,10 @@ template but need javascript stuff.
*Callback prototype*::
def callback(user): pass
def callback(caller, user): pass
* ``caller`` is name of the application (or the location) responsible
for the call
* ``user`` is a ``User`` instance corresponding to the currently
logged in user
-11
View File
@@ -6,8 +6,6 @@
Modoboa's documentation!
========================
This documentation refers to version |release|.
***************
Getting started
***************
@@ -49,12 +47,3 @@ Additional resource
additional/migrating
additional/virtualmachine
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@@ -726,9 +726,8 @@ Webmail.prototype = {
$("body").notify("success", gettext("Message sent"), 2000);
}, this)).fail($.proxy(function(jqxhr) {
var data = $.parseJSON(jqxhr.responseText);
this.navobject.get_callback("compose")(data);
if (data.respmsg != undefined) {
$("body").notify("error", data.respmsg);
if (data != undefined) {
$("body").notify("error", data);
}
$("a[name=sendmail]").attr("disabled", null);
}, this));
+2 -2
View File
@@ -139,7 +139,7 @@ def raiseEvent(event, *args, **kwargs):
:param event: the event to raise
"""
if not event in events or not event in callbacks.keys():
if not event in events or not event in callbacks:
return 0
for callback in callbacks[event].values():
callback(*args, **kwargs)
@@ -155,7 +155,7 @@ def raiseQueryEvent(event, *args, **kwargs):
:param event: the event to raise
"""
result = []
if not event in events or not event in callbacks.keys():
if not event in events or not event in callbacks:
return result
for callback in callbacks[event].values():
tmp = callback(*args, **kwargs)