mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
Added date on slider
This commit is contained in:
parent
d8c84ec674
commit
f90987d284
1 changed files with 27 additions and 21 deletions
|
@ -76,20 +76,20 @@
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="sparkLineStats">
|
<div class="sparkLineStats">
|
||||||
<ul>
|
<ul>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 1</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 1</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 2</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 2</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 3</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 3</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 4</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 4</label></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="sparkLineStats">
|
<div class="sparkLineStats">
|
||||||
<ul>
|
<ul>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 1</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 5</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 2</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 6</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 3</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 7</label></li>
|
||||||
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input>Provider 4</label></li>
|
<li><div class="checkbox"></div><label><input value="" type="checkbox"></input> Provider 8</label></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
<!-- right column -->
|
<!-- right column -->
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<div aria-disabled="false" class="slider sliderRange sliderBlue ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" style="margin-bottom: 5px;"></div>
|
<div aria-disabled="false" class="slider sliderRange sliderBlue ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" style="margin-bottom: 5px;"></div>
|
||||||
<strong>Date:</strong><i>10/09/15</i> - <i>15/09/16</i>
|
<strong>Date:</strong> <input type="text" id="amount" readonly style="border:0; color:#f6931f; font-weight:bold;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
|
@ -148,19 +148,25 @@
|
||||||
activePage = $('h1.page-header').attr('data-page');
|
activePage = $('h1.page-header').attr('data-page');
|
||||||
$("#"+activePage).addClass("active");
|
$("#"+activePage).addClass("active");
|
||||||
|
|
||||||
$( ".sliderRange" ).slider({
|
var today = Date.now();
|
||||||
range: true,
|
var old_day = today - (31*24*60*60)*1000;
|
||||||
min: 0,
|
$( ".sliderRange" ).slider({
|
||||||
max: 500,
|
range: true,
|
||||||
values: [ 192, 470 ],
|
min: old_day,
|
||||||
slide: function( event, ui ) {
|
max: today,
|
||||||
$( ".sliderRangeLabel" ).html( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
|
values: [ today - (7*24*60*60)*1000, today ],
|
||||||
}
|
step: 24*60*60*1000,
|
||||||
});
|
slide: function( event, ui ) {
|
||||||
|
$( "#amount" ).val( new Date(ui.values[ 0 ]).toLocaleDateString() + " - " + new Date(ui.values[ 1 ]).toLocaleDateString() );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function randNum(){
|
$( "#amount" ).val( new Date($( ".sliderRange" ).slider( "values", 0 )).toLocaleDateString() +
|
||||||
return ((Math.floor( Math.random()* (1+40-20) ) ) + 20)* 1200;
|
" - " + new Date($( ".sliderRange" ).slider( "values", 1 )).toLocaleDateString() );
|
||||||
}
|
|
||||||
|
function randNum(){
|
||||||
|
return ((Math.floor( Math.random()* (1+40-20) ) ) + 20)* 1200;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue