You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by cg...@apache.org on 2012/10/05 16:59:20 UTC

svn commit: r1394560 [2/3] - in /rave/branches/model-split: ./ rave-components/rave-core/ rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/ rave-components/rave-core/src/main/java/org/apache/rave/portal/model/util/ rave-compone...

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext-security.xml
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext-security.xml?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext-security.xml (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext-security.xml Fri Oct  5 14:59:18 2012
@@ -32,7 +32,8 @@
         <security:intercept-url pattern="/static/**" access="permitAll"/>
         <security:intercept-url pattern="/login" access="permitAll"/>
         <security:intercept-url pattern="/newaccount.jsp*" access="permitAll"/>
-        <security:intercept-url pattern="/app/newaccount*" access="permitAll"/>
+		<security:intercept-url pattern="/app/newaccount*" access="permitAll"/>
+		<security:intercept-url pattern="/app/openidregister*" access="permitAll"/>
         <security:intercept-url pattern="/app/newpassword/**" access="permitAll"/>
         <security:intercept-url pattern="/app/retrieveusername/**" access="permitAll"/>
         <security:intercept-url pattern="/app/changepassword/**" access="permitAll"/>
@@ -40,13 +41,25 @@
         <security:intercept-url pattern="/app/admin/**" access="hasRole('ROLE_ADMIN')"/>
         <!-- all urls must be authenticated -->
         <security:intercept-url pattern="/**" access="hasAnyRole('ROLE_USER','ROLE_ADMIN')"/>
-        <security:openid-login user-service-ref="userService" authentication-failure-url="/login?authfail=openid">
-            <security:attribute-exchange>
-                <!-- Supported by MyOpenID.com -->
-                <security:openid-attribute name="firstName" type="http://schema.openid.net/namePerson/first"/>
-                <security:openid-attribute name="lastName" type="http://schema.openid.net/namePerson/last"/>
-                <security:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true"/>
+        <security:openid-login user-service-ref="userService" authentication-failure-handler-ref="openIdAuthFailureHandler">
+            <security:attribute-exchange identifier-match="https://www.google.com.*">
+                <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
+                <security:openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true"/>
+                <security:openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true"/>
             </security:attribute-exchange>
+            <security:attribute-exchange identifier-match=".*openid-provider.appspot.com.*">
+                <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
+                <security:openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true"/>
+                <security:openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true"/>
+            </security:attribute-exchange>
+            <security:attribute-exchange identifier-match=".*yahoo.com.*">
+                <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true"/>
+                <security:openid-attribute name="fullname" type="http://axschema.org/namePerson" required="true"/>
+            </security:attribute-exchange>
+            <security:attribute-exchange identifier-match=".*myopenid.com.*">
+                <security:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="1"/>
+                <security:openid-attribute name="fullname" type="http://schema.openid.net/namePerson" required="true"/>
+             </security:attribute-exchange>
         </security:openid-login>
         <security:form-login login-page="/login" default-target-url="/" authentication-failure-url="/login?authfail=form" />
         <security:logout/>
@@ -78,6 +91,11 @@
         <constructor-arg name="displayNameAttributeName" value="displayName"/>
         <constructor-arg name="pageLayoutCode" value="columns_3"/>
     </bean>
+    
+    <bean id="openIdAuthFailureHandler" class="org.apache.rave.portal.web.controller.handler.OpenIDAuthenticationFailureHandler">
+    	<property name="defaultFailureUrl" value="/login?authfail=openid"/>
+    </bean>
+    
 
     <!-- enable the spring security annotations -->
     <security:global-method-security secured-annotations="enabled" pre-post-annotations="enabled">

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/db/initial_data.sql
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/db/initial_data.sql?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/db/initial_data.sql (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/db/initial_data.sql Fri Oct  5 14:59:18 2012
@@ -181,8 +181,8 @@ UPDATE RAVE_PORTAL_SEQUENCES SET seq_cou
 
 -- duplicate user id!!
 set @user_id_13 = (SELECT seq_count FROM RAVE_PORTAL_SEQUENCES WHERE seq_name = @user_seq);
-insert into person (entity_id, username, password, expired, locked, enabled, email, default_page_layout_id, dtype, family_name, given_name, status)
-values (@user_id_13, 'http://rave2011.myopenid.com/', '$2a$10$dML97.rnOn4.iSlEEdju8OCB2NckuKw0Ki5yMVzzMmWQsWMvym3qC', FALSE, FALSE, TRUE,'rave2011_openid@example.org', @three_col_id, 'User', 'OpenId', 'Rave', 'Single');
+insert into person (entity_id, username, password, expired, locked, enabled, email, default_page_layout_id, dtype, family_name, given_name, status, openid)
+values (@user_id_13, 'rave2011.myopenid.com', '$2a$10$dML97.rnOn4.iSlEEdju8OCB2NckuKw0Ki5yMVzzMmWQsWMvym3qC', FALSE, FALSE, TRUE,'rave2011_openid@example.org', @three_col_id, 'User', 'OpenId', 'Rave', 'Single', 'http://rave2011.myopenid.com/');
 UPDATE RAVE_PORTAL_SEQUENCES SET seq_count = (seq_count + 1) WHERE seq_name = @user_seq;
 
 -- end user data --
@@ -1116,6 +1116,13 @@ values (@next_portal_preference_id, 'jav
 INSERT INTO portal_preference_values
 values (@next_portal_preference_id, '1');
 UPDATE RAVE_PORTAL_SEQUENCES SET seq_count = (seq_count + 1) WHERE seq_name = @portal_preference_seq;
+
+set @next_portal_preference_id = (SELECT seq_count FROM RAVE_PORTAL_SEQUENCES WHERE seq_name = @portal_preference_seq);
+INSERT INTO portal_preference (entity_id, preference_key)
+values (@next_portal_preference_id, 'defaultWidgetHeight');
+INSERT INTO portal_preference_values
+values (@next_portal_preference_id, '250');
+UPDATE RAVE_PORTAL_SEQUENCES SET seq_count = (seq_count + 1) WHERE seq_name = @portal_preference_seq;
 -- end portal preferences
 
 -- category

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp Fri Oct  5 14:59:18 2012
@@ -28,7 +28,7 @@
           <li class="active"><a href="<spring:url value="/app/store/widget/add?referringPageId=${referringPageId}" />">OpenSocial</a></li>
           <li><a href="<spring:url value="/app/store/widget/add/w3c?referringPageId=${referringPageId}" />">W3C</a></li>
           
-          <c:if test="${not empty marketplace}">
+          <c:if test="${not empty marketplace and not empty marketplace.value}">
           <li><a href="<spring:url value="/app/marketplace?referringPageId=${referringPageId}" />">Marketplace</a></li>
           </c:if>
     </ul> 

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.w3c.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.w3c.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.w3c.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.w3c.jsp Fri Oct  5 14:59:18 2012
@@ -27,7 +27,7 @@
     <ul class="nav nav-tabs">
           <li><a href="<spring:url value="/app/store/widget/add?referringPageId=${referringPageId}" />">OpenSocial</a></li>
           <li class="active"><a href="#w3c">W3C</a></li>
-          <c:if test="${not empty marketplace}">
+          <c:if test="${not empty marketplace and not empty marketplace.value}">
           <li><a href="<spring:url value="/app/marketplace?referringPageId=${referringPageId}" />">Marketplace</a></li>
           </c:if>
     </ul> 

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferencedetail.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferencedetail.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferencedetail.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferencedetail.jsp Fri Oct  5 14:59:18 2012
@@ -63,6 +63,17 @@
 	                        </spring:bind>
 	                        <form:errors path="pageSize.value" cssClass="error"/>
 	                    </div>
+                        <div class="control-group">
+                            <spring:bind path="defaultWidgetHeight.value">
+                                <label for="defaultWidgetHeight" class="control-label">
+                                    <fmt:message key="admin.preferencedetail.defaultWidgetHeight"/> *
+                                </label>
+                                <div class="controls">
+                                    <input id="defaultWidgetHeight" name="defaultWidgetHeight.value" type="number" step="1" value="<c:out value="${status.value}"/>"/>
+                                </div>
+                            </spring:bind>
+                            <form:errors path="defaultWidgetHeight.value" cssClass="error"/>
+                        </div>
 	                    <div class="control-group">
 	                        <spring:bind path="javaScriptDebugMode.value">
 	                            <form:label path="javaScriptDebugMode.value" class="control-label">
@@ -110,4 +121,4 @@
 	        </article>
 	    </div>
 	</div>
-</div>
\ No newline at end of file
+</div>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/includes/new_user_form.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/includes/new_user_form.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/includes/new_user_form.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/includes/new_user_form.jsp Fri Oct  5 14:59:18 2012
@@ -28,7 +28,7 @@
         <div class="control-group">
             <label class="control-label" for="userNameField"><fmt:message key="page.general.username"/></label>
             <div class="controls">
-                <form:input id="userNameField" path="username" required="required" autofocus="autofocus"/>
+                <form:input id="userNameField" path="username" required="required" autofocus="autofocus" autocapitalize="off" autocorrect="off"/>
                 <form:errors path="username" cssClass="error"/>
             </div>
         </div>
@@ -52,10 +52,20 @@
         <div class="control-group">
             <label class="control-label" for="emailField"><fmt:message key="page.general.email"/></label>
             <div class="controls">
-                <form:input id="emailField" path="email" required="required"/>
+                <spring:bind path="email">
+                    <input type="email" id="emailField" name="email" required="required" value="<c:out value="${status.value}"/>"/>
+                </spring:bind>
                 <form:errors path="email" cssClass="error"/>
             </div>
         </div>
+        
+        <div class="control-group">
+            <label class="control-label" for="openIdField"><fmt:message key="page.general.openid"/></label>
+            <div class="controls">
+                <form:input id="openIdField" path="openId"/>
+                <form:errors path="openId" cssClass="error"/>
+            </div>
+        </div>
 
         <div class="control-group">
             <label class="control-label" for="pageLayoutField"><fmt:message key="page.general.addpage.selectlayout"/></label>
@@ -92,15 +102,15 @@
     <fieldset>
         <div class="control-group">
             <label class="control-label" for="firstNameField"><fmt:message key="page.general.first.name"/></label>
-            <div class="controls"><form:input id="firstNameField" path="givenName" autofocus="autofocus"/></div>
+            <div class="controls"><form:input id="firstNameField" path="givenName"/></div>
         </div>
         <div class="control-group">
             <label class="control-label" for="lastNameField"><fmt:message key="page.general.last.name"/></label>
-            <div class="controls"><form:input id="lastNameField" path="familyName" autofocus="autofocus"/></div>
+            <div class="controls"><form:input id="lastNameField" path="familyName"/></div>
         </div>
         <div class="control-group">
             <label class="control-label" for="displayNameField"><fmt:message key="page.general.display.name"/></label>
-            <div class="controls"><form:input id="displayNameField" path="displayName" autofocus="autofocus"/></div>
+            <div class="controls"><form:input id="displayNameField" path="displayName"/></div>
         </div>
         <div class="control-group">
             <label class="control-label" for="statusField"><fmt:message key="page.general.relation.status"/></label>
@@ -119,7 +129,7 @@
         </div>
         <div class="control-group">
             <label class="control-label" for="aboutMeField"><fmt:message key="page.general.about.me"/></label>
-            <div class="controls"><form:textarea id="aboutMeField" path="aboutMe" autofocus="autofocus"/></div>
+            <div class="controls"><form:textarea id="aboutMeField" path="aboutMe"/></div>
         </div>
     </fieldset>
 

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/login.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/login.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/login.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/login.jsp Fri Oct  5 14:59:18 2012
@@ -1,20 +1,20 @@
 <%--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you 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.
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
   --%>
 <%@ page language="java" trimDirectiveWhitespaces="true" %>
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
@@ -36,85 +36,84 @@
             
             <h1><fmt:message key="${pageTitleKey}"/></h1>
             <div class="row-fluid" id="loginOptions">
-            	<div id="loginBlock" class="clearfix well">
-	                <div class="span6">
+                <div id="loginBlock" class="clearfix well">
+                    <div class="span6">
                         <%--
                             //############################################
                             // LOGIN FORM
                             //############################################
                         --%>
-	                    <form class="form-horizontal" id="loginForm" name="loginForm" action="j_spring_security_check" method="post">
-	                        <fieldset>
-	                            <legend><fmt:message key="page.login.usernamepassword"/></legend>
+                        <form class="form-horizontal" id="loginForm" name="loginForm" action="j_spring_security_check" method="post">
+                            <fieldset>
+                                <legend><fmt:message key="page.login.usernamepassword"/></legend>
                                 <c:if test="${param['authfail'] eq 'form'}">
                                     <div class="alert alert-error"><fmt:message key="page.login.usernamepassword.fail"/></div>
                                 </c:if>
-	                            <div class="control-group">
-	                                <label class="control-label" for="usernameField"><fmt:message key="page.general.username"/></label>
-	                                <div class="controls">
-	                                    <input class="input-large" id="usernameField" type="text" name="j_username" autofocus="autofocus"/>
-	                                </div>
-	                            </div>
-	                            <div class="control-group">
-	                                <label class="control-label" for="passwordField"><fmt:message key="page.general.password"/></label>
-	                                <div class="controls">
-	                                    <input class="input-large" id="passwordField" type="password" name="j_password"/>
-	                                </div>
-	                            </div>
-	                            <div class="control-group">
-	                                <label class="control-label" for="remember_me">
-	                                    <fmt:message key="page.login.rememberme"/>
-	                                </label>
-	                                <div class="controls">
-	                                    <input type='checkbox' name='_spring_security_remember_me' id="remember_me" value="true"/>
-	                                </div>
-	                            </div>
-	                        </fieldset>
-	                        <fieldset>
-	                            <fmt:message key="page.login.usernamepassword.login" var="loginButtonText"/>
-	                            <div class="controls">
-	                                <button class="btn btn-primary" type="submit" value="${loginButtonText}">${loginButtonText}</button>
-	                            </div>
-	                        </fieldset>
-	                    </form>
-	                </div>
-	                <div class="span4">
+                                <div class="control-group">
+                                    <label class="control-label" for="usernameField"><fmt:message key="page.general.username"/></label>
+                                    <div class="controls">
+                                        <input class="input-large" id="usernameField" type="text" name="j_username" autofocus="autofocus" autocapitalize="off" autocorrect="off"/>
+                                    </div>
+                                </div>
+                                <div class="control-group">
+                                    <label class="control-label" for="passwordField"><fmt:message key="page.general.password"/></label>
+                                    <div class="controls">
+                                        <input class="input-large" id="passwordField" type="password" name="j_password"/>
+                                    </div>
+                                </div>
+                                <div class="control-group">
+                                    <label class="control-label" for="remember_me">
+                                        <fmt:message key="page.login.rememberme"/>
+                                    </label>
+                                    <div class="controls">
+                                        <input type='checkbox' name='_spring_security_remember_me' id="remember_me" value="true"/>
+                                    </div>
+                                </div>
+                            </fieldset>
+                            <fieldset>
+                                <fmt:message key="page.login.usernamepassword.login" var="loginButtonText"/>
+                                <div class="controls">
+                                    <button class="btn btn-primary" type="submit" value="${loginButtonText}">${loginButtonText}</button>
+                                </div>
+                            </fieldset>
+                        </form>
+                    </div>
+                    <div class="span4">
                         <%--
                             //############################################
                             // OPENID LOGIN
                             //############################################
                         --%>
-	                    <form class="form-horizontal" id="openIdForm" name='oidf' action='j_spring_openid_security_check' method='POST'>
-	                        <fieldset>
-	                            <legend><fmt:message key="page.login.openid"/></legend>
+                        <form class="form-horizontal" id="openIdForm" name='oidf' action='j_spring_openid_security_check' method='POST'>
+                            <fieldset>
+                                <legend><fmt:message key="page.login.openid"/></legend>
                                 <c:if test="${param['authfail'] eq 'openid'}">
                                     <div class="alert alert-error"><fmt:message key="page.login.openid.fail"/></div>
                                 </c:if>
-	                            <div class="control-group">
-	                                <label class="control-label" for="openid_identifier"><fmt:message key="page.login.openid.identifier"/></label>
-	                                <div class="controls">
-	                                    <input class="input-large" type="text" id="openid_identifier" name='openid_identifier'/>
-	                                </div>
-	                            </div>
-	                            <div class="control-group">
-	                                <label class="control-label" for="remember_me">
-	                                    <fmt:message key="page.login.rememberme"/>
-	                                </label>
-	                                <div class="controls">
-	                                    <input type='checkbox' name='_spring_security_remember_me' id="remember_me_openid" value="true"/>
-	                                </div>
-	                            </div>
-	                        </fieldset>
-	                        <fieldset>
-	                            <fmt:message key="page.login.openid.button" var="openidButtonText"/>
-	                            <div class="controls">
-	                                <button class="btn btn-primary" type="submit" value="${openidButtonText}">${openidButtonText}</button>
-	                            </div>
-	                        </fieldset>
-	
-	                    </form>
-	                </div>
-            	</div>
+                                <div class="control-group">
+                                    <label class="control-label" for="openid_identifier"><fmt:message key="page.login.openid.identifier"/></label>
+                                    <div class="controls">
+                                        <input class="input-large" type="text" id="openid_identifier" name="openid_identifier" autocapitalize="off" autocorrect="off"/>
+                                    </div>
+                                </div>
+                                <div class="control-group">
+                                    <label class="control-label" for="remember_me">
+                                        <fmt:message key="page.login.rememberme"/>
+                                    </label>
+                                    <div class="controls">
+                                        <input type='checkbox' name='_spring_security_remember_me' id="remember_me_openid" value="true"/>
+                                    </div>
+                                </div>
+                            </fieldset>
+                            <fieldset>
+                                <fmt:message key="page.login.openid.button" var="openidButtonText"/>
+                                <div class="controls">
+                                    <button class="btn btn-primary" type="submit" value="${openidButtonText}">${openidButtonText}</button>
+                                </div>
+                            </fieldset>
+                        </form>
+                    </div>
+                </div>
             </div>
         </div>
     </tiles:putAttribute>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newpassword.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newpassword.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newpassword.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newpassword.jsp Fri Oct  5 14:59:18 2012
@@ -27,45 +27,48 @@
     <rave:login_navbar hideButton="requestNewPasswordButton" />
 
 <div class="container-fluid">
-	<div class="row-fluid">
-	    <h1><fmt:message key="page.newpassword.title"/></h1>
-	    <c:choose>
-	        <c:when test="${success}">
-	            <div class="alert-message success">
-	                <fmt:message key="page.newpassword.email.sent">
-	                    <fmt:param>${email}</fmt:param>
-	                </fmt:message>
-	            </div>
-	            <a href="<c:url value="/"/>"><fmt:message key="page.newpassword.email.sent.login"/></a>
-	        </c:when>
-	
-	        <c:otherwise>
-	
-	            <form:form cssClass="form-horizontal well" commandName="user" action="newpassword" method="post">
-	                <fieldset>
-	                    <p><fmt:message key="form.all.fields.required"/></p>
-	
-	                    <p><form:errors cssClass="error"/></p>
-	
-	                    <div class="control-group">
-	                        <label class="control-label" for="emailField"><fmt:message key="page.general.email"/></label>
-	                        <div class="controls">
-	                            <form:input id="emailField" path="email" required="required" autofocus="autofocus"/>
-	                            <form:errors path="email" cssClass="error"/>
-	                        </div>
-	                    </div>
-	                </fieldset>
-	                <fieldset>
-	                    <div class="control-group">
-	                        <div class="controls">${captchaHtml}</div>
-	                    </div>
-	                </fieldset>
-	                <fieldset>
-	                    <fmt:message key="page.login.forgot.password.button" var="submitButtonText"/>
-	                    <button type="submit" class="btn btn-primary" value="${submitButtonText}">${submitButtonText}</button>
-	                </fieldset>
-	            </form:form>
-	        </c:otherwise>
-	    </c:choose>
-	</div>
+    <div class="row-fluid">
+        <h1><fmt:message key="page.newpassword.title"/></h1>
+        <c:choose>
+            <c:when test="${success}">
+                <div class="alert-message success">
+                    <fmt:message key="page.newpassword.email.sent">
+                        <fmt:param>${email}</fmt:param>
+                    </fmt:message>
+                </div>
+                <a href="<c:url value="/"/>"><fmt:message key="page.newpassword.email.sent.login"/></a>
+            </c:when>
+    
+            <c:otherwise>
+    
+                <form:form cssClass="form-horizontal well" commandName="user" action="newpassword" method="post">
+                    <fieldset>
+                        <p><fmt:message key="form.all.fields.required"/></p>
+    
+                        <p><form:errors cssClass="error"/></p>
+    
+                        <div class="control-group">
+                            <label class="control-label" for="emailField"><fmt:message key="page.general.email"/></label>
+                            <div class="controls">
+                                <spring:bind path="email">
+                                    <input type="email" name="email" id="emailField" required="required" autofocus="autofocus"
+                                           value="<c:out value="${status.value}"/>"/>
+                                </spring:bind>
+                                <form:errors path="email" cssClass="error"/>
+                            </div>
+                        </div>
+                    </fieldset>
+                    <fieldset>
+                        <div class="control-group">
+                            <div class="controls">${captchaHtml}</div>
+                        </div>
+                    </fieldset>
+                    <fieldset>
+                        <fmt:message key="page.login.forgot.password.button" var="submitButtonText"/>
+                        <button type="submit" class="btn btn-primary" value="${submitButtonText}">${submitButtonText}</button>
+                    </fieldset>
+                </form:form>
+            </c:otherwise>
+        </c:choose>
+    </div>
 </div>
\ No newline at end of file

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp Fri Oct  5 14:59:18 2012
@@ -132,22 +132,47 @@
 
     <div class="row-fluid">
         <div id="emptyPageMessageWrapper" class="emptyPageMessageWrapper hidden">
-            <div class="emptyPageMessage">
-                <c:choose>
-                    <c:when test="${pageUser.editor == true}">
-                        <a href="<spring:url value="/app/store?referringPageId=${page.id}" />"><fmt:message key="page.general.empty"/></a>
-                    </c:when>
-                    <c:otherwise>
-                        <fmt:message key="page.general.non.editing.empty"/>
-                    </c:otherwise>
-                </c:choose>
-            </div>
-        </div>
-        <div class="regions">
-            <%-- insert the region layout template --%>
-            <tiles:insertTemplate template="${layout}"/>
+            <c:if test="${pageUser.pageStatus != 'PENDING'}">
+                <div class="emptyPageMessage">
+                    <c:choose>
+                        <c:when test="${pageUser.editor == true}">
+                            <a href="<spring:url value="/app/store?referringPageId=${page.id}" />"><fmt:message key="page.general.empty"/></a>
+                        </c:when>
+                        <c:otherwise>
+                            <fmt:message key="page.general.non.editing.empty"/>
+                        </c:otherwise>
+                    </c:choose>
+                </div>
+            </c:if>
         </div>
-        <div class="clear-float">&nbsp;</div>
+        <c:choose>
+            <c:when test="${pageUser.pageStatus != 'PENDING'}">
+                <div class="regions">
+                    <%-- insert the region layout template --%>
+                    <tiles:insertTemplate template="${layout}"/>
+                </div>
+                <div class="clear-float">&nbsp;</div>
+            </c:when>
+            <c:otherwise>
+                <div class="emptyPageMessage">
+                    <div>
+                        <div id="confirmSharePageLegend">
+                            <fmt:message key="sharing.page.confirm.message">
+                                <fmt:param value="${page.owner.username}"/>
+                            </fmt:message>
+                        </div>
+                    </div>
+                    <div>&nbsp;</div>
+                    <div>
+                        <a href="#" onclick="rave.layout.searchHandler.acceptShare()"><fmt:message key="_rave_client.common.accept"/></a>
+                    </div>
+                    <div>
+                        <a href="#" onclick="rave.layout.searchHandler.declineShare();"><fmt:message key="_rave_client.common.decline"/></a>
+                    </div>
+                    <div class="clear-float">&nbsp;</div>
+                </div>
+            </c:otherwise>
+        </c:choose>
     </div>
 
 
@@ -280,34 +305,15 @@
         </div>
     </div>
 
-    <div id="confirmSharePageDialog" class="modal hide" data-backdrop="static">
-        <div class="modal-header">
-            <a href="#" class="close" data-dismiss="modal">&times;</a>
-            <h3><fmt:message key="sharing.dialog.confirm.title"/></h3>
-        </div>
-        <div class="modal-body">
-            <div id="confirmSharePageDialogLegend">
-                <portal:person id="${page.ownerId}" var="owner" />
-                <fmt:message key="sharing.dialog.confirm.message">
-                    <fmt:param value="${owner.username}"/>
-                </fmt:message>
-            </div>
-        </div>
-        <div class="modal-footer">
-            <a href="#" class="btn btn-primary" onclick="rave.layout.searchHandler.acceptShare()"><fmt:message key="_rave_client.common.accept"/></a>
-            <a href="#" class="btn" onclick="rave.layout.searchHandler.declineShare();"><fmt:message key="_rave_client.common.decline"/></a>
-            <a href="#" class="btn" onclick="$('#confirmSharePageDialog').modal('hide');"><fmt:message key="_rave_client.common.cancel"/></a>
-        </div>
-    </div>
 <portal:register-init-script location="${'AFTER_RAVE'}">
     <script>
         $(function() {
             rave.initPageEditorStatus(<c:out value="${pageUser.editor}"/>);
             rave.initProviders();
+            rave.layout.searchHandler.setDefaults("<c:out value="${principleUsername}"/>","<sec:authentication property="principal.id" />","<c:out value="${page.id}"/>", "${pageUser.pageStatus}");
             rave.initWidgets();
             rave.initUI();
             rave.layout.init();
-            rave.layout.searchHandler.setDefaults("<c:out value="${principleUsername}"/>","<sec:authentication property="principal.id" />","<c:out value="${page.id}"/>", "${pageUser.pageStatus}");
             rave.runOnPageInitializedHandlers();
         });
     </script>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp Fri Oct  5 14:59:18 2012
@@ -7,7 +7,7 @@
   "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
+    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
@@ -15,9 +15,6 @@
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-
-  Description:
-  User's information display and edit options
   --%>
 
 <%@ page language="java" trimDirectiveWhitespaces="true" %>
@@ -30,7 +27,7 @@
 
 <!-- get the display name of user -->
 <fmt:message key="page.personProfile.title" var="pageTitle">
-   	<fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
+       <fmt:param><c:out value="${userProfile.displayName}" /></fmt:param>
 </fmt:message>
 <tiles:putAttribute name="pageTitleKey" value="${pageTitle}"/>
 <tiles:importAttribute name="pageTitleKey" scope="request"/>
@@ -57,91 +54,94 @@
     <div class="row-fluid">
         <div class="span9">
             <div id="personProfileContent">
-                <form:form id="editAccountForm" commandName="userProfile" action="person?referringPageId=${referringPageId}" method="POST" class="form-horizontal">
+                <c:url var="profileUrl" value="/app/person">
+                    <c:param name="referringPageId" value="${referringPageId}" />
+                </c:url>
+                <form:form id="editAccountForm" commandName="userProfile" action="${profileUrl}" method="POST" class="form-horizontal">
 
                     <fieldset class="row-fluid" id="userProfilePrimaryData">
-                    	<div class="span2 profile-user-thumb">
-                    		<img src="http://placehold.it/125x165&text=photo"/>
-                    	</div>
+                        <div class="span2 profile-user-thumb">
+                            <img src="<spring:url value="/static/images/profile_picture_placeholder.png"/>" alt=""/>
+                        </div>
 
                         <div class="span10">
-                        	<!-- Display user info-->
-                        	<div class="profile-info-visible">
-                        		<h2><c:out value="${userProfile.displayName}"/></h2>
-                        		<h3><span id="givenName"><c:out value="${userProfile.givenName}"/></span>&nbsp;<span id="familyName"><c:out value="${userProfile.familyName}"/></span></h3>
+                            <!-- Display user info-->
+                            <div class="profile-info-visible">
+                                <h2><c:out value="${userProfile.displayName}"/></h2>
+                                <h3><span id="givenName"><c:out value="${userProfile.givenName}"/></span>&nbsp;<span id="familyName"><c:out value="${userProfile.familyName}"/></span></h3>
                                 <p class="profile-user-status">
-                                	<fmt:message key="page.profile.status"/>
-                                	&nbsp;<span id="status"><c:out value="${userProfile.status}"/></span>
+                                    <fmt:message key="page.profile.status"/>
+                                    &nbsp;<span id="status"><c:out value="${userProfile.status}"/></span>
                                 </p>
                                 <p class="profile-info-visible">
-                                	<fmt:message key="page.profile.about.me"/>
-                                	&nbsp;<span id="aboutMe"><c:out value=" ${userProfile.aboutMe}"/></span>
+                                    <fmt:message key="page.profile.about.me"/>
+                                    &nbsp;<span id="aboutMe"><c:out value=" ${userProfile.aboutMe}"/></span>
                                 </p>
-                        	</div>
-                        	<!-- Display edit view of user info-->
-                        	<div class="profile-info-hidden">
-                        		<div class="control-group">
-                            		<label for="displayNameField" class="control-label"><fmt:message key="page.profile.display.name"/></label>
-                            		<div class="controls">
-	                            		<form:input id="displayNameField" path="displayName" value="${userProfile.displayName}" class="span6"/>
-                            		</div>
-                        		</div>
-                        		<div class="control-group">
-                        			<label class="control-label pull-left"><fmt:message key="page.profile.first.name"/></label>
-	                        			<form:input id="givenNameField" path="givenName" class="span3 pull-left" value="${userProfile.givenName}" />&nbsp;
-
-	                                <label class="control-label pull-left"><fmt:message key="page.profile.last.name"/></label>
-	                                	<form:input id="familyNameField" path="familyName" class="span3 pull-left" value="${userProfile.familyName}"/>
-                        		</div>
-                        		<div class="control-group">
-                        			<label for="statusField" class="control-label"><fmt:message key="page.profile.status"/></label>
-                        			<div class="controls">
-                        				<form:select path="status" class="span3" id="statusField">
-						                	<fmt:message key="page.general.relation.single" var="singleText"/>
-						                    <form:option value="${singleText}" id="single_id">${singleText}</form:option>
-						                    <fmt:message key="page.general.relation.committed" var="committedText"/>
-						                    <form:option value="${committedText}" id="committed_id">${committedText}</form:option>
-						                    <fmt:message key="page.general.relation.married" var="marriedText"/>
-						                    <form:option value="${marriedText}" id="married_id">${marriedText}</form:option>
-						                    <fmt:message key="page.general.relation.other" var="otherText"/>
-						                    <form:option value="${otherText}" id="other_id">${otherText}</form:option>
-						                </form:select>
-                        			</div>
-                        		</div>
-                        		<div class="control-group">
-                        			<label for="aboutMeField" class="control-label"><fmt:message key="page.profile.about.me"/></label>
-                        			<div class="controls">
-	                        			<form:textarea id="aboutMeField" path="aboutMe" value="${userProfile.aboutMe}" class="span11" />
-                        			</div>
-                        		</div>
-                        	</div>
+                            </div>
+                            <!-- Display edit view of user info-->
+                            <div class="profile-info-hidden">
+                                <div class="control-group">
+                                    <label for="displayNameField" class="control-label"><fmt:message key="page.profile.display.name"/></label>
+                                    <div class="controls">
+                                        <form:input id="displayNameField" path="displayName" value="${userProfile.displayName}" class="span6"/>
+                                    </div>
+                                </div>
+                                <div class="control-group">
+                                    <label class="control-label pull-left"><fmt:message key="page.profile.first.name"/></label>
+                                        <form:input id="givenNameField" path="givenName" class="span3 pull-left" value="${userProfile.givenName}" />&nbsp;
+
+                                    <label class="control-label pull-left"><fmt:message key="page.profile.last.name"/></label>
+                                        <form:input id="familyNameField" path="familyName" class="span3 pull-left" value="${userProfile.familyName}"/>
+                                </div>
+                                <div class="control-group">
+                                    <label for="statusField" class="control-label"><fmt:message key="page.profile.status"/></label>
+                                    <div class="controls">
+                                        <form:select path="status" class="span3" id="statusField">
+                                            <fmt:message key="page.general.relation.single" var="singleText"/>
+                                            <form:option value="${singleText}" id="single_id">${singleText}</form:option>
+                                            <fmt:message key="page.general.relation.committed" var="committedText"/>
+                                            <form:option value="${committedText}" id="committed_id">${committedText}</form:option>
+                                            <fmt:message key="page.general.relation.married" var="marriedText"/>
+                                            <form:option value="${marriedText}" id="married_id">${marriedText}</form:option>
+                                            <fmt:message key="page.general.relation.other" var="otherText"/>
+                                            <form:option value="${otherText}" id="other_id">${otherText}</form:option>
+                                        </form:select>
+                                    </div>
+                                </div>
+                                <div class="control-group">
+                                    <label for="aboutMeField" class="control-label"><fmt:message key="page.profile.about.me"/></label>
+                                    <div class="controls">
+                                        <form:textarea id="aboutMeField" path="aboutMe" value="${userProfile.aboutMe}" class="span11" />
+                                    </div>
+                                </div>
+                            </div>
                         </div>
                     </fieldset>
 
                     <!-- Display contact information of user -->
-		            <fieldset class="row-fluid">
-	                    <div class=" span12">
-	                    	<div class="well">
-		                    	<h4><fmt:message key="page.profile.contact.info" /></h4>
-	                            <div class="profile-info-visible">
-	                                <p id='email'><c:out value=" ${userProfile.email}"/></p>
-	                            </div>
-	                            <div class="profile-info-hidden">
-	                            	<div class="control-group">
-		                            	<label for="emailField" class="control-label"><fmt:message key="page.profile.email"/></label>
-		                            	<div class="controls">
-		                            		<form:input id="emailField" path="email" class="span5" value="${userProfile.email}" />
-		                            	</div>
-	                            	</div>
-	                            </div>
-	                        </div>
-	                    </div>
+                    <fieldset class="row-fluid">
+                        <div class=" span12">
+                            <div class="well">
+                                <h4><fmt:message key="page.profile.contact.info" /></h4>
+                                <div class="profile-info-visible">
+                                    <p id='email'><c:out value=" ${userProfile.email}"/></p>
+                                </div>
+                                <div class="profile-info-hidden">
+                                    <div class="control-group">
+                                        <label for="emailField" class="control-label"><fmt:message key="page.profile.email"/></label>
+                                        <div class="controls">
+                                            <form:input id="emailField" path="email" class="span5" value="${userProfile.email}" />
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
                     </fieldset>
 
                     <%-- only display the edit profile button if the current logged in user matches the profile being viewed --%>
                     <c:set var="currentUsername"><sec:authentication property="principal.username" htmlEscape="false" /></c:set>
                     <c:if test="${currentUsername == userProfile.username}">
-                    	<fieldset class="row-fluid">
+                        <fieldset class="row-fluid">
                             <div class="span12">
                                 <p>
                                     <input type="hidden" id="profileInfo" value="profile-info" />
@@ -166,7 +166,7 @@
         </div>
         <div class="span3">
             <portal:person id="${page.ownerId}" var="${owner}" />
-        	<button type="button" id="addRemoveFriend" value="${owner.username}" class="btn btn-primary profile-info-visible">Add/Remove Friends</button>
+        	<button type="button" id="addRemoveFriend" value="${owner.username}" class="btn btn-primary profile-info-visible"><fmt:message key="page.personProfile.addremove.friends"/></button>
         </div>
         <div class="span3">
             <div>
@@ -212,8 +212,8 @@
             rave.layout.init();
             rave.personprofile.init();
             rave.setPageOwner({
-                username: "${userProfile.username}",
-                id: "${userProfile.id}"
+                username: "<c:out value="${userProfile.username}"/>",
+                id: "<c:out value="${userProfile.id}"/>"
             });
         });
     </script>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/retrieveusername.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/retrieveusername.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/retrieveusername.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/retrieveusername.jsp Fri Oct  5 14:59:18 2012
@@ -26,47 +26,50 @@
 <rave:login_navbar hideButton="requestNewUsernameButton" />
 
 <div class="container-fluid">
-	<div class="row-fluid">
-	    <h1><fmt:message key="page.retrieveusername.title"/></h1>
-	    <c:choose>
-	        <c:when test="${success}">
-	
-	            <div class="alert-message success">
-	                <fmt:message key="page.newpassword.email.sent">
-	                    <fmt:param>${email}</fmt:param>
-	                </fmt:message>
-	            </div>
-	            <a href="<c:url value="/"/>"><fmt:message key="page.newpassword.email.sent.login"/></a>
-	        </c:when>
-	
-	        <c:otherwise>
-	            <form:form cssClass="form-horizontal well" commandName="user" action="retrieveusername" method="post">
-	                <fieldset>
-	                    <p><fmt:message key="form.all.fields.required"/></p>
-	
-	                    <p><form:errors cssClass="error"/></p>
-	
-	                    <div class="control-group">
-	
-	                        <label class="control-label" for="emailField"><fmt:message key="page.general.email"/></label>
-	                        <div class="controls">
-	                            <form:input id="emailField" path="email" required="required" autofocus="autofocus"/>
-	                            <form:errors path="email" cssClass="error"/>
-	                        </div>
-	                    </div>
-	                </fieldset>
-	                <fieldset>
-	                    <div class="control-group">
-	                        <div class="controls">${captchaHtml}</div>
-	                    </div>
-	                </fieldset>
-	
-	                <fieldset>
-	                    <fmt:message key="page.login.forgot.username.button" var="submitButtonText"/>
-	                    <button class="btn btn-primary" type="submit" value="${submitButtonText}">${submitButtonText}</button>
-	                </fieldset>
-	            </form:form>
-	        </c:otherwise>
-	    </c:choose>
-	</div>
+    <div class="row-fluid">
+        <h1><fmt:message key="page.retrieveusername.title"/></h1>
+        <c:choose>
+            <c:when test="${success}">
+    
+                <div class="alert-message success">
+                    <fmt:message key="page.newpassword.email.sent">
+                        <fmt:param>${email}</fmt:param>
+                    </fmt:message>
+                </div>
+                <a href="<c:url value="/"/>"><fmt:message key="page.newpassword.email.sent.login"/></a>
+            </c:when>
+    
+            <c:otherwise>
+                <form:form cssClass="form-horizontal well" commandName="user" action="retrieveusername" method="post">
+                    <fieldset>
+                        <p><fmt:message key="form.all.fields.required"/></p>
+    
+                        <p><form:errors cssClass="error"/></p>
+    
+                        <div class="control-group">
+    
+                            <label class="control-label" for="emailField"><fmt:message key="page.general.email"/></label>
+                            <div class="controls">
+                                <spring:bind path="email">
+                                    <input type="email" name="email" id="emailField" required="required" autofocus="autofocus"
+                                            value="<c:out value="${status.value}"/>"/>
+                                </spring:bind>
+                                <form:errors path="email" cssClass="error"/>
+                            </div>
+                        </div>
+                    </fieldset>
+                    <fieldset>
+                        <div class="control-group">
+                            <div class="controls">${captchaHtml}</div>
+                        </div>
+                    </fieldset>
+    
+                    <fieldset>
+                        <fmt:message key="page.login.forgot.username.button" var="submitButtonText"/>
+                        <button class="btn btn-primary" type="submit" value="${submitButtonText}">${submitButtonText}</button>
+                    </fieldset>
+                </form:form>
+            </c:otherwise>
+        </c:choose>
+    </div>
 </div>
\ No newline at end of file

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp Fri Oct  5 14:59:18 2012
@@ -23,7 +23,7 @@
 
 <div id="na_content" class="container">
     <div class="row detail-widget storeItem">
-        <div class="span3">
+        <div class="span4">
             <div class="detail-widget-preview">
                 <c:if test="${not empty widget.screenshotUrl}">
                     <div class="detailWidgetScreenshot">
@@ -56,7 +56,7 @@
                 </c:choose>
             </div>
         </div>
-        <div class="span8 detail-widget-main">
+        <div class="span7 detail-widget-main">
            <div>
 			   <h2>
 					<c:set var="widgetHasTitleUrl" value="${not empty widget.titleUrl}"/>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag Fri Oct  5 14:59:18 2012
@@ -50,6 +50,8 @@
     rave.setContext("<spring:url value="/app/" />");
     <%-- set the javascript debug mode so js code has access to it --%>
     rave.setJavaScriptDebugMode(<c:out value="${jsDebugMode}"/>);
+    <%-- set the default widget height so js code has access to it --%>
+    rave.setDefaultWidgetHeight(<c:out value="${portalSettings['defaultWidgetHeight'].value}"/>);
     <%-- set the current page viewer --%>
     <sec:authorize access="isAuthenticated()">
         <sec:authentication property="principal.username" scope="request" var="username"/>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_js.tag
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_js.tag?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_js.tag (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/WEB-INF/tags/third_party_js.tag Fri Oct  5 14:59:18 2012
@@ -7,7 +7,7 @@
   "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
+    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
@@ -15,8 +15,7 @@
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-
---%>
+  --%>
 <%--
      This file includes references to all external third party javascript libraries required by rave
      Overlay this file in custom extensions of Rave if you host these libraries internally and don't need
@@ -29,7 +28,8 @@
 <script src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js"></script>
 <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-hashchange/v1.3/jquery.ba-hashchange.min.js"></script>
-
+<%-- Touch devices --%>
+<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js"></script>
 <%-- bootstrap --%>
 <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min.js"></script>
 <%-- google code css3 mediaqueries script --%>

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/static/css/rave-css.less
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/static/css/rave-css.less?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/static/css/rave-css.less (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/static/css/rave-css.less Fri Oct  5 14:59:18 2012
@@ -91,6 +91,7 @@
     background-color: white;
     border-radius: 0 0 5px 5px;
     height: 100%;
+    overflow-x: hidden;
 }
 
 .widget-mobile {
@@ -150,6 +151,10 @@
     -moz-box-shadow: none !important;
 }
 
+.widget-wrapper-canvas .widget {
+    overflow-x: auto;
+}
+
 .widget-wrapper-mobile {
     margin-bottom: 3px;
 }
@@ -1158,8 +1163,7 @@ span.error, label.error {
     width: 451px;
     height: 90%;
     padding: 15px;
-    overflow-y: auto;
-    overflow-x: visible;
+    overflow: hidden;
     z-index: 5000
 }
 
@@ -1182,6 +1186,9 @@ footer {
     font-style: italic;
 }
 
+.no-scroll {
+    overflow: hidden;
+}
 
 /* RESPONSIVE */
 @media (max-width: 767px){

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave.js
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave.js?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave.js (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave.js Fri Oct  5 14:59:18 2012
@@ -36,6 +36,8 @@ var rave = rave || (function () {
     };
     // JS debug mode is off by default
     var javaScriptDebugMode = 0;
+    //Assigning a default value of 250 if unable to get value from the DB
+    var defaultWidgetHeight = 250;
     var onWidgetsInitializedHandlers = [];
     var onProvidersInitializedHandlers = [];
     var onUIInitializedHandlers = [];
@@ -92,6 +94,9 @@ var rave = rave || (function () {
                     container.show("slide", { direction:"right" }, 'fast');
                     $('body').addClass('modal-open');
                     $('body').append('<div class="modal-backdrop fade in"></div>');
+                    // hide the main browser window's scrollbar to prevent possible "double scrollbar" rendering
+                    // between it and an iframe vertical scrollbar
+                    $('body').addClass('no-scroll');
                 },
                 cleanup:function (content) {
                     var container = content.parents(this.containerSelector);
@@ -99,6 +104,8 @@ var rave = rave || (function () {
                         container.detach();
                         $('body').removeClass('modal-open');
                         $('.modal-backdrop').remove();
+                        // restore the main browser window's scrollbar
+                        $('body').removeClass('no-scroll');
                     });
                 },
                 singleton:true
@@ -430,7 +437,10 @@ var rave = rave || (function () {
             }
         }
 
-        function createPopup(popupType) {
+        function createPopup(popupType, prefs) {
+            var height = (prefs && prefs.preferredHeight);
+            var width = (prefs && prefs.preferredWidth);
+
             var target = POPUPS[popupType.toLowerCase()];
 
             if (!target) {
@@ -442,6 +452,12 @@ var rave = rave || (function () {
             }
 
             var container = $(target.markup);
+            if(height) {
+                container.height(height);
+            }
+            if(width) {
+                container.width(width);
+            }
             $("#pageContent").prepend(container);
 
             if ($.type(target.initialize) == 'function') target.initialize(container);
@@ -875,7 +891,8 @@ var rave = rave || (function () {
             displayEmptyPageMessage:displayEmptyPageMessage,
             displayUsersOfWidget:displayUsersOfWidget,
             showInfoMessage:showInfoMessage,
-            registerPopup:registerPopup
+            registerPopup:registerPopup,
+            styleWidgetButtons: styleWidgetButtons
         };
 
     })();
@@ -955,23 +972,26 @@ var rave = rave || (function () {
     function resetOpenAjaxHubInstance() {
         openAjaxHub = null;
     }
-    
-    function renderNewWidget(regionWidgetId){
+
+    function renderNewWidget(regionWidgetId, init){
         // When run as the callback argument supplied to rave.api.rpc.addWidgetToPage
         // this method will render the widget in the current page.
-        
         // load widget into a placeholder element
         var placeholder = document.createElement("div");
-        $(placeholder).load(rave.getContext()+"/api/rest/regionwidget/"+regionWidgetId, function(){
-          // prepend to first region
-          var region = $("#region-1-id");
-          region.prepend(placeholder);
-          // remove the placeholder around the widget-wrapper
-          region.children(":first").children(":first").unwrap();
-          // initialize
-          initializeWidgets();
-          }        
-        );
+        $(placeholder).load(rave.getContext()+"api/rest/regionwidget/"+regionWidgetId, function(){
+            var $firstRegion = $(".region:not(.region-locked):first")
+            var firstRegionId = ($firstRegion).attr('id');
+            // prepend to first region
+            var region = $("#"+firstRegionId);
+            region.prepend(placeholder);
+            // remove the placeholder around the widget-wrapper
+            region.children(":first").children(":first").unwrap();
+            if(init){
+                initializeWidgets();
+                rave.styleWidgetButtons(regionWidgetId);
+                rave.layout.bindWidgetMenu(regionWidgetId);
+            }
+        });
     }
 
     function initializeWidgets() {
@@ -1030,7 +1050,6 @@ var rave = rave || (function () {
     }
 
     function initializeWidget(widget) {
-    
         // Widget has been deleted on the page but not removed from list
         var widgetBody = $(["#widget-", widget.regionWidgetId, "-body"].join(""));
         if(widgetBody.length === 0){
@@ -1041,7 +1060,7 @@ var rave = rave || (function () {
               return;
             }
         }
-    
+
         if (widget.type == "DISABLED") {
             renderDisabledWidget(widget.regionWidgetId, unescape(widget.disabledMessage));
             return;
@@ -1091,6 +1110,14 @@ var rave = rave || (function () {
         return javaScriptDebugMode;
     }
 
+    function setDefaultWidgetHeight(widgetHeight) {
+        defaultWidgetHeight = widgetHeight;
+    }
+
+    function getDefaultWidgetHeight(){
+        return defaultWidgetHeight;
+    }
+
     function setPageViewer(viewer) {
         pageViewer = viewer;
     }
@@ -1310,6 +1337,12 @@ var rave = rave || (function () {
          */
         setJavaScriptDebugMode: setJavaScriptDebugMode,
 
+        /*Gets the value of the Default Widget Height*/
+        getDefaultWidgetHeight: getDefaultWidgetHeight,
+
+        /*Sets the value of the Default Widget Height*/
+        setDefaultWidgetHeight: setDefaultWidgetHeight,
+
         /**
          * Sets the authenticated page viewer for the Rave web application
          *
@@ -1467,6 +1500,8 @@ var rave = rave || (function () {
          * @param message The message to display.
          */
         showInfoMessage:ui.showInfoMessage,
+        
+        styleWidgetButtons : ui.styleWidgetButtons,
 
         /**
          * Returns a language specific message based on the supplied key

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_api.js
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_api.js?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_api.js (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_api.js Fri Oct  5 14:59:18 2012
@@ -427,6 +427,20 @@ rave.api = rave.api || (function() {
                }).error(handleError);
         }
 
+        function getAllWidgets(args){
+            $.get(rave.getContext() + path + "widget/getall",
+                function(result) {
+                    if (result.error) {
+                        handleRpcError(result);
+                    }
+                    else {
+                        if (typeof args.successCallback == 'function') {
+                            args.successCallback(result);
+                        }
+                    }
+                }).error(handleError);
+        }
+
         function getUsers(args){
             var offset = args.offset;
             $.get(rave.getContext() + path + "users/get",
@@ -526,8 +540,8 @@ rave.api = rave.api || (function() {
         }
 
         function addFriend(args) {
-        	var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
-        	$.post(rave.getContext() + path + "person/" + user + "/addfriend",
+            var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
+            $.post(rave.getContext() + path + "person/" + user + "/addfriend",
                 function(result) {
                     if (result.error) {
                         handleRpcError(result);
@@ -540,8 +554,8 @@ rave.api = rave.api || (function() {
                }).error(handleError);
         }
         function removeFriend(args) {
-        	var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
-        	$.post(rave.getContext() + path + "person/" + user + "/removefriend",
+            var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
+            $.post(rave.getContext() + path + "person/" + user + "/removefriend",
                 function(result) {
                     if (result.error) {
                         handleRpcError(result);
@@ -567,8 +581,8 @@ rave.api = rave.api || (function() {
                 }).error(handleError);
         }
         function acceptFriendRequest(args) {
-        	var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
-        	$.post(rave.getContext() + path + "person/" + user + "/acceptfriendrequest",
+            var user =  encodeURIComponent(encodeURIComponent(args.friendUsername));
+            $.post(rave.getContext() + path + "person/" + user + "/acceptfriendrequest",
                     function(result) {
                         if (result.error) {
                             handleRpcError(result);
@@ -581,6 +595,22 @@ rave.api = rave.api || (function() {
                    }).error(handleError);
         }
 
+        function addWidgetFromMarketplace(args){
+            $.post(rave.getContext() + path + "marketplace/add",
+                    {"url": args.url,
+                     providerType: args.providerType},
+                    function(result) {
+                        if (result.error) {
+                            handleRpcError(result);
+                        }
+                        else {
+                            if (typeof args.successCallback == 'function') {
+                                args.successCallback(result);
+                            }
+                        }
+                }).error(handleError);
+        }
+
         return {
             moveWidget : moveWidgetOnPage,
             addWidgetToPage : addWidgetToPage,
@@ -601,7 +631,9 @@ rave.api = rave.api || (function() {
             addFriend : addFriend,
             removeFriend : removeFriend,
             getFriends : getFriends,
-            acceptFriendRequest : acceptFriendRequest
+            acceptFriendRequest : acceptFriendRequest,
+            addWidgetFromMarketplace : addWidgetFromMarketplace,
+            getAllWidgets : getAllWidgets
         };
 
     })();

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_layout.js
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_layout.js?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_layout.js (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_layout.js Fri Oct  5 14:59:18 2012
@@ -154,9 +154,6 @@ rave.layout = rave.layout || (function()
             this.username = username;
             this.userId = userId;
             this.pageId = pageId;
-            if(pageStatus == "PENDING"){
-                confirmPageShare();
-            };
         }
 
         function addExistingMember(member, isEditor){
@@ -303,29 +300,30 @@ rave.layout = rave.layout || (function()
         }
 
         function acceptShare(){
-            $('#confirmSharePageDialog').modal('hide');
-            rave.api.rpc.updateSharedPageStatus({pageId: rave.layout.searchHandler.pageId, shareStatus: 'accepted',
-                successCallback: function(result) {
-                    //notification here?
-                }
-            });
+            var answer;
+            answer = confirm(rave.getClientMessage("accept.share.confirm"));
+            if(answer){
+                rave.api.rpc.updateSharedPageStatus({pageId: rave.layout.searchHandler.pageId, shareStatus: 'accepted',
+                    successCallback: function(result) {
+                        rave.viewPage(rave.layout.searchHandler.pageId);
+                    }
+                });
+            }
         }
 
         function declineShare(){
-            $('#confirmSharePageDialog').modal('hide');
-            rave.api.rpc.updateSharedPageStatus({pageId: rave.layout.searchHandler.pageId, shareStatus: 'refused',
-                successCallback: function(result) {
-                    rave.api.rpc.removeMemberFromPage({pageId:rave.layout.searchHandler.pageId, userId:rave.layout.searchHandler.userId,
-                        successCallback:function (result) {
-                            document.location.href='/';
-                        }});
-
-                }
-            });
-        }
-
-        function confirmPageShare(){
-            $("#confirmSharePageDialog").modal('show');
+            var answer;
+            answer = confirm(rave.getClientMessage("decline.share.confirm"));
+            if(answer){
+                rave.api.rpc.updateSharedPageStatus({pageId: rave.layout.searchHandler.pageId, shareStatus: 'refused',
+                    successCallback: function(result) {
+                        rave.api.rpc.removeMemberFromPage({pageId:rave.layout.searchHandler.pageId, userId:rave.layout.searchHandler.userId,
+                            successCallback:function (result) {
+                                document.location.href='/';
+                            }});
+                    }
+                })
+            }
         }
 
         function init() {
@@ -526,7 +524,6 @@ rave.layout = rave.layout || (function()
             removeMemberFromPage : removeMemberFromPage,
             addEditingRightsToMember: addEditingRightsToMember,
             removeEditingRightsFromMember : removeEditingRightsFromMember,
-            confirmPageShare : confirmPageShare,
             acceptShare : acceptShare,
             declineShare : declineShare,
             updateParamsInString : updateParamsInString
@@ -562,11 +559,76 @@ rave.layout = rave.layout || (function()
         }
 
         /**
-         * Initializes the private widgetMenu closure
+         * Initializes a single widgets private widgetMenu closure
          * - binds click event handler to menu button
          * - binds menu item click event handlers
          * - binds body click event handler to close the menu
          */
+        function bindWidgetMenu(widgetId){
+            // setup the move to page menu item
+            $menuItemMove = $("#widget-" + widgetId + "-menu-move-item");
+            if (!$menuItemMove.hasClass("menu-item-disabled")) {
+                $menuItemMove.bind('click', function(event) {
+                    var regionWidgetId = rave.getObjectIdFromDomId(this.id);
+                    // Clear the dropdown box; needing to do this may be a bug?
+                    $('.dropdown').removeClass('open');
+                    // Open the modal
+                    $("#moveWidgetModal").data('regionWidgetId', regionWidgetId);
+                    $("#moveWidgetModal").modal('show');
+
+                    // prevent the menu button click event from bubbling up to parent
+                    // DOM object event handlers such as the page tab click event
+                    event.stopPropagation();
+                });
+            }
+
+            // setup the delete widget menu item
+            $menuItemDelete  = $("#widget-" + widgetId + "-menu-delete-item");
+            if (!$menuItemDelete.hasClass("menu-item-disabled")) {
+                $menuItemDelete.bind('click', function(event) {
+                    var regionWidgetId = rave.getObjectIdFromDomId(this.id);
+
+                    // invoke the rpc call to remove the widget from the page
+                    rave.layout.deleteRegionWidget(regionWidgetId);
+
+                    // prevent the menu button click event from bubbling up to parent
+                    // DOM object event handlers such as the page tab click event
+                    event.stopPropagation();
+                });
+            }
+
+            // setup the maximize widget menu item
+            $menuItemMaximize  = $("#widget-" + widgetId + "-menu-maximize-item");
+            if (!$menuItemMaximize.hasClass("menu-item-disabled")) {
+                $menuItemMaximize.bind('click', function(event) {
+                    var regionWidgetId = rave.getObjectIdFromDomId(this.id);
+
+                    // maximize the widget
+                    rave.maximizeWidget({data: {id: regionWidgetId}});
+                    // prevent the menu button click event from bubbling up to parent
+                    // DOM object event handlers such as the page tab click event
+                    event.stopPropagation();
+                });
+            }
+
+            // setup the about this widget menu item
+            $menuItemAbout  = $("#widget-" + widgetId + "-menu-about-item");
+            if (!$menuItemAbout.hasClass("menu-item-disabled")) {
+                $menuItemAbout.bind('click', function(event) {
+                    var regionWidget = rave.getRegionWidgetById(rave.getObjectIdFromDomId(this.id));
+
+                    // go to the widget detail page
+                    rave.viewWidgetDetail(regionWidget.widgetId, getCurrentPageId());
+                    // prevent the menu button click event from bubbling up to parent
+                    // DOM object event handlers such as the page tab click event
+                    event.stopPropagation();
+                });
+            }
+        }
+        
+        /**
+         * Initializes ALL widgets private widgetMenu closure
+         */
         function init() {
             // loop over each widget-menu and initialize the menu items
             // note: the edit prefs menu item is by default rendered disabled
@@ -575,66 +637,7 @@ rave.layout = rave.layout || (function()
             //       the menu item
             $(".widget-menu").each(function(index, element){
                 var widgetId = rave.getObjectIdFromDomId(element.id);
-
-                // setup the move to page menu item
-                $menuItemMove = $("#widget-" + widgetId + "-menu-move-item");
-                if (!$menuItemMove.hasClass("menu-item-disabled")) {
-                    $menuItemMove.bind('click', function(event) {
-                        var regionWidgetId = rave.getObjectIdFromDomId(this.id);
-                        // Clear the dropdown box; needing to do this may be a bug?
-                        $('.dropdown').removeClass('open');
-                        // Open the modal
-                        $("#moveWidgetModal").data('regionWidgetId', regionWidgetId);
-                        $("#moveWidgetModal").modal('show');
-
-                        // prevent the menu button click event from bubbling up to parent
-                        // DOM object event handlers such as the page tab click event
-                        event.stopPropagation();
-                    });
-                }
-
-                // setup the delete widget menu item
-                $menuItemDelete  = $("#widget-" + widgetId + "-menu-delete-item");
-                if (!$menuItemDelete.hasClass("menu-item-disabled")) {
-                    $menuItemDelete.bind('click', function(event) {
-                        var regionWidgetId = rave.getObjectIdFromDomId(this.id);
-
-                        // invoke the rpc call to remove the widget from the page
-                        rave.layout.deleteRegionWidget(regionWidgetId);
-
-                        // prevent the menu button click event from bubbling up to parent
-                        // DOM object event handlers such as the page tab click event
-                        event.stopPropagation();
-                    });
-                }
-
-                // setup the maximize widget menu item
-                $menuItemMaximize  = $("#widget-" + widgetId + "-menu-maximize-item");
-                if (!$menuItemMaximize.hasClass("menu-item-disabled")) {
-                    $menuItemMaximize.bind('click', function(event) {
-                        var regionWidgetId = rave.getObjectIdFromDomId(this.id);
-
-                        // maximize the widget
-                        rave.maximizeWidget({data: {id: regionWidgetId}});
-                        // prevent the menu button click event from bubbling up to parent
-                        // DOM object event handlers such as the page tab click event
-                        event.stopPropagation();
-                    });
-                }
-
-                // setup the about this widget menu item
-                $menuItemAbout  = $("#widget-" + widgetId + "-menu-about-item");
-                if (!$menuItemAbout.hasClass("menu-item-disabled")) {
-                    $menuItemAbout.bind('click', function(event) {
-                        var regionWidget = rave.getRegionWidgetById(rave.getObjectIdFromDomId(this.id));
-
-                        // go to the widget detail page
-                        rave.viewWidgetDetail(regionWidget.widgetId, getCurrentPageId());
-                        // prevent the menu button click event from bubbling up to parent
-                        // DOM object event handlers such as the page tab click event
-                        event.stopPropagation();
-                    });
-                }
+                bindWidgetMenu(widgetId);
             });
         }
 
@@ -667,6 +670,7 @@ rave.layout = rave.layout || (function()
 
         return {
             init: init,
+            bindWidgetMenu : bindWidgetMenu,
             hideAll: hideAllMenus,
             hide: hideMenu,
             show: showMenu,
@@ -769,6 +773,27 @@ rave.layout = rave.layout || (function()
         return $("#currentPageId").val();
     }
 
+    /**
+     * Determines if the widget should be rendered as part of the initial page view.  This can be used to help optimize
+     * page loads as widgets located on non-active sub pages will not be rendered initially.  The function will return
+     * false if one of the following criteria is met, and true otherwise:
+     *
+     * 1) the widget is on a top level page (not a sub page)
+     * 2) the widget is on a sub page that is currently requested in the URL via the hash tag
+     *    ie /app//person/canoniocal#My%20Activity
+     * 3) the widget is on the default sub page and the page request URL doesn't contain a sub-page hash tag
+     *    ie /app/person/canonical
+     *
+     * @return boolean
+     */
+    function isWidgetOnHiddenTab(widget) {
+        var hash = decodeURIComponent(location.hash);
+        var subPage = widget.subPage;
+        return !(subPage.id === null ||
+            ("#" + subPage.name) === hash ||
+            (hash === "" && subPage.isDefault));
+    }
+
    /***
     * initializes the rave.layout namespace code
     */
@@ -787,11 +812,13 @@ rave.layout = rave.layout || (function()
         hideWidgetMenu: widgetMenu.hide,
         deleteRegionWidget: deleteRegionWidget,
         enableEditPrefsMenuItem: widgetMenu.enableEditPrefsMenuItem,
+        bindWidgetMenu: widgetMenu.bindWidgetMenu,
         addPage: addPage,
         updatePage: updatePage,
         movePage: movePage,
         closePageDialog: closePageDialog,
         moveWidgetToPage: moveWidgetToPage,
-        searchHandler : searchHandler
+        searchHandler : searchHandler,
+        isWidgetOnHiddenTab: isWidgetOnHiddenTab
     };
 })();

Modified: rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
URL: http://svn.apache.org/viewvc/rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js?rev=1394560&r1=1394559&r2=1394560&view=diff
==============================================================================
--- rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js (original)
+++ rave/branches/model-split/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js Fri Oct  5 14:59:18 2012
@@ -20,7 +20,6 @@ var rave = rave || {};
 rave.opensocial = rave.opensocial || (function () {
     var WIDGET_TYPE = "OpenSocial";
     var OFFSET = 10;
-    var MIN_HEIGHT = 250;
     var VIEW_NAMES = {
         CANVAS:"canvas",
         DEFAULT:"default",
@@ -86,7 +85,8 @@ rave.opensocial = rave.opensocial || (fu
 
         container.views.createElementForGadget = function (metadata, rel, opt_view, opt_viewTarget, opt_coordinates, parentSite, opt_callback) {
                 if (opt_viewTarget) {
-                    return rave.createPopup(opt_viewTarget);
+                    var prefs = (metadata && metadata.views && metadata.views[opt_view])
+                    return rave.createPopup(opt_viewTarget, prefs);
                 }
             };
 
@@ -195,8 +195,11 @@ rave.opensocial = rave.opensocial || (fu
             }
         }
 
-        // if the gadget is not collapsed, render it
-        renderGadgetViewIfNotCollapsed(rave.opensocial.VIEW_NAMES.HOME, gadget);
+        // if the gadget is on a top level page, or an active sub page tab, render it
+        if (!rave.layout.isWidgetOnHiddenTab(gadget)) {
+            // if the gadget is not collapsed, render it
+            renderGadgetViewIfNotCollapsed(rave.opensocial.VIEW_NAMES.HOME, gadget);
+        }
     }
 
     /**
@@ -232,7 +235,7 @@ rave.opensocial = rave.opensocial || (fu
         var elem = document.getElementById("widget-" + id + "-wrapper");
 
         // determine the height of the gadget's iframe
-        var height = MIN_HEIGHT;
+        var height = rave.getDefaultWidgetHeight();
         if (view == rave.opensocial.VIEW_NAMES.CANVAS) {
             height = elem.clientHeight;
         } else if (gadget.metadata.modulePrefs && gadget.metadata.modulePrefs.height) {