Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
liuyue
9 years ago
Commit
a31cda0b7ad21cadd02e6247a21c5506221f7cfb
1 parent
ab68be0c
品牌合作模式
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
15 deletions
client/js/goods/brand-cooperation.js
client/js/goods/index.js
client/js/index.js
server/views/pages/goods/index.html
client/js/goods/brand-cooperation.js
View file @
a31cda0
...
...
@@ -15,7 +15,7 @@ var ENUM = {
new
common
.
dropDown
({
el
:
'#brandCooperation'
});
new
common
.
dropDown
({
var
brandSet
=
new
common
.
dropDown
({
el
:
'#brandCooperationSet'
});
...
...
@@ -118,10 +118,18 @@ $('#brand').on('keyup', function(event) {
}
});
//全部
$
(
"#all-btn"
).
click
(
function
()
{
$
(
'#brandCooperationSet'
).
val
(
'-1'
).
trigger
(
'change'
);
$
(
'#brandCooperation'
).
val
(
'-1'
).
trigger
(
'change'
);
$
(
'#brand'
).
val
(
''
);
g
.
reload
();
});
//批量导入按钮点击事件
$
(
'#import-btn'
).
on
(
'click'
,
function
()
{
if
(
$
(
'#basicTable'
).
css
(
'display'
)
==
'none'
)
{
g
.
reload
();
location
.
reload
();
}
$
(
'#basicTable, .bulk-import'
).
toggle
();
});
...
...
@@ -155,7 +163,7 @@ common.edit.ajaxfileupload("#upload-input", {
common
.
util
.
__tip
(
'没有成功导入的数据'
,
'warning'
);
}
}
else
{
common
.
util
.
__tip
(
response
.
message
,
'
danger
'
);
common
.
util
.
__tip
(
response
.
message
,
'
warning
'
);
}
}
});
\ No newline at end of file
...
...
client/js/goods/index.js
View file @
a31cda0
...
...
@@ -250,6 +250,11 @@ $('#skn').on('keyup', function(event) {
}
});
//全部
$
(
"#all-btn"
).
click
(
function
()
{
location
.
href
=
''
;
});
//批量导入按钮点击事件
$
(
'#import-btn'
).
on
(
'click'
,
function
()
{
if
(
$
(
'#basicTable'
).
css
(
'display'
)
==
'none'
)
{
...
...
client/js/index.js
View file @
a31cda0
...
...
@@ -12,17 +12,17 @@ require('yoho.bootstrap');
$
(
'.leftpanel .nav .parent>a'
).
click
(
function
()
{
var
coll
=
$
(
this
).
parents
(
'.collapsed'
).
length
,
child
=
$
(
this
).
parent
().
find
(
'.children'
);
if
(
!
coll
)
{
$
(
'.leftpanel .nav .parent-focus'
).
each
(
function
()
{
$
(
this
).
find
(
'.children'
).
slideUp
(
'fast'
);
$
(
this
).
removeClass
(
'parent-focus'
);
});
if
(
!
child
.
is
(
':visible'
))
{
if
(
!
child
.
is
(
':visible'
))
{
child
.
slideDown
(
'fast'
);
if
(
!
child
.
parent
().
hasClass
(
'active'
))
child
.
parent
().
addClass
(
'parent-focus'
);
if
(
!
child
.
parent
().
hasClass
(
'active'
))
child
.
parent
().
addClass
(
'parent-focus'
);
}
else
{
child
.
slideUp
(
'fast'
);
child
.
parent
().
removeClass
(
'parent-focus'
);
...
...
@@ -32,13 +32,12 @@ $('.leftpanel .nav .parent>a').click(function() {
});
$
(
".leftpanel .nav .children a"
).
each
(
function
(){
var
attr
=
$
(
this
).
attr
(
"href"
);
if
(
attr
==
window
.
location
.
pathname
+
window
.
location
.
search
){
$
(
".leftpanel .nav .children a"
).
each
(
function
()
{
var
attr
=
$
(
this
).
attr
(
'href'
);
if
(
attr
==
window
.
location
.
pathname
+
window
.
location
.
search
)
{
$
(
this
).
parents
(
".children"
).
show
();
$
(
this
).
parent
(
"li"
).
addClass
(
"active"
);
$
(
this
).
parents
(
".parent"
).
addClass
(
"parent-focus"
);
}
});
});
\ No newline at end of file
...
...
server/views/pages/goods/index.html
View file @
a31cda0
...
...
@@ -148,7 +148,7 @@
</div>
{{/ brandCooperationSet}}
<a
id=
"filter-btn"
href=
"javascript:;"
class=
"btn btn-info"
>
筛选
</a>
<a
id=
"all-btn"
href=
""
class=
"btn btn-info"
>
全部
</a>
<a
id=
"all-btn"
href=
"
javascript:;
"
class=
"btn btn-info"
>
全部
</a>
</div>
{{/ filter}}
...
...
Please
register
or
login
to post a comment