90 lines
2.9 KiB
Plaintext
90 lines
2.9 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/IncludeBegin.jsp"%><%
|
|
String compClientID = request.getParameter("CompClientID");
|
|
String attrid = CurPage.getParameter("attrid");
|
|
%>
|
|
<body style="overflow:hidden;">
|
|
<div><a onclick='fangda()' style="text-decoration:none;" title="放大">放大</a>
|
|
<a onclick='shuoxiao()' style="text-decoration:none;" title="缩小">缩小</a>
|
|
<a onclick='huanyuan()' style="text-decoration:none;" title="还原">还原</a>
|
|
<a onclick='turnleft()' style="text-decoration:none;" title="左转">左转</a>
|
|
<a onclick='turnright()' style="text-decoration:none;" title="右转">右转</a>
|
|
</div>
|
|
<div id="ButtonsDiv" style="margin-left:5px; overflow:scroll;width:99.5%;height:97%;" >
|
|
|
|
</div>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var swidth;
|
|
var sheight;
|
|
var current = 0;
|
|
window.onload=function(){
|
|
importRecord();
|
|
}
|
|
function importRecord(){
|
|
var result = AsControl.RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","getImageWidthAndHeight","attId="+"<%=attrid%>");
|
|
var appImage={};
|
|
appImage.width=result.width;
|
|
appImage.height=result.height;
|
|
swidth=result.width;
|
|
sheight=result.height;
|
|
appImage.id="<%=attrid%>";
|
|
var img = createAttachmentImageDiv(appImage);
|
|
jQuery("#ButtonsDiv").append(img);
|
|
}
|
|
function createAttachmentImageDiv(appImage,filedict){
|
|
var $div = jQuery('<div/>');
|
|
if(appImage){
|
|
$div.addClass("img-box");
|
|
$div.attr("imageid", appImage.id);
|
|
var $image = jQuery("<img/>");
|
|
$image.attr("id","image");
|
|
$image.attr("height",appImage.height);
|
|
$image.attr("width",appImage.width);
|
|
$image.attr("src", sWebRootPath+"/servlet/view/image?CompClientID=<%=sCompClientID%>&attrid="+appImage.id);
|
|
$image.appendTo($div);
|
|
}
|
|
return $div;
|
|
}
|
|
function shuoxiao(){
|
|
var image=$("#image");
|
|
var height=image.attr("height");
|
|
var width=image.attr("width");
|
|
image.css("height",height*0.9);
|
|
image.css("width",width*0.9);
|
|
image.attr("height",height*0.9);
|
|
image.attr("width",width*0.9);
|
|
}
|
|
|
|
function fangda(){
|
|
var image=$("#image");
|
|
var height=image.attr("height");
|
|
var width=image.attr("width");
|
|
image.css("height",height/0.9);
|
|
image.css("width",width/0.9);
|
|
image.attr("height",height/0.9);
|
|
image.attr("width",width/0.9);
|
|
}
|
|
function huanyuan(){
|
|
var image=$("#image");
|
|
image.css("height",sheight);
|
|
image.css("width",swidth);
|
|
image.attr("height",sheight);
|
|
image.attr("width",swidth);
|
|
current = 0;
|
|
image[0].style.transform = 'rotate('+current+'deg)';
|
|
}
|
|
|
|
function turnleft(){
|
|
var imageDiv = $("#image")[0];
|
|
current = (current-90)%360;
|
|
imageDiv.style.transform = 'rotate('+current+'deg)';
|
|
}
|
|
|
|
function turnright(){
|
|
var imageDiv = $("#image")[0];
|
|
current = (current+90)%360;
|
|
imageDiv.style.transform = 'rotate('+current+'deg)';
|
|
}
|
|
</script>
|
|
<%@ include file="/IncludeEnd.jsp"%> |