cdm: tweak the way hotkey article dismissing works; toggle select article by clicking on it
This commit is contained in:
parent
779560b7a3
commit
bfa0e7921d
|
@ -5476,7 +5476,9 @@
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
print "<div class=\"cdmContent\" $content_hidden
|
print "<div class=\"cdmContent\" $content_hidden
|
||||||
|
title=\"".__("Click to select article")."\"
|
||||||
|
onclick=\"toggleSelected($id);\"
|
||||||
id=\"CICD-$id\">";
|
id=\"CICD-$id\">";
|
||||||
|
|
||||||
print "<div class=\"cdmContentInner\">";
|
print "<div class=\"cdmContentInner\">";
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<tr><td class='n'>S</td><td><?php echo __("Toggle published") ?></td></tr>
|
<tr><td class='n'>S</td><td><?php echo __("Toggle published") ?></td></tr>
|
||||||
<tr><td class='n'>u</td><td><?php echo __("Toggle unread") ?></td></tr>
|
<tr><td class='n'>u</td><td><?php echo __("Toggle unread") ?></td></tr>
|
||||||
<tr><td class='n'>T</td><td><?php echo __("Edit tags") ?></td></tr>
|
<tr><td class='n'>T</td><td><?php echo __("Edit tags") ?></td></tr>
|
||||||
<tr><td class='n'>D</td><td><?php echo __("In combined mode, dismiss article") ?></td></tr>
|
<tr><td class='n'>D</td><td><?php echo __("In combined mode, dismiss selected articles") ?></td></tr>
|
||||||
<tr><td class='n'>o</td><td><?php echo __("Open article in new window") ?></td></tr>
|
<tr><td class='n'>o</td><td><?php echo __("Open article in new window") ?></td></tr>
|
||||||
<tr><td class='n'>c n/c p</td><td><?php echo __("Mark articles below/above active one as read") ?></td></tr>
|
<tr><td class='n'>c n/c p</td><td><?php echo __("Mark articles below/above active one as read") ?></td></tr>
|
||||||
<tr><td class='n'>N/P</td><td><?php echo __("Scroll article content") ?></td></tr>
|
<tr><td class='n'>N/P</td><td><?php echo __("Scroll article content") ?></td></tr>
|
||||||
|
|
|
@ -1006,8 +1006,9 @@ function hotkey_handler(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keycode == 68 && shift_key) { // shift-D
|
if (keycode == 68 && shift_key) { // shift-D
|
||||||
if (isCdmMode() && active_post_id) {
|
if (isCdmMode()) {
|
||||||
cdmDismissArticle(active_post_id);
|
//cdmDismissArticle(active_post_id);
|
||||||
|
cdmDismissSelectedArticles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
viewfeed.js
18
viewfeed.js
|
@ -2366,3 +2366,21 @@ function cdmDismissArticle(id) {
|
||||||
exception_error("cdmDismissArticle", e);
|
exception_error("cdmDismissArticle", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cdmDismissSelectedArticles() {
|
||||||
|
try {
|
||||||
|
|
||||||
|
var ids = getSelectedArticleIds2();
|
||||||
|
|
||||||
|
for (var i = 0; i < ids.length; i++) {
|
||||||
|
var elem = $("RROW-" + ids[i]);
|
||||||
|
new Effect.Fade(elem, {duration : 0.5});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ids.length > 0)
|
||||||
|
selectionToggleUnread(false);
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
exception_error("cdmDismissArticle", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue