Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
c0765e181eb50c072b76ce2d38cd82ad2fbcf70e
1 parent
6b958d92
address detail in 2 lines
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
package.json
public/js/shopping/order/address.js
public/scss/shopping/_order.css
package.json
View file @
c0765e1
...
...
@@ -102,6 +102,7 @@
"yoho-handlebars"
:
"^4.0.5"
,
"yoho-jquery"
:
"^1.12.4"
,
"yoho-jquery-accordion"
:
"0.0.2"
,
"yoho-jquery-dotdotdot"
:
"0.0.1"
,
"yoho-jquery-lazyload"
:
"^1.9.7"
,
"yoho-jquery-nanoscroller"
:
"0.0.1"
,
"yoho-jquery-placeholder"
:
"^2.3.1"
,
...
...
public/js/shopping/order/address.js
View file @
c0765e1
...
...
@@ -18,6 +18,15 @@ var Dialog = popup.Dialog,
var
addressDialogTpl
;
var
addressTpl
;
require
(
'yoho-jquery-dotdotdot'
);
// dot someone
function
dotYou
(
$el
)
{
$el
.
find
(
'.address-detail'
).
dotdotdot
({
wrap
:
'letter'
});
}
// 判断是否是Y
Hbs
.
registerHelper
(
'isY'
,
function
(
value
,
options
)
{
if
(
value
===
'Y'
)
{
...
...
@@ -188,6 +197,8 @@ function addressDialogFactory(opt, $the) {
receiver
(
updated
);
}
dotYou
(
$the
.
prev
(
'.address'
));
$the
.
remove
();
address
.
close
();
}
...
...
@@ -221,6 +232,8 @@ function addressDialogFactory(opt, $the) {
address
:
[
the
]
}));
dotYou
(
$
(
'#address-list .address'
).
first
());
// 若添加后有20个地址则隐藏新增的按钮
if
(
$
(
'#address-list .address'
).
length
===
20
)
{
$
(
'#address-list .new-address-block'
).
addClass
(
'hide'
);
...
...
@@ -425,6 +438,8 @@ $.ajax({
hasNew
:
data
.
data
.
length
>=
20
?
false
:
true
}));
dotYou
(
$
(
'.address'
));
// 填收货人信息
receiver
(
data
.
data
[
0
]);
}
...
...
public/scss/shopping/_order.css
View file @
c0765e1
...
...
@@ -145,6 +145,7 @@
.address-detail
{
line-height
:
15px
;
max-height
:
30px
;
}
.address-detail
,
...
...
Please
register
or
login
to post a comment