📄 explorer_files_new_externallink
字号:
<?xml version="1.0" encoding="ISO-8859-1"?>
<WORKPLACE>
<TEMPLATE>
<![CDATA[
<HTML>
<script language=JavaScript>
<!--
top.head.helpUrl=']]><LABEL value="help.explorer.new.link"/><![CDATA[';
//-->
</script>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=]]><METHOD name="getEncoding"/><![CDATA[">
<script language=JavaScript>
<!--
// this function is invoked when the user selected
// a file/folder in the treeview window...
function copySelection() {
var visibleForm = "1";
if(document.getElementById('isInNav').style.visibility=="visible"){
visibleForm = "1";
}
else {
visibleForm = "2";
}
var name = "" + document.getElementById("name"+visibleForm).value;
var link = "" + document.getElementById("neulink"+visibleForm).value;
//link = link.replace(/^(\s+)/,"").replace(/(\s+)$/,"");
if (link.charAt(link.length-1)!="/") {
document.getElementById("name"+visibleForm).value = link.substring( link.lastIndexOf("/")+1, link.length );
}
else {
document.getElementById("name"+visibleForm).value = "";
}
checkValues();
}
function checkForm(whichone){
var okay=true;
var lengthOkay=true;
var inp=document.getElementById("name"+whichone).value;
for(var i=0;i<inp.length;i++){
if(inp.charAt(i)=='%' || inp.charAt(i)=='#' || inp.charAt(i)=='&'){
okay=false;
badchar=inp.charAt(i);
}
}
if(whichone==1){
var inp=document.getElementById("navtext").value;
for(var i=0;i<inp.length;i++){
if(inp.charAt(i)=='%' || inp.charAt(i)=='#' || inp.charAt(i)=='&'){
okay=false;
badchar=inp.charAt(i);
}
}
}
if(okay==false)alert("]]><LABEL value="error.message.badcharacter" /><![CDATA["+badchar);
if(document.getElementById("name"+whichone).value.length<1)lengthOkay=false;
if(document.getElementById("neulink"+whichone).value.length<1)lengthOkay=false;
if(whichone==1){
if(document.getElementById("navtext").value.length<1)lengthOkay=false;
}
if(!lengthOkay)alert("]]><LABEL value="error.message.datamissing" /><![CDATA[");
if(okay && lengthOkay){
if(whichone==2){
var re='explorer_files_new_externallink.html?step=1&resource='+
escape(document.getElementById("name"+whichone).value)+
'&link='+escape(document.getElementById("neulink"+whichone).value)+
'&addtonav='+document.getElementById("addtonav"+whichone).checked;
//alert(re);
document.location.href=re;
}
if(whichone==1){
var re='explorer_files_new_externallink.html?step=1&resource='+
escape(document.getElementById("name"+whichone).value)+
'&link='+escape(document.getElementById("neulink"+whichone).value)+
'&navtitle='+escape(document.getElementById("navtext").value)+
'&navpos='+ document.getElementById("linkPos").value+
'&addtonav='+document.getElementById("addtonav"+whichone).checked;
//alert(re);
document.location.href=re;
}
}
}
function switchLayerData(from,to){
var temp1=document.getElementById("name"+from).value;
var temp2=document.getElementById("neulink"+from).value;
document.getElementById("name"+to).value=temp1;
document.getElementById("neulink"+to).value=temp2;
checkValues();
}
function switchlyr(show, hide){
hidelyr(hide);
showlyr(show);
}
function showlyr(welche){
document.getElementById(welche).style.visibility = "visible";
}
function hidelyr(welche){
document.getElementById(welche).style.visibility = "hidden";
}
function switchLayer2(t){
switchlyr('isInNav','notInNav');
switchLayerData(2,1);
t.checked=false;
}
function switchLayer1(t){
switchlyr('notInNav','isInNav');
switchLayerData(1,2);
t.checked=true;
}
function setValues(){
var theName = ']]><process>LINKNAME</process><![CDATA[';
var theValue = ']]><process>LINKVALUE</process><![CDATA[';
var theNavtitle = ']]><process>NAVTITLE</process><![CDATA[';
var addToNav = ]]><process>ADDTONAV</process><![CDATA[;
document.getElementById("name1").value = theName;
document.getElementById("neulink1").value = theValue;
document.getElementById("navtext").value = theNavtitle;
document.getElementById("name2").value = theName;
document.getElementById("neulink2").value = theValue;
if (theName.length==0 && theValue.length==0) {
addToNav = false;
keepProperties = true;
}
if (addToNav) {
document.getElementById('isInNav').style.visibility = "visible";
document.getElementById('notInNav').style.visibility = "hidden";
}
else {
document.getElementById('isInNav').style.visibility = "hidden";
document.getElementById('notInNav').style.visibility = "visible";
}
checkValues();
}
function checkValues() {
var name = "";
var link = "";
var navtext = "";
if(document.getElementById('isInNav').style.visibility=="visible") {
name += document.getElementById("name1").value;
link += document.getElementById("neulink1").value;
navtext += document.getElementById("navtext").value;
if (name.length>0 && link.length>0 && navtext.length>0) {
document.forms.NEU1.WEITER.disabled = false;
}
else {
document.forms.NEU1.WEITER.disabled = true;
}
}
else {
name += document.getElementById("name2").value;
link += document.getElementById("neulink2").value;
if (name.length>0 && link.length>0) {
document.forms.NEU2.WEITER.disabled = false;
}
else {
document.forms.NEU2.WEITER.disabled = true;
}
}
return true;
}
function fillValues(theValue) {
var visibleForm = "1";
if(document.getElementById('isInNav').style.visibility == "visible") {
visibleForm = "1";
} else {
visibleForm = "2";
}
var curForm = document.forms["NEU" + visibleForm];
var linkname = theValue;
if (linkname.charAt(linkname.length - 1) == "/") {
linkname = linkname.substring(0, linkname.length - 1);
theValue = linkname;
}
if (linkname.lastIndexOf("/") != -1) {
linkname = linkname.substring(linkname.lastIndexOf("/") + 1);
}
if (theValue.indexOf("/") != -1) {
theValue = theValue.substring(0, theValue.lastIndexOf("/") + 1);
}
var curPath = "]]><METHOD name="getCurrentPathUri"></METHOD><![CDATA[";
if (curPath == theValue) {
linkname = "link_" + linkname;
}
curForm.elements["name" + visibleForm].value = linkname;
checkValues();
}
//-->
</script>
<title>OpenCms</title>
<link rel=stylesheet type="text/css" href="]]><method name="resourcesUri">format.css</method><![CDATA[">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="]]><method name="scriptsUri">opencms.js</method><![CDATA["></SCRIPT>
</HEAD>
<body bgcolor="#ffffff" background="]]><METHOD name="resourcesUri">bg_weiss.gif</METHOD><![CDATA[" bgproperties=fixed marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 onload="setValues();" onunload="top.closeTreeWin();">
<table width=100% height=100% border=0 cellspacing=0 cellpadding=0>
<tr><td align=center valign=middle>
<!-- 2 -->
<div id="notInNav" style="visibility:visible; FONT-FAMILY: MS Sans Serif, Arial, helvetica, sans-serif; FONT-SIZE: 8pt; position: absolute; LEFT: 0px; TOP: 0px; width:100%; height:100%; ">
<br>
<br>
<br>
<form name="NEU2">
<table border=2 cellspacing=0 cellpadding=0 width=500px>
<tr><td>
<table cellspacing=0 cellpadding=5 border=0 width=100% height=100%>
<tr><td colspan=3 class=head>]]><LABEL value="title.newlink" /><![CDATA[</td></tr>
<tr><td colspan=3 class=leerzeile> </td></tr>
<tr>
<td class=formular>]]><LABEL value="input.linkto" /><![CDATA[:</td>
<td class=dialogtxt>
<input type="text" name="neulink2" class="textfeld3" size="31" onchange="checkValues();" />
</td>
</tr>
<tr>
<td class=formular width=35%>]]><LABEL value="input.name" /><![CDATA[:</td>
<td colspan=2 class=dialogtxt> ]]><INPUTFIELD name="name2" class="textfeld3" size="31" length="40" method="setValue" action="onKeyup='checkValues()'"/><![CDATA[</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -