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 | |
parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 52 | ||||
-rw-r--r-- | js/prefs.js | 4 | ||||
-rw-r--r-- | js/viewfeed.js | 57 |
3 files changed, 9 insertions, 104 deletions
diff --git a/js/functions.js b/js/functions.js index 0b39cc466..4e4d03557 100644 --- a/js/functions.js +++ b/js/functions.js @@ -548,28 +548,6 @@ function fatalError(code, msg, ext_info) { } } -/* function filterDlgCheckType(sender) { - - try { - - var ftype = sender.value; - - // if selected filter type is 5 (Date) enable the modifier dropbox - if (ftype == 5) { - Element.show("filterDlg_dateModBox"); - Element.show("filterDlg_dateChkBox"); - } else { - Element.hide("filterDlg_dateModBox"); - Element.hide("filterDlg_dateChkBox"); - - } - - } catch (e) { - exception_error("filterDlgCheckType", e); - } - -} */ - function filterDlgCheckAction(sender) { try { @@ -603,34 +581,6 @@ function filterDlgCheckAction(sender) { } -function filterDlgCheckDate() { - try { - var dialog = dijit.byId("filterEditDlg"); - - var reg_exp = dialog.attr('value').reg_exp; - - var query = "?op=rpc&method=checkDate&date=" + reg_exp; - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - - var reply = JSON.parse(transport.responseText); - - if (reply['result'] == true) { - alert(__("Date syntax appears to be correct:") + " " + reply['date']); - return; - } else { - alert(__("Date syntax is incorrect.")); - } - - } }); - - - } catch (e) { - exception_error("filterDlgCheckDate", e); - } -} function explainError(code) { return displayDlg(__("Error explained"), "explainError", code); @@ -1407,7 +1357,7 @@ function genUrlChangeKey(feed, is_cat) { notify_progress("Trying to change address...", true); - var query = "?op=rpc&method=regenFeedKey&id=" + param_escape(feed) + + var query = "?op=pref-feeds&method=regenFeedKey&id=" + param_escape(feed) + "&is_cat=" + param_escape(is_cat); new Ajax.Request("backend.php", { diff --git a/js/prefs.js b/js/prefs.js index 358625e93..b4ecd2584 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1221,7 +1221,7 @@ function opmlRegenKey() { notify_progress("Trying to change address...", true); - var query = "?op=rpc&method=regenOPMLKey"; + var query = "?op=pref-feeds&method=regenOPMLKey"; new Ajax.Request("backend.php", { parameters: query, @@ -1521,7 +1521,7 @@ function clearFeedAccessKeys() { if (ok) { notify_progress("Clearing URLs..."); - var query = "?op=rpc&method=clearKeys"; + var query = "?op=pref-feeds&method=clearKeys"; new Ajax.Request("backend.php", { parameters: query, 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", { |