]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 10 Dec 2011 20:10:32 +0000 (00:10 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 10 Dec 2011 20:10:32 +0000 (00:10 +0400)
22 files changed:
FeedTree.js
PrefFeedTree.js
digest.js
digest.php
feedlist.js
functions.js
functions.php
help/3.php
help/4.php
lib/CheckBoxTree.js
lib/position.js
login_form.php
mobile/login_form.php
modules/backend-rpc.php
prefs.js
prefs.php
register.php
tt-rss.css
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 a2c350afedc80cf1338aa908129fa4fd9cc24d73..f3879ace2c38e6326052a3f12b06d4d851a9718a 100644 (file)
@@ -91,3 +91,4 @@
        </div>
 
 </body>
+</html>
index 4f1a56c2a4e95cdcef696fea5dd95452682e0ec5..62c44b494c8186d3f688116a4fd126aa4c38925d 100644 (file)
@@ -48,7 +48,7 @@ function loadMoreHeadlines() {
 }
 
 
-function viewfeed(feed, subop, is_cat, offset, background, infscrol_req) {
+function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
        try {
                if (is_cat == undefined)
                        is_cat = false;
@@ -58,7 +58,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscrol_req) {
                if (subop == undefined) subop = '';
                if (offset == undefined) offset = 0;
                if (background == undefined) background = false;
-               if (infscrol_req == undefined) infscrol_req = false;
+               if (infscroll_req == undefined) infscroll_req = false;
 
                last_requested_article = 0;
 
@@ -100,12 +100,10 @@ function viewfeed(feed, subop, is_cat, offset, background, infscrol_req) {
                        }
                }
 
-               if (offset == 0)
+               if (offset == 0 && !background)
                        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;
@@ -211,7 +209,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscrol_req) {
                        parameters: query,
                        onComplete: function(transport) {
                                setFeedExpandoIcon(feed, is_cat, 'images/blank_icon.gif');
-                               headlines_callback2(transport, offset, background, infscrol_req);
+                               headlines_callback2(transport, offset, background, infscroll_req);
                        } });
 
        } catch (e) {
@@ -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()
@@ -386,10 +378,6 @@ function getFeedUnread(feed, is_cat) {
        return -1;
 }
 
-function resort_feedlist() {
-       console.warn("resort_feedlist: function not implemented");
-}
-
 function hideOrShowFeeds(hide) {
        var tree = dijit.byId("feedTree");
 
index c47070ed3e3e78f2ec3cc52b0f705b8fd90ac5b6..15f645c2ed0866d4332ed24767e0f9acaf02af67 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;
@@ -643,7 +638,7 @@ function displayHelpInfobox(topic_id) {
 
        var url = "backend.php?op=help&tid=" + param_escape(topic_id);
 
-       var w = window.open(url, "ttrss_help",
+       window.open(url, "ttrss_help",
                "status=0,toolbar=0,location=0,width=450,height=500,scrollbars=1,menubar=0");
 
 }
@@ -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 360a48efdeb270d0cfd22bedb15b7933e8561393..cad0b21c33536405d2fb6cf3519c42f5e0e855cd 100644 (file)
                }
        } // function purge_feed
 
-       /**
-        * Purge old posts from old feeds. Not used anymore, purging is done after feed update.
-        *
-        * @param mixed $link A database connection
-        * @param boolean $do_output Set to true to enable printed output, false by default.
-        * @param integer $limit The maximal number of removed posts.
-        * @access public
-        * @return void
-        */
-       /* function global_purge_old_posts($link, $do_output = false, $limit = false) {
-
-               $random_qpart = sql_random_function();
-
-               if ($limit) {
-                       $limit_qpart = "LIMIT $limit";
-               } else {
-                       $limit_qpart = "";
-               }
-
-               $result = db_query($link,
-                       "SELECT id,purge_interval,owner_uid FROM ttrss_feeds
-                               ORDER BY $random_qpart $limit_qpart");
-
-               while ($line = db_fetch_assoc($result)) {
-
-                       $feed_id = $line["id"];
-                       $purge_interval = $line["purge_interval"];
-                       $owner_uid = $line["owner_uid"];
-
-                       if ($purge_interval == 0) {
-
-                               $tmp_result = db_query($link,
-                                       "SELECT value FROM ttrss_user_prefs WHERE
-                                               pref_name = 'PURGE_OLD_DAYS' AND owner_uid = '$owner_uid'");
-
-                               if (db_num_rows($tmp_result) != 0) {
-                                       $purge_interval = db_fetch_result($tmp_result, 0, "value");
-                               }
-                       }
-
-                       if ($do_output) {
-//                             print "Feed $feed_id: purge interval = $purge_interval\n";
-                       }
-
-                       if ($purge_interval > 0 || FORCE_ARTICLE_PURGE) {
-                               purge_feed($link, $feed_id, $purge_interval, $do_output);
-                       }
-               }
-
-               purge_orphans($link, $do_output);
-
-       } // function global_purge_old_posts */
-
        function feed_purge_interval($link, $feed_id) {
 
                $result = db_query($link, "SELECT purge_interval, owner_uid FROM ttrss_feeds
                }
        }
 
-       function purge_old_posts($link) {
-
-               $user_id = $_SESSION["uid"];
-
-               $result = db_query($link, "SELECT id,purge_interval FROM ttrss_feeds
-                       WHERE owner_uid = '$user_id'");
-
-               while ($line = db_fetch_assoc($result)) {
-
-                       $feed_id = $line["id"];
-                       $purge_interval = $line["purge_interval"];
-
-                       if ($purge_interval == 0) $purge_interval = get_pref($link, 'PURGE_OLD_DAYS');
-
-                       if ($purge_interval > 0) {
-                               purge_feed($link, $feed_id, $purge_interval);
-                       }
-               }
-
-               purge_orphans($link);
-       }
-
        function purge_orphans($link, $do_output = false) {
 
                // purge orphaned posts in main content table
 
        }
 
-       function lookup_user_id($link, $user) {
-
-               $result = db_query($link, "SELECT id FROM ttrss_users WHERE login = '$user'");
-
-               if (db_num_rows($result) == 1) {
-                       return db_fetch_result($result, 0, "id");
-               } else {
-                       return false;
-               }
-       }
-
-/*     function http_authenticate_user($link) {
-               if (!$_SERVER["PHP_AUTH_USER"]) {
-
-                       header('WWW-Authenticate: Basic realm="Tiny Tiny RSS RSSGen"');
-                       header('HTTP/1.0 401 Unauthorized');
-                       exit;
-
-               } else {
-                       $auth_result = authenticate_user($link,
-                               $_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]);
-
-                       if (!$auth_result) {
-                               header('WWW-Authenticate: Basic realm="Tiny Tiny RSS RSSGen"');
-                               header('HTTP/1.0 401 Unauthorized');
-                               exit;
-                       }
-               }
-
-               return true;
-       } */
-
        function get_ssl_certificate_id() {
                if ($_SERVER["REDIRECT_SSL_CLIENT_M_SERIAL"]) {
                        return sha1($_SERVER["REDIRECT_SSL_CLIENT_M_SERIAL"] .
                }
        }
 
-       function get_script_urlpath() {
-               return preg_replace('/\/[^\/]*$/', "", $_SERVER["REQUEST_URI"]);
-       }
-
        function validate_session($link) {
                if (SINGLE_USER_MODE) return true;
 
                }
        }
 
-       function smart_date($timestamp) {
-               if (date("Y.m.d", $timestamp) == date("Y.m.d")) {
-                       return "Today";
-               } else if (date("Y", $timestamp) == date("Y")) {
-                       return date("D m", $timestamp);
-               } else {
-                       return date("Y/m/d", $timestamp);
-               }
-       }
-
-       function sql_bool_to_string($s) {
-               if ($s == "t" || $s == "1") {
-                       return "true";
-               } else {
-                       return "false";
-               }
-       }
-
        function sql_bool_to_bool($s) {
                if ($s == "t" || $s == "1" || $s == "true") {
                        return true;
                return $ret_arr;
        }
 
-       function getSubscribedFeeds($link) {
-               $result = db_query($link, "SELECT COUNT(id) AS fn FROM
-                       ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]);
-
-               return db_fetch_result($result, 0, "fn");
-       }
-
        function getTagCounters($link) {
 
                $ret_arr = array();
                }
        }
 
-       function get_session_cookie_name() {
-               return ((!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME);
-       }
-
        function make_init_params($link) {
                $params = array();
 
                return $params;
        }
 
-       function print_runtime_info($link) {
-               print "<runtime-info><![CDATA[";
-               print json_encode(make_runtime_info($link));
-               print "]]></runtime-info>";
-       }
-
        function make_runtime_info($link) {
                $data = array();
 
                return $tags;
        }
 
-       function trim_value(&$value) {
-               $value = trim($value);
-       }
-
        function trim_array($array) {
                $tmp = $array;
                array_walk($tmp, 'trim_value');
                                        $marked_pic = "<img id=\"FMPIC-$id\"
                                                src=\"".theme_image($link, 'images/mark_set.png')."\"
                                                class=\"markedPic\" alt=\"Unstar article\"
-                                               onclick='javascript:tMark($id)'>";
+                                               onclick='javascript:toggleMark($id)'>";
                                } else {
                                        $marked_pic = "<img id=\"FMPIC-$id\"
                                                src=\"".theme_image($link, 'images/mark_unset.png')."\"
                                                class=\"markedPic\" alt=\"Star article\"
-                                               onclick='javascript:tMark($id)'>";
+                                               onclick='javascript:toggleMark($id)'>";
                                }
 
                                if ($line["published"] == "t" || $line["published"] == "1") {
                                        $published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($link,
                                                'images/pub_set.png')."\"
                                                class=\"markedPic\"
-                                               alt=\"Unpublish article\" onclick='javascript:tPub($id)'>";
+                                               alt=\"Unpublish article\" onclick='javascript:togglePub($id)'>";
                                } else {
                                        $published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($link,
                                                'images/pub_unset.png')."\"
                                                class=\"markedPic\"
-                                               alt=\"Publish article\" onclick='javascript:tPub($id)'>";
+                                               alt=\"Publish article\" onclick='javascript:togglePub($id)'>";
                                }
 
 #                              $content_link = "<a target=\"_blank\" href=\"".$line["link"]."\">" .
 
        }
 
-       function ccache_zero($link, $feed_id, $owner_uid) {
+       /* function ccache_zero($link, $feed_id, $owner_uid) {
                db_query($link, "UPDATE ttrss_counters_cache SET
                        value = 0, updated = NOW() WHERE
                        feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
-       }
+       } */
 
        function ccache_zero_all($link, $owner_uid) {
                db_query($link, "UPDATE ttrss_counters_cache SET
                return $unread;
        }
 
-       function ccache_cleanup($link, $owner_uid) {
+       /* function ccache_cleanup($link, $owner_uid) {
 
                if (DB_TYPE == "pgsql") {
                        db_query($link, "DELETE FROM ttrss_counters_cache AS c1 WHERE
                                        c1.feed_id = c2.feed_id");
 
                }
-       }
+       } */
 
        function label_find_id($link, $label, $owner_uid) {
                $result = db_query($link,
                return $result;
        }
 
-       function print_labels_headlines_dropdown($link, $feed_id) {
-               print "<option value=\"addLabel()\">".__("Create label...")."</option>";
-
-               $result = db_query($link, "SELECT id, caption FROM ttrss_labels2 WHERE
-                       owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
-
-               while ($line = db_fetch_assoc($result)) {
-
-                       $label_id = $line["id"];
-                       $label_caption = $line["caption"];
-                       $id = $line["id"];
-
-                       if ($feed_id < -10 && $feed_id == -11-$label_id) {
-                               print "<option id=\"LHDL-$id\"
-                                       value=\"selectionRemoveLabel($label_id)\">".
-                                       __('Remove:') . " $label_caption</option>";
-                       } else {
-                               print "<option id=\"LHDL-$id\"
-                                       value=\"selectionAssignLabel($label_id)\">".
-                                       __('Assign:') . " $label_caption</option>";
-                       }
-               }
-       }
-
        function format_tags_string($tags, $id) {
 
                $tags_str = "";
                }
        }
 
-       function make_url_from_parts($parts) {
-               $url = $parts['scheme'] . '://' . $parts['host'];
-
-               if ($parts['path']) $url .= $parts['path'];
-               if ($parts['query']) $url .= '?' . $parts['query'];
-
-               return $url;
-       }
-
        /**
         * Fixes incomplete URLs by prepending "http://".
         * Also replaces feed:// with http://, and
index 45143dcef7f05baf977f80dc61f0fb1f82b54fb7..e1812b3f23569517a1637b3e0bc4d82c2efe51a5 100644 (file)
@@ -1,6 +1,6 @@
        <h1><?php echo __("Keyboard Shortcuts") ?></h1>
 
-       <table width='100%'><tr><td width='50%' valign='top'>
+       <table style='width : 100%'><tr><td style='width : 50%' valign='top'>
 
        <h2><?php echo __("Navigation") ?></h2>
 
@@ -33,7 +33,6 @@
                <tr><td class='n'>c l</td><td><?php echo __("Create label") ?></td></tr>
                <tr><td class='n'>c f</td><td><?php echo __("Create filter") ?></td></tr>
                <tr><td class='n'>c s</td><td><?php echo __("Collapse sidebar") ?></td></tr>
-               <!-- <tr><td class='n'>c m</td><td><?php echo __("Toggle category reordering mode") ?></td></tr> -->
                <tr><td class='n'>?</td><td><?php echo __("Display this help dialog") ?></td></tr>
        </table>
 
 
        <table>
                <tr><td class='n'>f r</td><td><?php echo __("Refresh active feed") ?></td></tr>
-               <!-- <tr><td class='n'>R</td><td><?php echo __("Update all feeds") ?></td></tr> -->
                <tr><td class='n'>f a</td><td><?php echo __("(Un)hide read feeds") ?></td></tr>
                <tr><td class='n'>f s</td><td><?php echo __("Subscribe to feed") ?></td></tr>
                <tr><td class='n'>f e</td><td><?php echo __("Edit feed") ?></td></tr>
-               <!-- <tr><td class='n'>f w</td><td><?php echo __("Sort by name or unread count") ?></td></tr> -->
                <tr><td class='n'>f q</td><td><?php echo __("Mark feed as read") ?></td></tr>
                <tr><td class='n'>f x</td><td><?php echo __("Reverse headlines order") ?></td></tr>
                <tr><td class='n'>Q</td><td><?php echo __("Mark all feeds as read") ?></td></tr>
index b3333f23fa0182da8533bb572ac48a519976b96d..4cf3a126117bcd2b03209d6eb29b7e3deeb95653 100644 (file)
@@ -1,6 +1,6 @@
 <h1><?php echo __("Keyboard Shortcuts") ?></h1>
 
-<table width='100%'><tr><td width='50%' valign='top'>
+<table style='width : 100%'><tr><td style='width : 50%' valign='top'>
 
        <h2><?php echo __("Go to...") ?></h2>
 
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 5810c5cef6a0e318fbd0a451bbd0f94d7ed7e171..04ca3e6d0c1a1ca3aa1dc2fa3b172704777a91a7 100644 (file)
@@ -116,7 +116,7 @@ function validateLoginForm(f) {
 <form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
 <input type="hidden" name="login_action" value="do_login">
 
-<table width="100%" class="loginForm2">
+<table class="loginForm2">
 <tr>
        <td class="loginTop" valign="bottom" align="left">
                <img src="images/logo_wide.png">
@@ -147,7 +147,7 @@ function validateLoginForm(f) {
 
                        <tr><td align="right"><?php echo __("Profile:") ?></td>
                        <td align="right" id="profile_box">
-                       <select style='width : 100%' disabled='1'>
+                       <select style='width : 100%' disabled='disabled'>
                                <option><?php echo __("Default profile") ?></option></select>
                        </td></tr>
 
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 f1bbd0698f72ea440a3e029200c3b0e702f67ed9..d74c68464bf7efb280a8b926d8f15df1faa520e6 100644 (file)
                        return;
                }
 
-/*             if ($subop == "globalPurge") {
-
-                       print "<rpc-reply>";
-                       global_purge_old_posts($link, true);
-                       print "</rpc-reply>";
-
-                       return;
-               } */
-
                if ($subop == "setArticleTags") {
                        global $memcache;
 
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..19fce711394f9367bdee97dffe7d23735fd0109a 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') ?>"
-                       disabled="true" onclick='return validateRegForm()'>
+                       disabled="disabled" onclick='return validateRegForm()'>
        </td></tr>
        </table>
        </form>
index fe6d883533fe9be4be164e82ae5c0833a1d9a20f..972805f901c9afb263dd7c8569d983a69fa16718 100644 (file)
@@ -133,24 +133,6 @@ a:hover {
        position : absolute;
 }
 
-textarea.iedit {
-       width : 100%;
-}
-
-input.iedit {
-       width : 100%;
-       padding-left : 2px;
-}
-
-select.iedit {
-       width : 100%;
-}
-
-input.editbox {
-       width : 200px;
-       padding-left : 2px;
-}
-
 #notify {
        border-width : 0px 1px 1px 1px;
        border-style : solid;
@@ -198,12 +180,6 @@ input.editbox {
        cursor : pointer;
 }
 
-.blankborder, .blankborder td {
-       border-style : solid;
-       border-color : transparent;
-       border-width : 0px 0px 1px 0px;
-}
-
 .Selected, .Selected td {
        background-color : #fff7d5;
 }
@@ -640,16 +616,6 @@ a.warning {
        color : #f04040;
 }
 
-img.closeButton {
-       border-width : 0px;
-       float : right;
-}
-
-span.groupPrompt {
-       font-size : 12px;
-       color : #4684ff;
-}
-
 div.tagCloudContainer {
        border : 1px solid #c0c0c0;
        background-color : #ecf4ff;
@@ -733,18 +699,6 @@ ul.compact li {
        padding : 0px;
 }
 
-div.browserFeedInfo {
-       font-size : 12px;
-/*     border : 1px solid #88b0f0;
-       background-color : #ecf4ff;
-       -moz-border-radius : 5px; */
-       padding : 5px;
-}
-
-div.browserFeedInfo div.detailsPart {
-       margin : 5px 0px 5px 5px;       
-}
-
 .noborder {
        border-width : 0px;
 }
@@ -764,20 +718,6 @@ div.browserFeedInfo div.detailsPart {
        margin : 1em;
 }
 
-#noDaemonWarning {     
-       position : absolute;
-       background-color : #ecf4ff;               
-       border : 1px solid #88b0f0;
-       padding : 10px;
-       margin : 5px;
-       z-index : 2;
-       display : none;
-}
-
-#qafInput {
-       width : 100%;
-}
-
 form {
        margin : 0px;
        padding : 0px;
@@ -791,42 +731,9 @@ form {
        width : 100%;
 }
 
-div.feedExtInfo {
-       margin-left : 2em;
-       font-size : 7pt;
-       color : gray;
-       font-weight : normal;
-}
-
-span.debugTS {
-       color : #4684ff;
-}
-
-#backReqBox {
-       display : none;
-}
-
-/*.scriptWarn:before {
-       content : "Disabled script:";
-}*/
-
-.scriptWarn {
-       color : white;
-       background-color : #903030;
-       border : 1px solid #601010;
-       padding : 3px;
-       font-weight : bold;
-       display : none;
-}
-
-.objectWarn {
-       color : gray;
-       font-style: italic;
-       text-align : center;
-}
-
 table.loginForm2 {
        padding : 1em;
+       width : 100%;
 }
 
 table.loginForm2 .loginTop {
@@ -867,10 +774,6 @@ table.loginForm2 .innerLoginCell {
        padding-top : 0.5em;
 }
 
-#milestoneDetails {
-       display : none;
-}
-
 div.loadingPrompt {
        padding : 1em;
        text-align : center;
@@ -944,10 +847,6 @@ a.helpLinkPic img {
        vertical-align : middle;
 }
 
-table.prefFeedCatList {
-       
-}
-
 div.autocomplete {
        position : absolute;
        width : 250px;
@@ -1090,19 +989,6 @@ div#hotkey_help_overlay table.hho td.bottom {
        font-size : 11px;
 }
 
-div#l_progress_o {
-       width : 200px;
-       border : 1px solid black;
-       background-color : white;
-       margin-top : 10px;
-}
-
-div#l_progress_i {
-       width : 10px;
-       background-color : #88b0f0;
-       height : 10px;
-}
-
 div.dlgSec {
        font-size : 12px;
        color : gray;
@@ -1163,29 +1049,6 @@ span.labelColorIndicator2 {
        vertical-align : bottom;
 }
 
-
-div.labelColorIndicator {
-       height : 14px;
-       width : 14px;
-       line-height : 14px;
-       font-height : 9px;
-       text-align : center;
-       border : 1px solid black;
-       float : left;
-       background-color : #fff7d5;     
-       color : #063064;
-       margin-right : 10px;
-}
-
-optgroup {
-       color : #4684ff;
-       font-style : normal;
-}
-
-option {
-       color : black;
-}
-
 div#cmdline {
        position : absolute;
        left : 5px;
index 321a74c176750bca9f68dbf12b919e5354ff9c11..36e0d8cc424ead03ad887a1356515eadc3738ae9 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;
                        }
 
@@ -916,11 +914,6 @@ function hotkey_handler(e) {
                                }
                        }
 
-                       if (keycode == 87) { // w
-                               feeds_sort_by_unread = !feeds_sort_by_unread;
-                               return resort_feedlist();
-                       }
-
                        if (keycode == 88) { // x
                                reverseHeadlineOrder();
                                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 f34a071fd24c780149437cbac0c37f8a06f6678c..9cb902315a714bb5ca4cd8972551ce09993547d3 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',
@@ -404,14 +404,6 @@ function view(id) {
        }
 }
 
-function tMark(id) {
-       return toggleMark(id);
-}
-
-function tPub(id) {
-       return togglePub(id);
-}
-
 function toggleMark(id, client_only) {
        try {
                var query = "?op=rpc&id=" + id + "&subop=mark";
@@ -630,7 +622,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 +684,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 +746,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 +778,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 +879,7 @@ function catchupPage() {
        }
 
        selectArticles('all');
-       selectionToggleUnread(false, 'viewCurrentFeed()', true)
+       selectionToggleUnread(false, 'viewCurrentFeed()', true);
        selectArticles('none');
 }
 
@@ -904,7 +896,6 @@ function deleteSelection() {
 
                var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
                var str;
-               var op;
 
                if (getActiveFeedId() != 0) {
                        str = __("Delete %d selected articles in %s?");
@@ -1007,7 +998,7 @@ function catchupSelection() {
                        return;
                }
 
-               selectionToggleUnread(false, 'viewCurrentFeed()', true)
+               selectionToggleUnread(false, 'viewCurrentFeed()', true);
 
        } catch (e) {
                exception_error("catchupSelection", e);
@@ -1316,7 +1307,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']);
                                                });
                                }});
@@ -1666,7 +1657,7 @@ function getVisibleArticleIds() {
 
 function cdmClicked(event, id) {
        try {
-               var shift_key = event.shiftKey;
+               //var shift_key = event.shiftKey;
 
                hideAuxDlg();