Subversion Repositories SmartDukaan

Rev

Rev 13759 | Rev 13822 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style type="text/css">

.slider {
  margin-bottom: 40px; }

.slider-vertical {
  margin: 10px; }

.slider {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  width: 100%; }
  .slider.slider-horizontal {
    height: 30px; }
    .slider.slider-horizontal .slider-track {
      height: 6px;
      width: 100%;
      margin-top: -3px;
      top: 50%;
      left: 0; }
    .slider.slider-horizontal .slider-selection {
      height: 100%;
      top: 0;
      bottom: 0; }
    .slider.slider-horizontal .slider-handle {
      margin-left: -12px;
      margin-top: -9px; }
      .slider.slider-horizontal .slider-handle.triangle {
        border-width: 0 10px 10px 10px;
        width: 0;
        height: 0;
        border-bottom-color: #0480be;
        margin-top: 0; }
  .slider.slider-vertical {
    height: 220px;
    width: 30px; }
    .slider.slider-vertical .slider-track {
      width: 6px;
      height: 100%;
      margin-left: -3px;
      left: 50%;
      top: 0; }
    .slider.slider-vertical .slider-selection {
      width: 100%;
      left: 0;
      top: 0;
      bottom: 0; }
    .slider.slider-vertical .slider-handle {
      margin-left: -9px;
      margin-top: -12px; }
      .slider.slider-vertical .slider-handle.triangle {
        border-width: 10px 0 10px 10px;
        width: 1px;
        height: 1px;
        border-left-color: #0480be;
        margin-left: 0; }
  .slider input {
    display: none; }
  .slider .tooltip-inner {
    white-space: nowrap; }

.slider-track {
  position: absolute;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 4px; }

.slider-selection {
  position: absolute;
  background-color: white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  border-radius: 4px; }

.slider-handle {
  position: absolute;
  width: 24px;
  height: 24px;
  background-color: white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  border: 0px solid transparent; }
  .slider-handle.round {
    border-radius: 24px; }
  .slider-handle.triangle {
    background: transparent none; }

</style>
<div class="container"> 
        <?php if(!empty($categories)):?>
                <?php foreach ($categories as $key => $category):?>
                <div class="categorypreferences">
                        <form name="preferenceform" id="categorypreference-<?php echo $category['Category']['id'];?>" action="/preferences/add" method="POST">
                                <input type="hidden" name="user_id" value="<?php echo $logged_user['id'];?>"/> 
                                <input type="hidden" name="category_id" value="<?php echo $category['Category']['id'];?>"/> 
                        <div class="row">
                                <div class="categorytab">
                                        <div class="col-xs-8"><span class="categoryname"><?php echo $category['Category']['name'];?></span> <button data-id="<?php echo $category['Category']['id'];?>" type="button" class="editcategorypreferences btn btn-xs">Edit</button></div>
                                        <div class="col-xs-4" data-id="<?php echo $category['Category']['id'];?>">
                                                <span class="categorytabcontrol" id="togglepreferences-<?php echo $category['Category']['id'];?>" data-id="<?php echo $category['Category']['id'];?>"></span>
                                        </div>
                                </div>
                        </div>
                        <div class="row hidden" id="preferences-<?php echo $category['Category']['id'];?>">
                                <div class="pricepreferences">
                                        <h5>My Price Range</h5>
                                        <?php if(!empty($preferredPrices) && isset($preferredPrices[$category['Category']['id']])){
                                                        $range = "[".intval($preferredPrices[$category['Category']['id']]['min_price']).",".intval($preferredPrices[$category['Category']['id']]['max_price'])."]";
                                                }else{
                                                        $range = '[2000,78000]';
                                                }?>
                                        <div class="maxrange col-xs-12">
                                                <div id="pricerange-<?php echo $category['Category']['id'];?>" value="" class="slider" data-slider-min="500" data-slider-max="80000" data-slider-step="500" data-slider-value="<?php echo $range;?>"></div>
                                        </div>
                                        <b class="minrange col-xs-6"><span class="cashbackrupee"></span>500</b>
                                        <b class="maxrange col-xs-6 text-right"><span class="cashbackrupee"></span>80000</b>
                                </div>
                                <div class="clearfix"></div>
                                <div class="brandpreferences">                  
                                <?php if(!empty($category['Brand'])):?>
                                <?php //print_r($category['Brand']);?>
                                        <h5>My Favourite Brands</h5>
                                        <?php foreach ($category['Brand'] as $key => $brand):?>
                                                <div class="col-xs-6 brands <?php if(empty($brand['displayed_in_preference_page'])):?>hidden notfeatured<?php endif;?>">
                                                        <?php if(!empty($preferredBrands) && isset($preferredBrands[$category['Category']['id']]) && in_array($brand['name'],$preferredBrands[$category['Category']['id']])):?>
                                                                        <input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector" data-catid="<?php echo $category['Category']['id'];?>" checked="checked"/> 
                                                        <?php else:?>
                                                                <input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector" data-catid="<?php echo $category['Category']['id'];?>"/> 
                                                        <?php endif;?>
                                                        <?php echo $brand['name'];?>                                                    
                                                </div>
                                        <?php endforeach;?>
                                        <div class="revealbrands">Others</div>
                                <?php endif;?>
                                </div>                                                          
                        </div>
                        </form>
                </div>
                <?php endforeach;?>
        <?php endif;?>
        </div>
</div>
<!-- <script type="text/javascript" src="/js/jquery.jscroll.min.js"></script> -->
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>
<?php echo $this->Html->script('plugin');?>
<script type="text/javascript">
(function() {
  $(function() {
    return $('.slider').slider();
  });
}).call(this);
</script>