$sel_all_link = "javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, '', true)";
$sel_unread_link = "javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true)";
$sel_none_link = "javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false)";
+ $sel_inv_link = "javascript:invertHeadlineSelection()";
$tog_unread_link = "javascript:selectionToggleUnread()";
$tog_marked_link = "javascript:selectionToggleMarked()";
$sel_unread_link = "javascript:cdmSelectArticles('unread')";
$sel_none_link = "javascript:cdmSelectArticles('none')";
+ $sel_inv_link = "javascript:invertHeadlineSelection()";
+
$tog_unread_link = "javascript:selectionToggleUnread(true)";
$tog_marked_link = "javascript:selectionToggleMarked(true)";
$tog_published_link = "javascript:selectionTogglePublished(true)";
".__('Select:')."
<a href=\"$sel_all_link\">".__('All')."</a>,
<a href=\"$sel_unread_link\">".__('Unread')."</a>,
+ <a href=\"$sel_inv_link\">".__('Invert')."</a>,
<a href=\"$sel_none_link\">".__('None')."</a></li>
<li class=\"vsep\"> </li>
<li class=\"top\">".__('Actions...')."<ul>
}
}
+function invertHeadlineSelection() {
+ try {
+ var rows = new Array();
+ var r = false;
+
+ if (!isCdmMode()) {
+ r = document.getElementsByTagName("TR");
+ } else {
+ r = document.getElementsByTagName("DIV");
+ }
+
+ for (var i = 0; i < r.length; i++) {
+ if (r[i].id && r[i].id.match("RROW-")) {
+ rows.push(r[i]);
+ }
+ }
+
+ for (var i = 0; i < rows.length; i++) {
+ var nc = rows[i].className;
+ var id = rows[i].id.replace("RROW-", "");
+ var cb = document.getElementById("RCHK-" + id);
+
+ if (!rows[i].className.match("Selected")) {
+ nc = nc + "Selected";
+ cb.checked = true;
+ } else {
+ nc = nc.replace("Selected", "");
+ cb.checked = false;
+ }
+
+ rows[i].className = nc;
+
+ }
+
+ } catch (e) {
+ exception_error("invertHeadlineSelection", e);
+ }
+}
+
function getArticleUnderPointer() {
return post_under_pointer;
}