diff options
author | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
---|---|---|
committer | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
commit | 58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch) | |
tree | 523d814ea0b7b6f617fe515b186099c6e83fed72 /js/viewfeed.js | |
parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'js/viewfeed.js')
-rw-r--r-- | js/viewfeed.js | 57 |
1 files changed, 6 insertions, 51 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js index c24dec62e..c1163eab7 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -13,8 +13,6 @@ var catchup_timeout_id = false; var cids_requested = []; var loaded_article_ids = []; -var _post_preview_timeout = false; - var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null; function headlines_callback2(transport, offset, background, infscroll_req) { @@ -66,7 +64,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { vgroup_last_feed = reply['headlines-info']['vgroup_last_feed']; - if (parseInt(headlines_count) < getInitParam("default_article_limit")) { + if (parseInt(headlines_count) < 30) { _infscroll_disable = 1; } else { _infscroll_disable = 0; @@ -680,7 +678,7 @@ function selectionRemoveLabel(id, ids) { return; } - var query = "?op=rpc&method=removeFromLabel&ids=" + + var query = "?op=article&method=removeFromLabel&ids=" + param_escape(ids.toString()) + "&lid=" + param_escape(id); console.log(query); @@ -708,7 +706,7 @@ function selectionAssignLabel(id, ids) { return; } - var query = "?op=rpc&method=assignToLabel&ids=" + + var query = "?op=article&method=assignToLabel&ids=" + param_escape(ids.toString()) + "&lid=" + param_escape(id); console.log(query); @@ -1116,7 +1114,7 @@ function editArticleTags(id) { dojo.disconnect(tmph); new Ajax.Autocompleter('tags_str', 'tags_choices', - "backend.php?op=rpc&method=completeTags", + "backend.php?op=article&method=completeTags", { tokens: ',', paramName: "search" }); }); @@ -1153,53 +1151,10 @@ function getActiveArticleId() { function postMouseIn(e, id) { post_under_pointer = id; - - if (_post_preview_timeout) window.clearTimeout(_post_preview_timeout); - - /* if (!isCdmMode() || !getInitParam("cdm_expanded")) { - _post_preview_timeout = window.setTimeout(function() { - displaySmallArticlePreview(e, id); - }, 1000); - } */ -} - -function displaySmallArticlePreview(e, id) { - try { - var query = "?op=rpc&method=cdmarticlepreview&id=" + id; - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - cexc = $("CEXC-" + id); - preview = $("small_article_preview"); - row = $("RROW-" + id); - ctr = $("headlines-frame"); - - if (id != getActiveArticleId() && (!isCdmMode() || (cexc && Element.visible(cexc))) && row && preview) { - preview.innerHTML = transport.responseText; - new Effect.Appear(preview, {duration:0.2}); - - preview.setStyle({ - left: (e.clientX + 20) + 'px', - top: (row.offsetTop + row.offsetHeight*2 + 20 - ctr.scrollTop) + 'px' }); - - } - - } }); - - - } catch (e) { - exception_error("displaySmallArticlePreview", e); - } } function postMouseOut(id) { post_under_pointer = false; - - if (_post_preview_timeout) window.clearTimeout(_post_preview_timeout); - - if (Element.visible("small_article_preview")) - Element.hide("small_article_preview"); } function unpackVisibleHeadlines() { @@ -2065,7 +2020,7 @@ function setSelectionScore() { var score = prompt(__("Please enter new score for selected articles:"), score); if (score != undefined) { - var query = "op=rpc&method=setScore&id=" + param_escape(ids.toString()) + + var query = "op=article&method=setScore&id=" + param_escape(ids.toString()) + "&score=" + param_escape(score); new Ajax.Request("backend.php", { @@ -2108,7 +2063,7 @@ function changeScore(id, pic) { if (new_score != undefined) { - var query = "op=rpc&method=setScore&id=" + param_escape(id) + + var query = "op=article&method=setScore&id=" + param_escape(id) + "&score=" + param_escape(new_score); new Ajax.Request("backend.php", { |