Author: erinnp
Date: Tue Sep  3 14:54:39 2013
New Revision: 1519703

URL: http://svn.apache.org/r1519703
Log:
render widgets

Added:
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_1.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_1.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2wn.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2wn.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3_newuser.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3_newuser.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn_1_bottom.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn_1_bottom.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_4.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_4.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/region.html
      - copied, changed from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/region.html
Modified:
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/tabs.html
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/RenderRegionWidget.js
    
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/controllers/CurrentPageCtrl.js

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_1.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_1.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_1.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_1.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_1.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_1.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_1.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2wn.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2wn.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2wn.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2wn.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2wn.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_2wn.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_2wn.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3_newuser.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3_newuser.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3_newuser.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3_newuser.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3_newuser.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3_newuser.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3_newuser.html
 Tue Sep  3 14:54:39 2013
@@ -17,12 +17,12 @@
     </div>
     <div class="widgetRow upperRow">
         <div ng-repeat="region in page.regions.slice(0,2)">
-            <div 
ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+            <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
         </div>
     </div>
     <div class="widgetRow bottomRow">
         <div ng-repeat="region in page.regions.slice(2)">
-            <div 
ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+            <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
         </div>
     </div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn_1_bottom.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn_1_bottom.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn_1_bottom.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn_1_bottom.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn_1_bottom.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_3nwn_1_bottom.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_3nwn_1_bottom.html
 Tue Sep  3 14:54:39 2013
@@ -1,11 +1,11 @@
 <div class="widgetRow upperRow">
     <div ng-repeat="region in page.regions.slice(0,3)">
-        <div 
ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+        <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
     </div>
 </div>
 
 <div class="widgetRow bottomRow">
     <div ng-repeat="region in page.regions.slice(3)">
-        <div 
ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+        <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
     </div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_4.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_4.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_4.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_4.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_4.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/columns_4.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/columns_4.html
 Tue Sep  3 14:54:39 2013
@@ -1,3 +1,3 @@
 <div ng-repeat="region in page.regions">
-    <div ng-include="'/portal/static/html/portal/partials/region.html'"></div>
+    <div 
ng-include="hostedPath+'/static/html/common/partials/region.html'"></div>
 </div>
\ No newline at end of file

Copied: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/region.html
 (from r1518314, 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/region.html)
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/region.html?p2=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/region.html&p1=rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/region.html&r1=1518314&r2=1519703&rev=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/partials/region.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/common/partials/region.html
 Tue Sep  3 14:54:39 2013
@@ -3,6 +3,6 @@
      class="region {{page.pageLayoutCode}}_{{page.regions.indexOf(region)+1}}"
      ui-sortable="sortingOpts" ng-model="region.regionWidgets">
     <div ng-repeat="regionWidget in region.regionWidgets">
-        <div rave-view-surface="regionWidget"></div>
+        <div render-region-widget="regionWidget"></div>
     </div>
 </div>
\ No newline at end of file

Modified: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/tabs.html
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/tabs.html?rev=1519703&r1=1519702&r2=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/tabs.html
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/html/portal/tabs.html
 Tue Sep  3 14:54:39 2013
@@ -11,7 +11,8 @@
             </a>
             <ul class="dropdown-menu" ng-controller="CurrentPageCtrl">
                 <li class=""><a ng-click="edit()">Edit Page</a></li>
-                <li ng-class="{ 'menu-item-disabled': onlyOnePage }" 
class=""><a ng-click="delete()">Delete Page</a></li>
+                <li ng-class="{ 'menu-item-disabled': onlyOnePage }" 
class=""><a ng-click="delete()">Delete Page</a>
+                </li>
                 <li ng-class="{ 'menu-item-disabled': onlyOnePage }" 
class=""><a ng-click="move()">Move Page</a></li>
                 <li class="hidden"><a ng-click="export()">Export Page</a></li>
                 <li class=""><a ng-click="share()">Share Page</a></li>
@@ -30,6 +31,7 @@
         </li>
     </ul>
 </nav>
+
 <div class="row-fluid">
     <div class="tab-content" ng-show="currentPageId == page.id" 
ng-repeat="page in pages">
         <div id="emptyPageMessageWrapper" class="emptyPageMessageWrapper">
@@ -37,7 +39,7 @@
                 <a href="/portal/app/store">Add widgets to this page</a>
             </div>
         </div>
-        <div 
ng-include="'/portal/static/html/portal/partials/'+page.pageLayoutCode+'.html'"></div>
+        <div ng-include=" hostedPath + 
'/static/html/common/partials/'+page.pageLayoutCode+'.html'"></div>
     </div>
 </div>
 
@@ -47,12 +49,13 @@
 
 -------------------------------->
 <script type="text/ng-template" id="addOrEditPageModal">
