listItemSection.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "viewSetting": {
  3. "html": "<div styles='sectionListNode'></div>"
  4. },
  5. "documentSetting": {
  6. "html": "<div styles='sectionNode'></div>",
  7. "mouseoverStyles": "sectionNode_over",
  8. "action": "open",
  9. "event" : "mouseover^^function( sectionNode, ev ){ this.mouseoverSection(sectionNode, ev) }##mouseout^^function( sectionNode, ev ){ this.mouseoutSection(sectionNode, ev) }"
  10. },
  11. "items": [
  12. {
  13. "name": "work",
  14. "content": {
  15. "html": "<div styles='sectionItemNode'>"+
  16. "<div styles='sectionRemoveNode' item='remove' title='删除版块'></div>"+
  17. "<div styles='sectionItemTopNode'>"+
  18. " <div styles='sectionItemTopIconNode'>"+
  19. " <img styles='sectionItemTopIcon' item='icon'>"+
  20. " </div>"+
  21. " <div styles='sectionItemTopContent'>"+
  22. " <div styles='sectionItemTopDiv'><div styles='sectionItemTitleNode' item='sectionName'></div><div styles='forumNameLabel' item='forumName'></div></div>"+
  23. " <div styles='sectionItemTopDiv'>"+
  24. " <div styles='sectionItemTopLable' lable='create'></div><div styles='sectionItemTopInfor'>:</div><div styles='sectionItemTopInfor' item='creatorName'></div><div styles='sectionItemTopInfor'>,&nbsp;</div>"+
  25. " <div styles='sectionItemTopLable' lable='time'></div><div styles='sectionItemTopInfor'>:</div><div styles='sectionItemTopInfor' item='createTime'></div>"+
  26. " </div>"+
  27. " <div styles='sectionItemTopDiv'>"+
  28. " <div styles='sectionItemTopLable' lable='sectionType'></div><div styles='sectionItemTopInfor'>:</div><div styles='sectionItemTopInfor' item='sectionType'></div><div styles='sectionItemTopInfor'>,&nbsp;</div>"+
  29. " <div styles='sectionItemTopLable' lable='sectionStatus'></div><div styles='sectionItemTopInfor'>:</div><div styles='sectionItemTopInfor' item='sectionStatus'></div>"+
  30. " </div>"+
  31. " <div styles='sectionItemTopDiv'>"+
  32. " <div styles='sectionItemTopLable' lable='moderatorNames'></div><div styles='sectionItemTopInfor'>:</div><div styles='sectionItemTopInfor' item='moderatorNames'></div>"+
  33. " </div>"+
  34. " </div>"+
  35. "</div>"+
  36. "</div>",
  37. "items": {
  38. "sectionName" : {},
  39. "forumName": {},
  40. "moderatorNames" : { "value" : "function(d){ var list = []; ( d.moderatorNames || [] ).each( function(n){ list.push(n.split('@')[0]) }); return list;}" },
  41. "createTime" : { "value" : "function(d){ return d.createTime.split(' ')[0] }" },
  42. "creatorName": { "value" : "function(d){ return d.creatorName.split('@')[0] }" },
  43. "sectionType": { },
  44. "sectionStatus": { "styles" : "function(d){ return d.sectionStatus == '启用' ? {'color':'green'} : {'color':'#845a5a'} }" },
  45. "remove" : {
  46. "condition" : "function(d){ return this.explorer.forumAdminObj[d.forumId] || this.app.access.isAdmin() }", //|| this.app.access.isSectionManager( d )
  47. "action" : "remove"
  48. },
  49. "icon" : {
  50. "value": "",
  51. "attr" : "src^^function( d ){ if( d.icon ){ return 'data:image/png;base64,'+ d.icon }else{ return '../x_component_Forum/$Setting/default/sectionIcon/forum_icon.png' } }"
  52. }
  53. }
  54. }
  55. }
  56. ]
  57. }