전환 시 '빈칸' 보정, 설명 추가

This commit is contained in:
2018-09-24 04:23:47 +09:00
parent 34083c1798
commit 5400eb0e32
2 changed files with 9 additions and 4 deletions
@@ -23,7 +23,7 @@
'ko-KR': {
imageFlip: {
edit: '이미지 전환',
flipLabel: '대체 이미지'
flipLabel: '대체 이미지( , 로 구분)'
}
},
});
@@ -95,7 +95,7 @@
this.show = function () {
var $img = $($editable.data('target'));
console.log($img);
var imgInfo = {
imgDom: $img,
flip: $img.data('flip'),
@@ -104,7 +104,6 @@
ui.hideDialog(self.$dialog);
var $img = imgInfo.imgDom;
console.log(imgInfo.flip);
if (imgInfo.flip) {
$img.attr('data-flip', imgInfo.flip);
}
+7 -1
View File
@@ -161,7 +161,13 @@ function activeFlip($obj){
function activeFlipItem($img){
var imageList = [];
imageList.push($img.attr('src'));
imageList = imageList.concat($img.data('flip').split(','));
$.each($img.data('flip').split(','), function(idx, value){
var value = $.trim(value);
if(!value){
return true;
}
imageList.push(value);
});
if(imageList.length <= 1){
return;
}