portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1662827 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view: locale-list.jsp userreg/forgottenPasswd.vm userreg/userRegistration.vm
Date Fri, 27 Feb 2015 21:56:18 GMT
Author: taylor
Date: Fri Feb 27 21:56:18 2015
New Revision: 1662827

URL: http://svn.apache.org/r1662827
Log:
JS2-1317: Improve core J2-Admin portlets to make use of responsive styles when portal page
is configured for responsive. 

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/locale-list.jsp
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/forgottenPasswd.vm
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/userRegistration.vm

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/locale-list.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/locale-list.jsp?rev=1662827&r1=1662826&r2=1662827&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/locale-list.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/locale-list.jsp
Fri Feb 27 21:56:18 2015
@@ -13,10 +13,16 @@ See the License for the specific languag
 limitations under the License.
 --%>
 <%@ page language="java" import="javax.portlet.*, java.util.List, java.util.Iterator"
session="true" %>
+<%@page import="org.apache.jetspeed.request.RequestContext"%>
+
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+
+<c:set var="requestContext" value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
 <c:set var="currentLocale"><%= request.getAttribute("currentLocale") %></c:set>
+<c:set var="responsive" value='${requestContext.getAttribute("org.apache.jetspeed.theme.responsive")}'/>
+
 <fmt:setBundle basename="org.apache.jetspeed.portlets.localeselector.resources.LocaleSelectorResources"
/>
 
 <portlet:actionURL var="changeLocaleAction">
@@ -28,19 +34,39 @@ function setLanguage(lang)
 	document.langChng.submit();
 }
 </script>
-<form name="langChng" action="<%=changeLocaleAction%>" method="POST">
-<table border="0">
-	<tr>
-		<td align="left"><fmt:message key="localeselector.label.language"/></td>
-	</tr>
-	<tr>
-		<td align="left">
-			<c:set var="locales"><fmt:message key="localeselector.locales"/></c:set>
-			<c:forTokens var="l" items="${locales}" delims=",">
-				<a href="javascript:setLanguage('<c:out value="${l}"/>')" title="<fmt:message
key="localeselector.locale.${l}"/>""><img border="0" src="<%=request.getContextPath()%><c:out
value="/images/${l}.gif"/>" /></a>
-			</c:forTokens>
-		</td>
-	</tr>
-</table>
-<input type="hidden" name="prefered_locale" value=""/>
-</form>
\ No newline at end of file
+<c:choose>
+<c:when test='${responsive}'>
+<form class="form-horizontal" name="langChng" action="<%=changeLocaleAction%>" method="POST">
+  <div class="form-group no-margin-bottom">
+    <label class="col-sm-12"><fmt:message key="localeselector.label.language"/></label>
+  </div>
+  <div class="form-group no-margin-bottom">
+    <label class="col-sm-12">
+        <c:set var="locales"><fmt:message key="localeselector.locales"/></c:set>
+        <c:forTokens var="l" items="${locales}" delims=",">
+            <a href="javascript:setLanguage('<c:out value="${l}"/>')" title="<fmt:message
key="localeselector.locale.${l}"/>""><img border="0" src="<%=request.getContextPath()%><c:out
value="/images/${l}.gif"/>" /></a>
+        </c:forTokens>
+    </label>
+  </div>
+  <input type="hidden" name="prefered_locale" value=""/>
+</form>
+</c:when>
+<c:otherwise>
+    <form name="langChng" action="<%=changeLocaleAction%>" method="POST">
+        <table border="0">
+            <tr>
+                <td align="left"><fmt:message key="localeselector.label.language"/></td>
+            </tr>
+            <tr>
+                <td align="left">
+                    <c:set var="locales"><fmt:message key="localeselector.locales"/></c:set>
+                    <c:forTokens var="l" items="${locales}" delims=",">
+                        <a href="javascript:setLanguage('<c:out value="${l}"/>')"
title="<fmt:message key="localeselector.locale.${l}"/>""><img border="0" src="<%=request.getContextPath()%><c:out
value="/images/${l}.gif"/>" /></a>
+                    </c:forTokens>
+                </td>
+            </tr>
+        </table>
+        <input type="hidden" name="prefered_locale" value=""/>
+    </form>
+</c:otherwise>
+</c:choose>
\ No newline at end of file

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/forgottenPasswd.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/forgottenPasswd.vm?rev=1662827&r1=1662826&r2=1662827&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/forgottenPasswd.vm
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/forgottenPasswd.vm
Fri Feb 27 21:56:18 2015
@@ -15,26 +15,70 @@
   limitations under the License.
 *#
 #set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set ($responsive = $rc.getAttribute("org.apache.jetspeed.theme.responsive"))
 
