You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rw...@apache.org on 2011/08/04 09:59:51 UTC
svn commit: r1153772 - in /geronimo/server/trunk/plugins/console:
console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/
console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/
console-portal-driver/src/main/webapp/
Author: rwonly
Date: Thu Aug 4 07:59:50 2011
New Revision: 1153772
URL: http://svn.apache.org/viewvc?rev=1153772&view=rev
Log:
GERONIMO-6059 use global javascript definitions
Modified:
geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/BundleManager.jsp
geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/FindPackages.jsp
geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/GlobalUtils.js
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/BundleManager.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/BundleManager.jsp?rev=1153772&r1=1153771&r2=1153772&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/BundleManager.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/BundleManager.jsp Thu Aug 4 07:59:50 2011
@@ -136,16 +136,7 @@ function refreshPrompt(target, bundleId,
</c:if>
<th scope="col" width="100">Utilities</th>
</tr>
- <script language="javascript">
- var oldcolor;
- function highlightTr(theTr){
- oldcolor = theTr.style.backgroundColor;
- theTr.style.backgroundColor = '#e2ebfe';
- }
- function recoverTr(theTr){
- theTr.style.backgroundColor = oldcolor;
- }
- </script>
+
<c:set var="backgroundClass" value='MediumBackground'/>
<c:forEach var="bundleInfo" items="${extendedBundleInfos}">
<c:choose>
@@ -156,7 +147,7 @@ function refreshPrompt(target, bundleId,
<c:set var="backgroundClass" value='MediumBackground'/>
</c:otherwise>
</c:choose>
- <tr class="${backgroundClass}" onmouseover="highlightTr(this)" onmouseout="recoverTr(this)">
+ <tr class="${backgroundClass}" onmouseover="highlightBgColor(this)" onmouseout="recoverBgColor(this)">
<!-- bundle id -->
<td> ${bundleInfo.bundleId} </td>
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/FindPackages.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/FindPackages.jsp?rev=1153772&r1=1153771&r2=1153772&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/FindPackages.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/bundlemanager/FindPackages.jsp Thu Aug 4 07:59:50 2011
@@ -38,21 +38,7 @@
</tr>
</table>
<br/>
-<script language="javascript">
-function showHideById(id) {
- document.getElementById(id).style.display = (document.getElementById(id).style.display=='none')?'block':'none';
-}
-</script>
-<script language="javascript">
-var oldcolor;
-function highlightBg(theTr){
- oldcolor = theTr.style.backgroundColor;
- theTr.style.backgroundColor = '#e2ebfe';
-}
-function recoverBg(theTr){
- theTr.style.backgroundColor = oldcolor;
-}
-</script>
+
<table width="100%" class="TableLine" summary="Find Packages Result">
<tr class="DarkBackground">
<th scope="col">Search Result (Click to see package's exporter and importer)</th>
@@ -69,7 +55,7 @@ function recoverBg(theTr){
</c:choose>
<tr class="${backgroundClass}">
<td>
- <div style="cursor:pointer;clear:both;" onmouseover="highlightBg(this)" onmouseout="recoverBg(this)" onclick="showHideById('eiDiv-'+${status.index})">
+ <div style="cursor:pointer;clear:both;" onmouseover="highlightBgColor(this)" onmouseout="recoverBgColor(this)" onclick="showHideById('eiDiv-'+${status.index})">
${pwb.packageInfo.packageName} (version=${pwb.packageInfo.packageVersion})
</div>
<div id="eiDiv-${status.index}" style="background-color:#F0F8FF;display:none">
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp?rev=1153772&r1=1153771&r2=1153772&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp Thu Aug 4 07:59:50 2011
@@ -219,14 +219,14 @@ function toggleShowDependenciesMode() {
<c:set var="backgroundClass" value='MediumBackground'/>
</c:otherwise>
</c:choose>
- <tr>
+ <tr class="${backgroundClass}" onmouseover="highlightBgColor(this)" onmouseout="recoverBgColor(this)">
<!-- module id -->
<c:choose>
<c:when test="${moduleDetails.componentName != null}">
- <td class="${backgroundClass}"> ${moduleDetails.componentName} </td>
+ <td>${moduleDetails.componentName}</td>
</c:when>
<c:otherwise>
- <td class="${backgroundClass}"> ${moduleDetails.configId} </td>
+ <td>${moduleDetails.configId}</td>
</c:otherwise>
</c:choose>
@@ -234,81 +234,81 @@ function toggleShowDependenciesMode() {
<c:if test="${showDisplayName}">
<c:choose>
<c:when test="${moduleDetails.displayName != null}">
- <td class="${backgroundClass}"> ${moduleDetails.displayName} </td>
+ <td>${moduleDetails.displayName}</td>
</c:when>
<c:otherwise>
- <td class="${backgroundClass}"> </td>
+ <td></td>
</c:otherwise>
</c:choose>
</c:if>
<!-- context path -->
<c:if test="${showWebInfo}">
- <td class="${backgroundClass}">
+ <td width="150">
<c:if test="${moduleDetails.state.running}">
<c:forEach var="contextPath" items="${moduleDetails.contextPaths}">
- <a href="${contextPath}">${contextPath}</a> <br/>
+ <a href="${contextPath}">${contextPath}</a><br/>
</c:forEach>
</c:if>
</td>
</c:if>
<!-- state -->
- <td width="100" class="${backgroundClass}"> ${moduleDetails.state} </td>
+ <td width="75">${moduleDetails.state}</td>
<!-- Start/Stop actions -->
- <td width="75" class="${backgroundClass}">
+ <td width="60">
<c:if test="${moduleDetails.state.running || moduleDetails.state.failed}">
<span <c:if test="${moduleDetails.expertConfig}"> name=expert </c:if>>
- <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='stop'/></portlet:actionURL>" onClick="return promptIfUnsafeToStop(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.stop"/></a>
+ <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='stop'/></portlet:actionURL>" onClick="return promptIfUnsafeToStop(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.stop"/></a>
</span>
</c:if>
<c:if test="${moduleDetails.expertConfig && (moduleDetails.state.running || moduleDetails.state.failed)}">
<span name=nonexpert>
- <a><fmt:message key="consolebase.common.stop"/></a>
+ <a><fmt:message key="consolebase.common.stop"/></a>
</span>
</c:if>
<c:if test="${moduleDetails.state.stopped && (moduleDetails.type.name ne 'CAR' || moduleDetails.clientAppServerSide)}">
- <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='start'/></portlet:actionURL>"><fmt:message key="consolebase.common.start"/></a>
+ <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='start'/></portlet:actionURL>"><fmt:message key="consolebase.common.start"/></a>
</c:if>
</td>
<!-- Restart action -->
- <td width="75" class="${backgroundClass}">
+ <td width="60">
<c:if test="${moduleDetails.state.running}">
<span <c:if test="${moduleDetails.expertConfig}"> name=expert </c:if>>
- <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='restart'/></portlet:actionURL>" onClick="return promptIfUnsafeToRestart(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.restart"/></a>
+ <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='restart'/></portlet:actionURL>" onClick="return promptIfUnsafeToRestart(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.restart"/></a>
</span>
</c:if>
<c:if test="${moduleDetails.expertConfig && moduleDetails.state.running}">
<span name=nonexpert>
- <a><fmt:message key="consolebase.common.restart"/></a>
+ <a><fmt:message key="consolebase.common.restart"/></a>
</span>
</c:if>
</td>
<!-- Uninstall action -->
- <td width="75" class="${backgroundClass}">
+ <td width="60">
<span <c:if test="${moduleDetails.expertConfig}"> name=expert </c:if>>
- <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='uninstall'/></portlet:actionURL>" onClick="return uninstallPrompt(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.uninstall"/></a>
+ <a href="<portlet:actionURL><portlet:param name='configId' value='${moduleDetails.configId}'/><portlet:param name='action' value='uninstall'/></portlet:actionURL>" onClick="return uninstallPrompt(this, '${moduleDetails.configId}','${moduleDetails.expertConfig}','${moduleDetails.type.name}');"><fmt:message key="consolebase.common.uninstall"/></a>
</span>
<c:if test="${moduleDetails.expertConfig}">
<span name=nonexpert>
- <a><fmt:message key="consolebase.common.uninstall"/></a>
+ <a><fmt:message key="consolebase.common.uninstall"/></a>
</span>
</c:if>
</td>
<c:if test="${showDependencies}">
<!-- Parents -->
- <td class="${backgroundClass}">
+ <td>
<c:forEach var="parent" items="${moduleDetails.parents}">
${parent} <br>
</c:forEach>
</td>
<!-- Children -->
- <td class="${backgroundClass}">
+ <td>
<c:forEach var="child" items="${moduleDetails.children}">
${child} <br>
</c:forEach>
Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/GlobalUtils.js
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/GlobalUtils.js?rev=1153772&r1=1153771&r2=1153772&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/GlobalUtils.js (original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/GlobalUtils.js Thu Aug 4 07:59:50 2011
@@ -14,6 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//======================================================================
+/**** Global Confirm ****/
function showGlobalConfirmMessage(msg){
if (window.parent!=window.self){
return parent.globalConfirm(msg);
@@ -22,6 +23,7 @@ function showGlobalConfirmMessage(msg){
}
}
+/**** Status Div ****/
function showGlobalStatus(txt){
if (window.parent!=window.self) {
parent.showStatus(txt);
@@ -33,3 +35,19 @@ function hideGlobalStatus(){
setTimeout("parent.hideStatus()", 300);
}
}
+
+/**** highlight background-color ****/
+var oldBgColor;
+function highlightBgColor(target){
+ oldBgColor = target.style.backgroundColor;
+ target.style.backgroundColor = '#e2ebfe';
+}
+
+function recoverBgColor(target){
+ target.style.backgroundColor = oldBgColor;
+}
+
+/**** show hide by Id ****/
+function showHideById(id) {
+ document.getElementById(id).style.display = (document.getElementById(id).style.display=='none')?'block':'none';
+}
\ No newline at end of file