⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modifyimage.aspx

📁 Portal C# Article Live
💻 ASPX
字号:
<%@ Page Language="c#" AutoEventWireup="true" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import namespace="Interspire.ArticleLive.Web" %>
<HTML>
	<HEAD>
		<title><%= ResourceHelper.GetAdminString("ImageManager") %>
		</title>
		<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"><LINK href="../Template/Styles.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body>
		<script language="javascript">
		window.close();
		
var myPage = window.opener;

window.onload = setValues;

// var cellBgColor = myTable.selectedTD.bgColor;
var imageWidth = myPage.selectedImage.width;
var imageHeight = myPage.selectedImage.height;
var imageAlign = myPage.selectedImage.align;
var imageBorder = myPage.selectedImage.border;
var imageAltTag = myPage.selectedImage.alt;
var imageHspace = myPage.selectedImage.hspace;
var imageVspace = myPage.selectedImage.vspace;

function setValues() {

	imageForm.image_width.value = imageWidth;
	imageForm.image_height.value = imageHeight;

	if (imageBorder == "") {
		imageBorder = "0"
	}

	imageForm.border.value = imageBorder;
	imageForm.alt_tag.value = imageAltTag;
	imageForm.hspace.value = imageHspace;
	imageForm.vspace.value = imageVspace;
	// tableForm.cell_width.value = cellWidth;
	this.focus();
}

function doModify() {

	var error = 0;
	if (isNaN(imageForm.image_width.value) || imageForm.image_width.value < 0) {
		alert('<%=Util.SimpleEscape(ResourceHelper.GetAdminString("InvalidImageWidth"))%>')
		error = 1
		imageForm.image_width.select()
		imageForm.image_width.focus()
	} else if (isNaN(imageForm.image_height.value) || imageForm.image_height.value < 0) {
		alert('<%=Util.SimpleEscape(ResourceHelper.GetAdminString("InvalidImageHeight"))%>')
		error = 1
		imageForm.image_height.select()
		imageForm.image_height.focus()
	} else if (isNaN(imageForm.border.value) || imageForm.border.value < 0 || imageForm.border.value == "") {
		alert('<%=Util.SimpleEscape(ResourceHelper.GetAdminString("InvalidImageBorder"))%>')
		error = 1
		imageForm.border.select()
		imageForm.border.focus()
	} else if (isNaN(imageForm.hspace.value) || imageForm.hspace.value < 0) {
		alert('<%=Util.SimpleEscape(ResourceHelper.GetAdminString("InvalidImageHorizontalSpacing"))%>')
		error = 1
		imageForm.hspace.select()
		imageForm.hspace.focus()
	} else if (isNaN(imageForm.vspace.value) || imageForm.vspace.value < 0) {
		alert('<%=Util.SimpleEscape(ResourceHelper.GetAdminString("InvalidImageVerticalSpacing"))%>')
		error = 1
		imageForm.vspace.select()
		imageForm.vspace.focus()
	}

	if (error != 1) {
        	myPage.selectedImage.width = imageForm.image_width.value
			myPage.selectedImage.height = imageForm.image_height.value
			myPage.selectedImage.alt = imageForm.alt_tag.value
			myPage.selectedImage.border = imageForm.border.value
    
	if (imageForm.hspace.value != "") {
			myPage.selectedImage.hspace = imageForm.hspace.value
	} else {
			myPage.selectedImage.removeAttribute('hspace',0)
	}

	if (imageForm.vspace.value != "") {
			myPage.selectedImage.vspace = imageForm.vspace.value
	} else {
			myPage.selectedImage.removeAttribute('vspace',0)
	}

	if (imageForm.align[imageForm.align.selectedIndex].text != "None") {
       		myPage.selectedImage.align = imageForm.align[imageForm.align.selectedIndex].text
	} else {
       		myPage.selectedImage.removeAttribute('align',0)
	}
        
    window.close()
	}
}

