?? header-action.vm
字號:
#*
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*#
<script language="JavaScript" src="javascript/ColorPicker.js"></script>
<SCRIPT language=JavaScript>
var cp = new ColorPicker('window'); // Popup window
var cp2 = new ColorPicker(); // DIV style
function refreshHeader()
{
window.location.href = unescape(window.location.pathname);
}
//for setting headers background
function enableBgImage(val)
{
if (fieldname = "setBgImage")
{
if (val == 'true')
{
document.myForm2.bgImage.disabled = false;
document.myForm2.sampleBgImage.disabled = false;
}
if (val == 'false')
{
document.myForm2.bgImage.disabled = true;
document.myForm2.sampleBgImage.disabled = true;
}
}
}
//setting headers' background color
function enableBgColor(val)
{
if (fieldname = "setBgColor")
{
if (val == 'true')
{
document.myForm2.bgColor.disabled = false;
document.getElementById('pick4').style.visibility="visible";
}
if (val == 'false')
{
document.myForm2.bgColor.disabled = true;
document.getElementById('pick4').style.visibility="hidden";
}
}
}
//setting headers' font color
function enableFontColor(val)
{
if (val == 'true')
{
document.myForm2.fontColor.disabled = false;
document.getElementById('pick5').style.visibility="visible";
}
if (val == 'false')
{
document.myForm2.fontColor.disabled = true;
document.getElementById('pick5').style.visibility="hidden";
}
}
</SCRIPT>
<body>
<form name="myForm2" action="$jslink" method="post" ENCTYPE="multipart/form-data">
#formHeader("images/designer/headerIcon.gif" "Header Designer")
#if ($settingStatus || $logoStatus || $bgStatus)
<table width="100%" cellspacing="2">
#if($logoStatus || $bgStatus)
<tr>
<td colspan=2>
<b>
#if($logoStatus)$logoStatus#end
#if($bgStatus)
#if($logoStatus)<br>#end
$bgStatus<br>
#end
Click button to go back.
</b>
</td>
<td><br>
<input type="button" value="Back" onClick="refreshHeader()">
</td>
<tr>
#else
<tr>
<td>
<b>
$settingStatus
Click button to apply changes.
</b>
</td>
</tr>
<tr>
<td><br>
<input type="button" value="Apply" onClick="refreshHeader()">
</td>
</tr>
#end
<tr>
<td>
<table width="200"></table>
</td>
</tr>
</table>
#else
<table width="100%" cellspacing="2" cellpadding="1">
<tr class="rowheader">
<td colspan=2>
<b>Header Settings</b>
</td>
</tr>
<tr class="evenrow">
<td>Change Portal Title?</td>
<td>
Yes<input type="radio" name="setTitle" value="true" onClick="document.myForm2.portalTitle.disabled=false">
No<input type="radio" name="setTitle" value="false" onClick="document.myForm2.portalTitle.disabled=true" checked>
</td>
</tr>
<tr class="oddrow">
<td>New Portal Title </td>
<td><input type="text" name="portalTitle" size="30" disabled></td>
</tr>
<tr class="evenrow">
<td>Change Current Logo? </td>
<td>
Yes<input type="radio" name="setLogo" value="true" onClick="document.myForm2.imgLogo.disabled=false">
No<input type="radio" name="setLogo" value="false" onClick="document.myForm2.imgLogo.disabled=true" checked></td>
</tr>
<tr class="oddrow">
<td>Upload Logo</td>
<td><input type="file" size="40" name="imgLogo" disabled></td>
</tr>
<tr class="evenrow">
<td>Change Current Background Image?</td>
<td>
Yes<input type="radio" name="setBgImage" value="true" onClick="enableBgImage('true');">
No<input type="radio" name="setBgImage" value="false" onClick="enableBgImage('false');" checked>
Sample Background
<select name="sampleBgImage" disabled>
<option value="" SELECTED>----
<option value="BGCheckeredBlue.gif">Checkered Blue
<option value="BGWhite.gif">White
<option value="BGGrayBanner.gif">Gray Banner
<option value="BGGrayMarble.jpg">Gray_marble
<option value="BGRedHarmony.jpg">Red harmony
<option value="BGRedScreen.jpg">Red Screen
</select>
</td>
</tr>
<tr class="oddrow" >
<td>Upload Background Image</td>
<td>
<input type="file" size="40" name="bgImage" disabled>
</td>
</tr>
<tr class="evenrow">
<td>Change Current Background Color? </td>
<td>
Yes<input type="radio" name="setBgColor" onClick="enableBgColor('true');" value="true">
No<input type="radio" name="setBgColor" onClick="enableBgColor('false');" value="false" checked>
</td>
</tr>
<tr class="oddrow">
<td>Background Color </td>
<td>
<input type="text" size="30" name="bgColor" disabled>
<A id="pick4" onclick="cp2.select(document.myForm2.bgColor,'pick4');return false;" href="#" name="pick4" style="visibility:hidden">
Color Picker
</a>
</td>
</tr>
<tr class="evenrow">
<td>Change Current Font Size?</td>
<td>
Yes<input type="radio" name="setFontSize" onClick="document.myForm2.fontSize.disabled=false" value="true">
No<input type="radio" name="setFontSize" onClick="document.myForm2.fontSize.disabled=true" value="false" checked></td>
</tr>
<tr class="oddrow">
<td>Font Size </td>
<td><input type="text" size="30" name="fontSize" disabled></td>
</tr>
<tr class="evenrow">
<td>Change Current Font Color?</td>
<td>
Yes<input type="radio" name="setFontColor" onClick="enableFontColor('true');" value="true">
No<input type="radio" name="setFontColor" onClick="enableFontColor('false'); "value="false" checked></td>
</tr>
<tr class="oddrow">
<td>Font Color</td>
<td>
<input type="text" size="30" name="fontColor" disabled>
<A id="pick5" onclick="cp2.select(document.myForm2.fontColor,'pick5');return false;" href="#" name="pick5" style="visibility:hidden">
Color Picker
</a>
</td>
</tr>
<tr>
<td colspan=2><br>
<input type="submit" name="eventSubmit_doUpload" value="Submit" >
<input type="submit" name="eventSubmit_doDefault" value="Default">
<input type="reset" value="Reset">
</td>
</tr>
</table>#end<script language="JavaScript">cp.writeDiv()</script>
</form>
</body>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -