remove RCHK
This commit is contained in:
parent
6e0d1c8116
commit
7e27c91409
3 changed files with 24 additions and 20 deletions
|
@ -457,7 +457,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
|
||||
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
|
||||
id=\"RCHK-$id\">";
|
||||
class='rchk'>";
|
||||
|
||||
$reply['content'] .= "$marked_pic";
|
||||
$reply['content'] .= "$published_pic";
|
||||
|
@ -563,7 +563,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
|
||||
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
|
||||
id=\"RCHK-$id\">";
|
||||
class='rchk'>";
|
||||
|
||||
$reply['content'] .= "$marked_pic";
|
||||
$reply['content'] .= "$published_pic";
|
||||
|
|
16
js/tt-rss.js
16
js/tt-rss.js
|
@ -452,11 +452,17 @@ function init() {
|
|||
hotkey_actions["select_article_cursor"] = function() {
|
||||
var id = getArticleUnderPointer();
|
||||
if (id) {
|
||||
var cb = dijit.byId("RCHK-" + id);
|
||||
if (cb) {
|
||||
cb.attr("checked", !cb.attr("checked"));
|
||||
toggleSelectRowById(cb, "RROW-" + id);
|
||||
return false;
|
||||
var row = $("RROW-" + id);
|
||||
|
||||
if (row) {
|
||||
var cb = dijit.getEnclosingWidget(
|
||||
row.getElementsByClassName("rchk")[0]);
|
||||
|
||||
if (cb) {
|
||||
cb.attr("checked", !cb.attr("checked"));
|
||||
toggleSelectRowById(cb, "RROW-" + id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -160,16 +160,10 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|||
initHeadlinesMenu();
|
||||
|
||||
new_elems.each(function(child) {
|
||||
var cb = dijit.byId(child.id.replace("RROW-", "RCHK-"));
|
||||
dojo.parser.parse(child);
|
||||
|
||||
if (!cb) {
|
||||
dojo.parser.parse(child);
|
||||
|
||||
if (!Element.visible(child))
|
||||
new Effect.Appear(child, { duration : 0.5 });
|
||||
} else {
|
||||
c.domNode.removeChild(child);
|
||||
}
|
||||
if (!Element.visible(child))
|
||||
new Effect.Appear(child, { duration : 0.5 });
|
||||
});
|
||||
|
||||
} else {
|
||||
|
@ -617,11 +611,12 @@ function moveToPost(mode, noscroll, noexpand) {
|
|||
|
||||
function toggleSelected(id, force_on) {
|
||||
try {
|
||||
|
||||
var cb = dijit.byId("RCHK-" + id);
|
||||
var row = $("RROW-" + id);
|
||||
|
||||
if (row) {
|
||||
var cb = dijit.getEnclosingWidget(
|
||||
row.getElementsByClassName("rchk")[0]);
|
||||
|
||||
if (row.hasClassName('Selected') && !force_on) {
|
||||
row.removeClassName('Selected');
|
||||
if (cb) cb.attr("checked", false);
|
||||
|
@ -904,7 +899,9 @@ function selectArticles(mode) {
|
|||
|
||||
children.each(function(child) {
|
||||
var id = child.id.replace("RROW-", "");
|
||||
var cb = dijit.byId("RCHK-" + id);
|
||||
|
||||
var cb = dijit.getEnclosingWidget(
|
||||
child.getElementsByClassName("rchk")[0]);
|
||||
|
||||
if (mode == "all") {
|
||||
child.addClassName("Selected");
|
||||
|
@ -1739,7 +1736,8 @@ function markHeadline(id, marked) {
|
|||
|
||||
var row = $("RROW-" + id);
|
||||
if (row) {
|
||||
var check = dijit.byId("RCHK-" + id);
|
||||
var check = dijit.getEnclosingWidget(
|
||||
row.getElementsByClassName("rchk")[0]);
|
||||
|
||||
if (check) {
|
||||
check.attr("checked", marked);
|
||||
|
|
Loading…
Reference in a new issue