jquery-ui-rails 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (54) hide show
  1. data/.gitignore +3 -0
  2. data/History.md +7 -0
  3. data/README.md +32 -3
  4. data/jquery-ui/version.txt +1 -1
  5. data/lib/jquery/ui/rails/version.rb +1 -1
  6. data/vendor/assets/javascripts/jquery.effects.blind.js +1 -1
  7. data/vendor/assets/javascripts/jquery.effects.bounce.js +1 -1
  8. data/vendor/assets/javascripts/jquery.effects.clip.js +1 -1
  9. data/vendor/assets/javascripts/jquery.effects.core.js +2 -2
  10. data/vendor/assets/javascripts/jquery.effects.drop.js +1 -1
  11. data/vendor/assets/javascripts/jquery.effects.explode.js +1 -1
  12. data/vendor/assets/javascripts/jquery.effects.fade.js +1 -1
  13. data/vendor/assets/javascripts/jquery.effects.fold.js +1 -1
  14. data/vendor/assets/javascripts/jquery.effects.highlight.js +1 -1
  15. data/vendor/assets/javascripts/jquery.effects.pulsate.js +1 -1
  16. data/vendor/assets/javascripts/jquery.effects.scale.js +1 -1
  17. data/vendor/assets/javascripts/jquery.effects.shake.js +1 -1
  18. data/vendor/assets/javascripts/jquery.effects.slide.js +1 -1
  19. data/vendor/assets/javascripts/jquery.effects.transfer.js +1 -1
  20. data/vendor/assets/javascripts/jquery.ui.accordion.js +7 -7
  21. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +12 -2
  22. data/vendor/assets/javascripts/jquery.ui.button.js +5 -5
  23. data/vendor/assets/javascripts/jquery.ui.core.js +2 -2
  24. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +6 -6
  25. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +2 -1
  26. data/vendor/assets/javascripts/jquery.ui.datepicker.js +19 -19
  27. data/vendor/assets/javascripts/jquery.ui.dialog.js +5 -5
  28. data/vendor/assets/javascripts/jquery.ui.draggable.js +2 -2
  29. data/vendor/assets/javascripts/jquery.ui.droppable.js +3 -3
  30. data/vendor/assets/javascripts/jquery.ui.mouse.js +1 -1
  31. data/vendor/assets/javascripts/jquery.ui.position.js +50 -4
  32. data/vendor/assets/javascripts/jquery.ui.progressbar.js +2 -2
  33. data/vendor/assets/javascripts/jquery.ui.resizable.js +2 -2
  34. data/vendor/assets/javascripts/jquery.ui.selectable.js +7 -6
  35. data/vendor/assets/javascripts/jquery.ui.slider.js +2 -2
  36. data/vendor/assets/javascripts/jquery.ui.sortable.js +11 -12
  37. data/vendor/assets/javascripts/jquery.ui.tabs.js +2 -2
  38. data/vendor/assets/javascripts/jquery.ui.widget.js +13 -9
  39. data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +1 -1
  40. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +1 -1
  41. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +2 -2
  42. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +1 -1
  43. data/vendor/assets/stylesheets/jquery.ui.button.css.erb +1 -1
  44. data/vendor/assets/stylesheets/jquery.ui.core.css.erb +4 -7
  45. data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +1 -1
  46. data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +1 -1
  47. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +2 -2
  48. data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +1 -1
  49. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +1 -1
  50. data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +1 -1
  51. data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +1 -1
  52. data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +1 -1
  53. metadata +15 -9
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-kz.js +0 -25
@@ -0,0 +1,3 @@
1
+ *.gem
2
+ vendor
3
+ Gemfile.lock
@@ -0,0 +1,7 @@
1
+ # Version 0.2.0
2
+
3
+ * Upgrade to jQuery UI 1.8.17.
4
+
5
+ # Version 0.1.0
6
+
7
+ * Initial release packaging jQuery UI 1.8.16.
data/README.md CHANGED
@@ -10,9 +10,11 @@ interface](http://jqueryui.com/download) again.
10
10
 
11
11
  In your Gemfile, add:
12
12
 
13
- group :assets do
14
- gem 'jquery-ui-rails'
15
- end
13
+ ```ruby
14
+ group :assets do
15
+ gem 'jquery-ui-rails'
16
+ end
17
+ ```
16
18
 
17
19
  ## Require Everything
18
20
 
@@ -173,6 +175,15 @@ pulled in as dependencies.
173
175
  */
174
176
  ```
175
177
 
178
+ ## Theming
179
+
180
+ The CSS files automatically pull in the standard theme file where necessary. If
181
+ you want a different theme, you could probably download a theme from the
182
+ [ThemeRoller](http://jqueryui.com/themeroller/) and require the theme CSS
183
+ *after* requiring any other jQuery UI CSS files you need, making sure to serve
184
+ up the theme images correctly. (This is arguably cumbersome, not officially
185
+ supported by this gem, and adds 1 KB overhead. See also Limitations below.)
186
+
176
187
  ## Contributing
177
188
 
178
189
  ### Bug Reports
@@ -233,3 +244,21 @@ rails server
233
244
  ```
234
245
 
235
246
  Now point your browser at [http://localhost:3000/](http://localhost:3000/).
247
+
248
+ ### Limitations
249
+
250
+ * Only the base theme (Smoothness) is included. Once it becomes possible to
251
+ [generate all theme
252
+ files](https://forum.jquery.com/topic/downloading-bundling-all-themes#14737000003080244)
253
+ from the jQuery UI sources, we can package all the other themes in the
254
+ [ThemeRoller](http://jqueryui.com/themeroller/) gallery.
255
+
256
+ * The `jquery.ui.all.js` file is named `jquery-ui.js` in the official
257
+ distribution. We should follow their naming. But jquery-rails provides a
258
+ `jquery-ui.js` asset as well, so until that is removed from the jquery-rails
259
+ gem (see issue [#46](https://github.com/rails/jquery-rails/issues/46)), we
260
+ cannot distribute `jquery-ui.js` without risking conflicts.
261
+
262
+ To reduce confusion, as long as there is no `jquery-ui.js`, we also do not
263
+ distribute the official `jquery-ui-i18n.js` and `jquery-ui.css`. The latter
264
+ is available as `jquery.ui.all.css` however.
@@ -1 +1 @@
1
- 1.8.16
1
+ 1.8.17
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Ui
3
3
  module Rails
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Blind 1.8.16
4
+ * jQuery UI Effects Blind 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Bounce 1.8.16
4
+ * jQuery UI Effects Bounce 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Clip 1.8.16
4
+ * jQuery UI Effects Clip 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * jQuery UI Effects 1.8.16
2
+ * jQuery UI Effects 1.8.17
3
3
  *
4
4
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -306,7 +306,7 @@ $.fn.extend({
306
306
  /******************************************************************************/
307
307
 
308
308
  $.extend($.effects, {
309
- version: "1.8.16",
309
+ version: "1.8.17",
310
310
 
311
311
  // Saves a set of properties in a data storage
312
312
  save: function(element, set) {
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Drop 1.8.16
4
+ * jQuery UI Effects Drop 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Explode 1.8.16
4
+ * jQuery UI Effects Explode 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Fade 1.8.16
4
+ * jQuery UI Effects Fade 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Fold 1.8.16
4
+ * jQuery UI Effects Fold 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Highlight 1.8.16
4
+ * jQuery UI Effects Highlight 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Pulsate 1.8.16
4
+ * jQuery UI Effects Pulsate 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Scale 1.8.16
4
+ * jQuery UI Effects Scale 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Shake 1.8.16
4
+ * jQuery UI Effects Shake 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Slide 1.8.16
4
+ * jQuery UI Effects Slide 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1,7 +1,7 @@
1
1
  //= require jquery.effects.core
2
2
 
3
3
  /*
4
- * jQuery UI Effects Transfer 1.8.16
4
+ * jQuery UI Effects Transfer 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -2,7 +2,7 @@
2
2
  //= require jquery.ui.widget
3
3
 
4
4
  /*
5
- * jQuery UI Accordion 1.8.16
5
+ * jQuery UI Accordion 1.8.17
6
6
  *
7
7
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
8
8
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -521,7 +521,7 @@ $.widget( "ui.accordion", {
521
521
  });
522
522
 
523
523
  $.extend( $.ui.accordion, {
524
- version: "1.8.16",
524
+ version: "1.8.17",
525
525
  animations: {
526
526
  slide: function( options, additions ) {
527
527
  options = $.extend({
@@ -553,11 +553,11 @@ $.extend( $.ui.accordion, {
553
553
  // fix width before calculating height of hidden element
554
554
  var s = options.toShow;
555
555
  originalWidth = s[0].style.width;
556
- s.width( parseInt( s.parent().width(), 10 )
557
- - parseInt( s.css( "paddingLeft" ), 10 )
558
- - parseInt( s.css( "paddingRight" ), 10 )
559
- - ( parseInt( s.css( "borderLeftWidth" ), 10 ) || 0 )
560
- - ( parseInt( s.css( "borderRightWidth" ), 10) || 0 ) );
556
+ s.width( s.parent().width()
557
+ - parseFloat( s.css( "paddingLeft" ) )
558
+ - parseFloat( s.css( "paddingRight" ) )
559
+ - ( parseFloat( s.css( "borderLeftWidth" ) ) || 0 )
560
+ - ( parseFloat( s.css( "borderRightWidth" ) ) || 0 ) );
561
561
 
562
562
  $.each( fxAttrs, function( i, prop ) {
563
563
  hideProps[ prop ] = "hide";
@@ -3,7 +3,7 @@
3
3
  //= require jquery.ui.position
4
4
 
5
5
  /*
6
- * jQuery UI Autocomplete 1.8.16
6
+ * jQuery UI Autocomplete 1.8.17
7
7
  *
8
8
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
9
9
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -219,6 +219,13 @@ $.widget( "ui.autocomplete", {
219
219
  if ( $.fn.bgiframe ) {
220
220
  this.menu.element.bgiframe();
221
221
  }
222
+ // turning off autocomplete prevents the browser from remembering the
223
+ // value when navigating through history, so we re-enable autocomplete
224
+ // if the page is unloaded before the widget is destroyed. #7790
225
+ self.beforeunloadHandler = function() {
226
+ self.element.removeAttr( "autocomplete" );
227
+ };
228
+ $( window ).bind( "beforeunload", self.beforeunloadHandler );
222
229
  },
223
230
 
224
231
  destroy: function() {
@@ -229,6 +236,7 @@ $.widget( "ui.autocomplete", {
229
236
  .removeAttr( "aria-autocomplete" )
230
237
  .removeAttr( "aria-haspopup" );
231
238
  this.menu.element.remove();
239
+ $( window ).unbind( "beforeunload", this.beforeunloadHandler );
232
240
  $.Widget.prototype.destroy.call( this );
233
241
  },
234
242
 
@@ -379,7 +387,9 @@ $.widget( "ui.autocomplete", {
379
387
  _resizeMenu: function() {
380
388
  var ul = this.menu.element;
381
389
  ul.outerWidth( Math.max(
382
- ul.width( "" ).outerWidth(),
390
+ // Firefox wraps long text (possibly a rounding bug)
391
+ // so we add 1px to avoid the wrapping (#7513)
392
+ ul.width( "" ).outerWidth() + 1,
383
393
  this.element.outerWidth()
384
394
  ) );
385
395
  },
@@ -2,7 +2,7 @@
2
2
  //= require jquery.ui.widget
3
3
 
4
4
  /*
5
- * jQuery UI Button 1.8.16
5
+ * jQuery UI Button 1.8.17
6
6
  *
7
7
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
8
8
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -322,7 +322,7 @@ $.widget( "ui.button", {
322
322
  return;
323
323
  }
324
324
  var buttonElement = this.buttonElement.removeClass( typeClasses ),
325
- buttonText = $( "<span></span>" )
325
+ buttonText = $( "<span></span>", this.element[0].ownerDocument )
326
326
  .addClass( "ui-button-text" )
327
327
  .html( this.options.label )
328
328
  .appendTo( buttonElement.empty() )
@@ -380,7 +380,7 @@ $.widget( "ui.buttonset", {
380
380
  },
381
381
 
382
382
  refresh: function() {
383
- var ltr = this.element.css( "direction" ) === "ltr";
383
+ var rtl = this.element.css( "direction" ) === "rtl";
384
384
 
385
385
  this.buttons = this.element.find( this.options.items )
386
386
  .filter( ":ui-button" )
@@ -394,10 +394,10 @@ $.widget( "ui.buttonset", {
394
394
  })
395
395
  .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
396
396
  .filter( ":first" )
397
- .addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
397
+ .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
398
398
  .end()
399
399
  .filter( ":last" )
400
- .addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
400
+ .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
401
401
  .end()
402
402
  .end();
403
403
  },
@@ -1,7 +1,7 @@
1
1
  //= require jquery
2
2
 
3
3
  /*!
4
- * jQuery UI 1.8.16
4
+ * jQuery UI 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -20,7 +20,7 @@ if ( $.ui.version ) {
20
20
  }
21
21
 
22
22
  $.extend( $.ui, {
23
- version: "1.8.16",
23
+ version: "1.8.17",
24
24
 
25
25
  keyCode: {
26
26
  ALT: 18,
@@ -4,19 +4,19 @@
4
4
  /* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
5
5
  jQuery(function($){
6
6
  $.datepicker.regional['hu'] = {
7
- closeText: 'bezárás',
8
- prevText: '&laquo;&nbsp;vissza',
9
- nextText: 'előre&nbsp;&raquo;',
7
+ closeText: 'bezár',
8
+ prevText: 'vissza',
9
+ nextText: 'előre',
10
10
  currentText: 'ma',
11
11
  monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
12
12
  'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
13
13
  monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
14
14
  'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
15
- dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
15
+ dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
16
16
  dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
17
17
  dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
18
- weekHeader: '',
19
- dateFormat: 'yy-mm-dd',
18
+ weekHeader: 'Hét',
19
+ dateFormat: 'yy.mm.dd.',
20
20
  firstDay: 1,
21
21
  isRTL: false,
22
22
  showMonthAfterYear: true,
@@ -2,6 +2,7 @@
2
2
 
3
3
  /* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
4
4
  /* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
5
+ /* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
5
6
  jQuery(function($){
6
7
  $.datepicker.regional['uk'] = {
7
8
  closeText: 'Закрити',
@@ -15,7 +16,7 @@ jQuery(function($){
15
16
  dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
16
17
  dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
17
18
  dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
18
- weekHeader: 'Не',
19
+ weekHeader: 'Тиж',
19
20
  dateFormat: 'dd/mm/yy',
20
21
  firstDay: 1,
21
22
  isRTL: false,
@@ -1,7 +1,7 @@
1
1
  //= require jquery.ui.core
2
2
 
3
3
  /*
4
- * jQuery UI Datepicker 1.8.16
4
+ * jQuery UI Datepicker 1.8.17
5
5
  *
6
6
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
7
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -14,7 +14,7 @@
14
14
  */
15
15
  (function( $, undefined ) {
16
16
 
17
- $.extend($.ui, { datepicker: { version: "1.8.16" } });
17
+ $.extend($.ui, { datepicker: { version: "1.8.17" } });
18
18
 
19
19
  var PROP_NAME = 'datepicker';
20
20
  var dpuuid = new Date().getTime();
@@ -638,10 +638,10 @@ $.extend(Datepicker.prototype, {
638
638
  return;
639
639
  var inst = $.datepicker._getInst(input);
640
640
  if ($.datepicker._curInst && $.datepicker._curInst != inst) {
641
- if ( $.datepicker._datepickerShowing ) {
642
- $.datepicker._triggerOnClose($.datepicker._curInst);
643
- }
644
641
  $.datepicker._curInst.dpDiv.stop(true, true);
642
+ if ( inst && $.datepicker._datepickerShowing ) {
643
+ $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
644
+ }
645
645
  }
646
646
  var beforeShow = $.datepicker._get(inst, 'beforeShow');
647
647
  var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
@@ -790,14 +790,6 @@ $.extend(Datepicker.prototype, {
790
790
  return [position.left, position.top];
791
791
  },
792
792
 
793
- /* Trigger custom callback of onClose. */
794
- _triggerOnClose: function(inst) {
795
- var onClose = this._get(inst, 'onClose');
796
- if (onClose)
797
- onClose.apply((inst.input ? inst.input[0] : null),
798
- [(inst.input ? inst.input.val() : ''), inst]);
799
- },
800
-
801
793
  /* Hide the date picker from view.
802
794
  @param input element - the input field attached to the date picker */
803
795
  _hideDatepicker: function(input) {
@@ -807,9 +799,10 @@ $.extend(Datepicker.prototype, {
807
799
  if (this._datepickerShowing) {
808
800
  var showAnim = this._get(inst, 'showAnim');
809
801
  var duration = this._get(inst, 'duration');
802
+ var self = this;
810
803
  var postProcess = function() {
811
804
  $.datepicker._tidyDialog(inst);
812
- this._curInst = null;
805
+ self._curInst = null;
813
806
  };
814
807
  if ($.effects && $.effects[showAnim])
815
808
  inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
@@ -818,8 +811,11 @@ $.extend(Datepicker.prototype, {
818
811
  (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
819
812
  if (!showAnim)
820
813
  postProcess();
821
- $.datepicker._triggerOnClose(inst);
822
814
  this._datepickerShowing = false;
815
+ var onClose = this._get(inst, 'onClose');
816
+ if (onClose)
817
+ onClose.apply((inst.input ? inst.input[0] : null),
818
+ [(inst.input ? inst.input.val() : ''), inst]);
823
819
  this._lastInput = null;
824
820
  if (this._inDialog) {
825
821
  this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
@@ -841,12 +837,16 @@ $.extend(Datepicker.prototype, {
841
837
  _checkExternalClick: function(event) {
842
838
  if (!$.datepicker._curInst)
843
839
  return;
844
- var $target = $(event.target);
845
- if ($target[0].id != $.datepicker._mainDivId &&
840
+
841
+ var $target = $(event.target),
842
+ inst = $.datepicker._getInst($target[0]);
843
+
844
+ if ( ( ( $target[0].id != $.datepicker._mainDivId &&
846
845
  $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
847
846
  !$target.hasClass($.datepicker.markerClassName) &&
848
847
  !$target.hasClass($.datepicker._triggerClass) &&
849
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
848
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
849
+ ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
850
850
  $.datepicker._hideDatepicker();
851
851
  },
852
852
 
@@ -1816,7 +1816,7 @@ $.fn.datepicker = function(options){
1816
1816
  $.datepicker = new Datepicker(); // singleton instance
1817
1817
  $.datepicker.initialized = false;
1818
1818
  $.datepicker.uuid = new Date().getTime();
1819
- $.datepicker.version = "1.8.16";
1819
+ $.datepicker.version = "1.8.17";
1820
1820
 
1821
1821
  // Workaround for #4055
1822
1822
  // Add another global to avoid noConflict issues with inline event handlers