iqvoc 4.0.2 → 4.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/Gemfile.lock +43 -47
  3. data/app/assets/javascripts/framework.js +1 -1
  4. data/app/assets/javascripts/iqvoc/extract_concepts.js +19 -0
  5. data/app/assets/javascripts/iqvoc/iqvoc.js +8 -12
  6. data/app/assets/javascripts/iqvoc/manifest.js +3 -0
  7. data/app/assets/javascripts/iqvoc/onebox.js +44 -0
  8. data/app/assets/javascripts/iqvoc/quicksearch.js +41 -0
  9. data/app/assets/stylesheets/framework.css +1 -1
  10. data/app/assets/stylesheets/iqvoc/bootstrap_extensions.css.scss +0 -7
  11. data/app/assets/stylesheets/iqvoc/components.css.scss +27 -1
  12. data/app/assets/stylesheets/iqvoc/manifest.css +0 -1
  13. data/app/controllers/application_controller.rb +1 -1
  14. data/app/controllers/concepts/alphabetical_controller.rb +5 -1
  15. data/app/controllers/concepts/untranslated_controller.rb +1 -1
  16. data/app/controllers/concepts_controller.rb +2 -0
  17. data/app/controllers/frontpage_controller.rb +23 -0
  18. data/app/controllers/instance_configuration_controller.rb +10 -2
  19. data/app/controllers/pages_controller.rb +21 -0
  20. data/app/controllers/rdf_controller.rb +0 -21
  21. data/app/helpers/concepts_helper.rb +1 -1
  22. data/app/helpers/navigation_helper.rb +0 -10
  23. data/app/helpers/rdf_helper.rb +1 -1
  24. data/app/models/concept/base.rb +2 -2
  25. data/app/models/concept/skos/base.rb +1 -1
  26. data/app/models/label/base.rb +5 -2
  27. data/app/models/labeling/base.rb +2 -2
  28. data/app/models/labeling/skos/base.rb +1 -1
  29. data/app/models/note/base.rb +0 -6
  30. data/app/models/note/skos/base.rb +20 -8
  31. data/app/views/concepts/alphabetical/index.html.erb +2 -2
  32. data/app/views/{rdf/show_concept.iqrdf → concepts/show.iqrdf} +1 -1
  33. data/app/views/concepts/show_published.html.erb +0 -1
  34. data/app/views/concepts/show_unpublished.html.erb +0 -1
  35. data/app/views/concepts/sidebars/_plural.html.erb +3 -3
  36. data/app/views/concepts/sidebars/_singular.html.erb +4 -5
  37. data/app/views/concepts/untranslated/index.html.erb +1 -1
  38. data/app/views/frontpage/index.html.erb +8 -0
  39. data/app/views/instance_configuration/index.html.erb +8 -5
  40. data/app/views/layouts/_navigation.html.erb +10 -8
  41. data/app/views/layouts/application.html.erb +3 -1
  42. data/app/views/pages/help.html.erb +75 -0
  43. data/app/views/partials/labeling/skos/_base.html.erb +2 -1
  44. data/config/initializers/language.rb +1 -1
  45. data/config/locales/de.yml +8 -0
  46. data/config/locales/en.yml +8 -0
  47. data/config/routes.rb +8 -6
  48. data/lib/generators/app/template.rb +1 -1
  49. data/lib/iqvoc/ability.rb +3 -0
  50. data/lib/iqvoc/configuration/collection.rb +2 -2
  51. data/lib/iqvoc/configuration/concept.rb +1 -1
  52. data/lib/iqvoc/configuration/core.rb +6 -4
  53. data/lib/iqvoc/configuration/label.rb +2 -2
  54. data/lib/iqvoc/controller_extensions.rb +1 -1
  55. data/lib/iqvoc/environments/development.rb +6 -0
  56. data/lib/iqvoc/environments/production.rb +6 -0
  57. data/lib/iqvoc/environments/test.rb +6 -0
  58. data/lib/iqvoc/instance_configuration.rb +3 -2
  59. data/lib/iqvoc/skos_importer.rb +23 -0
  60. data/lib/iqvoc/version.rb +1 -1
  61. data/lib/tasks/importer.rake +2 -2
  62. data/test/integration/alphabetical_test.rb +2 -2
  63. data/test/integration/browse_concepts_and_labels_test.rb +4 -4
  64. data/test/integration/untranslated_test.rb +3 -3
  65. data/test/unit/hygiene_test.rb +4 -0
  66. data/test/unit/instance_configuration_test.rb +17 -1
  67. data/test/unit/skos_import_test.rb +19 -0
  68. data/vendor/assets/images/jquery-ui/ui-icons_469bdd_256x240.png +0 -0
  69. data/vendor/assets/javascripts/{jquery-ui-1.8.20.custom.js → jquery-ui-1.8.23.custom.js} +124 -69
  70. data/vendor/assets/stylesheets/{jquery-ui-1.8.20.custom.css → jquery-ui-1.8.23.custom.css} +5 -7
  71. metadata +34 -31
  72. data/app/assets/javascripts/iqvoc/visualization.js +0 -321
  73. data/app/views/concepts/_visualization.html.erb +0 -11
  74. data/vendor/assets/javascripts/excanvas.js +0 -35
  75. data/vendor/assets/javascripts/jit_rgraph.js +0 -153
