Comment.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xDesktop.requireApp("cms.Xform", "widget.Comment", null, false);
  3. MWF.xApplication.cms.Xform.Comment = MWF.CMSComment = new Class({
  4. Extends: MWF.APP$Module,
  5. _loadUserInterface: function(){
  6. this.node.empty();
  7. this.node.setStyle("-webkit-user-select", "text");
  8. debugger;
  9. var config = {};
  10. if(this.json.editorProperties){
  11. config = Object.clone(this.json.editorProperties);
  12. }
  13. if (this.json.config){
  14. if (this.json.config.code){
  15. var obj = this.form.Macro.exec(this.json.config.code, this);
  16. Object.each(obj, function(v, k){
  17. config[k] = v;
  18. });
  19. }
  20. }
  21. this.comment = new MWF.xApplication.cms.Xform.widget.Comment( this.form.app, this.node, {
  22. "documentId" : this.form.businessData.document.id,
  23. "countPerPage" : this.json.countPerPage || 10,
  24. "isAllowModified" : this.json.isAllowModified,
  25. "isAllowPublish" : this.json.isAllowPublish,
  26. "isAdmin" : this.form.app.isAdmin,
  27. "editorProperties" : config
  28. });
  29. this.comment.load();
  30. }
  31. });