vendor/assets/javascripts/webshims/shims/combos/11.js in webshims-rails-1.10.11 vs vendor/assets/javascripts/webshims/shims/combos/11.js in webshims-rails-1.11.1

- old
+ new

@@ -175,11 +175,21 @@ max: function(val){ this.options.max = retDefault(val, 100); this.value(this.options.value, true); }, step: function(val){ - this.options.step = val == 'any' ? 'any' : retDefault(val, 1); + var o = this.options; + var step = val == 'any' ? 'any' : retDefault(val, 1); + + if(o.stepping){ + if(step != 'any' && o.stepping % step){ + webshims.error('wrong stepping value for type range:'+ (o.stepping % step)); + } else { + step = o.stepping; + } + } + o.step = step; this.value(this.options.value); }, normalizeVal: function(val){ var valModStep, alignValue, step; @@ -896,10 +906,12 @@ tmp = fVal[1]; fVal[1] = fVal[0]; fVal[0] = tmp; } val = this.date(fVal[0], o) +'T'+ this.time(fVal[1], o); + } else if (fVal.length == 3) { + val = this.date(fVal[0], o) +'T'+ this.time(fVal[1]+fVal[2], o); } return val; }, time: function(val){ var fVal; @@ -1752,11 +1764,13 @@ } }; picker._actions = { changeInput: function(val, popover, data){ - picker._actions.cancel(val, popover, data); + if(!data.options.noChangeDismiss){ + picker._actions.cancel(val, popover, data); + } data.setChange(val); }, cancel: function(val, popover, data){ if(!data.options.inlinePicker){ popover.stopOpen = true; @@ -2299,10 +2313,10 @@ return data; } }); } - var isStupid = modernizrInputTypes.number && navigator.userAgent.indexOf('Touch') == -1 && (/MSIE 1[0|1]\.\d/.test(navigator.userAgent) || /Trident\/7\.0/.test(navigator.userAgent)); + var isStupid = modernizrInputTypes.number && navigator.userAgent.indexOf('Touch') == -1 && ((/MSIE 1[0|1]\.\d/.test(navigator.userAgent)) || (/Trident\/7\.0/.test(navigator.userAgent))); ['number', 'time', 'month', 'date', 'color', 'datetime-local'].forEach(function(name){ if(!modernizrInputTypes[name] || options.replaceUI || (name == 'number' && isStupid)){ extendType(name, { _create: function(opts, set){ if(opts.monthSelect){