webshims-rails 1.10.10 → 1.10.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +8 -8
  2. data/MIT_LICENSE.txt +3 -1
  3. data/lib/webshims-rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/webshims/polyfiller.js +8 -9
  5. data/vendor/assets/javascripts/webshims/shims/combos/1.js +91 -58
  6. data/vendor/assets/javascripts/webshims/shims/combos/10.js +247 -101
  7. data/vendor/assets/javascripts/webshims/shims/combos/11.js +241 -96
  8. data/vendor/assets/javascripts/webshims/shims/combos/12.js +79 -58
  9. data/vendor/assets/javascripts/webshims/shims/combos/13.js +79 -12
  10. data/vendor/assets/javascripts/webshims/shims/combos/14.js +6 -5
  11. data/vendor/assets/javascripts/webshims/shims/combos/15.js +68 -75
  12. data/vendor/assets/javascripts/webshims/shims/combos/16.js +147 -133
  13. data/vendor/assets/javascripts/webshims/shims/combos/17.js +288 -143
  14. data/vendor/assets/javascripts/webshims/shims/combos/18.js +288 -143
  15. data/vendor/assets/javascripts/webshims/shims/combos/19.js +85 -63
  16. data/vendor/assets/javascripts/webshims/shims/combos/2.js +97 -91
  17. data/vendor/assets/javascripts/webshims/shims/combos/20.js +85 -17
  18. data/vendor/assets/javascripts/webshims/shims/combos/21.js +17 -17
  19. data/vendor/assets/javascripts/webshims/shims/combos/23.js +79 -58
  20. data/vendor/assets/javascripts/webshims/shims/combos/24.js +17 -16
  21. data/vendor/assets/javascripts/webshims/shims/combos/25.js +85 -63
  22. data/vendor/assets/javascripts/webshims/shims/combos/26.js +6 -5
  23. data/vendor/assets/javascripts/webshims/shims/combos/27.js +0 -46
  24. data/vendor/assets/javascripts/webshims/shims/combos/28.js +6 -5
  25. data/vendor/assets/javascripts/webshims/shims/combos/29.js +13 -6
  26. data/vendor/assets/javascripts/webshims/shims/combos/3.js +47 -31
  27. data/vendor/assets/javascripts/webshims/shims/combos/30.js +47 -59
  28. data/vendor/assets/javascripts/webshims/shims/combos/31.js +18 -33
  29. data/vendor/assets/javascripts/webshims/shims/combos/4.js +35 -31
  30. data/vendor/assets/javascripts/webshims/shims/combos/5.js +304 -157
  31. data/vendor/assets/javascripts/webshims/shims/combos/6.js +304 -185
  32. data/vendor/assets/javascripts/webshims/shims/combos/7.js +126 -117
  33. data/vendor/assets/javascripts/webshims/shims/combos/8.js +126 -89
  34. data/vendor/assets/javascripts/webshims/shims/combos/9.js +247 -129
  35. data/vendor/assets/javascripts/webshims/shims/dom-extend.js +6 -5
  36. data/vendor/assets/javascripts/webshims/shims/form-core.js +12 -0
  37. data/vendor/assets/javascripts/webshims/shims/form-datalist-lazy.js +3 -0
  38. data/vendor/assets/javascripts/webshims/shims/form-datalist.js +0 -28
  39. data/vendor/assets/javascripts/webshims/shims/form-message.js +29 -26
  40. data/vendor/assets/javascripts/webshims/shims/form-native-extend.js +16 -14
  41. data/vendor/assets/javascripts/webshims/shims/form-number-date-api.js +47 -47
  42. data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +241 -96
  43. data/vendor/assets/javascripts/webshims/shims/form-shim-extend.js +21 -16
  44. data/vendor/assets/javascripts/webshims/shims/form-validation.js +17 -16
  45. data/vendor/assets/javascripts/webshims/shims/forms-picker.js +173 -41
  46. data/vendor/assets/javascripts/webshims/shims/geolocation.js +17 -17
  47. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ar.js +35 -33
  48. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ch-ZN.js +32 -30
  49. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-de.txt +17 -13
  50. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-el.js +32 -30
  51. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-en.txt +4 -1
  52. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-es.js +30 -28
  53. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-fr.js +35 -32
  54. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-he.js +32 -30
  55. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-hi.js +32 -30
  56. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-hu.js +32 -30
  57. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-it.js +32 -30
  58. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ja.js +32 -30
  59. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-lt.js +37 -36
  60. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-nl.js +32 -30
  61. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-pl.js +5 -2
  62. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-pt-PT.js +33 -30
  63. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ru.js +3 -1
  64. data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-sv.js +32 -30
  65. data/vendor/assets/javascripts/webshims/shims/mediaelement-core.js +79 -12
  66. data/vendor/assets/javascripts/webshims/shims/styles/forms.png +0 -0
  67. data/vendor/assets/javascripts/webshims/shims/styles/scss/shim.scss +126 -121
  68. data/vendor/assets/javascripts/webshims/shims/styles/shim.css +100 -111
  69. data/vendor/assets/javascripts/webshims/shims/swfmini.js +0 -46
  70. data/vendor/assets/javascripts/webshims/shims/track-ui.js +13 -6
  71. data/webshims-rails.gemspec +1 -0
  72. metadata +4 -3
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWYxOTgxNWIyNzYwNzllNGJiOGM1YzQ4ZGFmNjRlODNhMDQ3NGE3Yg==
4
+ MTdiZDJkNTE3NGI2M2E3YjdjOTMyYWYzODM5OWM4YWRmZjlmOGQ2Yg==
5
5
  data.tar.gz: !binary |-
