~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to lib/jquery/jquery.ui-1.6rc2/ui/minified/ui.progressbar.min.js

  • Committer: V. Keith Hughitt
  • Date: 2009-03-26 19:20:57 UTC
  • Revision ID: hughitt1@kore-20090326192057-u0x8rf8sf5lmmnwh
nightly build 03-26-2009: Using alpha-channel JPEG 2000 dataset

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(function(A){A.widget("ui.progressbar",{_init:function(){this._interval=this.options.interval;var B=this,C=this.options,E=(new Date()).getTime()+Math.random(),D=C.text||"0%";this.element.addClass("ui-progressbar").width(C.width);A.extend(this,{active:false,pixelState:0,percentState:0,identifier:E,bar:A('<div class="ui-progressbar-bar ui-hidden"></div>').css({width:"0px",overflow:"hidden",zIndex:100}),textElement:A('<div class="ui-progressbar-text"></div>').html(D).css({width:"0px",overflow:"hidden"}),textBg:A('<div class="ui-progressbar-text ui-progressbar-text-back"></div>').html(D).css({width:this.element.width()}),wrapper:A('<div class="ui-progressbar-wrap"></div>')});this.wrapper.append(this.bar.append(this.textElement.addClass(C.textClass)),this.textBg).appendTo(this.element)},plugins:{},ui:function(B){return{instance:this,identifier:this.identifier,options:this.options,element:this.bar,textElement:this.textElement,pixelState:this.pixelState,percentState:this.percentState}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="progressbar"?C:["progressbar",C].join(""),[B,this.ui()],this.options[C])},destroy:function(){this.stop();this.element.removeClass("ui-progressbar ui-progressbar-disabled").removeData("progressbar").unbind(".progressbar").find(".ui-progressbar-wrap").remove();delete jQuery.easing[this.identifier]},enable:function(){this.element.removeClass("ui-progressbar-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-progressbar-disabled");this.disabled=true},start:function(){var B=this,C=this.options;if(this.disabled){return }jQuery.easing[this.identifier]=function(K,L,J,I,H){var G=C.increment,E=C.width,F=((G>E?E:G)/E),D=Math.round(K/F)*F;return D>1?1:D};B.active=true;setTimeout(function(){B.active=false},C.duration);this._animate();this._propagate("start",this.ui());return false},_animate:function(){var C=this,D=this.options,B=D.interval;this.bar.animate({width:D.width},{duration:B,easing:this.identifier,step:function(G,E){C.progress((G/D.width)*100);var H=new Date().getTime(),F=(H-E.startTime);D.interval=B-F},complete:function(){delete jQuery.easing[C.identifier];C.pause();if(C.active){}}})},pause:function(){if(this.disabled){return }this.bar.stop();this._propagate("pause",this.ui())},stop:function(){this.bar.stop();this.bar.width(0);this.textElement.width(0);this.bar.addClass("ui-hidden");this.options.interval=this._interval;this._propagate("stop",this.ui())},text:function(B){this.textElement.html(B);this.textBg.html(B)},progress:function(B){if(this.bar.is(".ui-hidden")){this.bar.removeClass("ui-hidden")}this.percentState=B>100?100:B;this.pixelState=(this.percentState/100)*this.options.width;this.bar.width(this.pixelState);this.textElement.width(this.pixelState);if(this.options.range&&!this.options.text){this.textElement.html(Math.round(this.percentState)+"%")}this._propagate("progress",this.ui())}});A.ui.progressbar.defaults={width:300,duration:3000,interval:200,increment:1,range:true,text:"",addClass:"",textClass:""}})(jQuery)
 
 
b'\\ No newline at end of file'