From e1f76af0068bd2cf5ce4a4203b7727d5b3111c04 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Apr 2013 22:01:02 +0400 Subject: block listing of several util directories; deny access to config.php --- js/index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 js/index.html (limited to 'js') diff --git a/js/index.html b/js/index.html new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3-54-g00ecf From e8f9069c5c44fb4512247dbc9d280152e760331a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Apr 2013 10:23:01 +0400 Subject: quickAddFeed: add placeholder select element to feeds dropdown --- js/functions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/functions.js b/js/functions.js index 82cfa9054..07eed2ad9 100644 --- a/js/functions.js +++ b/js/functions.js @@ -810,7 +810,7 @@ function quickAddFeed() { notify(''); Element.hide("feed_add_spinner"); - console.log("GOT RC: " + rc); + console.log(rc); switch (parseInt(rc['code'])) { case 1: @@ -866,6 +866,8 @@ function quickAddFeed() { while (select.getOptions().length > 0) select.removeOption(0); + select.addOption({value: '', label: __("Expand to select feed")}); + var count = 0; for (var feedUrl in feeds) { select.addOption({value: feedUrl, label: feeds[feedUrl]}); -- cgit v1.2.3-54-g00ecf From e43a9c4a01bf095b740e35711c79f6a0ca3374ba Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Apr 2013 13:16:14 +0400 Subject: add a %d articles selected element --- classes/feeds.php | 1 + js/functions.js | 6 ++++++ js/viewfeed.js | 24 ++++++++++++++++++++++++ tt-rss.css | 3 +++ 4 files changed, 34 insertions(+) (limited to 'js') diff --git a/classes/feeds.php b/classes/feeds.php index 2f8dcb5ec..c7b7a83e6 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -49,6 +49,7 @@ class Feeds extends Handler_Protected { // right part $reply .= ""; + $reply .= ""; $reply .= ""; if ($feed_site_url) { diff --git a/js/functions.js b/js/functions.js index 07eed2ad9..9336433ca 100644 --- a/js/functions.js +++ b/js/functions.js @@ -368,6 +368,9 @@ function toggleSelectRow2(sender, row, is_cdm) { row.addClassName('Selected'); else row.removeClassName('Selected'); + + if (typeof updateSelectedPrompt != undefined) + updateSelectedPrompt(); } @@ -379,6 +382,9 @@ function toggleSelectRow(sender, row) { row.addClassName('Selected'); else row.removeClassName('Selected'); + + if (typeof updateSelectedPrompt != undefined) + updateSelectedPrompt(); } function checkboxToggleElement(elem, id) { diff --git a/js/viewfeed.js b/js/viewfeed.js index da5ded64f..519ab3449 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -639,11 +639,33 @@ function toggleSelected(id, force_on) { if (cb) cb.attr("checked", true); } } + + updateSelectedPrompt(); } catch (e) { exception_error("toggleSelected", e); } } +function updateSelectedPrompt() { + try { + var count = getSelectedArticleIds2().size(); + var elem = $("selected_prompt"); + + if (elem) { + elem.innerHTML = ngettext("%d article selected", + "%d articles selected", count).replace("%d", count); + + if (count > 0) + Element.show(elem); + else + Element.hide(elem); + } + + } catch (e) { + exception_error("updateSelectedPrompt", e); + } +} + function toggleUnread_afh(effect) { try { @@ -960,6 +982,8 @@ function selectArticles(mode) { } }); + updateSelectedPrompt(); + } catch (e) { exception_error("selectArticles", e); } diff --git a/tt-rss.css b/tt-rss.css index 6067ca7d6..d2e854d8f 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1019,3 +1019,6 @@ div.hl.active a.title { color : #4684ff; } +#selected_prompt { + margin-right : 25px; +} -- cgit v1.2.3-54-g00ecf From 40fe2d73821788e7c202191dc7b94b025585d338 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Apr 2013 15:44:38 +0400 Subject: remove js-based player, better mp3 support detection for html5 audio --- classes/rpc.php | 1 + include/functions.php | 11 ++--------- js/tt-rss.js | 6 +++++- js/viewfeed.js | 28 ---------------------------- 4 files changed, 8 insertions(+), 38 deletions(-) (limited to 'js') diff --git a/classes/rpc.php b/classes/rpc.php index 1569a9a35..b6d552868 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -334,6 +334,7 @@ class RPC extends Handler_Protected { function sanityCheck() { $_SESSION["hasAudio"] = $_REQUEST["hasAudio"] === "true"; $_SESSION["hasSandbox"] = $_REQUEST["hasSandbox"] === "true"; + $_SESSION["hasMp3"] = $_REQUEST["hasMp3"] === "true"; $reply = array(); diff --git a/include/functions.php b/include/functions.php index 018520648..87eb3d6a9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2990,19 +2990,12 @@ if (strpos($ctype, "audio/") === 0) { if ($_SESSION["hasAudio"] && (strpos($ctype, "ogg") !== false || - strpos($_SERVER['HTTP_USER_AGENT'], "Chrome") !== false || - strpos($_SERVER['HTTP_USER_AGENT'], "Safari") !== false )) { + $_SESSION["hasMp3"])) { - $id = 'AUDIO-' . uniqid(); - - $entry .= "