@@ -32,7 +32,7 @@ class AlphabeticalConceptsTest < ActionDispatch::IntegrationTest
32
32
  end
33
33
 
34
34
  test "showing only concepts with a pref label in respective language" do
35
- visit alphabetical_concepts_path(:lang => :en, :letter => "x", :format => :html)
35
+ visit alphabetical_concepts_path(:lang => :en, :prefix => "x", :format => :html)
36
36
  lists = page.all("#content ul")
37
37
  assert_equal 2, lists.length
38
38
  concepts = lists[1].all("li") # XXX: too unspecific
@@ -42,7 +42,7 @@ class AlphabeticalConceptsTest < ActionDispatch::IntegrationTest
42
42
  assert_equal "Xen1", concepts[0].text.strip
43
43
  assert_equal "Xen2", concepts[1].text.strip
44
44
 
45
- visit alphabetical_concepts_path(:lang => :de, :letter => "x", :format => :html)
45
+ visit alphabetical_concepts_path(:lang => :de, :prefix => "x", :format => :html)
46
46
  concepts = page.all("#content ul")[1].all("li") # XXX: too unspecific
47
47
 
48
48
  assert_equal :de, I18n.locale
@@ -32,16 +32,16 @@ class BrowseConceptsAndLabelsTest < ActionDispatch::IntegrationTest
32
32
 
33
33
  test "selecting a concept in alphabetical view" do
34
34
  letter = "T" # => Only the "Tree" should show up in the english version
35
- visit alphabetical_concepts_path(:lang => 'en', :letter => letter, :format => :html)
35
+ visit alphabetical_concepts_path(:lang => 'en', :prefix => letter, :format => :html)
36
36
  assert page.has_link?(@concepts[0].pref_label.to_s),
37
- "Concept '#{@concepts[0].pref_label}' not found on alphabetical concepts list (letter: #{letter})"
37
+ "Concept '#{@concepts[0].pref_label}' not found on alphabetical concepts list (prefix: #{letter})"
38
38
  assert !page.has_content?(@concepts[1].pref_label.to_s),
39
- "Found concept '#{@concepts[1].pref_label}' on alphabetical concepts list (letter: #{letter})"
39
+ "Found concept '#{@concepts[1].pref_label}' on alphabetical concepts list (prefix: #{letter})"
40
40
  click_link_or_button(@concepts[0].pref_label.to_s)
41
41
  assert_equal concept_path(@concepts[0], :lang => 'en', :format => :html), URI.parse(current_url).path
42
42
 
43
43
  letter = "F" # => Only the "Forest" should show up in the english version
44
- visit alphabetical_concepts_path(:lang => 'en', :letter => letter, :format => :html)
44
+ visit alphabetical_concepts_path(:lang => 'en', :prefix => letter, :format => :html)
45
45
  assert page.has_link?("Forest")
46
46
  assert !page.has_link?("Forst")
47
47
  assert !page.has_link?("Tree")
@@ -37,7 +37,7 @@ class UntranslatedConceptsTest < ActionDispatch::IntegrationTest
37
37
  # should fail (see the commit that introduced this very comment for details)
38
38
 
39
39
  test "showing only concepts without pref label in respective language" do
40
- visit untranslated_concepts_path(:lang => :de, :letter => "x", :format => :html)
40
+ visit untranslated_concepts_path(:lang => :de, :prefix => "x", :format => :html)
41
41
  concepts = page.all("#content ul")[1].all("li") # XXX: too unspecific
42
42
 
43
43
  assert_equal :de, I18n.locale
@@ -45,7 +45,7 @@ class UntranslatedConceptsTest < ActionDispatch::IntegrationTest
45
45
  assert_equal 1, concepts[0].all("a").length
