add a %d articles selected element
This commit is contained in:
parent
884f2aee91
commit
e43a9c4a01
|
@ -49,6 +49,7 @@ class Feeds extends Handler_Protected {
|
|||
// right part
|
||||
|
||||
$reply .= "<span class='r'>";
|
||||
$reply .= "<span id='selected_prompt'></span>";
|
||||
$reply .= "<span id='feed_title'>";
|
||||
|
||||
if ($feed_site_url) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1019,3 +1019,6 @@ div.hl.active a.title {
|
|||
color : #4684ff;
|
||||
}
|
||||
|
||||
#selected_prompt {
|
||||
margin-right : 25px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue