...
|
...
|
@@ -135,7 +135,7 @@ var Bll = { |
|
|
}
|
|
|
|
|
|
// 对于图片资源位,增加图片的原始尺寸
|
|
|
if(module.contentData.dialog == 'template_dialog_grid') {
|
|
|
if(module.contentData.dialog == 'template_dialog_grid' || module.contentData.dialog == 'template_dialog_grid2') {
|
|
|
$.each(module.contentData.data, function(index, data) {
|
|
|
Bll.getPicNaturalSize(data);
|
|
|
});
|
...
|
...
|
@@ -307,8 +307,8 @@ var Button = [ |
|
|
template_name: "text"
|
|
|
},
|
|
|
{
|
|
|
template_intro: "一张大图",
|
|
|
dialog: "template_dialog_grid",
|
|
|
template_intro: "单张大图",
|
|
|
dialog: "template_dialog_grid2",
|
|
|
template_name: "singleImage",
|
|
|
data: [{
|
|
|
"url": {
|
...
|
...
|
@@ -317,7 +317,9 @@ var Button = [ |
|
|
},
|
|
|
"alt": "",
|
|
|
"src": "",
|
|
|
"imgId": ""
|
|
|
"imgId": "",
|
|
|
"tagList":[
|
|
|
]
|
|
|
}]
|
|
|
},
|
|
|
{
|
...
|
...
|
@@ -361,8 +363,8 @@ var Button = [ |
|
|
dialog: "template_dialog_goods",
|
|
|
template_name: "goods",
|
|
|
data: []
|
|
|
},
|
|
|
{
|
|
|
},
|
|
|
/*{
|
|
|
template_intro: "推荐商品组",
|
|
|
dialog: "template_dialog_remgoods",
|
|
|
template_name: "goodsGroup",
|
...
|
...
|
@@ -373,9 +375,9 @@ var Button = [ |
|
|
},
|
|
|
list: []
|
|
|
}]
|
|
|
},
|
|
|
},*/
|
|
|
{
|
|
|
template_intro: "一个链接",
|
|
|
template_intro: "链接",
|
|
|
dialog: "template_dialog_link",
|
|
|
template_name: "link",
|
|
|
data: [{
|
...
|
...
|
@@ -772,6 +774,42 @@ var goodsgird = new common.grid({ |
|
|
name: "storage_num"
|
|
|
}]
|
|
|
});
|
|
|
//点击“添加商品”按钮(一张大图)
|
|
|
$(document).on("click", "#relGoodsSelectBtn", function () {
|
|
|
new common.dialog({
|
|
|
title: "选择商品",
|
|
|
zIndex: 52,
|
|
|
content: $("#template_dialog_goodsgird").html(),
|
|
|
width: '80%',
|
|
|
button: [{
|
|
|
value: "确定",
|
|
|
callback: function () {
|
|
|
var gs = goodsgird.selected.map(function (item, index) {
|
|
|
return {
|
|
|
pic_src: item.images_url,
|
|
|
product_skn: item.product_skn,
|
|
|
tagName: item.product_name,
|
|
|
}
|
|
|
})
|
|
|
Bll.module.contentData.data[0].tagList = Bll.module.contentData.data[0].tagList.concat(gs);
|
|
|
//Bll.module.contentData.data = Unique(Bll.module.contentData.data, "product_skc")
|
|
|
Bll.__render("#relatGoods", "template_dialog_relatGoods", Bll.module);
|
|
|
components.init();
|
|
|
Bll2.moveDrag();
|
|
|
|
|
|
},
|
|
|
css: "btn-primary"
|
|
|
}]
|
|
|
});
|
|
|
goodsgird.grid = null;
|
|
|
});
|
|
|
//点击“删除”按钮,删除添加商品(一张大图)
|
|
|
$(document).on("click", "#delRelProductBtn", function () {
|
|
|
var index = $(this).val();;
|
|
|
Bll.module.contentData.data[0].tagList.splice(index, 1);
|
|
|
Bll.__render("#relatGoods", "template_dialog_relatGoods", Bll.module);
|
|
|
components.init();
|
|
|
});
|
|
|
//点击“选择标签”按钮(添加商品)
|
|
|
$(document).on("click", "#goodsSelectBtn", function () {
|
|
|
new common.dialog({
|
...
|
...
|
@@ -802,7 +840,6 @@ $(document).on("click", "#goodsSelectBtn", function () { |
|
|
});
|
|
|
goodsgird.grid = null;
|
|
|
});
|
|
|
|
|
|
//点击“添加组”按钮(添加商品组)
|
|
|
$(document).on("click", "#goodsaddBtn", function () {
|
|
|
var item = $.extend(true, {}, Button[4].data[0]);
|
...
|
...
|
|