-<div id="ForgottenPassword"  class="portlet-section-text"> 
+#if ($responsive)
+<div id="ForgottenPassword">
 	#if($updatedPWMsg)
-		<table>
-			<tr><td colspan="2" ><p class="portlet-msg-success">$updatedPWMsg</p></td></tr>
-		</table>
+		<div class="row">
+			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"><p class="portlet-msg-success">$updatedPWMsg</p></div>
+		</div>
 	#else	
 		<form name="forgottenPasswordForm" action="$renderResponse.createActionURL()" method="post"
>
-		<table>
-			<tr><td colspan="2" >
+		<div class="row">
+			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
 				$MESSAGES.getString('page.message') 
 				#if($MSG )
 		 			<br>
 		 			<p class="portlet-msg-error">$!MSG</p>
 		 		#end
-			</td></tr>
-			
-			<tr><td>$MESSAGES.getString('page.email')</td><td><input type="text"
name="email" value="$!email" /></td></tr>
-			<tr><td colspan="2" > <input type="submit" value="$MESSAGES.getString('page.button')"
 name="Request New Password" /> </td></tr>
-		</table>
+            </div>
+        </div>
+
+        <br />
+
+        <div class="row">
+			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
+
+                <div class="form-group no-margin-bottom">
+                    <label for="forgottenPasswordEmail">$MESSAGES.getString('page.email')</label>
+                    <div class="input-group">
+                        <input type="email" name="forgottenPasswordEmail" id="forgottenPasswordEmail"
class="form-control" value="$!email" />
+                        <span class="input-group-btn">
+                            <button type="submit" name="Request New Password" class="btn
btn-default">$MESSAGES.getString('page.button')</button>
+                        </span>
+                    </div>
+                </div>
+			</div>
+		</div>
 	    </form>
     #end
 </div>
+
+#else
+
+<div id="ForgottenPassword"  class="portlet-section-text">
+    #if($updatedPWMsg)
+        <table>
+            <tr><td colspan="2" ><p class="portlet-msg-success">$updatedPWMsg</p></td></tr>
+        </table>
+    #else
+        <form name="forgottenPasswordForm" action="$renderResponse.createActionURL()"
method="post" >
+            <table>
+                <tr><td colspan="2" >
+                    $MESSAGES.getString('page.message')
+                    #if($MSG )
+                        <br>
+                        <p class="portlet-msg-error">$!MSG</p>
+                    #end
+                </td></tr>
+
+                <tr><td>$MESSAGES.getString('page.email')</td><td><input
type="text" name="email" value="$!email" /></td></tr>
+                <tr><td colspan="2" > <input type="submit" value="$MESSAGES.getString('page.button')"
 name="Request New Password" /> </td></tr>
+            </table>
+        </form>
+    #end
+</div>
+
+#end

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/userRegistration.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/userRegistration.vm?rev=1662827&r1=1662826&r2=1662827&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/userRegistration.vm
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/userreg/userRegistration.vm
Fri Feb 27 21:56:18 2015
@@ -17,45 +17,131 @@
 #set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
 #set ($refreshLink = $renderResponse.createRenderURL())
 $refreshLink.setParameter("reset", "true")
