1
|
var $ = require('jquery'),
|
1
|
var $ = require('jquery'),
|
2
|
common = require('../common/common');
|
2
|
common = require('../common/common');
|
|
|
3
|
+require('../common/umeditor.config');
|
|
|
4
|
+require('../common/umeditor');
|
|
|
5
|
+require('../common/zh-cn');
|
|
|
6
|
+
|
|
|
7
|
+var baidu;
|
3
|
|
8
|
|
4
|
|
9
|
|
5
|
/*获取数据ViewModel*/
|
10
|
/*获取数据ViewModel*/
|
|
@@ -104,6 +109,9 @@ var Bll = { |
|
@@ -104,6 +109,9 @@ var Bll = { |
104
|
button: [{
|
109
|
button: [{
|
105
|
value: "保存",
|
110
|
value: "保存",
|
106
|
callback: function () {
|
111
|
callback: function () {
|
|
|
112
|
+ if(module.contentData.dialog=="template_dialog_text"){
|
|
|
113
|
+ module.contentData.data.text=baidu.getContent();
|
|
|
114
|
+ }
|
107
|
if (components.validate()) {
|
115
|
if (components.validate()) {
|
108
|
//TODO
|
116
|
//TODO
|
109
|
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
|
117
|
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
|
|
@@ -116,6 +124,13 @@ var Bll = { |
|
@@ -116,6 +124,13 @@ var Bll = { |
116
|
}]
|
124
|
}]
|
117
|
});
|
125
|
});
|
118
|
Bll.__editRender();
|
126
|
Bll.__editRender();
|
|
|
127
|
+ if(module.contentData.dialog=="template_dialog_text"){
|
|
|
128
|
+ baidu&&baidu.destroy();
|
|
|
129
|
+ baidu=UM.getEditor('baidueditor');
|
|
|
130
|
+ baidu.setContent(module.contentData.data.text);
|
|
|
131
|
+ }
|
|
|
132
|
+
|
|
|
133
|
+
|
119
|
},
|
134
|
},
|
120
|
renderDialog: function (templater) {
|
135
|
renderDialog: function (templater) {
|
121
|
Bll.__render(".modal-body", templater, Bll.module);
|
136
|
Bll.__render(".modal-body", templater, Bll.module);
|