]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc typo fixes
authorAndrew Dolgov <fox@fakecake.org>
Sat, 10 Dec 2011 17:26:59 +0000 (21:26 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Sat, 10 Dec 2011 17:26:59 +0000 (21:26 +0400)
15 files changed:
FeedTree.js
PrefFeedTree.js
digest.js
feedlist.js
functions.js
lib/CheckBoxTree.js
lib/position.js
mobile/login_form.php
prefs.js
prefs.php
register.php
tt-rss.js
tt-rss.php
twitter.php
viewfeed.js

index f40dd9c62f6d775826a48febebf3700524e73003..b5b757164131115fd472967305f26e3a65ade592 100644 (file)
@@ -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];
 
index db59b5081b83d030da4b2c9c59f63e195afee0b1..4ea486609990e88e479cce787c90fbf904c6332c 100644 (file)
@@ -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');
 
index ee76c735bf3516a5b856a6680bb33b0ee4267f43..7dba6d36ee0b60cbc9dc7de45f4abbd0cec08c3a 100644 (file)
--- 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;
index 4f1a56c2a4e95cdcef696fea5dd95452682e0ec5..c117b66e9b1b878d34861bea2692c5358d7afcfb 100644 (file)
@@ -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()
index c47070ed3e3e78f2ec3cc52b0f705b8fd90ac5b6..926e155cc31325e398d1a3f806c2f22404991705 100644 (file)
@@ -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<x.length;j++) {
+      for(var j=0;j<x.length;j++) {
         // call isNumeric recursively for each character
         number=isNumeric(x.substring(j,j+1));
         if(!number) return number;
@@ -368,7 +368,7 @@ function checkboxToggleElement(elem, id) {
 }
 
 function dropboxSelect(e, v) {
-       for (i = 0; i < e.length; i++) {
+       for (var i = 0; i < e.length; i++) {
                if (e[i].value == v) {
                        e.selectedIndex = i;
                        break;
@@ -435,11 +435,6 @@ function infobox_callback2(transport) {
                //console.log("infobox_callback2");
                notify('');
 
-               var content;
-               var dtitle = "Dialog";
-
-               var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
-
                var title = transport.responseXML.getElementsByTagName("title")[0];
                if (title)
                        title = title.firstChild.nodeValue;
@@ -1012,7 +1007,7 @@ function quickAddFilter() {
                                                                                        if (inPreferences()) {
                                                                                                updateFilterList();
                                                                                        }
-                                                                       }})
+                                                                       }});
                                                                }
                                                        }
                                        }});
@@ -1354,7 +1349,7 @@ function getSelectedTableRowIds(id) {
        try {
                var elem_rows = $(id).rows;
 
-               for (i = 0; i < elem_rows.length; i++) {
+               for (var i = 0; i < elem_rows.length; i++) {
                        if (elem_rows[i].hasClassName("Selected")) {
                                var bare_id = elem_rows[i].id.replace(/^[A-Z]*?-/, "");
                                rows.push(bare_id);
@@ -1397,7 +1392,7 @@ function editFeed(feed, event) {
                                                        dialog.hide();
                                                        notify('');
                                                        updateFeedList();
-                                       }})
+                                       }});
                                }
                        },
                        href: query});
index 3e408190907d48e032d60579c133d7f664659686..48cfbae9a9bfa95d24ab4fb07a0dff252cdc2c1b 100644 (file)
@@ -131,7 +131,7 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel,
                        currState = this.checkboxState;
                }
 
-               return currState  // the current state of the checkbox (true/false or undefined)
+               return currState;  // the current state of the checkbox (true/false or undefined)
        },
 
        _setCheckboxState: function(/*dojo.data.Item*/ storeItem, /*Boolean*/ newState ) {
@@ -277,7 +277,7 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel,
                                parents.push(this.root);
                        }
                }