-<div id="UserRegistration"  class="portlet-section-text"> 
-	#if($registeredUserMsg)
-		<table >
-			<tr><td colspan="2" ><p class="portlet-msg-success" >$registeredUserMsg</p></td></tr>
-			<tr><td colspan="2" ><p class="portlet-msg-success"><a href="$refreshLink">Click
here to start registration...</a></p></td></tr>
-		</table>
-	#else
-	<form name="userRegistrationForm" action="$renderResponse.createActionURL()" method="post"
>
-	<table>
-		<tr><td colspan="2" > 
-			$MESSAGES.getString('page.welcome')
-			#if($MSG )
-	 			<p style='color:red'>$!MSG</p>
-	 		#end	
-		</td></tr>
-		
-		#if($CTX_Option_Use_Email_As_Username)
-		#else
-		<tr><td>$MESSAGES.getString('page.username')</td><td><input
type="text" name="user.name" value="$!{user.get("user.name")}" /></td></tr>
-		#end
-		<tr><td>$MESSAGES.getString('page.email.address')</td><td><input
type="text" name="user.business-info.online.email" value="$!{user.get("user.business-info.online.email")}"
/></td></tr>
-		
-		#if($CTX_Option_Generate_Passwords)
-		#else
-		<tr><td>$MESSAGES.getString('page.password')</td><td><input
type="password" name="password" value="" /></td></tr>
-		<tr><td>$MESSAGES.getString('page.passwordVerify')</td><td><input
type="password" name="verifyPassword" value="" /></td></tr>
-		#end
-		
-		#foreach( $fieldName in $fieldsInOrder )
-			#set($pagestring = "page.${fieldName}") 
-			#if( $optionalMap.get($fieldName) )
-			<tr><td>${MESSAGES.getString($pagestring)} $MESSAGES.getString("page.optional")</td><td><input
type="text" name="$fieldName" value="$!{user.get($fieldName)}" /></td></tr>
-			#else
-			<tr><td>${MESSAGES.getString($pagestring)}</td><td><input type="text"
name="$fieldName" value="$!{user.get($fieldName)}" /></td></tr>
-			#end		
-		#end
-		
-		<tr><td colspan="2" > <input type="submit" value="$MESSAGES.getString('page.button')"
name="Register Me" /> </td></tr>
-	</table>
-    </form>    
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set ($responsive = $rc.getAttribute("org.apache.jetspeed.theme.responsive"))
+
+#if ($responsive)
+<div id="UserRegistration">
+    #if($registeredUserMsg)
+        <table>
+            <tr><td colspan="2" ><p class="portlet-msg-success" >$registeredUserMsg</p></td></tr>
+            <tr><td colspan="2" ><p class="portlet-msg-success"><a href="$refreshLink">Click
here to start registration...</a></p></td></tr>
+        </table>
+    #else
+        <form name="userRegistrationForm" action="$renderResponse.createActionURL()" method="post"
class="form-horizontal">
+            <div class="form-group">
+                <label class="col-sm-12">
+                    $MESSAGES.getString('page.welcome')
+                    #if($MSG )
+                        <p style='color:red'>$!MSG</p>
+                    #end
+                </label>
+            </div>
+            #if($CTX_Option_Use_Email_As_Username)
+            #else
+                <div class="form-group">
+                    <label for="user.name" class="col-sm-2 control-label">$MESSAGES.getString('page.username')</label>
+                    <div class="col-sm-10">
+                        <input type="text" name="user.name" class="form-control" value="$!{user.get("user.name")}"
/>
+                    </div>
+                </div>
+            #end
+            <div class="form-group">
+                <label for="user.business-info.online.email" class="col-sm-2 control-label">$MESSAGES.getString('page.email.address')</label>
+                <div class="col-sm-10">
+                    <input type="email" name="user.business-info.online.email" class="form-control"
value="$!{user.get("user.business-info.online.email")}" />
+                </div>
+            </div>
+
+            #if($CTX_Option_Generate_Passwords)
+            #else
+                <div class="form-group">
+                    <label for="password" class="col-sm-2 control-label">$MESSAGES.getString('page.password')</label>
+                    <div class="col-sm-10">
+                        <input type="password" name="password" class="form-control" value=""
/>
+                    </div>
+                </div>
+
+                <div class="form-group">
+                    <label for="verifyPassword" class="col-sm-2 control-label">$MESSAGES.getString('page.passwordVerify')</label>
+                    <div class="col-sm-10">
+                        <input type="password" name="verifyPassword" class="form-control"
value="" />
+                    </div>
+                </div>
+            #end
+
+            #foreach( $fieldName in $fieldsInOrder )
+                #set($pagestring = "page.${fieldName}")
+                #if( $optionalMap.get($fieldName) )
+                    <div class="form-group">
+                        <label for="$fieldName" class="col-sm-2 control-label">${MESSAGES.getString($pagestring)}
$MESSAGES.getString("page.optional")</label>
+                        <div class="col-sm-10">
+                            <input type="password" name="$fieldName" class="form-control"
value="$!{user.get($fieldName)}" />
+                        </div>
+                    </div>
+                #else
+                    <div class="form-group">
+                        <label for="$fieldName" class="col-sm-2 control-label">${MESSAGES.getString($pagestring)}</label>
+                        <div class="col-sm-10">
+                            <input type="password" name="$fieldName" class="form-control"
value="$!{user.get($fieldName)}" />
+                        </div>
+                    </div>
+                #end
+            #end
+
+            <div class="form-group">
+                <div class="col-sm-offset-2 col-sm-10">
+                    <button type="submit" name="Register Me" class="btn btn-default">$MESSAGES.getString('page.button')</button>
+                </div>
+            </div>
+            </table>
+        </form>
     #end
 </div>
