|
435 | 435 | h = aph + 12; |
436 | 436 | } |
437 | 437 | } |
438 | | - tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], parseInt(h,10)); |
| 438 | + tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, parseInt(h,10)); |
439 | 439 |
|
440 | 440 | tp_inst._onTimeChange(); |
441 | 441 | tp_inst._onSelectHandler(); |
|
629 | 629 | millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10); |
630 | 630 |
|
631 | 631 | if (this.hour_slider) { |
632 | | - this.control.options(this, this.hour_slider, { min: this._defaults.hourMin, max: hourMax }); |
633 | | - this.control.value(this, this.hour_slider, this.hour); |
| 632 | + this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax }); |
| 633 | + this.control.value(this, this.hour_slider, 'hour', this.hour); |
634 | 634 | } |
635 | 635 | if (this.minute_slider) { |
636 | | - this.control.options(this, this.minute_slider, { min: this._defaults.minuteMin, max: minMax }); |
637 | | - this.control.value(this, this.minute_slider, this.minute); |
| 636 | + this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax }); |
| 637 | + this.control.value(this, this.minute_slider, 'minute', this.minute); |
638 | 638 | } |
639 | 639 | if (this.second_slider) { |
640 | | - this.control.options(this, this.second_slider, { min: this._defaults.secondMin, max: secMax }); |
641 | | - this.control.value(this, this.second_slider, this.second); |
| 640 | + this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax }); |
| 641 | + this.control.value(this, this.second_slider, 'second', this.second); |
642 | 642 | } |
643 | 643 | if (this.millisec_slider) { |
644 | | - this.control.options(this, this.millisec_slider, { min: this._defaults.millisecMin, max: millisecMax }); |
645 | | - this.control.value(this, this.millisec_slider, this.millisec); |
| 644 | + this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax }); |
| 645 | + this.control.value(this, this.millisec_slider, 'millisec', this.millisec); |
646 | 646 | } |
647 | 647 | } |
648 | 648 |
|
|
653 | 653 | * on time change is also called when the time is updated in the text field |
654 | 654 | */ |
655 | 655 | _onTimeChange: function() { |
656 | | - var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider) : false, |
657 | | - minute = (this.minute_slider) ? this.control.value(this, this.minute_slider) : false, |
658 | | - second = (this.second_slider) ? this.control.value(this, this.second_slider) : false, |
659 | | - millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider) : false, |
| 656 | + var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false, |
| 657 | + minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false, |
| 658 | + second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false, |
| 659 | + millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false, |
660 | 660 | timezone = (this.timezone_select) ? this.timezone_select.val() : false, |
661 | 661 | o = this._defaults; |
662 | 662 |
|
|
832 | 832 | max: rtl? min*-1 : max, |
833 | 833 | step: step, |
834 | 834 | slide: function(event, ui) { |
835 | | - tp_inst.control.value(tp_inst, $(this), rtl? ui.value*-1:ui.value); |
| 835 | + tp_inst.control.value(tp_inst, $(this), unit, rtl? ui.value*-1:ui.value); |
836 | 836 | tp_inst._onTimeChange(); |
837 | 837 | }, |
838 | 838 | stop: function(event, ui) { |
839 | 839 | tp_inst._onSelectHandler(); |
840 | 840 | } |
841 | 841 | }); |
842 | 842 | }, |
843 | | - options: function(tp_inst, obj, opts, val){ |
| 843 | + options: function(tp_inst, obj, unit, opts, val){ |
844 | 844 | if(tp_inst._defaults.isRTL){ |
845 | 845 | if(typeof(opts) == 'string'){ |
846 | 846 | if(opts == 'min' || opts == 'max'){ |
|
863 | 863 | return obj.slider(opts, val); |
864 | 864 | return obj.slider(opts); |
865 | 865 | }, |
866 | | - value: function(tp_inst, obj, val){ |
| 866 | + value: function(tp_inst, obj, unit, val){ |
867 | 867 | if(tp_inst._defaults.isRTL){ |
868 | 868 | if(val !== undefined) |
869 | 869 | return obj.slider('value', val*-1); |
|
905 | 905 |
|
906 | 906 | return obj; |
907 | 907 | }, |
908 | | - options: function(tp_inst, obj, opts, val){ |
| 908 | + options: function(tp_inst, obj, unit, opts, val){ |
909 | 909 | var o = {}, |
910 | 910 | $t = obj.children('select'); |
911 | 911 | if(typeof(opts) == 'string'){ |
|
916 | 916 | else o = opts; |
917 | 917 | return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step')); |
918 | 918 | }, |
919 | | - value: function(tp_inst, obj, val){ |
| 919 | + value: function(tp_inst, obj, unit, val){ |
920 | 920 | var $t = obj.children('select'); |
921 | 921 | if(val !== undefined) |
922 | 922 | return $t.val(val); |
|
0 commit comments