Authored by yyq

hot word icon-review by huangtao

@@ -45,8 +45,6 @@ edit.prototype = { @@ -45,8 +45,6 @@ edit.prototype = {
45 var _e = __self.registerEvent[name]; 45 var _e = __self.registerEvent[name];
46 if (_e) { 46 if (_e) {
47 _e.push(callback); 47 _e.push(callback);
48 - } else {  
49 - __self.registerEvent[name] = [callback];  
50 } 48 }
51 return _e; 49 return _e;
52 }, 50 },
@@ -156,10 +156,8 @@ var Bll = { @@ -156,10 +156,8 @@ var Bll = {
156 Bll.__render(".modal-body", templater, Bll.module); 156 Bll.__render(".modal-body", templater, Bll.module);
157 Bll.__editRender(); 157 Bll.__editRender();
158 }, 158 },
159 - __editRender: function () {  
160 - edit.init();  
161 -  
162 - edit.on("file_onComplete_word-icon", function (obj) { 159 + editCallbackFn: function(obj) {
  160 + if (obj.key.indexOf('file_onComplete') === 0) {
163 console.log(obj); 161 console.log(obj);
164 var names = obj.field; 162 var names = obj.field;
165 console.log(names); 163 console.log(names);
@@ -176,7 +174,12 @@ var Bll = { @@ -176,7 +174,12 @@ var Bll = {
176 Bll.module.contentData.data = common.util.__buildobj(names, '.', Bll.module.contentData.data, function (o, name) { 174 Bll.module.contentData.data = common.util.__buildobj(names, '.', Bll.module.contentData.data, function (o, name) {
177 o[name] = obj.data; 175 o[name] = obj.data;
178 }); 176 });
179 - }); 177 + }
  178 + },
  179 + __editRender: function () {
  180 + edit.init();
  181 + edit.off('callback', Bll.editCallbackFn);
  182 + edit.on('callback', Bll.editCallbackFn);
180 } 183 }
181 }; 184 };
182 /** 185 /**