...
|
...
|
@@ -137,7 +137,7 @@ var $=require('jquery'); |
|
|
'<div class="edui-image-upload%%">' +
|
|
|
'<span class="edui-image-icon"></span>' +
|
|
|
'<form class="edui-image-form" method="post" enctype="multipart/form-data" target="up">' +
|
|
|
'<input style=\"filter: alpha(opacity=0);\" class="edui-image-file" type="file" hidefocus name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/>' +
|
|
|
'<input style=\"filter: alpha(opacity=0);\" class="edui-image-file" type="file" multiple hidefocus name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/>' +
|
|
|
'</form>' +
|
|
|
|
|
|
'</div>',
|
...
|
...
|
@@ -182,9 +182,12 @@ var $=require('jquery'); |
|
|
uploadComplete: function(r){
|
|
|
var me = this;
|
|
|
try{
|
|
|
r=r.match(/\{.*\}/g)[0];
|
|
|
r=r.match(/\[.*\]/g)[0];
|
|
|
var json = eval('('+r+')');
|
|
|
Base.callback(me.editor, me.dialog, json.url, json.state);
|
|
|
for (var i = 0; i < json.length; i++) {
|
|
|
Base.callback(me.editor, me.dialog, json[i].url, json[i].state);
|
|
|
}
|
|
|
|
|
|
}catch (e){
|
|
|
var lang = me.editor.getLang('image');
|
|
|
Base.callback(me.editor, me.dialog, '', (lang && lang.uploadError) || 'Error!');
|
...
|
...
|
@@ -193,7 +196,7 @@ var $=require('jquery'); |
|
|
submit: function (callback) {
|
|
|
|
|
|
var me = this,
|
|
|
input = $( '<input style="filter: alpha(opacity=0);" class="edui-image-file" type="file" hidefocus="" name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp">'),
|
|
|
input = $( '<input style="filter: alpha(opacity=0);" class="edui-image-file" type="file" multiple hidefocus="" name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp">'),
|
|
|
input = input[0];
|
|
|
|
|
|
$(me.dialog).delegate( ".edui-image-file", "change", function ( e ) {
|
...
|
...
|
@@ -405,8 +408,13 @@ var $=require('jquery'); |
|
|
}
|
|
|
});
|
|
|
$(document).on("click",".edui-image-product .edui-product-content .edui-image-pic",function(){
|
|
|
$(".edui-image-product .edui-product-content .edui-image-pic").removeClass("active-product");
|
|
|
$(this).addClass("active-product");
|
|
|
if ($(this).hasClass("active-product")) {
|
|
|
$(this).removeClass("active-product");
|
|
|
}
|
|
|
else {
|
|
|
$(this).addClass("active-product");
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
...
|
...
|
|