...
|
...
|
@@ -8,7 +8,8 @@ var ENMA = { |
|
|
attachType: {
|
|
|
1: "图片",
|
|
|
2: "视频",
|
|
|
3: "文本"
|
|
|
3: "文本",
|
|
|
4: "新图片"
|
|
|
},
|
|
|
dia:{
|
|
|
1:"img",
|
...
|
...
|
@@ -43,7 +44,10 @@ var g = new common.grid({ |
|
|
return "<img src='" + item.attachUrl + "' style='width:120px;height:80px' />";
|
|
|
} else if (item.attachType == 2) {
|
|
|
return "<video src='" + item.attachUrl + "' controls></video>";
|
|
|
} else {
|
|
|
} else if (item.attachType == 4) {
|
|
|
return "<img src='" + item.attachUrl + "' style='width:120px;height:80px'/>";
|
|
|
}
|
|
|
else {
|
|
|
return item.intro;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -388,13 +392,8 @@ e.on("validate", function() { |
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e.init();
|
|
|
|
|
|
|
|
|
|
|
|
//添加修改
|
|
|
$('.limit-add-btn').click(function(option) {
|
|
|
isSave = true;
|
...
|
...
|
@@ -481,6 +480,36 @@ var Bll = { |
|
|
});
|
|
|
a.init();
|
|
|
},
|
|
|
imgBlank: function(title, item, index) {
|
|
|
common.dialog.confirm(title, common.util.__template($("#picDialogTemp").html(), item), function() {
|
|
|
var _html = $.trim($("#imgText").val());
|
|
|
|
|
|
if (_html) {
|
|
|
if (item.attachType) {
|
|
|
//修改
|
|
|
g.__rows[index].attachUrl = _html;
|
|
|
} else {
|
|
|
//添加
|
|
|
g.__rows.push({
|
|
|
"attachType":4,
|
|
|
"attachUrl": _html,
|
|
|
"isDefault": 0,
|
|
|
"attachName": $("#attachName").val()
|
|
|
});
|
|
|
}
|
|
|
|
|
|
g.reload();
|
|
|
e1.init();
|
|
|
}
|
|
|
});
|
|
|
var a = new common.edit("#upload-wrapper",ENMA.bucket);
|
|
|
a.on("callback", function(obj) {
|
|
|
if (obj.key == "file_onComplete_imgfile") {
|
|
|
$("#imgText").val(obj.data);
|
|
|
}
|
|
|
});
|
|
|
a.init();
|
|
|
},
|
|
|
video:function(title, item, index){
|
|
|
common.dialog.confirm(title, common.util.__template($("#vidioDialogTemp").html(), item), function() {
|
|
|
var _html = $.trim($("#videoText").val());
|
...
|
...
|
@@ -547,6 +576,7 @@ var Bll = { |
|
|
});
|
|
|
// $('#text-editor').wysihtml5();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//添加文字
|
...
|
...
|
@@ -554,6 +584,11 @@ $('body').on('click', '#textDialog', function() { |
|
|
Bll.wenZi("添加文字", {});
|
|
|
return false;
|
|
|
});
|
|
|
//添加空格
|
|
|
$('body').on('click', '#blankDialog', function() {
|
|
|
Bll.imgBlank("添加新图片",{});
|
|
|
return false;
|
|
|
});
|
|
|
$('body').on('click', '#picDialog', function() {
|
|
|
Bll.img("添加图片",{});
|
|
|
return false;
|
...
|
...
|
|