Subversion Repositories SmartDukaan

Rev

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