Subversion Repositories SmartDukaan

Rev

Rev 31568 | 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>
        $(".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 Listing
                        </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 Listing</li>
                        </ol>
                </div>
        </div>
        <div class="col-lg-6">
                <div class="row">
                        <form class="form-inline"
                                onsubmit="event.preventDefault();addWebListing();">
                                <div class="form-group">
                                        <label for="web-listing-title">Title</label> <input type="text"
                                                class="form-control" id="web-listing-title"
                                                placeholder="Best Sellers">
                                </div>
                                <div class="form-group">
                                        <label for="web-listing-url">Url</label> <input
                                                class="form-control" id="web-listing-url"
                                                placeholder="best-sellers">
                                </div>
                                
                                <div class="form-group">
                                        <label for="web-listing-solrQuery">Solr Query</label> <input
                                                class="form-control" id="web-listing-solrQuery"
                                                placeholder="Solr Query">
                                </div>

                
                                <div class="form-group" style="margin-top: 15px">
                                
                              <div class="form-group">
                                        <label for="web-listing-url">Rank</label> <input
                                                class="form-control" id="web-listing-rank" placeholder="Rank">
                                  </div>
                                        <div class="form-group">
                                                <label for="web-listing-source">Source</label>
                                            <select class="form-control" id="listingSource"
                                            name="listingSource" placeholder="Source">
                                        <option value="" disabled selected>Source</option>
                                        #foreach($source in $sources)
                                            <option value="$source">$source</option>
                                        #end
                                    </select>
                    </div>
                    
                        <div class="form-group">
                                                <label for="web-listing-type">Type</label>
                                            <select class="form-control" id="webType"
                                            name="webType" placeholder="Type">
                                        <option value="" disabled selected>Type</option>
                                        #foreach($type in $types)
                                            <option value="$type">$type</option>
                                        #end
                                    </select>
                    </div>
                        
                            </div>
                                         
                                <div class="form-group" style="margin-top: 15px">
                                
                                 
                                        <div class="form-group">
                                                <label for="web-listing-bannerurl">Banner Url</label>(365*183)<input
                                                        class="form-control" id="web-listing-bannerurl"
                                                        placeholder="Banner Url">
                                        </div>

                                        <div class="form-group">
                                                <label for="web-listing-headerurl">Header Url</label>(272*405)<input
                                                        class="form-control" id="web-listing-headerurl"
                                                        placeholder="Header Url">
                                        </div>
                                        
                                       
                                        <button type="submit" class="btn btn-default">Add</button>
                                </div>
                        </form>

                        <div class="col-lg-4" style="padding: 15px">
                                <button id="weblisting-update-rank" disabled class="btn btn-default"
                                        type="button">Update Rank</button>
                        </div>

                </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>Rank</th>
                                                <th>Url</th>
                                                <th>Banner Url</th>
                                                <th>Source</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="listing-details">$webListing.getTitle()</a></td>
                                                <td>$webListing.getRank()</td>
                                                <td>$webListing.getUrl()</td> #if($webListing.getBannerUrl())
                                                <td>$webListing.getBannerUrl()</td> #else
                                                <td></td> #end 
                                                  
                                                  <td>$webListing.getTargetSource()</td>
                                                
                                                #if($webListing.isActive())
                                                <td><a data-id="$webListing.getId()"
                                                        data-active="$webListing.isActive()" class="web-listing-active">Mark
                                                                InActive</a></td> #else
                                                <td><a data-id="$webListing.getId()"
                                                        data-active="$webListing.isActive()" class="web-listing-active">Mark
                                                                Active</a></td> #end
                                                <td><a data-id="$webListing.getId()"
                                                        data-target="#web-listing-edit-modal" data-toggle="modal"
                                                        class="web-listing-id">edit</a></td>
                                        </tr>
                                        #end


                                </tbody>
                        </table>
                </div>
        </div>
        <div class="col-lg-5" style="float:right">
                <div id="feature-table">
                        <div class="row">
                                <div class="col-lg-12 web-products-container"></div>
                        </div>
                </div>
        </div>
</section>

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

        <div id="web-listing-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: 200px;"></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>