-               return parents // parent(s) of a dojo.data.item (Array of dojo.data.items)
+               return parents; // parent(s) of a dojo.data.item (Array of dojo.data.items)
        },
 
        validateData: function(/*dojo.data.Item*/ storeItem, /*thisObject*/ scope ) {
index 29bb9a5cad9b695ffed9c213630fcdf42c656b6d..43ea85f767142d0965abb193328823e09acb1d0a 100644 (file)
@@ -4,8 +4,8 @@ Position.GetWindowSize = function(w) {
         w = w ? w : window;
         var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
         var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
-        return [width, height]
-}
+        return [width, height];
+};
 
 /* http://textsnippets.com/posts/show/836 */
 
@@ -25,7 +25,7 @@ Position.Center = function(element, parent) {
         }
         element.style.top = (ph/2) - (h/2) -  Position.deltaY + "px";
         element.style.left = (pw/2) - (w/2) -  Position.deltaX + "px";
-}
+};
 
 
 
index feebe70ec59cc32b008c2d81c7c8faf4e7763672..937c71f8aae602f81a32763a6bc839645b082b8f 100644 (file)
@@ -28,7 +28,7 @@ function do_login() {
         <a class="button blueButton" onclick='do_login()'><?php echo __('Log in') ?></a>
     </div>
 
-       <form target="_self" title="Login" action="index.php" id="login" class="panel" method="POST" name="login" selected="true">
+       <form target="_self" title="Login" action="index.php" id="login" class="panel" method="post" name="login" selected="true">
 
        <fieldset>
 
index dc06ef35b5011d5a085e1ebff5dff009f4f0db92..5a75060d6c256ad0aa68b4c2ebad5a29066dca09 100644 (file)
--- 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;
index 794ebb7b25d2699a2fd69aa68220c3068391e3bb..98e4a2fd94b850ee2e017ac288990cdea1d7cde2 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 
 </head>
 
+<body id="ttrssPrefs" class="claro">
+
 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
 <div id="cmdline" style="display : none"></div>
 
-<body id="ttrssPrefs" class="claro">
-
 <div id="overlay">
        <div id="overlay_inner">
                <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
index 9fd75ffc51f6e41c0140eb9757d28eaed018620b..43e6b912907895f39b85bd5444d0b2964f7a7fdc 100644 (file)
        </td><td>
                <input type="submit" value="<?php echo __('Check availability') ?>" onclick='return checkUsername()'>
        </td></tr>
-       <td><?php echo __('Email:') ?></td><td>
+       <tr><td><?php echo __('Email:') ?></td><td>
                <input name="email">
        </td></tr>
-       <td><?php echo __('How much is two plus two:') ?></td><td>
+       <tr><td><?php echo __('How much is two plus two:') ?></td><td>
                <input name="turing_test"></td></tr>
        <tr><td colspan="2" align="right">
        <input type="submit" name="sub_btn" value="<?php echo __('Submit registration') ?>"
index 321a74c176750bca9f68dbf12b919e5354ff9c11..39e5cecef60099585ed390b7bfdfb699b5c5c118 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -490,8 +490,6 @@ function parse_runtime_info(data) {
                        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;
@@ -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;
                        }
 
index 679b09b658d17e78f1f85d48abdf2aca14e8996e..02756146d254cecc8820d30a7c98dc855b693dbb 100644 (file)
 
 <div id="feeds-holder" dojoType="dijit.layout.ContentPane" region="leading" style="width : 20%" splitter="true">
        <div id="feedlistLoading">
-               <img src='images/indicator_tiny.gif'>
+               <img src='images/indicator_tiny.gif'/>
                <?php echo  __("Loading, please wait..."); ?></div>
        <div id="feedTree"></div>
 </div>
index 934b72cc59d5f99f4a8cc7b0efffeae2687dda54..9d0c8e50900e464c0d17224b7548db2bb7743e78 100644 (file)
 
 <?php } else if ($op == 'callback') { ?>
 
-       <?php print_notice(__('Congratulations! You have successfully registered with Twitter.')) ?>
+       <p><?php print_notice(__('Congratulations! You have successfully registered with Twitter.')) ?>
                </p>
 
        <form method="GET" action="prefs.php">
index 360384c179e024cc8288083b273936af16437f93..52f081ba0cfe5939925d7499022949a6b0e52376 100644 (file)
@@ -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();