Created
March 24, 2012 14:50
-
-
Save henryyan/2183804 to your computer and use it in GitHub Desktop.
Activiti: js定位当前的节点
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imageUrl = ctx + "/activiti/activiti!loadResource.action?resourceType=image&processInstanceId=" + pid; | |
$.getJSON(ctx + '/activiti/activiti!traceProcess.action?processInstanceId=' + pid, function(info) { | |
var titles = ""; | |
/*$.each(info.vars, function(i, v) { | |
titles += i + ":" + v; | |
});*/ | |
if ($('#workflowTraceDialog').length == 0) { | |
$('<div/>', { | |
id: 'workflowTraceDialog', | |
title: '查看流程(按ESC键可以关闭)', | |
html: "<div id='workflowTraceAccordion'><h3><a href='#'>图片形式</a></h3><div><img src='" + imageUrl + "' style='position:absolute; left:0px; top:0px;' />" + | |
"<div style='position:absolute; border:2px solid red;left:" + | |
(info.x - 1) + | |
"px;top:" + | |
(info.y - 1) + | |
"px;width:" + | |
(info.width - 2) + | |
"px;height:" + | |
(info.height - 2) + | |
"px;' title='" + | |
titles + | |
"' class='ui-corner-all-12'></div></div><h3><a href='#'>文字形式</a></h3><div id='workflowTrace' class='workflow-trace-container'><table id='workflowTraceList'></table><div id='workflowTracePager'></div></div></div>" | |
}).appendTo('body'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment