|
|
var $ = require('jquery'),
|
|
|
common = require('../../../common/common');
|
|
|
|
|
|
var ZeroClipboard = require("../../../common/util/ZeroClipboard.min");
|
|
|
ZeroClipboard.config({swfPath: "http://cdn.yoho.cn/yohobuy-portal/assets/images/ZeroClipboard.swf"});
|
|
|
|
|
|
var g = new common.grid({
|
|
|
el: "#product-pool",
|
|
|
hash: false,
|
...
|
...
|
@@ -19,7 +22,8 @@ var g = new common.grid({ |
|
|
return '<a id="detailPool" class="btn btn-xs btn-info" data-index="'+item.__index+'">详情</a>' +
|
|
|
'<a id="editPool" class="btn btn-xs btn-primary" data-index="'+item.__index+'">编辑</a>' +
|
|
|
'<a id="emptyPool" class="btn btn-xs btn-warning" data-index="'+item.__index+'">清空</a>' +
|
|
|
'<a id="deletePool" class="btn btn-xs btn-danger" data-index="'+item.__index+'">删除</a>';
|
|
|
'<a id="deletePool" class="btn btn-xs btn-danger" data-index="'+item.__index+'">删除</a>'+
|
|
|
'<a id="viewUrl" class="btn btn-xs btn-danger" data-index="'+item.__index+'">查看链接</a>';
|
|
|
}}
|
|
|
]
|
|
|
});
|
...
|
...
|
@@ -190,6 +194,27 @@ $(document).on("click", "#deletePool", function () { |
|
|
Bll.deletePool(item);
|
|
|
});
|
|
|
|
|
|
|
|
|
//查看链接
|
|
|
$(document).on("click", "#viewUrl", function () {
|
|
|
var index = $(this).data("index");
|
|
|
var item = g.rows[index];
|
|
|
var html = "<div class=\"alert alert-success\">点击链接名称可复制链接</div>"+
|
|
|
"<table class=\"table table-hover\">"+
|
|
|
"<tr><td><a class=\"btn btn-xs btn-success info-copy\" data-clipboard-text='http://search.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"' >【PC】</a></td><td style=\"padding-top:15px \">http://search.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"</td></tr>"+
|
|
|
"<tr><td><a class=\"btn btn-xs btn-success info-copy\" data-clipboard-text='http://search.m.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"'>【H5】</a></td><td style=\"padding-top:15px \">http://search.m.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"</td></tr>"+
|
|
|
"<tr><td><a class=\"btn btn-xs btn-success info-copy\" data-clipboard-text='http://search.m.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"&openby:yohobuy={\"params\":{\"title\":"+item.poolName+",\"productPool\":"+item.id+"}}'>【APP】</a></td><td >http://search.m.yohobuy.com/?filter_poolId="+item.id+"&title="+item.poolName+"&openby:yohobuy={\"params\":{\"title\":"+item.poolName+",\"productPool\":"+item.id+"}}"+"</td></tr>"+
|
|
|
"</table>";
|
|
|
common.dialog.confirm("商品池链接", html, function () {
|
|
|
|
|
|
});
|
|
|
new ZeroClipboard($(".info-copy"));
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '.info-copy', function () {
|
|
|
common.util.__tip("链接已复制好,可贴粘", "success")
|
|
|
});
|
|
|
|
|
|
//添加SKN到商品池
|
|
|
$(document).on("click", "#addSknBtn", function () {
|
|
|
if($('#addSknText').val().length > 0){
|
...
|
...
|
|