$(function() { $('#portlet-container').portlet({ sortable: true, columns: [{ width: 400, portlets: [{ title: '待办任务', content: { style: { maxHeight: 300 }, type: 'ajax', dataType: 'json', url: ctx + '/workflow/task/todo/list', formatter: function(o, pio, data) { if (data.length == 0) { return "无待办任务!"; } var ct = "
    "; $.each(data, function() { ct += "
  1. " + this.pdname + "->PID:" + this.pid + "->" + this.name + ""; ct += "V:" + this.pdversion + ""; ct += "跟踪"; ct += "" + (this.status == 'claim' ? '未签收' : '') + ""; ct += "
  2. "; }); return ct + "
"; }, afterShow: function() { $('.trace').click(graphTrace); } } }, { title: '表单概念', content: { type: 'text', text: function() { return $('.forms').html(); } } }, { title: '会签(多实例)说明', content: { type: 'text', text: function() { return $('#multiInstance').html(); } } }, { title: '关于作者', content: { type: 'text', text: function() { return $('.aboutme').html(); } } }] }, { width: 350, portlets: [{ title: '演示内容', content: { type: 'text', text: function() { return $('.demos').html(); } } } ] }, { width: 450, portlets: [{ title: '项目说明', content: { type: 'text', text: function() { return $('.project-info').html(); } } }, { title: '架构说明', content: { type: 'text', text: function() { return $('.arch').html(); } } }, { title: '资源链接', content: { type: 'text', text: function() { return $('.links').html(); } } }, { title: 'Rest接口', content: { type: 'text', text: function() { return $('.rest').html(); } } }] }] }); });