Authored by xuqi

dot name

... ... @@ -22,7 +22,19 @@ var removedProsInfo = [];
var removedGoodsTpl = require('../../../tpl/shopping/removed-goods.hbs');
var editTpl = require('../../../tpl/shopping/edit-color-size.hbs');
var Cart = {
var Cart;
require('yoho-jquery-dotdotdot');
function dotName() {
// product name dotdotdot
$('.pro-name a').dotdotdot({
wrap: 'letter'
});
}
Cart = {
/*
* 添加到购物车
* @function [addToCart]
... ... @@ -111,6 +123,8 @@ var Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
if (callback) {
return callback();
}
... ... @@ -134,6 +148,7 @@ var Cart = {
if (res.code === 200) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
});
} else {
new _alert(res.message).show();
... ... @@ -204,6 +219,7 @@ var Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
// 显示或者更新删除商品模块
Cart.showRemovedProducts(products, extraInfos);
... ... @@ -298,6 +314,8 @@ var Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
if (callback) {
return callback();
}
... ... @@ -316,6 +334,7 @@ var Cart = {
success: function(res) {
Util.refreshCart(res, function() {
Stepper.init();
dotName();
});
}
});
... ... @@ -474,11 +493,6 @@ var Cart = {
}
};
require('yoho-jquery-dotdotdot');
// product name dotdotdot
$('.pro-name a').dotdotdot({
wrap: 'letter'
});
dotName();
module.exports = Cart;
... ...
... ... @@ -134,15 +134,7 @@ var Stepper = {
});
}
});
// 文字截取
// product name dotdotdot
$('.pro-name a').dotdotdot({
wrap: 'letter'
});
}
};
require('yoho-jquery-dotdotdot');
module.exports = Stepper;
... ...