Skip to content

Commit

Permalink
Merge branch 'master' into selectmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
fnagel committed Dec 19, 2012
2 parents 50d7a96 + 209443d commit dab7bf8
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 6 deletions.
2 changes: 2 additions & 0 deletions demos/datepicker/localization.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<script src="../../ui/i18n/jquery.ui.datepicker-fi.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-fi.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-fo.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-fo.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-fr.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-fr.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-fr-CA.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script> <script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
Expand Down Expand Up @@ -106,6 +107,7 @@
<option value="be">Belarusian</option> <option value="be">Belarusian</option>
<option value="bs">Bosnian (Bosanski)</option> <option value="bs">Bosnian (Bosanski)</option>
<option value="bg">Bulgarian (&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;)</option> <option value="bg">Bulgarian (&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;)</option>
<option value="fr-CA">Canadian French</option>
<option value="ca">Catalan (Catal&agrave;)</option> <option value="ca">Catalan (Catal&agrave;)</option>
<option value="zh-HK">Chinese Hong Kong (&#32321;&#39636;&#20013;&#25991;)</option> <option value="zh-HK">Chinese Hong Kong (&#32321;&#39636;&#20013;&#25991;)</option>
<option value="zh-CN">Chinese Simplified (&#31616;&#20307;&#20013;&#25991;)</option> <option value="zh-CN">Chinese Simplified (&#31616;&#20307;&#20013;&#25991;)</option>
Expand Down
31 changes: 28 additions & 3 deletions tests/unit/slider/slider_options.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -143,8 +143,33 @@ test("step", function() {
// ok(false, "missing test - untested code is broken code."); // ok(false, "missing test - untested code is broken code.");
//}); //});


//test("values", function() { test("values", function() {
// ok(false, "missing test - untested code is broken code."); expect( 2 );
//});
// testing multiple ranges on the same page, the object reference to the values
// property is preserved via multiple range elements, so updating options.values
// of 1 slider updates options.values of all the others
var ranges = $([
document.createElement("div"),
document.createElement("div")
]).slider({
range: true,
values: [ 25, 75 ]
});

notStrictEqual(
ranges.eq(0).data("uiSlider").options.values,
ranges.eq(1).data("uiSlider").options.values,
"multiple range sliders should not have a reference to the same options.values array"
);

ranges.eq(0).slider("values", 0, 10);

notEqual(
ranges.eq(0).slider("values", 0),
ranges.eq(1).slider("values", 0),
"the values for multiple sliders should be different"
);
});


})(jQuery); })(jQuery);
23 changes: 23 additions & 0 deletions ui/i18n/jquery.ui.datepicker-fr-CA.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Canadian-French initialisation for the jQuery UI date picker plugin. */
jQuery(function ($) {
$.datepicker.regional['fr-CA'] = {
closeText: 'Fermer',
prevText: 'Précédent',
nextText: 'Suivant',
currentText: 'Aujourd\'hui',
monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
weekHeader: 'Sem.',
dateFormat: 'yy-mm-dd',
firstDay: 0,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''
};
$.datepicker.setDefaults($.datepicker.regional['fr-CA']);
});
5 changes: 3 additions & 2 deletions ui/jquery.ui.slider.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ $.widget( "ui.slider", $.ui.mouse, {
if ( o.range === true ) { if ( o.range === true ) {
if ( !o.values ) { if ( !o.values ) {
o.values = [ this._valueMin(), this._valueMin() ]; o.values = [ this._valueMin(), this._valueMin() ];
} } else if ( o.values.length && o.values.length !== 2 ) {
if ( o.values.length && o.values.length !== 2 ) {
o.values = [ o.values[0], o.values[0] ]; o.values = [ o.values[0], o.values[0] ];
} else if ( $.isArray( o.values ) ) {
o.values = o.values.slice(0);
} }
} }


Expand Down
5 changes: 4 additions & 1 deletion ui/jquery.ui.tooltip.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ $.widget( "ui.tooltip", {
// as the tooltip is visible, position the tooltip using the most recent // as the tooltip is visible, position the tooltip using the most recent
// event. // event.
if ( this.options.show && this.options.show.delay ) { if ( this.options.show && this.options.show.delay ) {
delayedShow = setInterval(function() { delayedShow = this.delayedShow = setInterval(function() {
if ( tooltip.is( ":visible" ) ) { if ( tooltip.is( ":visible" ) ) {
position( positionOption.of ); position( positionOption.of );
clearInterval( delayedShow ); clearInterval( delayedShow );
Expand Down Expand Up @@ -312,6 +312,9 @@ $.widget( "ui.tooltip", {
return; return;
} }


// Clear the interval for delayed tracking tooltips
clearInterval( this.delayedShow );

// only set title if we had one before (see comment in _open()) // only set title if we had one before (see comment in _open())
if ( target.data( "ui-tooltip-title" ) ) { if ( target.data( "ui-tooltip-title" ) ) {
target.attr( "title", target.data( "ui-tooltip-title" ) ); target.attr( "title", target.data( "ui-tooltip-title" ) );
Expand Down

0 comments on commit dab7bf8

Please sign in to comment.