mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
PHRAS-899 - fix loadImage dependency in statusbit edition and feed edition
This commit is contained in:
@@ -33,6 +33,10 @@
|
||||
sequentialUploads: true,
|
||||
add: function (e, data) {
|
||||
$('#upload-error').empty();
|
||||
require([
|
||||
"blueimp.loadimage"
|
||||
], function (loadImage) {
|
||||
|
||||
$.each(data.files, function (index, file) {
|
||||
var fileType = /^image\/(gif|jpeg|png)$/;
|
||||
if(typeof loadImage == 'function' && fileType.test(file.type)){
|
||||
@@ -59,6 +63,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
done: function (e, data) {
|
||||
return false;
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
var selected_files = [];
|
||||
|
||||
@@ -182,6 +183,10 @@ $(document).ready(function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
require([
|
||||
"blueimp.loadimage"
|
||||
], function (loadImage) {
|
||||
|
||||
loadImage(file,function(img){
|
||||
$('input[name='+data.paramName[0]+']').closest('.controls').find('.thumbnail').empty().append(img);
|
||||
}, {
|
||||
@@ -193,6 +198,7 @@ $(document).ready(function(){
|
||||
minHeight: 16
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
selected_files.push(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user