6
- NTZkYmY1Yzk5YmJlODcyYjQ3NWE0ZTM2YjhiOTg3Y2MwYzM1MTE3Ng==
6
+ YmQ1MzQyNDk1MTZkYjIxMTI4MzAyOTY4ZGFlN2UwYjY0OGRmMmM3Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGY4MjZiY2VkY2UzNGY5Y2I1NGY3YjkyYTI2ZWRjMDE1YTAxZmExOTZlMmM1
10
- YmZmZWYyMWFhOWQ3YjVkZDc4NGM1MDZkNThkMTE0ZWE1ZGNkYjA4OTZjNzM4
11
- NDVkNzE0YTUyN2M4ZjNkMGFhOTg2OTk5MTgxNGVjODFmNGNhOGQ=
9
+ YmRjM2ZmN2Y3NjYwOWRkYzIxMzNjZjI3NTQyNDhhN2M1ZjNmZjM5ZTI4MTJk
10
+ NjdiZTlkZTViNzkwZTdjYWQyOTUyMmZmYWZkMTM0ZDU5NWVmYTk1MmE4YTU0
11
+ ZGJjOThjMjJkMWIyMmM5N2ZkNTgxMjQ2YmY2YWMzMzA3ZDhkMzQ=
12
12
  data.tar.gz: !binary |-
13
- MDQ2N2QyN2M4ODY4NWJhZGViNTZmYzBjZjQxZDVlMWY5NWJmMzkwOTkxZGY0
14
- ZDZiZGUyNThjZDFlNzEzNDE4MWNhMmQ5MTExNjg4OGY1Mzc1ZWIzYWRhZTg2
15
- MmI2YmQ2NjM0MGE5MjJjNWFmZDZmMjUwNTkzZTI2ZGYwYjAzODI=
13
+ YzdiNmU1NTRhNDFmNmZmNjY2NjBjNTY1NDk5YTUzYmE4ZTRlMGIxNGY4Y2I2
14
+ YWY3NGY4NzZkYmYxNzFkM2U4NmI3YzAyY2VjYzM0ZDJiYWZhNGQ2ODhjOGJj
15
+ MWU0NWY2ZWEzY2RiYjBiMjM3NTc5YTk5YmI0NGFiNjg3YmJmNzY=
data/MIT_LICENSE.txt CHANGED
@@ -1,5 +1,7 @@
1
1
  Webshims library, copyright (c) 2010 Alexander Farkas, http://protofunc.com/
2
-
2
+
3
+ Rails webshims gem, David Reese, http://whatcould.com/
4
+
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
5
7
  "Software"), to deal in the Software without restriction, including
@@ -1,6 +1,6 @@
1
1
  module Webshims
2
2
  module Rails
3
- VERSION = "1.10.10"
4
- WEBSHIMS_VERSION = "1.10.10"
3
+ VERSION = "1.10.11"
4
+ WEBSHIMS_VERSION = "1.10.11"
5
5
  end
6
6
  end
@@ -27,12 +27,12 @@
27
27
 
28
28
 
29
29
  var webshims = {
30
- version: '1.10.10',
30
+ version: '1.11.0RC1',
31
31
  cfg: {
32
- useImportantStyles: true,
32
+
33
33
  //addCacheBuster: false,
34
34
  waitReady: true,
35
- extendNative: 1,
35
+ // extendNative: false,
36
36
  loadStyles: true,
37
37
  disableShivMethods: true,
38
38
  wspopover: {appendTo: 'body', hideOnBlur: true},
@@ -40,7 +40,7 @@
40
40
  var script = jScripts.filter('[src*="polyfiller.js"]');
41
41
  var path;
42
42
  script = script[0] || script.end()[script.end().length - 1];
43
- path = ( ($.support.hrefNormalized) ? script.src : script.getAttribute("src", 4) ).split('?')[0];
43
+ path = ( ( !('hrefNormalized' in $.support) || $.support.hrefNormalized ) ? script.src : script.getAttribute("src", 4) ).split('?')[0];
44
44
  path = path.slice(0, path.lastIndexOf("/") + 1) + 'shims/';
45
45
  return path;
46
46
  })()
@@ -143,9 +143,6 @@
143
143
  webshims.warn('Call webshims.polyfill before DOM-Ready or set waitReady to false.');
144
144
  }
145
145
  onReady(features, removeLoader);
146
- if (webCFG.useImportantStyles) {
147
- addClass.push('polyfill-important');
148
- }
149
146
  if (addClass[0]) {
150
147
  $('html').addClass(addClass.join(' '));
151
148
  }
@@ -1053,7 +1050,7 @@
1053
1050
  addPolyfill(fNuAPI, {
1054
1051
  f: 'forms-ext',
1055
1052
  options: {
1056
- types: 'month date time range number'
1053
+ types: 'datetime-local month date time range number'
1057
1054
  },
1058
1055
  test: function(){
1059
1056
  var ret = true;
@@ -1116,7 +1113,7 @@
1116
1113
  f: 'forms',
1117
1114
  test: function(){
1118
1115
  initialFormTest();
1119
- return modernizrInputAttrs.list && !formOptions.customDatalist;
1116
+ return modernizrInputAttrs.list && !formOptions.fD;
1120
1117
  },
1121
1118
  d: ['form-core', DOMSUPPORT],
1122
1119
  c: [16, 7, 6, 2, 9, 15, 30, 31]
@@ -1203,10 +1200,12 @@
1203
1200
  nM: 'texttrackapi'
1204
1201
  });
1205
1202
 
1203
+
1206
1204
  addModule('track-ui', {
1207
1205
  d: ['track', DOMSUPPORT],
1208
1206
  c: [29]
1209
1207
  });
1208
+
1210
1209
  })();
1211
1210
  //>
1212
1211
 
@@ -165,52 +165,6 @@ var swfmini = function() {
165
165
  }
166
166
 
167
167
 
