Skip to content
Permalink
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information...
fnagel committed Dec 19, 2012
2 parents 50d7a96 + 209443d commit dab7bf89933c15132b81eaee46a0220357fb27cd
@@ -32,6 +32,7 @@
<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-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-gl.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
@@ -106,6 +107,7 @@
<option value="be">Belarusian</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="fr-CA">Canadian French</option>
<option value="ca">Catalan (Catal&agrave;)</option>
<option value="zh-HK">Chinese Hong Kong (&#32321;&#39636;&#20013;&#25991;)</option>
<option value="zh-CN">Chinese Simplified (&#31616;&#20307;&#20013;&#25991;)</option>
@@ -143,8 +143,33 @@ test("step", function() {
// ok(false, "missing test - untested code is broken code.");
//});

//test("values", function() {
// ok(false, "missing test - untested code is broken code.");
//});
test("values", function() {
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);
@@ -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']);
});
@@ -62,9 +62,10 @@ $.widget( "ui.slider", $.ui.mouse, {
if ( o.range === true ) {
if ( !o.values ) {
o.values = [ this._valueMin(), this._valueMin() ];
}
if ( o.values.length && o.values.length !== 2 ) {
} else if ( o.values.length && o.values.length !== 2 ) {
o.values = [ o.values[0], o.values[0] ];
} else if ( $.isArray( o.values ) ) {
o.values = o.values.slice(0);
}
}

@@ -270,7 +270,7 @@ $.widget( "ui.tooltip", {
// as the tooltip is visible, position the tooltip using the most recent
// event.
if ( this.options.show && this.options.show.delay ) {
delayedShow = setInterval(function() {
delayedShow = this.delayedShow = setInterval(function() {
if ( tooltip.is( ":visible" ) ) {
position( positionOption.of );
clearInterval( delayedShow );
@@ -312,6 +312,9 @@ $.widget( "ui.tooltip", {
return;
}

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

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

0 comments on commit dab7bf8

Please sign in to comment.
You can’t perform that action at this time.