+
+#else
+
+<div id="UserRegistration"  class="portlet-section-text">
+    #if($registeredUserMsg)
+        <table >
+            <tr><td colspan="2" ><p class="portlet-msg-success" >$registeredUserMsg</p></td></tr>
+            <tr><td colspan="2" ><p class="portlet-msg-success"><a href="$refreshLink">Click
here to start registration...</a></p></td></tr>
+        </table>
+    #else
+        <form name="userRegistrationForm" action="$renderResponse.createActionURL()" method="post"
>
+            <table>
+                <tr><td colspan="2" >
+                    $MESSAGES.getString('page.welcome')
+                    #if($MSG )
+                        <p style='color:red'>$!MSG</p>
+                    #end
+                </td></tr>
+
+                #if($CTX_Option_Use_Email_As_Username)
+                #else
+                    <tr><td>$MESSAGES.getString('page.username')</td><td><input
type="text" name="user.name" value="$!{user.get("user.name")}" /></td></tr>
+                #end
+                <tr><td>$MESSAGES.getString('page.email.address')</td><td><input
type="text" name="user.business-info.online.email" value="$!{user.get("user.business-info.online.email")}"
/></td></tr>
+
+                #if($CTX_Option_Generate_Passwords)
+                #else
+                    <tr><td>$MESSAGES.getString('page.password')</td><td><input
type="password" name="password" value="" /></td></tr>
+                    <tr><td>$MESSAGES.getString('page.passwordVerify')</td><td><input
type="password" name="verifyPassword" value="" /></td></tr>
+                #end
+
+                #foreach( $fieldName in $fieldsInOrder )
+                    #set($pagestring = "page.${fieldName}")
+                    #if( $optionalMap.get($fieldName) )
+                        <tr><td>${MESSAGES.getString($pagestring)} $MESSAGES.getString("page.optional")</td><td><input
type="text" name="$fieldName" value="$!{user.get($fieldName)}" /></td></tr>
+                    #else
+                        <tr><td>${MESSAGES.getString($pagestring)}</td><td><input
type="text" name="$fieldName" value="$!{user.get($fieldName)}" /></td></tr>
+                    #end
+                #end
+
+                <tr><td colspan="2" > <input type="submit" value="$MESSAGES.getString('page.button')"
name="Register Me" /> </td></tr>
+            </table>
+        </form>
+    #end
+</div>
+
+#end
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message