|
|
|
|
<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 = "";
|
|
|
|
|
var sTitle = "";
|
|
|
|
|
|
|
|
|
|
var oControl;
|
|
|
|
|
var oSeletion;
|
|
|
|
|
var sRangeType;
|
|
|
|
|
|
|
|
|
|
var sImage = "";
|
|
|
|
|
var sRepeat = "";
|
|
|
|
|
var sAttachment = "";
|
|
|
|
|
|
|
|
|
|
var sCheckFlag = "sys";
|
|
|
|
|
|
|
|
|
|
if (URLParams['action'] == "other"){
|
|
|
|
|
sAction = "OTHER"
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
sImage = dialogArguments.d_image.value;
|
|
|
|
|
sRepeat = dialogArguments.d_repeat.value;
|
|
|
|
|
sAttachment = dialogArguments.d_attachment.value;
|
|
|
|
|
sCheckFlag = "url";
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
sAction = "INSERT";
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD>ҳ";
|
|
|
|
|
|
|
|
|
|
oSelection = dialogArguments.eWebEditor.document.selection.createRange();
|
|
|
|
|
sRangeType = dialogArguments.eWebEditor.document.selection.type;
|
|
|
|
|
|
|
|
|
|
if (sRangeType == "Control") {
|
|
|
|
|
oControl = GetControl(oSelection, "TABLE");
|
|
|
|
|
}else{
|
|
|
|
|
oControl = GetImageParent(oSelection.parentElement());
|
|
|
|
|
}
|
|
|
|
|
if (oControl) {
|
|
|
|
|
switch(oControl.tagName){
|
|
|
|
|
case "TD":
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD>";
|
|
|
|
|
break;
|
|
|
|
|
case "TR":
|
|
|
|
|
case "TH":
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
sAction = "MODI";
|
|
|
|
|
sImage = oControl.style.backgroundImage;
|
|
|
|
|
sRepeat = oControl.style.backgroundRepeat;
|
|
|
|
|
sAttachment = oControl.style.backgroundAttachment;
|
|
|
|
|
sCheckFlag = "url";
|
|
|
|
|
sImage = sImage.substr(4, sImage.length-5)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
document.write("<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(" + sTitle + ")</title>");
|
|
|
|
|
|
|
|
|
|
function InitDocument(){
|
|
|
|
|
SearchSelectValue(d_repeat, sRepeat.toLowerCase());
|
|
|
|
|
SearchSelectValue(d_attachment, sAttachment.toLowerCase());
|
|
|
|
|
d_fromurl.value = sImage;
|
|
|
|
|
RadioClick(sCheckFlag);
|
|
|
|
|
|
|
|
|
|
adjustDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetImageParent(obj){
|
|
|
|
|
while(obj!=null && obj.tagName!="TD" && obj.tagName!="TR" && obj.tagName!="TH" && obj.tagName!="TABLE")
|
|
|
|
|
obj=obj.parentElement;
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetControl(obj, sTag){
|
|
|
|
|
obj=obj.item(0);
|
|
|
|
|
if (obj.tagName==sTag){
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function RadioClick(what){
|
|
|
|
|
switch(what){
|
|
|
|
|
case "url":
|
|
|
|
|
d_checkfromurl.checked=true;
|
|
|
|
|
d_checkfromsys.checked=false;
|
|
|
|
|
d_checkcancel.checked=false;
|
|
|
|
|
d_fromurl.disabled=false;
|
|
|
|
|
d_fromsys.disabled=true;
|
|
|
|
|
break;
|
|
|
|
|
case "sys":
|
|
|
|
|
d_checkfromurl.checked=false;
|
|
|
|
|
d_checkfromsys.checked=true;
|
|
|
|
|
d_checkcancel.checked=false;
|
|
|
|
|
d_fromurl.disabled=true;
|
|
|
|
|
d_fromsys.disabled=false;
|
|
|
|
|
break;
|
|
|
|
|
case "cancel":
|
|
|
|
|
d_checkfromurl.checked=false;
|
|
|
|
|
d_checkfromsys.checked=false;
|
|
|
|
|
d_checkcancel.checked=true;
|
|
|
|
|
d_fromurl.disabled=true;
|
|
|
|
|
d_fromsys.disabled=true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ReturnValue(){
|
|
|
|
|
if (d_fromurl.value==""){
|
|
|
|
|
sImage = "";
|
|
|
|
|
sRepeat = "";
|
|
|
|
|
sAttachment = "";
|
|
|
|
|
}else{
|
|
|
|
|
if (sAction == "OTHER"){
|
|
|
|
|
sImage = d_fromurl.value;
|
|
|
|
|
}else{
|
|
|
|
|
sImage = "url(" + d_fromurl.value + ")";
|
|
|
|
|
}
|
|
|
|
|
sRepeat = d_repeat.options[d_repeat.selectedIndex].value;
|
|
|
|
|
sAttachment = d_attachment.options[d_attachment.selectedIndex].value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch(sAction){
|
|
|
|
|
case "MODI":
|
|
|
|
|
oControl.style.backgroundImage = sImage;
|
|
|
|
|
oControl.style.backgroundRepeat = sRepeat;
|
|
|
|
|
oControl.style.backgroundAttachment = sAttachment;
|
|
|
|
|
break;
|
|
|
|
|
case "OTHER":
|
|
|
|
|
dialogArguments.d_image.value = sImage;
|
|
|
|
|
dialogArguments.d_repeat.value = sRepeat;
|
|
|
|
|
dialogArguments.d_attachment.value = sAttachment;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
dialogArguments.setHTML("<table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'><tr><td valign=top id='eWebEditor_TempElement_Background'>"+dialogArguments.getHTML()+"</td></tr></table>", true);
|
|
|
|
|
var oTempElement = dialogArguments.eWebEditor.document.getElementById("eWebEditor_TempElement_Background");
|
|
|
|
|
oTempElement.style.backgroundImage = sImage;
|
|
|
|
|
oTempElement.style.backgroundRepeat = sRepeat;
|
|
|
|
|
oTempElement.style.backgroundAttachment = sAttachment;
|
|
|
|
|
oTempElement.removeAttribute("id");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.returnValue = null;
|
|
|
|
|
window.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ok(){
|
|
|
|
|
if (d_checkfromurl.checked){
|
|
|
|
|
ReturnValue();
|
|
|
|
|
}
|
|
|
|
|
if (d_checkfromsys.checked){
|
|
|
|
|
d_fromurl.value = relativePath2setPath("sysimage/bg/" + d_fromsys.options[d_fromsys.selectedIndex].value);
|
|
|
|
|
ReturnValue();
|
|
|
|
|
}
|
|
|
|
|
if (d_checkcancel.checked){
|
|
|
|
|
d_fromurl.value="";
|
|
|
|
|
ReturnValue();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function DisableItems(){
|
|
|
|
|
d_checkfromurl.disabled=true;
|
|
|
|
|
d_checkfromsys.disabled=true;
|
|
|
|
|
d_checkcancel.disabled=true;
|
|
|
|
|
d_fromurl.disabled=true;
|
|
|
|
|
d_fromsys.disabled=true;
|
|
|
|
|
d_repeat.disabled=true;
|
|
|
|
|
d_attachment.disabled=true;
|
|
|
|
|
Ok.disabled=true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AbleItems(){
|
|
|
|
|
d_checkfromurl.disabled=false;
|
|
|
|
|
d_checkfromsys.disabled=false;
|
|
|
|
|
d_checkcancel.disabled=false;
|
|
|
|
|
d_fromurl.disabled=false;
|
|
|
|
|
d_fromsys.disabled=false;
|
|
|
|
|
d_repeat.disabled=false;
|
|
|
|
|
d_attachment.disabled=false;
|
|
|
|
|
Ok.disabled=false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</HEAD>
|
|
|
|
|
|
|
|
|
|
<BODY onload="InitDocument()">
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=5 id=tabDialogSize><tr><td>
|
|
|
|
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0 align=center>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend>ͼƬ<EFBFBD><EFBFBD>Դ</legend>
|
|
|
|
|
<table border=0 cellpadding=5 cellspacing=0 width="100%">
|
|
|
|
|
<tr><td>
|
|
|
|
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=2 width="100%">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="20%" noWrap><input type=radio id="d_checkfromurl" onclick="RadioClick('url')"><label for=d_checkfromurl><EFBFBD><EFBFBD><EFBFBD><EFBFBD></label>:</td>
|
|
|
|
|
<td width="80%" noWrap colspan=2><input type=text id="d_fromurl" style="width:100%" size=30 value=""></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="20%" noWrap><input type=radio id="d_checkfromsys" onclick="RadioClick('sys')"><label for=d_checkfromsys>ϵͳ</label>:</td>
|
|
|
|
|
<td noWrap>
|
|
|
|
|
<select id="d_fromsys" size=1 style="width:80px">
|
|
|
|
|
<option value="snow.gif" selected>ѩ<EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="nature.jpg"><EFBFBD><EFBFBD>Ȼ</option>
|
|
|
|
|
<option value="clear.jpg"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="glacier.jpg"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="fiesta.jpg"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="birthday.gif"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="citrus.gif"><EFBFBD><EFBFBD>Ҷ</option>
|
|
|
|
|
<option value="hearts.gif"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="flower.gif"><EFBFBD>ʻ<EFBFBD></option>
|
|
|
|
|
<option value="gathering.jpg"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="christmas.gif">ʥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="ivy.gif"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="tech.gif"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="maize.jpg"><EFBFBD><EFBFBD>ɫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value="grid.gif"><EFBFBD><EFBFBD>ɫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
<td noWrap><input type=radio id="d_checkcancel" onclick="RadioClick('cancel')"><label for=d_checkcancel>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ</label> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td height=5></td></tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend><EFBFBD><EFBFBD>ʾЧ<EFBFBD><EFBFBD></legend>
|
|
|
|
|
<table border=0 cellpadding=5 cellspacing=0 width="100%">
|
|
|
|
|
<tr><td>
|
|
|
|
|
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=2 width="100%">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="20%" noWrap>ƽ<EFBFBD>̷<EFBFBD>ʽ:</td>
|
|
|
|
|
<td width="29%" noWrap>
|
|
|
|
|
<select id=d_repeat size=1 style="width:80px">
|
|
|
|
|
<option value=''selected>Ĭ<EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='repeat'><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='no-repeat'><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='repeat-x'><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='repeat-y'><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
<td width="2%"> </td>
|
|
|
|
|
<td width="20%" noWrap><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD>:</td>
|
|
|
|
|
<td width="29%" noWrap>
|
|
|
|
|
<select id=d_attachment size=1 style="width:80px">
|
|
|
|
|
<option value='' selected>Ĭ<EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='scroll'><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
|
|
|
|
<option value='fixed'><EFBFBD>̶<EFBFBD></option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td height=5></td></tr>
|
|
|
|
|
<tr><td noWrap align=right><input type=submit value='ȷ<EFBFBD><EFBFBD>' id=Ok onclick="ok()"> <input type=button value='ȡ<EFBFBD><EFBFBD>' onclick="window.close();"></td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|