From: Andrew Dolgov Date: Sat, 10 Dec 2011 17:26:59 +0000 (+0400) Subject: misc typo fixes X-Git-Tag: 1.5.8~42 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e331188f761669785024bc0f76debb904a1b6210;p=tt-rss.git misc typo fixes --- diff --git a/FeedTree.js b/FeedTree.js index f40dd9c6..b5b75716 100644 --- a/FeedTree.js +++ b/FeedTree.js @@ -67,14 +67,14 @@ dojo.declare("fox.FeedStoreModel", dijit.tree.ForestStoreModel, { for (var i = 0; i < items.length; i++) { if (items[i] == treeItem) { - for (j = i+1; j < items.length; j++) { + for (var j = i+1; j < items.length; j++) { var unread = this.store.getValue(items[j], 'unread'); var id = this.store.getValue(items[j], 'id'); if (unread > 0 && (is_cat || id.match("FEED:"))) return items[j]; } - for (j = 0; j < i; j++) { + for (var j = 0; j < i; j++) { var unread = this.store.getValue(items[j], 'unread'); var id = this.store.getValue(items[j], 'id'); @@ -365,7 +365,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, { for (var i = 0; i < items.length; i++) { if (items[i] == treeItem) { - for (j = i+1; j < items.length; j++) { + for (var j = i+1; j < items.length; j++) { var id = String(items[j].id); var box = this._itemNodesMap[id]; @@ -403,7 +403,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, { for (var i = 0; i < items.length; i++) { if (items[i] == treeItem) { - for (j = i-1; j > 0; j--) { + for (var j = i-1; j > 0; j--) { var id = String(items[j].id); var box = this._itemNodesMap[id]; diff --git a/PrefFeedTree.js b/PrefFeedTree.js index db59b508..4ea48660 100644 --- a/PrefFeedTree.js +++ b/PrefFeedTree.js @@ -52,7 +52,7 @@ dojo.declare("fox.PrefFeedTree", lib.CheckBoxTree, { var item = dijit.getEnclosingWidget(target).item; // disable copying items - source.copyState = function() { return false; } + source.copyState = function() { return false; }; var source_item = false; @@ -62,9 +62,6 @@ dojo.declare("fox.PrefFeedTree", lib.CheckBoxTree, { if (!source_item || !item) return false; - var id = String(item.id); - var source_id = String(source_item.id); - var id = this.tree.model.store.getValue(item, 'id'); var source_id = source.tree.model.store.getValue(source_item, 'id'); diff --git a/digest.js b/digest.js index ee76c735..7dba6d36 100644 --- a/digest.js +++ b/digest.js @@ -321,8 +321,10 @@ function viewfeed(feed_id, offset, replace, no_effects, no_indicator, callback) console.log(query); + var img = false; + if ($("F-" + feed_id)) { - var img = $("F-" + feed_id).getElementsByTagName("IMG")[0]; + img = $("F-" + feed_id).getElementsByTagName("IMG")[0]; if (img && !no_indicator) { img.setAttribute("orig_src", img.src); @@ -545,7 +547,7 @@ function parse_feeds(transport) { feeds.sort( function (a,b) { if (b.unread != a.unread) - return (b.unread - a.unread) + return (b.unread - a.unread); else if (a.title > b.title) return 1; diff --git a/feedlist.js b/feedlist.js index 4f1a56c2..c117b66e 100644 --- a/feedlist.js +++ b/feedlist.js @@ -104,8 +104,6 @@ function viewfeed(feed, subop, is_cat, offset, background, infscrol_req) { dijit.byId("content-tabs").selectChild( dijit.byId("content-tabs").getChildren()[0]); - var force_nocache = false; - if (!background) { if (getActiveFeedId() != feed || offset == 0) { active_post_id = 0; @@ -312,18 +310,14 @@ function displayNewContentPrompt(id) { function parse_counters(elems, scheduled_call) { try { - - var feeds_found = 0; - for (var l = 0; l < elems.length; l++) { - var id = elems[l].id + var id = elems[l].id; var kind = elems[l].kind; - var ctr = parseInt(elems[l].counter) + var ctr = parseInt(elems[l].counter); var error = elems[l].error; var has_img = elems[l].has_img; var updated = elems[l].updated; - var title = elems[l].title; if (id == "global-unread") { global_unread = ctr; @@ -336,8 +330,6 @@ function parse_counters(elems, scheduled_call) { continue; } - var treeItem; - // TODO: enable new content notification for categories if (!activeFeedIsCat() && id == getActiveFeedId() diff --git a/functions.js b/functions.js index c47070ed..926e155c 100644 --- a/functions.js +++ b/functions.js @@ -8,7 +8,7 @@ Array.prototype.remove = function(s) { for (var i=0; i < this.length; i++) { if (s == this[i]) this.splice(i, 1); } -} +}; /* create console.log if it doesn't exist */ @@ -302,7 +302,7 @@ function gotoExportOpml(filename, settings) { if(x.length>1) { // remove negative sign x=Math.abs(x)+""; - for(j=0;j -
+
diff --git a/prefs.js b/prefs.js index dc06ef35..5a75060d 100644 --- a/prefs.js +++ b/prefs.js @@ -250,7 +250,7 @@ function editFilter(id) { onComplete: function(transport) { dialog.hide(); updateFilterList(); - }}) + }}); } } }}); @@ -701,7 +701,7 @@ function editSelectedFeeds() { title: __("Edit Multiple Feeds"), style: "width: 600px", getChildByName: function (name) { - var rv = null + var rv = null; this.getChildren().each( function(child) { if (child.name == name) { @@ -773,7 +773,7 @@ function editSelectedFeeds() { onComplete: function(transport) { dialog.hide(); updateFeedList(); - }}) + }}); } }, content: transport.responseText}); @@ -985,7 +985,7 @@ function pref_hotkey_handler(e) { try { if (e.target.nodeName == "INPUT") return; - var keycode; + var keycode = false; var shift_key = false; var cmdline = $('cmdline'); @@ -1724,7 +1724,6 @@ function editLabel(id, event) { }, execute: function() { if (this.validate()) { - var caption = this.attr('value').id; var caption = this.attr('value').caption; var fg_color = this.attr('value').fg_color; var bg_color = this.attr('value').bg_color; diff --git a/prefs.php b/prefs.php index 794ebb7b..98e4a2fd 100644 --- a/prefs.php +++ b/prefs.php @@ -56,11 +56,11 @@ + +
 
- -
diff --git a/register.php b/register.php index 9fd75ffc..43e6b912 100644 --- a/register.php +++ b/register.php @@ -218,10 +218,10 @@ - + - + Update daemon is not running.", true); return; @@ -521,7 +519,7 @@ function catchupCurrentFeed() { 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'); } } @@ -534,7 +532,7 @@ function catchupFeedInGroup(id) { 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) { @@ -566,11 +564,11 @@ function collapse_feedlist() { } function viewModeChanged() { - return viewCurrentFeed('') + return viewCurrentFeed(''); } function viewLimitChanged() { - return viewCurrentFeed('') + return viewCurrentFeed(''); } /* function adjustArticleScore(id, score) { @@ -628,7 +626,7 @@ function hotkey_handler(e) { if (e.target.nodeName == "INPUT" || e.target.nodeName == "TEXTAREA") return; - var keycode; + var keycode = false; var shift_key = false; var cmdline = $('cmdline'); @@ -780,7 +778,7 @@ function hotkey_handler(e) { } if (keycode == 85) { // u - selectionToggleUnread(undefined, false, true) + selectionToggleUnread(undefined, false, true); return; } diff --git a/tt-rss.php b/tt-rss.php index 679b09b6..02756146 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -102,7 +102,7 @@
- +
diff --git a/twitter.php b/twitter.php index 934b72cc..9d0c8e50 100644 --- a/twitter.php +++ b/twitter.php @@ -100,7 +100,7 @@ - +

diff --git a/viewfeed.js b/viewfeed.js index 360384c1..52f081ba 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -27,7 +27,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { var is_cat = false; var feed_id = false; - var reply; + var reply = false; try { reply = JSON.parse(transport.responseText); @@ -71,7 +71,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { var counters = reply['counters']; var articles = reply['articles']; - var runtime_info = reply['runtime-info']; + //var runtime_info = reply['runtime-info']; if (offset == 0 && infscroll_req == false) { dijit.byId("headlines-frame").attr('content', @@ -630,7 +630,7 @@ function toggleUnread(id, cmode, effect) { function selectionRemoveLabel(id, ids) { try { - if (!ids) var ids = getSelectedArticleIds2(); + if (!ids) ids = getSelectedArticleIds2(); if (ids.length == 0) { alert(__("No articles are selected.")); @@ -692,7 +692,7 @@ function selectionToggleUnread(set_state, callback, no_error) { return; } - for (i = 0; i < rows.length; i++) { + for (var i = 0; i < rows.length; i++) { var row = $("RROW-" + rows[i]); if (row) { if (set_state == undefined) { @@ -754,7 +754,7 @@ function selectionToggleMarked() { return; } - for (i = 0; i < rows.length; i++) { + for (var i = 0; i < rows.length; i++) { toggleMark(rows[i], true, true); } @@ -786,7 +786,7 @@ function selectionTogglePublished() { return; } - for (i = 0; i < rows.length; i++) { + for (var i = 0; i < rows.length; i++) { togglePub(rows[i], true, true); } @@ -887,7 +887,7 @@ function catchupPage() { } selectArticles('all'); - selectionToggleUnread(false, 'viewCurrentFeed()', true) + selectionToggleUnread(false, 'viewCurrentFeed()', true); selectArticles('none'); } @@ -904,7 +904,6 @@ function deleteSelection() { var fn = getFeedName(getActiveFeedId(), activeFeedIsCat()); var str; - var op; if (getActiveFeedId() != 0) { str = __("Delete %d selected articles in %s?"); @@ -1007,7 +1006,7 @@ function catchupSelection() { return; } - selectionToggleUnread(false, 'viewCurrentFeed()', true) + selectionToggleUnread(false, 'viewCurrentFeed()', true); } catch (e) { exception_error("catchupSelection", e); @@ -1315,7 +1314,7 @@ function cdmExpandArticle(id) { var reply = JSON.parse(transport.responseText); reply.each(function(article) { - $("CWRAP-" + article['id']).innerHTML = article['content'] + $("CWRAP-" + article['id']).innerHTML = article['content']; cids_requested.remove(article['id']); }); }}); @@ -1665,7 +1664,7 @@ function getVisibleArticleIds() { function cdmClicked(event, id) { try { - var shift_key = event.shiftKey; + //var shift_key = event.shiftKey; hideAuxDlg();