-    <form class="form-horizontal modal-form"  ng-submit="savePage()" >
-    <div class="modal-header">
-        <a class="close" ng-click="close()">&times;</a>
-        <h3>{{ title }}</h3>
-    </div>
-    <div class="modal-body">
+    <form class="form-horizontal modal-form" ng-submit="savePage()">
+        <div class="modal-header">
+            <a class="close" ng-click="close()">&times;</a>
+
+            <h3>{{ title }}</h3>
+        </div>
+        <div class="modal-body">
             <fieldset>
                 <div class="control-group error">
                     <label id="pageFormErrors" ng-show="error" 
class="control-label">{{ error }}</label>
@@ -61,30 +64,32 @@
                     <label class="control-label" for="tab_title">Title </label>
 
                     <div class="controls">
-                        <input id="tab_title" class="input-xlarge focused" 
type="text" ng-model="page.name" required />
+                        <input id="tab_title" class="input-xlarge focused" 
type="text" ng-model="page.name" required/>
                     </div>
                 </div>
                 <div class="control-group">
                     <label class="control-label" for="pageLayout">Select Page 
Layout </label>
 
                     <div class="controls">
-                        <select id="pageLayout" ng-model="page.pageLayoutCode" 
required ng-options="l.code as l.code for l in layouts | 
filter:isUserSelectable"">
-                            <option value="">-- Select Layout --</option>
+                        <select id="pageLayout" ng-model="page.pageLayoutCode" 
required
+                                ng-options="l.code as l.code for l in layouts 
| filter:isUserSelectable"">
+                        <option value="">-- Select Layout --</option>
                         </select>
                     </div>
                 </div>
             </fieldset>
-    </div>
-    <div class="modal-footer">
-        <button class="btn" type="button" ng-click="close()">Cancel</button>
-        <button class="btn btn-primary" type="submit">Save</button>
-    </div>
+        </div>
+        <div class="modal-footer">
+            <button class="btn" type="button" 
ng-click="close()">Cancel</button>
+            <button class="btn btn-primary" type="submit">Save</button>
+        </div>
     </form>
 </script>
 
 <script type="text/ng-template" id="movePageModal">
     <div class="modal-header">
         <a class="close" ng-click="close()">&times;</a>
+
         <h3 id="pageMenuDialogHeader">MOVE THIS PAGE</h3>
     </div>
     <div class="modal-body">
@@ -92,8 +97,10 @@
             <fieldset>
                 <div class="control-group" id="pageLayoutGroup">
                     <label class="control-label" for="pageLocation">Move to 
</label>
+
                     <div class="controls">
-                        <select id="pageLocation" ng-model="newLocation" 
ng-options="l.value as l.label for l in locations">
+                        <select id="pageLocation" ng-model="newLocation"
+                                ng-options="l.value as l.label for l in 
locations">
                         </select>
                     </div>
                 </div>
@@ -109,13 +116,14 @@
 <script type="text/ng-template" id="sharePageModal">
     <div class="modal-header">
         <a class="close" ng-click="close()">&times;</a>
+
         <h3>SEARCH OR BROWSE FOR USER</h3>
     </div>
     <div class="modal-body">
         <div id="sharePageDialogContent">
             <div id="shareContent">
                 <div id="searchControls"><input id="searchTerm" 
name="searchTerm" type="text"/>
-                    <input id="shareSearchButton" value="Search" />
+                    <input id="shareSearchButton" value="Search"/>
                     <input id="clearSearchButton" value="Clear Search" 
class="hide"/>
                 </div>
                 <div id="shareSearchListHeader"></div>

Modified: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/RenderRegionWidget.js
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/RenderRegionWidget.js?rev=1519703&r1=1519702&r2=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/RenderRegionWidget.js
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/RenderRegionWidget.js
 Tue Sep  3 14:54:39 2013
@@ -27,7 +27,7 @@ define(['angular'], function(angular){
             restrict: 'EA',
             replace: true,
             scope:{
-                regionWidget: '='
+                regionWidget: '=renderRegionWidget'
             },
             link: function (scope, element, attrs){
                 scope.$watch('regionWidget', function(){

Modified: 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/controllers/CurrentPageCtrl.js
URL: 
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/controllers/CurrentPageCtrl.js?rev=1519703&r1=1519702&r2=1519703&view=diff
==============================================================================
--- 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/controllers/CurrentPageCtrl.js
 (original)
+++ 
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/controllers/CurrentPageCtrl.js
 Tue Sep  3 14:54:39 2013
@@ -21,7 +21,7 @@
     /* Controller Definition */
     return ['$scope', '$dialog', '$location', 'Pages', 'PageLayouts', 
function($scope, $dialog, $location, Pages, PageLayouts) {
 
-        $scope.page = Pages.get({ id : $scope.currentPageId });
+        $scope.page = _.findWhere($scope.pages, {id: $scope.currentPageId});
 
         $scope.$watch('pages.length', function(val){
             if(val === 1) {


Reply via email to