iqvoc 3.2.3 → 3.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/Gemfile +4 -1
  2. data/Gemfile.lock +48 -10
  3. data/README.md +5 -5
  4. data/app/controllers/application_controller.rb +1 -0
  5. data/app/controllers/concepts/versions_controller.rb +3 -3
  6. data/app/controllers/concepts_controller.rb +3 -4
  7. data/app/helpers/application_helper.rb +1 -1
  8. data/app/models/concept/base.rb +9 -6
  9. data/app/models/labeling/skos/base.rb +12 -7
  10. data/app/models/note/skos/change_note.rb +11 -0
  11. data/app/models/origin_mapping.rb +1 -1
  12. data/app/views/concepts/_base_data.html.erb +3 -3
  13. data/app/views/layouts/_controls.html.erb +1 -1
  14. data/app/views/layouts/application.html.erb +5 -2
  15. data/app/views/partials/labeling/skos/_search_result.html.erb +9 -4
  16. data/app/views/partials/note/skos/change_note/_search_result.html.erb +12 -0
  17. data/app/views/search_results/index.html.erb +6 -0
  18. data/config/database.template.yml +21 -35
  19. data/config/database.yml +34 -32
  20. data/config/database.yml.mysql +29 -0
  21. data/config/database.yml.sqlite +17 -0
  22. data/config/initializers/secret_token.rb +2 -1
  23. data/config/initializers/secret_token.rb.template +2 -1
  24. data/config/locales/activerecord.de.yml +6 -0
  25. data/config/locales/activerecord.en.yml +6 -0
  26. data/config/locales/de.yml +1 -0
  27. data/config/locales/en.yml +1 -0
  28. data/config/routes.rb +1 -1
  29. data/db/iqvoc_test.sqlite3 +0 -0
  30. data/db/schema.rb +1 -0
  31. data/lib/iqvoc/rdf_helper.rb +1 -1
  32. data/lib/iqvoc/version.rb +1 -1
  33. data/lib/iqvoc/versioning.rb +1 -1
  34. data/public/javascripts/iqvoc/application.js +11 -1
  35. data/public/javascripts/iqvoc/entityselect.js +1 -1
  36. data/public/javascripts/iqvoc/{jquery-ui-1.8.13.custom.js → jquery-ui-1.8.16.custom.js} +85 -45
  37. data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.min.js +165 -0
  38. data/public/stylesheets/iqvoc/ie_fixes.css +6 -0
  39. data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  40. data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
  41. data/public/stylesheets/iqvoc/iqvoc.css +6 -3
  42. data/public/stylesheets/iqvoc/{jquery-ui-1.8.13.custom.css → jquery-ui-1.8.16.custom.css} +11 -16
  43. data/test/integration/note_annotations_test.rb +6 -4
  44. data/test/integration/search_test.rb +10 -4
  45. data/test/unit/origin_mapping_test.rb +4 -8
  46. metadata +24 -33
  47. data/app/views/partials/collection_label/_search_result.html.erb +0 -5
  48. data/app/views/users/_user_preference.html.erb +0 -12
  49. data/config/environments/production.template.rb +0 -65
  50. data/config/environments/production_internal.rb +0 -65
  51. data/public/images/iqvoc/add.png +0 -0
  52. data/public/images/iqvoc/go_there.png +0 -0
  53. data/public/images/iqvoc/header.png +0 -0
  54. data/public/images/iqvoc/iqvoc.png +0 -0
  55. data/public/images/iqvoc/note_add.png +0 -0
  56. data/public/images/iqvoc/note_delete.png +0 -0
  57. data/public/images/iqvoc/note_edit.png +0 -0
  58. data/public/images/iqvoc/rails.png +0 -0
  59. data/public/images/iqvoc/remove.png +0 -0
  60. data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +0 -163
@@ -22,6 +22,9 @@ en:
22
22
  one: "Concept"
