Skip to content

Instantly share code, notes, and snippets.

@henryyan
Created November 29, 2011 07:25
Show Gist options
  • Save henryyan/1403857 to your computer and use it in GitHub Desktop.
Save henryyan/1403857 to your computer and use it in GitHub Desktop.
添加红色边框
var pid = $(this).attr('pid');
var imageUrl = ctx + "/activiti/activiti!loadResource.action?resourceType=image&processInstanceId=" + pid;
$.getJSON(ctx + '/activiti/activiti!traceProcess.action?processInstanceId=' + pid, function(info) {
$('<div/>', {
title: '查看流程图(按ESC键可以关闭)',
html: "<img src='" + imageUrl + "' style='position:absolute; left:0px; top:0px;' />"
+ "<div style='position:absolute; border:1px solid red;left:" + (info.x - 1) + "px;top:" + (info.y - 1) + "px;width:" + info.width + "px;height:" + info.height + "px;'></div>"
}).dialog({
modal: true,
resizable: false,
dragable: false,
width: $.common.window.getClientWidth(),
height: $.common.window.getClientHeight()
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment