Subversion Repositories cheapmusic

Rev

Rev 130 | Rev 133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 130 Rev 132
Line 868... Line 868...
868
        $xh->tag('i', "view_module");
868
        $xh->tag('i', "view_module");
869
        $xh->close(); // button
869
        $xh->close(); // button
870
    }
870
    }
871
    $xh->close(); // span
871
    $xh->close(); // span
872
 
872
 
-
 
873
    $xh->add_attribute("nonce", base64_encode($_SESSION["nonce"]));
-
 
874
    $xh->tag('script');
-
 
875
        $str  = trim('document.addEventListener("DOMContentLoaded", function() {');
-
 
876
        $str .= trim('    document.getElementById("resultViewToggle").addEventListener("click", function(event) {');
-
 
877
        $str .= trim('        window.dataLayer.push({ "event" : "trackEvent", "eventCategory" : "Result View", "eventAction" : "Toggle", "eventLabel" : "' . ($_SESSION["currentLayout"] == "CardView" ? "Table View" : "Card View") . '"});');
-
 
878
        $str .= trim('    });');
-
 
879
        $str .= trim('});');
-
 
880
    $xh->insert_code($str);
-
 
881
    $xh->close(); // script
-
 
882
    
873
    $xh->add_attribute("class", "navbar-text float-right ml-3");
883
    $xh->add_attribute("class", "navbar-text float-right ml-3");
874
    $xh->tag('span');
884
    $xh->tag('span');
875
    $xh->tag('span', "Showing ");
885
    $xh->tag('span', "Showing ");
876
    $xh->add_attribute("class", "d-block d-md-none");
886
    $xh->add_attribute("class", "d-block d-md-none");
877
    $xh->tag('span', "<br>");
887
    $xh->tag('span', "<br>");