vendor/assets/javascripts/webshims/shims/combos/27.js in webshims-rails-1.14.1 vs vendor/assets/javascripts/webshims/shims/combos/27.js in webshims-rails-1.14.3
- old
+ new
@@ -581,10 +581,11 @@
if(labels.length){
$.attr(this, 'aria-labelledby', labels.join(' '));
} else {
webshims.info("you should use label elements for your prgogress elements");
}
+ $(this).addClass('ws-style');
if($(this).css('direction') == 'rtl'){
$(this).addClass('ws-is-rtl');
}
updateProgress.isInChange = 'max';
updateProgress(this);
@@ -1198,11 +1199,11 @@
input.off('focusout', unbind).off('keyup keypress keydown paste cut', extraTest).off('input change updateInput triggerinput', trigger);
}
}
- ;
+ ;
var observe = function(newInput){
unbind();
input = newInput;
lastVal = input.prop('value');
@@ -1337,16 +1338,10 @@
if(fileList && fileList.map){
return fileList.map(getFileNames).join(', ');
}
return inputValueDesc.prop._supget.call(this);
- },
- set: function(val){
- if(val === '' && this.type == 'file' && $(this).hasClass('ws-filereader')){
- webshim.data(this, 'fileList', []);
- }
- inputValueDesc.prop._supset.call(this);
}
}
}
);
var shimMoxiePath = webshim.cfg.basePath+'moxie/';
@@ -1540,14 +1535,14 @@
if(!featureOptions.uploadprogress){
featureOptions.uploadprogress = 'onuploadprogress';
}
if(!featureOptions.swfpath){
- featureOptions.swfpath = shimMoxiePath+'flash/Moxie.cdn.swf';
+ featureOptions.swfpath = shimMoxiePath+'flash/Moxie.min.swf';
}
if(!featureOptions.xappath){
- featureOptions.xappath = shimMoxiePath+'silverlight/Moxie.cdn.xap';
+ featureOptions.xappath = shimMoxiePath+'silverlight/Moxie.min.xap';
}
if($.support.cors !== false || !window.XDomainRequest){
delete transports.xdomain;
}
@@ -1593,10 +1588,17 @@
if(picker){
picker.disable(boolVal);
}
});
+ webshim.onNodeNamesPropertyModify('input', 'value', function(value, boolVal, type){
+ if(value === '' && this.type == 'file' && $(this).hasClass('ws-filereader')){
+ webshim.data(this, 'fileList', []);
+ }
+ });
+
+
window.FileReader = notReadyYet;
window.FormData = notReadyYet;
webshim.ready('moxie', function(){
var wsMimes = 'application/xml,xml';
moxie = window.moxie;
@@ -1627,10 +1629,10 @@
for(i = 0, len = appendData.length; i < appendData.length; i++){
inputName = appendData[i].name;
if(inputName && !$(appendData[i]).is(':disabled')){
files = $.prop(appendData[i], 'files') || [];
if(files.length){
- if(files.length > 1){
+ if(files.length > 1 || (moxieData.hasBlob && moxieData.hasBlob())){
webshim.error('FormData shim can only handle one file per ajax. Use multiple ajax request. One per file.');
}
for(fileI = 0, fileLen = files.length; fileI < fileLen; fileI++){
moxieData.append(inputName, files[fileI]);
}