function printAlign() {
	if ((imageAlign != undefined) && (imageAlign != "")) {
		document.write('<option selected>' + imageAlign)
		document.write('<option>None')
	} else {
		document.write('<option selected>None')
	}
}

function printvAlign() {
	if ((imagevAlign != undefined) && (imagevAlign != "")) {
		document.write('<option selected>' + imagevAlign)
		document.write('<option>None')
	} else {
		document.write('<option selected>None')
	}
}

document.onkeydown = function () { 
			if (event.keyCode == 13) {	// ENTER
				doModify()			
			}
}

document.onkeypress = onkeyup = function () { 				
	if (event.keyCode == 13) {	// ENTER
	event.cancelBubble = true;
	event.returnValue = false;
	return false;				
	}
};

		</script>
		<form name="imageForm">
			<div class="BodyContainer" style="MARGIN-TOP: 20px; MARGIN-BOTTOM: 20px">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="Heading1"><%=ResourceHelper.GetAdminString("ModifyImage")%></td>
					</tr>
					<tr>
						<td class="Intro"><div><%=ResourceHelper.GetAdminString("ModifyImageIntro")%></div></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<table width="100%" border="0" class="Panel">
								<tr>
									<td class="Heading2" colSpan="4"><%=ResourceHelper.GetAdminString("ModifyImage")%></td>
								</tr>
								<tr>
									<td class="FieldLabel" style="width: 1%;"><%=ResourceHelper.GetAdminString("AltTextLabel")%></td>
									<td colspan="3" width="100%">
										<input type="text" name="alt_tag" size="50" class="Field" style='WIDTH: 100%'>
									</td>
								</tr>
								<tr>
									<td class="FieldLabel" style="width: 1%;"><%=ResourceHelper.GetAdminString("ImageWidthLabel")%></td>
									<td style="width: 100%;">
										<input type="text" name="image_width" size="3" class="Field" style='WIDTH: 80px' maxlength="3">
									</td>
									<td class="FieldLabel" style="width: 1%;"><%=ResourceHelper.GetAdminString("HeightLabel")%></td>
									<td>
										<input type="text" name="image_height" size="3" class="Field" style='WIDTH: 80px' maxlength="3">
									</td>
								</tr>
								<tr>
									<td class="FieldLabel" style="width: 1%;"><%=ResourceHelper.GetAdminString("AlignmentLabel")%></td>
									<td>
										<SELECT class="Field" name="align" style='WIDTH: 80px'>
											<script>printAlign()</script>
											<option selected>
											Baseline
											<option>
											Top
											<option>
											Middle
											<option>
											Bottom
											<option>
											TextTop
											<option>
											ABSMiddle
											<option>
											ABSBottom
											<option>
											Left
											<option>Right</option>
										</SELECT>
									</td>
									<td class="FieldLabel" style="width: 1%;"><%=ResourceHelper.GetAdminString("BorderLabel")%></td>
									<td>
										<input type="text" name="border" size="3" class="Field" style='WIDTH: 80px' maxlength="3">
									</td>
								</tr>
								<tr>
									<td class="FieldLabel" style="width: 1%;" nowrap><%=ResourceHelper.GetAdminString("HorizontalSpacingLabel")%></td>
									<td>
										<input type="text" name="hspace" size="3" class="Field" style='WIDTH: 80px' maxlength="3">
									</td>
									<td class="FieldLabel" style="width: 1%;" nowrap><%=ResourceHelper.GetAdminString("VerticalSpacingLabel")%></td>
									<td>
										<input type="text" name="vspace" size="3" class="Field" style='WIDTH: 80px' maxlength="3">
									</td>
								</tr>
								<tr><td colspan="4" class="Gap" style='height: 5px;'></td></tr>
								<tr><td colspan="4" class="ClearGap"></td></tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<input type="button" name="modifyImage" value='<%=ResourceHelper.GetAdminString("Modify")%>' class="FormButton" onClick="javascript:doModify();">
							<input type="Cancel")%>' class="FormButton" onClick="javascript:window.close()">
						</td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -