You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
9.8 KiB
Plaintext

10 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridSortSetting.aspx.cs" Inherits="DSWeb.UserSettings.GridSortSetting" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>委托列表信息排列设置</title>
<link href="../theme/tab.css" type="text/css" rel="stylesheet" />
<link rel="STYLESHEET" type="text/css" href="../theme/page.css"/>
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css"/>
<link href="../theme/style.css" type="text/css" rel="Stylesheet" media="screen"/>
<script src="../js/jquery/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
var radASC = $("#radASC");
var radDESC = $("#radDESC");
$("#radASC").click(function () {
if (radDESC.attr("checked")) {
radDESC.attr("checked", false);
radASC.attr("checked",true);
}
});
$("#radDESC").click(function () {
if (radASC.attr("checked")) {
radASC.attr("checked", false);
radDESC.attr("checked", true);
}
});
});
function radioChecked() {
var radCheck;
if ($("#radDESC").attr("checked")) {
radCheck = "倒序_desc";
}
else if ($("#radASC").attr("checked")) {
radCheck = "顺序_asc";
}
return radCheck;
}
//全选
function moveOptionAll(e1, e2) {
try {
for (var i = 0; i < e1.options.length; i++) {
var e = e1.options[i].value+","+radioChecked();
e2.value = e2.value + "[" + e.trim() + "]\n";
}
}
catch (e) { }
}
//选择单个textbox
function moveOption(e1, e2) {
try {
var radvalue = radioChecked();
for (var i = 0; i < e1.options.length; i++) {
if (e1.options[i].selected) {
var e = e1.options[i];
e2.value = e2.value + "[" + e.value+","+radvalue+ "]\r\n";
//e1.remove(i);
//i=i-1
}
}
document.myform.city.value = getvalue(document.myform.list2);
}
catch (e) { }
}
//选择单个listbox
function moveOption2(e1, e2) {
try {
var radvalue = radioChecked();
for (var i = 0; i < e1.options.length; i++) {
if (e1.options[i].selected) {
var e1text = e1.options[i].text;
var e1value = e1.options[i].value;
for (var j = 0; j < e2.options.length; j++) {
var e2value = e2.options[j].value.split(' ')[0];
if (e1value == e2value) {
alert("该字段已经添加,请重新选择!");
return;
}
else {
continue;
}
}
eval(e2).add(new Option(e1text + " " + radvalue.split('_')[0], e1value+" " +radvalue.split('_')[1]));
}
}
document.myform.city.value = getvalue(document.myform.list2);
}
catch (e) { }
}
//移除一项
function removeOption(event) {
var count =0;
try {
for (var i = 0; i < event.options.length; i++) {
if (event.options[i].selected) {
event.remove(i);
i--;
count++;
}
}
if (count == 0) {
alert("您还没有选择要移除的项!");
return false;
}
else {
return true;
}
}
catch (e) { }
}
//撤销
function removeALL() {
var listbox3 = document.formTSysTemplateSet.ListBox3;
for (var i = 0; i < listbox3.options.length; i++) {
listbox3.remove(i);
i--;
}
}
function getvalue(geto) {
var allvalue = "";
for (var i = 0; i < geto.options.length; i++) {
allvalue += geto.options[i].value + ",";
}
return allvalue;
}
function changepos(obj, index) {
if (index == -1) {
if (obj.selectedIndex > 0) {
obj.options(obj.selectedIndex).swapNode(obj.options(obj.selectedIndex - 1))
}
}
else if (index == 1) {
if (obj.selectedIndex < obj.options.length - 1) {
obj.options(obj.selectedIndex).swapNode(obj.options(obj.selectedIndex + 1))
}
}
}
function valiIsEmpty() {
var listbox3 = document.formTSysTemplateSet.ListBox3;
var listbox3value="";
//var listbox3text="";
if (listbox3.options.length == 0) {
alert("您还没有选择内容!");
return false;
}
else {
for (var i = 0; i < listbox3.options.length; i++) {
listbox3value += listbox3.options[i].value+",";
//listbox3text += listbox3.options[i].text + ",";
}
//document.getElementById("hd_listbox3Text").value = listbox3text.substr(0, listbox3text.length - 1);
document.getElementById("hd_listbox3").value = listbox3value.substr(0,listbox3value.length-1);
return true;
}
}
function reloadParent() {
window.parent.opener.location.href = window.parent.opener.location.href;
alert("保存成功!");
}
</script>
<style type="text/css">
.btn-content0{
width:100%;
height:30px;
background:url("../images/content-header.gif");
cursor:default;
}
.btncss
{
width:100px;
BORDER-RIGHT: #2C59AA 1px solid;
PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid;
PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5);
BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px;
BORDER-BOTTOM: #2C59AA 1px solid;
}
</style>
</head>
<body style="background-color:#ecf2ff;">
<form id="formTSysTemplateSet" runat="server">
<div>
<table align="center" border="1" cellpadding="1" cellspacing="1">
<tr style="height:30px;">
<td colspan="3"></td>
</tr>
<tr>
<td rowspan="4">
<fieldset>
<legend><span style=" font-size:16px; font-family:新宋体; font-weight:bold; color:#A0522D;">[字段名称]</span></legend>
<asp:ListBox ID="ListBox2" runat="server" Width=260px Height=350px BackColor="#E0FFFF" SelectionMode="Multiple"></asp:ListBox>
</fieldset>
</td>
</tr>
<tr>
<td><input type="hidden" id="hd_listbox3" runat="server" /></td>
<td><input type="hidden" id="hd_listbox3Text" runat="server" /></td>
</tr>
<tr>
<td>
<fieldset>
<legend><span style=" font-size:16px; font-family:新宋体; font-weight:bold; color:#A0522D;">[操作类型]</span></legend>
<table border="1" cellpadding="1" cellspacing="1">
<tr>
<td><input type="radio" id="radASC" checked="checked" class="rad" />顺序<input type="radio" id="radDESC" class="rad" />倒序</td>
</tr>
<tr>
<td><input id="Button2" type="button" value="" style="width:100px;" onclick="moveOption2(document.formTSysTemplateSet.ListBox2, document.formTSysTemplateSet.ListBox3);" class="btncss"/></td>
</tr>
<tr>
<td><input id="Button1" type="button" value="" style="width:100px;" onclick="return removeOption(document.formTSysTemplateSet.ListBox3);" class="btncss"/></td>
</tr>
<tr>
<td><input id="Button3" type="button" value="撤消" style="width:100px;" onclick="removeALL();" class="btncss"/></td>
</tr>
<tr>
<td><asp:Button runat="server" ID="btnSaveSort" CssClass="btncss" Text="保存" Width="100px" OnClientClick="return valiIsEmpty();"
onclick="btnSaveSort_Click" /></td>
</tr>
</table>
</fieldset>
</td>
<td>
<fieldset>
<legend><span style=" font-size:16px; font-family:新宋体; font-weight:bold; color:#A0522D;">[获取字段]</span></legend>
<asp:ListBox ID="ListBox3" runat="server" Width=260px Height=350px BackColor="#E0FFFF" SelectionMode="Multiple"></asp:ListBox>
</fieldset>
</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</div>
</form>
</body>
</html>