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
陶雨
9 years ago
Commit
dd4118de39ab603ccd7a460b5826900c38abc9fc
1 parent
401aeb53
master
...
feature/feature_v4.5_20160525
feature/feature_v4.6_20160525
yohobuy_portal_dev_v4.4_20160525
yohobuy_portal_dev_v4.5_20160601
yohobuy_portal_dev_v4.6_20160601
yohobuy_portal_dev_v4.7_20160616
4.4.0_20160531
4.3.6_20160517
4.3.3_20160512
4.3.2_20160511
4.3.1_20160509
yohobuy_portal_dev_v4.6_20160622
帮助内容修改分类名称显示逻辑及添加添加编辑提示
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
client/js/help/helpContent.js
server/views/pages/help/helpContent.html
client/js/help/helpContent.js
View file @
dd4118d
var
$
=
require
(
'jquery'
),
common
=
require
(
'../common/common'
);
common
=
require
(
'../common/common'
),
util
=
require
(
'../common/util'
);
new
common
.
dropDown
({
el
:
"#help-categoryId"
,
"ajax"
:
"getHelpCategory"
});
new
common
.
dropDown
({
el
:
"#help-platform"
});
var
ENUM
=
{
id
:
{}
id
:
[]
};
var
g
=
new
common
.
grid
({
...
...
@@ -21,7 +22,7 @@ var $ = require('jquery'),
{
display
:
"编号"
,
name
:
"id"
},
{
display
:
"标题"
,
name
:
"title"
},
{
display
:
"分类"
,
name
:
"categoryId"
,
render
:
function
(
item
)
{
return
ENUM
.
id
[
item
.
i
d
];
return
ENUM
.
id
[
item
.
categoryI
d
];
}},
{
display
:
"平台"
,
name
:
"platform"
,
render
:
function
(
item
)
{
if
(
item
.
platform
!=
null
&&
item
.
platform
.
trim
()
!=
""
)
{
...
...
@@ -53,10 +54,11 @@ var $ = require('jquery'),
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
ENUM
.
id
[
list
[
i
].
id
]
=
list
[
i
].
categoryName
;
}
g
.
init
(
'/operations/helpcontent/getAllHelpContent'
);
},
function
()
{
g
.
init
(
'/operations/helpcontent/getAllHelpContent'
);
},
true
);
g
.
init
(
'/operations/helpcontent/getAllHelpContent'
);
var
Bll
=
{
toast
:
function
(
url
,
item
,
hint
)
{
var
e
=
new
common
.
edit
(
"#baseform"
);
...
...
@@ -65,8 +67,12 @@ var $ = require('jquery'),
common
.
util
.
__template
(
$
(
"#template"
).
html
(),
item
),
function
()
{
e
.
submit
(
url
,
function
(
option
)
{
option
.
data
.
categoryId
=
item
.
categoryId
;
option
.
success
=
function
()
{
option
.
success
=
function
(
res
)
{
if
(
res
.
data
.
code
==
200
)
{
util
.
__tip
(
res
.
data
.
message
,
"success"
);
}
else
{
util
.
__tip
(
res
.
data
.
message
);
}
g
.
reload
();
};
option
.
error
=
function
(){};
...
...
@@ -77,7 +83,7 @@ var $ = require('jquery'),
new
common
.
dropDown
({
el
:
"#categoryId"
,
"ajax"
:
"getByCategoryId"
});
if
(
hint
==
"修改内容"
)
{
$
(
"#select2-categoryId-container"
).
html
(
ENUM
.
id
[
item
.
i
d
]);
$
(
"#select2-categoryId-container"
).
html
(
ENUM
.
id
[
item
.
categoryI
d
]);
}
}
};
...
...
server/views/pages/help/helpContent.html
View file @
dd4118d
...
...
@@ -59,7 +59,7 @@
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
for
=
"
helpC
ontent"
>
帮助内容
<
/label
>
<
label
class
=
"col-sm-2 control-label"
for
=
"
c
ontent"
>
帮助内容
<
/label
>
<
div
class
=
"col-sm-10"
>
<
input
type
=
"text"
value
=
"{content}"
class
=
"form-control"
id
=
"content"
required
=
"required"
/>
<
/div
>
...
...
@@ -68,7 +68,7 @@
<
label
class
=
"col-sm-2 control-label"
for
=
"categoryId"
>
分类
<
/label
>
<
div
class
=
"col-sm-10"
>
<
select
id
=
"categoryId"
style
=
"width: 280px;"
value
=
"{categoryId}"
>
<
option
value
=
"
-1
"
>
请选择分类
<
/option
>
<
option
value
=
"
{categoryId}
"
>
请选择分类
<
/option
>
<
/select
>
<
/div
>
<
/div
>
...
...
Please
register
or
login
to post a comment