}
}
-function feedlist_callback2(transport) {
- try {
- console.log("feedlist_callback2");
- if (!transport_error_check(transport)) return;
- render_feedlist(transport.responseText);
- } catch (e) {
- exception_error("feedlist_callback2", e);
- }
-}
-
function viewNextFeedPage() {
try {
//if (!getActiveFeedId()) return;
var date = new Date();
var timestamp = Math.round(date.getTime() / 1000);
- console.log("<b>" + _infscroll_request_sent + " : " + timestamp + "</b>");
+ console.log(_infscroll_request_sent + " : " + timestamp);
if (_infscroll_request_sent && _infscroll_request_sent + 30 > timestamp) {
console.log("infscroll request in progress, aborting");
function all_counters_callback2(transport, async_call) {
try {
if (async_call) async_counters_work = true;
-
if (offline_mode) return;
- console.log("<b>all_counters_callback2 IN: " + transport + "</b>");
parse_counters_reply(transport);
- console.log("<b>all_counters_callback2 OUT: " + transport + "</b>");
} catch (e) {
exception_error("all_counters_callback2", e, transport);
}
-function focus_element(id) {
- try {
- var e = $(id);
- if (e) e.focus();
- } catch (e) {
- exception_error("focus_element", e);
- }
- return false;
-}
-
function loading_set_progress(p) {
try {
if (p < last_progress_point || !Element.visible("overlay")) return;
- console.log("<b>loading_set_progress : " + p + " (" + last_progress_point + ")</b>");
+ console.log("loading_set_progress : " + p + " (" + last_progress_point + ")");
var o = $("l_progress_i");
$('auxDlg').innerHTML = msg;
- Element.show('auxDlg');
+ new Effect.Appear('auxDlg', {duration : 0.5});
} catch (e) {
exception_error("displayNewContentPrompt", e);
if (params) {
console.log('reading init-params...');
- //var param = params.firstChild;
params = JSON.parse(params.firstChild.nodeValue);
var k = params[i].param;
var v = params[i].value;
- console.log(k + " => " + v);
+ if (getURLParam('debug')) console.log(k + " => " + v);
init_params[k] = v;
if (db) {
}
}
-
$sel_inv_link = "javascript:invertHeadlineSelection()";
- $tog_unread_link = "javascript:selectionToggleUnread(true)";
- $tog_marked_link = "javascript:selectionToggleMarked(true)";
- $tog_published_link = "javascript:selectionTogglePublished(true)";
+ $tog_unread_link = "javascript:selectionToggleUnread()";
+ $tog_marked_link = "javascript:selectionToggleMarked()";
+ $tog_published_link = "javascript:selectionTogglePublished()";
}
return;
}
- if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") {
+ if ($subop == "updateAllFeeds") {
$global_unread_caller = sprintf("%d", $_REQUEST["uctr"]);
$global_unread = getGlobalUnread($link);
sel_none_link = "javascript:cdmSelectArticles('none')";
sel_inv_link = "javascript:invertHeadlineSelection()";
- tog_unread_link = "javascript:selectionToggleUnread(true)";
- tog_marked_link = "javascript:selectionToggleMarked(true)";
+ tog_unread_link = "javascript:selectionToggleUnread()";
+ tog_marked_link = "javascript:selectionToggleMarked()";
}
tmp += __('Select:')+
for (var i = 0; i < search_boxes.length; i++) {
var elem = $(search_boxes[i]);
if (elem) {
- focus_element(search_boxes[i]);
+ $(search_boxes[i]).focus();
return false;
}
}
function getActiveFeedId() {
try {
- console.log("gAFID: " + _active_feed_id);
+ //console.log("gAFID: " + _active_feed_id);
return _active_feed_id;
} catch (e) {
exception_error("getActiveFeedId", e);
function setActiveFeedId(id, is_cat) {
try {
- console.log("sAFID(" + id + ", " + is_cat + ")");
+ //console.log("sAFID(" + id + ", " + is_cat + ")");
_active_feed_id = id;
if (is_cat != undefined) {
closeInfoBox();
}
-function scheduleFeedUpdate(force) {
+function scheduleFeedUpdate() {
console.log("in scheduleFeedUpdate");
- var query_str = "backend.php?op=rpc&subop=";
-
- if (force) {
- query_str = query_str + "forceUpdateAllFeeds";
- } else {
- query_str = query_str + "updateAllFeeds";
- }
+ var query_str = "backend.php?op=rpc&subop=updateAllFeeds";
var omode;
} });
}
-function updateFeedList(silent, fetch) {
-
-// if (silent != true) {
-// notify("Loading feed list...");
-// }
-
- console.log("<b>updateFeedList</b>");
-
- if (offline_mode) return render_offline_feedlist();
-
- var query_str = "backend.php?op=feeds";
-
- if (display_tags) {
- query_str = query_str + "&tags=1";
- }
-
- if (getActiveFeedId() && !activeFeedIsCat()) {
- query_str = query_str + "&actid=" + getActiveFeedId();
- }
+function updateFeedList() {
+ try {
+ console.log("updateFeedList");
- if (fetch) query_str = query_str + "&fetch=yes";
-
-// var feeds_frame = $("feeds-frame");
-// feeds_frame.src = query_str;
-
- console.log("updateFeedList Q=" + query_str);
-
- new Ajax.Request("backend.php", {
- parameters: query_str,
- onComplete: function(transport) {
- feedlist_callback2(transport);
- } });
+ if (offline_mode) return render_offline_feedlist();
+
+ var query_str = "backend.php?op=feeds";
+
+ if (display_tags) {
+ query_str = query_str + "&tags=1";
+ }
+
+ if (getActiveFeedId() && !activeFeedIsCat()) {
+ query_str = query_str + "&actid=" + getActiveFeedId();
+ }
+
+ new Ajax.Request("backend.php", {
+ parameters: query_str,
+ onComplete: function(transport) {
+ render_feedlist(transport.responseText);
+ } });
+ } catch (e) {
+ exception_error("updateFeedList", e);
+ }
}
function catchupAllFeeds() {
}
}
-function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) {
+function selectionToggleUnread(set_state, callback_func, no_error) {
try {
var rows;
- if (cdm_mode) {
+ if (isCdmMode()) {
rows = cdmGetSelectedArticles();
} else {
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
}
}
-function selectionToggleMarked(cdm_mode) {
+function selectionToggleMarked() {
try {
var rows;
- if (cdm_mode) {
+ if (isCdmMode()) {
rows = cdmGetSelectedArticles();
} else {
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
}
}
-function selectionTogglePublished(cdm_mode) {
+function selectionTogglePublished() {
try {
var rows;
- if (cdm_mode) {
+ if (isCdmMode()) {
rows = cdmGetSelectedArticles();
} else {
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
if ($("headlinesList")) {
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true);
- selectionToggleUnread(false, false, 'viewCurrentFeed()', true);
+ selectionToggleUnread(false, 'viewCurrentFeed()', true);
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
} else {
cdmSelectArticles('all');
- selectionToggleUnread(true, false, 'viewCurrentFeed()', true)
+ selectionToggleUnread(false, 'viewCurrentFeed()', true)
cdmSelectArticles('none');
}
}
}
if ($("headlinesList")) {
- selectionToggleUnread(false, false, 'viewCurrentFeed()', true);
+ selectionToggleUnread(false, 'viewCurrentFeed()', true);
} else {
- selectionToggleUnread(true, false, 'viewCurrentFeed()', true)
+ selectionToggleUnread(false, 'viewCurrentFeed()', true)
}
} catch (e) {