webshims-rails 1.12.5 → 1.12.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webshims-rails/version.rb +2 -2
  3. data/vendor/assets/javascripts/webshims/polyfiller.js +111 -132
  4. data/vendor/assets/javascripts/webshims/shims/combos/1.js +40 -37
  5. data/vendor/assets/javascripts/webshims/shims/combos/10.js +217 -36
  6. data/vendor/assets/javascripts/webshims/shims/combos/11.js +151 -29
  7. data/vendor/assets/javascripts/webshims/shims/combos/12.js +70 -93
  8. data/vendor/assets/javascripts/webshims/shims/combos/13.js +70 -93
  9. data/vendor/assets/javascripts/webshims/shims/combos/14.js +90 -13
  10. data/vendor/assets/javascripts/webshims/shims/combos/15.js +202 -59
  11. data/vendor/assets/javascripts/webshims/shims/combos/16.js +208 -70
  12. data/vendor/assets/javascripts/webshims/shims/combos/17.js +151 -29
  13. data/vendor/assets/javascripts/webshims/shims/combos/18.js +155 -30
  14. data/vendor/assets/javascripts/webshims/shims/combos/19.js +79 -20
  15. data/vendor/assets/javascripts/webshims/shims/combos/2.js +109 -47
  16. data/vendor/assets/javascripts/webshims/shims/combos/20.js +79 -20
  17. data/vendor/assets/javascripts/webshims/shims/combos/21.js +80 -87
  18. data/vendor/assets/javascripts/webshims/shims/combos/22.js +66 -83
  19. data/vendor/assets/javascripts/webshims/shims/combos/23.js +4 -10
  20. data/vendor/assets/javascripts/webshims/shims/combos/25.js +79 -20
  21. data/vendor/assets/javascripts/webshims/shims/combos/26.js +66 -7
  22. data/vendor/assets/javascripts/webshims/shims/combos/28.js +100 -25
  23. data/vendor/assets/javascripts/webshims/shims/combos/3.js +192 -47
  24. data/vendor/assets/javascripts/webshims/shims/combos/30.js +193 -49
  25. data/vendor/assets/javascripts/webshims/shims/combos/31.js +103 -36
  26. data/vendor/assets/javascripts/webshims/shims/combos/32.js +5 -3
  27. data/vendor/assets/javascripts/webshims/shims/combos/33.js +1 -2
  28. data/vendor/assets/javascripts/webshims/shims/combos/34.js +2048 -0
  29. data/vendor/assets/javascripts/webshims/shims/combos/4.js +156 -20
  30. data/vendor/assets/javascripts/webshims/shims/combos/5.js +151 -29
  31. data/vendor/assets/javascripts/webshims/shims/combos/6.js +152 -31
  32. data/vendor/assets/javascripts/webshims/shims/combos/7.js +199 -60
  33. data/vendor/assets/javascripts/webshims/shims/combos/8.js +197 -58
  34. data/vendor/assets/javascripts/webshims/shims/combos/9.js +218 -38
  35. data/vendor/assets/javascripts/webshims/shims/combos/97.js +1004 -0
  36. data/vendor/assets/javascripts/webshims/shims/combos/98.js +1283 -0
  37. data/vendor/assets/javascripts/webshims/shims/combos/99.js +204 -1248
  38. data/vendor/assets/javascripts/webshims/shims/dom-extend.js +66 -7
  39. data/vendor/assets/javascripts/webshims/shims/es5.js +4 -1
  40. data/vendor/assets/javascripts/webshims/shims/form-combat.js +3 -3
  41. data/vendor/assets/javascripts/webshims/shims/form-core.js +36 -27
  42. data/vendor/assets/javascripts/webshims/shims/form-datalist.js +1 -2
  43. data/vendor/assets/javascripts/webshims/shims/form-fixrangechange.js +137 -0
  44. data/vendor/assets/javascripts/webshims/shims/form-message.js +90 -13
  45. data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +129 -15
  46. data/vendor/assets/javascripts/webshims/shims/form-shim-extend.js +9 -10
  47. data/vendor/assets/javascripts/webshims/shims/form-shim-extend2.js +886 -985
  48. data/vendor/assets/javascripts/webshims/shims/form-validation.js +78 -174
  49. data/vendor/assets/javascripts/webshims/shims/form-validators.js +39 -26
  50. data/vendor/assets/javascripts/webshims/shims/forms-picker.js +45 -17
  51. data/vendor/assets/javascripts/webshims/shims/geolocation.js +10 -3
  52. data/vendor/assets/javascripts/webshims/shims/jme/b.js +71 -246
  53. data/vendor/assets/javascripts/webshims/shims/jme/c.js +133 -1002
  54. data/vendor/assets/javascripts/webshims/shims/jme/controls.css +62 -23
  55. data/vendor/assets/javascripts/webshims/shims/jme/controls.scss +73 -10
  56. data/vendor/assets/javascripts/webshims/shims/jme/mediacontrols-lazy.js +1117 -0
  57. data/vendor/assets/javascripts/webshims/shims/jme/p.js +603 -0
  58. data/vendor/assets/javascripts/webshims/shims/jpicker/jpicker.css +5 -2
  59. data/vendor/assets/javascripts/webshims/shims/mediaelement-core.js +4 -10
  60. data/vendor/assets/javascripts/webshims/shims/mediaelement-jaris.js +4 -1
  61. data/vendor/assets/javascripts/webshims/shims/range-ui.js +22 -14
  62. data/vendor/assets/javascripts/webshims/shims/styles/forms-ext.css +29 -344
  63. data/vendor/assets/javascripts/webshims/shims/styles/forms-picker.css +362 -0
  64. data/vendor/assets/javascripts/webshims/shims/styles/scss/forms-ext.scss +6 -483
  65. data/vendor/assets/javascripts/webshims/shims/styles/scss/forms-picker.scss +488 -0
  66. data/vendor/assets/javascripts/webshims/shims/styles/scss/shim-ext.scss +2 -0
  67. data/vendor/assets/javascripts/webshims/shims/styles/scss/shim.scss +10 -2
  68. data/vendor/assets/javascripts/webshims/shims/styles/shim.css +6 -2
  69. data/vendor/assets/javascripts/webshims/shims/swf/JarisFLVPlayer.swf +0 -0
  70. data/vendor/assets/javascripts/webshims/shims/track-ui.js +8 -1
  71. data/vendor/assets/javascripts/webshims/shims/track.js +66 -83
  72. metadata +12 -5
  73. data/vendor/assets/javascripts/webshims/shims/$ajax.js +0 -862
  74. data/vendor/assets/javascripts/webshims/shims/combos/24.js +0 -2087
