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
weiqingting
9 years ago
Commit
4611914260d1a180204d9453d87c1e4ac6e4c561
1 parent
82d73a79
提交
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
client/js/guang/contentEdit.js
server/views/pages/guang/contentEdit.html
client/js/guang/contentEdit.js
View file @
4611914
...
...
@@ -140,10 +140,13 @@ Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[];
Bll
.
__render
(
"#taglist"
,
"template4"
,{
tags
:
Bll
.
Tags
});
/*内容渲染->对象转数组*/
// Bll.contentDatas=ENUM.articleContent;
ViewModel
.
contentData
.
forEach
(
function
(
item
,
index
){
item
.
contentData
=
common
.
util
.
__ObjToArray
(
JSON
.
parse
(
item
.
contentData
));
Bll
.
contentDatas
.
push
(
item
);
});
if
(
ViewModel
.
articleContent
){
ViewModel
.
articleContent
.
forEach
(
function
(
item
,
index
){
item
.
contentData
=
common
.
util
.
__ObjToArray
(
JSON
.
parse
(
item
.
contentData
));
Bll
.
contentDatas
.
push
(
item
);
});
}
new
common
.
dropDown
({
...
...
@@ -327,10 +330,10 @@ $(document).on("change", ".observe", function() {
var
name
=
$this
.
data
(
"field"
);
// index = $this.data("index");
// var module = (index == undefined) ? Bll.module.data : Bll.module.data[index];
Bll
.
module
.
data
=
common
.
util
.
__buildobj
(
name
,
'.'
,
Bll
.
module
.
data
,
function
(
obj
,
name
)
{
Bll
.
module
.
contentData
.
data
=
common
.
util
.
__buildobj
(
name
,
'.'
,
Bll
.
module
.
contentData
.
data
,
function
(
obj
,
name
)
{
obj
[
name
]
=
$this
.
val
();
});
console
.
log
(
"module"
,
Bll
.
module
.
data
);
console
.
log
(
"module"
,
Bll
.
module
.
contentData
.
data
);
});
$
(
document
).
on
(
"click"
,
".edit"
,
function
()
{
...
...
@@ -415,7 +418,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
});
// Bll.module.data=goodsgird.selected;
Bll
.
__render
(
"#goodspic"
,
"template_dialog_goodsimgs"
,
{
datas
:
Bll
.
module
.
data
datas
:
Bll
.
module
.
contentData
.
data
});
},
css
:
"btn-primary"
...
...
server/views/pages/guang/contentEdit.html
View file @
4611914
...
...
@@ -264,7 +264,7 @@
<!--
文本内容
-->
[[
each
modules
as
module
index
]]
<
li
class
=
"custom-group"
data
-
index
=
"[[index]]"
>
[[
if
module
.
template_name
==
'text'
]]
[[
if
module
.
contentData
.
template_name
==
'text'
]]
<
div
class
=
"con"
>
[[
module
.
data
.
text
]]
<
/div
>
[[
else
if
module
.
template_name
==
'singleImage'
]]
<
div
class
=
"list"
>
...
...
Please
register
or
login
to post a comment