Subversion Repositories SmartDukaan

Rev

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