Log.js 1.3 KB

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