try {
- var rows = getVisibleArticleIds();
+ var rows = getLoadedArticleIds();
var prev_id = false;
var next_id = false;
}
}
-function toggleUnread_afh(effect) {
- try {
-
- var elem = effect.element;
- elem.style.backgroundColor = "";
-
- } catch (e) {
- exception_error("toggleUnread_afh", e);
- }
-}
-
function toggleUnread(id, cmode, effect) {
try {
return;
}
- var visible_ids = getVisibleArticleIds();
+ var visible_ids = getLoadedArticleIds();
var ids_to_mark = new Array();
}
}
-function dismissArticle(id) {
+function dismissArticles(ids) {
try {
- var elem = $("RROW-" + id);
- if (!elem) return;
+ console.log("dismissArticles: " + ids);
- toggleUnread(id, 0, true);
+ for (var i = 0; i < ids.length; i++) {
+ var elem = $("RROW-" + ids[i]);
- new Effect.Fade(elem, {duration : 0.5});
+ new Effect.Fade(elem, {
+ duration: 0.5, afterFinish: function (obj) {
+ Element.remove(obj.element);
+ }
+ });
- // Remove the content, too
- var elem_content = $("CICD-" + id);
- if (elem_content) {
- Element.remove(elem_content);
+ if (ids[i] == getActiveArticleId()) {
+ setActiveArticleId(0);
+ }
}
- if (id == getActiveArticleId()) {
- setActiveArticleId(0);
- }
+ selectionToggleUnread(false, false, false, ids);
+
+ } catch (e) {
+ exception_error("dismissArticles", e);
+ }
+
+}
+function dismissArticle(id) {
+ try {
+ dismissArticles([id]);
} catch (e) {
exception_error("dismissArticle", e);
}
function dismissSelectedArticles() {
try {
-
- var ids = getVisibleArticleIds();
- var tmp = [];
- var sel = [];
-
- for (var i = 0; i < ids.length; i++) {
- var elem = $("RROW-" + ids[i]);
-
- if (elem.className && elem.hasClassName("Selected") &&
- 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]);
- }
- }
-
- if (sel.length > 0)
- selectionToggleUnread(false);
-
-
+ dismissArticles(getSelectedArticleIds2());
} catch (e) {
exception_error("dismissSelectedArticles", e);
}
function dismissReadArticles() {
try {
-
- var ids = getVisibleArticleIds();
+ var ids = getLoadedArticleIds();
var tmp = [];
- for (var i = 0; i < ids.length; i++) {
- var elem = $("RROW-" + ids[i]);
-
- if (elem.className && !elem.hasClassName("Unread") &&
- !elem.hasClassName("Selected")) {
-
- new Effect.Fade(elem, {duration : 0.5});
+ ids.each(function(id) {
+ var elem = $("RROW-" + id);
- // Remove the content, too
- var elem_content = $("CICD-" + ids[i]);
- if (elem_content) {
- Element.remove(elem_content);
- }
- } else {
- tmp.push(ids[i]);
+ if (elem && !elem.hasClassName("Unread")) {
+ tmp.push(id);
}
- }
- } catch (e) {
- exception_error("dismissReadArticles", e);
- }
-}
-
-// we don't really hide rows anymore
-function getVisibleArticleIds() {
- return getLoadedArticleIds();
-
- /*var ids = [];
-
- try {
+ });
- getLoadedArticleIds().each(function(id) {
- var elem = $("RROW-" + id);
- if (elem && Element.visible(elem))
- ids.push(id);
- });
+ dismissArticles(tmp);
} catch (e) {
- exception_error("getVisibleArticleIds", e);
+ exception_error("dismissReadArticles", e);
}
-
- return ids; */
}
function cdmClicked(event, id) {
}
}
-function getFirstVisibleHeadlineId() {
- var rows = getVisibleArticleIds();
- return rows[0];
-
-}
-
-function getLastVisibleHeadlineId() {
- var rows = getVisibleArticleIds();
- return rows[rows.length-1];
-}
-
function openArticleInNewWindow(id) {
toggleUnread(id, 0, false);
window.open("backend.php?op=article&method=redirect&id=" + id);
if (!limit) limit = 6; //3
- var ids = getVisibleArticleIds();
+ var ids = getLoadedArticleIds();
for (var i = 0; i < ids.length; i++) {
if (ids[i] == id) {