|
|
var $ = require('jquery'),
|
|
|
common = require('../common/common');
|
|
|
require('../common/umeditor.config');
|
|
|
require('../common/umeditor');
|
|
|
require('../common/zh-cn');
|
|
|
|
|
|
var baidu;
|
|
|
|
|
|
|
|
|
/*获取数据ViewModel*/
|
...
|
...
|
@@ -104,6 +109,9 @@ var Bll = { |
|
|
button: [{
|
|
|
value: "保存",
|
|
|
callback: function () {
|
|
|
if(module.contentData.dialog=="template_dialog_text"){
|
|
|
module.contentData.data.text=baidu.getContent();
|
|
|
}
|
|
|
if (components.validate()) {
|
|
|
//TODO
|
|
|
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
|
...
|
...
|
@@ -116,6 +124,13 @@ var Bll = { |
|
|
}]
|
|
|
});
|
|
|
Bll.__editRender();
|
|
|
if(module.contentData.dialog=="template_dialog_text"){
|
|
|
baidu&&baidu.destroy();
|
|
|
baidu=UM.getEditor('baidueditor');
|
|
|
baidu.setContent(module.contentData.data.text);
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
renderDialog: function (templater) {
|
|
|
Bll.__render(".modal-body", templater, Bll.module);
|
...
|
...
|
|