[aur-dev] [PATCH v3 2/2] Show number of selected packages on search page
Lukas Fleischer
lfleischer at archlinux.org
Sat Jul 4 09:28:19 UTC 2015
On Fri, 03 Jul 2015 at 01:52:58, Johannes Löthberg wrote:
> Fixes FS#45379.
>
> Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
> ---
> Changes since v3:
> * Set the initial string on page load.
> * Use jQuery method to set the change function instead of looping over
> the checkboxes. (Thank you carstene1ns for the recommendation.)
>
> web/html/packages.php | 16 ++++++++++++++++
> web/template/pkg_search_results.php | 5 ++++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/web/html/packages.php b/web/html/packages.php
> index bf3daf8..da7b7de 100644
> --- a/web/html/packages.php
> +++ b/web/html/packages.php
> @@ -71,6 +71,22 @@ $(document).ready(function() {
> collapseDependsList("#pkgdepslist");
> collapseDependsList("#pkgreqslist");
> collapseDependsList("#pkgsrcslist");
> +
> + function update_checked_count() {
> + var one_pkg = '<?= __("1 package selected") ?>';
> + var pkgs = '<?= __("%s packages selected") ?>';
> [...]
Can we use %d here? Looks fine otherwise!
More information about the aur-dev
mailing list