diff options
author | Andrew Dolgov <[email protected]> | 2013-03-28 20:44:43 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-28 20:44:43 +0400 |
commit | b9a06a0e39739b1d810bbb78bc1eef05f7d095cf (patch) | |
tree | 4459d9f95bb23562a54a4fafc5c030c26d7a5eeb /js/tt-rss.js | |
parent | 699e3cfc65174ba531401c2689f6b2074546bb34 (diff) |
retire frankly ridiculous sorting by score/title/date/default
keep defaul and oldest first instead of REVERSE_HEADLINES
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index ae5815b68..d38b203c1 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -854,13 +854,27 @@ function inPreferences() { function reverseHeadlineOrder() { try { - var query_str = "?op=rpc&method=togglepref&key=REVERSE_HEADLINES"; + /* var query_str = "?op=rpc&method=togglepref&key=REVERSE_HEADLINES"; new Ajax.Request("backend.php", { parameters: query_str, onComplete: function(transport) { viewCurrentFeed(); - } }); + } }); */ + + var toolbar = document.forms["main_toolbar_form"]; + var order_by = dijit.getEnclosingWidget(toolbar.order_by); + + var value = order_by.attr('value'); + + if (value == "date_reverse") + value = "default"; + else + value = "date_reverse"; + + order_by.attr('value', value); + + viewCurrentFeed(); } catch (e) { exception_error("reverseHeadlineOrder", e); |