summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-24 08:30:52 +0000
committerthomascube <thomas@roundcube.net>2012-01-24 08:30:52 +0000
commit32afefb851dd3a93c1497a8e63ec3460430a4357 (patch)
treeb7b09895d38d544cf343cf14355fbed299576897
parent5ff7ba44ecb57fc3af6ded2094eb128a724f9cb4 (diff)
Fix thread expand/collapse callbacks which set css classes
-rw-r--r--program/js/app.js2
-rw-r--r--program/js/list.js16
2 files changed, 9 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index cdc3aa07f..53a746265 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1623,6 +1623,7 @@ function rcube_webmail()
{
if (this.env.messages[row.uid])
this.env.messages[row.uid].expanded = row.expanded;
+ $(row.obj)[row.expanded?'addClass':'removeClass']('expanded');
};
this.msglist_set_coltypes = function(list)
@@ -2146,7 +2147,6 @@ function rcube_webmail()
this.set_unread_children(uid);
row.expanded = !row.expanded;
- $(row.obj)[row.expanded?'removeClass':'addClass']('expanded');
this.message_list.expand_row(e, uid);
};
diff --git a/program/js/list.js b/program/js/list.js
index 546fd6051..c21ba713f 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -419,7 +419,7 @@ expand_row: function(e, id)
collapse: function(row)
{
row.expanded = false;
- this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded });
+ this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
var depth = row.depth;
var new_row = row ? row.obj.nextSibling : null;
var r;
@@ -432,7 +432,7 @@ collapse: function(row)
$(new_row).css('display', 'none');
if (r.expanded) {
r.expanded = false;
- this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
+ this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded, obj:new_row });
}
}
new_row = new_row.nextSibling;
@@ -450,7 +450,7 @@ expand: function(row)
depth = row.depth;
new_row = row.obj.nextSibling;
this.update_expando(row.uid, true);
- this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded });
+ this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
}
else {
var tbody = this.list.tBodies[0];
@@ -473,7 +473,7 @@ expand: function(row)
last_expanded_parent_depth = p.depth;
$(new_row).css('display', '');
r.expanded = true;
- this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
+ this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded, obj:new_row });
}
}
else
@@ -498,7 +498,7 @@ collapse_all: function(row)
depth = row.depth;
new_row = row.obj.nextSibling;
this.update_expando(row.uid);
- this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded });
+ this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
// don't collapse sub-root tree in multiexpand mode
if (depth && this.multiexpand)
@@ -520,7 +520,7 @@ collapse_all: function(row)
if (r.has_children && r.expanded) {
r.expanded = false;
this.update_expando(r.uid, false);
- this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
+ this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded, obj:new_row });
}
}
}
@@ -539,7 +539,7 @@ expand_all: function(row)
depth = row.depth;
new_row = row.obj.nextSibling;
this.update_expando(row.uid, true);
- this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded });
+ this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
}
else {
new_row = this.list.tBodies[0].firstChild;
@@ -556,7 +556,7 @@ expand_all: function(row)
if (r.has_children && !r.expanded) {
r.expanded = true;
this.update_expando(r.uid, true);
- this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded });
+ this.triggerEvent('expandcollapse', { uid:r.uid, expanded:r.expanded, obj:new_row });
}
}
}