Commit 78f4193a authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1822694: Correctly show the 'match all tags' option



When in the pages index page for
- users
- groups
- institutions
- site

behatnotneeded

Change-Id: I368fad84abfa3fe293144ea16ba13ef757e6b6e9
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 41eff50c)
parent d946010e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ else {
$js = <<< EOF
jQuery(function() {
    {$pagination['javascript']}
    showmatchall();
EOF;
if ($offset > 0) {
    $js .= <<< EOF
+14 −0
Original line number Diff line number Diff line
@@ -1164,3 +1164,17 @@ function pmeter_presubmit(form, btn) {

    formStartProcessing(form, btn);
}

function showmatchall() {
    if ($('#searchviews_type').val() == 'tagsonly') {
        $('#searchviews_matchalltags_container').parent().find('.d-none').removeClass('d-none'); // because the d-none from form is on container and input
    }
    else {
        $('#searchviews_matchalltags_container').addClass('d-none');
    }
}
$(function() {
    $('#searchviews_type').on('change', function() {
        showmatchall();
    });
});
+1 −1
Original line number Diff line number Diff line
@@ -4436,7 +4436,7 @@ class View {
                ),
                'matchalltags' => array (
                    'type' => 'checkbox',
                    'class' => 'matchalltags',
                    'class' => 'matchalltags d-none',
                    'title' => get_string('matchalltags', 'view'),
                    'defaultvalue' => $matchalltags,
                    'description' => get_string('matchalltagsdesc', 'view'),
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ else {
$js = <<< EOF
jQuery(function ($) {
    {$pagination['javascript']}
    showmatchall();
EOF;
if ($offset > 0) {
    $js .= <<< EOF
+0 −11
Original line number Diff line number Diff line
@@ -27,17 +27,6 @@ list($searchform, $data, $pagination) = View::views_by_owner();
$js = <<< EOF
jQuery(function ($) {
    {$pagination['javascript']}
    function showmatchall() {
        if ($('#searchviews_type').val() == 'tagsonly') {
            $('#searchviews_matchalltags_container').show();
        }
        else {
            $('#searchviews_matchalltags_container').hide();
        }
    }
    $('#searchviews_type').on('change', function() {
        showmatchall();
    });
    showmatchall();
EOF;
if ($offset > 0) {
Loading