168
- /* Functions to abstract and display alternative content
169
- */
170
- function displayAltContent(obj) {
171
- if (ua.ie && ua.win && obj.readyState != 4) {
172
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
173
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
174
- var el = createElement("div");
175
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
176
- el.parentNode.replaceChild(abstractAltContent(obj), el);
177
- obj.style.display = "none";
178
- (function(){
179
- if (obj.readyState == 4) {
180
- obj.parentNode.removeChild(obj);
181
- }
182
- else {
183
- setTimeout(arguments.callee, 10);
184
- }
185
- })();
186
- }
187
- else {
188
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
189
- }
190
- }
191
-
192
- function abstractAltContent(obj) {
193
- var ac = createElement("div");
194
- if (ua.win && ua.ie) {
195
- ac.innerHTML = obj.innerHTML;
196
- }
197
- else {
198
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
199
- if (nestedObj) {
200
- var c = nestedObj.childNodes;
201
- if (c) {
202
- var cl = c.length;
203
- for (var i = 0; i < cl; i++) {
204
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
205
- ac.appendChild(c[i].cloneNode(true));
206
- }
207
- }
208
- }
209
- }
210
- }
211
- return ac;
212
- }
213
-
214
168
  /* Cross-browser dynamic SWF creation
215
169
  */
216
170
  function createSWF(attObj, parObj, id) {
@@ -531,6 +485,10 @@ webshims.register('form-core', function($, webshims, window, document, undefined
531
485
  options.customMessages = true;
532
486
  toLoad.push('form-message');
533
487
  }
488
+ if(options.customDatalist){
489
+ options.fD = true;
490
+ toLoad.push('form-datalist');
491
+ }
534
492
  if(options.addValidators){
535
493
  toLoad.push('form-validators');
536
494
  }
@@ -669,6 +627,14 @@ webshims.register('form-core', function($, webshims, window, document, undefined
669
627
  return false;
670
628
  }
671
629
  });
630
+ if(typeof message == 'object'){
631
+ if(validity.typeMismatch && message.badInput){
632
+ message = message.badInput;
633
+ }
634
+ if(validity.badInput && message.typeMismatch){
635
+ message = message.typeMismatch;
636
+ }
637
+ }
672
638
  }
673
639
  }
674
640
 
@@ -762,7 +728,8 @@ webshims.register('form-core', function($, webshims, window, document, undefined
762
728
  }
763
729
  });
764
730
  };
765
- var options = webshims.cfg.mediaelement;
731
+ var wsCfg = webshims.cfg;
732
+ var options = wsCfg.mediaelement;
766
733
  var hasFullTrackSupport;
767
734
  var hasSwf;