23
23
  other: "Concepts"
24
24
  relation:
25
+ base:
26
+ one: "Relation"
27
+ other: "Relations"
25
28
  skos:
26
29
  broader:
27
30
  mono:
@@ -57,6 +60,9 @@ en:
57
60
  one: "Alternative label"
58
61
  other: "Alternative labels"
59
62
  match:
63
+ base:
64
+ one: "Match"
65
+ other: "Matches"
60
66
  skos:
61
67
  broad_match:
62
68
  one: "Broader Match"
@@ -154,6 +154,7 @@ de:
154
154
  language: "Sprache"
155
155
  all: "alle"
156
156
  none: "keine"
157
+ for: "Nach"
157
158
  user_sessions:
158
159
  header: "Anmelden"
159
160
  login: "Anmelden"
@@ -162,6 +162,7 @@ en:
162
162
  language: "language"
163
163
  all: "all"
164
164
  none: "none"
165
+ for: "For"
165
166
  user_sessions:
166
167
  header: "Login"
167
168
  login: "Login"
data/config/routes.rb CHANGED
@@ -46,7 +46,7 @@ Rails.application.routes.draw do
46
46
 
47
47
  match 'search(.:format)' => 'search_results#index', :as => 'search'
48
48
 
49
- root :to => 'concepts/hierarchical#index'
49
+ root :to => 'concepts/hierarchical#index', :format => nil
50
50
  end
51
51
 
52
52
  match '/:id(.:format)' => 'rdf#show', :as => 'rdf'
Binary file
data/db/schema.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  # This file is auto-generated from the current state of the database. Instead
2
3
  # of editing this file, please use the migrations feature of Active Record to
3
4
  # incrementally modify your database, and then regenerate this schema definition.
@@ -51,7 +51,7 @@ module Iqvoc
51
51
  :value => elements[0].gsub(/\\"/, '"'),
52
52
  :language => elements[1]
53
53
  }
54
- RAILS_DEFAULT_LOGGER.debug "@split_literal => #{@split_literal}"
54
+ ::Rails.logger.debug "@split_literal => #{@split_literal}"
55
55
  @split_literal
56
56
  end
57
57
 
data/lib/iqvoc/version.rb CHANGED
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Iqvoc
18
- VERSION = "3.2.3"
18
+ VERSION = "3.2.4"
19
19
  end
@@ -69,7 +69,7 @@ module Iqvoc
69
69
  def branch(user)
70
70
  new_version = self.clone(:include => self.class.includes_to_deep_cloning)
71
71
  new_version.lock_by_user(user.id)
72
- new_version.increment!(:rev)
72
+ new_version.increment(:rev)
73
73
  new_version.published_version_id = self.id
74
74
  new_version.unpublish
