webshims-rails 1.10.6 → 1.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/webshims-rails/version.rb +2 -2
- data/vendor/assets/javascripts/webshims/polyfiller.js +14 -7
- data/vendor/assets/javascripts/webshims/shims/color-picker.js +1 -0
- data/vendor/assets/javascripts/webshims/shims/combos/1.js +153 -155
- data/vendor/assets/javascripts/webshims/shims/combos/10.js +168 -136
- data/vendor/assets/javascripts/webshims/shims/combos/11.js +116 -44
- data/vendor/assets/javascripts/webshims/shims/combos/12.js +100 -95
- data/vendor/assets/javascripts/webshims/shims/combos/13.js +100 -95
- data/vendor/assets/javascripts/webshims/shims/combos/14.js +51 -91
- data/vendor/assets/javascripts/webshims/shims/combos/15.js +129 -232
- data/vendor/assets/javascripts/webshims/shims/combos/16.js +228 -326
- data/vendor/assets/javascripts/webshims/shims/combos/17.js +116 -44
- data/vendor/assets/javascripts/webshims/shims/combos/18.js +116 -44
- data/vendor/assets/javascripts/webshims/shims/combos/19.js +210 -214
- data/vendor/assets/javascripts/webshims/shims/combos/2.js +204 -246
- data/vendor/assets/javascripts/webshims/shims/combos/20.js +210 -214
- data/vendor/assets/javascripts/webshims/shims/combos/21.js +59 -28
- data/vendor/assets/javascripts/webshims/shims/combos/23.js +100 -95
- data/vendor/assets/javascripts/webshims/shims/combos/24.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/combos/25.js +210 -214
- data/vendor/assets/javascripts/webshims/shims/combos/26.js +51 -91
- data/vendor/assets/javascripts/webshims/shims/combos/28.js +110 -119
- data/vendor/assets/javascripts/webshims/shims/combos/29.js +6 -0
- data/vendor/assets/javascripts/webshims/shims/combos/3.js +126 -156
- data/vendor/assets/javascripts/webshims/shims/combos/30.js +126 -155
- data/vendor/assets/javascripts/webshims/shims/combos/31.js +104 -151
- data/vendor/assets/javascripts/webshims/shims/combos/4.js +73 -96
- data/vendor/assets/javascripts/webshims/shims/combos/5.js +116 -44
- data/vendor/assets/javascripts/webshims/shims/combos/6.js +116 -44
- data/vendor/assets/javascripts/webshims/shims/combos/7.js +226 -250
- data/vendor/assets/javascripts/webshims/shims/combos/8.js +226 -250
- data/vendor/assets/javascripts/webshims/shims/combos/9.js +168 -136
- data/vendor/assets/javascripts/webshims/shims/dom-extend.js +51 -91
- data/vendor/assets/javascripts/webshims/shims/form-core.js +53 -60
- data/vendor/assets/javascripts/webshims/shims/form-message.js +22 -5
- data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +87 -30
- data/vendor/assets/javascripts/webshims/shims/form-shim-extend.js +2 -76
- data/vendor/assets/javascripts/webshims/shims/form-validation.js +2 -2
- data/vendor/assets/javascripts/webshims/shims/forms-picker.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-fr.js +18 -8
- data/vendor/assets/javascripts/webshims/shims/mediaelement-core.js +100 -95
- data/vendor/assets/javascripts/webshims/shims/mediaelement-jaris.js +59 -28
- data/vendor/assets/javascripts/webshims/shims/mediaelement-yt.js +9 -2
- data/vendor/assets/javascripts/webshims/shims/range-ui.js +29 -14
- data/vendor/assets/javascripts/webshims/shims/styles/scss/shim.scss +21 -7
- data/vendor/assets/javascripts/webshims/shims/styles/shim.css +30 -15
- data/vendor/assets/javascripts/webshims/shims/track-ui.js +6 -0
- metadata +2 -2
@@ -11,10 +11,15 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
11
11
|
if(!$.parseHTML){
|
12
12
|
webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
|
13
13
|
}
|
14
|
+
|
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");
|
17
|
+
}
|
18
|
+
|
14
19
|
if (!webshims.cfg.no$Switch) {
|
15
20
|
var switch$ = function(){
|
16
21
|
if (window.jQuery && (!window.$ || window.jQuery == window.$) && !window.jQuery.webshims) {
|
17
|
-
webshims.error("jQuery was included more than once. Make sure to include it only once! 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..");
|
18
23
|
if (window.$) {
|
19
24
|
window.$ = webshims.$;
|
20
25
|
}
|
@@ -32,7 +37,10 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
32
37
|
};
|
33
38
|
switch$();
|
34
39
|
setTimeout(switch$, 90);
|
40
|
+
webshims.ready('DOM', switch$);
|
35
41
|
$(switch$);
|
42
|
+
webshims.ready('WINDOWLOAD', switch$);
|
43
|
+
|
36
44
|
}
|
37
45
|
// (function(){
|
38
46
|
// var hostNames = {
|
@@ -140,6 +148,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
140
148
|
$(evtDel).off(evt, fn);
|
141
149
|
}
|
142
150
|
});
|
151
|
+
return this;
|
143
152
|
};
|
144
153
|
|
145
154
|
var dataID = '_webshimsLib'+ (Math.round(Math.random() * 1000));
|
@@ -174,57 +183,6 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
174
183
|
};
|
175
184
|
});
|
176
185
|
|
177
|
-
if($.Tween.propHooks._default && $.css){
|
178
|
-
(function(){
|
179
|
-
var isjQ8 = false;
|
180
|
-
try {
|
181
|
-
isjQ8 = $.css($('<b style="width: 10px" />')[0], 'width', '') == '10px';
|
182
|
-
} catch(er){
|
183
|
-
webshims.error(er);
|
184
|
-
}
|
185
|
-
var css = isjQ8 ?
|
186
|
-
function(elem, prop){
|
187
|
-
return $.css( elem, prop, false, "" );
|
188
|
-
} :
|
189
|
-
function(elem, prop){
|
190
|
-
return $.css( elem, prop, "" );
|
191
|
-
}
|
192
|
-
;
|
193
|
-
|
194
|
-
$.extend($.Tween.propHooks._default, {
|
195
|
-
get: function( tween ) {
|
196
|
-
var result;
|
197
|
-
|
198
|
-
if ( (tween.elem[ tween.prop ] != null || havePolyfill[ tween.prop ]) &&
|
199
|
-
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
|
200
|
-
return havePolyfill[ tween.prop ] ? $.prop(tween.elem, tween.prop) : tween.elem[ tween.prop ];
|
201
|
-
}
|
202
|
-
|
203
|
-
// passing an empty string as a 3rd parameter to .css will automatically
|
204
|
-
// attempt a parseFloat and fallback to a string if the parse fails
|
205
|
-
// so, simple values such as "10px" are parsed to Float.
|
206
|
-
// complex values such as "rotate(1rad)" are returned as is.
|
207
|
-
result = css( tween.elem, tween.prop );
|
208
|
-
// Empty strings, null, undefined and "auto" are converted to 0.
|
209
|
-
return !result || result === "auto" ? 0 : result;
|
210
|
-
},
|
211
|
-
set: function( tween ) {
|
212
|
-
// use step hook for back compat - use cssHook if its there - use .style if its
|
213
|
-
// available and use plain properties where available
|
214
|
-
if ( jQuery.fx.step[ tween.prop ] ) {
|
215
|
-
jQuery.fx.step[ tween.prop ]( tween );
|
216
|
-
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
217
|
-
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
218
|
-
} else if( !havePolyfill[ tween.prop ] ) {
|
219
|
-
tween.elem[ tween.prop ] = tween.now;
|
220
|
-
} else {
|
221
|
-
$.prop(tween.elem, tween.prop, tween.now);
|
222
|
-
}
|
223
|
-
}
|
224
|
-
});
|
225
|
-
})();
|
226
|
-
}
|
227
|
-
|
228
186
|
|
229
187
|
['removeAttr', 'prop', 'attr'].forEach(function(type){
|
230
188
|
olds[type] = $[type];
|
@@ -628,48 +586,50 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
628
586
|
});
|
629
587
|
};
|
630
588
|
return function(nativeElem, shadowElem, opts){
|
631
|
-
|
632
|
-
|
633
|
-
nativeElem
|
634
|
-
|
635
|
-
if(shadowElem.jquery){
|
636
|
-
shadowElem = shadowElem[0];
|
637
|
-
}
|
638
|
-
var nativeData = $.data(nativeElem, dataID) || $.data(nativeElem, dataID, {});
|
639
|
-
var shadowData = $.data(shadowElem, dataID) || $.data(shadowElem, dataID, {});
|
640
|
-
var shadowFocusElementData = {};
|
641
|
-
if(!opts.shadowFocusElement){
|
642
|
-
opts.shadowFocusElement = shadowElem;
|
643
|
-
} else if(opts.shadowFocusElement){
|
644
|
-
if(opts.shadowFocusElement.jquery){
|
645
|
-
opts.shadowFocusElement = opts.shadowFocusElement[0];
|
589
|
+
if(nativeElem && shadowElem){
|
590
|
+
opts = opts || {};
|
591
|
+
if(nativeElem.jquery){
|
592
|
+
nativeElem = nativeElem[0];
|
646
593
|
}
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
$(nativeElem).on('remove', function(e){
|
651
|
-
if (!e.originalEvent) {
|
652
|
-
$(shadowElem).remove();
|
594
|
+
if(shadowElem.jquery){
|
595
|
+
shadowElem = shadowElem[0];
|
653
596
|
}
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
597
|
+
var nativeData = $.data(nativeElem, dataID) || $.data(nativeElem, dataID, {});
|
598
|
+
var shadowData = $.data(shadowElem, dataID) || $.data(shadowElem, dataID, {});
|
599
|
+
var shadowFocusElementData = {};
|
600
|
+
if(!opts.shadowFocusElement){
|
601
|
+
opts.shadowFocusElement = shadowElem;
|
602
|
+
} else if(opts.shadowFocusElement){
|
603
|
+
if(opts.shadowFocusElement.jquery){
|
604
|
+
opts.shadowFocusElement = opts.shadowFocusElement[0];
|
605
|
+
}
|
606
|
+
shadowFocusElementData = $.data(opts.shadowFocusElement, dataID) || $.data(opts.shadowFocusElement, dataID, shadowFocusElementData);
|
607
|
+
}
|
608
|
+
|
609
|
+
$(nativeElem).on('remove', function(e){
|
610
|
+
if (!e.originalEvent) {
|
611
|
+
$(shadowElem).remove();
|
612
|
+
}
|
666
613
|
});
|
614
|
+
|
615
|
+
nativeData.hasShadow = shadowElem;
|
616
|
+
shadowFocusElementData.nativeElement = shadowData.nativeElement = nativeElem;
|
617
|
+
shadowFocusElementData.shadowData = shadowData.shadowData = nativeData.shadowData = {
|
618
|
+
nativeElement: nativeElem,
|
619
|
+
shadowElement: shadowElem,
|
620
|
+
shadowFocusElement: opts.shadowFocusElement
|
621
|
+
};
|
622
|
+
if(opts.shadowChilds){
|
623
|
+
opts.shadowChilds.each(function(){
|
624
|
+
elementData(this, 'shadowData', shadowData.shadowData);
|
625
|
+
});
|
626
|
+
}
|
627
|
+
|
628
|
+
if(opts.data){
|
629
|
+
shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
|
630
|
+
}
|
631
|
+
opts = null;
|
667
632
|
}
|
668
|
-
|
669
|
-
if(opts.data){
|
670
|
-
shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
|
671
|
-
}
|
672
|
-
opts = null;
|
673
633
|
webshims.docObserve();
|
674
634
|
};
|
675
635
|
})(),
|
@@ -953,7 +913,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
953
913
|
// register: moduleName:string,
|
954
914
|
// callback: callback:function
|
955
915
|
// });
|
956
|
-
// get/set including
|
916
|
+
// get/set including remoteLang
|
957
917
|
// - webshims.activeLang({
|
958
918
|
// module: moduleName:string,
|
959
919
|
// callback: callback:function,
|
@@ -1205,12 +1165,13 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1205
1165
|
$.expr[":"][name] = $.expr.filters[name+"-element"];
|
1206
1166
|
});
|
1207
1167
|
|
1208
|
-
|
1209
|
-
$.expr[":"].focus = function(
|
1168
|
+
var pseudoFocus = $.expr[":"].focus;
|
1169
|
+
$.expr[":"].focus = function(){
|
1210
1170
|
try {
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1171
|
+
return pseudoFocus.apply(this, arguments);
|
1172
|
+
} catch(e){
|
1173
|
+
webshims.error(e);
|
1174
|
+
}
|
1214
1175
|
return false;
|
1215
1176
|
};
|
1216
1177
|
|
@@ -1225,7 +1186,7 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1225
1186
|
});
|
1226
1187
|
};
|
1227
1188
|
|
1228
|
-
|
1189
|
+
var transClass = ('transitionDelay' in document.documentElement.style) ? '' : ' no-transition';
|
1229
1190
|
webshims.wsPopover = {
|
1230
1191
|
id: 0,
|
1231
1192
|
_create: function(){
|
@@ -1233,7 +1194,7 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1233
1194
|
this.id = webshims.wsPopover.id++;
|
1234
1195
|
this.eventns = '.wsoverlay' + this.id;
|
1235
1196
|
this.timers = {};
|
1236
|
-
this.element = $('<div class="ws-popover" tabindex="-1"><div class="ws-po-outerbox"><div class="ws-po-arrow"><div class="ws-po-arrowbox" /></div><div class="ws-po-box" /></div></div>');
|
1197
|
+
this.element = $('<div class="ws-popover'+transClass+'" tabindex="-1"><div class="ws-po-outerbox"><div class="ws-po-arrow"><div class="ws-po-arrowbox" /></div><div class="ws-po-box" /></div></div>');
|
1237
1198
|
this.contentElement = $('.ws-po-box', this.element);
|
1238
1199
|
this.lastElement = $([]);
|
1239
1200
|
this.bindElement();
|
@@ -1272,47 +1233,6 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1272
1233
|
};
|
1273
1234
|
|
1274
1235
|
|
1275
|
-
/* extension, but also used to fix native implementation workaround/bugfixes */
|
1276
|
-
(function(){
|
1277
|
-
var firstEvent,
|
1278
|
-
invalids = [],
|
1279
|
-
stopSubmitTimer,
|
1280
|
-
form
|
1281
|
-
;
|
1282
|
-
|
1283
|
-
$(document).on('invalid', function(e){
|
1284
|
-
if(e.wrongWebkitInvalid){return;}
|
1285
|
-
var jElm = $(e.target);
|
1286
|
-
|
1287
|
-
|
1288
|
-
if(!firstEvent){
|
1289
|
-
//trigger firstinvalid
|
1290
|
-
firstEvent = $.Event('firstinvalid');
|
1291
|
-
firstEvent.isInvalidUIPrevented = e.isDefaultPrevented;
|
1292
|
-
var firstSystemInvalid = $.Event('firstinvalidsystem');
|
1293
|
-
$(document).triggerHandler(firstSystemInvalid, {element: e.target, form: e.target.form, isInvalidUIPrevented: e.isDefaultPrevented});
|
1294
|
-
jElm.trigger(firstEvent);
|
1295
|
-
}
|
1296
|
-
|
1297
|
-
//if firstinvalid was prevented all invalids will be also prevented
|
1298
|
-
if( firstEvent && firstEvent.isDefaultPrevented() ){
|
1299
|
-
e.preventDefault();
|
1300
|
-
}
|
1301
|
-
invalids.push(e.target);
|
1302
|
-
e.extraData = 'fix';
|
1303
|
-
clearTimeout(stopSubmitTimer);
|
1304
|
-
stopSubmitTimer = setTimeout(function(){
|
1305
|
-
var lastEvent = {type: 'lastinvalid', cancelable: false, invalidlist: $(invalids)};
|
1306
|
-
//reset firstinvalid
|
1307
|
-
firstEvent = false;
|
1308
|
-
invalids = [];
|
1309
|
-
$(e.target).trigger(lastEvent, lastEvent);
|
1310
|
-
}, 9);
|
1311
|
-
jElm = null;
|
1312
|
-
});
|
1313
|
-
})();
|
1314
|
-
|
1315
|
-
|
1316
1236
|
webshims.getContentValidationMessage = function(elem, validity, key){
|
1317
1237
|
var message = $(elem).data('errormessage') || elem.getAttribute('x-moz-errormessage') || '';
|
1318
1238
|
if(key && message[key]){
|
@@ -1346,19 +1266,13 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1346
1266
|
};
|
1347
1267
|
|
1348
1268
|
|
1349
|
-
|
1350
|
-
$(
|
1351
|
-
|
1352
|
-
|
1353
|
-
}
|
1354
|
-
});
|
1269
|
+
$(document).on('focusin.lazyloadvalidation', function(e){
|
1270
|
+
if('form' in e.target && $(e.target).is(':invalid')){
|
1271
|
+
lazyLoad();
|
1272
|
+
}
|
1355
1273
|
});
|
1356
1274
|
webshims.ready('WINDOWLOAD', lazyLoad);
|
1357
|
-
|
1358
|
-
options.customMessages = true;
|
1359
|
-
webshims.reTest('form-message');
|
1360
|
-
webshims.error('overrideMessages is deprecated. use customMessages instead.');
|
1361
|
-
}
|
1275
|
+
|
1362
1276
|
if(options.replaceValidationUI){
|
1363
1277
|
webshims.ready('DOM forms', function(){
|
1364
1278
|
$(document).on('firstinvalid', function(e){
|
@@ -1369,8 +1283,47 @@ webshims.register('form-core', function($, webshims, window, document, undefined
|
|
1369
1283
|
});
|
1370
1284
|
});
|
1371
1285
|
}
|
1372
|
-
|
1286
|
+
|
1287
|
+
/* extension, but also used to fix native implementation workaround/bugfixes */
|
1288
|
+
(function(){
|
1289
|
+
var firstEvent,
|
1290
|
+
invalids = [],
|
1291
|
+
stopSubmitTimer,
|
1292
|
+
form
|
1293
|
+
;
|
1294
|
+
|
1295
|
+
$(document).on('invalid', function(e){
|
1296
|
+
if(e.wrongWebkitInvalid){return;}
|
1297
|
+
var jElm = $(e.target);
|
1298
|
+
|
1299
|
+
|
1300
|
+
if(!firstEvent){
|
1301
|
+
//trigger firstinvalid
|
1302
|
+
firstEvent = $.Event('firstinvalid');
|
1303
|
+
firstEvent.isInvalidUIPrevented = e.isDefaultPrevented;
|
1304
|
+
var firstSystemInvalid = $.Event('firstinvalidsystem');
|
1305
|
+
$(document).triggerHandler(firstSystemInvalid, {element: e.target, form: e.target.form, isInvalidUIPrevented: e.isDefaultPrevented});
|
1306
|
+
jElm.trigger(firstEvent);
|
1307
|
+
}
|
1373
1308
|
|
1309
|
+
//if firstinvalid was prevented all invalids will be also prevented
|
1310
|
+
if( firstEvent && firstEvent.isDefaultPrevented() ){
|
1311
|
+
e.preventDefault();
|
1312
|
+
}
|
1313
|
+
invalids.push(e.target);
|
1314
|
+
e.extraData = 'fix';
|
1315
|
+
clearTimeout(stopSubmitTimer);
|
1316
|
+
stopSubmitTimer = setTimeout(function(){
|
1317
|
+
var lastEvent = {type: 'lastinvalid', cancelable: false, invalidlist: $(invalids)};
|
1318
|
+
//reset firstinvalid
|
1319
|
+
firstEvent = false;
|
1320
|
+
invalids = [];
|
1321
|
+
$(e.target).trigger(lastEvent, lastEvent);
|
1322
|
+
}, 9);
|
1323
|
+
jElm = null;
|
1324
|
+
});
|
1325
|
+
})();
|
1326
|
+
});
|
1374
1327
|
|
1375
1328
|
webshims.register('form-datalist', function($, webshims, window, document, undefined, options){
|
1376
1329
|
"use strict";
|
@@ -11,10 +11,15 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
11
11
|
if(!$.parseHTML){
|
12
12
|
webshims.error("Webshims needs jQuery 1.8+ to work properly. Please update your jQuery version or downgrade webshims.");
|
13
13
|
}
|
14
|
+
|
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");
|
17
|
+
}
|
18
|
+
|
14
19
|
if (!webshims.cfg.no$Switch) {
|
15
20
|
var switch$ = function(){
|
16
21
|
if (window.jQuery && (!window.$ || window.jQuery == window.$) && !window.jQuery.webshims) {
|
17
|
-
webshims.error("jQuery was included more than once. Make sure to include it only once! 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..");
|
18
23
|
if (window.$) {
|
19
24
|
window.$ = webshims.$;
|
20
25
|
}
|
@@ -32,7 +37,10 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
32
37
|
};
|
33
38
|
switch$();
|
34
39
|
setTimeout(switch$, 90);
|
40
|
+
webshims.ready('DOM', switch$);
|
35
41
|
$(switch$);
|
42
|
+
webshims.ready('WINDOWLOAD', switch$);
|
43
|
+
|
36
44
|
}
|
37
45
|
// (function(){
|
38
46
|
// var hostNames = {
|
@@ -140,6 +148,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
140
148
|
$(evtDel).off(evt, fn);
|
141
149
|
}
|
142
150
|
});
|
151
|
+
return this;
|
143
152
|
};
|
144
153
|
|
145
154
|
var dataID = '_webshimsLib'+ (Math.round(Math.random() * 1000));
|
@@ -174,57 +183,6 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
174
183
|
};
|
175
184
|
});
|
176
185
|
|
177
|
-
if($.Tween.propHooks._default && $.css){
|
178
|
-
(function(){
|
179
|
-
var isjQ8 = false;
|
180
|
-
try {
|
181
|
-
isjQ8 = $.css($('<b style="width: 10px" />')[0], 'width', '') == '10px';
|
182
|
-
} catch(er){
|
183
|
-
webshims.error(er);
|
184
|
-
}
|
185
|
-
var css = isjQ8 ?
|
186
|
-
function(elem, prop){
|
187
|
-
return $.css( elem, prop, false, "" );
|
188
|
-
} :
|
189
|
-
function(elem, prop){
|
190
|
-
return $.css( elem, prop, "" );
|
191
|
-
}
|
192
|
-
;
|
193
|
-
|
194
|
-
$.extend($.Tween.propHooks._default, {
|
195
|
-
get: function( tween ) {
|
196
|
-
var result;
|
197
|
-
|
198
|
-
if ( (tween.elem[ tween.prop ] != null || havePolyfill[ tween.prop ]) &&
|
199
|
-
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
|
200
|
-
return havePolyfill[ tween.prop ] ? $.prop(tween.elem, tween.prop) : tween.elem[ tween.prop ];
|
201
|
-
}
|
202
|
-
|
203
|
-
// passing an empty string as a 3rd parameter to .css will automatically
|
204
|
-
// attempt a parseFloat and fallback to a string if the parse fails
|
205
|
-
// so, simple values such as "10px" are parsed to Float.
|
206
|
-
// complex values such as "rotate(1rad)" are returned as is.
|
207
|
-
result = css( tween.elem, tween.prop );
|
208
|
-
// Empty strings, null, undefined and "auto" are converted to 0.
|
209
|
-
return !result || result === "auto" ? 0 : result;
|
210
|
-
},
|
211
|
-
set: function( tween ) {
|
212
|
-
// use step hook for back compat - use cssHook if its there - use .style if its
|
213
|
-
// available and use plain properties where available
|
214
|
-
if ( jQuery.fx.step[ tween.prop ] ) {
|
215
|
-
jQuery.fx.step[ tween.prop ]( tween );
|
216
|
-
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
217
|
-
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
218
|
-
} else if( !havePolyfill[ tween.prop ] ) {
|
219
|
-
tween.elem[ tween.prop ] = tween.now;
|
220
|
-
} else {
|
221
|
-
$.prop(tween.elem, tween.prop, tween.now);
|
222
|
-
}
|
223
|
-
}
|
224
|
-
});
|
225
|
-
})();
|
226
|
-
}
|
227
|
-
|
228
186
|
|
229
187
|
['removeAttr', 'prop', 'attr'].forEach(function(type){
|
230
188
|
olds[type] = $[type];
|
@@ -628,48 +586,50 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
628
586
|
});
|
629
587
|
};
|
630
588
|
return function(nativeElem, shadowElem, opts){
|
631
|
-
|
632
|
-
|
633
|
-
nativeElem
|
634
|
-
|
635
|
-
if(shadowElem.jquery){
|
636
|
-
shadowElem = shadowElem[0];
|
637
|
-
}
|
638
|
-
var nativeData = $.data(nativeElem, dataID) || $.data(nativeElem, dataID, {});
|
639
|
-
var shadowData = $.data(shadowElem, dataID) || $.data(shadowElem, dataID, {});
|
640
|
-
var shadowFocusElementData = {};
|
641
|
-
if(!opts.shadowFocusElement){
|
642
|
-
opts.shadowFocusElement = shadowElem;
|
643
|
-
} else if(opts.shadowFocusElement){
|
644
|
-
if(opts.shadowFocusElement.jquery){
|
645
|
-
opts.shadowFocusElement = opts.shadowFocusElement[0];
|
589
|
+
if(nativeElem && shadowElem){
|
590
|
+
opts = opts || {};
|
591
|
+
if(nativeElem.jquery){
|
592
|
+
nativeElem = nativeElem[0];
|
646
593
|
}
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
$(nativeElem).on('remove', function(e){
|
651
|
-
if (!e.originalEvent) {
|
652
|
-
$(shadowElem).remove();
|
594
|
+
if(shadowElem.jquery){
|
595
|
+
shadowElem = shadowElem[0];
|
653
596
|
}
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
597
|
+
var nativeData = $.data(nativeElem, dataID) || $.data(nativeElem, dataID, {});
|
598
|
+
var shadowData = $.data(shadowElem, dataID) || $.data(shadowElem, dataID, {});
|
599
|
+
var shadowFocusElementData = {};
|
600
|
+
if(!opts.shadowFocusElement){
|
601
|
+
opts.shadowFocusElement = shadowElem;
|
602
|
+
} else if(opts.shadowFocusElement){
|
603
|
+
if(opts.shadowFocusElement.jquery){
|
604
|
+
opts.shadowFocusElement = opts.shadowFocusElement[0];
|
605
|
+
}
|
606
|
+
shadowFocusElementData = $.data(opts.shadowFocusElement, dataID) || $.data(opts.shadowFocusElement, dataID, shadowFocusElementData);
|
607
|
+
}
|
608
|
+
|
609
|
+
$(nativeElem).on('remove', function(e){
|
610
|
+
if (!e.originalEvent) {
|
611
|
+
$(shadowElem).remove();
|
612
|
+
}
|
666
613
|
});
|
614
|
+
|
615
|
+
nativeData.hasShadow = shadowElem;
|
616
|
+
shadowFocusElementData.nativeElement = shadowData.nativeElement = nativeElem;
|
617
|
+
shadowFocusElementData.shadowData = shadowData.shadowData = nativeData.shadowData = {
|
618
|
+
nativeElement: nativeElem,
|
619
|
+
shadowElement: shadowElem,
|
620
|
+
shadowFocusElement: opts.shadowFocusElement
|
621
|
+
};
|
622
|
+
if(opts.shadowChilds){
|
623
|
+
opts.shadowChilds.each(function(){
|
624
|
+
elementData(this, 'shadowData', shadowData.shadowData);
|
625
|
+
});
|
626
|
+
}
|
627
|
+
|
628
|
+
if(opts.data){
|
629
|
+
shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
|
630
|
+
}
|
631
|
+
opts = null;
|
667
632
|
}
|
668
|
-
|
669
|
-
if(opts.data){
|
670
|
-
shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
|
671
|
-
}
|
672
|
-
opts = null;
|
673
633
|
webshims.docObserve();
|
674
634
|
};
|
675
635
|
})(),
|
@@ -953,7 +913,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
953
913
|
// register: moduleName:string,
|
954
914
|
// callback: callback:function
|
955
915
|
// });
|
956
|
-
// get/set including
|
916
|
+
// get/set including remoteLang
|
957
917
|
// - webshims.activeLang({
|
958
918
|
// module: moduleName:string,
|
959
919
|
// callback: callback:function,
|
@@ -1180,8 +1140,15 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
1180
1140
|
validityMessages.en.rangeOverflow[type] = validityMessages.en.rangeOverflow[type] || 'Value must be at or before {%max}.';
|
1181
1141
|
});
|
1182
1142
|
}
|
1183
|
-
|
1184
|
-
|
1143
|
+
if(!validityMessages['en-US']){
|
1144
|
+
validityMessages['en-US'] = $.extend(true, {}, validityMessages.en);
|
1145
|
+
}
|
1146
|
+
if(!validityMessages['en-GB']){
|
1147
|
+
validityMessages['en-GB'] = $.extend(true, {}, validityMessages.en);
|
1148
|
+
}
|
1149
|
+
if(!validityMessages['en-AU']){
|
1150
|
+
validityMessages['en-AU'] = $.extend(true, {}, validityMessages.en);
|
1151
|
+
}
|
1185
1152
|
validityMessages[''] = validityMessages[''] || validityMessages['en-US'];
|
1186
1153
|
|
1187
1154
|
validityMessages.de = $.extend(true, {
|
@@ -1281,12 +1248,22 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
1281
1248
|
|
1282
1249
|
webshims.activeLang({
|
1283
1250
|
langObj: validityMessages,
|
1284
|
-
module: 'form-core',
|
1251
|
+
module: 'form-core',
|
1285
1252
|
callback: function(langObj){
|
1286
|
-
|
1287
1253
|
currentValidationMessage = langObj;
|
1288
1254
|
}
|
1289
1255
|
});
|
1256
|
+
webshims.activeLang({
|
1257
|
+
register: 'form-core',
|
1258
|
+
callback: function(val){
|
1259
|
+
$.each(validityMessages, function(i, val){
|
1260
|
+
if(validityMessages[val]){
|
1261
|
+
currentValidationMessage = validityMessages[val];
|
1262
|
+
return false;
|
1263
|
+
}
|
1264
|
+
});
|
1265
|
+
}
|
1266
|
+
});
|
1290
1267
|
|
1291
1268
|
implementProperties.forEach(function(messageProp){
|
1292
1269
|
webshims.defineNodeNamesProperty(['fieldset', 'output', 'button'], messageProp, {
|
@@ -1332,4 +1309,4 @@ webshims.register('form-message', function($, webshims, window, document, undefi
|
|
1332
1309
|
});
|
1333
1310
|
|
1334
1311
|
});
|
1335
|
-
});
|
1312
|
+
});
|