You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
var Slider = function (parent) {
|
|
this.Parent = parent;
|
|
|
|
this.PlayControl = new PlayControl(this);
|
|
|
|
this.Startup = function () {
|
|
|
|
$(".calc-list").attr("count", $(".calc-list ul").find('li').length);
|
|
$(".calc-list ul").find('li').each(function (index, element) {
|
|
$(element).attr('index', index);
|
|
});
|
|
|
|
$(".calc-list ul li").on('click', this.OnThumbImageClick.bind(this));
|
|
this.PlayControl.Startup();
|
|
|
|
var now = new Date();
|
|
this.SetActiveImage(now.getHours());
|
|
};
|
|
|
|
this.SetActiveImage = function (index) {
|
|
$(".calc-list ul").find('li.active').removeClass("active");
|
|
$(".calc-list ul").find('li').eq(index).addClass("active");
|
|
$(".calc-list").attr("index", index);
|
|
|
|
var selected = $(".calc-list ul").find('li.active');
|
|
this.Parent.Map.ReloadData(selected.attr('time'));
|
|
};
|
|
|
|
this.OnThumbImageClick = function (e) {
|
|
var index = $(e.target).attr("index");
|
|
this.SetActiveImage(index);
|
|
|
|
$('.calc-list ul li').removeClass("active");
|
|
$(e.target).addClass("active");
|
|
};
|
|
};
|