|
@@ -137,7 +137,7 @@ var $=require('jquery'); |
|
@@ -137,7 +137,7 @@ var $=require('jquery'); |
137
|
'<div class="edui-image-upload%%">' +
|
137
|
'<div class="edui-image-upload%%">' +
|
138
|
'<span class="edui-image-icon"></span>' +
|
138
|
'<span class="edui-image-icon"></span>' +
|
139
|
'<form class="edui-image-form" method="post" enctype="multipart/form-data" target="up">' +
|
139
|
'<form class="edui-image-form" method="post" enctype="multipart/form-data" target="up">' +
|
140
|
- '<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"/>' +
|
140
|
+ '<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"/>' +
|
141
|
'</form>' +
|
141
|
'</form>' +
|
142
|
|
142
|
|
143
|
'</div>',
|
143
|
'</div>',
|
|
@@ -182,9 +182,12 @@ var $=require('jquery'); |
|
@@ -182,9 +182,12 @@ var $=require('jquery'); |
182
|
uploadComplete: function(r){
|
182
|
uploadComplete: function(r){
|
183
|
var me = this;
|
183
|
var me = this;
|
184
|
try{
|
184
|
try{
|
185
|
- r=r.match(/\{.*\}/g)[0];
|
185
|
+ r=r.match(/\[.*\]/g)[0];
|
186
|
var json = eval('('+r+')');
|
186
|
var json = eval('('+r+')');
|
187
|
- Base.callback(me.editor, me.dialog, json.url, json.state);
|
187
|
+ for (var i = 0; i < json.length; i++) {
|
|
|
188
|
+ Base.callback(me.editor, me.dialog, json[i].url, json[i].state);
|
|
|
189
|
+ }
|
|
|
190
|
+
|
188
|
}catch (e){
|
191
|
}catch (e){
|
189
|
var lang = me.editor.getLang('image');
|
192
|
var lang = me.editor.getLang('image');
|
190
|
Base.callback(me.editor, me.dialog, '', (lang && lang.uploadError) || 'Error!');
|
193
|
Base.callback(me.editor, me.dialog, '', (lang && lang.uploadError) || 'Error!');
|
|
@@ -193,7 +196,7 @@ var $=require('jquery'); |
|
@@ -193,7 +196,7 @@ var $=require('jquery'); |
193
|
submit: function (callback) {
|
196
|
submit: function (callback) {
|
194
|
|
197
|
|
195
|
var me = this,
|
198
|
var me = this,
|
196
|
- 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">'),
|
199
|
+ 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">'),
|
197
|
input = input[0];
|
200
|
input = input[0];
|
198
|
|
201
|
|
199
|
$(me.dialog).delegate( ".edui-image-file", "change", function ( e ) {
|
202
|
$(me.dialog).delegate( ".edui-image-file", "change", function ( e ) {
|
|
@@ -405,8 +408,13 @@ var $=require('jquery'); |
|
@@ -405,8 +408,13 @@ var $=require('jquery'); |
405
|
}
|
408
|
}
|
406
|
});
|
409
|
});
|
407
|
$(document).on("click",".edui-image-product .edui-product-content .edui-image-pic",function(){
|
410
|
$(document).on("click",".edui-image-product .edui-product-content .edui-image-pic",function(){
|
408
|
- $(".edui-image-product .edui-product-content .edui-image-pic").removeClass("active-product");
|
|
|
409
|
- $(this).addClass("active-product");
|
411
|
+ if ($(this).hasClass("active-product")) {
|
|
|
412
|
+ $(this).removeClass("active-product");
|
|
|
413
|
+ }
|
|
|
414
|
+ else {
|
|
|
415
|
+ $(this).addClass("active-product");
|
|
|
416
|
+ }
|
|
|
417
|
+
|
410
|
});
|
418
|
});
|
411
|
}
|
419
|
}
|
412
|
}
|
420
|
}
|