768
735
  if(!options){
@@ -849,7 +816,7 @@ webshims.register('form-core', function($, webshims, window, document, undefined
849
816
  }
850
817
  hasFullTrackSupport = Modernizr.track && !bugs.track;
851
818
 
852
- webshims.register('mediaelement-core', function($, webshims, window, document, undefined){
819
+ webshims.register('mediaelement-core', function($, webshims, window, document, undefined, options){
853
820
  hasSwf = swfmini.hasFlashPlayerVersion('9.0.115');
854
821
  $('html').addClass(hasSwf ? 'swf' : 'no-swf');
855
822
  var mediaelement = webshims.mediaelement;
@@ -933,11 +900,21 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
933
900
  var loadTrackUi = function(){
934
901
  if(loadTrackUi.loaded){return;}
935
902
  loadTrackUi.loaded = true;
936
- webshims.ready('WINDOWLOAD', function(){
937
- loadThird();
938
- webshims.loader.loadList(['track-ui']);
939
- });
903
+ if(!options.noAutoTrack){
904
+ webshims.ready('WINDOWLOAD', function(){
905
+ loadThird();
906
+ webshims.loader.loadList(['track-ui']);
907
+ });
908
+ }
940
909
  };
910
+ // var loadMediaGroup = function(){
911
+ // if(!loadMediaGroup.loaded){
912
+ // loadMediaGroup.loaded = true;
913
+ // webshims.ready(window.MediaController ? 'WINDOWLOAD' : 'DOM', function(){
914
+ // webshims.loader.loadList(['mediagroup']);
915
+ // });
916
+ // }
917
+ // };
941
918
  var loadYt = (function(){
942
919
  var loaded;
943
920
  return function(){
@@ -962,6 +939,11 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
962
939
  d: ['dom-support']
963
940
  });
964
941
 
942
+
943
+ // webshims.addModule('mediagroup', {
944
+ // d: ['mediaelement', 'dom-support']
945
+ // });
946
+
965
947
  mediaelement.mimeTypes = {
966
948
  audio: {
967
949
  //ogm shouldn´t be used!
@@ -1260,8 +1242,6 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
1260
1242
 
1261
1243
  };
1262
1244
 
1263
-
1264
-
1265
1245
  webshims.ready('dom-support', function(){
1266
1246
  handleMedia = true;
1267
1247
 
@@ -1270,7 +1250,8 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
1270
1250
  }
1271
1251
 
1272
1252
  ['audio', 'video'].forEach(function(nodeName){
1273
- var supLoad = webshims.defineNodeNameProperty(nodeName, 'load', {
1253
+ var supLoad, supController;
1254
+ supLoad = webshims.defineNodeNameProperty(nodeName, 'load', {
1274
1255
  prop: {
1275
1256
  value: function(){
1276
1257
  var data = webshims.data(this, 'mediaelement');
@@ -1301,7 +1282,59 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
1301
1282
  }
1302
1283
  }
1303
1284
  });
1285
+
1286
+ // supController = webshims.defineNodeNameProperty(nodeName, 'controller', {
1287
+ // prop: {
1288
+ // get: function(type){
1289
+ // if(!loadMediaGroup.loaded){
1290
+ // loadMediaGroup();
1291
+ // }
1292
+ // if(mediaelement.controller){
1293
+ // return mediaelement.controller[nodeName].get.apply(this, arguments);
1294
+ // }
1295
+ // return supController.prop._supget && supController.prop._supget.apply(this, arguments);
1296
+ // },
1297
+ // set: function(){
1298
+ // var that = this;
1299
+ // var args = arguments;
1300
+ // if(!loadMediaGroup.loaded){
1301
+ // loadMediaGroup();
1302
+ // }
1303
+ // if(mediaelement.controller){
1304
+ // return mediaelement.controller[nodeName].set.apply(that, args);
1305
+ // } else {
1306
+ // webshims.ready('mediagroup', function(){
1307
+ // mediaelement.controller[nodeName].set.apply(that, args);
1308
+ // });
1309
+ // }
1310
+ // return supController.prop._supset && supController.prop._supset.apply(this, arguments);
1311
+ // }
1312
+ // }
1313
+ // });
1314
+
1315
+ // webshims.ready('mediagroup', function(){
1316
+ // mediaelement.controller[nodeName].sup = supController;
1317
+ // });
1304
1318
  });
1319
+
1320
+ // webshims.onNodeNamesPropertyModify(['audio', 'video'], ['mediaGroup'], {
1321
+ // set: function(){
1322
+ // var that = this;
1323
+ // var args = arguments;
1324
+ // if(!loadMediaGroup.loaded){
1325
+ // loadMediaGroup();
1326
+ // }
1327
+ // if(mediaelement.mediagroup){
1328
+ // mediaelement.mediagroup.set.apply(that, args);
1329
+ // } else {
1330
+ // webshims.ready('mediagroup', function(){
1331
+ // mediaelement.mediagroup.set.apply(that, args);
1332
+ // });
1333
+ // }
1334
+ // },
1335
+ // initAttr: true
1336
+ // });
1337
+
1305
1338
  webshims.onNodeNamesPropertyModify(['audio', 'video'], ['src', 'poster'], {
1306
1339
  set: function(){
1307
1340
  var elem = this;
@@ -1323,6 +1356,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
1323
1356
  if(!loadTrackUi.loaded && $('track', media).length){
1324
1357
  loadTrackUi();
1325
1358
  }
1359
+ // if(!loadMediaGroup.loaded && this.getAttribute('mediagroup')){
1360
+ // loadMediaGroup();
1361
+ // }
1326
1362
  media = null;
1327
1363
  });
1328
1364
  });
@@ -1338,9 +1374,6 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
1338
1374
  handleMedia = true;
1339
1375
  return false;
1340
1376
  }
1341
- if((!hasFullTrackSupport || webshims.modules.track.options.override) && !loadTrackUi.loaded && $('track', this).length){
1342
- loadTrackUi();
1343
- }
1344
1377
  })
1345
1378
  ;
1346
1379
  }
@@ -1,8 +1,9 @@
1
1
  //DOM-Extension helper
2
2
  webshims.register('dom-extend', function($, webshims, window, document, undefined){
3
3
  "use strict";
4
-
5
- webshims.assumeARIA = $.support.getSetAttribute || Modernizr.canvas || Modernizr.video || Modernizr.boxsizing;
4
+ var supportHrefNormalized = !('hrefNormalized' in $.support) || $.support.hrefNormalized;
5
+ var supportGetSetAttribute = !('getSetAttribute' in $.support) || $.support.getSetAttribute;
6
+ webshims.assumeARIA = supportGetSetAttribute || Modernizr.canvas || Modernizr.video || Modernizr.boxsizing;
6
7
 
7
8
  if($('<input type="email" />').attr('type') == 'text' || $('<form />').attr('novalidate') === "" || ('required' in $('<input />')[0].attributes)){
8
9
  webshims.error("IE browser modes are busted in IE10. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools");
@@ -12,8 +13,8 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
12
13
  webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
13
14
  }
14
15
 
15
- if(webshims.cfg.extendNative === 1){
16
- webshims.warn("extendNative configuration will be set to false by default with next release. In case you rely on it set it to 'true' otherwise to 'false'. See http://bit.ly/16OOTQO");
16
+ if(webshims.cfg.extendNative === undefined){
17
+ webshims.warn("extendNative configuration was set to false by default with this release. In case you rely on it set it to 'true' otherwise to 'false'. See http://bit.ly/16OOTQO");
17
18
  }
18
19
 
19
20
  if (!webshims.cfg.no$Switch) {
@@ -685,7 +686,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
685
686
 
686
687
  anchor.setAttribute('href', href+'' );
687
688
 
688
- if(!$.support.hrefNormalized){
689
+ if(!supportHrefNormalized){
689
690
  try {
690
691
  $(anchor).insertAfter(this);
691
692
  ret = anchor.getAttribute('href', 4);
@@ -1591,10 +1592,21 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1591
1592
  "use strict";
1592
1593
  var curCfg;
1593
1594
  var formcfg = webshims.formcfg;
1594
-
1595
+ var monthDigits = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
1595
1596
  var stopPropagation = function(e){
1596
1597
  e.stopImmediatePropagation();
1597
1598
  };
1599
+ var getMonthOptions = (function(){
1600
+ var str;
1601
+ return function(){
1602
+ if(!str){
1603
+ str = ('<option></option>')+$.map(monthDigits, function(val){
1604
+ return '<option>'+val+'</option>';
1605
+ }).join('');
1606
+ }
1607
+ return str;
1608
+ };
1609
+ })();
1598
1610
  var createFormat = function(name){
1599
1611
  if(!curCfg.patterns[name+'Obj']){
1600
1612
  var obj = {};
@@ -1606,10 +1618,18 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1606
1618
  };
1607
1619
  var splitInputs = {
1608
1620
  date: {
1609
- _create: function(){
1621
+ _create: function(opts){
1610
1622
  var obj = {
1611
- splits: [$('<input type="text" class="yy" size="4" inputmode="numeric" />')[0], $('<input type="text" class="mm" inputmode="numeric" maxlength="2" size="2" />')[0], $('<input type="text" class="dd ws-spin" inputmode="numeric" maxlength="2" size="2" />')[0]]
1623
+ splits: [$('<input type="text" class="yy" size="4" inputmode="numeric" />')[0]]
1612
1624
  };
1625
+ if(opts.monthSelect){
1626
+ obj.splits.push($('<select class="mm">'+getMonthOptions()+'</select>')[0]);
1627
+ } else {
1628
+ obj.splits.push($('<input type="text" class="mm" inputmode="numeric" maxlength="2" size="2" />')[0]);
1629
+ }
1630
+ obj.splits.push($('<input type="text" class="dd ws-spin" inputmode="numeric" maxlength="2" size="2" />')[0]);
1631
+
1632
+
1613
1633
  obj.elements = [obj.splits[0], $('<span class="ws-input-seperator" />')[0], obj.splits[1], $('<span class="ws-input-seperator" />')[0], obj.splits[2]];
1614
1634
  return obj;
1615
1635
  },
@@ -1617,7 +1637,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1617
1637
  createFormat('d');
1618
1638
  var i = 0;
1619
1639
  var seperators = $('.ws-input-seperator', element).html(curCfg.dFormat);
1620
- var inputs = $('input', element);
1640
+ var inputs = $('input, select', element);
1621
1641
  $.each(curCfg.patterns.dObj, function(name, value){
1622
1642
  var input = inputs.filter('.'+ name);
1623
1643
  if(input[0]){
@@ -1635,17 +1655,23 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1635
1655
  _create: function(opts){
1636
1656
 
1637
1657
  var obj = {
1638
- splits: [$('<input type="text" class="yy" inputmode="numeric" size="4" />')[0], $('<input type="text" class="mm ws-spin" />')[0]]
1658
+ splits: [$('<input type="text" class="yy" inputmode="numeric" size="4" />')[0]]
1639
1659
  };
1640
- if(opts.onlyMonthDigits){
1641
- $(obj.splits[1]).attr({inputmode: 'numeric', size: 2, maxlength: 2});
1660
+ if(opts.monthSelect){
1661
+ obj.splits.push($('<select class="mm ws-spin">'+getMonthOptions()+'</select>')[0]);
1662
+ } else {
1663
+ obj.splits.push($('<input type="text" class="mm ws-spin" />')[0]);
1664
+ if(opts.onlyMonthDigits){
1665
+ $(obj.splits[1]).attr({inputmode: 'numeric', size: 2, maxlength: 2});
1666
+ }
1642
1667
  }
1668
+
1643
1669
  obj.elements = [obj.splits[0], $('<span class="ws-input-seperator" />')[0], obj.splits[1]];
1644
1670
  return obj;
1645
1671
  },
1646
1672
  sort: function(element){
1647
1673
  var seperator = $('.ws-input-seperator', element).html(curCfg.dFormat);
1648
- var mm = $('input.mm', element);
1674
+ var mm = $('input.mm, select.mm', element);
1649
1675
  var action;
1650
1676
  if(curCfg.date.showMonthAfterYear){
1651
1677
  mm.appendTo(element);
@@ -1659,7 +1685,8 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1659
1685
  }
1660
1686
  };
1661
1687
 
1662
- var nowDate = new Date().getTime() - (new Date().getTimezoneOffset() * 60 * 1000 );
1688
+ var nowDate = new Date(new Date().getTime() - (new Date().getTimezoneOffset() * 60 * 1000 ));
1689
+ nowDate = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), nowDate.getHours()).getTime()
1663
1690
  var steps = {
1664
1691
  number: {
1665
1692
  step: 1
@@ -1668,6 +1695,10 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1668
1695
  // step: 1,
1669
1696
  // start: new Date(nowDate)
1670
1697
  // },
1698
+ 'datetime-local': {
1699
+ step: 60,
1700
+ start: new Date(nowDate).getTime()
1701
+ },
1671
1702
  time: {
1672
1703
  step: 60
1673
1704
  },
@@ -1703,7 +1734,6 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1703
1734
 
1704
1735
 
1705
1736
  (function(){
1706
- var monthDigits = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
1707
1737
 
1708
1738
  formcfg.de = $.extend(true, {
1709
1739
  numberFormat: {
@@ -1753,6 +1783,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1753
1783
  patterns: {
1754
1784
  d: "mm/dd/yy"
1755
1785
  },
1786
+ meridian: ['AM', 'PM'],
1756
1787
  month: {
1757
1788
  currentText: 'This month'
1758
1789
  },
@@ -1806,12 +1837,18 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1806
1837
  langCfg.date.monthkeys = {};
1807
1838
  langCfg.date.monthDigits = monthDigits;
1808
1839
  langCfg.numberSigns += '-';
1840
+ if(langCfg.meridian){
1841
+ langCfg.timeSigns += langCfg.meridian[0] + langCfg.meridian[1];
1842
+ }
1809
1843
  $.each(langCfg.date.monthNames, create);
1810
1844
  $.each(langCfg.date.monthNamesShort, create);
1811
1845
  }
1812
1846
  if(!langCfg.colorSigns){
1813
1847
  langCfg.colorSigns = '#abcdefABCDEF';
1814
1848
  }
1849
+ if(!langCfg['datetime-localSigns']){
1850
+ langCfg['datetime-localSigns'] = langCfg.dateSigns+langCfg.timeSigns;
1851
+ }
1815
1852
  };
1816
1853
  var triggerLocaleChange = function(){
1817
1854
  processLangCFG(curCfg);
@@ -1868,11 +1905,31 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1868
1905
  return (val+'').replace(/\,/g, '').replace(/\./, curCfg.numberFormat['.']);
1869
1906
  },
1870
1907
  time: function(val){
1908
+ var fVal;
1909
+ if(val && curCfg.meridian){
1910
+ val = val.split(':');
1911
+ fVal = (val[0] * 1);
1912
+ if(fVal && fVal >= 12){
1913
+ val[0] = addZero(fVal - 12+'');
1914
+ fVal = 1;
1915
+
1916
+ } else {
1917
+ fVal = 0;
1918
+ }
1919
+ val = $.trim(val.join(':')) + ' '+ curCfg.meridian[fVal];
1920
+ }
1871
1921
  return val;
1872
1922
  },
1873
- week: function(val){
1923
+ 'datetime-local': function(val, o){
1924
+ var fVal = $.trim(val || '').split('T');
1925
+ if(fVal.length == 2){
1926
+ val = this.date(fVal[0], o) +' '+this.time(fVal[1], o);
1927
+ }
1874
1928
  return val;
1875
1929
  },
1930
+ // week: function(val){
1931
+ // return val;
1932
+ // },
1876
1933
  //todo empty val for month/split
1877
1934
  month: function(val, options){
1878
1935
  var names;
@@ -1925,7 +1982,32 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
1925
1982
  // week: function(val){
1926
1983
  // return val;
1927
1984
  // },
1985
+ 'datetime-local': function(val, o){
1986
+ var tmp;
1987
+ var fVal = $.trim(val || '').split(/\s+/);
1988
+ if(fVal.length == 2){
1989
+ if(fVal[0].indexOf(':') != -1 && fVal[1].indexOf(':') == -1){
1990
+ tmp = fVal[1];
1991
+ fVal[1] = fVal[0];
1992
+ fVal[0] = tmp;
1993
+ }
1994
+ val = this.date(fVal[0], o) +'T'+ this.time(fVal[1], o);
1995
+ }
1996
+ return val;
1997
+ },
1928
1998
  time: function(val){
1999
+ var fVal;
2000
+ if(val && curCfg.meridian){
2001
+ if(val.indexOf(curCfg.meridian[1]) != -1){
2002
+ val = val.split(':');
2003
+ fVal = (val[0] * 1);
2004
+ if(!isNaN(fVal)){
2005
+ val[0] = fVal + 12;
2006
+ }
2007
+ val = val.join(':');
2008
+ }
2009
+ val = $.trim(val.replace(curCfg.meridian[0], '').replace(curCfg.meridian[1], ''));
2010
+ }
1929
2011
  return val;
1930
2012
  },
1931
2013
  month: function(val, opts, noCorrect){
@@ -2026,8 +2108,16 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2026
2108
  var type = (typeof val == 'object') ? 'valueAsDate' : 'valueAsNumber';
2027
2109
  return input.prop(type, val).prop('value');
2028
2110
  },
2029
- isValid: function(val){
2030
- return input.prop('value', val).is(':valid') && input.prop('value') == val;
2111
+ isValid: function(val, attrs){
2112
+ if(attrs && (attrs.nodeName || attrs.jquery)){
2113
+ attrs = {
2114
+ min: $(attrs).prop('min') || '',
2115
+ max: $(attrs).prop('max') || '',
2116
+ step: $(attrs).prop('step') || 'any'
2117
+ };
2118
+ }
2119
+ attrs = $.extend({step: 'any', min: '', max: ''}, attrs || {});
2120
+ return input.attr(attrs).prop('value', val).is(':valid') && input.prop('value') == val;
2031
2121
  }
2032
2122
  };
2033
2123
  }
@@ -2052,6 +2142,9 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2052
2142
  o.mirrorValidity = o.mirrorValidity && this.orig && Modernizr.formvalidation && !webshims.bugs.bustedValidity;
2053
2143
 
2054
2144
  if(o.splitInput && this._addSplitInputs){
2145
+ if(o.monthSelect){
2146
+ this.element.addClass('ws-month-select');
2147
+ }
2055
2148
  this._addSplitInputs();
2056
2149
  } else {
2057
2150
  this.inputElements = this.element;
@@ -2303,7 +2396,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2303
2396
  try {
2304
2397
  $(this)
2305
2398
  .next()
2306
- .next('input')
2399
+ .next('input, select')
2307
2400
  .each(select)
2308
2401
  ;
2309
2402
  } catch(er){}
@@ -2381,7 +2474,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2381
2474
  }
2382
2475
  };
2383
2476
  spinEvents.keydown = function(e){
2384
- if(o.list || e.isDefaultPrevented() || $.attr(this, 'list')){return;}
2477
+ if(o.list || e.isDefaultPrevented() || (e.altKey && e.keyCode == 40) || $.attr(this, 'list')){return;}
2385
2478
  var stepped = true;
2386
2479
  var code = e.keyCode;
2387
2480
  if (code == 38) {
@@ -2504,7 +2597,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2504
2597
  return [options, datalist.data('label')];
2505
2598
  },
2506
2599
  list: function(val){
2507
- if(this.type == 'number' || this.type == 'time'){
2600
+ if(this.type == 'number'){
2508
2601
  this.element.attr('list', $.attr(this.orig, 'list'));
2509
2602
  }
2510
2603
  this.options.list = val;
@@ -2587,7 +2680,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2587
2680
  if(!this.inputElements){
2588
2681
  var create = splitInputs[this.type]._create(this.options);
2589
2682
  this.splits = create.splits;
2590
- this.inputElements = $(create.elements).prependTo(this.element).filter('input');
2683
+ this.inputElements = $(create.elements).prependTo(this.element).filter('input, select');
2591
2684
  }
2592
2685
  },
2593
2686
 
@@ -2613,11 +2706,11 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2613
2706
  reorderInputs: function(){
2614
2707
  if(splitInputs[this.type]){
2615
2708
  var element = this.element;
2616
- splitInputs[this.type].sort(element);
2709
+ splitInputs[this.type].sort(element, this.options);
2617
2710
  setTimeout(function(){
2618
2711
  var data = webshims.data(element);
2619
2712
  if(data && data.shadowData){
2620
- data.shadowData.shadowFocusElement = element.find('input')[0] || element[0];
2713
+ data.shadowData.shadowFocusElement = element.find('input, select')[0] || element[0];
2621
2714
  }
2622
2715
  }, 9);
2623
2716
  }
@@ -2720,8 +2813,21 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2720
2813
  options: options
2721
2814
  });
2722
2815
 
2816
+ webshims.inlinePopover = {
2817
+ _create: function(){
2818
+ this.element = $('<div class="ws-inline-picker"><div class="ws-po-box" /></div>').data('wspopover', this);
2819
+ this.contentElement = $('.ws-po-box', this.element);
2820
+ this.element.insertAfter(this.options.prepareFor);
2821
+ },
2822
+ show: $.noop,
2823
+ hide: $.noop,
2824
+ preventBlur: $.noop,
2825
+ isVisible: true
2826
+ };
2827
+
2723
2828
  picker._genericSetFocus = function(element, _noFocus){
2724
2829
  element = $(element || this.activeButton);
2830
+
2725
2831
  if(!this.popover.openedByFocus && !_noFocus){
2726
2832
  var that = this;
2727
2833
  var setFocus = function(noTrigger){
@@ -2746,12 +2852,14 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2746
2852
  data.setChange(val);
2747
2853
  },
2748
2854
  cancel: function(val, popover, data){
2749
- popover.stopOpen = true;
2750
- data.element.getShadowFocusElement().focus();
2751
- setTimeout(function(){
2752
- popover.stopOpen = false;
2753
- }, 9);
2754
- popover.hide();
2855
+ if(!data.options.inlinePicker){
2856
+ popover.stopOpen = true;
2857
+ data.element.getShadowFocusElement().focus();
2858
+ setTimeout(function(){
2859
+ popover.stopOpen = false;
2860
+ }, 9);
2861
+ popover.hide();
2862
+ }
2755
2863
  }
2756
2864
  };
2757
2865
 
@@ -2764,28 +2872,31 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2764
2872
  popover.element.on('updatepickercontent pickerchange', function(){
2765
2873
  tabbable = false;
2766
2874
  });
2767
- popover.contentElement.on({
2768
- keydown: function(e){
2769
- if(e.keyCode == 9){
2770
- if(!tabbable){
2771
- tabbable = $('input:not(:disabled), [tabindex="0"]:not(:disabled)', this).filter(':visible');
2772
- }
2773
- var index = tabbable.index(e.target);
2774
- if(e.shiftKey && index <= 0){
2775
- tabbable.last().focus();
2776
- return false;
2777
- }
2778
- if(!e.shiftKey && index >= tabbable.length - 1){
2779
- tabbable.first().focus();
2875
+
2876
+ if(!data.options.inlinePicker){
2877
+ popover.contentElement.on({
2878
+ keydown: function(e){
2879
+ if(e.keyCode == 9){
2880
+ if(!tabbable){
2881
+ tabbable = $('input:not(:disabled), [tabindex="0"]:not(:disabled)', this).filter(':visible');
2882
+ }
2883
+ var index = tabbable.index(e.target);
2884
+ if(e.shiftKey && index <= 0){
2885
+ tabbable.last().focus();
2886
+ return false;
2887
+ }
2888
+ if(!e.shiftKey && index >= tabbable.length - 1){
2889
+ tabbable.first().focus();
2890
+ return false;
2891
+ }
2892
+ } else if(e.keyCode == 27){
2893
+ data.element.getShadowFocusElement().focus();
2894
+ popover.hide();
2780
2895
  return false;
2781
2896
  }
2782
- } else if(e.keyCode == 27){
2783
- data.element.getShadowFocusElement().focus();
2784
- popover.hide();
2785
- return false;
2786
2897
  }
2787
- }
2788
- });
2898
+ });
2899
+ }
2789
2900
 
2790
2901
  data._propertyChange = (function(){
2791
2902
  var timer;
@@ -2795,7 +2906,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2795
2906
  }
2796
2907
  };
2797
2908
  return function(prop){
2798
- if(prop == 'value'){return;}
2909
+ if(prop == 'value' && !data.options.inlinePicker){return;}
2799
2910
  popover.isDirty = true;
2800
2911
  if(popover.isVisible){
2801
2912
  clearTimeout(timer);
@@ -2832,7 +2943,7 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2832
2943
 
2833
2944
  picker._common = function(data){
2834
2945
  var options = data.options;
2835
- var popover = webshims.objectCreate(webshims.wsPopover, {}, {prepareFor: data.element, position: options.widgetPosition});
2946
+ var popover = webshims.objectCreate(options.inlinePicker ? webshims.inlinePopover : webshims.wsPopover, {}, {prepareFor: options.inlinePicker ? data.buttonWrapper : data.element, position: options.widgetPosition});
2836
2947
  var opener = $('<button type="button" class="ws-popover-opener"><span /></button>').appendTo(data.buttonWrapper);
2837
2948
 
2838
2949
 
@@ -2841,18 +2952,34 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2841
2952
  };
2842
2953
  var show = function(){
2843
2954
  var type = loadPicker(data.type, 'DOM');
2844
- if(!options.disabled && !options.readonly && !popover.isVisible){
2955
+ if(!options.disabled && !options.readonly && (options.inlinePicker || !popover.isVisible)){
2845
2956
  webshims.ready(type, showPickerContent);
2846
2957
  popover.show(data.element);
2847
2958
  }
2848
2959
  };
2960
+ var open = function(){
2961
+ if((options.inlinePicker || popover.isVisible) && popover.activeElement){
2962
+ popover.openedByFocus = false;
2963
+ popover.activeElement.focus();
2964
+ }
2965
+ show();
2966
+ };
2967
+
2849
2968
 
2850
2969
  options.containerElements.push(popover.element[0]);
2851
2970
 
2852
2971
  if(data.type != 'color'){
2972
+ if(options.yearButtons){
2973
+ options.startView = 2;
2974
+ }
2853
2975
  if(!options.startView){
2854
2976
  options.startView = 0;
2855
2977
  }
2978
+
2979
+ if(data.type == 'time'){
2980
+ options.minView = 3;
2981
+ options.startView = 3;
2982
+ }
2856
2983
  if(!options.minView){
2857
2984
  options.minView = 0;
2858
2985
  }
@@ -2882,6 +3009,9 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2882
3009
  if(popover.activeElement){
2883
3010
  popover.activeElement.removeClass('ws-focus');
2884
3011
  }
3012
+ if(options.inlinePicker){
3013
+ popover.openedByFocus = true;
3014
+ }
2885
3015
  }
2886
3016
  })
2887
3017
  ;
@@ -2897,57 +3027,63 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2897
3027
  opener.prop({disabled: true});
2898
3028
  }
2899
3029
 
2900
- opener
2901
- .on({
2902
- mousedown: function(){
2903
- stopPropagation.apply(this, arguments);
2904
- popover.preventBlur();
2905
- },
2906
- click: function(){
2907
- if(popover.isVisible && popover.activeElement){
2908
- popover.openedByFocus = false;
2909
- popover.activeElement.focus();
2910
- }
2911
- show();
2912
- },
2913
- focus: function(){
2914
- popover.preventBlur();
2915
- }
2916
- })
2917
- ;
2918
3030
 
2919
- (function(){
2920
- var mouseFocus = false;
2921
- var resetMouseFocus = function(){
2922
- mouseFocus = false;
2923
- };
2924
- data.inputElements.on({
2925
- focus: function(){
2926
- if(!popover.stopOpen && (options.buttonOnly || options.openOnFocus || (mouseFocus && options.openOnMouseFocus))){
2927
- popover.openedByFocus = options.buttonOnly ? false : !options.noInput;
2928
- show();
2929
- } else {
3031
+ opener.on({click: open});
3032
+
3033
+ if(options.inlinePicker){
3034
+ popover.openedByFocus = true;
3035
+ } else {
3036
+ opener
3037
+ .on({
3038
+ mousedown: function(){
3039
+ stopPropagation.apply(this, arguments);
3040
+ popover.preventBlur();
3041
+ },
3042
+ focus: function(){
2930
3043
  popover.preventBlur();
2931
3044
  }
2932
- },
2933
- mousedown: function(){
2934
- mouseFocus = true;
2935
- setTimeout(resetMouseFocus, 9);
2936
- if(options.buttonOnly && popover.isVisible && popover.activeElement){
2937
- popover.openedByFocus = false;
2938
- setTimeout(function(){
3045
+ })
3046
+ ;
3047
+
3048
+ (function(){
3049
+ var mouseFocus = false;
3050
+ var resetMouseFocus = function(){
3051
+ mouseFocus = false;
3052
+ };
3053
+ data.inputElements.on({
3054
+ keydown: function(e){
3055
+ if(e.keyCode == 40 && e.altKey){
3056
+ open();
3057
+ }
3058
+ },
3059
+ focus: function(){
3060
+ if(!popover.stopOpen && (options.buttonOnly || options.openOnFocus || (mouseFocus && options.openOnMouseFocus))){
3061
+ popover.openedByFocus = options.buttonOnly ? false : !options.noInput;
3062
+ show();
3063
+ } else {
3064
+ popover.preventBlur();
3065
+ }
3066
+ },
3067
+ mousedown: function(){
3068
+ mouseFocus = true;
3069
+ setTimeout(resetMouseFocus, 9);
3070
+ if(options.buttonOnly && popover.isVisible && popover.activeElement){
2939
3071
  popover.openedByFocus = false;
2940
- popover.activeElement.focus();
2941
- }, 4);
2942
- }
2943
- if(data.element.is(':focus')){
2944
- popover.openedByFocus = options.buttonOnly ? false : !options.noInput;
2945
- show();
3072
+ setTimeout(function(){
3073
+ popover.openedByFocus = false;
3074
+ popover.activeElement.focus();
3075
+ }, 4);
3076
+ }
3077
+ if(data.element.is(':focus')){
3078
+ popover.openedByFocus = options.buttonOnly ? false : !options.noInput;
3079
+ show();
3080
+ }
3081
+ popover.preventBlur();
2946
3082
  }
2947
- popover.preventBlur();
2948
- }
2949
- });
2950
- })();
3083
+ });
3084
+ })();
3085
+ }
3086
+
2951
3087
  data.popover = popover;
2952
3088
  data.opener = opener;
2953
3089
  $(data.orig).on('remove', function(e){
@@ -2958,12 +3094,16 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
2958
3094
  }, 4);
2959
3095
  }
2960
3096
  });
2961
-
3097
+ if(options.inlinePicker){
3098
+ show();
3099
+ }
2962
3100
  loadPicker(data.type, 'WINDOWLOAD');
2963
3101
  };
2964
3102
 
2965
3103
  picker.month = picker._common;
2966
3104
  picker.date = picker._common;
3105
+ picker.time = picker._common;
3106
+ picker['datetime-local'] = picker._common;
2967
3107
  // picker.week = picker._common;
2968
3108
  picker.color = function(data){
2969
3109
  var ret = picker._common.apply(this, arguments);
@@ -3147,6 +3287,9 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
3147
3287
  opts[optsName] = $.attr(this, copyAttrs[i]) || opts[optsName];
3148
3288
  }
3149
3289
  }
3290
+ if(opts.monthSelect){
3291
+ opts.onlyMonthDigits = true;
3292
+ }
3150
3293
  if(opts.onlyMonthDigits){
3151
3294
  opts.formatMonthNames = 'monthDigits';
3152
3295
  }
@@ -3252,11 +3395,14 @@ webshims.register('form-number-date-ui', function($, webshims, window, document,
3252
3395
  });
3253
3396
  }
3254
3397
 
3255
- var isStupid = navigator.userAgent.indexOf('MSIE 10.0') != -1 && navigator.userAgent.indexOf('Touch') == -1;
3256
- ['number', 'time', 'month', 'date', 'color'].forEach(function(name){
3398
+ var isStupid = modernizrInputTypes.number && navigator.userAgent.indexOf('Touch') == -1 && (/MSIE 1[0|1]\.\d/.test(navigator.userAgent) || /Trident\/7\.0/.test(navigator.userAgent));
3399
+ ['number', 'time', 'month', 'date', 'color', 'datetime-local'].forEach(function(name){
3257
3400
  if(!modernizrInputTypes[name] || options.replaceUI || (name == 'number' && isStupid)){
3258
3401
  extendType(name, {
3259
3402
  _create: function(opts, set){
3403
+ if(opts.monthSelect){
3404
+ opts.splitInput = true;
3405
+ }
3260
3406
  if(opts.splitInput && !splitInputs[name]){
3261
3407
  webshims.warn('splitInput not supported for '+ name);
3262
3408
  opts.splitInput = false;