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\"
|
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
|
||||||
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
|
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
|
||||||
id=\"RCHK-$id\">";
|
class='rchk'>";
|
||||||
|
|
||||||
$reply['content'] .= "$marked_pic";
|
$reply['content'] .= "$marked_pic";
|
||||||
$reply['content'] .= "$published_pic";
|
$reply['content'] .= "$published_pic";
|
||||||
|
@ -563,7 +563,7 @@ class Feeds extends Handler_Protected {
|
||||||
|
|
||||||
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
|
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
|
||||||
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
|
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
|
||||||
id=\"RCHK-$id\">";
|
class='rchk'>";
|
||||||
|
|
||||||
$reply['content'] .= "$marked_pic";
|
$reply['content'] .= "$marked_pic";
|
||||||
$reply['content'] .= "$published_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() {
|
hotkey_actions["select_article_cursor"] = function() {
|
||||||
var id = getArticleUnderPointer();
|
var id = getArticleUnderPointer();
|
||||||
if (id) {
|
if (id) {
|
||||||
var cb = dijit.byId("RCHK-" + id);
|
var row = $("RROW-" + id);
|
||||||
if (cb) {
|
|
||||||
cb.attr("checked", !cb.attr("checked"));
|
if (row) {
|
||||||
toggleSelectRowById(cb, "RROW-" + id);
|
var cb = dijit.getEnclosingWidget(
|
||||||
return false;
|
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();
|
initHeadlinesMenu();
|
||||||
|
|
||||||
new_elems.each(function(child) {
|
new_elems.each(function(child) {
|
||||||
var cb = dijit.byId(child.id.replace("RROW-", "RCHK-"));
|
dojo.parser.parse(child);
|
||||||
|
|
||||||
if (!cb) {
|
if (!Element.visible(child))
|
||||||
dojo.parser.parse(child);
|
new Effect.Appear(child, { duration : 0.5 });
|
||||||
|
|
||||||
if (!Element.visible(child))
|
|
||||||
new Effect.Appear(child, { duration : 0.5 });
|
|
||||||
} else {
|
|
||||||
c.domNode.removeChild(child);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -617,11 +611,12 @@ function moveToPost(mode, noscroll, noexpand) {
|
||||||
|
|
||||||
function toggleSelected(id, force_on) {
|
function toggleSelected(id, force_on) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var cb = dijit.byId("RCHK-" + id);
|
|
||||||
var row = $("RROW-" + id);
|
var row = $("RROW-" + id);
|
||||||
|
|
||||||
if (row) {
|
if (row) {
|
||||||
|
var cb = dijit.getEnclosingWidget(
|
||||||
|
row.getElementsByClassName("rchk")[0]);
|
||||||
|
|
||||||
if (row.hasClassName('Selected') && !force_on) {
|
if (row.hasClassName('Selected') && !force_on) {
|
||||||
row.removeClassName('Selected');
|
row.removeClassName('Selected');
|
||||||
if (cb) cb.attr("checked", false);
|
if (cb) cb.attr("checked", false);
|
||||||
|
@ -904,7 +899,9 @@ function selectArticles(mode) {
|
||||||
|
|
||||||
children.each(function(child) {
|
children.each(function(child) {
|
||||||
var id = child.id.replace("RROW-", "");
|
var id = child.id.replace("RROW-", "");
|
||||||
var cb = dijit.byId("RCHK-" + id);
|
|
||||||
|
var cb = dijit.getEnclosingWidget(
|
||||||
|
child.getElementsByClassName("rchk")[0]);
|
||||||
|
|
||||||
if (mode == "all") {
|
if (mode == "all") {
|
||||||
child.addClassName("Selected");
|
child.addClassName("Selected");
|
||||||
|
@ -1739,7 +1736,8 @@ function markHeadline(id, marked) {
|
||||||
|
|
||||||
var row = $("RROW-" + id);
|
var row = $("RROW-" + id);
|
||||||
if (row) {
|
if (row) {
|
||||||
var check = dijit.byId("RCHK-" + id);
|
var check = dijit.getEnclosingWidget(
|
||||||
|
row.getElementsByClassName("rchk")[0]);
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
check.attr("checked", marked);
|
check.attr("checked", marked);
|
||||||
|
|
Loading…
Reference in a new issue