46
46
  assert_equal "Xen2", concepts[0].find("a").text.strip
47
47
 
48
- visit untranslated_concepts_path(:lang => :de, :letter => "y", :format => :html)
48
+ visit untranslated_concepts_path(:lang => :de, :prefix => "y", :format => :html)
49
49
  concepts = page.all("#content ul")[1].all("li") # XXX: too unspecific
50
50
 
51
51
  assert_equal 1, concepts.length
@@ -53,7 +53,7 @@ class UntranslatedConceptsTest < ActionDispatch::IntegrationTest
53
53
  end
54
54
 
55
55
  test "showing error message for thesaurus's main language" do
56
- visit untranslated_concepts_path(:lang => :en, :letter => "x", :format => :html)
56
+ visit untranslated_concepts_path(:lang => :en, :prefix => "x", :format => :html)
57
57
 
58
58
  assert_equal :en, I18n.locale
59
59
  assert_equal 1, page.all("#content .alert-error").length
@@ -26,6 +26,10 @@ class HygieneTest < ActiveSupport::TestCase
26
26
  assert_no_occurrence "#{space}#{tab}\|#{tab}#{space}", "mixed whitespace", true
27
27
  end
28
28
 
29
+ test "quotation mark consistency" do
30
+ assert_no_occurrence '^require "', "`require` should use single quotes"
31
+ end
32
+
29
33
  def assert_no_occurrence(pattern, error_message, extended=false)
30
34
  extra_options = extended ? "E" : ""
31
35
  lines = `git grep -In#{extra_options} '#{pattern}' | grep -v '^vendor/'`
@@ -1,4 +1,20 @@
1
- require "test_helper"
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require File.join(File.expand_path(File.dirname(__FILE__)), '../test_helper')
2
18
 
3
19
  class InstanceConfigurationTest < ActiveSupport::TestCase
4
20
 
@@ -97,6 +97,25 @@ class SkosImportTest < ActiveSupport::TestCase
97
97
  assert_nil Iqvoc::Concept.base_class.by_origin("1").last
98
98
  assert_not_nil Iqvoc::Concept.base_class.by_origin("_1").last
99
99
  end
100
+
101
+ test "blank nodes" do
102
+ test_data = (<<-DATA
103
+ <http://www.example.com/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept> .
104
+ <http://www.example.com/car> <http://www.w3.org/2008/05/skos#prefLabel> "Car"@en .
105
+ <http://www.example.com/car> <http://www.w3.org/2004/02/skos/core#changeNote> _:A01 .
106
+ _:A01 <http://purl.org/dc/terms/modified> "2012-02-13T08:56:13+01:00" .
107
+ _:A01 <http://purl.org/dc/terms/creator> "Arnulf Beckenbauer" .
108
+ DATA
109
+ ).split("\n")
110
+
111
+ assert_difference('Note::SKOS::ChangeNote.count', 1) do
112
+ Iqvoc::SkosImporter.new(test_data, "http://www.example.com/")
113
+ end
114
+
115
+ assert_difference('Note::Annotated::Base.count', 2) do
116
+ Iqvoc::SkosImporter.new(test_data, "http://www.example.com/")
117
+ end
118
+ end
100
119
  end
101
120
 
102
121
  class SkosCollectionImportTest < ActiveSupport::TestCase
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery UI 1.8.20
2
+ * jQuery UI 1.8.23
3
3
  *
4
4
  * Copyright 2012, 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.20",
21
+ version: "1.8.23",
22
22
 
23
23
  keyCode: {
24
24
  ALT: 18,
@@ -131,49 +131,52 @@ $.fn.extend({
131
131
  }
132
132
  });
133
133
 
