﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadSliderItem=function(){
Telerik.Web.UI.RadSliderItem.initializeBase(this);
this._imageUrl=null;
this._imageElement=null;
};
Telerik.Web.UI.RadSliderItem.prototype={set_visible:function(_1){
var _2=this.get_visible()!=_1;
if(!_2){
return;
}
Telerik.Web.UI.RadSliderItem.callBaseMethod(this,"set_visible",[_1]);
if(_1){
this.get_element().style.display="";
}else{
this.get_element().style.display="none";
}
},_updatedSelectedView:function(_3){
if(this.get_slider()._itemType==Telerik.Web.UI.SliderItemType.Item){
var _4=this.get_element();
if(_3){
Sys.UI.DomElement.addCssClass(_4,"rslItemSelected");
}else{
Sys.UI.DomElement.removeCssClass(_4,"rslItemSelected");
}
}
},get_selected:function(){
var _5=false;
var _6=this.get_slider();
var _7=this.get_index();
if(_6.get_isSelectionRangeEnabled()){
if(_6.get_selectionStart()==_7||_6.get_selectionEnd()==_7){
_5=true;
}
}else{
if(_6.get_value()==_7){
_5=true;
}
}
return _5;
},set_cssClass:function(_8){
this._properties.setValue("cssClass",_8);
},get_cssClass:function(){
return this._properties.getValue("cssClass","");
},set_tooltip:function(_9){
this._properties.setValue("tooltip",_9);
},get_tooltip:function(){
return this._properties.getValue("tooltip","");
},set_isLargeTick:function(_a){
this._properties.setValue("isLargeTick",_a);
},get_isLargeTick:function(){
return this._properties.getValue("isLargeTick",false);
},set_isSmallTick:function(_b){
this._properties.setValue("isSmallTick",_b);
},get_isSmallTick:function(){
return this._properties.getValue("isSmallTick",false);
},_loadFromDictionary:function(_c){
if(_c.text!=null){
this.set_text(_c.text);
}
if(_c.value!=null){
this.set_value(_c.value);
}
if(_c.enabled!=null){
this.set_enabled(_c.enabled);
}
if(_c.cssClass){
this.set_cssClass(_c.cssClass);
}
if(_c.tooltip!=null){
this.set_tooltip(_c.tooltip);
}
if(_c.isLargeTick!=null){
this.set_isLargeTick(_c.isLargeTick);
}
if(_c.isSmallTick!=null){
this.set_isSmallTick(_c.isSmallTick);
}
},_render:function(_d){
_d[_d.length]="<li unselectable='on' ";
if(this.get_tooltip().toString()!=""){
_d[_d.length]="title=\""+this.get_tooltip()+"\" ";
}
var _e=this.get_index();
var _f=this.get_slider();
var _10=_f.get_itemData().length;
_d[_d.length]="class='";
var _11=_f._itemType;
if(_11==Telerik.Web.UI.SliderItemType.Item){
var _12=this.get_cssClass();
if(_12!=""){
_12=" "+_12;
}
var _13=(this.get_enabled())?"'>":" rslItemDisabled'>";
if(_e==0){
_d[_d.length]="rslItem rslItemFirst"+_12+_13;
}else{
if(_e==_10-1){
_d[_d.length]="rslItem rslItemLast"+_12+_13;
}else{
_d[_d.length]="rslItem"+_12+_13;
}
}
_d[_d.length]="<span>";
_d[_d.length]=this.get_text();
_d[_d.length]="</span>";
}else{
if(_11==Telerik.Web.UI.SliderItemType.Tick){
var _14=this.get_isLargeTick();
var _15=false;
if(_e==0){
if(_14){
_d[_d.length]="rslLargeTick rslLargeTickFirst'>";
_15=true;
}else{
_d[_d.length]="rslSmallTick rslSmallTickFirst'>";
}
}else{
if(_e==_10-1){
if(_14){
_d[_d.length]="rslLargeTick rslLargeTickLast'>";
_15=true;
}else{
_d[_d.length]="rslSmallTick rslSmallTickLast'>";
}
}else{
if(_14){
_d[_d.length]="rslLargeTick'>";
_15=true;
}else{
_d[_d.length]="rslSmallTick'>";
}
}
}
if(_15){
var _16=this.get_value();
_d[_d.length]="<span>";
_d[_d.length]=_16;
_d[_d.length]="</span>";
if(_f._trackPosition==Telerik.Web.UI.SliderTrackPosition.Center){
_d[_d.length]="<span class='rslBRItemText'>";
_d[_d.length]=_16;
_d[_d.length]="</span>";
}
}
}
}
_d[_d.length]="</li>";
},get_textElement:function(){
return this.get_element();
},get_slider:function(){
return this._parent;
},_createChildListElement:function(){
var _17=document.createElement("ul");
this.get_slider().get_dropDownElement().appendChild(_17);
},_shouldInitializeChild:function(_18){
return false;
},_createChildControls:function(){
},_getHierarchicalIndex:function(){
return this.get_index();
}};
Telerik.Web.UI.RadSliderItem.registerClass("Telerik.Web.UI.RadSliderItem",Telerik.Web.UI.ControlItem);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();