Merge pull request #233 from lotrfan/dismiss
Remove content when dismissing
This commit is contained in:
commit
1ed69dc5f5
|
@ -1611,6 +1611,12 @@ function dismissArticle(id) {
|
|||
|
||||
new Effect.Fade(elem, {duration : 0.5});
|
||||
|
||||
// Remove the content, too
|
||||
var elem_content = $("CICD-" + id);
|
||||
if (elem_content) {
|
||||
Element.remove(elem_content);
|
||||
}
|
||||
|
||||
if (id == getActiveArticleId()) {
|
||||
setActiveArticleId(0);
|
||||
}
|
||||
|
@ -1634,6 +1640,12 @@ function dismissSelectedArticles() {
|
|||
ids[i] != getActiveArticleId()) {
|
||||
new Effect.Fade(elem, {duration : 0.5});
|
||||
sel.push(ids[i]);
|
||||
|
||||
// Remove the content, too
|
||||
var elem_content = $("CICD-" + ids[i]);
|
||||
if (elem_content) {
|
||||
Element.remove(elem_content);
|
||||
}
|
||||
} else {
|
||||
tmp.push(ids[i]);
|
||||
}
|
||||
|
@ -1661,13 +1673,19 @@ function dismissReadArticles() {
|
|||
!elem.hasClassName("Selected")) {
|
||||
|
||||
new Effect.Fade(elem, {duration : 0.5});
|
||||
|
||||
// Remove the content, too
|
||||
var elem_content = $("CICD-" + ids[i]);
|
||||
if (elem_content) {
|
||||
Element.remove(elem_content);
|
||||
}
|
||||
} else {
|
||||
tmp.push(ids[i]);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
exception_error("dismissSelectedArticles", e);
|
||||
exception_error("dismissReadArticles", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue