|
|
<HTML>
|
|
|
<HEAD>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
|
|
<script language=javascript src="dialog.js"></script>
|
|
|
<link href='dialog.css' type='text/css' rel='stylesheet'>
|
|
|
|
|
|
<script language="javascript">
|
|
|
|
|
|
var sAction = "INSERT";
|
|
|
var sTitle = "²åÈë";
|
|
|
|
|
|
var oControl;
|
|
|
var oSeletion;
|
|
|
var sRangeType;
|
|
|
|
|
|
var sFromUrl = "http://";
|
|
|
var sAlt = "";
|
|
|
var sBorder = "0";
|
|
|
var sBorderColor = "";
|
|
|
var sFilter = "";
|
|
|
var sAlign = "";
|
|
|
var sWidth = "";
|
|
|
var sHeight = "";
|
|
|
var sVSpace = "";
|
|
|
var sHSpace = "";
|
|
|
|
|
|
oSelection = dialogArguments.eWebEditor.document.selection.createRange();
|
|
|
sRangeType = dialogArguments.eWebEditor.document.selection.type;
|
|
|
|
|
|
if (sRangeType == "Control") {
|
|
|
if (oSelection.item(0).tagName == "IMG"){
|
|
|
sAction = "MODI";
|
|
|
sTitle = "ÐÞ¸Ä";
|
|
|
oControl = oSelection.item(0);
|
|
|
sFromUrl = oControl.getAttribute("src", 2);
|
|
|
sAlt = oControl.alt;
|
|
|
sBorder = oControl.border;
|
|
|
sBorderColor = oControl.style.borderColor;
|
|
|
sFilter = oControl.style.filter;
|
|
|
sAlign = oControl.align;
|
|
|
sWidth = oControl.width;
|
|
|
sHeight = oControl.height;
|
|
|
sVSpace = oControl.vspace;
|
|
|
sHSpace = oControl.hspace;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
document.write("<title>ͼƬÊôÐÔ(" + sTitle + ")</title>");
|
|
|
|
|
|
|
|
|
function InitDocument(){
|
|
|
SearchSelectValue(d_filter, sFilter);
|
|
|
SearchSelectValue(d_align, sAlign.toLowerCase());
|
|
|
|
|
|
d_fromurl.value = sFromUrl;
|
|
|
d_alt.value = sAlt;
|
|
|
d_border.value = sBorder;
|
|
|
d_bordercolor.value = sBorderColor;
|
|
|
s_bordercolor.style.backgroundColor = sBorderColor;
|
|
|
d_width.value = sWidth;
|
|
|
d_height.value = sHeight;
|
|
|
d_vspace.value = sVSpace;
|
|
|
d_hspace.value = sHSpace;
|
|
|
|
|
|
adjustDialog();
|
|
|
}
|
|
|
|
|
|
|
|
|
function ReturnValue(){
|
|
|
sFromUrl = d_fromurl.value;
|
|
|
sAlt = d_alt.value;
|
|
|
sBorder = d_border.value;
|
|
|
sBorderColor = d_bordercolor.value;
|
|
|
sFilter = d_filter.options[d_filter.selectedIndex].value;
|
|
|
sAlign = d_align.value;
|
|
|
sWidth = d_width.value;
|
|
|
sHeight = d_height.value;
|
|
|
sVSpace = d_vspace.value;
|
|
|
sHSpace = d_hspace.value;
|
|
|
|
|
|
if (sAction == "MODI") {
|
|
|
oControl.src = sFromUrl;
|
|
|
oControl.alt = sAlt;
|
|
|
oControl.border = sBorder;
|
|
|
oControl.style.borderColor = sBorderColor;
|
|
|
oControl.style.filter = sFilter;
|
|
|
oControl.align = sAlign;
|
|
|
oControl.width = sWidth;
|
|
|
oControl.height = sHeight;
|
|
|
oControl.style.width = sWidth;
|
|
|
oControl.style.height = sHeight;
|
|
|
oControl.vspace = sVSpace;
|
|
|
oControl.hspace = sHSpace;
|
|
|
}else{
|
|
|
var sHTML = '';
|
|
|
if (sFilter!=""){
|
|
|
sHTML=sHTML+'filter:'+sFilter+';';
|
|
|
}
|
|
|
if (sBorderColor!=""){
|
|
|
sHTML=sHTML+'border-color:'+sBorderColor+';';
|
|
|
}
|
|
|
if (sHTML!=""){
|
|
|
sHTML=' style="'+sHTML+'"';
|
|
|
}
|
|
|
sHTML = '<img id=eWebEditor_TempElement_Img src="'+sFromUrl+'"'+sHTML;
|
|
|
if (sBorder!=""){
|
|
|
sHTML=sHTML+' border="'+sBorder+'"';
|
|
|
}
|
|
|
if (sAlt!=""){
|
|
|
sHTML=sHTML+' alt="'+sAlt+'"';
|
|
|
}
|
|
|
if (sAlign!=""){
|
|
|
sHTML=sHTML+' align="'+sAlign+'"';
|
|
|
}
|
|
|
if (sWidth!=""){
|
|
|
sHTML=sHTML+' width="'+sWidth+'"';
|
|
|
}
|
|
|
if (sHeight!=""){
|
|
|
sHTML=sHTML+' height="'+sHeight+'"';
|
|
|
}
|
|
|
if (sVSpace!=""){
|
|
|
sHTML=sHTML+' vspace="'+sVSpace+'"';
|
|
|
}
|
|
|
if (sHSpace!=""){
|
|
|
sHTML=sHTML+' hspace="'+sHSpace+'"';
|
|
|
}
|
|
|
sHTML=sHTML+'>';
|
|
|
dialogArguments.insertHTML(sHTML);
|
|
|
|
|
|
var oTempElement = dialogArguments.eWebEditor.document.getElementById("eWebEditor_TempElement_Img");
|
|
|
oTempElement.src = sFromUrl;
|
|
|
oTempElement.removeAttribute("id");
|
|
|
|
|
|
}
|
|
|
|
|
|
window.returnValue = null;
|
|
|
window.close();
|
|
|
}
|
|
|
|
|
|
function ok(){
|
|
|
d_border.value = ToInt(d_border.value);
|
|
|
d_width.value = ToInt(d_width.value);
|
|
|
d_height.value = ToInt(d_height.value);
|
|
|
d_vspace.value = ToInt(d_vspace.value);
|
|
|
d_hspace.value = ToInt(d_hspace.value);
|
|
|
|
|
|
if (!IsColor(d_bordercolor.value)){
|
|
|
BaseAlert(d_bordercolor,"Ìáʾ£º\n\nÎÞЧµÄ±ß¿òÑÕÉ«Öµ£¡");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
ReturnValue();
|
|
|
}
|
|
|
|
|
|
function doPreview(){
|
|
|
var url;
|
|
|
url = d_fromurl.value;
|
|
|
|
|
|
if (url){
|
|
|
imgPreview.src = url;
|
|
|
setPreview()
|
|
|
}else{
|
|
|
tdPreview.innerHTML = "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function setPreview(){
|
|
|
var width = imgPreview.width;
|
|
|
var height = imgPreview.height;
|
|
|
if (imgPreview.src){
|
|
|
var boxWidth = tdPreview.offsetWidth;
|
|
|
var boxHeight = tdPreview.offsetHeight;
|
|
|
if ((width>boxWidth)||(height>boxHeight)){
|
|
|
var nw = boxWidth/width;
|
|
|
var nh = boxHeight/height;
|
|
|
if (nw>nh){
|
|
|
height = boxHeight;
|
|
|
width = width*nh;
|
|
|
}else{
|
|
|
width = boxWidth;
|
|
|
height = height*nw;
|
|
|
}
|
|
|
}
|
|
|
tdPreview.innerHTML = "<img border=0 src='"+imgPreview.src+"' width='"+width+"' height='"+height+"'>";
|
|
|
tdPreviewSize.innerHTML = imgPreview.width+" * "+imgPreview.height;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<BODY onload="InitDocument()">
|
|
|
<table border=0 cellpadding=0 cellspacing=5 id=tabDialogSize><tr><td>
|
|
|
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=5 align=center>
|
|
|
<tr valign=top><td width="60%">
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0 align=center width="100%">
|
|
|
<tr>
|
|
|
<td>
|
|
|
<fieldset>
|
|
|
<legend>ͼƬÀ´Ô´</legend>
|
|
|
<table border=0 cellpadding=5 cellspacing=0 width="100%">
|
|
|
<tr><td>
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=2 width="100%">
|
|
|
<tr>
|
|
|
<td noWrap width="20%"><input type=radio id="d_checkfromurl" value="1" checked><label for=d_checkfromurl>ÍøÂç</label>:</td>
|
|
|
<td noWrap width="80%"><input type=text id='d_fromurl' style='width:100%' size=30 value=''></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
</td></tr>
|
|
|
</table>
|
|
|
</fieldset>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr><td height=5></td></tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
<fieldset>
|
|
|
<legend>ÏÔʾЧ¹û</legend>
|
|
|
<table border=0 cellpadding=5 cellspacing=0 width="100%">
|
|
|
<tr><td>
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=2 width="100%">
|
|
|
<tr>
|
|
|
<td noWrap width="20%">˵Ã÷ÎÄ×Ö:</td>
|
|
|
<td noWrap width="80%" colspan=4><input type=text id=d_alt size=10 value="" style="width:100%"></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td noWrap width="20%">±ß¿ò´Öϸ:</td>
|
|
|
<td noWrap width="29%"><input style="width:80px" type=text id=d_border size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();"></td>
|
|
|
<td width="2%"> </td>
|
|
|
<td noWrap width="20%">±ß¿òÑÕÉ«:</td>
|
|
|
<td noWrap width="29%"><input style="width:62px" type=text id=d_bordercolor size=7 value=""><img border=0 src="../sysimage/rect.gif" width=18 style="cursor:hand" id=s_bordercolor onclick="SelectColor('bordercolor')" align=absmiddle></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td noWrap width="20%">ÌØÊâЧ¹û:</td>
|
|
|
<td noWrap width="29%">
|
|
|
<select id=d_filter size=1 style="width:80px">
|
|
|
<option value='' selected>ÎÞ</option>
|
|
|
<option value='Alpha(Opacity=50)'>°ë͸Ã÷</option>
|
|
|
<option value='Alpha(Opacity=0, FinishOpacity=100, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=140)'>ÏßÐÍ͸Ã÷</option>
|
|
|
<option value='Alpha(Opacity=10, FinishOpacity=100, Style=2, StartX=30, StartY=30, FinishX=200, FinishY=200)'>·ÅÉä͸Ã÷</option>
|
|
|
<option value='blur(add=1,direction=14,strength=15)'>Ä£ºýЧ¹û</option>
|
|
|
<option value='blur(add=true,direction=45,strength=30)'>·ç¶¯Ä£ºý</option>
|
|
|
<option value='Wave(Add=0, Freq=60, LightStrength=1, Phase=0, Strength=3)'>ÕýÏÒ²¨ÎÆ</option>
|
|
|
<option value='gray'>ºÚ°×ÕÕƬ</option>
|
|
|
<option value='Chroma(Color=#FFFFFF)'>°×ɫ͸Ã÷</option>
|
|
|
<option value='DropShadow(Color=#999999, OffX=7, OffY=4, Positive=1)'>ͶÉäÒõÓ°</option>
|
|
|
<option value='Shadow(Color=#999999, Direction=45)'>ÒõÓ°</option>
|
|
|
<option value='Glow(Color=#ff9900, Strength=5)'>·¢¹â</option>
|
|
|
<option value='flipv'>´¹Ö±·×ª</option>
|
|
|
<option value='fliph'>×óÓҷת</option>
|
|
|
<option value='grays'>½µµÍ²ÊÉ«</option>
|
|
|
<option value='xray'>X¹âÕÕƬ</option>
|
|
|
<option value='invert'>µ×Ƭ</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
<td width="2%"> </td>
|
|
|
<td noWrap width="20%">¶ÔÆ뷽ʽ:</td>
|
|
|
<td noWrap width="29%">
|
|
|
<select id=d_align size=1 style="width:80px">
|
|
|
<option value='' selected>ĬÈÏ</option>
|
|
|
<option value='left'>×ó¶ÔÆë</option>
|
|
|
<option value='right'>ÓÒ¶ÔÆë</option>
|
|
|
<option value='top'>¶¥²¿</option>
|
|
|
<option value='middle'>Öв¿</option>
|
|
|
<option value='bottom'>µ×²¿</option>
|
|
|
<option value='absmiddle'>¾ø¶Ô¾ÓÖÐ</option>
|
|
|
<option value='absbottom'>¾ø¶Ôµ×²¿</option>
|
|
|
<option value='baseline'>»ùÏß</option>
|
|
|
<option value='texttop'>Îı¾¶¥²¿</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td noWrap width="20%">ͼƬ¿í¶È:</td>
|
|
|
<td noWrap width="29%"><input style="width:80px" type=text id=d_width size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
|
|
|
<td width="2%"> </td>
|
|
|
<td noWrap width="20%">ͼƬ¸ß¶È:</td>
|
|
|
<td noWrap width="29%"><input style="width:80px" type=text id=d_height size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td noWrap width="20%">ÉÏϼä¾à:</td>
|
|
|
<td noWrap width="29%"><input style="width:80px" type=text id=d_vspace size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=2></td>
|
|
|
<td width="2%"> </td>
|
|
|
<td noWrap width="20%">×óÓÒ¼ä¾à:</td>
|
|
|
<td noWrap width="29%"><input style="width:80px" type=text id=d_hspace size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=2></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
</td></tr>
|
|
|
</table>
|
|
|
</fieldset>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
</td><td width="40%" height="100%">
|
|
|
|
|
|
<fieldset style="height:100%">
|
|
|
<legend>Ô¤ÀÀ</legend>
|
|
|
<table border=0 cellpadding=0 cellspacing=5 width="200" height="200" valign=top>
|
|
|
<tr><td colspan=2 bgcolor=#FFFFFF align=center valign=middle id=tdPreview height="100%">
|
|
|
|
|
|
</td></tr>
|
|
|
<tr><td id=tdPreviewSize></td><td align=right><input type=button id=btnPreivew onclick="doPreview()" value="Ô¤ÀÀ"></td></tr>
|
|
|
</table>
|
|
|
</fieldset>
|
|
|
|
|
|
</td></tr>
|
|
|
<tr><td noWrap align=right colspan=2><input type=submit value='È·¶¨' id=Ok onclick="ok()"> <input type=button value='È¡Ïû' onclick="window.close();"></td></tr>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
<img id=imgPreview src='' border=0 style="visibility:hidden" onload="setPreview()">
|
|
|
|
|
|
</body>
|
|
|
</html> |