|
|
|
|
<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 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
|
|
|
|
|
var oControl;
|
|
|
|
|
var oChild;
|
|
|
|
|
var oSeletion;
|
|
|
|
|
var sRangeType;
|
|
|
|
|
|
|
|
|
|
var sAlignFieldset = "";
|
|
|
|
|
var sAlignLegend = "";
|
|
|
|
|
var sBorderColor = "";
|
|
|
|
|
var sBgColor = "";
|
|
|
|
|
|
|
|
|
|
oSelection = dialogArguments.eWebEditor.document.selection.createRange();
|
|
|
|
|
sRangeType = dialogArguments.eWebEditor.document.selection.type;
|
|
|
|
|
|
|
|
|
|
if (sRangeType == "Control") {
|
|
|
|
|
if (oSelection.item(0).tagName == "FIELDSET"){
|
|
|
|
|
sAction = "MODI";
|
|
|
|
|
sTitle = "<EFBFBD><EFBFBD>";
|
|
|
|
|
oControl = oSelection.item(0);
|
|
|
|
|
sAlignFieldset = oControl.align;
|
|
|
|
|
oChild = GetChildElement(oControl,"LEGEND");
|
|
|
|
|
if (oChild) sAlignLegend = oChild.align;
|
|
|
|
|
sBorderColor = oControl.style.borderColor;
|
|
|
|
|
sBgColor = oControl.style.backgroundColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.write("<title><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(" + sTitle + ")</title>");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function InitDocument(){
|
|
|
|
|
SearchSelectValue(d_alignfieldset, sAlignFieldset.toLowerCase());
|
|
|
|
|
SearchSelectValue(d_alignlegend, sAlignLegend.toLowerCase());
|
|
|
|
|
|
|
|
|
|
d_bordercolor.value = sBorderColor;
|
|
|
|
|
s_bordercolor.style.backgroundColor = sBorderColor;
|
|
|
|
|
d_bgcolor.value = sBgColor;
|
|
|
|
|
s_bgcolor.style.backgroundColor = sBgColor;
|
|
|
|
|
|
|
|
|
|
adjustDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// get first child element from same tag object
|
|
|
|
|
function GetChildElement(obj, sTag){
|
|
|
|
|
var el;
|
|
|
|
|
for (var i=0;i<obj.children.length;i++){
|
|
|
|
|
if (obj.children[i].tagName==sTag){
|
|
|
|
|
return obj.children[i];
|
|
|
|
|
}else{
|
|
|
|
|
el=GetChildElement(obj.children[i], sTag);
|
|
|
|
|
if (el){
|
|
|
|
|
return el;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<SCRIPT event=onclick for=Ok language=JavaScript>
|
|
|
|
|
// is valid bordercolor
|
|
|
|
|
sBorderColor = d_bordercolor.value;
|
|
|
|
|
if (!IsColor(sBorderColor)){
|
|
|
|
|
BaseAlert(d_bordercolor,"<EFBFBD><EFBFBD>Ч<EFBFBD>ı߿<EFBFBD><EFBFBD><EFBFBD>ɫֵ<EFBFBD><EFBFBD>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// is valid bgcolor
|
|
|
|
|
sBgColor = d_bgcolor.value;
|
|
|
|
|
if (!IsColor(sBgColor)){
|
|
|
|
|
BaseAlert(d_bgcolor,"<EFBFBD><EFBFBD>Ч<EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫֵ<EFBFBD><EFBFBD>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sAlignFieldset = d_alignfieldset.options[d_alignfieldset.selectedIndex].value;
|
|
|
|
|
sAlignLegend = d_alignlegend.options[d_alignlegend.selectedIndex].value;
|
|
|
|
|
|
|
|
|
|
if (sAction == "MODI") {
|
|
|
|
|
oControl.align = sAlignFieldset;
|
|
|
|
|
if (oChild) oChild.align = sAlignLegend;
|
|
|
|
|
oControl.style.borderColor = sBorderColor;
|
|
|
|
|
oControl.style.backgroundColor = sBgColor;
|
|
|
|
|
}else{
|
|
|
|
|
dialogArguments.insertHTML("<fieldset align='"+sAlignFieldset+"' style='border-color:"+sBorderColor+";background-color:"+sBgColor+"'><legend align="+sAlignLegend+"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></legend><EFBFBD><EFBFBD><EFBFBD><EFBFBD></fieldset>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.returnValue = null;
|
|
|
|
|
window.close();
|
|
|
|
|
</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><EFBFBD>뷽ʽ</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%"><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
|
|
|
|
|
<td noWrap width="29%"><select id=d_alignfieldset size=1 style="width:80px"><option value=''>Ĭ<EFBFBD><EFBFBD></option><option value='left'><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option><option value='center'><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD></option><option value='right'><EFBFBD>Ҷ<EFBFBD><EFBFBD><EFBFBD></option></select></td>
|
|
|
|
|
<td width="2%"> </td>
|
|
|
|
|
<td noWrap width="20%"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
|
|
|
|
|
<td noWrap width="29%"><select id=d_alignlegend size=1 style="width:80px"><option value=''>Ĭ<EFBFBD><EFBFBD></option><option value='left'><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option><option value='center'><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD></option><option value='right'><EFBFBD>Ҷ<EFBFBD><EFBFBD><EFBFBD></option></select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td height=5></td></tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend><EFBFBD><EFBFBD>ɫ<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 noWrap width="20%"><EFBFBD>߿<EFBFBD><EFBFBD><EFBFBD>ɫ:</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>
|
|
|
|
|
<td width="2%"> </td>
|
|
|
|
|
<td noWrap width="20%"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ:</td>
|
|
|
|
|
<td noWrap width="29%"><input style="width:62px" type=text id=d_bgcolor size=7 value=""><img border=0 src="../sysimage/rect.gif" width=18 style="cursor:hand" id=s_bgcolor onclick="SelectColor('bgcolor')" align=absmiddle></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> <input type=button value='ȡ<EFBFBD><EFBFBD>' onclick="window.close();"></td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td></tr></table>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|