Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f1fdfbea43
23 changed files with 95 additions and 95 deletions
|
@ -194,11 +194,10 @@ class API extends Handler {
|
|||
|
||||
$search = db_escape_string($_REQUEST["search"]);
|
||||
$search_mode = db_escape_string($_REQUEST["search_mode"]);
|
||||
$match_on = db_escape_string($_REQUEST["match_on"]);
|
||||
|
||||
$headlines = $this->api_get_headlines($this->link, $feed_id, $limit, $offset,
|
||||
$filter, $is_cat, $show_excerpt, $show_content, $view_mode, false,
|
||||
$include_attachments, $since_id, $search, $search_mode, $match_on,
|
||||
$include_attachments, $since_id, $search, $search_mode,
|
||||
$include_nested, $sanitize_content);
|
||||
|
||||
print $this->wrap(self::STATUS_OK, $headlines);
|
||||
|
@ -584,11 +583,11 @@ class API extends Handler {
|
|||
static function api_get_headlines($link, $feed_id, $limit, $offset,
|
||||
$filter, $is_cat, $show_excerpt, $show_content, $view_mode, $order,
|
||||
$include_attachments, $since_id,
|
||||
$search = "", $search_mode = "", $match_on = "",
|
||||
$search = "", $search_mode = "",
|
||||
$include_nested = false, $sanitize_content = true) {
|
||||
|
||||
$qfh_ret = queryFeedHeadlines($link, $feed_id, $limit,
|
||||
$view_mode, $is_cat, $search, $search_mode, $match_on,
|
||||
$view_mode, $is_cat, $search, $search_mode,
|
||||
$order, $offset, 0, false, $since_id, $include_nested);
|
||||
|
||||
$result = $qfh_ret[0];
|
||||
|
|
|
@ -236,8 +236,7 @@ class Dlg extends Handler_Protected {
|
|||
|
||||
print "<div style='float : right'>
|
||||
<img style='display : none'
|
||||
id='feed_add_spinner' src='".
|
||||
theme_image($this->link, 'images/indicator_white.gif')."'></div>";
|
||||
id='feed_add_spinner' src='images/indicator_white.gif'></div>";
|
||||
|
||||
print "<input style=\"font-size : 16px; width : 20em;\"
|
||||
placeHolder=\"".__("Feed or site URL")."\"
|
||||
|
@ -311,8 +310,7 @@ class Dlg extends Handler_Protected {
|
|||
print "<div dojoType=\"dijit.Toolbar\">
|
||||
<div style='float : right'>
|
||||
<img style='display : none'
|
||||
id='feed_browser_spinner' src='".
|
||||
theme_image($this->link, 'images/indicator_white.gif')."'>
|
||||
id='feed_browser_spinner' src='images/indicator_white.gif'>
|
||||
<input name=\"search\" dojoType=\"dijit.form.TextBox\" size=\"20\" type=\"search\"
|
||||
onchange=\"dijit.byId('feedBrowserDlg').update()\" value=\"$browser_search\">
|
||||
<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('feedBrowserDlg').update()\">".__('Search')."</button>
|
||||
|
|
|
@ -22,7 +22,7 @@ class Feeds extends Handler_Protected {
|
|||
}
|
||||
|
||||
private function format_headline_subtoolbar($feed_site_url, $feed_title,
|
||||
$feed_id, $is_cat, $search, $match_on,
|
||||
$feed_id, $is_cat, $search,
|
||||
$search_mode, $view_mode, $error) {
|
||||
|
||||
$page_prev_link = "viewFeedGoPage(-1)";
|
||||
|
@ -50,7 +50,7 @@ class Feeds extends Handler_Protected {
|
|||
if ($is_cat) $cat_q = "&is_cat=$is_cat";
|
||||
|
||||
if ($search) {
|
||||
$search_q = "&q=$search&m=$match_on&smode=$search_mode";
|
||||
$search_q = "&q=$search&smode=$search_mode";
|
||||
} else {
|
||||
$search_q = "";
|
||||
}
|
||||
|
@ -209,7 +209,6 @@ class Feeds extends Handler_Protected {
|
|||
}
|
||||
|
||||
@$search_mode = db_escape_string($_REQUEST["search_mode"]);
|
||||
$match_on = "both"; // deprecated, TODO: remove
|
||||
|
||||
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
|
||||
|
||||
|
@ -219,7 +218,7 @@ class Feeds extends Handler_Protected {
|
|||
}
|
||||
// error_log("search_mode: " . $search_mode);
|
||||
$qfh_ret = queryFeedHeadlines($this->link, $feed, $limit, $view_mode, $cat_view,
|
||||
$search, $search_mode, $match_on, $override_order, $offset, 0,
|
||||
$search, $search_mode, $override_order, $offset, 0,
|
||||
false, 0, $include_children);
|
||||
|
||||
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
|
||||
|
@ -233,7 +232,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['toolbar'] = $this->format_headline_subtoolbar($feed_site_url,
|
||||
$feed_title,
|
||||
$feed, $cat_view, $search, $match_on, $search_mode, $view_mode,
|
||||
$feed, $cat_view, $search, $search_mode, $view_mode,
|
||||
$last_error);
|
||||
|
||||
$headlines_count = db_num_rows($result);
|
||||
|
@ -321,24 +320,22 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
if ($line["marked"] == "t" || $line["marked"] == "1") {
|
||||
$marked_pic = "<img id=\"FMPIC-$id\"
|
||||
src=\"".theme_image($this->link, 'images/mark_set.svg')."\"
|
||||
src=\"images/mark_set.svg\"
|
||||
class=\"markedPic\" alt=\"Unstar article\"
|
||||
onclick='javascript:toggleMark($id)'>";
|
||||
} else {
|
||||
$marked_pic = "<img id=\"FMPIC-$id\"
|
||||
src=\"".theme_image($this->link, 'images/mark_unset.svg')."\"
|
||||
src=\"images/mark_unset.svg\"
|
||||
class=\"markedPic\" alt=\"Star article\"
|
||||
onclick='javascript:toggleMark($id)'>";
|
||||
}
|
||||
|
||||
if ($line["published"] == "t" || $line["published"] == "1") {
|
||||
$published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($this->link,
|
||||
'images/pub_set.svg')."\"
|
||||
$published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_set.svg\"
|
||||
class=\"markedPic\"
|
||||
alt=\"Unpublish article\" onclick='javascript:togglePub($id)'>";
|
||||
} else {
|
||||
$published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($this->link,
|
||||
'images/pub_unset.svg')."\"
|
||||
$published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_unset.svg\"
|
||||
class=\"markedPic\"
|
||||
alt=\"Publish article\" onclick='javascript:togglePub($id)'>";
|
||||
}
|
||||
|
@ -363,8 +360,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$score = $line["score"];
|
||||
|
||||
$score_pic = theme_image($this->link,
|
||||
"images/" . get_score_pic($score));
|
||||
$score_pic = "images/" . get_score_pic($score);
|
||||
|
||||
/* $score_title = __("(Click to change)");
|
||||
$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\"
|
||||
|
@ -628,14 +624,14 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['content'] .= "<span id=\"CWRAP-$id\">";
|
||||
|
||||
if (!$expand_cdm) {
|
||||
$reply['content'] .= "<span id=\"CENCW-$id\">";
|
||||
// if (!$expand_cdm) {
|
||||
$reply['content'] .= "<span id=\"CENCW-$id\" style=\"display : none\">";
|
||||
$reply['content'] .= htmlspecialchars($line["content"]);
|
||||
$reply['content'] .= "</span.";
|
||||
|
||||
} else {
|
||||
$reply['content'] .= $line["content"];
|
||||
}
|
||||
// } else {
|
||||
// $reply['content'] .= $line["content"];
|
||||
// }
|
||||
|
||||
$reply['content'] .= "</span>";
|
||||
|
||||
|
@ -650,8 +646,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$tags_str = format_tags_string($line["tags"], $id);
|
||||
|
||||
$reply['content'] .= "<img src='".theme_image($this->link,
|
||||
'images/tag.png')."' alt='Tags' title='Tags'>
|
||||
$reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'>
|
||||
<span id=\"ATSTR-$id\">$tags_str</span>
|
||||
<a title=\"".__('Edit tags for this article')."\"
|
||||
href=\"#\" onclick=\"editArticleTags($id, $feed_id, true)\">(+)</a>";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class Handler_Public extends Handler {
|
||||
|
||||
private function generate_syndicated_feed($owner_uid, $feed, $is_cat,
|
||||
$limit, $offset, $search, $search_mode, $match_on,
|
||||
$limit, $offset, $search, $search_mode,
|
||||
$view_mode = false, $format = 'atom') {
|
||||
|
||||
require_once "lib/MiniTemplator.class.php";
|
||||
|
@ -25,7 +25,7 @@ class Handler_Public extends Handler {
|
|||
|
||||
$qfh_ret = queryFeedHeadlines($this->link, $feed,
|
||||
$limit, $view_mode, $is_cat, $search, $search_mode,
|
||||
$match_on, "$date_sort_field DESC", $offset, $owner_uid,
|
||||
"$date_sort_field DESC", $offset, $owner_uid,
|
||||
false, 0, false, true);
|
||||
|
||||
$result = $qfh_ret[0];
|
||||
|
@ -314,7 +314,6 @@ class Handler_Public extends Handler {
|
|||
$offset = (int)db_escape_string($_REQUEST["offset"]);
|
||||
|
||||
$search = db_escape_string($_REQUEST["q"]);
|
||||
$match_on = db_escape_string($_REQUEST["m"]);
|
||||
$search_mode = db_escape_string($_REQUEST["smode"]);
|
||||
$view_mode = db_escape_string($_REQUEST["view-mode"]);
|
||||
|
||||
|
@ -338,7 +337,7 @@ class Handler_Public extends Handler {
|
|||
|
||||
if ($owner_id) {
|
||||
$this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit,
|
||||
$offset, $search, $search_mode, $match_on, $view_mode, $format);
|
||||
$offset, $search, $search_mode, $view_mode, $format);
|
||||
} else {
|
||||
header('HTTP/1.1 403 Forbidden');
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class Pref_Filters extends Handler_Protected {
|
|||
$feed_title = getFeedTitle($this->link, $feed);
|
||||
|
||||
$qfh_ret = queryFeedHeadlines($this->link, -4, 30, "", false, false, false,
|
||||
false, "date_entered DESC", 0, $_SESSION["uid"], $filter);
|
||||
"date_entered DESC", 0, $_SESSION["uid"], $filter);
|
||||
|
||||
$result = $qfh_ret[0];
|
||||
|
||||
|
@ -370,9 +370,9 @@ class Pref_Filters extends Handler_Protected {
|
|||
|
||||
$result = db_query($this->link, "SELECT description FROM ttrss_filter_types
|
||||
WHERE id = ".(int)$rule["filter_type"]);
|
||||
$match_on = db_fetch_result($result, 0, "description");
|
||||
$filter_type = db_fetch_result($result, 0, "description");
|
||||
|
||||
return T_sprintf("%s on %s in %s", strip_tags($rule["reg_exp"]), $match_on, $feed);
|
||||
return T_sprintf("%s on %s in %s", strip_tags($rule["reg_exp"]), $filter_type, $feed);
|
||||
}
|
||||
|
||||
function printRuleName() {
|
||||
|
|
|
@ -663,7 +663,7 @@ class RPC extends Handler_Protected {
|
|||
score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
|
||||
|
||||
print json_encode(array("id" => $id,
|
||||
"score_pic" => theme_image($link, get_score_pic($score))));
|
||||
"score_pic" => get_score_pic($score)));
|
||||
}
|
||||
|
||||
function setpanelmode() {
|
||||
|
|
|
@ -786,11 +786,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Deprecated, TODO: remove
|
||||
function theme_image($link, $filename) {
|
||||
return $filename;
|
||||
}
|
||||
|
||||
function convert_timestamp($timestamp, $source_tz, $dest_tz) {
|
||||
|
||||
try {
|
||||
|
@ -1825,10 +1820,10 @@
|
|||
function make_init_params($link) {
|
||||
$params = array();
|
||||
|
||||
$params["sign_progress"] = theme_image($link, "images/indicator_white.gif");
|
||||
$params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif");
|
||||
$params["sign_excl"] = theme_image($link, "images/sign_excl.svg");
|
||||
$params["sign_info"] = theme_image($link, "images/sign_info.svg");
|
||||
$params["sign_progress"] = "images/indicator_white.gif";
|
||||
$params["sign_progress_tiny"] = "images/indicator_tiny.gif";
|
||||
$params["sign_excl"] = "images/sign_excl.svg";
|
||||
$params["sign_info"] = "images/sign_info.svg";
|
||||
|
||||
foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS",
|
||||
"ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP",
|
||||
|
@ -2065,7 +2060,7 @@
|
|||
return $data;
|
||||
}
|
||||
|
||||
function search_to_sql($link, $search, $match_on) {
|
||||
function search_to_sql($link, $search) {
|
||||
|
||||
$search_query_part = "";
|
||||
|
||||
|
@ -2112,13 +2107,9 @@
|
|||
//$k = date("Y-m-d", strtotime(substr($k, 1)));
|
||||
|
||||
array_push($query_keywords, "(".SUBSTRING_FOR_DATE."(updated,1,LENGTH('$k')) $not = '$k')");
|
||||
} else if ($match_on == "both") {
|
||||
} else {
|
||||
array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%')
|
||||
OR UPPER(ttrss_entries.content) $not LIKE UPPER('%$k%'))");
|
||||
} else if ($match_on == "title") {
|
||||
array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%'))");
|
||||
} else if ($match_on == "content") {
|
||||
array_push($query_keywords, "(UPPER(ttrss_entries.content) $not LIKE UPPER('%$k%'))");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2155,7 +2146,7 @@
|
|||
return $rv;
|
||||
}
|
||||
|
||||
function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on, $override_order = false, $offset = 0, $owner_uid = 0, $filter = false, $since_id = 0, $include_children = false, $ignore_vfeed_group = false) {
|
||||
function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $override_order = false, $offset = 0, $owner_uid = 0, $filter = false, $since_id = 0, $include_children = false, $ignore_vfeed_group = false) {
|
||||
|
||||
if (!$owner_uid) $owner_uid = $_SESSION["uid"];
|
||||
|
||||
|
@ -2172,7 +2163,7 @@
|
|||
$search_query_part = "ref_id = -1 AND ";
|
||||
|
||||
} else {
|
||||
$search_query_part = search_to_sql($link, $search, $match_on);
|
||||
$search_query_part = search_to_sql($link, $search);
|
||||
$search_query_part .= " AND ";
|
||||
}
|
||||
|
||||
|
@ -2634,7 +2625,8 @@
|
|||
|
||||
$entries = $xpath->query('//iframe');
|
||||
foreach ($entries as $entry) {
|
||||
$entry->setAttribute('sandbox', true);
|
||||
$entry->setAttribute('sandbox', 'allow-scripts');
|
||||
|
||||
}
|
||||
|
||||
global $pluginhost;
|
||||
|
@ -2656,7 +2648,7 @@
|
|||
|
||||
$allowed_elements = array('a', 'address', 'audio', 'article',
|
||||
'b', 'big', 'blockquote', 'body', 'br', 'cite',
|
||||
'code', 'dd', 'del', 'details', 'div', 'dl',
|
||||
'code', 'dd', 'del', 'details', 'div', 'dl', 'font',
|
||||
'dt', 'em', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||
'header', 'html', 'i', 'img', 'ins', 'kbd',
|
||||
'li', 'nav', 'ol', 'p', 'pre', 'q', 's','small',
|
||||
|
@ -2838,19 +2830,19 @@
|
|||
function format_warning($msg, $id = "") {
|
||||
global $link;
|
||||
return "<div class=\"warning\" id=\"$id\">
|
||||
<img src=\"".theme_image($link, "images/sign_excl.svg")."\">$msg</div>";
|
||||
<img src=\"images/sign_excl.svg\">$msg</div>";
|
||||
}
|
||||
|
||||
function format_notice($msg, $id = "") {
|
||||
global $link;
|
||||
return "<div class=\"notice\" id=\"$id\">
|
||||
<img src=\"".theme_image($link, "images/sign_info.svg")."\">$msg</div>";
|
||||
<img src=\"images/sign_info.svg\">$msg</div>";
|
||||
}
|
||||
|
||||
function format_error($msg, $id = "") {
|
||||
global $link;
|
||||
return "<div class=\"error\" id=\"$id\">
|
||||
<img src=\"".theme_image($link, "images/sign_excl.svg")."\">$msg</div>";
|
||||
<img src=\"images/sign_excl.svg\">$msg</div>";
|
||||
}
|
||||
|
||||
function print_notice($msg) {
|
||||
|
@ -3039,7 +3031,7 @@
|
|||
if (!$entry_comments) $entry_comments = " "; # placeholder
|
||||
|
||||
$rv['content'] .= "<div class='postTags' style='float : right'>
|
||||
<img src='".theme_image($link, 'images/tag.png')."'
|
||||
<img src='images/tag.png'
|
||||
class='tagsPic' alt='Tags' title='Tags'> ";
|
||||
|
||||
if (!$zoom_mode) {
|
||||
|
|
11
index.php
11
index.php
|
@ -128,11 +128,11 @@
|
|||
<div id="header">
|
||||
<img id="net-alert" style="display : none"
|
||||
title="<?php echo __("Communication problem with server.") ?>"
|
||||
src="<?php echo theme_image($link, 'images/alert.png') ?>"/>
|
||||
src="images/alert.png"/>
|
||||
|
||||
<img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
|
||||
width="13" height="13"
|
||||
src="<?php echo theme_image($link, 'images/new_version.png') ?>"
|
||||
src="images/new_version.png"
|
||||
title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
|
||||
alt="new_version_icon"/>
|
||||
</div>
|
||||
|
@ -185,7 +185,8 @@
|
|||
<option value="score"><?php echo __('Score') ?></option>
|
||||
</select>
|
||||
|
||||
<button dojoType="dijit.form.Button" name="update"
|
||||
<!-- deprecated -->
|
||||
<button dojoType="dijit.form.Button" name="update" style="display : none"
|
||||
onclick="viewCurrentFeed()">
|
||||
<?php echo __('Update') ?></button>
|
||||
|
||||
|
@ -200,12 +201,12 @@
|
|||
<button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
|
||||
title="<?php echo __("Communication problem with server.") ?>">
|
||||
<img
|
||||
src="<?php echo theme_image($link, 'images/alert.png') ?>" />
|
||||
src="images/alert.png" />
|
||||
</button>
|
||||
|
||||
<button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none">
|
||||
<img onclick="newVersionDlg()"
|
||||
src="<?php echo theme_image($link, 'images/new_version.png') ?>"
|
||||
src="images/new_version.png"
|
||||
title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
|
||||
</button>
|
||||
|
||||
|
|
|
@ -1746,7 +1746,7 @@ function feedBrowser() {
|
|||
} });
|
||||
},
|
||||
removeFromArchive: function() {
|
||||
var selected = this.getSelectedFeeds();
|
||||
var selected = this.getSelectedFeedIds();
|
||||
|
||||
if (selected.length > 0) {
|
||||
|
||||
|
@ -1755,7 +1755,7 @@ function feedBrowser() {
|
|||
if (confirm(pr)) {
|
||||
Element.show('feed_browser_spinner');
|
||||
|
||||
var query = "?op=rpc&method=remarchived&ids=" +
|
||||
var query = "?op=rpc&method=remarchive&ids=" +
|
||||
param_escape(selected.toString());;
|
||||
|
||||
new Ajax.Request("backend.php", {
|
||||
|
|
|
@ -205,6 +205,8 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|||
|
||||
_infscroll_request_sent = 0;
|
||||
|
||||
headlines_scroll_handler($("headlines-frame"));
|
||||
|
||||
notify("");
|
||||
|
||||
} catch (e) {
|
||||
|
@ -541,7 +543,7 @@ function moveToPost(mode, noscroll) {
|
|||
|
||||
} else if (next_id) {
|
||||
cdmExpandArticle(next_id);
|
||||
cdmScrollToArticleId(next_id, noscroll);
|
||||
cdmScrollToArticleId(next_id, true);
|
||||
}
|
||||
|
||||
} else if (next_id) {
|
||||
|
@ -560,8 +562,13 @@ function moveToPost(mode, noscroll) {
|
|||
var ctr = $("headlines-frame");
|
||||
|
||||
if (!getInitParam("cdm_expanded")) {
|
||||
cdmExpandArticle(prev_id);
|
||||
cdmScrollToArticleId(prev_id, true);
|
||||
|
||||
if (!noscroll && article.offsetTop < ctr.scrollTop) {
|
||||
scrollArticle(-ctr.offsetHeight/3);
|
||||
} else {
|
||||
cdmExpandArticle(prev_id);
|
||||
cdmScrollToArticleId(prev_id, true);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!noscroll && article && article.offsetTop < ctr.scrollTop) {
|
||||
|
@ -1171,6 +1178,23 @@ function headlines_scroll_handler(e) {
|
|||
try {
|
||||
var hsp = $("headlines-spacer");
|
||||
|
||||
$$("#headlines-frame > div[id*=RROW]").each(
|
||||
function(child) {
|
||||
if (child.offsetTop <= $("headlines-frame").scrollTop +
|
||||
$("headlines-frame").offsetHeight) {
|
||||
|
||||
var cencw = $("CENCW-" + child.id.replace("RROW-", ""));
|
||||
|
||||
if (cencw) {
|
||||
cencw.innerHTML = htmlspecialchars_decode(cencw.innerHTML);
|
||||
cencw.setAttribute('id', '');
|
||||
Element.show(cencw);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
if (!_infscroll_disable) {
|
||||
if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) ||
|
||||
(e.scrollHeight != 0 &&
|
||||
|
@ -1192,7 +1216,7 @@ function headlines_scroll_handler(e) {
|
|||
|
||||
$$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
|
||||
function(child) {
|
||||
if ($("headlines-frame").scrollTop >
|
||||
if (child.hasClassName("Unread") && $("headlines-frame").scrollTop >
|
||||
(child.offsetTop + child.offsetHeight/2)) {
|
||||
|
||||
var id = child.id.replace("RROW-", "");
|
||||
|
@ -1348,7 +1372,6 @@ function cdmCollapseArticle(event, id) {
|
|||
|
||||
function cdmExpandArticle(id) {
|
||||
try {
|
||||
|
||||
console.log("cdmExpandArticle " + id);
|
||||
|
||||
hideAuxDlg();
|
||||
|
@ -1373,10 +1396,6 @@ function cdmExpandArticle(id) {
|
|||
|
||||
setActiveArticleId(id);
|
||||
|
||||
if (!getInitParam("cdm_expanded")) {
|
||||
cdmScrollToArticleId(id, true);
|
||||
}
|
||||
|
||||
elem = $("CICD-" + id);
|
||||
|
||||
var collapse = $$("div#RROW-" + id +
|
||||
|
@ -1388,6 +1407,7 @@ function cdmExpandArticle(id) {
|
|||
if (cencw) {
|
||||
cencw.innerHTML = htmlspecialchars_decode(cencw.innerHTML);
|
||||
cencw.setAttribute('id', '');
|
||||
Element.show(cencw);
|
||||
}
|
||||
|
||||
Element.show(elem);
|
||||
|
@ -1395,12 +1415,10 @@ function cdmExpandArticle(id) {
|
|||
Element.show(collapse);
|
||||
}
|
||||
|
||||
/* var new_offset = $("RROW-" + id).offsetTop;
|
||||
var new_offset = $("RROW-" + id).offsetTop;
|
||||
|
||||
$("headlines-frame").scrollTop += (new_offset-old_offset);
|
||||
|
||||
if ($("RROW-" + id).offsetTop != old_offset)
|
||||
$("headlines-frame").scrollTop = new_offset; */
|
||||
if (old_offset > new_offset)
|
||||
$("headlines-frame").scrollTop -= (old_offset-new_offset);
|
||||
|
||||
toggleUnread(id, 0, true);
|
||||
toggleSelected(id);
|
||||
|
|
|
@ -341,14 +341,12 @@
|
|||
|
||||
if ($search) {
|
||||
$search_mode = 'this_feed';
|
||||
$match_on = 'both';
|
||||
} else {
|
||||
$search_mode = '';
|
||||
$match_on = '';
|
||||
}
|
||||
|
||||
$qfh_ret = queryFeedHeadlines($link, $feed_id, $limit,
|
||||
$view_mode, $is_cat, $search, $search_mode, $match_on,
|
||||
$view_mode, $is_cat, $search, $search_mode,
|
||||
"score DESC, date_entered ".(mobile_get_pref($link, 'REVERSE_HEADLINES') ? 'ASC' : 'DESC'), $offset);
|
||||
|
||||
$result = $qfh_ret[0];
|
||||
|
|
|
@ -18,7 +18,7 @@ class Close_Button extends Plugin {
|
|||
|
||||
function hook_article_button($line) {
|
||||
if (!get_pref($this->link, "COMBINED_DISPLAY_MODE")) {
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/close_button/button.png')."\"
|
||||
$rv = "<img src=\"plugins/close_button/button.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"closeArticlePanel()\"
|
||||
title='".__('Close article')."'>";
|
||||
|
|
|
@ -25,7 +25,7 @@ class Flattr extends Plugin {
|
|||
$encoded = urlencode($article_link);
|
||||
$r = file_get_contents("https://api.flattr.com/rest/v2/things/lookup/?url=$encoded");
|
||||
$response = json_decode($r, true);
|
||||
$image = "<img src=\"".theme_image($this->link, 'plugins/flattr/flattr.png')."\"
|
||||
$image = "<img src=\"plugins/flattr/flattr.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
title='".__('Flattr this article.')."'>";
|
||||
// if Flattr has it in the catalogue, we display the button
|
||||
|
|
|
@ -23,7 +23,7 @@ class GooglePlus extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
$article_id = $line["id"];
|
||||
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/googleplus/googleplus.png')."\"
|
||||
$rv = "<img src=\"plugins/googleplus/googleplus.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"shareArticleToGooglePlus($article_id)\"
|
||||
title='".__('Share on Google+')."'>";
|
||||
|
|
|
@ -23,7 +23,7 @@ class Identica extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
$article_id = $line["id"];
|
||||
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/identica/identica.png')."\"
|
||||
$rv = "<img src=\"plugins/identica/identica.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"shareArticleToIdentica($article_id)\"
|
||||
title='".__('Share on identi.ca')."'>";
|
||||
|
|
|
@ -22,7 +22,7 @@ class Mail extends Plugin {
|
|||
}
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"".theme_image($link, 'plugins/mail/mail.png')."\"
|
||||
return "<img src=\"plugins/mail/mail.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"emailArticle(".$line["id"].")\"
|
||||
alt='Zoom' title='".__('Forward by email')."'>";
|
||||
|
|
|
@ -22,7 +22,7 @@ class MailTo extends Plugin {
|
|||
}
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"".theme_image($link, 'plugins/mailto/mail.png')."\"
|
||||
return "<img src=\"plugins/mailto/mail.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"mailtoArticle(".$line["id"].")\"
|
||||
alt='Zoom' title='".__('Forward by email')."'>";
|
||||
|
|
|
@ -22,7 +22,7 @@ class Note extends Plugin {
|
|||
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"".theme_image($this->link, "plugins/note/note.png")."\"
|
||||
return "<img src=\"plugins/note/note.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"editArticleNote(".$line["id"].")\"
|
||||
class='tagsPic' title='".__('Edit article note')."'>";
|
||||
|
|
|
@ -68,7 +68,7 @@ class OwnCloud extends Plugin {
|
|||
}
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"".theme_image($this->link, "plugins/owncloud/owncloud.png")."\"
|
||||
return "<img src=\"plugins/owncloud/owncloud.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"ownArticle(".$line["id"].")\"
|
||||
class='tagsPic' title='".__('Bookmark on OwnCloud ')."'>";
|
||||
|
|
|
@ -23,7 +23,7 @@ class Pinterest extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
$article_id = $line["id"];
|
||||
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/pinterest/pinterest.png')."\"
|
||||
$rv = "<img src=\"plugins/pinterest/pinterest.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"pinterest($article_id)\"
|
||||
title='".__('Pinterest')."'>";
|
||||
|
|
|
@ -24,7 +24,7 @@ class Pocket extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
$article_id = $line["id"];
|
||||
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/pocket/pocket.png')."\"
|
||||
$rv = "<img src=\"plugins/pocket/pocket.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"shareArticleToPocket($article_id)\"
|
||||
title='".__('Pocket')."'>";
|
||||
|
|
|
@ -21,7 +21,7 @@ class Share extends Plugin {
|
|||
}
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"".theme_image($this->link, 'plugins/share/share.png')."\"
|
||||
return "<img src=\"plugins/share/share.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"shareArticle(".$line['int_id'].")\"
|
||||
title='".__('Share by URL')."'>";
|
||||
|
|
|
@ -23,7 +23,7 @@ class Tweet extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
$article_id = $line["id"];
|
||||
|
||||
$rv = "<img src=\"".theme_image($this->link, 'plugins/tweet/tweet.png')."\"
|
||||
$rv = "<img src=\"plugins/tweet/tweet.png\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"tweetArticle($article_id)\"
|
||||
title='".__('Share on Twitter')."'>";
|
||||
|
|
Loading…
Reference in a new issue