Commit 85f411c1 authored by Robert Lyon's avatar Robert Lyon Committed by Doris Tam
Browse files

Bug 1959860: Plugin info link needs to work as button also



Before we were checking only for a <A> parent but now
we check for either an <A> or <Button> parent that has the data
attribute we need.

This patch makes it possible to click the 'Info' button at
Admin menu -> Extensions -> Plugin administration -> courseinfo
and have the modal appear with the additional information.

Change-Id: I3a94c21d84933662f67f7e35a2a1887e845693d9
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 47f03585)
parent 448b530a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -120,8 +120,8 @@ jQuery(function($) {
    $('.info-item').on("click", function(e) {
        e.preventDefault();
        infochosen = e.target;
        if (!$(infochosen).is('A')) {
            infochosen = $(infochosen).closest('A')[0].outerHTML;
        if (!$(infochosen).is('A') && !$(infochosen).is('BUTTON')) {
            infochosen = $(infochosen).closest('[data-plugintype]')[0].outerHTML;
        }
        $("#infomodal").modal("show");
    });