Subversion Repositories SmartDukaan

Rev

Rev 30633 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
.grab {
        cursor: grab;
}

.grabbed {
        box-shadow: 0 0 13px #000;
}

.grabCursor, .grabCursor * {
        cursor: grabbing !important;
}
</style>

<script type="text/javascript">
        $(function () {
                $('input[name="offerdateRange"]').daterangepicker(getRangedDatePicker());
        });

        $(".edit-web-listing").click(function () {
                $("#web-editable-container").modal({
                        backdrop: false
                });

        });
</script>

<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header">
                                <i class="icon_document_alt"></i>Web Offers
                        </h3>
                        <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i><a
                                        href="${rc.contextPath}/dashboard">Home</a></li>
                                <li><i class="icon_document_alt"></i>Web Offers</li>
                        </ol>
                </div>
        </div>
        <div class="col-lg-6">
                <div class="row">
                        <form onsubmit="event.preventDefault();addWebOffer();">
                                <div class="col-lg-4">
                                        <div class="form-group">
                                                <label for="web-listing-title">Title</label> <input type="text"
                                                        class="form-control" id="web-offer-title"
                                                        placeholder="Hdfc Bank Offer">
                                        </div>
                                        <div class="form-group">
                                                <label for="web-listing-title">Small Text</label> 
                                                 <input type="text"
                                                        class="form-control" id="small-text"
                                                        placeholder="Small Text"/>
                                        </div>
                                </div>
                                <div class="col-lg-4">
                                        <div class="form-group">
                                                <label for="web-listing-title">Detailed Text</label>
                                                        <textarea
                                                        class="form-control" id="detailed-text"
                                                        ></textarea>
                                        </div>
                                        <div class="form-group" style="margin-top: 15px">
                                                <div class="form-group">
                                                        <label for="web-listing-bannerurl">Banner Url</label> <input
                                                                class="form-control" id="offer-banner-large"
                                                                placeholder="Banner Url">
                                                </div>
                                        </div>
                                </div>
                                <div class="col-lg-4">
                                        <div class="form-group">
                                                <label for="schemeDuration">Offer Duration :</label> 
                                                <input id="offerDuration" name="offerdateRange" type="text" value="" class="form-control input-sm">
                                        </div>
                                        <div class="form-group">
                                        <label></label> 
                                        <button type="submit" class="btn btn-default">Add Offer</button>
                                        </div>
                                </div>                          
                        </form>
                </div>


                <div class="row">
                        <table class="table table-border table-condensed table-bordered"
                                id="catalog-feature-table">
                                <thead>
                                        <tr>
                                                <th>Id</th>
                                                <th>Title</th>
                                                <th>Banner Url</th>
                                                <th>Active</th>
                                                <th>Edit</th>
                                        </tr>
                                </thead>
                                <tbody id="web-listing-tbody">
                                        #foreach($webListing in $webListings)
                                        <tr class="grab" data-id="$webListing.getId()">
                                                <td>$webListing.getId()</td>
                                                <td><a href="javascript:void(0)"
                                                        data-id="$webListing.getId()" class="web-offer-details">$webListing.getTitle()</a></td>
                                                #if($webListing.getLargeBannerUrl())
                                                <td>$webListing.getLargeBannerUrl()</td> #else
                                                <td>-</td> #end 
                                                #if($webListing.isActive())
                                                        <td><a class="web-listing-active" data-id="$webListing.getId()">Mark InActive</a></td>
                                                #else
                                                        <td><a class="web-listing-active" data-id="$webListing.getId()">Mark Active</a></td>
                                                #end
                                                <td><a data-id="$webListing.getId()"
                                                        data-target="#web-offer-edit-modal" data-toggle="modal"
                                                        class="web-offer-id">edit</a></td>
                                        </tr>
                                        #end


                                </tbody>
                        </table>
                </div>
        </div>
        <div class="col-lg-6">
                <div id="web-offer">
                        <div class="row">
                                <div class="col-lg-12 web-offer-products-container"></div>
                        </div>
                </div>
        </div>
</section>

<div class="web-offer-edit-container">

        <div id="web-offer-edit-modal" class="modal"
                id="web-editable-container" role="dialog">
                <div class="modal-dialog modal-md">
                        <!-- Modal content-->
                        <div class="modal-content" style="width: 800px; height: 300px;"></div>
                </div>
        </div>
</div>

<script type="text/javascript">
        $(document).ready(function() {
                $('#catalog-feature-table').DataTable({
                        "bPaginate" : true,
                        "bLengthChange" : true,
                        "bFilter" : true,
                        "bInfo" : false,
                        "bAutoWidth" : false,
                        "pageLength" : 100
                });
        });
</script>