134
- $.each( [ "Width", "Height" ], function( i, name ) {
135
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
136
- type = name.toLowerCase(),
137
- orig = {
138
- innerWidth: $.fn.innerWidth,
139
- innerHeight: $.fn.innerHeight,
140
- outerWidth: $.fn.outerWidth,
141
- outerHeight: $.fn.outerHeight
142
- };
143
-
144
- function reduce( elem, size, border, margin ) {
145
- $.each( side, function() {
146
- size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
147
- if ( border ) {
148
- size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
149
- }
150
- if ( margin ) {
151
- size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
152
- }
153
- });
154
- return size;
155
- }
134
+ // support: jQuery <1.8
135
+ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
136
+ $.each( [ "Width", "Height" ], function( i, name ) {
137
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
138
+ type = name.toLowerCase(),
139
+ orig = {
140
+ innerWidth: $.fn.innerWidth,
141
+ innerHeight: $.fn.innerHeight,
142
+ outerWidth: $.fn.outerWidth,
143
+ outerHeight: $.fn.outerHeight
144
+ };
156
145
 
157
- $.fn[ "inner" + name ] = function( size ) {
158
- if ( size === undefined ) {
159
- return orig[ "inner" + name ].call( this );
146
+ function reduce( elem, size, border, margin ) {
147
+ $.each( side, function() {
148
+ size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
149
+ if ( border ) {
150
+ size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
151
+ }
152
+ if ( margin ) {
153
+ size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
154
+ }
155
+ });
156
+ return size;
160
157
  }
161
158
 
162
- return this.each(function() {
163
- $( this ).css( type, reduce( this, size ) + "px" );
164
- });
165
- };
159
+ $.fn[ "inner" + name ] = function( size ) {
160
+ if ( size === undefined ) {
161
+ return orig[ "inner" + name ].call( this );
162
+ }
166
163
 
167
- $.fn[ "outer" + name] = function( size, margin ) {
168
- if ( typeof size !== "number" ) {
169
- return orig[ "outer" + name ].call( this, size );
170
- }
164
+ return this.each(function() {
165
+ $( this ).css( type, reduce( this, size ) + "px" );
166
+ });
167
+ };
171
168
 
172
- return this.each(function() {
173
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
174
- });
175
- };
176
- });
169
+ $.fn[ "outer" + name] = function( size, margin ) {
170
+ if ( typeof size !== "number" ) {
171
+ return orig[ "outer" + name ].call( this, size );
172
+ }
173
+
174
+ return this.each(function() {
175
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
176
+ });
177
+ };
178
+ });
179
+ }
177
180
 
178
181
  // selectors
