<%@ page language="C#" autoeventwireup="true" inherits="PartConfig_SelectColumn, App_Web_o7zimql7" %>

<!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>
    <base target="_self"/>
    <link rel="stylesheet" href="../Style/Common.css" />
    <link rel="stylesheet" href="../style/Dialog.css" />

    <script type="text/javascript" src="../Script/Common.js"></script>
    <script type="text/javascript">
var tbColumn, btnOk, lstColumns;
function Page_Init()
    {
	tbColumn = $('tbColumn');
	btnOk = $('btnOk');
	lstColumns = $('lstColumns');
	lstColumns.onclick = lstColumns_Click;
    }
var colName='', titlePath='';
function lstColumns_Click()
    {
	var obj = event.srcElement;
	var colOpt = ListUtil.GetSelectedOption( obj );
	if( colOpt ){
	    btnOk.disabled = false;
	    titlePath = colOpt.text;
	    colName = colOpt.value;//alert( titlePath+'   '+colName);
	}
    }
function btnOk_Click()
    {
	var ret = { name: colName, title: titlePath };
	window.parent.returnValue = ret;
	window.close();
    }
    </script>
    <style type="text/css">
.ContentArea{
    width: 92%;
    margin: 8px auto;
}
#lstColumns{
    width: 100%;
    height: 370px;
    border: 1px solid #7f9db9;
    margin-bottom: 6px;
}
    </style>
</head>
<body><form id="form1" runat="server">

    <div class="TopArea">
        <h1>选择内容栏目</h1>
        <div class="HeadLogo"></div>
    </div>
    
    <div class="ContentArea">
        <asp:ListBox ID="lstColumns" runat="server"></asp:ListBox>
    </div>
     
    <div class="BottomArea">
        <span class="LeftBlock">
            <asp:Label ID="lbResult" runat="server" ForeColor="Red"></asp:Label>
        </span>
        <span class="RightBlock">
            <input id="btnOk"  type="button" class="Button" value="确定" onclick="btnOk_Click();" disabled="disabled"/>
            <input id="btnCancel" type="button" class="Button" value="取消" onclick="window.close();" />
        </span>
    </div>

</form>
<script type="text/javascript" language="javascript">
try{ Page_Init(); }catch(ex){;}
try{ Page_Resize(); window.onresize=Page_Resize; }catch(ex){;}
try{ Page_Load(); }catch(ex){;}
</script>
</body>
</html>

<%--
//var curColumn=null, curColSet = '';
//var SiteName, PagePath, CtrlId, Ajax;
//function Page_load()	//用户登录 系统启动
//    {
//	var arg = window.dialogArguments;
//	if( !arg || !arg.SiteName ) {
//	    window.close();
//	    return;
//	}
//	SiteName = arg.SiteName;
//	PagePath = arg.PagePath;
//	CtrlId = arg.CtrlId;
//	if( arg.name )
//	    ByState( 'column', arg.name, arg.title );
//	    
//	FreshTree();
//	Ajax = new AjaxRequest( '../ColumnManage/ColumnOp.aspx', FreshTree, null );
//    }
//function ByState( type, cname, ctitle )
//    {
//	btnOk.disabled = true;
//	state = type;
//	
//	switch( type ){
//	case'root':
//	    tbColumn.value = '(站点内容栏目)';
//	    curColSet = '_';
//	    break;
//	case'column':
//	    tbColumn.value = "栏目：" + ctitle
//	    curColumn = {name: cname, title: ctitle };
//	    btnOk.disabled = false;
//	    break;
//	case'columnSet':
//	    tbColumn.value = "栏目集：" + ctitle;
//	    curColSet = cname;
//	    break;
//	default:
//	    state = '';
//	}
//    }
//function FreshTree()
//    {
//	var url = new UrlText( 'ColumnTree.aspx', ['sitename', SiteName], 'uni' );
//	$('TreeFrame').src = url.Text;
//    }--
<%--<input id="tbColumn" type="text" style="width:99%;" disabled="disabled" />--
<%--<input id="btnCreate" type="button" class="Button" value="新建栏目" onclick="btnCreate_Click();" disabled="disabled"/>--%>