75
75
  new_version.send(:"#{Iqvoc.change_note_class_name.to_relation_name}").build(
@@ -85,7 +85,7 @@ jQuery(document).ready(function($) {
85
85
 
86
86
  // Datepicker
87
87
  $.datepicker.setDefaults($.datepicker.regional[locale]);
88
- $("input.datepicker").datepicker();
88
+ $("input.datepicker").datepicker({ dateFormat: "yy-mm-dd" });
89
89
 
90
90
  // Dashboard table row highlighting and click handling
91
91
  $("tr.highlightable")
@@ -104,6 +104,16 @@ jQuery(document).ready(function($) {
104
104
  $("button#language_select_none").click(function() {
105
105
  $("input[type=checkbox].lang_check").attr("checked", false);
106
106
  });
107
+ $("select.search_type").change(function() {
108
+ var result_type_filter = $("li.result_type_filter");
109
+ if($(this).val().match(/labeling/)) {
110
+ result_type_filter.show();
111
+ }
112
+ else {
113
+ result_type_filter.hide();
114
+ }
115
+ });
116
+ $("select.search_type").change();
107
117
 
108
118
  // hierarchical tree view
109
119
  $("ul.hybrid-treeview").each(function() {
@@ -73,7 +73,7 @@ $.extend(EntitySelector.prototype, {
73
73
  var widget = el.closest(".entity_select").data("widget");
74
74
  widget.remove(entity.data("id"));
75
75
  entity.remove();
76
- if(widget.singular) {
76
+ if(widget.singular && !widget.entities.length) {
77
77
  widget.input.show();
78
78
  }
79
79
  ev.preventDefault();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery UI 1.8.13
2
+ * jQuery UI 1.8.16
3
3
  *
4
4
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -18,7 +18,7 @@ if ( $.ui.version ) {
18
18
  }
19
19
 
20
20
  $.extend( $.ui, {
21
- version: "1.8.13",
21
+ version: "1.8.16",
22
22
 
23
23
  keyCode: {
24
24
  ALT: 18,
@@ -58,6 +58,8 @@ $.extend( $.ui, {
58
58
 
59
59
  // plugins
60
60
  $.fn.extend({
61
+ propAttr: $.fn.prop || $.fn.attr,
62
+
61
63
  _focus: $.fn.focus,
62
64
  focus: function( delay, fn ) {
63
65
  return typeof delay === "number" ?
@@ -311,7 +313,7 @@ $.extend( $.ui, {
311
313
 
312
314
  })( jQuery );
313
315
  /*!
314
- * jQuery UI Widget 1.8.13
316
+ * jQuery UI Widget 1.8.16
315
317
  *
316
318
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
317
319
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -326,7 +328,10 @@ if ( $.cleanData ) {
326
328
  var _cleanData = $.cleanData;
327
329
  $.cleanData = function( elems ) {
328
330
  for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
329
- $( elem ).triggerHandler( "remove" );
331
+ try {
332
+ $( elem ).triggerHandler( "remove" );
333
+ // http://bugs.jquery.com/ticket/8235
334
+ } catch( e ) {}
330
335
  }
331
336
  _cleanData( elems );
332
337
  };
@@ -337,7 +342,10 @@ if ( $.cleanData ) {
337
342
  if ( !keepData ) {
338
343
  if ( !selector || $.filter( selector, [ this ] ).length ) {
339
344
  $( "*", this ).add( [ this ] ).each(function() {
340
- $( this ).triggerHandler( "remove" );
345
+ try {
346
+ $( this ).triggerHandler( "remove" );
347
+ // http://bugs.jquery.com/ticket/8235
348
+ } catch( e ) {}
341
349
  });
342
350
  }
343
351
  }
@@ -573,7 +581,7 @@ $.Widget.prototype = {
573
581
 
574
582
  })( jQuery );
575
583
  /*
576
- * jQuery UI Position 1.8.13
584
+ * jQuery UI Position 1.8.16
577
585
  *
578
586
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
579
587
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -825,7 +833,7 @@ if ( !$.offset.setOffset ) {
825
833
 
826
834
  }( jQuery ));
827
835
  /*
828
- * jQuery UI Autocomplete 1.8.13
836
+ * jQuery UI Autocomplete 1.8.16
829
837
  *
830
838
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
831
839
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -874,7 +882,7 @@ $.widget( "ui.autocomplete", {
874
882
  "aria-haspopup": "true"
875
883
  })
876
884
  .bind( "keydown.autocomplete", function( event ) {
877
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
885
+ if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) {
878
886
  return;
879
887
  }
880
888
 
@@ -1437,7 +1445,7 @@ $.widget("ui.menu", {
1437
1445
 
1438
1446
  }(jQuery));
1439
1447
  /*
1440
- * jQuery UI Datepicker 1.8.13
1448
+ * jQuery UI Datepicker 1.8.16
1441
1449
  *
1442
1450
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
1443
1451
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1450,7 +1458,7 @@ $.widget("ui.menu", {
1450
1458
  */
1451
1459
  (function( $, undefined ) {
1452
1460
 
1453
- $.extend($.ui, { datepicker: { version: "1.8.13" } });
1461
+ $.extend($.ui, { datepicker: { version: "1.8.16" } });
1454
1462
 
1455
1463
  var PROP_NAME = 'datepicker';
1456
1464
  var dpuuid = new Date().getTime();
@@ -1543,7 +1551,8 @@ function Datepicker() {
1543
1551
  altFormat: '', // The date format to use for the alternate field
1544
1552
  constrainInput: true, // The input is constrained by the current date format
1545
1553
  showButtonPanel: false, // True to show button panel, false to not show it
1546
- autoSize: false // True to size the input for the date format, false to leave as is
1554
+ autoSize: false, // True to size the input for the date format, false to leave as is
1555
+ disabled: false // The initial disabled state
1547
1556
  };
1548
1557
  $.extend(this._defaults, this.regional['']);
1549
1558
  this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
@@ -1552,6 +1561,9 @@ function Datepicker() {
1552
1561
  $.extend(Datepicker.prototype, {
1553
1562
  /* Class name added to elements to indicate already configured with a date picker. */
1554
1563
  markerClassName: 'hasDatepicker',
1564
+
1565
+ //Keep track of the maximum number of rows displayed (see #7043)
1566
+ maxRows: 4,
1555
1567
 
1556
1568
  /* Debug logging (if enabled). */
1557
1569
  log: function () {
@@ -1632,6 +1644,10 @@ $.extend(Datepicker.prototype, {
1632
1644
  });
1633
1645
  this._autoSize(inst);
1634
1646
  $.data(target, PROP_NAME, inst);
1647
+ //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
1648
+ if( inst.settings.disabled ) {
1649
+ this._disableDatepicker( target );
1650
+ }
1635
1651
  },
1636
1652
 
1637
1653
  /* Make attachments based on settings. */
@@ -1711,7 +1727,13 @@ $.extend(Datepicker.prototype, {
1711
1727
  this._setDate(inst, this._getDefaultDate(inst), true);
1712
1728
  this._updateDatepicker(inst);
1713
1729
  this._updateAlternate(inst);
1714
- inst.dpDiv.show();
1730
+ //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
1731
+ if( inst.settings.disabled ) {
1732
+ this._disableDatepicker( target );
1733
+ }
1734
+ // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
1735
+ // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
1736
+ inst.dpDiv.css( "display", "block" );
1715
1737
  },
1716
1738
 
1717
1739
  /* Pop-up the date picker in a "dialog" box.
@@ -1955,6 +1977,13 @@ $.extend(Datepicker.prototype, {
1955
1977
  $.datepicker._currentClass + ')', inst.dpDiv);
1956
1978
  if (sel[0])
1957
1979
  $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
1980
+ var onSelect = $.datepicker._get(inst, 'onSelect');
1981
+ if (onSelect) {
1982
+ var dateStr = $.datepicker._formatDate(inst);
1983
+
1984
+ // trigger custom callback
1985
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
1986
+ }
1958
1987
  else
1959
1988
  $.datepicker._hideDatepicker();
1960
1989
  return false; // don't submit the form
@@ -2042,6 +2071,7 @@ $.extend(Datepicker.prototype, {
2042
2071
  },
2043
2072
 
2044
2073
  /* Pop-up the date picker for a given input field.
2074
+ If false returned from beforeShow event handler do not show.
2045
2075
  @param input element - the input field attached to the date picker or
2046
2076
  event - if triggered by focus */
2047
2077
  _showDatepicker: function(input) {
@@ -2052,10 +2082,18 @@ $.extend(Datepicker.prototype, {
2052
2082
  return;
2053
2083
  var inst = $.datepicker._getInst(input);
2054
2084
  if ($.datepicker._curInst && $.datepicker._curInst != inst) {
2085
+ if ( $.datepicker._datepickerShowing ) {
2086
+ $.datepicker._triggerOnClose($.datepicker._curInst);
2087
+ }
2055
2088
  $.datepicker._curInst.dpDiv.stop(true, true);
2056
2089
  }
2057
2090
  var beforeShow = $.datepicker._get(inst, 'beforeShow');
2058
- extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
2091
+ var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
2092
+ if(beforeShowSettings === false){
2093
+ //false
2094
+ return;
2095
+ }
2096
+ extendRemove(inst.settings, beforeShowSettings);
2059
2097
  inst.lastVal = null;
2060
2098
  $.datepicker._lastInput = input;
2061
2099
  $.datepicker._setDateFromField(inst);
@@ -2115,6 +2153,7 @@ $.extend(Datepicker.prototype, {
2115
2153
  /* Generate the date picker content. */
2116
2154
  _updateDatepicker: function(inst) {
2117
2155
  var self = this;
2156
+ self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
2118
2157
  var borders = $.datepicker._getBorders(inst.dpDiv);
2119
2158
  instActive = inst; // for delegate hover events
2120
2159
  inst.dpDiv.empty().append(this._generateHTML(inst));
@@ -2195,6 +2234,14 @@ $.extend(Datepicker.prototype, {
2195
2234
  return [position.left, position.top];
2196
2235
  },
2197
2236
 
2237
+ /* Trigger custom callback of onClose. */
2238
+ _triggerOnClose: function(inst) {
2239
+ var onClose = this._get(inst, 'onClose');
2240
+ if (onClose)
2241
+ onClose.apply((inst.input ? inst.input[0] : null),
2242
+ [(inst.input ? inst.input.val() : ''), inst]);
2243
+ },
2244
+
2198
2245
  /* Hide the date picker from view.
2199
2246
  @param input element - the input field attached to the date picker */
2200
2247
  _hideDatepicker: function(input) {
@@ -2215,10 +2262,7 @@ $.extend(Datepicker.prototype, {
2215
2262
  (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
2216
2263
  if (!showAnim)
2217
2264
  postProcess();
2218
- var onClose = this._get(inst, 'onClose');
2219
- if (onClose)
2220
- onClose.apply((inst.input ? inst.input[0] : null),
2221
- [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
2265
+ $.datepicker._triggerOnClose(inst);
2222
2266
  this._datepickerShowing = false;
2223
2267
  this._lastInput = null;
2224
2268
  if (this._inDialog) {
@@ -2286,7 +2330,6 @@ $.extend(Datepicker.prototype, {
2286
2330
  _selectMonthYear: function(id, select, period) {
2287
2331
  var target = $(id);
2288
2332
  var inst = this._getInst(target[0]);
2289
- inst._selectingMonthYear = false;
2290
2333
  inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
2291
2334
  inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
2292
2335
  parseInt(select.options[select.selectedIndex].value,10);
@@ -2294,18 +2337,6 @@ $.extend(Datepicker.prototype, {
2294
2337
  this._adjustDate(target);
2295
2338
  },
2296
2339
 
2297
- /* Restore input focus after not changing month/year. */
2298
- _clickMonthYear: function(id) {
2299
- var target = $(id);
2300
- var inst = this._getInst(target[0]);
2301
- if (inst.input && inst._selectingMonthYear) {
2302
- setTimeout(function() {
2303
- inst.input.focus();
2304
- }, 0);
2305
- }
2306
- inst._selectingMonthYear = !inst._selectingMonthYear;
2307
- },
2308
-
2309
2340
  /* Action for selecting a day. */
2310
2341
  _selectDay: function(id, month, year, td) {
2311
2342
  var target = $(id);
@@ -2508,6 +2539,9 @@ $.extend(Datepicker.prototype, {
2508
2539
  checkLiteral();
2509
2540
  }
2510
2541
  }
2542
+ if (iValue < value.length){
2543
+ throw "Extra/unparsed characters found in date: " + value.substring(iValue);
2544
+ }
2511
2545
  if (year == -1)
2512
2546
  year = new Date().getFullYear();
2513
2547
  else if (year < 100)
@@ -2619,7 +2653,7 @@ $.extend(Datepicker.prototype, {
2619
2653
  break;
2620
2654
  case 'o':
2621
2655
  output += formatNumber('o',
2622
- (date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
2656
+ Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
2623
2657
  break;
2624
2658
  case 'm':
2625
2659
  output += formatNumber('m', date.getMonth() + 1, 2);
@@ -2894,6 +2928,7 @@ $.extend(Datepicker.prototype, {
2894
2928
  var html = '';
2895
2929
  for (var row = 0; row < numMonths[0]; row++) {
2896
2930
  var group = '';
2931
+ this.maxRows = 4;
2897
2932
  for (var col = 0; col < numMonths[1]; col++) {
2898
2933
  var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
2899
2934
  var cornerClass = ' ui-corner-all';
@@ -2928,7 +2963,9 @@ $.extend(Datepicker.prototype, {
2928
2963
  if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
2929
2964
  inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
2930
2965
  var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
2931
- var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
2966
+ var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
2967
+ var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
2968
+ this.maxRows = numRows;
2932
2969
  var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
2933
2970
  for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
2934
2971
  calender += '<tr>';
@@ -2998,7 +3035,6 @@ $.extend(Datepicker.prototype, {
2998
3035
  var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
2999
3036
  monthHtml += '<select class="ui-datepicker-month" ' +
3000
3037
  'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
3001
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
3002
3038
  '>';
3003
3039
  for (var month = 0; month < 12; month++) {
3004
3040
  if ((!inMinYear || month >= minDate.getMonth()) &&
@@ -3032,7 +3068,6 @@ $.extend(Datepicker.prototype, {
3032
3068
  endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
3033
3069
  inst.yearshtml += '<select class="ui-datepicker-year" ' +
3034
3070
  'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
3035
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
3036
3071
  '>';
3037
3072
  for (; year <= endYear; year++) {
3038
3073
  inst.yearshtml += '<option value="' + year + '"' +
@@ -3154,18 +3189,23 @@ $.extend(Datepicker.prototype, {
3154
3189
  */
3155
3190
  function bindHover(dpDiv) {
3156
3191
  var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
3157
- return dpDiv.delegate(selector, 'mouseout', function() {
3158
- $(this).removeClass('ui-state-hover');
3159
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
3160
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
3192
+ return dpDiv.bind('mouseout', function(event) {
3193
+ var elem = $( event.target ).closest( selector );
3194
+ if ( !elem.length ) {
3195
+ return;
3196
+ }
3197
+ elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" );
3161
3198
  })
3162
- .delegate(selector, 'mouseover', function(){
3163
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
3164
- $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
3165
- $(this).addClass('ui-state-hover');
3166
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
3167
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
3199
+ .bind('mouseover', function(event) {
3200
+ var elem = $( event.target ).closest( selector );
3201
+ if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
3202
+ !elem.length ) {
3203
+ return;
3168
3204
  }
3205
+ elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
3206
+ elem.addClass('ui-state-hover');
3207
+ if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');
3208
+ if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');
3169
3209
  });
3170
3210
  }
3171
3211
 
@@ -3220,7 +3260,7 @@ $.fn.datepicker = function(options){
3220
3260
  $.datepicker = new Datepicker(); // singleton instance
3221
3261
  $.datepicker.initialized = false;
3222
3262
  $.datepicker.uuid = new Date().getTime();
3223
- $.datepicker.version = "1.8.13";
3263
+ $.datepicker.version = "1.8.16";
3224
3264
 
3225
3265
  // Workaround for #4055
3226
3266
  // Add another global to avoid noConflict issues with inline event handlers