dojo.require("fox.FeedTree");
- dojo.parser.parse();
-
if (typeof themeBeforeLayout == 'function') {
themeBeforeLayout();
}
+ dojo.parser.parse();
+
dojo.addOnLoad(function() {
updateFeedList();
closeArticlePanel();
loading_set_progress(30);
- if (has_local_storage())
+ // can't use cache_clear() here because viewfeed might not have initialized yet
+ if ('sessionStorage' in window && window['sessionStorage'] !== null)
sessionStorage.clear();
console.log("second stage ok");
displayDlg("printTagCloud");
}
+ if (opid == "qmcTagSelect") {
+ displayDlg("printTagSelect");
+ }
+
if (opid == "qmcSearch") {
search();
return;
Effect.Appear("hotkey_help_overlay", {duration : 0.3});
}
+ if (opid == "qmcAbout") {
+ dialog = new dijit.Dialog({
+ title: __("About..."),
+ style: "width: 400px",
+ href: "backend.php?op=dlg&id=about",
+ });
+
+ dialog.show();
+ }
+
} catch (e) {
exception_error("quickMenuGo", e);
}
return;
}
- var error_flag;
-
if (k == "daemon_is_running" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
return;
var str = __("Mark all articles in %s as read?").replace("%s", fn);
if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
- return viewCurrentFeed('MarkAllRead')
+ return viewCurrentFeed('MarkAllRead');
}
}
var str = __("Mark all articles in %s as read?").replace("%s", title);
if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
- return viewCurrentFeed('MarkAllReadGR:' + id)
+ return viewCurrentFeed('MarkAllReadGR:' + id);
}
} catch (e) {
}
function viewModeChanged() {
- cache_flush();
- return viewCurrentFeed('')
+ return viewCurrentFeed('');
}
function viewLimitChanged() {
- cache_flush();
- return viewCurrentFeed('')
+ return viewCurrentFeed('');
}
/* function adjustArticleScore(id, score) {
if (e.target.nodeName == "INPUT" || e.target.nodeName == "TEXTAREA") return;
- var keycode;
+ var keycode = false;
var shift_key = false;
var cmdline = $('cmdline');
if (keycode == 16) return; // ignore lone shift
if (keycode == 17) return; // ignore lone ctrl
- if ((keycode == 70 || keycode == 67 || keycode == 71)
+ if ((keycode == 70 || keycode == 67 || keycode == 71 || keycode == 65)
&& !hotkey_prefix) {
var date = new Date();
if (!hotkey_prefix) {
+ if (keycode == 27) { // escape
+ closeArticlePanel();
+ return;
+ }
+
+ if (keycode == 69) { // e
+ var id = getActiveArticleId();
+ emailArticle(id);
+ }
+
if ((keycode == 191 || keychar == '?') && shift_key) { // ?
if (!Element.visible("hotkey_help_overlay")) {
- Effect.Appear("hotkey_help_overlay", {duration : 0.3});
+ Effect.Appear("hotkey_help_overlay", {duration : 0.3, to : 0.9});
} else {
Element.hide("hotkey_help_overlay");
}
return false;
}
- if (keycode == 74) { // j
+ if (keycode == 74 && !shift_key) { // j
var rv = dijit.byId("feedTree").getPreviousFeed(
getActiveFeedId(), activeFeedIsCat());
return;
}
-
if (keycode == 85) { // u
- selectionToggleUnread(undefined, false, true)
+ selectionToggleUnread(undefined, false, true);
return;
}
}
}
+ /* Prefix a */
+
+ if (hotkey_prefix == 65) { // a
+ hotkey_prefix = false;
+
+ if (keycode == 65) { // a
+ selectArticles('all');
+ return;
+ }
+
+ if (keycode == 85) { // u
+ selectArticles('unread');
+ return;
+ }
+
+ if (keycode == 73) { // i
+ selectArticles('invert');
+ return;
+ }
+
+ if (keycode == 78) { // n
+ selectArticles('none');
+ return;
+ }
+
+ }
+
/* Prefix f */
if (hotkey_prefix == 70) { // f
return false;
}
- if (keycode == 84 && shift_key) { // T
- toggleTags();
+ if (keycode == 84) { // t
+ displayDlg("printTagCloud");
return false;
}
}
}
}
-function showFeedsWithErrors() {
- displayDlg('feedUpdateErrors');
-}
-
function scheduleFeedUpdate(id, is_cat) {
try {
if (!id) {