webshims-rails 1.10.9 → 1.10.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/webshims-rails/version.rb +2 -2
- data/vendor/assets/javascripts/webshims/polyfiller.js +8 -9
- data/vendor/assets/javascripts/webshims/shims/combos/1.js +24 -14
- data/vendor/assets/javascripts/webshims/shims/combos/10.js +61 -20
- data/vendor/assets/javascripts/webshims/shims/combos/11.js +54 -16
- data/vendor/assets/javascripts/webshims/shims/combos/12.js +9 -13
- data/vendor/assets/javascripts/webshims/shims/combos/13.js +8 -12
- data/vendor/assets/javascripts/webshims/shims/combos/14.js +10 -7
- data/vendor/assets/javascripts/webshims/shims/combos/15.js +40 -11
- data/vendor/assets/javascripts/webshims/shims/combos/16.js +49 -24
- data/vendor/assets/javascripts/webshims/shims/combos/17.js +128 -19
- data/vendor/assets/javascripts/webshims/shims/combos/18.js +131 -22
- data/vendor/assets/javascripts/webshims/shims/combos/19.js +133 -40
- data/vendor/assets/javascripts/webshims/shims/combos/2.js +31 -18
- data/vendor/assets/javascripts/webshims/shims/combos/20.js +132 -39
- data/vendor/assets/javascripts/webshims/shims/combos/21.js +116 -22
- data/vendor/assets/javascripts/webshims/shims/combos/23.js +9 -13
- data/vendor/assets/javascripts/webshims/shims/combos/24.js +48 -13
- data/vendor/assets/javascripts/webshims/shims/combos/25.js +133 -40
- data/vendor/assets/javascripts/webshims/shims/combos/26.js +7 -4
- data/vendor/assets/javascripts/webshims/shims/combos/27.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/combos/28.js +121 -24
- data/vendor/assets/javascripts/webshims/shims/combos/29.js +4 -6
- data/vendor/assets/javascripts/webshims/shims/combos/3.js +30 -6
- data/vendor/assets/javascripts/webshims/shims/combos/30.js +30 -6
- data/vendor/assets/javascripts/webshims/shims/combos/31.js +22 -5
- data/vendor/assets/javascripts/webshims/shims/combos/4.js +15 -5
- data/vendor/assets/javascripts/webshims/shims/combos/5.js +128 -19
- data/vendor/assets/javascripts/webshims/shims/combos/6.js +128 -19
- data/vendor/assets/javascripts/webshims/shims/combos/7.js +39 -19
- data/vendor/assets/javascripts/webshims/shims/combos/8.js +39 -19
- data/vendor/assets/javascripts/webshims/shims/combos/9.js +61 -20
- data/vendor/assets/javascripts/webshims/shims/dom-extend.js +7 -4
- data/vendor/assets/javascripts/webshims/shims/es5.js +3 -3
- data/vendor/assets/javascripts/webshims/shims/form-core.js +15 -1
- data/vendor/assets/javascripts/webshims/shims/form-message.js +8 -1
- data/vendor/assets/javascripts/webshims/shims/form-number-date-api.js +74 -3
- data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +53 -15
- data/vendor/assets/javascripts/webshims/shims/form-shim-extend.js +10 -5
- data/vendor/assets/javascripts/webshims/shims/form-validation.js +48 -13
- data/vendor/assets/javascripts/webshims/shims/forms-picker.js +14 -2
- data/vendor/assets/javascripts/webshims/shims/geolocation.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ar.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ch-ZN.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-de.txt +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-el.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-en.txt +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-es.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-fr.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-he.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-hi.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-hu.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-it.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ja.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-lt.js +7 -4
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-nl.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-pl.js +106 -0
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-pt-PT.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-ru.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-sv.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/mediaelement-core.js +8 -12
- data/vendor/assets/javascripts/webshims/shims/mediaelement-jaris.js +114 -20
- data/vendor/assets/javascripts/webshims/shims/mediaelement-yt.js +132 -17
- data/vendor/assets/javascripts/webshims/shims/range-ui.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/styles/scss/shim.scss +38 -3
- data/vendor/assets/javascripts/webshims/shims/styles/shim.css +42 -13
- data/vendor/assets/javascripts/webshims/shims/swf/JarisFLVPlayer.swf +0 -0
- data/vendor/assets/javascripts/webshims/shims/swfmini.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/track-ui.js +4 -6
- metadata +3 -2
@@ -8,7 +8,7 @@ var swfmini = function() {
|
|
8
8
|
|
9
9
|
var UNDEF = "undefined",
|
10
10
|
OBJECT = "object",
|
11
|
-
webshims =
|
11
|
+
webshims = window.webshims,
|
12
12
|
SHOCKWAVE_FLASH = "Shockwave Flash",
|
13
13
|
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
|
14
14
|
FLASH_MIME_TYPE = "application/x-shockwave-flash",
|
@@ -496,8 +496,9 @@ var swfmini = function() {
|
|
496
496
|
};
|
497
497
|
}();
|
498
498
|
|
499
|
-
(function(
|
499
|
+
(function(Modernizr, webshims){
|
500
500
|
"use strict";
|
501
|
+
var $ = webshims.$;
|
501
502
|
var hasNative = Modernizr.audio && Modernizr.video;
|
502
503
|
var supportsLoop = false;
|
503
504
|
var bugs = webshims.bugs;
|
@@ -601,6 +602,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
601
602
|
hasSwf = swfmini.hasFlashPlayerVersion('9.0.115');
|
602
603
|
$('html').addClass(hasSwf ? 'swf' : 'no-swf');
|
603
604
|
var mediaelement = webshims.mediaelement;
|
605
|
+
|
604
606
|
mediaelement.parseRtmp = function(data){
|
605
607
|
var src = data.src.split('://');
|
606
608
|
var paths = src[1].split('/');
|
@@ -770,7 +772,6 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
770
772
|
var src = getSrcObj(mediaElem, nodeName);
|
771
773
|
|
772
774
|
if(!src.src){
|
773
|
-
|
774
775
|
$('source', mediaElem).each(function(){
|
775
776
|
src = getSrcObj(this, nodeName);
|
776
777
|
if(src.src){srces.push(src);}
|
@@ -785,18 +786,10 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
785
786
|
srces = [srces];
|
786
787
|
}
|
787
788
|
srces.forEach(function(src){
|
788
|
-
var source = document.createElement('source');
|
789
789
|
if(typeof src == 'string'){
|
790
790
|
src = {src: src};
|
791
791
|
}
|
792
|
-
|
793
|
-
if(src.type){
|
794
|
-
source.setAttribute('type', src.type);
|
795
|
-
}
|
796
|
-
if(src.media){
|
797
|
-
source.setAttribute('media', src.media);
|
798
|
-
}
|
799
|
-
mediaElem.append(source);
|
792
|
+
mediaElem.append($(document.createElement('source')).attr(src));
|
800
793
|
});
|
801
794
|
|
802
795
|
}
|
@@ -944,6 +937,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
944
937
|
|
945
938
|
if(!_srces.length || !parent || parent.nodeType != 1 || stopParent.test(parent.nodeName || '')){return;}
|
946
939
|
data = data || webshims.data(elem, 'mediaelement');
|
940
|
+
if(mediaelement.sortMedia){
|
941
|
+
_srces.sort(mediaelement.sortMedia);
|
942
|
+
}
|
947
943
|
stepSources(elem, data, options.preferFlash || undefined, _srces);
|
948
944
|
};
|
949
945
|
mediaelement.selectSource = selectSource;
|
@@ -1118,7 +1114,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
1118
1114
|
}
|
1119
1115
|
webshims.ready('track', loadTrackUi);
|
1120
1116
|
});
|
1121
|
-
})(
|
1117
|
+
})(Modernizr, webshims);
|
1122
1118
|
webshims.register('track', function($, webshims, window, document, undefined){
|
1123
1119
|
"use strict";
|
1124
1120
|
var mediaelement = webshims.mediaelement;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
(function(
|
1
|
+
(function(Modernizr, webshims){
|
2
2
|
"use strict";
|
3
|
+
var $ = webshims.$;
|
3
4
|
var hasNative = Modernizr.audio && Modernizr.video;
|
4
5
|
var supportsLoop = false;
|
5
6
|
var bugs = webshims.bugs;
|
@@ -103,6 +104,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
103
104
|
hasSwf = swfmini.hasFlashPlayerVersion('9.0.115');
|
104
105
|
$('html').addClass(hasSwf ? 'swf' : 'no-swf');
|
105
106
|
var mediaelement = webshims.mediaelement;
|
107
|
+
|
106
108
|
mediaelement.parseRtmp = function(data){
|
107
109
|
var src = data.src.split('://');
|
108
110
|
var paths = src[1].split('/');
|
@@ -272,7 +274,6 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
272
274
|
var src = getSrcObj(mediaElem, nodeName);
|
273
275
|
|
274
276
|
if(!src.src){
|
275
|
-
|
276
277
|
$('source', mediaElem).each(function(){
|
277
278
|
src = getSrcObj(this, nodeName);
|
278
279
|
if(src.src){srces.push(src);}
|
@@ -287,18 +288,10 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
287
288
|
srces = [srces];
|
288
289
|
}
|
289
290
|
srces.forEach(function(src){
|
290
|
-
var source = document.createElement('source');
|
291
291
|
if(typeof src == 'string'){
|
292
292
|
src = {src: src};
|
293
293
|
}
|
294
|
-
|
295
|
-
if(src.type){
|
296
|
-
source.setAttribute('type', src.type);
|
297
|
-
}
|
298
|
-
if(src.media){
|
299
|
-
source.setAttribute('media', src.media);
|
300
|
-
}
|
301
|
-
mediaElem.append(source);
|
294
|
+
mediaElem.append($(document.createElement('source')).attr(src));
|
302
295
|
});
|
303
296
|
|
304
297
|
}
|
@@ -446,6 +439,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
446
439
|
|
447
440
|
if(!_srces.length || !parent || parent.nodeType != 1 || stopParent.test(parent.nodeName || '')){return;}
|
448
441
|
data = data || webshims.data(elem, 'mediaelement');
|
442
|
+
if(mediaelement.sortMedia){
|
443
|
+
_srces.sort(mediaelement.sortMedia);
|
444
|
+
}
|
449
445
|
stepSources(elem, data, options.preferFlash || undefined, _srces);
|
450
446
|
};
|
451
447
|
mediaelement.selectSource = selectSource;
|
@@ -620,7 +616,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
620
616
|
}
|
621
617
|
webshims.ready('track', loadTrackUi);
|
622
618
|
});
|
623
|
-
})(
|
619
|
+
})(Modernizr, webshims);
|
624
620
|
webshims.register('track', function($, webshims, window, document, undefined){
|
625
621
|
"use strict";
|
626
622
|
var mediaelement = webshims.mediaelement;
|
@@ -707,11 +707,11 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
|
|
707
707
|
}
|
708
708
|
|
709
709
|
if(opts){
|
710
|
-
o.options =
|
710
|
+
o.options = $.extend(true, {}, o.options || {}, opts);
|
711
711
|
opts = o.options;
|
712
712
|
}
|
713
713
|
|
714
|
-
if(o._create &&
|
714
|
+
if(o._create && $.isFunction(o._create)){
|
715
715
|
o._create(opts);
|
716
716
|
}
|
717
717
|
return o;
|
@@ -797,7 +797,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
|
|
797
797
|
};
|
798
798
|
|
799
799
|
}
|
800
|
-
})(
|
800
|
+
})(webshims.$, webshims);
|
801
801
|
|
802
802
|
|
803
803
|
|
@@ -815,14 +815,14 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
815
815
|
webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
|
816
816
|
}
|
817
817
|
|
818
|
-
if(webshims.cfg.extendNative
|
818
|
+
if(webshims.cfg.extendNative === 1){
|
819
819
|
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");
|
820
820
|
}
|
821
821
|
|
822
822
|
if (!webshims.cfg.no$Switch) {
|
823
823
|
var switch$ = function(){
|
824
824
|
if (window.jQuery && (!window.$ || window.jQuery == window.$) && !window.jQuery.webshims) {
|
825
|
-
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly
|
825
|
+
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly. Or set webshims.cfg.no$Switch to 'true'.");
|
826
826
|
if (window.$) {
|
827
827
|
window.$ = webshims.$;
|
828
828
|
}
|
@@ -1364,6 +1364,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1364
1364
|
setInterval(this.test, 600);
|
1365
1365
|
$(this.test);
|
1366
1366
|
webshims.ready('WINDOWLOAD', this.test);
|
1367
|
+
$(document).on('updatelayout', this.handler);
|
1367
1368
|
$(window).bind('resize', this.handler);
|
1368
1369
|
(function(){
|
1369
1370
|
var oldAnimate = $.fn.animate;
|
@@ -1411,7 +1412,9 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1411
1412
|
|
1412
1413
|
$(nativeElem).on('remove', function(e){
|
1413
1414
|
if (!e.originalEvent) {
|
1414
|
-
|
1415
|
+
setTimeout(function(){
|
1416
|
+
$(shadowElem).remove();
|
1417
|
+
}, 4);
|
1415
1418
|
}
|
1416
1419
|
});
|
1417
1420
|
|
@@ -1889,7 +1892,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1889
1892
|
}
|
1890
1893
|
});
|
1891
1894
|
|
1892
|
-
})(
|
1895
|
+
})(webshims.$, document);
|
1893
1896
|
|
1894
1897
|
|
1895
1898
|
//JSON
|
@@ -12,14 +12,14 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
12
12
|
webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
|
13
13
|
}
|
14
14
|
|
15
|
-
if(webshims.cfg.extendNative
|
15
|
+
if(webshims.cfg.extendNative === 1){
|
16
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");
|
17
17
|
}
|
18
18
|
|
19
19
|
if (!webshims.cfg.no$Switch) {
|
20
20
|
var switch$ = function(){
|
21
21
|
if (window.jQuery && (!window.$ || window.jQuery == window.$) && !window.jQuery.webshims) {
|
22
|
-
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly
|
22
|
+
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly. Or set webshims.cfg.no$Switch to 'true'.");
|
23
23
|
if (window.$) {
|
24
24
|
window.$ = webshims.$;
|
25
25
|
}
|
@@ -561,6 +561,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
561
561
|
setInterval(this.test, 600);
|
562
562
|
$(this.test);
|
563
563
|
webshims.ready('WINDOWLOAD', this.test);
|
564
|
+
$(document).on('updatelayout', this.handler);
|
564
565
|
$(window).bind('resize', this.handler);
|
565
566
|
(function(){
|
566
567
|
var oldAnimate = $.fn.animate;
|
@@ -608,7 +609,9 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
608
609
|
|
609
610
|
$(nativeElem).on('remove', function(e){
|
610
611
|
if (!e.originalEvent) {
|
611
|
-
|
612
|
+
setTimeout(function(){
|
613
|
+
$(shadowElem).remove();
|
614
|
+
}, 4);
|
612
615
|
}
|
613
616
|
});
|
614
617
|
|
@@ -1086,7 +1089,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1086
1089
|
}
|
1087
1090
|
});
|
1088
1091
|
|
1089
|
-
})(
|
1092
|
+
})(webshims.$, document);
|
1090
1093
|
|
1091
1094
|
webshims.register('form-core', function($, webshims, window, document, undefined, options){
|
1092
1095
|
"use strict";
|
@@ -1165,6 +1168,7 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1165
1168
|
$.expr[":"][name] = $.expr.filters[name+"-element"];
|
1166
1169
|
});
|
1167
1170
|
|
1171
|
+
//bug was partially fixed in 1.10.0 for IE9, but not IE8 (move to es5 as soon as 1.10.2 is used)
|
1168
1172
|
var pseudoFocus = $.expr[":"].focus;
|
1169
1173
|
$.expr[":"].focus = function(){
|
1170
1174
|
try {
|
@@ -1187,10 +1191,18 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1187
1191
|
};
|
1188
1192
|
|
1189
1193
|
var transClass = ('transitionDelay' in document.documentElement.style) ? '' : ' no-transition';
|
1194
|
+
var poCFG = webshims.cfg.wspopover;
|
1195
|
+
if(!poCFG.position && poCFG.position !== false){
|
1196
|
+
poCFG.position = {
|
1197
|
+
at: 'left bottom',
|
1198
|
+
my: 'left top',
|
1199
|
+
collision: 'fit flip'
|
1200
|
+
};
|
1201
|
+
}
|
1190
1202
|
webshims.wsPopover = {
|
1191
1203
|
id: 0,
|
1192
1204
|
_create: function(){
|
1193
|
-
this.options = $.extend({},
|
1205
|
+
this.options = $.extend(true, {}, poCFG, this.options);
|
1194
1206
|
this.id = webshims.wsPopover.id++;
|
1195
1207
|
this.eventns = '.wsoverlay' + this.id;
|
1196
1208
|
this.timers = {};
|
@@ -1237,6 +1249,11 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1237
1249
|
var message = $(elem).data('errormessage') || elem.getAttribute('x-moz-errormessage') || '';
|
1238
1250
|
if(key && message[key]){
|
1239
1251
|
message = message[key];
|
1252
|
+
} else if(message) {
|
1253
|
+
validity = validity || $.prop(elem, 'validity') || {valid: 1};
|
1254
|
+
if(validity.valid){
|
1255
|
+
message = '';
|
1256
|
+
}
|
1240
1257
|
}
|
1241
1258
|
if(typeof message == 'object'){
|
1242
1259
|
validity = validity || $.prop(elem, 'validity') || {valid: 1};
|
@@ -1584,8 +1601,16 @@ $(window).on('invalid', $.noop);
|
|
1584
1601
|
webshims.addInputType('email', {
|
1585
1602
|
mismatch: (function(){
|
1586
1603
|
//taken from http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
|
1587
|
-
var test = cfg.emailReg || /^[a-zA-Z0-9.!#$%&'
|
1604
|
+
var test = cfg.emailReg || /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
1588
1605
|
return function(val){
|
1606
|
+
// optional punycode support: https://github.com/bestiejs/punycode.js
|
1607
|
+
if(window.punycode && punycode.toASCII){
|
1608
|
+
try {
|
1609
|
+
if( test.test(punycode.toASCII(val)) ){
|
1610
|
+
return false;
|
1611
|
+
}
|
1612
|
+
} catch(er){}
|
1613
|
+
}
|
1589
1614
|
return !test.test(val);
|
1590
1615
|
};
|
1591
1616
|
})()
|
@@ -3091,10 +3116,7 @@ try {
|
|
3091
3116
|
});
|
3092
3117
|
}
|
3093
3118
|
;
|
3094
|
-
|
3095
|
-
$.event.customEvent.updateInput = true;
|
3096
|
-
}
|
3097
|
-
|
3119
|
+
|
3098
3120
|
$(doc)
|
3099
3121
|
.on('focusin', function(e){
|
3100
3122
|
if( e.target && !e.target.readOnly && !e.target.disabled && (e.target.nodeName || '').toLowerCase() == 'input' && !noInputTypes[e.target.type] && !(webshims.data(e.target, 'implemented') || {}).inputwidgets){
|
@@ -3286,6 +3308,10 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
3286
3308
|
});
|
3287
3309
|
|
3288
3310
|
implementProperties.forEach(function(messageProp){
|
3311
|
+
var skipNames = {
|
3312
|
+
valid: 1,
|
3313
|
+
badInput: 1
|
3314
|
+
};
|
3289
3315
|
webshims.defineNodeNamesProperty(['fieldset', 'output', 'button'], messageProp, {
|
3290
3316
|
prop: {
|
3291
3317
|
value: '',
|
@@ -3314,13 +3340,16 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
3314
3340
|
if(message){return message;}
|
3315
3341
|
}
|
3316
3342
|
$.each(validity, function(name, prop){
|
3317
|
-
if(name
|
3343
|
+
if(skipNames[name] || !prop){return;}
|
3318
3344
|
|
3319
3345
|
message = webshims.createValidationMessage(elem, name);
|
3320
3346
|
if(message){
|
3321
3347
|
return false;
|
3322
3348
|
}
|
3323
3349
|
});
|
3350
|
+
if(!message && validity.badInput){
|
3351
|
+
message = webshims.createValidationMessage(elem, 'typeMismatch') || webshims.createValidationMessage(elem, 'valueMissing');
|
3352
|
+
}
|
3324
3353
|
return message || '';
|
3325
3354
|
},
|
3326
3355
|
writeable: false
|
@@ -8,7 +8,7 @@ var swfmini = function() {
|
|
8
8
|
|
9
9
|
var UNDEF = "undefined",
|
10
10
|
OBJECT = "object",
|
11
|
-
webshims =
|
11
|
+
webshims = window.webshims,
|
12
12
|
SHOCKWAVE_FLASH = "Shockwave Flash",
|
13
13
|
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
|
14
14
|
FLASH_MIME_TYPE = "application/x-shockwave-flash",
|
@@ -510,14 +510,14 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
510
510
|
webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
|
511
511
|
}
|
512
512
|
|
513
|
-
if(webshims.cfg.extendNative
|
513
|
+
if(webshims.cfg.extendNative === 1){
|
514
514
|
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");
|
515
515
|
}
|
516
516
|
|
517
517
|
if (!webshims.cfg.no$Switch) {
|
518
518
|
var switch$ = function(){
|
519
519
|
if (window.jQuery && (!window.$ || window.jQuery == window.$) && !window.jQuery.webshims) {
|
520
|
-
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly
|
520
|
+
webshims.error("jQuery was included more than once. Make sure to include it only once or try the $.noConflict(extreme) feature! Webshims and other Plugins might not work properly. Or set webshims.cfg.no$Switch to 'true'.");
|
521
521
|
if (window.$) {
|
522
522
|
window.$ = webshims.$;
|
523
523
|
}
|
@@ -1059,6 +1059,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1059
1059
|
setInterval(this.test, 600);
|
1060
1060
|
$(this.test);
|
1061
1061
|
webshims.ready('WINDOWLOAD', this.test);
|
1062
|
+
$(document).on('updatelayout', this.handler);
|
1062
1063
|
$(window).bind('resize', this.handler);
|
1063
1064
|
(function(){
|
1064
1065
|
var oldAnimate = $.fn.animate;
|
@@ -1106,7 +1107,9 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1106
1107
|
|
1107
1108
|
$(nativeElem).on('remove', function(e){
|
1108
1109
|
if (!e.originalEvent) {
|
1109
|
-
|
1110
|
+
setTimeout(function(){
|
1111
|
+
$(shadowElem).remove();
|
1112
|
+
}, 4);
|
1110
1113
|
}
|
1111
1114
|
});
|
1112
1115
|
|
@@ -1584,7 +1587,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
1584
1587
|
}
|
1585
1588
|
});
|
1586
1589
|
|
1587
|
-
})(
|
1590
|
+
})(webshims.$, document);
|
1588
1591
|
|
1589
1592
|
webshims.register('form-core', function($, webshims, window, document, undefined, options){
|
1590
1593
|
"use strict";
|
@@ -1663,6 +1666,7 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1663
1666
|
$.expr[":"][name] = $.expr.filters[name+"-element"];
|
1664
1667
|
});
|
1665
1668
|
|
1669
|
+
//bug was partially fixed in 1.10.0 for IE9, but not IE8 (move to es5 as soon as 1.10.2 is used)
|
1666
1670
|
var pseudoFocus = $.expr[":"].focus;
|
1667
1671
|
$.expr[":"].focus = function(){
|
1668
1672
|
try {
|
@@ -1685,10 +1689,18 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1685
1689
|
};
|
1686
1690
|
|
1687
1691
|
var transClass = ('transitionDelay' in document.documentElement.style) ? '' : ' no-transition';
|
1692
|
+
var poCFG = webshims.cfg.wspopover;
|
1693
|
+
if(!poCFG.position && poCFG.position !== false){
|
1694
|
+
poCFG.position = {
|
1695
|
+
at: 'left bottom',
|
1696
|
+
my: 'left top',
|
1697
|
+
collision: 'fit flip'
|
1698
|
+
};
|
1699
|
+
}
|
1688
1700
|
webshims.wsPopover = {
|
1689
1701
|
id: 0,
|
1690
1702
|
_create: function(){
|
1691
|
-
this.options = $.extend({},
|
1703
|
+
this.options = $.extend(true, {}, poCFG, this.options);
|
1692
1704
|
this.id = webshims.wsPopover.id++;
|
1693
1705
|
this.eventns = '.wsoverlay' + this.id;
|
1694
1706
|
this.timers = {};
|
@@ -1735,6 +1747,11 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1735
1747
|
var message = $(elem).data('errormessage') || elem.getAttribute('x-moz-errormessage') || '';
|
1736
1748
|
if(key && message[key]){
|
1737
1749
|
message = message[key];
|
1750
|
+
} else if(message) {
|
1751
|
+
validity = validity || $.prop(elem, 'validity') || {valid: 1};
|
1752
|
+
if(validity.valid){
|
1753
|
+
message = '';
|
1754
|
+
}
|
1738
1755
|
}
|
1739
1756
|
if(typeof message == 'object'){
|
1740
1757
|
validity = validity || $.prop(elem, 'validity') || {valid: 1};
|
@@ -2082,8 +2099,16 @@ $(window).on('invalid', $.noop);
|
|
2082
2099
|
webshims.addInputType('email', {
|
2083
2100
|
mismatch: (function(){
|
2084
2101
|
//taken from http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
|
2085
|
-
var test = cfg.emailReg || /^[a-zA-Z0-9.!#$%&'
|
2102
|
+
var test = cfg.emailReg || /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
2086
2103
|
return function(val){
|
2104
|
+
// optional punycode support: https://github.com/bestiejs/punycode.js
|
2105
|
+
if(window.punycode && punycode.toASCII){
|
2106
|
+
try {
|
2107
|
+
if( test.test(punycode.toASCII(val)) ){
|
2108
|
+
return false;
|
2109
|
+
}
|
2110
|
+
} catch(er){}
|
2111
|
+
}
|
2087
2112
|
return !test.test(val);
|
2088
2113
|
};
|
2089
2114
|
})()
|
@@ -3589,10 +3614,7 @@ try {
|
|
3589
3614
|
});
|
3590
3615
|
}
|
3591
3616
|
;
|
3592
|
-
|
3593
|
-
$.event.customEvent.updateInput = true;
|
3594
|
-
}
|
3595
|
-
|
3617
|
+
|
3596
3618
|
$(doc)
|
3597
3619
|
.on('focusin', function(e){
|
3598
3620
|
if( e.target && !e.target.readOnly && !e.target.disabled && (e.target.nodeName || '').toLowerCase() == 'input' && !noInputTypes[e.target.type] && !(webshims.data(e.target, 'implemented') || {}).inputwidgets){
|
@@ -3784,6 +3806,10 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
3784
3806
|
});
|
3785
3807
|
|
3786
3808
|
implementProperties.forEach(function(messageProp){
|
3809
|
+
var skipNames = {
|
3810
|
+
valid: 1,
|
3811
|
+
badInput: 1
|
3812
|
+
};
|
3787
3813
|
webshims.defineNodeNamesProperty(['fieldset', 'output', 'button'], messageProp, {
|
3788
3814
|
prop: {
|
3789
3815
|
value: '',
|
@@ -3812,13 +3838,16 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
3812
3838
|
if(message){return message;}
|
3813
3839
|
}
|
3814
3840
|
$.each(validity, function(name, prop){
|
3815
|
-
if(name
|
3841
|
+
if(skipNames[name] || !prop){return;}
|
3816
3842
|
|
3817
3843
|
message = webshims.createValidationMessage(elem, name);
|
3818
3844
|
if(message){
|
3819
3845
|
return false;
|
3820
3846
|
}
|
3821
3847
|
});
|
3848
|
+
if(!message && validity.badInput){
|
3849
|
+
message = webshims.createValidationMessage(elem, 'typeMismatch') || webshims.createValidationMessage(elem, 'valueMissing');
|
3850
|
+
}
|
3822
3851
|
return message || '';
|
3823
3852
|
},
|
3824
3853
|
writeable: false
|
@@ -4118,8 +4147,9 @@ webshims.register('form-datalist', function($, webshims, window, document, undef
|
|
4118
4147
|
})();
|
4119
4148
|
|
4120
4149
|
});
|
4121
|
-
(function(
|
4150
|
+
(function(Modernizr, webshims){
|
4122
4151
|
"use strict";
|
4152
|
+
var $ = webshims.$;
|
4123
4153
|
var hasNative = Modernizr.audio && Modernizr.video;
|
4124
4154
|
var supportsLoop = false;
|
4125
4155
|
var bugs = webshims.bugs;
|
@@ -4223,6 +4253,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
4223
4253
|
hasSwf = swfmini.hasFlashPlayerVersion('9.0.115');
|
4224
4254
|
$('html').addClass(hasSwf ? 'swf' : 'no-swf');
|
4225
4255
|
var mediaelement = webshims.mediaelement;
|
4256
|
+
|
4226
4257
|
mediaelement.parseRtmp = function(data){
|
4227
4258
|
var src = data.src.split('://');
|
4228
4259
|
var paths = src[1].split('/');
|
@@ -4392,7 +4423,6 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
4392
4423
|
var src = getSrcObj(mediaElem, nodeName);
|
4393
4424
|
|
4394
4425
|
if(!src.src){
|
4395
|
-
|
4396
4426
|
$('source', mediaElem).each(function(){
|
4397
4427
|
src = getSrcObj(this, nodeName);
|
4398
4428
|
if(src.src){srces.push(src);}
|
@@ -4407,18 +4437,10 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
4407
4437
|
srces = [srces];
|
4408
4438
|
}
|
4409
4439
|
srces.forEach(function(src){
|
4410
|
-
var source = document.createElement('source');
|
4411
4440
|
if(typeof src == 'string'){
|
4412
4441
|
src = {src: src};
|
4413
4442
|
}
|
4414
|
-
|
4415
|
-
if(src.type){
|
4416
|
-
source.setAttribute('type', src.type);
|
4417
|
-
}
|
4418
|
-
if(src.media){
|
4419
|
-
source.setAttribute('media', src.media);
|
4420
|
-
}
|
4421
|
-
mediaElem.append(source);
|
4443
|
+
mediaElem.append($(document.createElement('source')).attr(src));
|
4422
4444
|
});
|
4423
4445
|
|
4424
4446
|
}
|
@@ -4566,6 +4588,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
4566
4588
|
|
4567
4589
|
if(!_srces.length || !parent || parent.nodeType != 1 || stopParent.test(parent.nodeName || '')){return;}
|
4568
4590
|
data = data || webshims.data(elem, 'mediaelement');
|
4591
|
+
if(mediaelement.sortMedia){
|
4592
|
+
_srces.sort(mediaelement.sortMedia);
|
4593
|
+
}
|
4569
4594
|
stepSources(elem, data, options.preferFlash || undefined, _srces);
|
4570
4595
|
};
|
4571
4596
|
mediaelement.selectSource = selectSource;
|
@@ -4740,4 +4765,4 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
|
|
4740
4765
|
}
|
4741
4766
|
webshims.ready('track', loadTrackUi);
|
4742
4767
|
});
|
4743
|
-
})(
|
4768
|
+
})(Modernizr, webshims);
|