@@ -2,7 +2,9 @@
2
2
  // vim: ts=4 sts=4 sw=4 expandtab
3
3
 
4
4
  (function () {
5
-
5
+ setTimeout(function(){
6
+ webshims.isReady('es5', true);
7
+ });
6
8
  /**
7
9
  * Brings an environment as close to ECMAScript 5 compliance
8
10
  * as is possible with the facilities of erstwhile engines.
@@ -1441,6 +1443,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
1441
1443
  };
1442
1444
 
1443
1445
  }
1446
+ webshims.isReady('es5', true);
1444
1447
  })(webshims.$, webshims);
1445
1448
 
1446
1449
 
@@ -2066,10 +2069,11 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2066
2069
  _create: function(){
2067
2070
  var i;
2068
2071
 
2069
- this.element.addClass(this.options.baseClass || 'ws-range').attr({role: 'slider'}).append('<span class="ws-range-min ws-range-progress" /><span class="ws-range-rail ws-range-track"><span class="ws-range-thumb"><span><span data-value="" data-valuetext="" /></span></span></span>');
2072
+ this.element.addClass(this.options.baseClass || 'ws-range ws-input').attr({role: 'slider'}).append('<span class="ws-range-rail ws-range-track"><span class="ws-range-min ws-range-progress" /><span class="ws-range-thumb"><span><span data-value="" data-valuetext="" /></span></span></span>');
2070
2073
  this.trail = $('.ws-range-track', this.element);
2071
2074
  this.range = $('.ws-range-progress', this.element);
2072
2075
  this.thumb = $('.ws-range-thumb', this.trail);
2076
+ this.thumbValue = $('span[data-value]', this.thumb);
2073
2077
 
2074
2078
  this.updateMetrics();
2075
2079
 
@@ -2120,8 +2124,8 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2120
2124
 
2121
2125
 
2122
2126
  if(!animate || !$.fn.animate){
2123
- this.thumb.css(thumbStyle);
2124
- this.range.css(rangeStyle);
2127
+ this.thumb[0].style[this.dirs.left] = thumbStyle[this.dirs.left];
2128
+ this.range[0].style[this.dirs.width] = rangeStyle[this.dirs.width];
2125
2129
  } else {
2126
2130
  if(typeof animate != 'object'){
2127
2131
  animate = {};
@@ -2144,20 +2148,19 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2144
2148
  _setValueMarkup: function(){
2145
2149
  var o = this.options;
2146
2150
  var textValue = o.textValue ? o.textValue(this.options.value) : o.options[o.value] || o.value;
2147
- this.element.attr({
2148
- 'aria-valuenow': this.options.value,
2149
- 'aria-valuetext': textValue
2150
- });
2151
- $('span[data-value]', this.thumb).attr({
2152
- 'data-value': this.options.value,
2153
- 'data-valuetext': textValue
2154
- });
2151
+
2152
+ this.element[0].setAttribute('aria-valuenow', this.options.value);
2153
+ this.element[0].setAttribute('aria-valuetext', textValue);
2154
+
2155
+ this.thumbValue[0].setAttribute('data-value', this.options.value);
2156
+ this.thumbValue[0].setAttribute('data-valuetext', textValue);
2157
+
2155
2158
  if(o.selectedOption){
2156
2159
  $(o.selectedOption).removeClass('ws-selected-option');
2157
2160
  o.selectedOption = null;
2158
2161
  }
2159
2162
  if(o.value in o.options){
2160
- o.selectedOption = $('[data-value="'+o.value+'"].ws-range-ticks').addClass('ws-selected-option');
2163
+ o.selectedOption = $('[data-value="'+o.value+'"].ws-range-ticks', this.trail).addClass('ws-selected-option');
2161
2164
  }
2162
2165
  },
2163
2166
  initDataList: function(){
@@ -2593,9 +2596,16 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2593
2596
  temp = this.element[this.dirs.innerHeight]();
2594
2597
  eS[this.dirs.marginTop] = ((elem[this.dirs.outerHeight]() - temp) / -2) + 'px';
2595
2598
  this.range[0].style[this.dirs.marginTop] = ((this.range[this.dirs.outerHeight]() - temp) / -2 ) +'px';
2599
+
2600
+ this.range[0].style[this.dirs.posLeft] = outerWidth +'px';
2601
+
2596
2602
  outerWidth *= -1;
2603
+
2604
+ this.range[0].style[this.dirs.paddingRight] = outerWidth +'px';
2597
2605
  this.trail[0].style[this.dirs.left] = outerWidth +'px';
2598
2606
  this.trail[0].style[this.dirs.right] = outerWidth +'px';
2607
+
2608
+
2599
2609
  }
2600
2610
  }
2601
2611
  },
@@ -2604,14 +2614,15 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2604
2614
  this.vertical = (width && this.element.innerHeight() - width > 10);
2605
2615
 
2606
2616
  this.dirs = this.vertical ?
2607
- {mouse: 'pageY', pos: 'top', min: 'max', max: 'min', left: 'top', right: 'bottom', width: 'height', innerWidth: 'innerHeight', innerHeight: 'innerWidth', outerWidth: 'outerHeight', outerHeight: 'outerWidth', marginTop: 'marginLeft', marginLeft: 'marginTop'} :
2608
- {mouse: 'pageX', pos: 'left', min: 'min', max: 'max', left: 'left', right: 'right', width: 'width', innerWidth: 'innerWidth', innerHeight: 'innerHeight', outerWidth: 'outerWidth', outerHeight: 'outerHeight', marginTop: 'marginTop', marginLeft: 'marginLeft'}
2617
+ {mouse: 'pageY', pos: 'top', posLeft: 'bottom', paddingRight: 'paddingTop', min: 'max', max: 'min', left: 'top', right: 'bottom', width: 'height', innerWidth: 'innerHeight', innerHeight: 'innerWidth', outerWidth: 'outerHeight', outerHeight: 'outerWidth', marginTop: 'marginLeft', marginLeft: 'marginTop'} :
2618
+ {mouse: 'pageX', pos: 'left', posLeft: 'left', paddingRight: 'paddingRight', min: 'min', max: 'max', left: 'left', right: 'right', width: 'width', innerWidth: 'innerWidth', innerHeight: 'innerHeight', outerWidth: 'outerWidth', outerHeight: 'outerHeight', marginTop: 'marginTop', marginLeft: 'marginLeft'}
2609
2619
  ;
2610
2620
  if(!this.vertical && this.element.css('direction') == 'rtl'){
2611
2621
  this.isRtl = true;
2612
2622
  this.dirs.left = 'right';
2613
2623
  this.dirs.right = 'left';
2614
2624
  this.dirs.marginLeft = 'marginRight';
2625
+ this.dirs.posLeft = 'right';
2615
2626
  }
2616
2627
  this.element
2617
2628
  [this.vertical ? 'addClass' : 'removeClass']('vertical-range')
@@ -2864,6 +2875,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
2864
2875
  options.addZero = addZero;
2865
2876
  webshims.loader.addModule('forms-picker', {
2866
2877
  noAutoCallback: true,
2878
+ css: 'styles/forms-picker.css',
2867
2879
  options: options
2868
2880
  });
2869
2881
  webshims.loader.addModule('color-picker', {
@@ -3036,8 +3048,40 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3036
3048
 
3037
3049
 
3038
3050
  var formatVal = {
3039
- number: function(val, o){
3040
- return (val+'').replace(/\,/g, '').replace(/\./, curCfg.numberFormat['.']);
3051
+ number: function(val, o, noCorrect){
3052
+ var parts, len, i, isNegative;
3053
+ if(o && o.nogrouping){
3054
+ return (val+'').replace(/\,/g, '').replace(/\./, curCfg.numberFormat['.']);
3055
+ }
3056
+
3057
+ val += '';
3058
+
3059
+ if(val.charAt(0) == '-'){
3060
+ isNegative = true;
3061
+ val = val.replace('-', '');
3062
+ }
3063
+ parts = val.split('.');
3064
+ len = parts[0].length;
3065
+ i = len - 1;
3066
+
3067
+ val = "";
3068
+ while(i >= 0) {
3069
+ val = parts[0].charAt(i) + val;
3070
+ if (i > 0 && (len - i) % 3 === 0) {
3071
+ val = curCfg.numberFormat[','] + val;
3072
+ }
3073
+ --i;
3074
+ }
3075
+ if(parts[1] != null){
3076
+ if(!noCorrect){
3077
+ parts[1] = parts[1].replace(/\-/g, '0');
3078
+ }
3079
+ val += curCfg.numberFormat['.'] + parts[1];
3080
+ }
3081
+ if(isNegative){
3082
+ val = '-'+val;
3083
+ }
3084
+ return val;
3041
3085
  },
3042
3086
  time: function(val){
3043
3087
  var fVal;
@@ -3116,10 +3160,10 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3116
3160
  return ret;
3117
3161
  }
3118
3162
  };
3119
-
3163
+
3120
3164
  var parseVal = {
3121
3165
  number: function(val){
3122
- return (val+'').replace(curCfg.numberFormat[','], '').replace(curCfg.numberFormat['.'], '.');
3166
+ return (val+'').split(curCfg.numberFormat[',']).join('').replace(curCfg.numberFormat['.'], '.');
3123
3167
  },
3124
3168
  // week: function(val){
3125
3169
  // return val;
@@ -3188,7 +3232,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3188
3232
  val = val.split(curCfg.dFormat);
3189
3233
  }
3190
3234
  if(val.length == 3 && val[0] && val[1] && val[2] && (!noCorrect || (val[obj.yy].length > 3 && val[obj.mm].length == 2 && val[obj.dd].length == 2))){
3191
- if(val[obj.mm] > 12 && val[obj.dd] < 13){
3235
+ if(!opts.noDayMonthSwitch && val[obj.mm] > 12 && val[obj.dd] < 13){
3192
3236
  tmp = val[obj.dd];
3193
3237
  val[obj.dd] = val[obj.mm];
3194
3238
  val[obj.mm] = tmp;
@@ -3621,7 +3665,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3621
3665
  },
3622
3666
  toFixed: function(val, force){
3623
3667
  var o = this.options;
3624
- if(o.toFixed && o.type == 'number' && val && this.valueAsNumber && (force || !this.element.is(':focus')) && (!o.fixOnlyFloat || (this.valueAsNumber % 1)) && !$(this.orig).is(':invalid')){
3668
+ if(o.toFixed && o.type == 'number' && val && !isNaN(this.valueAsNumber) && (force || !this.element.is(':focus')) && (!o.fixOnlyFloat || (this.valueAsNumber % 1))){
3625
3669
  val = formatVal[this.type](this.valueAsNumber.toFixed(o.toFixed), this.options);
3626
3670
  }
3627
3671
  return val;
@@ -3630,7 +3674,8 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3630
3674
 
3631
3675
  ['defaultValue', 'value'].forEach(function(name){
3632
3676
  var isValue = name == 'value';
3633
- spinBtnProto[name] = function(val, force){
3677
+ spinBtnProto[name] = function(val, force, isLive){
3678
+ var selectionEnd;
3634
3679
  if(!this._init || force || this.options[name] !== val){
3635
3680
  if(isValue){
3636
3681
  this._beforeValue(val);
@@ -3649,7 +3694,14 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3649
3694
  }
3650
3695
  });
3651
3696
  } else {
3652
- this.element.prop(name, this.toFixed(val));
3697
+ val = this.toFixed(val);
3698
+ if(isLive && this._getSelectionEnd){
3699
+ selectionEnd = this._getSelectionEnd(val);
3700
+ }
3701
+ this.element.prop(name, val);
3702
+ if(selectionEnd){
3703
+ this.element.prop('selectionEnd', selectionEnd);
3704
+ }
3653
3705
  }
3654
3706
  this._propertyChange(name);
3655
3707
  this.mirrorValidity();
@@ -3677,7 +3729,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3677
3729
  $.fn.wsBaseWidget = function(opts){
3678
3730
  opts = $.extend({}, opts);
3679
3731
  return this.each(function(){
3680
- $.webshims.objectCreate(wsWidgetProto, {
3732
+ webshims.objectCreate(wsWidgetProto, {
3681
3733
  element: {
3682
3734
  value: $(this)
3683
3735
  }
@@ -3692,7 +3744,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3692
3744
  monthNames: 'monthNamesShort'
3693
3745
  }, opts);
3694
3746
  return this.each(function(){
3695
- $.webshims.objectCreate(spinBtnProto, {
3747
+ webshims.objectCreate(spinBtnProto, {
3696
3748
  element: {
3697
3749
  value: $(this)
3698
3750
  }
@@ -3701,12 +3753,80 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3701
3753
  };
3702
3754
 
3703
3755
  $.fn.spinbtnUI.wsProto = spinBtnProto;
3756
+
3757
+ webshims._format = formatVal;
3704
3758
 
3705
3759
  })();
3706
-
3760
+
3761
+
3762
+ $.fn.wsTouchClick = (function(){
3763
+ var supportsTouchaction = ('touchAction' in document.documentElement.style);
3764
+ var addTouch = !supportsTouchaction && ('ontouchstart' in window) && document.addEventListener;
3765
+ return function(target, handler){
3766
+ var touchData, touchEnd, touchStart;
3767
+
3768
+ if(addTouch){
3769
+
3770
+ touchEnd = function(e){
3771
+ var ret, touch;
3772
+ e = e.originalEvent || {};
3773
+ $(this).off('touchend', touchEnd);
3774
+ var changedTouches = e.changedTouches || e.touches;
3775
+ if(!touchData || !changedTouches || changedTouches.length != 1){
3776
+ return;
3777
+ }
3778
+
3779
+ touch = changedTouches[0];
3780
+ if(Math.abs(touchData.x - touch.pageX) > 40 || Math.abs(touchData.y - touch.pageY) > 40 || Date.now() - touchData.now > 600){
3781
+ return;
3782
+ }
3783
+ e.preventDefault();
3784
+ ret = handler.apply(this, arguments);
3785
+
3786
+ return ret;
3787
+ };
3788
+
3789
+ touchStart = function(e){
3790
+ var touch, elemTarget;
3791
+
3792
+
3793
+ if((!e || e.touches.length != 1)){
3794
+ return;
3795
+ }
3796
+ touch = e.touches[0];
3797
+ elemTarget = target ? $(touch.target).closest(target) : $(this);
3798
+ if(!elemTarget.length){
3799
+ return;
3800
+ }
3801
+ touchData = {
3802
+ x: touch.pageX,
3803
+ y: touch.pageY,
3804
+ now: Date.now()
3805
+ };
3806
+ elemTarget.on('touchend', touchEnd);
3807
+ };
3808
+
3809
+ this.each(function(){
3810
+ this.addEventListener('touchstart', touchStart, true);
3811
+ });
3812
+ } else if(supportsTouchaction){
3813
+ this.css('touch-action', 'manipulation');
3814
+ }
3815
+
3816
+ if($.isFunction(target)){
3817
+ handler = target;
3818
+ target = false;
3819
+ this.on('click', handler);
3820
+ } else {
3821
+ this.on('click', target, handler);
3822
+ }
3823
+ return this;
3824
+ };
3825
+ })();
3826
+
3707
3827
  (function(){
3708
3828
  var picker = {};
3709
-
3829
+ var assumeVirtualKeyBoard = Modernizr.touchevents || Modernizr.touch || (/android|iphone|ipad|ipod|blackberry|iemobile/i.test(navigator.userAgent.toLowerCase()));
3710
3830
  webshims.inlinePopover = {
3711
3831
  _create: function(){
3712
3832
  this.element = $('<div class="ws-inline-picker"><div class="ws-po-box" /></div>').data('wspopover', this);
@@ -3797,7 +3917,11 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3797
3917
  cancel: function(val, popover, data){
3798
3918
  if(!data.options.inlinePicker){
3799
3919
  popover.stopOpen = true;
3800
- data.element.getShadowFocusElement().trigger('focus');
3920
+ if(assumeVirtualKeyBoard){
3921
+ $('button', data.buttonWrapper).trigger('focus');
3922
+ } else {
3923
+ data.element.getShadowFocusElement().trigger('focus');
3924
+ }
3801
3925
  setTimeout(function(){
3802
3926
  popover.stopOpen = false;
3803
3927
  }, 9);
@@ -3888,6 +4012,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3888
4012
 
3889
4013
 
3890
4014
  picker._common = function(data){
4015
+ if(data.options.nopicker){return;}
3891
4016
  var options = data.options;
3892
4017
  var popover = webshims.objectCreate(options.inlinePicker ? webshims.inlinePopover : webshims.wsPopover, {}, $.extend(options.popover || {}, {prepareFor: options.inlinePicker ? data.buttonWrapper : data.element}));
3893
4018
  var opener = $('<button type="button" class="ws-popover-opener"><span /></button>').appendTo(data.buttonWrapper);
@@ -3957,7 +4082,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
3957
4082
  }
3958
4083
 
3959
4084
 
3960
- opener.on({click: open});
4085
+ opener.wsTouchClick(open);
3961
4086
 
3962
4087
  if(options.inlinePicker){
3963
4088
  popover.openedByFocus = true;
@@ -4150,7 +4275,7 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
4150
4275
  var init, parent, lastWidth, left, right, isRtl, hasButtons;
4151
4276
  var oriStyleO = data.orig.style;
4152
4277
  var styleO = data.element[0].style;
4153
- if($.support.boxSizing == null && !$.isReady){
4278
+ if($.support.boxSizing == null){
4154
4279
  $(function(){
4155
4280
  parent = data.orig.parentNode;
4156
4281
  });
@@ -225,7 +225,9 @@ webshims.isReady('swfmini', true);
225
225
  // vim: ts=4 sts=4 sw=4 expandtab
226
226
 
227
227
  (function () {
228
-
228
+ setTimeout(function(){
229
+ webshims.isReady('es5', true);
230
+ });
229
231
  /**
230
232
  * Brings an environment as close to ECMAScript 5 compliance
231
233
  * as is possible with the facilities of erstwhile engines.
@@ -1664,10 +1666,69 @@ if((!advancedObjectProperties || !Object.create || !Object.defineProperties || !
1664
1666
  };
1665
1667
 
1666
1668
  }
1669
+ webshims.isReady('es5', true);
1667
1670
  })(webshims.$, webshims);
1668
1671
 
1669
1672
 
1670
- ;//DOM-Extension helper
1673
+ ;
1674
+ //this might was already extended by ES5 shim feature
1675
+ (function($){
1676
+ "use strict";
1677
+ var webshims = window.webshims;
1678
+ if(webshims.defineProperties){return;}
1679
+ var defineProperty = 'defineProperty';
1680
+ var has = Object.prototype.hasOwnProperty;
1681
+ var descProps = ['configurable', 'enumerable', 'writable'];
1682
+ var extendUndefined = function(prop){
1683
+ for(var i = 0; i < 3; i++){
1684
+ if(prop[descProps[i]] === undefined && (descProps[i] !== 'writable' || prop.value !== undefined)){
1685
+ prop[descProps[i]] = true;
1686
+ }
1687
+ }
1688
+ };
1689
+
1690
+ var extendProps = function(props){
1691
+ if(props){
1692
+ for(var i in props){
1693
+ if(has.call(props, i)){
1694
+ extendUndefined(props[i]);
1695
+ }
1696
+ }
1697
+ }
1698
+ };
1699
+
1700
+ if(Object.create){
1701
+ webshims.objectCreate = function(proto, props, opts){
1702
+ extendProps(props);
1703
+ var o = Object.create(proto, props);
1704
+ if(opts){
1705
+ o.options = $.extend(true, {}, o.options || {}, opts);
1706
+ opts = o.options;
1707
+ }
1708
+ if(o._create && $.isFunction(o._create)){
1709
+ o._create(opts);
1710
+ }
1711
+ return o;
1712
+ };
1713
+ }
1714
+
1715
+ if(Object[defineProperty]){
1716
+ webshims[defineProperty] = function(obj, prop, desc){
1717
+ extendUndefined(desc);
1718
+ return Object[defineProperty](obj, prop, desc);
1719
+ };
1720
+ }
1721
+ if(Object.defineProperties){
1722
+ webshims.defineProperties = function(obj, props){
1723
+ extendProps(props);
1724
+ return Object.defineProperties(obj, props);
1725
+ };
1726
+ }
1727
+ webshims.getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1728
+
1729
+ webshims.getPrototypeOf = Object.getPrototypeOf;
1730
+ })(window.webshims.$);
1731
+ //DOM-Extension helper
1671
1732
  webshims.register('dom-extend', function($, webshims, window, document, undefined){
1672
1733
  "use strict";
1673
1734
  var supportHrefNormalized = !('hrefNormalized' in $.support) || $.support.hrefNormalized;
@@ -2302,6 +2363,13 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
2302
2363
  this.width = docObserve.getWidth();
2303
2364
  setInterval(this.test, 999);
2304
2365
  $(this.test);
2366
+ if($.support.boxSizing == null){
2367
+ $(function(){
2368
+ if($.support.boxSizing){
2369
+ docObserve.handler({type: 'boxsizing'});
2370
+ }
2371
+ });
2372
+ }
2305
2373
  webshims.ready('WINDOWLOAD', this.test);
2306
2374
  $(document).on('updatelayout.webshim pageinit popupafteropen panelbeforeopen tabsactivate collapsibleexpand shown.bs.modal shown.bs.collapse slid.bs.carousel', this.handler);
2307
2375
  $(window).on('resize', this.handler);
@@ -2313,13 +2381,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
2313
2381
  webshims.docObserve = function(){
2314
2382
  webshims.ready('DOM', function(){
2315
2383
  docObserve.start();
2316
- if($.support.boxSizing == null){
2317
- $(function(){
2318
- if($.support.boxSizing){
2319
- docObserve.handler({type: 'boxsizing'});
2320
- }
2321
- });
2322
- }
2384
+
2323
2385
  });
2324
2386
  };
2325
2387
  return function(nativeElem, shadowElem, opts){
@@ -2816,7 +2878,6 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
2816
2878
 
2817
2879
  var wsCfg = webshims.cfg;
2818
2880
  var options = wsCfg.mediaelement;
2819
- var hasFullTrackSupport;
2820
2881
  var hasSwf;
2821
2882
  if(!options){
2822
2883
  webshims.error("mediaelement wasn't implemented but loaded");
@@ -2858,11 +2919,9 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
2858
2919
  }
2859
2920
  })();
2860
2921
  }
2861
- hasFullTrackSupport = Modernizr.track && !bugs.track;
2862
2922
 
2863
2923
  webshims.register('mediaelement-core', function($, webshims, window, document, undefined, options){
2864
2924
  hasSwf = swfmini.hasFlashPlayerVersion('10.0.3');
2865
- $('html').addClass(hasSwf ? 'swf' : 'no-swf');
2866
2925
  var mediaelement = webshims.mediaelement;
2867
2926
 
2868
2927
  mediaelement.parseRtmp = function(data){
@@ -3241,6 +3300,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
3241
3300
  if(hasNative && (!data || data.isActive == 'html5') && supLoad.prop._supvalue){
3242
3301
  supLoad.prop._supvalue.apply(this, arguments);
3243
3302
  }
3303
+ if(!loadTrackUi.loaded && $('track', this).length){
3304
+ loadTrackUi();
3305
+ }
3244
3306
  $(this).triggerHandler('wsmediareload');
3245
3307
  }
3246
3308
  }
@@ -3311,13 +3373,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
3311
3373
  }
3312
3374
  };
3313
3375
 
3314
- if(hasFullTrackSupport){
3315
- webshims.defineProperty(TextTrack.prototype, 'shimActiveCues', {
3316
- get: function(){
3317
- return this._shimActiveCues || this.activeCues;
3318
- }
3319
- });
3320
- }
3376
+
3321
3377
  //set native implementation ready, before swf api is retested
3322
3378
  if(hasNative){
3323
3379
  webshims.isReady('mediaelement-core', true);
@@ -4087,7 +4143,7 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
4087
4143
  box.insertBefore(elem);
4088
4144
 
4089
4145
  if(hasNative){
4090
- $.extend(data, {volume: $.prop(elem, 'volume'), muted: $.prop(elem, 'muted')});
4146
+ $.extend(data, {volume: $.prop(elem, 'volume'), muted: $.prop(elem, 'muted'), paused: $.prop(elem, 'paused')});
4091
4147
  }
4092
4148
 
4093
4149
  webshims.addShadowDom(elem, box);
@@ -4125,6 +4181,9 @@ webshims.register('mediaelement-core', function($, webshims, window, document, u
4125
4181
  if(jaris.type == 'ready'){
4126
4182
  var onReady = function(){
4127
4183
  if(data.api){
4184
+ if(!data.paused){
4185
+ data.api.api_play();
4186
+ }
4128
4187
  if(bufferSrc(elem)){
4129
4188
  data.api.api_preload();
4130
4189
  }