Subversion Repositories SmartDukaan

Rev

Rev 32846 | Rev 32848 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
32846 ranu 1
<style>
2
 
3
    .expanded {
4
        position: absolute;
5
        z-index: 9999;
32847 ranu 6
        box-shadow: 1px 2px 3px #ccc !important;
7
        background: white;
8
        max-height: unset !important;
32846 ranu 9
    }
10
</style>
11
 
29676 amit.gupta 12
#foreach( $offer in $publishedOffers )
32846 ranu 13
<div class="col-lg-6 info-box white-bg mk_offer_container" style="margin-bottom:1px">
14
    <h3 style="margin-top:-2px;color:#c70db8;margin-bottom:4px;font-weight:bold; font-size:20px;">
15
        $offer.getName()
16
    </h3>
17
    <h5 style="margin-top:-2px;font-size:15px;color:#5547d0;font-weight:bold">
18
        From $dateMonthFormatter.format($offer.getStartDate()) to $dateMonthFormatter.format($offer.getEndDate()), Based
19
        on $offer.getSchemeType()
20
    </h5>
21
    <h4 style="color:green;margin-top:0px;margin-bottom:0px;">
22
        $offer.getDashboardHtml()
23
    </h4>
24
    <br>
25
    <span onclick="showMore(this)">See More</span>
26
    <p style="float:right;font-size:15px; margin:0px 0px 0px; " class="description-offer"
27
       data-offerid="$offer.getId()" data-toggle="modal"
28
       data-backdrop="static" data-keyboard="false"><a href="javascript:void(0)">All terms & conditions</a></p>
29
</div>
29729 manish 30
#end
32846 ranu 31
 
32
<script>
33
    function showMore(button) {
34
        // Find the closest parent container with the class "mk_offer_container"
35
        var parentContainer = button.closest(".mk_offer_container");
36
        var mainparentContainer = button.closest("#offer-container");
37
 
38
        // Get all elements with class "mk_show" inside the parent container
39
        var mkShowElements = parentContainer.getElementsByClassName("mk_show");
40
 
41
        // Toggle the class "expanded" on the main parent container
42
        mainparentContainer.classList.toggle("expanded");
43
 
44
        // Loop through the elements and toggle their display
45
        for (var i = 0; i < mkShowElements.length; i++) {
46
            mkShowElements[i].style.display = (mkShowElements[i].style.display === 'block') ? 'none' : 'block';
47
        }
48
 
49
        // Toggle the text content of the clicked span
50
        button.textContent = (button.textContent === 'See More') ? 'Less' : 'See More';
51
    }
52
</script>