📄 createlabel_browse.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="manage_label_createLabel_Browse" Codebehind="createLabel_Browse.aspx.cs" %>
<!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>
<title></title>
<link href="../../sysImages/<% Response.Write(NetCMS.Config.UIConfig.CssPath()); %>/css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Public.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/jsPublic.js"></script>
<script type="text/javascript" src="../../editor/fckeditor.js"></script>
</head>
<body>
<form id="ListLabel" runat="server">
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF" class="table">
<tr class="TR_BG_list">
<td align="right" class="navi_link" style="width: 15%">引用样式</td>
<td align="left" class="navi_link">
<asp:DropDownList ID="Root" runat="server" CssClass="form" onchange="javascript:selectRoot(this.value);">
<asp:ListItem Value="true">固定样式</asp:ListItem>
<asp:ListItem Value="false">自定义样式</asp:ListItem>
</asp:DropDownList>
<label id="TrStyleID">
引用样式 <asp:TextBox ID="StyleID" runat="server" CssClass="form" Width="120px" ReadOnly="true"></asp:TextBox>
<img src="../../sysImages/folder/s.gif" style="cursor:pointer;" title="选择样式" onclick="selectFile('style',document.ListLabel.StyleID,300,420);document.ListLabel.StyleID.focus();" /><span id="sapnStyleID"></span>
</label>
</td>
</tr>
<tr class="TR_BG_list" id="TrUserDefined" style="display:none;">
<td align="right" class="navi_link">
自定义样式
<div style="height:3px;margin:2px 0 4px 0;"></div>
<input name="saveStyled" value="保存样式" type="button" onclick="ShowStyle();" />
<div id="showOther" style="display:none;">
<div style="height:3px;border-bottom:1px dotted #999999;margin:2px 0 4px 0;"></div>
<asp:TextBox ID="StyleName" Width="94px" runat="server"></asp:TextBox>
<div style="height:3px;border-bottom:1px dotted #999999;margin:2px 0 4px 0;"></div>
<asp:DropDownList ID="StyleClassID" Width="100px" runat="server">
</asp:DropDownList>
<div style="height:3px;border-bottom:1px dotted #999999;margin:2px 0 4px 0;"></div>
<input name="saveStyle" id="saveStyle" value="保存" type="button" onclick="savePostStyle();" />
<div id="sResultHTML" class="reshow"></div>
</div>
</td>
<td align="left" class="navi_link">
<div>
<label id="style_base" runat="server" />
<label id="style_class" runat="server" />
<label id="style_special" runat="server" />
<asp:DropDownList ID="define" CssClass="form" runat="server" Width="150px" onchange="javascript:setValue(this.value);">
<asp:ListItem Value="">自定义字段</asp:ListItem>
</asp:DropDownList>
</div>
<%-- <script type="text/javascript" language="JavaScript">
window.onload = function()
{
var sBasePath = "../../editor/"
var oFCKeditor = new FCKeditor('UserDefined') ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Width = '100%' ;
oFCKeditor.ToolbarSet = 'NT_Basicstyle';
oFCKeditor.Height = '150' ;
oFCKeditor.ReplaceTextarea() ;
}
</script>--%>
<textarea rows="10" cols="90" name="UserDefined" id="UserDefined" ></textarea>
<script language="javascript" type="text/javascript">
function ShowStyle()
{
if(document.getElementById("showOther").style.display=="none")
{
document.getElementById("showOther").style.display="";
}
}
function savePostStyle()
{
var saveStyle= document.getElementById("saveStyle");
var sname=document.getElementById("StyleName");
var StyleClassID=document.getElementById("StyleClassID");
if(sname.value=="")
{
alert('请填写样式名称');
sname.focus();
return false;
}
if(StyleClassID.value=="")
{
alert('请选择分类,如果没有分类,请在样式中创建');
return false;
}
var olEditor = FCKeditorAPI.GetInstance("UserDefined");
var gtemproot = olEditor.GetXHTML(true);
var url="SaveStyle.aspx"
var actionstr="StyleName="+escape(sname.value)+"&ClassID="+escape(StyleClassID.value)+"&Content="+escape(gtemproot)+"";
var divID = "sResultHTML";
pubPostajax(url,actionstr,divID)
}
</script>
</td>
</tr>
<tr class="TR_BG_list">
<td colspan="2" align="center" class="navi_link"> <input class="form" type="button" value=" 确 定 " onclick="javascript:ReturnDivValue();" /> <input class="form" type="button" value=" 关 闭 " onclick="javascript:CloseDiv();" /></td>
</tr>
</table>
</form>
</body>
</html>
<script language="javascript" type="text/javascript">
function selectRoot(type)
{
if(type=="false")
{ document.getElementById("TrStyleID").style.display="none";document.getElementById("TrUserDefined").style.display=""; }
else
{ document.getElementById("TrStyleID").style.display="";document.getElementById("TrUserDefined").style.display="none"; }
}
function ReturnDivValue()
{
var CheckStr=true;
if(document.ListLabel.Root.value=="true")
{
if(checkIsNull(document.ListLabel.StyleID,document.getElementById("sapnStyleID"),"请选择样式"))
CheckStr=false;
}
var rvalue="[NT:unLoop,NT:SiteID=<%Response.Write(APIID); %>,NT:LabelType=ReadNews";
if(document.ListLabel.Root.value=="true")
{ temproot = "[#NT:StyleID=" + document.ListLabel.StyleID.value+"]"; }
else
{
temproot = document.getElementById("UserDefined").value;
}
rvalue += "]";
rvalue += temproot;
rvalue += "[/NT:unLoop]";
if(CheckStr)
parent.getValue(rvalue);
}
function CloseDiv()
{
parent.document.getElementById("LabelDivid").style.display="none";
}
function checkIsNull(obj,spanobj,error)
{
if(obj.value=="")
{
spanobj.innerHTML="<span class=reshow>(*)"+error+"</spna>";
return true;
}
return false;
}
function getValue(value)
{
document.all.UserDefined.focus();
var tarobj = document.selection.createRange();
tarobj.text = value;
// var oEditor = FCKeditorAPI.GetInstance("UserDefined");
// if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
// {
// oEditor.InsertHtml(value);
// }
// else
// {
// return false;
// }
}
function setValue(value)
{
document.all.UserDefined.focus();
var tarobj = document.selection.createRange();
tarobj.text = '{NT:define='+value+'}';
// var oEditor = FCKeditorAPI.GetInstance("UserDefined");
// if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
// {
// oEditor.InsertHtml('{NT:define='+value+'}');
// }
// else
// {
// return false;
// }
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -