portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r484914 - /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/
Date Sat, 09 Dec 2006 05:03:06 GMT
Author: smilek
Date: Fri Dec  8 21:03:04 2006
New Revision: 484914

URL: http://svn.apache.org/viewvc?view=rev&rev=484914
Log:
added page editor (customizer) widgets - templates and css will be moved to desktop-themes once page editor is completed

Added:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css Fri Dec  8 21:03:04 2006
@@ -0,0 +1,37 @@
+/*
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+.layoutEditPane { }
+
+.layoutEditPane .container{ }
+
+
+.layoutEditPane select
+{
+  font-size: 8pt;
+  color: blue;
+}
+
+
+.layoutEditPane .detail { }
+.layoutEditPane .detail .layoutNameContainer{ width: 92%; max-width: 300px; float:left; vertical-align: middle }
+.layoutEditPane .detail .layoutName { font-size: xx-small; width: 100%; max-width: 300px; float:left }
+.layoutEditPane .detail .selectSpacer { float: left; width: 20px; visibility: hidden }
+.layoutEditPane .detail .operationSpacer { float: left; width: 28px; visibility: hidden }
+.layoutEditPane .detail .dojoButton { float: left; margin-right: 5px }
+
+
+.dojoComboBoxOptions { font-size: xx-small; }

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html Fri Dec  8 21:03:04 2006
@@ -0,0 +1,16 @@
+<div class="layoutEditPane">
+    <div dojoAttachPoint="containerNode" class="container"></div>
+
+    <fieldset>
+        <div dojoAttachPoint="detail" class="detail">
+           <div class="layoutNameContainer">
+            <select name="layoutNameSelect" dojoAttachPoint="layoutNameSelect" dojoType="Select" class="layoutName" autocomplete="false">
+            </select></div>
+            <div class="selectSpacer">&nbsp;</div>
+            <button dojoType="Button" dojoAttachPoint="changeLayoutButton" dojoAttachEvent="onClick:changeLayout">Change Layout</button>
+            <div class="operationSpacer">&nbsp;</div>
+            <button dojoType="Button" dojoAttachEvent="onClick:openColumnSizeEditor">Column Sizes</button>
+        </div>
+    </fieldset>
+
+</div>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js Fri Dec  8 21:03:04 2006
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dojo.provide("jetspeed.widget.LayoutEditPane");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.io.*");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.widget.Dialog");
+dojo.require("dojo.widget.Select");
+dojo.require("dojo.widget.Button");
+
+dojo.require("dojo.html.common");
+dojo.require("dojo.html.display");
+
+jetspeed.widget.LayoutEditPane = function()
+{
+}
+
+dojo.widget.defineWidget(
+	"jetspeed.widget.LayoutEditPane",
+	dojo.widget.HtmlWidget,
+	{
+        // variables
+        layoutId: null,
+        layoutDefinitions: null,
+
+        // template parameters
+        detail: null,
+        layoutNameSelect: null,
+
+        
+        // fields
+		isContainer: true,
+        widgetsInTemplate: true,
+
+
+        // protocol - dojo.widget.Widget create
+
+        postMixInProperties: function( args, fragment, parent )
+        {
+            jetspeed.widget.LayoutEditPane.superclass.postMixInProperties.apply( this, arguments );
+
+            this.templateCssPath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/LayoutEditPane.css" ) ;
+            this.templatePath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/LayoutEditPane.html" ) ;
+        },
+
+		fillInTemplate: function( args, fragment )
+        {
+            jetspeed.widget.LayoutEditPane.superclass.fillInTemplate.call( this );
+
+            //dojo.debug( "building LayoutEditPane for " + this.layoutId + " with layoutDefinitions: " + this.layoutDefinitions );
+		},
+
+        postCreate: function( args, fragment, parent )
+        {
+            if ( this.layoutNameSelect != null )
+            {
+                var currentLayout = null;
+                if ( this.layoutId != null )
+                    currentLayout = jetspeed.page.layouts[ this.layoutId ];
+    
+                var currentLayoutName = null;
+                if ( currentLayout != null )
+                    currentLayoutName = currentLayout.name;
+    
+                var layoutNameData = [];
+                if ( this.layoutDefinitions )
+                {
+                    for ( var i = 0 ; i < this.layoutDefinitions.length ; i++ )
+                    {
+                        var layoutDef = this.layoutDefinitions[i];
+                        if ( layoutDef && layoutDef.length == 2 )
+                        {
+                            layoutNameData.push( [layoutDef[0], layoutDef[1]] );
+                            if ( currentLayoutName == layoutDef[1] )
+                            {
+                                this.layoutNameSelect.setAllValues( layoutDef[0], layoutDef[1] );
+                            }
+    					}
+    				}
+                }
+                this.layoutNameSelect.dataProvider.setData( layoutNameData );
+            }
+        },
+
+
+        // methods
+
+        changeLayout: function()
+        {
+            var updateFragmentContentManager = new jetspeed.widget.UpdateFragmentContentManager( this.layoutId, this.layoutNameSelect.getValue(), null, this.pageEditorWidget );
+            updateFragmentContentManager.getContent();
+        },
+        openColumnSizeEditor: function()
+        {
+            this.pageEditorWidget.openColumnSizesEditor( this.layoutId );
+        }
+	}
+);

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css Fri Dec  8 21:03:04 2006
@@ -0,0 +1,51 @@
+/*
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+.layoutRootEditPane { }
+
+.layoutRootEditPane .container{ }
+
+
+.layoutRootEditPane select
+{
+  font-size: 8pt;
+  color: blue;
+}
+
+.layoutRootEditPane .detail { }
+
+.layoutRootEditPane .detail .layoutDecoratorContainer{ width: 80px; float: left }
+.layoutRootEditPane .detail .layoutDecorator { font-size: xx-small; width: 100%; float: left }
+
+.layoutRootEditPane .detail .portletDecoratorContainer{ width: 150px; float: left }
+.layoutRootEditPane .detail .portletDecorator { font-size: xx-small; width: 100%; float: left }
+
+.layoutRootEditPane .detail .desktopThemeContainer{ width: 80px; float:left }
+.layoutRootEditPane .detail .desktopTheme { font-size: xx-small; width: 100%; float: left }
+
+.layoutRootEditPane .detail .layoutNameContainer{ width: 100%; max-width: 300px; float:left }
+.layoutRootEditPane .detail .layoutName { font-size: xx-small; width: 100%; max-width: 300px; float: left }
+
+.layoutRootEditPane .detail .rowContainerLayoutName { width: 92%; margin-top: 5px; float: left; clear: both }
+.layoutRootEditPane .detail .rowContainer { margin-top: 10px; float: left; clear: both }
+
+.layoutRootEditPane .detail .selectSpacer { float: left; width: 20px; visibility: hidden }
+.layoutRootEditPane .detail .operationSpacer { float: left; width: 28px; visibility: hidden }
+
+.layoutRootEditPane .detail .dojoButton { float: left; margin-right: 5px }
+
+
+.dojoComboBoxOptions { font-size: xx-small; }

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html Fri Dec  8 21:03:04 2006
@@ -0,0 +1,38 @@
+<div class="layoutRootEditPane">
+    <div dojoAttachPoint="containerNode" class="container"></div>
+
+    <fieldset>
+       <div dojoAttachPoint="detail" class="detail">
+           <div class="rowContainerLayoutName">
+               <div class="layoutNameContainer">
+                   <select name="layoutNameSelect" dojoAttachPoint="layoutNameSelect" dojoType="Select" class="layoutName" autocomplete="false"></select>
+               </div>
+               <div class="selectSpacer">&nbsp;</div>
+               <button dojoType="Button" dojoAttachPoint="changeLayoutButton" dojoAttachEvent="onClick:changeLayout">Change Layout</button>
+               <div class="operationSpacer">&nbsp;</div>
+               <button dojoType="Button" dojoAttachEvent="onClick:openColumnSizeEditor">Column Sizes</button>
+           </div>
+           <div class="rowContainer">
+               <div class="layoutDecoratorContainer">
+                   <select name="layoutDecoratorSelect" dojoAttachPoint="layoutDecoratorSelect" dojoType="Select" class="layoutDecorator" autocomplete="false"></select>
+               </div>
+               <div class="selectSpacer">&nbsp;</div>
+               <button dojoType="Button" dojoAttachPoint="changeLayoutDecoratorButton" dojoAttachEvent="onClick:changeLayoutDecorator">Change Layout Theme</button>
+               <div class="operationSpacer">&nbsp;</div>
+               <div class="portletDecoratorContainer">
+                   <select name="portletDecoratorSelect" dojoAttachPoint="portletDecoratorSelect" dojoType="Select" class="portletDecorator" autocomplete="false"></select>
+               </div>
+               <div class="selectSpacer">&nbsp;</div>
+               <button dojoType="Button" dojoAttachPoint="changePortletDecoratorButton" dojoAttachEvent="onClick:changePortletDecorator">Change Portlet Theme</button>
+           </div>
+           <div class="rowContainer">
+               <div class="desktopThemeContainer">
+                   <select name="desktopThemeSelect" dojoAttachPoint="desktopThemeSelect" dojoType="Select" class="desktopTheme" autocomplete="false"></select>
+               </div>
+               <div class="selectSpacer">&nbsp;</div>
+               <button dojoType="Button" dojoAttachPoint="changeDesktopThemeButton" dojoAttachEvent="onClick:changeDesktopTheme">Change Desktop Theme</button>
+           </div>
+       </div>
+    </fieldset>
+
+</div>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js Fri Dec  8 21:03:04 2006
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dojo.provide("jetspeed.widget.LayoutRootEditPane");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.io.*");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.widget.Dialog");
+dojo.require("dojo.widget.Select");
+dojo.require("dojo.widget.Button");
+
+dojo.require("dojo.html.common");
+dojo.require("dojo.html.display");
+
+dojo.require("jetspeed.widget.LayoutEditPane");
+
+jetspeed.widget.LayoutRootEditPane = function()
+{
+}
+
+dojo.widget.defineWidget(
+	"jetspeed.widget.LayoutRootEditPane",
+	jetspeed.widget.LayoutEditPane,
+	{
+        // variables
+        layoutDecoratorDefinitions: null,
+
+        // template parameters
+        layoutDecoratorSelect: null,
+        portletDecoratorSelect: null,
+        desktopThemeSelect: null,
+        
+        // fields
+
+
+
+        // protocol - dojo.widget.Widget create
+
+        postMixInProperties: function( args, fragment, parent )
+        {
+            jetspeed.widget.LayoutRootEditPane.superclass.postMixInProperties.apply( this, arguments );
+
+            this.templateCssPath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/LayoutRootEditPane.css" ) ;
+            this.templatePath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/LayoutRootEditPane.html" ) ;
+        },
+
+		fillInTemplate: function( args, fragment )
+        {
+            jetspeed.widget.LayoutRootEditPane.superclass.fillInTemplate.call( this );
+
+            //dojo.debug( "building LayoutRootEditPane for " + this.layoutId + " with layoutDefinitions: " + this.layoutDefinitions );
+		},
+
+        postCreate: function( args, fragment, parent )
+        {
+            jetspeed.widget.LayoutRootEditPane.superclass.postCreate.apply( this, arguments );
+
+            if ( this.layoutDecoratorSelect != null )
+            {    
+                var currentLayoutDecorator = jetspeed.page.layoutDecorator;
+    
+                var layoutDecoratorData = [];
+                if ( this.layoutDecoratorDefinitions )
+                {
+                    for ( var i = 0 ; i < this.layoutDecoratorDefinitions.length ; i++ )
+                    {
+                        var layoutDecoratorDef = this.layoutDecoratorDefinitions[i];
+                        if ( layoutDecoratorDef && layoutDecoratorDef.length == 2 )
+                        {
+                            layoutDecoratorData.push( [layoutDecoratorDef[0], layoutDecoratorDef[1]] );
+                            if ( currentLayoutDecorator == layoutDecoratorDef[1] )
+                            {
+                                this.layoutDecoratorSelect.setAllValues( layoutDecoratorDef[0], layoutDecoratorDef[1] );
+                            }
+    					}
+    				}
+                }
+                this.layoutDecoratorSelect.dataProvider.setData( layoutDecoratorData );
+            }
+
+            if ( this.portletDecoratorSelect != null )
+            {    
+                var currentPortletDecorator = jetspeed.page.portletDecorator;
+    
+                var portletDecoratorData = [];
+                if ( this.portletDecoratorDefinitions )
+                {
+                    for ( var i = 0 ; i < this.portletDecoratorDefinitions.length ; i++ )
+                    {
+                        var portletDecoratorDef = this.portletDecoratorDefinitions[i];
+                        if ( portletDecoratorDef && portletDecoratorDef.length == 2 )
+                        {
+                            portletDecoratorData.push( [portletDecoratorDef[0], portletDecoratorDef[1]] );
+                            if ( currentPortletDecorator == portletDecoratorDef[1] )
+                            {
+                                this.portletDecoratorSelect.setAllValues( portletDecoratorDef[0], portletDecoratorDef[1] );
+                            }
+    					}
+    				}
+                }
+                this.portletDecoratorSelect.dataProvider.setData( portletDecoratorData );
+            }
+
+            if ( this.desktopThemeSelect != null )
+            {    
+                var currentDesktopTheme = jetspeed.prefs.getDesktopTheme();
+    
+                var desktopThemeData = [];
+                if ( this.desktopThemeDefinitions )
+                {
+                    for ( var i = 0 ; i < this.desktopThemeDefinitions.length ; i++ )
+                    {
+                        var desktopThemeDef = this.desktopThemeDefinitions[i];
+                        if ( desktopThemeDef && desktopThemeDef.length == 2 )
+                        {
+                            desktopThemeData.push( [desktopThemeDef[0], desktopThemeDef[1]] );
+                            if ( currentDesktopTheme == desktopThemeDef[1] )
+                            {
+                                this.desktopThemeSelect.setAllValues( desktopThemeDef[0], desktopThemeDef[1] );
+                            }
+    					}
+    				}
+                }
+                this.desktopThemeSelect.dataProvider.setData( desktopThemeData );
+            }
+        },
+
+
+        // methods
+
+        changeLayoutDecorator: function()
+        {
+            var updatePageInfoContentManager = new jetspeed.widget.UpdatePageInfoContentManager( this.layoutDecoratorSelect.getValue(), null, null, this.pageEditorWidget );
+            updatePageInfoContentManager.getContent();
+        },
+        changePortletDecorator: function()
+        {
+            var updatePageInfoContentManager = new jetspeed.widget.UpdatePageInfoContentManager( null, this.portletDecoratorSelect.getValue(), null, this.pageEditorWidget );
+            updatePageInfoContentManager.getContent();
+        },
+        changeDesktopTheme: function()
+        {
+            var updatePageInfoContentManager = new jetspeed.widget.UpdatePageInfoContentManager( null, null, this.desktopThemeSelect.getValue(), this.pageEditorWidget );
+            updatePageInfoContentManager.getContent();
+        }
+	}
+);

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css Fri Dec  8 21:03:04 2006
@@ -0,0 +1,74 @@
+/*
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+.pageEditPane { }
+
+.pageEditPane .container { }
+
+
+.pageEditPane
+{
+  width: 100%;
+  font-size: 8pt;
+  color: blue;
+  overflow: hidden;
+  clip: auto;
+}
+
+.pageEditPane label, 
+.pageEditPane input, 
+.pageEditPane select 
+{
+  font-size: 8pt;
+  color: blue;
+}
+
+.pageEditPane input
+{
+  font-size: 8pt;
+}
+
+.pageEditPaneLeft
+{
+  display:inline;
+  float:left;
+}
+
+.pageEditPaneRight
+{
+  display:inline;
+  float:right;
+  padding-right: 5px;
+}
+
+.pageEditPane .detail .buttonContainer { margin-top: 5px }
+
+.pageEditPane .detail .dojoButton { float: left; margin-right: 5px }
+.pageEditPane .detail .buttonContainerRight .dojoButton { float: right; margin-right: 5px }
+
+.dojoDialog .container { padding: 0.5em; background: #fff; border: 2px solid #333; -moz-border-radius : 5px; }
+
+.dojoDialog .deletePageDialog { background: transparent; width: 20em; }
+.dojoDialog .deletePageDialog h2 { margin-top: 0; padding-top: 0; }
+.dojoDialog .deletePageDialog p { clear: both; }
+.dojoDialog .deletePageDialog .dojoButton { float: right; margin-right: 5px }
+
+.dojoDialog .createPageDialog { background: transparent; width: 20em; }
+.dojoDialog .createPageDialog h2 { margin-top: 0; padding-top: 0; }
+.dojoDialog .createPageDialog p { clear: both; }
+.dojoDialog .createPageDialog .dojoButton { float: right; margin-right: 5px }
+.dojoDialog .createPageDialog .createPageField { margin-bottom: 5px }
+

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html Fri Dec  8 21:03:04 2006
@@ -0,0 +1,49 @@
+<div class="pageEditPane">
+    <div dojoAttachPoint="containerNode" class="container"></div>
+
+    <fieldset>
+        <div dojoAttachPoint="detail" class="detail">
+            <div>Page Configuration</div>
+            <div class="buttonContainer">
+                <button dojoType="Button" dojoAttachEvent="onClick:deletePage">Delete Page</button>
+                <button dojoType="Button" dojoAttachEvent="onClick:createPage">Create New Page</button>
+                <div class="buttonContainerRight"><button dojoType="Button" dojoAttachEvent="onClick:addPortlet">Add Portlet</button></div>
+            </div>
+        </div>
+    </fieldset>
+
+	<div dojoAttachPoint="deletePageDialog">
+		<div class="container" dojoAttachPoint="deletePageDialogBg">
+			<div class="deletePageDialog" dojoAttachPoint="deletePageDialogFg">
+				<h2>Are you sure you want to delete this page?</h2>
+				<button dojoType="Button" id="deletePageYes" dojoAttachEvent="onClick:deletePageConfirmed">Yes</button>
+				<button dojoType="Button" id="deletePageNo" dojoAttachPoint="deletePageCancel">No</button>
+				<p></p>
+			</div>
+		</div>
+	</div>
+
+    <div dojoAttachPoint="createPageDialog">
+		<div class="container" dojoAttachPoint="createPageDialogBg">
+			<div class="createPageDialog" dojoAttachPoint="createPageDialogFg">
+				<h2>Create New Page</h2>
+                <div dojoAttachPoint="createPageNameField" class="createPageField">
+                    <div>Name</div>
+                    <input dojoType="Textbox" dojoAttachPoint="createPageNameTextbox" maxlength="30">
+                </div>
+                <div dojoAttachPoint="createPageTitleField" class="createPageField">
+                    <div>Title</div>
+                    <input dojoType="Textbox" dojoAttachPoint="createPageTitleTextbox" maxlength="30">
+                </div>
+                <div dojoAttachPoint="createPageShortTitleField" class="createPageField">
+                    <div>Short Title</div>
+                    <input dojoType="Textbox" dojoAttachPoint="createPageShortTitleTextbox" maxlength="30">
+                </div>
+				<button dojoType="Button" id="createPageYes" dojoAttachEvent="onClick:createPageConfirmed">OK</button>
+				<button dojoType="Button" id="createPageNo" dojoAttachPoint="createPageCancel">Cancel</button>
+				<p></p>
+			</div>
+		</div>
+	</div>
+
+</div>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js Fri Dec  8 21:03:04 2006
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dojo.provide("jetspeed.widget.PageEditPane");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.io.*");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.widget.Dialog");
+dojo.require("dojo.widget.Select");
+dojo.require("dojo.widget.Button");
+
+dojo.require("dojo.html.common");
+dojo.require("dojo.html.display");
+
+jetspeed.widget.PageEditPane = function()
+{
+}
+
+dojo.widget.defineWidget(
+	"jetspeed.widget.PageEditPane",
+	dojo.widget.HtmlWidget,
+	{
+        // template parameters
+        deletePageDialog: null,
+		deletePageDialogBg: null,
+		deletePageDialogFg: null,
+
+        createPageDialog: null,
+		createPageDialogBg: null,
+		createPageDialogFg: null,
+
+        detail: null,
+
+        
+        // fields
+		isContainer: true,
+        widgetsInTemplate: true,
+
+
+        // protocol - dojo.widget.Widget create
+
+        postMixInProperties: function( args, fragment, parent )
+        {
+            jetspeed.widget.PageEditPane.superclass.postMixInProperties.apply( this, arguments );
+
+            this.templateCssPath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/PageEditPane.css" ) ;
+            this.templatePath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/PageEditPane.html" ) ;
+        },
+
+        fillInTemplate: function( args, fragment )
+        {
+            var self = this;
+            this.deletePageDialog = dojo.widget.createWidget( "dialog", { widgetsInTemplate: true, deletePageConfirmed: function() { this.hide(); self.deletePageConfirmed(); } }, this.deletePageDialog );
+			this.deletePageDialog.setCloseControl( this.deletePageDialog.deletePageCancel.domNode );
+			dojo.html.setOpacity( this.deletePageDialogBg, 0.8 );
+			dojo.html.setOpacity( this.deletePageDialogFg, 1 );
+
+            var createPageParams = {};
+            createPageParams.widgetsInTemplate = true;
+            createPageParams.createPageConfirmed = function()
+            {
+                var pageName = this.createPageNameTextbox.textbox.value;
+                var pageTitle = this.createPageTitleTextbox.textbox.value;
+                var pageShortTitle = this.createPageShortTitleTextbox.textbox.value;
+                this.hide();
+                self.createPageConfirmed( pageName, pageTitle, pageShortTitle );
+            };
+            this.createPageDialog = dojo.widget.createWidget( "dialog", createPageParams, this.createPageDialog );
+			this.createPageDialog.setCloseControl( this.createPageDialog.createPageCancel.domNode );
+			dojo.html.setOpacity( this.createPageDialogBg, 0.8 );
+			dojo.html.setOpacity( this.createPageDialogFg, 1 );
+            
+            jetspeed.widget.PageEditPane.superclass.fillInTemplate.call( this );
+		},
+
+
+        // methods
+
+        deletePage: function()
+        {
+            this.deletePageDialog.show();
+        },
+        deletePageConfirmed: function()
+        {
+            var removePageContentManager = new jetspeed.widget.RemovePageContentManager( this.pageEditorWidget );
+            removePageContentManager.getContent();
+        },
+        createPage: function()
+        {
+            this.createPageDialog.show();
+        },
+        createPageConfirmed: function( pageName, pageTitle, pageShortTitle )
+        {
+            if ( pageName != null && pageName.length > 0 )
+            {
+                var pagePath = jetspeed.page.getPageDirectory() + pageName;
+                var addPageContentManager = new jetspeed.widget.AddPageContentManager( pagePath, pageName, null, pageTitle, pageShortTitle, this.pageEditorWidget );
+                addPageContentManager.getContent();
+            }
+        },
+        addPortlet: function()
+        {
+            jetspeed.page.addPortletInitiate();
+        }
+	}
+);

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css Fri Dec  8 21:03:04 2006
@@ -0,0 +1,76 @@
+/*
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+.pageEditorPane { }
+
+.pageEditorPane .container { }
+
+
+.pageEditorPane
+{
+  width: 100%;
+  padding-top: 5px;
+  font-size: 8pt;
+  color: blue;
+  overflow: hidden;
+  clip: auto;
+}
+
+.pageEditorPane label, 
+.pageEditorPane input, 
+.pageEditorPane select 
+{
+  font-size: 8pt;
+  color: blue;
+}
+
+.pageEditorPane input
+{
+  font-size: 8pt;
+}
+
+.pageEditorPaneLeft
+{
+  display:inline;
+  float:left;
+}
+
+.pageEditorPaneRight
+{
+  display:inline;
+  float:right;
+  padding-right: 5px;
+}
+
+
+.dojoDialog .container { padding: 0.5em; background: #fff; border: 2px solid #333; -moz-border-radius : 5px; }
+
+.dojoDialog .deletePortletDialog { background: transparent; width: 20em; }
+.dojoDialog .deletePortletDialog h2 { margin-top: 0; padding-top: 0; }
+.dojoDialog .deletePortletDialog p { clear: both; }
+.dojoDialog .deletePortletDialog .dojoButton { float: right; margin-right: 5px }
+
+.dojoDialog .columnSizeDialog { background: transparent; width: 20em; }
+.dojoDialog .columnSizeDialog h2{ margin-top: 0; padding-top: 0; }
+.dojoDialog .columnSizeDialog p{ clear: both; }
+.dojoDialog .columnSizeDialog .dojoButton { float: right; margin-right: 5px }
+.dojoDialog .columnSizeDialog .columnSizeField { margin-bottom: 5px }
+.dojoDialog .columnSizeDialog .columnSizeField .range { font-size: 8pt; color: red }
+.dojoDialog .columnSizeDialog .columnSizeField .missing { font-size: 8pt; color: red }
+.dojoDialog .columnSizeDialog .columnSizeField .invalid { font-size: 8pt; color: red }
+
+.pageEditorPane .detail { }
+

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html Fri Dec  8 21:03:04 2006
@@ -0,0 +1,52 @@
+<div class="pageEditorPane">
+    <div dojoAttachPoint="containerNode" class="container"></div>
+
+    <fieldset>
+        <div class="pageEditorPaneLeft"><b>Jetspeed Customizer</b></div>
+        <div class="pageEditorPaneRight"></div>
+    </fieldset>
+
+    <div dojoAttachPoint="deletePortletDialog">
+		<div class="container" dojoAttachPoint="deletePortletDialogBg">
+			<div class="deletePortletDialog" dojoAttachPoint="deletePortletDialogFg">
+				<h2>Are you sure you want to delete this portlet?</h2>
+                <div dojoAttachPoint="deletePortletTitle">&nbsp;</div>
+                <button dojoType="Button" dojoAttachEvent="onClick:deletePortletConfirmed">OK</button>
+                <button dojoType="Button" dojoAttachPoint="deletePortletCancel">Cancel</button>
+				<p></p>
+			</div>
+		</div>
+	</div>
+
+	<div dojoAttachPoint="columnSizeDialog">
+		<div class="container" dojoAttachPoint="columnSizeDialogBg">
+			<div class="columnSizeDialog" dojoAttachPoint="columnSizeDialogFg">
+				<h2>Change Column Sizes</h2>
+                <div dojoAttachPoint="spinner0Field" class="columnSizeField">
+                    <div>Column 1</div>
+                    <input dojoType="IntegerSpinner" dojoAttachPoint="spinner0" value="0" delta="1" min="0" max="100" separator="," maxlength="10" >
+                </div>
+                <div dojoAttachPoint="spinner1Field" class="columnSizeField">
+                    <div>Column 2</div>
+                    <input dojoType="IntegerSpinner" dojoAttachPoint="spinner1" value="0" delta="1" min="0" max="100" separator="," maxlength="10" >
+                </div>
+                <div dojoAttachPoint="spinner2Field" class="columnSizeField">
+                    <div>Column 3</div>
+                    <input dojoType="IntegerSpinner" dojoAttachPoint="spinner2" value="0" delta="1" min="0" max="100" separator="," maxlength="10" >
+                </div>
+                <div dojoAttachPoint="spinner3Field" class="columnSizeField">
+                    <div>Column 4</div>
+                    <input dojoType="IntegerSpinner" dojoAttachPoint="spinner3" value="0" delta="1" min="0" max="100" separator="," maxlength="10" >
+                </div>
+                <div dojoAttachPoint="spinner4Field" class="columnSizeField">
+                    <div>Column 5</div>
+                    <input dojoType="IntegerSpinner" dojoAttachPoint="spinner4" value="0" delta="1" min="0" max="100" separator="," maxlength="10" >
+                </div>
+                <button dojoType="Button" dojoAttachEvent="onClick:columnSizeConfirmed">OK</button>
+                <button dojoType="Button" dojoAttachPoint="columnSizeCancel">Cancel</button>
+                <p></p>
+			</div>
+		</div>
+	</div>
+
+</div>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js?view=auto&rev=484914
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js Fri Dec  8 21:03:04 2006
@@ -0,0 +1,518 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dojo.provide("jetspeed.widget.PageEditor");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.io.*");
+dojo.require("dojo.event.*");
+dojo.require("dojo.string.extras");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.widget.Dialog");
+dojo.require("dojo.widget.Select");
+dojo.require("dojo.widget.Button");
+dojo.require("dojo.widget.Spinner");
+
+dojo.require("dojo.html.common");
+dojo.require("dojo.html.display");
+
+jetspeed.widget.PageEditor = function()
+{
+}
+
+dojo.widget.defineWidget(
+	"jetspeed.widget.PageEditor",
+	dojo.widget.HtmlWidget,
+	{
+        // template parameters
+        deletePortletDialog: null,
+		deletePortletDialogBg: null,
+		deletePortletDialogFg: null,
+
+        columnSizeDialog: null,
+		columnSizeDialogBg: null,
+		columnSizeDialogFg: null,
+
+
+        detail: null,
+
+        
+        // fields
+		isContainer: true,
+        widgetsInTemplate: true,
+
+
+        // protocol - dojo.widget.Widget create
+
+        postMixInProperties: function( args, fragment, parent )
+        {
+            jetspeed.widget.PageEditor.superclass.postMixInProperties.apply( this, arguments );
+
+            this.templateCssPath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/PageEditor.css" ) ;
+            this.templatePath = new dojo.uri.Uri( jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/widget/PageEditor.html" ) ;
+        },
+
+        fillInTemplate: function( args, fragment )
+        {
+            var self = this;
+
+            this.deletePortletDialog = dojo.widget.createWidget( "dialog", { widgetsInTemplate: true, deletePortletConfirmed: function() { this.hide(); self.deletePortletConfirmed( this.portletEntityId ); } }, this.deletePortletDialog );
+			this.deletePortletDialog.setCloseControl( this.deletePortletDialog.deletePortletCancel.domNode );
+			dojo.html.setOpacity( this.deletePortletDialogBg, 0.8 );
+			dojo.html.setOpacity( this.deletePortletDialogFg, 1 );
+
+            var columnSizeParams = {};
+            columnSizeParams.widgetsInTemplate = true;
+            columnSizeParams.columnSizeConfirmed = function()
+            {
+                var columnSizesSum = 0;
+                var columnSizes = new Array();
+                for ( var i = 0 ; i < this.columnCount; i++ )
+                {
+                    var spinnerWidget = this[ "spinner" + i ];
+                    var colSize = new Number( spinnerWidget.getValue() );
+                    columnSizes.push( colSize );
+                    columnSizesSum += colSize;
+                }
+
+                if ( columnSizesSum > 100 )
+                {
+                    alert( "Sum of column sizes cannot exceed 100." );
+                }
+                else
+                {
+                    this.hide();
+                    self.columnSizeConfirmed( this.layoutId, columnSizes );
+                }
+            };
+
+            this.columnSizeDialog = dojo.widget.createWidget( "dialog", columnSizeParams, this.columnSizeDialog );
+            this.columnSizeDialog.setCloseControl( this.columnSizeDialog.columnSizeCancel.domNode );
+			dojo.html.setOpacity(this.columnSizeDialogBg, 0.8);
+			dojo.html.setOpacity(this.columnSizeDialogFg, 1);
+
+            jetspeed.widget.PageEditor.superclass.fillInTemplate.call( this );
+		},
+
+        postCreate: function( args, fragment, parent )
+        {
+            this.editPageInitiate();
+        },
+
+        // initialization
+        editPageInitiate: function()
+        {
+            var themesContentManager = new jetspeed.widget.EditPageGetThemesContentManager( this, true, true, true, true );
+            themesContentManager.getContent();
+        },
+        editPageBuild: function()
+        {
+            var pageEditorWidgets = new Array();
+            var pageEditPaneWidget = dojo.widget.createWidget( "jetspeed:PageEditPane" );
+            pageEditPaneWidget.pageEditorWidget = this;
+            dojo.dom.insertAfter( pageEditPaneWidget.domNode, this.domNode );
+            pageEditorWidgets.push( pageEditPaneWidget );
+
+            var rootLayoutEditPaneWidget = dojo.widget.createWidget( "jetspeed:LayoutRootEditPane", { layoutId: jetspeed.page.rootFragmentId, layoutDefinitions: jetspeed.page.themeDefinitions.layouts, layoutDecoratorDefinitions: jetspeed.page.themeDefinitions.pageDecorations, portletDecoratorDefinitions: jetspeed.page.themeDefinitions.portletDecorations, desktopThemeDefinitions: jetspeed.page.themeDefinitions.desktopThemes } );
+            rootLayoutEditPaneWidget.pageEditorWidget = this;
+            dojo.dom.insertAfter( rootLayoutEditPaneWidget.domNode, pageEditPaneWidget.domNode );
+            pageEditorWidgets.push( rootLayoutEditPaneWidget );
+            
+            if ( jetspeed.prefs.windowTiling )
+            {
+                for ( var i = 0 ; i < jetspeed.page.columns.length; i++ )
+                {
+                    var col = jetspeed.page.columns[i];
+                    if ( col.layoutHeader )
+                    {
+                        var layoutEditPaneWidget = dojo.widget.createWidget( "jetspeed:LayoutEditPane", { layoutId: col.layoutId, layoutDefinitions: jetspeed.page.themeDefinitions.layouts } );
+                        layoutEditPaneWidget.pageEditorWidget = this;
+                        col.domNode.appendChild( layoutEditPaneWidget.domNode );
+                        pageEditorWidgets.push( layoutEditPaneWidget );
+                    }
+                }
+            }
+            this.pageEditorWidgets = pageEditorWidgets;
+            this.editPageSyncPortletActions();
+        },
+        editPageSyncPortletActions: function()
+        {
+            var portlets = jetspeed.page.getPortletArray()
+            if ( portlets != null )
+            {
+                for ( var i = 0 ; i < portlets.length ; i++ )
+                {
+                    portlets[i].syncActions();
+                }
+            }
+        },
+        editPageHide: function()
+        {
+            if ( this.pageEditorWidgets != null )
+            {
+                for ( var i = 0 ; i < this.pageEditorWidgets.length ; i++ )
+                {
+                    this.pageEditorWidgets[i].hide();
+                }
+            }
+            this.hide();
+            this.editPageSyncPortletActions();
+        },
+        editPageShow: function()
+        {
+            if ( this.pageEditorWidgets != null )
+            {
+                for ( var i = 0 ; i < this.pageEditorWidgets.length ; i++ )
+                {
+                    this.pageEditorWidgets[i].show();
+                }
+            }
+            this.show();
+            this.editPageSyncPortletActions();
+        },
+
+
+        // methods
+
+        deletePortlet: function( portletEntityId, portletTitle )
+        {
+            this.deletePortletDialog.portletEntityId = portletEntityId;
+            this.deletePortletDialog.portletTitle = portletTitle;
+            this.deletePortletTitle.innerHTML = portletTitle;
+            this.deletePortletDialog.show();
+        },
+        deletePortletConfirmed: function( portletEntityId )
+        {
+            var removePortletContentManager = new jetspeed.widget.RemovePortletContentManager( portletEntityId, this );
+            removePortletContentManager.getContent();
+        },
+        openColumnSizesEditor: function( layoutId )
+        {
+            var currentLayout = null;
+            if ( layoutId != null )
+                currentLayout = jetspeed.page.layouts[ layoutId ];
+
+            if ( currentLayout != null && currentLayout.columnSizes != null && currentLayout.columnSizes.length > 0 )
+            {
+                var spinnerMax = 5;   // 5 is current max
+                var spinnerCount = 0;
+                for ( var i = 0 ; i < spinnerMax; i++ )
+                {
+                    var spinnerWidget = this.columnSizeDialog[ "spinner" + i ];
+                    var spinnerFieldDiv = this[ "spinner" + i + "Field" ];
+                    if ( i < currentLayout.columnSizes.length )
+                    {
+                        spinnerWidget.setValue( currentLayout.columnSizes[i] );
+                        spinnerFieldDiv.style.display = "block";
+                        spinnerWidget.show();
+                        spinnerCount++;
+                    }
+                    else
+                    {
+                        spinnerFieldDiv.style.display = "none";
+                        spinnerWidget.hide();
+                    }
+                }
+                this.columnSizeDialog.layoutId = layoutId;
+                this.columnSizeDialog.columnCount = spinnerCount;
+                this.columnSizeDialog.show();
+            }            
+        },
+        columnSizeConfirmed: function( layoutId, columnSizes )
+        {
+            if ( layoutId != null && columnSizes != null && columnSizes.length > 0 )
+            {   // layout name is currently required by updatepage/update-fragment
+                var currentLayout = jetspeed.page.layouts[ layoutId ];
+    
+                var currentLayoutName = null;
+                if ( currentLayout != null )
+                    currentLayoutName = currentLayout.name;
+
+                if ( currentLayoutName != null )
+                {
+                    var colSizesStr = "";
+                    for ( var i = 0 ; i < columnSizes.length ; i++ )
+                    {
+                        if ( i > 0 )
+                            colSizesStr += ",";
+                        colSizesStr += columnSizes[i] + "%";
+                    }
+                    var updateFragmentContentManager = new jetspeed.widget.UpdateFragmentContentManager( layoutId, currentLayoutName, colSizesStr, this );
+                    updateFragmentContentManager.getContent();
+                }
+            }
+        },
+
+        refreshPage: function()
+        {
+            dojo.lang.setTimeout( this, this._doRefreshPage, 10 );
+        },
+        _doRefreshPage: function()
+        {
+            var pageUrl = jetspeed.page.getPageUrl();
+            pageUrl += "?" + jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER + "=true";
+            window.location.href = pageUrl;
+        }
+	}
+);
+
+
+// ... jetspeed.widget.EditPageGetThemesContentManager
+jetspeed.widget.EditPageGetThemesContentManager = function( pageEditorWidget, pageDecorations, portletDecorations, layouts, desktopThemes )
+{
+    this.pageEditorWidget = pageEditorWidget;
+    var getThemeTypes = new Array();
+    if ( pageDecorations )
+        getThemeTypes.push( "pageDecorations" );
+    if ( portletDecorations )
+        getThemeTypes.push( "portletDecorations" );
+    if ( layouts )
+        getThemeTypes.push( "layouts" );
+    if ( desktopThemes )
+        getThemeTypes.push( "desktopThemes" );
+    this.getThemeTypes = getThemeTypes;
+    this.getThemeTypeNextIndex = 0;
+};
+jetspeed.widget.EditPageGetThemesContentManager.prototype =
+{
+    getContent: function()
+    {
+        if ( this.getThemeTypes != null && this.getThemeTypes.length > this.getThemeTypeNextIndex )
+        {
+            var queryString = "?action=getthemes&type=" + this.getThemeTypes[ this.getThemeTypeNextIndex ] + "&format=json";
+            var getThemesUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+            var ajaxApiContext = new jetspeed.om.Id( "getthemes", { } );
+            var bindArgs = {};
+            bindArgs.url = getThemesUrl;
+            bindArgs.mimetype = "text/json";
+            jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+        }
+        else
+        {
+            this.pageEditorWidget.editPageBuild();
+        }
+    },
+    notifySuccess: function( /* JSON */ getThemesData, /* String */ requestUrl, domainModelObject )
+    {
+        if ( jetspeed.page.themeDefinitions == null )
+            jetspeed.page.themeDefinitions = {};
+        jetspeed.page.themeDefinitions[ this.getThemeTypes[ this.getThemeTypeNextIndex ] ] = getThemesData;
+        this.getThemeTypeNextIndex++;
+        this.getContent();
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, domainModelObject )
+    {
+        dojo.raise( "EditPageGetThemesContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};
+
+// ... jetspeed.widget.RemovePageContentManager
+jetspeed.widget.RemovePageContentManager = function( pageEditorWidget )
+{
+    this.pageEditorWidget = pageEditorWidget;    
+};
+jetspeed.widget.RemovePageContentManager.prototype =
+{
+    getContent: function()
+    {
+        var queryString = "?action=updatepage&method=remove";
+        var removePageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+        var ajaxApiContext = new jetspeed.om.Id( "updatepage-remove-page", { } );
+        var bindArgs = {};
+        bindArgs.url = removePageUrl;
+        bindArgs.mimetype = "text/xml";
+        jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+    },
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "updatepage-remove-page" ) )
+        {
+            var pageUrl = jetspeed.page.makePageUrl( "/" );
+            pageUrl += "?" + jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER + "=true";
+            window.location.href = pageUrl;
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        dojo.raise( "RemovePageContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};
+
+// ... jetspeed.widget.AddPageContentManager
+jetspeed.widget.AddPageContentManager = function( pagePath, pageName, layoutName, pageTitle, pageShortTitle, pageEditorWidget )
+{
+    this.pagePath = pagePath;
+    this.pageName = pageName;
+    if ( layoutName == null )
+    {
+        if ( jetspeed.page.themeDefinitions != null && jetspeed.page.themeDefinitions.layouts != null && jetspeed.page.themeDefinitions.layouts.length > 0 && jetspeed.page.themeDefinitions.layouts[0] != null && jetspeed.page.themeDefinitions.layouts[0].length == 2 )
+            layoutName = jetspeed.page.themeDefinitions.layouts[0][1];
+    }
+    this.layoutName = layoutName;
+    this.pageTitle = pageTitle;
+    this.pageShortTitle = pageShortTitle;
+    this.pageEditorWidget = pageEditorWidget;    
+};
+jetspeed.widget.AddPageContentManager.prototype =
+{
+    getContent: function()
+    {
+        if ( this.pagePath != null && this.pageName != null )
+        {
+            var queryString = "?action=updatepage&method=add&path=" + escape( this.pagePath ) + "&name=" + escape( this.pageName );
+            if ( this.layoutName != null )
+                queryString += "&defaultLayout=" + escape( this.layoutName );
+            if ( this.pageTitle != null )
+                queryString += "&title=" + escape( this.pageTitle );
+            if ( this.pageShortTitle != null )
+                queryString += "&short-title=" + escape( this.pageShortTitle );
+            var addPageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+            var ajaxApiContext = new jetspeed.om.Id( "updatepage-add-page", { } );
+            var bindArgs = {};
+            bindArgs.url = addPageUrl;
+            bindArgs.mimetype = "text/xml";
+            jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+        }
+    },
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "updatepage-add-page" ) )
+        {
+            var pageUrl = jetspeed.page.makePageUrl( this.pagePath );
+            if ( ! dojo.string.endsWith( pageUrl, ".psml", true ) )
+                pageUrl += ".psml";
+            pageUrl += "?" + jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER + "=true";
+            window.location.href = pageUrl;
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        dojo.raise( "AddPageContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};
+
+// ... jetspeed.widget.UpdateFragmentContentManager
+jetspeed.widget.UpdateFragmentContentManager = function( layoutId, layoutName, layoutSizes, pageEditorWidget )
+{
+    this.layoutId = layoutId;
+    this.layoutName = layoutName;
+    this.layoutSizes = layoutSizes;
+    this.pageEditorWidget = pageEditorWidget;
+};
+jetspeed.widget.UpdateFragmentContentManager.prototype =
+{
+    getContent: function()
+    {
+        if ( this.layoutId != null )
+        {
+            var queryString = "?action=updatepage&method=update-fragment&id=" + this.layoutId;
+            if ( this.layoutName != null )
+                queryString += "&layout=" + escape( this.layoutName );
+            if ( this.layoutSizes != null )
+                queryString += "&sizes=" + escape( this.layoutSizes );
+            var updatePageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+            var ajaxApiContext = new jetspeed.om.Id( "updatepage-update-fragment", { } );
+            var bindArgs = {};
+            bindArgs.url = updatePageUrl;
+            bindArgs.mimetype = "text/xml";
+            jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+        }
+    },
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "updatepage-update-fragment" ) )
+        {
+            this.pageEditorWidget.refreshPage();
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        dojo.raise( "UpdateFragmentContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};
+
+// ... jetspeed.widget.UpdateFragmentContentManager
+jetspeed.widget.UpdatePageInfoContentManager = function( layoutDecorator, portletDecorator, desktopTheme, pageEditorWidget )
+{
+    this.layoutDecorator = layoutDecorator;
+    this.portletDecorator = portletDecorator;
+    this.desktopTheme = desktopTheme;
+    this.pageEditorWidget = pageEditorWidget;
+};
+jetspeed.widget.UpdatePageInfoContentManager.prototype =
+{
+    getContent: function()
+    {
+        var queryString = "?action=updatepage&method=info";
+        if ( this.layoutDecorator != null )
+            queryString += "&layout-decorator=" + escape( this.layoutDecorator );
+        if ( this.portletDecorator != null )
+            queryString += "&portlet-decorator=" + escape( this.portletDecorator );
+        if ( this.desktopTheme != null )
+            queryString += "&theme=" + escape( this.desktopTheme );
+        var updatePageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+        var ajaxApiContext = new jetspeed.om.Id( "updatepage-info", { } );
+        var bindArgs = {};
+        bindArgs.url = updatePageUrl;
+        bindArgs.mimetype = "text/xml";
+        jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+    },
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "updatepage-info" ) )
+        {
+            this.pageEditorWidget.refreshPage();
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        dojo.raise( "UpdatePageInfoContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};
+
+// ... jetspeed.widget.RemovePortletContentManager
+jetspeed.widget.RemovePortletContentManager = function( portletEntityId, pageEditorWidget )
+{
+    this.portletEntityId = portletEntityId;
+    this.pageEditorWidget = pageEditorWidget;
+};
+jetspeed.widget.RemovePortletContentManager.prototype =
+{
+    getContent: function()
+    {
+        if ( this.portletEntityId != null )
+        {
+            var queryString = "?action=remove&id=" + this.portletEntityId;
+            var removePortletUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + queryString ;
+            var ajaxApiContext = new jetspeed.om.Id( "removeportlet", { } );
+            var bindArgs = {};
+            bindArgs.url = removePortletUrl;
+            bindArgs.mimetype = "text/xml";
+            jetspeed.url.retrieveContent( bindArgs, this, ajaxApiContext, jetspeed.debugContentDumpIds );
+        }
+    },
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "removeportlet" ) )
+        {
+            this.pageEditorWidget.refreshPage();
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl, /* Portlet */ portlet )
+    {
+        dojo.raise( "RemovePortletContentManager notifyFailure url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+};



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


Mime
View raw message