LogCommend.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xDesktop.requireApp("cms.Xform", "widget.LogCommend", null, false);
  3. /** @class CMSLog 文档查看日志组件。
  4. * @o2cn 文档查看日志组件
  5. * @alias CMSLog
  6. * @example
  7. * //可以在脚本中获取该组件
  8. * //方法1:
  9. * var log = this.form.get("name"); //获取组件
  10. * //方法2
  11. * var log = this.target; //在组件事件脚本中获取
  12. * @extends MWF.xApplication.process.Xform.$Module
  13. * @o2category FormComponents
  14. * @o2range {CMS}
  15. * @hideconstructor
  16. */
  17. MWF.xApplication.cms.Xform.LogCommend = MWF.CMSLogCommend = new Class(
  18. /** @lends CMSLog# */
  19. {
  20. Extends: MWF.APP$Module,
  21. _loadUserInterface: function(){
  22. this.node.empty();
  23. this.node.setStyle("-webkit-user-select", "text");
  24. /**
  25. * @summary log组件使用this.log实现功能
  26. * @member {MWF.xApplication.cms.Xform.widget.Log}
  27. * @example
  28. * //可以在脚本中获取该组件
  29. * var field = this.form.get("fieldId"); //获取组件对象
  30. * var items = field.log.items; //获取日志的行对象
  31. */
  32. this.log = new MWF.xApplication.cms.Xform.widget.LogCommend( this.form.app, this.node, {
  33. "documentId" : this.form.businessData.document.id,
  34. "mode" : this.json.mode,
  35. "textStyle" : this.json.textStyle
  36. });
  37. this.log.load();
  38. }
  39. });