179
182
  function focusable( element, isTabIndexNotNaN ) {
@@ -205,9 +208,16 @@ function visible( element ) {
205
208
  }
206
209
 
207
210
  $.extend( $.expr[ ":" ], {
208
- data: function( elem, i, match ) {
209
- return !!$.data( elem, match[ 3 ] );
210
- },
211
+ data: $.expr.createPseudo ?
212
+ $.expr.createPseudo(function( dataName ) {
213
+ return function( elem ) {
214
+ return !!$.data( elem, dataName );
215
+ };
216
+ }) :
217
+ // support: jQuery <1.8
218
+ function( elem, i, match ) {
219
+ return !!$.data( elem, match[ 3 ] );
220
+ },
211
221
 
212
222
  focusable: function( element ) {
213
223
  return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
@@ -245,6 +255,11 @@ $(function() {
245
255
  body.removeChild( div ).style.display = "none";
246
256
  });
247
257
 
258
+ // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css
259
+ if ( !$.curCSS ) {
260
+ $.curCSS = $.css;
261
+ }
262
+
248
263
 
249
264
 
250
265
 
@@ -318,7 +333,7 @@ $.extend( $.ui, {
318
333
 
319
334
  })( jQuery );
320
335
  /*!
321
- * jQuery UI Widget 1.8.20
336
+ * jQuery UI Widget 1.8.23
322
337
  *
323
338
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
324
339
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -590,7 +605,7 @@ $.Widget.prototype = {
590
605
 
591
606
  })( jQuery );
592
607
  /*!
593
- * jQuery UI Position 1.8.20
608
+ * jQuery UI Position 1.8.23
594
609
  *
595
610
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
596
611
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -834,7 +849,12 @@ if ( !$.offset.setOffset ) {
834
849
  $.fn.offset = function( options ) {
835
850
  var elem = this[ 0 ];
836
851
  if ( !elem || !elem.ownerDocument ) { return null; }
837
- if ( options ) {
852
+ if ( options ) {
853
+ if ( $.isFunction( options ) ) {
854
+ return this.each(function( i ) {
855
+ $( this ).offset( options.call( this, i, $( this ).offset() ) );
856
+ });
857
+ }
838
858
  return this.each(function() {
839
859
  $.offset.setOffset( this, options );
840
860
  });
@@ -843,6 +863,11 @@ if ( !$.offset.setOffset ) {
843
863
  };
844
864
  }
845
865
 
866
+ // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css
867
+ if ( !$.curCSS ) {
868
+ $.curCSS = $.css;
869
+ }
870
+
846
871
  // fraction support test (older versions of jQuery don't support fractions)
847
872
  (function () {
848
873
  var body = document.getElementsByTagName( "body" )[ 0 ],
@@ -888,7 +913,7 @@ if ( !$.offset.setOffset ) {
888
913
 
889
914
  }( jQuery ));
890
915
  /*!
891
- * jQuery UI Autocomplete 1.8.20
916
+ * jQuery UI Autocomplete 1.8.23
892
917
  *
893
918
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
894
919
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1519,7 +1544,7 @@ $.widget("ui.menu", {
1519
1544
 
1520
1545
  }(jQuery));
1521
1546
  /*!
1522
- * jQuery UI Datepicker 1.8.20
1547
+ * jQuery UI Datepicker 1.8.23
1523
1548
  *
1524
1549
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
1525
1550
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1532,7 +1557,7 @@ $.widget("ui.menu", {
1532
1557
  */
1533
1558
  (function( $, undefined ) {
1534
1559
 
1535
- $.extend($.ui, { datepicker: { version: "1.8.20" } });
1560
+ $.extend($.ui, { datepicker: { version: "1.8.23" } });
1536
1561
 
1537
1562
  var PROP_NAME = 'datepicker';
1538
1563
  var dpuuid = new Date().getTime();
@@ -1828,7 +1853,7 @@ $.extend(Datepicker.prototype, {
1828
1853
  this.uuid += 1;
1829
1854
  var id = 'dp' + this.uuid;
1830
1855
  this._dialogInput = $('<input type="text" id="' + id +
1831
- '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
1856
+ '" style="position: absolute; top: -100px; width: 0px;"/>');
1832
1857
  this._dialogInput.keydown(this._doKeyDown);
1833
1858
  $('body').append(this._dialogInput);
1834
1859
  inst = this._dialogInst = this._newInst(this._dialogInput, false);
@@ -2234,6 +2259,7 @@ $.extend(Datepicker.prototype, {
2234
2259
  var borders = $.datepicker._getBorders(inst.dpDiv);
2235
2260
  instActive = inst; // for delegate hover events
2236
2261
  inst.dpDiv.empty().append(this._generateHTML(inst));
2262
+ this._attachHandlers(inst);
2237
2263
  var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
2238
2264
  if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
2239
2265
  cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
@@ -2284,8 +2310,8 @@ $.extend(Datepicker.prototype, {
2284
2310
  var dpHeight = inst.dpDiv.outerHeight();
2285
2311
  var inputWidth = inst.input ? inst.input.outerWidth() : 0;
2286
2312
  var inputHeight = inst.input ? inst.input.outerHeight() : 0;
2287
- var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
2288
- var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
2313
+ var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
2314
+ var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
2289
2315
 
2290
2316
  offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
2291
2317
  offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
@@ -2922,6 +2948,43 @@ $.extend(Datepicker.prototype, {
2922
2948
  return startDate;
2923
2949
  },
2924
2950
 
2951
+ /* Attach the onxxx handlers. These are declared statically so
2952
+ * they work with static code transformers like Caja.
2953
+ */
2954
+ _attachHandlers: function(inst) {
2955
+ var stepMonths = this._get(inst, 'stepMonths');
2956
+ var id = '#' + inst.id.replace( /\\\\/g, "\\" );
2957
+ inst.dpDiv.find('[data-handler]').map(function () {
2958
+ var handler = {
2959
+ prev: function () {
2960
+ window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
2961
+ },
2962
+ next: function () {
2963
+ window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
2964
+ },
2965
+ hide: function () {
2966
+ window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
2967
+ },
2968
+ today: function () {
2969
+ window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
2970
+ },
2971
+ selectDay: function () {
2972
+ window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
2973
+ return false;
2974
+ },
2975
+ selectMonth: function () {
2976
+ window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
2977
+ return false;
2978
+ },
2979
+ selectYear: function () {
2980
+ window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
2981
+ return false;
2982
+ }
2983
+ };
2984
+ $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
2985
+ });
2986
+ },
2987
+
2925
2988
  /* Generate the HTML for the current state of the date picker. */
2926
2989
  _generateHTML: function(inst) {
2927
2990
  var today = new Date();
@@ -2964,8 +3027,7 @@ $.extend(Datepicker.prototype, {
2964
3027
  this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
2965
3028
  this._getFormatConfig(inst)));
2966
3029
  var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
2967
- '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
2968
- '.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
3030
+ '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
2969
3031
  ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
2970
3032
  (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
2971
3033
  var nextText = this._get(inst, 'nextText');
@@ -2973,19 +3035,17 @@ $.extend(Datepicker.prototype, {
2973
3035
  this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
2974
3036
  this._getFormatConfig(inst)));
2975
3037
  var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
2976
- '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
2977
- '.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
3038
+ '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
2978
3039
  ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
2979
3040
  (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
2980
3041
  var currentText = this._get(inst, 'currentText');
2981
3042
  var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
2982
3043
  currentText = (!navigationAsDateFormat ? currentText :
2983
3044
  this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
2984
- var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
2985
- '.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
3045
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
3046
+ this._get(inst, 'closeText') + '</button>' : '');
2986
3047
  var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
2987
- (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
2988
- '.datepicker._gotoToday(\'#' + inst.id + '\');"' +
3048
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
2989
3049
  '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
2990
3050
  var firstDay = parseInt(this._get(inst, 'firstDay'),10);
2991
3051
  firstDay = (isNaN(firstDay) ? 0 : firstDay);
@@ -3064,8 +3124,7 @@ $.extend(Datepicker.prototype, {
3064
3124
  (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
3065
3125
  (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
3066
3126
  ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
3067
- (unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
3068
- inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
3127
+ (unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
3069
3128
  (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
3070
3129
  (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
3071
3130
  (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
@@ -3108,9 +3167,7 @@ $.extend(Datepicker.prototype, {
3108
3167
  else {
3109
3168
  var inMinYear = (minDate && minDate.getFullYear() == drawYear);
3110
3169
  var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
3111
- monthHtml += '<select class="ui-datepicker-month" ' +
3112
- 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
3113
- '>';
3170
+ monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
3114
3171
  for (var month = 0; month < 12; month++) {
3115
3172
  if ((!inMinYear || month >= minDate.getMonth()) &&
3116
3173
  (!inMaxYear || month <= maxDate.getMonth()))
@@ -3141,9 +3198,7 @@ $.extend(Datepicker.prototype, {
3141
3198
  var endYear = Math.max(year, determineYear(years[1] || ''));
3142
3199
  year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
3143
3200
  endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
3144
- inst.yearshtml += '<select class="ui-datepicker-year" ' +
3145
- 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
3146
- '>';
3201
+ inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
3147
3202
  for (; year <= endYear; year++) {
3148
3203
  inst.yearshtml += '<option value="' + year + '"' +
3149
3204
  (year == drawYear ? ' selected="selected"' : '') +
@@ -3335,7 +3390,7 @@ $.fn.datepicker = function(options){
3335
3390
  $.datepicker = new Datepicker(); // singleton instance
3336
3391
  $.datepicker.initialized = false;
3337
3392
  $.datepicker.uuid = new Date().getTime();
3338
- $.datepicker.version = "1.8.20";
3393
+ $.datepicker.version = "1.8.23";
3339
3394
 
3340
3395
  // Workaround for #4055
3341
3396
  // Add another global to avoid noConflict issues with inline event handlers
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery UI CSS Framework 1.8.20
2
+ * jQuery UI CSS Framework 1.8.23
3
3
  *
4
4
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
5
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -39,7 +39,7 @@
39
39
 
40
40
 
41
41
  /*!
42
- * jQuery UI CSS Framework 1.8.20
42
+ * jQuery UI CSS Framework 1.8.23
43
43
  *
44
44
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
45
45
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -285,7 +285,7 @@
285
285
  /* Overlays */
286
286
  .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
287
287
  .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
288
- * jQuery UI Autocomplete 1.8.20
288
+ * jQuery UI Autocomplete 1.8.23
289
289
  *
290
290
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
291
291
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -299,7 +299,7 @@
299
299
  * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
300
300
 
301
301
  /*
302
- * jQuery UI Menu 1.8.20
302
+ * jQuery UI Menu 1.8.23
303
303
  *
304
304
  * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
305
305
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -338,7 +338,7 @@
338
338
  margin: -1px;
339
339
  }
340
340
  /*!
341
- * jQuery UI Datepicker 1.8.20
341
+ * jQuery UI Datepicker 1.8.23
342
342
  *
343
343
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
344
344
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -395,8 +395,6 @@
395
395
 
396
396
  /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
397
397
  .ui-datepicker-cover {
398
- display: none; /*sorry for IE5*/
399
- display/**/: block; /*sorry for IE5*/
400
398
  position: absolute; /*must have*/
401
399
  z-index: -1; /*must have*/
402
400
  filter: mask(); /*must have*/