You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2007/03/27 01:55:41 UTC
svn commit: r522665 [26/29] - in /portals/jetspeed-2/branches/J2-M2-REDUX:
./ components/ components/jetspeed-cm/
components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/
components/jetspeed-cm/src/test/resources/ components/jetspeed-cm/...
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js Mon Mar 26 16:53:34 2007
@@ -0,0 +1,80 @@
+/*
+* 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.
+*/
+dojo.provide("jetspeed.manifest");
+dojo.require("dojo.string.extras");
+dojo.require("dojo.ns");
+
+(function(){
+ //mapping of all widget short names to their full package names
+ // This is used for widget autoloading - no dojo.require() is necessary.
+ // If you use a widget in markup or create one dynamically, then this
+ // mapping is used to find and load any dependencies not already loaded.
+ // You should use your own namespace for any custom widgets.
+ // For extra widgets you use, dojo.declare() may be used to explicitly load them.
+ var map = {
+ html: {
+ "editortable": "jetspeed.widget.EditorTable",
+ "multirowheadertable": "jetspeed.widget.MultiRowHeaderTable",
+ "portalaccordioncontainer": "jetspeed.widget.PortalAccordionContainer",
+ "portalaccordionpane": "jetspeed.widget.PortalAccordionPane",
+ "portalmenuoptionlink": "jetspeed.widget.PortalMenuOptionLink",
+ "portaltabcontainer": "jetspeed.widget.PortalTabContainer",
+ "portalbreadcrumbcontainer": "jetspeed.widget.PortalBreadcrumbContainer",
+ "portalbreadcrumblink": "jetspeed.widget.PortalBreadcrumbLink",
+ "portalbreadcrumblinkseparator": "jetspeed.widget.PortalBreadcrumbLinkSeparator",
+ "portaltaskbar": "jetspeed.widget.PortalTaskBar",
+ "portaltaskbaritem": "jetspeed.widget.PortalTaskBarItem",
+ "portletdefcontainer": "jetspeed.widget.PortletDefContainer",
+ "portletwindow": "jetspeed.widget.PortletWindow",
+ "portletwindowresizehandle": "jetspeed.widget.PortletWindowResizeHandle",
+ "portletdefcontaineritem": "jetspeed.widget.PortletDefContainerItem",
+ "pageeditor": "jetspeed.widget.PageEditor",
+ "pageeditpane": "jetspeed.widget.PageEditPane",
+ "layouteditpane": "jetspeed.widget.LayoutEditPane",
+ "layouteditpanemovebutton": "jetspeed.widget.LayoutEditPaneMoveHandle",
+ "sitemanagertreerpccontroller": "jetspeed.widget.SiteManagerTreeRPCController"
+ }
+ };
+
+ function jetspeedNamespaceResolver(name, domain){
+ if(!domain){ domain="html"; }
+ if(!map[domain]){ return null; }
+ return map[domain][name];
+ }
+
+ dojo.registerNamespaceResolver("jetspeed", jetspeedNamespaceResolver);
+})();
+
+
+
+
+// This is a full custom namespace example
+// By convention, myns lives in <dojo root>/../myns/,
+// and myns widgets are in myns.widget
+// Convention paths are autodiscovered, and all we would
+// have to do here is register a resolver with
+// dojo.registerNamespaceResolver("myns", <resolver>);
+/*
+dojo.registerNamespaceManifest("jetspeed", "desktop", "jetspeed", "myns.widget",
+ function(name){
+ var module = "myns.widget."+dojo.string.capitalize(name);
+ dojo.debug("resolver returning '"+module+"' for '"+name+"'");
+ return module;
+ }
+);
+
+*/
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/manifest.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/EditorTable.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/EditorTable.js?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/EditorTable.js (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/EditorTable.js Mon Mar 26 16:53:34 2007
@@ -0,0 +1,318 @@
+/*
+ * 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.
+ *
+ * author: Steve Milek
+ */
+
+dojo.provide("jetspeed.widget.EditorTable");
+
+dojo.require("dojo.widget.SortableTable");
+
+jetspeed.widget.EditorTable = function()
+{
+ dojo.widget.SortableTable.call(this);
+ this.widgetType = "EditorTable";
+ this.headerSortUpClass="selectedUp";
+ this.headerSortDownClass="selectedDown";
+};
+
+dojo.inherits( jetspeed.widget.EditorTable, dojo.widget.SortableTable);
+
+dojo.lang.extend( jetspeed.widget.EditorTable, {
+ saveWarningDialogWidgetId: null,
+
+ /* derived class protocol - attach-to or override this methods */
+ updateEditor: function( rowData )
+ {
+
+ },
+ saveEntrySubmit: function( selectedRowData, /* boolean */ removeEntry )
+ {
+
+ },
+ clearAndDisableEditor: function()
+ {
+
+ },
+ getNewEntryPrototype: function()
+ {
+ return {};
+ },
+
+ /* base class protocol */
+ render: function(bDontPreserve)
+ {
+ bDontPreserve = true; // for EditorTable, all calls to render should not reset data (i.e. call SortableTable.parseDataFromTable())
+ jetspeed.widget.EditorTable.superclass.render.call( this, bDontPreserve );
+ },
+
+ buildRendering: function(args, frag)
+ {
+ jetspeed.widget.EditorTable.superclass.buildRendering.call( this, args, frag );
+ if ( args.templateCssPath )
+ {
+ dojo.html.insertCssFile( dojo.uri.dojoUri(args.templateCssPath), document, true );
+ }
+ },
+
+
+ /* methods */
+ hasRowChanged: function( rowData )
+ {
+ if ( ! rowData ) return false;
+ var tId = rowData.Id;
+ var masterData = this.getData( this.js_masterdata, tId );
+ var changed = ( rowData.__isNew || rowData.__isModified ) ? true : false;
+ if ( ! changed )
+ {
+ for ( var slotKey in masterData )
+ {
+ if ( rowData[ slotKey ] != masterData[ slotKey ] )
+ {
+ //dojo.debug( "slot " + slotKey + " changed - old: " + masterData[ slotKey ] + " new: " + rowData[ slotKey ] ) ;
+ changed = true;
+ break;
+ }
+ }
+ }
+ return changed;
+ },
+ entryIsNew: function( rowData )
+ {
+ if ( ! rowData ) return false;
+ return rowData.__isNew ;
+ },
+ setModified: function( rowData )
+ {
+ if ( ! rowData ) return;
+ rowData.__isModified = true;
+ },
+ getSelectedRow: function()
+ {
+ if ( this.selected && this.selected.length == 1 )
+ {
+ var tId = this.selected[0].Id;
+ var data = this.getData( this.data, tId );
+ return data;
+ }
+ return null;
+ },
+ getData: function( tableWidgetData, matchId )
+ {
+ if ( ! tableWidgetData ) return null ;
+ for( var i = 0 ; i < tableWidgetData.length; i++ )
+ {
+ if ( tableWidgetData[ i ].Id == matchId )
+ {
+ return tableWidgetData[ i ];
+ }
+ }
+ return null;
+ },
+ getDataIndex: function( tableWidgetData, matchId )
+ {
+ if ( ! tableWidgetData ) return -1;
+ for( var i = 0 ; i < tableWidgetData.length; i++ )
+ {
+ if ( tableWidgetData[ i ].Id == matchId )
+ {
+ return i;
+ }
+ }
+ return -1;
+ },
+ processTableRowEvent: function( e )
+ {
+ var row = dojo.html.getParentByType( e.target, "tr" );
+ var rowData = this.getObjectFromRow( row );
+ this.updateEditor( rowData );
+ },
+
+ checkForChanges: function()
+ {
+ var selectedRowData = this.getSelectedRow();
+
+ if ( ! selectedRowData ) return false;
+ var hasChanged = this.hasRowChanged( selectedRowData );
+ return ( ! hasChanged ? false : ( selectedRowData.__isNew ? "new" : "modified" ) );
+ },
+
+ updateClonedData: function( fromData, toData )
+ {
+ if ( ! fromData || ! toData ) return;
+ for ( var slotKey in fromData )
+ {
+ toData[ slotKey ] = fromData[ slotKey ];
+ }
+ },
+
+ printSelection: function()
+ {
+ if ( this.selected && this.selected.length == 1 )
+ dojo.debug( this.widgetId + " selection: " + jsDebugShallow( this.selected[0] ) );
+ else
+ dojo.debug( this.widgetId + " selection: null" );
+ },
+
+ newEntry: function()
+ {
+ if ( this.saveWarningDialogWidgetId )
+ {
+ if ( this.checkForChanges() )
+ {
+ dojo.widget.byId( this.saveWarningDialogWidgetId ).show();
+ return;
+ }
+ }
+
+ var newEntry = dojo.lang.shallowCopy( this.getNewEntryPrototype() );
+ var tId = 1;
+ for ( var i = 0 ; i < this.js_masterdata.length; i++ )
+ {
+ if ( this.js_masterdata[i].Id >= tId )
+ tId = this.js_masterdata[i].Id + 1;
+ }
+ newEntry.Id = tId;
+ this.js_masterdata.push( dojo.lang.shallowCopy( newEntry ) );
+ newEntry.__isNew = true;
+ this.data.push( newEntry );
+ this.selected = [ dojo.lang.shallowCopy( newEntry ) ];
+
+ this.render(true);
+ this.showSelections();
+
+ this.updateEditor( newEntry );
+ },
+
+ deleteEntry: function()
+ {
+ var selectedRowData = this.getSelectedRow();
+
+ if ( ! selectedRowData ) return;
+ var tId = selectedRowData.Id;
+
+ if ( ! selectedRowData.__isNew )
+ this.saveEntrySubmit( selectedRowData, true );
+
+ var tIndex = this.getDataIndex( this.js_masterdata, tId );
+ if ( tIndex != -1 )
+ this.js_masterdata.splice( tIndex, 1 );
+
+ tIndex = this.getDataIndex( this.data, tId );
+ if ( tIndex != -1 )
+ this.data.splice( tIndex, 1 );
+
+ this.selected = [];
+ this.render(true);
+ this.showSelections();
+
+ this.clearAndDisableEditor();
+ },
+ saveEntry: function()
+ {
+ var selectedRowData = this.getSelectedRow();
+
+ if ( ! selectedRowData ) { dojo.raise( "saveEntry can't find selectedRowData" ) ; return; }
+ var masterData = this.getData( this.js_masterdata, selectedRowData.Id );
+ if ( ! masterData ) { dojo.raise( "saveEntry can't find masterdata" ) ; return; }
+
+ this.saveEntrySubmit( selectedRowData );
+
+ //delete masterData.__isNew;
+ //delete masterData.__isModified;
+ delete selectedRowData.__isNew;
+ delete selectedRowData.__isModified;
+ this.updateClonedData( selectedRowData, masterData );
+ this.updateClonedData( selectedRowData, this.selected[0] );
+ this.updateEditor( selectedRowData );
+ },
+
+ revertEntry: function()
+ {
+ var selectedRowData = this.getSelectedRow();
+
+ if ( ! selectedRowData ) return;
+
+ if ( selectedRowData.__isNew )
+ {
+ deleteEntry();
+ }
+ else
+ {
+ delete selectedRowData.__isModified;
+ var masterData = this.getData( this.js_masterdata, selectedRowData.Id );
+ if ( ! masterData ) return;
+ this.updateClonedData( masterData, selectedRowData );
+ this.updateClonedData( masterData, this.selected[0] );
+ this.render(true);
+ this.showSelections();
+ this.updateEditor( masterData );
+ }
+ },
+
+ okToChangeSelectionOrExit: function( invocation ) // listSelectionChangeOk
+ {
+ if ( this.checkForChanges() )
+ {
+ if ( this.saveWarningDialogWidgetId )
+ {
+ dojo.widget.byId( this.saveWarningDialogWidgetId ).show();
+ return false;
+ }
+ else
+ {
+ this.saveEntry();
+ }
+ }
+ if ( invocation != null )
+ invocation.proceed();
+ return true;
+ },
+
+ dojoDebugTableData: function()
+ {
+ dojo.debug( debugTableData() );
+ },
+ debugTableData: function()
+ {
+ var tTableWidget = this;
+ // format: js_masterdata[index][key]=value (data[index][key]
+ buff = tTableWidget.widgetId + " data:" + "\r\n";
+ for ( var masterDataIndex = 0 ; masterDataIndex < tTableWidget.js_masterdata.length ; masterDataIndex++ )
+ {
+ buff += "[" + masterDataIndex + "]" + "\r\n";
+ var slotsUsed = new Object();
+ for ( var slotKey in tTableWidget.js_masterdata[masterDataIndex] )
+ {
+ buff += " " + slotKey + "=" + tTableWidget.js_masterdata[masterDataIndex][ slotKey ];
+ if ( slotKey == "__isModified" || slotKey == "__isNew" )
+ buff += "\r\n";
+ else
+ {
+ var dataVal = null;
+ if ( tTableWidget.data.length <= masterDataIndex )
+ buff += " <out-of-bounds>" + "\r\n";
+ else
+ {
+ dataVal = tTableWidget.data[masterDataIndex][ slotKey ];
+ buff += " (" + ( dataVal == null ? "null" : dataVal ) + ")" + "\r\n";
+ }
+ }
+ }
+ }
+ return buff;
+ }
+});
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/EditorTable.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css Mon Mar 26 16:53:34 2007
@@ -0,0 +1,187 @@
+/*
+* 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.
+*/
+
+#jetspeedDesktopCell {
+ vertical-align: top;
+ /* hack of "vertical-align: top" needed by IE once the leftnav was added */
+ width: 100%;
+ /* needed to honor explicit size of left nav column when windowTiling is false */
+}
+
+#jetspeedColumns {
+ width: 100%;
+}
+
+.desktopColumn {
+ float: left;
+ /* background-color: transparent; */
+}
+.desktopColumnClear {
+ float: left;
+ clear: both;
+ /* background-color: transparent; */
+}
+.desktopLayoutHeader {
+ float: left;
+ clear: both;
+}
+.columnSpacer {
+
+}
+*html .desktopColumn {
+ overflow: hidden;
+ /* background-color: transparent; */
+ /* background-color: #666; */
+}
+
+#pwGhost {
+ border: 1px dashed #F00;
+ margin: 2px;
+}
+
+/********** Outer Window ***************/
+
+.dojoFloatingPane {
+ /* essential css */
+ position: absolute;
+ overflow-y: hidden; /* dojo says 'visible' with this explanation "so drop shadow is displayed"" */
+ /* we says 'hidden' cause IE likes to kindly expand div to fit content otherwise */
+ overflow-x: hidden;
+
+ z-index: 10;
+
+ clear: both;
+
+ /* styling css */
+ border: 1px solid;
+ border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+ background-color: ThreeDFace;
+}
+
+
+/********** Title Bar ****************/
+
+.dojoFloatingPaneTitleBar {
+ vertical-align: top;
+ margin: 2px 2px 2px 2px;
+ z-index: 10;
+ background-color: #7596c6;
+ cursor: move;
+ overflow: hidden;
+ height: 22px;
+ border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+ vertical-align: middle;
+}
+
+.dojoFloatingPaneTitleText {
+ float: left;
+ padding: 2px 4px 2px 2px;
+ white-space: nowrap;
+ color: CaptionText;
+ font: small-caption;
+}
+
+.dojoFloatingPaneActions{
+ float: right;
+ position: absolute;
+ right: 2px;
+ top: 2px;
+ vertical-align: middle;
+}
+
+
+.dojoFloatingPaneActionItem {
+ vertical-align: middle;
+ margin-right: 1px;
+ height: 22px;
+ width: 22px;
+}
+
+.portletWindowActionButton {
+ margin-top: 5px;
+ margin-right: 3px;
+
+ cursor: default;
+
+ float: right;
+
+ background-repeat: no-repeat;
+ background-position: top center;
+}
+
+.portalPageActionButton {
+ vertical-align: middle;
+
+ margin-top: 3px;
+ margin-right: 3px;
+
+ cursor: default;
+
+ float: right;
+
+ background-repeat: no-repeat;
+ background-position: center center;
+}
+
+.dojoFloatingPaneTitleBarIcon {
+ /* essential css */
+ float: left;
+
+ /* styling css */
+ height: 16px;
+ width: 16px;
+ margin-top: 3px;
+ margin-left: 2px;
+ margin-right: 3px;
+}
+
+/* minimize/maximize icons are specified by CSS only */
+.dojoFloatingPaneMinimizeIcon,
+.dojoFloatingPaneMaximizeIcon,
+.dojoFloatingPaneRestoreIcon,
+.dojoFloatingPaneCloseIcon {
+ vertical-align: middle;
+ height: 22px;
+ width: 22px;
+ float: right;
+ cursor: default;
+}
+
+/* bar at bottom of window that holds resize handle */
+.dojoFloatingPaneResizebar {
+ z-index: 10;
+ height: 13px;
+ background-color: ThreeDFace;
+ /*padding: 0px;
+ margin: 0px;*/
+}
+
+/************* Client Area ***************/
+
+.dojoFloatingPaneClient {
+ position: relative;
+ z-index: 10;
+ border: 1px solid;
+ border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;
+ margin: 2px;
+ background-color: ThreeDFace;
+ padding: 8px;
+ /*font-family: Verdana, Helvetica, Garamond, sans-serif;
+ font-size: 12px;*/
+ overflow: auto;
+}
+
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html Mon Mar 26 16:53:34 2007
@@ -0,0 +1,39 @@
+<!--
+ 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.
+-->
+<!-- need to wrap inside a body tag to allow the above license header
+ dojo will look for a body tag and use its content -->
+<body>
+<div id="${this.widgetId}" class="dojoFloatingPane" > <!-- dojoAttachEvent="onMouseDown" -->
+ <div id="${this.widgetId}_titleBar" dojoAttachPoint="titleBar" class="dojoFloatingPaneTitleBar" dojoAttachEvent="onMouseDown;onMouseOver:titleMouseOver;onMouseOut:titleMouseOut" style="display:none">
+ <img dojoAttachPoint="titleBarIcon" class="dojoFloatingPaneTitleBarIcon">
+ <!--
+ <div dojoAttachPoint="closeAction" dojoAttachEvent="onClick:closeWindow"
+ class="dojoFloatingPaneCloseIcon"></div>
+ <div dojoAttachPoint="maximizeAction" dojoAttachEvent="onClick:maximizeWindow"
+ class="dojoFloatingPaneMaximizeIcon"></div>
+ <div dojoAttachPoint="restoreAction" dojoAttachEvent="onClick:restoreWindow"
+ class="dojoFloatingPaneRestoreIcon"></div>
+ <div dojoAttachPoint="minimizeAction" dojoAttachEvent="onClick:minimizeWindow"
+ class="dojoFloatingPaneMinimizeIcon"></div> -->
+ <div dojoAttachPoint="titleBarText" class="dojoFloatingPaneTitleText">${this.title}</div>
+ </div>
+
+ <div dojoAttachPoint="containerNode" class="dojoFloatingPaneClient"></div>
+
+ <div dojoAttachPoint="resizeBar" class="dojoFloatingPaneResizebar"></div>
+</div>
+</body>
\ No newline at end of file
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlFloatingPane.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html Mon Mar 26 16:53:34 2007
@@ -0,0 +1,21 @@
+<!--
+ 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.
+-->
+<!-- need to wrap inside a body tag to allow the above license header
+ dojo will look for a body tag and use its content -->
+<body>
+<table class="portalTaskBarItemTable" cellspacing="0"><tr dojoAttachEvent="onClick"><td class="dojoTaskBarItem"></td><td class="portalTaskBarItemEndCap"></td></tr></table>
+</body>
\ No newline at end of file
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/HtmlTaskBarItemTemplate.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css Mon Mar 26 16:53:34 2007
@@ -0,0 +1,46 @@
+/*
+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.
+*/
+
+.layoutEditPane { position: relative; width: 100% }
+/* ^^^ width: 100% is need to avoid IE auto-containing bug: http://www.satzansatz.de/cssd/rpfloat.html */
+
+.layoutEditPane .container{ }
+
+.layoutEditPane label,
+.layoutEditPane input,
+.layoutEditPane select
+{
+ font-size: 8pt;
+ color: blue;
+}
+
+.layoutEditPane .detail { }
+
+.layoutEditPane .detail .rowContainer { margin-top: 7px; float: left }
+
+.layoutEditPane .detail .layoutNameContainer{ width: 270px; float:left; vertical-align: middle; margin-right: 20px; margin-bottom: 10px }
+.layoutEditPane .detail .layoutName { font-size: xx-small; width: 100% }
+
+.layoutEditPane .detail .buttonContainerLeft { float: left; clear: both }
+.layoutEditPane .detail .buttonContainerLeft .dojoButton { float: left; margin-right: 5px }
+
+.layoutEditPane .detail .buttonContainerRight { float: right }
+.layoutEditPane .detail .buttonContainerRight .dojoButton { }
+
+.layoutEditPane .layoutMoveContainer { position: absolute; right: 2px; top: 2px; width: 26px; height: 25px; display: none; cursor: move }
+
+.dojoComboBoxOptions { font-size: xx-small; }
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.css
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html Mon Mar 26 16:53:34 2007
@@ -0,0 +1,53 @@
+<!--
+ 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.
+-->
+<!-- need to wrap inside a body tag to allow the above license header
+ dojo will look for a body tag and use its content -->
+<body>
+<div class="layoutEditPane">
+ <div dojoAttachPoint="containerNode" class="container"></div>
+
+ <fieldset class="pageEditorPaneContainer" dojoAttachPoint="pageEditContainer">
+ <div class="detail">
+ <div class="rowContainer">
+ <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditLNContainer">
+ <div class="layoutNameContainer">
+ <select class="layoutName" name="layoutNameSelect" dojoAttachPoint="layoutNameSelect" dojoType="Select" autocomplete="false"></select>
+ </div>
+ <div class="buttonContainerLeft">
+ <button dojoType="Button" dojoAttachPoint="changeLayoutButton" dojoAttachEvent="onClick:changeLayout"><img height="16" src="${this.layoutImagesRoot}button_ok.png"> Change Layout</button>
+ </div>
+ </fieldset>
+ <div style="float: right; width: 18px"> </div> <!-- allowing room for layout-move image -->
+ <div class="buttonContainerRight">
+ <table cellpadding="0" cellspacing="6" border="0">
+ <!-- height on images is currently needed to size the button properly, especially when button is inside a table -->
+ <tr>
+ <td><button dojoType="Button" dojoAttachEvent="onClick:addPortlet"><img height="16" src="${this.layoutImagesRoot}portlet_add.png"> Add Portlet…</button></td>
+ <td><button dojoType="Button" dojoAttachEvent="onClick:openColumnSizeEditor"><img height="16" src="${this.layoutImagesRoot}column_resize.png"> Column Sizes…</button></td>
+ </tr>
+ <tr>
+ <td><button dojoType="Button" dojoAttachEvent="onClick:addLayout"><img height="16" src="${this.layoutImagesRoot}layout_new.png"> Add Layout…</button></td>
+ <td><button dojoType="Button" dojoAttachPoint="deleteLayoutButton" dojoAttachEvent="onClick:deleteLayout"><img height="16" src="${this.layoutImagesRoot}layout_delete.png"> Delete Layout…</button><button dojoType="Button" dojoAttachPoint="editModeLayoutMoveButton" dojoAttachEvent="onClick:editModeLayoutMove"><img height="16" src="${this.layoutImagesRoot}edit_mode_layout_move.png"> Move Mode</button><button dojoType="Button" dojoAttachPoint="editModeNormalButton" dojoAttachEvent="onClick:editModeNormal"><img height="16" src="${this.layoutImagesRoot}edit_mode_normal.png"> Normal Mode</button></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+
+</div>
+</body>
\ No newline at end of file
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js Mon Mar 26 16:53:34 2007
@@ -0,0 +1,298 @@
+/*
+ * 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.
+ *
+ * author: Steve Milek
+ */
+
+dojo.provide("jetspeed.widget.LayoutEditPane");
+dojo.provide("jetspeed.widget.LayoutEditPaneMoveHandle");
+
+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
+ pageEditContainer: null,
+ pageEditLNContainer: null,
+ layoutNameSelect: null,
+ deleteLayoutButton: null,
+ editModeLayoutMoveButton: null,
+ editModeNormalButton: null,
+ layoutMoveContainer: null,
+
+ // fields
+ isContainer: true,
+ widgetsInTemplate: true,
+
+ // drag variables
+ containingColumn: null,
+ windowPositionStatic: 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 );
+ },
+
+ getCurrentLayout: function()
+ {
+ var currentLayout = null;
+ if ( this.layoutId != null )
+ currentLayout = jetspeed.page.layouts[ this.layoutId ];
+ return currentLayout;
+ },
+
+ postCreate: function( args, fragment, parent )
+ {
+ if ( ! jetspeed.browser_IE )
+ { /* in IE6, if fieldset background color is set the fieldset will not be rendered nicely (with rounded borders) */
+ if ( this.pageEditContainer != null )
+ this.pageEditContainer.style.backgroundColor = "#d3d3d3";
+ if ( this.pageEditLNContainer != null )
+ this.pageEditLNContainer.style.backgroundColor = "#eeeeee";
+ }
+
+ if ( this.layoutNameSelect != null )
+ {
+ var currentLayout = this.getCurrentLayout();
+
+ 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 );
+ }
+ if ( this.isRootLayout )
+ {
+ if ( this.deleteLayoutButton != null )
+ this.deleteLayoutButton.domNode.style.display = "none";
+ if ( this.editModeLayoutMoveButton != null )
+ this.editModeLayoutMoveButton.domNode.style.display = "block";
+ if ( this.editModeNormalButton != null )
+ this.editModeNormalButton.domNode.style.display = "none";
+ }
+ else
+ {
+ if ( this.editModeLayoutMoveButton != null )
+ this.editModeLayoutMoveButton.domNode.style.display = "none";
+ if ( this.editModeNormalButton != null )
+ this.editModeNormalButton.domNode.style.display = "none";
+ }
+
+ this.layoutMoveContainer = dojo.widget.createWidget( "jetspeed:LayoutEditPaneMoveHandle",
+ {
+ layoutImagesRoot: this.layoutImagesRoot
+ });
+ this.addChild( this.layoutMoveContainer );
+ this.domNode.appendChild( this.layoutMoveContainer.domNode );
+ },
+
+ initializeDrag: function()
+ {
+ this.containingColumn = this.getContainingColumn();
+ this.drag = new jetspeed.widget.LayoutDragMoveSource( this );
+ this.drag.setDragHandle( this.layoutMoveContainer.domNode );
+ },
+
+ // 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 );
+ },
+ addPortlet: function()
+ {
+ var jspage = jetspeed.page.getPagePathAndQuery();
+ jspage = jetspeed.url.addQueryParameter( jspage, "editPage", "true", true );
+ jetspeed.page.addPortletInitiate( this.layoutId, jspage.toString() );
+ },
+ addLayout: function()
+ {
+ var currentLayout = this.getCurrentLayout();
+ if ( currentLayout != null )
+ {
+ var addLayoutContentManager = new jetspeed.widget.AddLayoutContentManager( this.layoutId, currentLayout.name, this.pageEditorWidget );
+ addLayoutContentManager.getContent();
+ }
+ else
+ {
+ alert( "Cannot add layout (error: null parent layout)." );
+ }
+ },
+ deleteLayout: function()
+ {
+ this.pageEditorWidget.deleteLayout( this.layoutId );
+ },
+ editModeNormal: function()
+ {
+ this.pageEditorWidget.editModeNormal();
+ if ( this.editModeLayoutMoveButton != null )
+ this.editModeLayoutMoveButton.domNode.style.display = "block";
+ if ( this.editModeNormalButton != null )
+ this.editModeNormalButton.domNode.style.display = "none";
+ },
+ editModeLayoutMove: function()
+ {
+ this.pageEditorWidget.editModeLayoutMove();
+ if ( this.editModeLayoutMoveButton != null )
+ this.editModeLayoutMoveButton.domNode.style.display = "none";
+ if ( this.editModeNormalButton != null )
+ this.editModeNormalButton.domNode.style.display = "block";
+ },
+
+ endDragging: function()
+ {
+ if ( this.drag == null || this.containingColumn == null || this.containingColumn.domNode == null ) return;
+ var beforeDragColumnRowInfo = this.drag.beforeDragColumnRowInfo;
+ //dojo.debug( "layout (" + this.layoutId + " / " + this.widgetId + ") endDragging (a) : before " + jetspeed.printobj( beforeDragColumnRowInfo ) );
+ if ( beforeDragColumnRowInfo != null )
+ {
+ var afterDragColumnRowInfo = jetspeed.page.getPortletCurrentColumnRow( this.containingColumn.domNode );
+ //dojo.debug( "layout (" + this.layoutId + ") endDragging (b) : after " + jetspeed.printobj( afterDragColumnRowInfo ) );
+ if ( afterDragColumnRowInfo != null && ( afterDragColumnRowInfo.row != beforeDragColumnRowInfo.row || afterDragColumnRowInfo.column != beforeDragColumnRowInfo.column || afterDragColumnRowInfo.layout != beforeDragColumnRowInfo.layout ) )
+ {
+ //dojo.debug( "layout (" + this.layoutId + ") endDragging (c)" );
+ var moveLayoutContentManager = new jetspeed.widget.MoveLayoutContentManager( this.layoutId, afterDragColumnRowInfo.layout, afterDragColumnRowInfo.column, afterDragColumnRowInfo.row, this.pageEditorWidget );
+ moveLayoutContentManager.getContent();
+ }
+ }
+ },
+
+ getContainingColumn: function()
+ {
+ return jetspeed.page.getColumnContainingNode( this.domNode );
+ },
+ getPageColumnIndex: function()
+ {
+ return jetspeed.page.getColumnIndexContainingNode( this.domNode );
+ }
+ }
+);
+
+dojo.widget.defineWidget(
+ "jetspeed.widget.LayoutEditPaneMoveHandle",
+ dojo.widget.HtmlWidget,
+{
+ // summary
+ // Internal widget used by LayoutEditPane.
+
+ templateString: '<span class="layoutMoveContainer"><img src="${this.layoutImagesRoot}layout_move.png"></span>'
+
+});
+
+jetspeed.widget.LayoutDragMoveSource = function( /* jetspeed.widget.LayoutEditPane */ layoutEditPane )
+{
+ this.layoutEditPane = layoutEditPane;
+ this.beforeDragColumnRowInfo = null;
+ this.beforeDragColumn = layoutEditPane.containingColumn;
+ var dragNode = ( ( this.beforeDragColumn != null ) ? this.beforeDragColumn.domNode : null );
+ dojo.dnd.HtmlDragMoveSource.call( this, dragNode );
+};
+
+dojo.inherits( jetspeed.widget.LayoutDragMoveSource, dojo.dnd.HtmlDragMoveSource );
+
+dojo.lang.extend( jetspeed.widget.LayoutDragMoveSource, {
+ onDragStart: function()
+ {
+ this.beforeDragColumnRowInfo = null;
+ var dragMoveObj = null;
+ if ( this.dragObject != null )
+ {
+ if ( this.beforeDragColumn != null && this.beforeDragColumn.domNode != null )
+ this.beforeDragColumnRowInfo = jetspeed.page.getPortletCurrentColumnRow( this.beforeDragColumn.domNode );
+
+//jetspeed.page.getColumnContainingNode( );
+
+ dragMoveObj = new jetspeed.widget.LayoutDragMoveObject( this.dragObject, this.type, this.layoutEditPane, this.beforeDragColumn );
+ if ( this.constrainToContainer )
+ {
+ dragMoveObj.constrainTo( this.constrainingContainer );
+ }
+ }
+ return dragMoveObj;
+ },
+ onDragEnd: function()
+ {
+ }
+});
+
+dojo.declare( "jetspeed.widget.LayoutDragMoveObject", jetspeed.widget.PortletWindowDragMoveObject, {
+ qualifyTargetColumn: function( /* jetspeed.om.Column */ column )
+ {
+ if ( column == null ) return false;
+ if ( this.disqualifiedColumnIndexes[ column.getPageColumnIndex() ] != null )
+ return false;
+ return true;
+ }
+ },
+ function( node, type, /* jetspeed.widget.LayoutEditPane */ layoutEditPane, /* jetspeed.om.Column */ beforeDragColumn )
+ {
+ this.layoutEditPane = layoutEditPane;
+
+ this.disqualifiedColumnIndexes = beforeDragColumn.getDescendantColumns();
+ }
+);
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js Mon Mar 26 16:53:34 2007
@@ -0,0 +1,204 @@
+/*
+ * 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.
+ *
+ * author: Steve Milek
+ */
+
+dojo.provide("jetspeed.widget.MultiRowHeaderTable");
+
+dojo.require("dojo.widget.SortableTable");
+
+jetspeed.widget.MultiRowHeaderTable = function()
+{
+ dojo.widget.SortableTable.call(this);
+ this.widgetType = "MultiRowHeaderTable";
+ this.headerSortUpClass="selectedUp";
+ this.headerSortDownClass="selectedDown";
+};
+
+dojo.inherits( jetspeed.widget.MultiRowHeaderTable, dojo.widget.SortableTable);
+
+dojo.lang.extend( jetspeed.widget.MultiRowHeaderTable, {
+
+ buildRendering: function(args, frag)
+ {
+ jetspeed.widget.MultiRowHeaderTable.superclass.buildRendering.call( this, args, frag );
+ if ( args.templateCssPath )
+ {
+ dojo.widget.fillFromTemplateCache(this, null, dojo.uri.dojoUri(args.templateCssPath), null, false);
+ }
+ },
+
+ parseColumns:function(/* HTMLTableHeadElement */ node){
+ // summary
+ // parses the passed element to create column objects
+ this.reset();
+ var rows=node.getElementsByTagName("tr");
+ if (rows && rows.length > 0){
+ for(var rowI=0; rowI<rows.length; rowI++){
+ var cells=rows[rowI].getElementsByTagName("td");
+ if (cells.length==0) cells=rows[rowI].getElementsByTagName("th");
+
+ for(var i=0; i<cells.length; i++){
+ var isCol=true;
+ if(dojo.html.hasAttribute(cells[i], "colspan")){
+ colspan=dojo.html.getAttribute(cells[i],"colspan");
+ if(colspan > 1)
+ isCol=false;
+ }
+ if(isCol){
+ var o={
+ domNode:cells[i],
+ field:null,
+ format:null,
+ noSort:false,
+ sortType:"String",
+ dataType:String,
+ sortFunction:null,
+ label:null,
+ align:"left",
+ valign:"middle",
+ getField:function(){ return this.field||this.label; },
+ getType:function(){ return this.dataType; }
+ };
+ // presentation attributes
+ if(dojo.html.hasAttribute(cells[i], "align")){
+ o.align=dojo.html.getAttribute(cells[i],"align");
+ }
+ if(dojo.html.hasAttribute(cells[i], "valign")){
+ o.valign=dojo.html.getAttribute(cells[i],"valign");
+ }
+
+ // sorting features.
+ if(dojo.html.hasAttribute(cells[i], "nosort")){
+ o.noSort=dojo.html.getAttribute(cells[i],"nosort")=="true";
+ }
+ if(dojo.html.hasAttribute(cells[i], "sortusing")){
+ var trans=dojo.html.getAttribute(cells[i],"sortusing");
+ var f=this.getTypeFromString(trans);
+ if (f!=null && f!=window && typeof(f)=="function")
+ o.sortFunction=f;
+ }
+
+ if(dojo.html.hasAttribute(cells[i], "field")){
+ o.field=dojo.html.getAttribute(cells[i],"field");
+ }
+ if(dojo.html.hasAttribute(cells[i], "format")){
+ o.format=dojo.html.getAttribute(cells[i],"format");
+ }
+ if(dojo.html.hasAttribute(cells[i], "dataType")){
+ var sortType=dojo.html.getAttribute(cells[i],"dataType");
+ if(sortType.toLowerCase()=="html"||sortType.toLowerCase()=="markup"){
+ o.sortType="__markup__"; // always convert to "__markup__"
+ o.noSort=true;
+ }else{
+ var type=this.getTypeFromString(sortType);
+ if(type){
+ o.sortType=sortType;
+ o.dataType=type;
+ }
+ }
+ }
+ o.label=dojo.html.renderedTextContent(cells[i]);
+ this.columns.push(o);
+
+ cells[i].className=this.headerClass;
+
+ // check to see if there's a default sort, and set the properties necessary
+ if(dojo.html.hasAttribute(cells[i], "sort")){
+ this.sortIndex=i;
+ var dir=dojo.html.getAttribute(cells[i], "sort");
+ if(!isNaN(parseInt(dir))){
+ dir=parseInt(dir);
+ this.sortDirection=(dir!=0)?1:0;
+ }else{
+ this.sortDirection=(dir.toLowerCase()=="desc")?1:0;
+ }
+ }
+
+ if(!o.noSort){
+ dojo.event.connect(cells[i], "onclick", this, "onHeaderClick");
+ }
+ if(this.sortIndex == i && rowI == 0){
+ if(this.sortDirection==0){
+ cells[i].className=this.headerSortDownClass;
+ }else{
+ cells[i].className=this.headerSortUpClass;
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+
+ onHeaderClick:function(/* DomEvent */ e){
+ // summary
+ // Main handler function for each header column click.
+ var oldIndex=this.sortIndex;
+ var oldDirection=this.sortDirection;
+ var source=e.target;
+ for(var i=0; i<this.columns.length; i++){
+ if(this.columns[i].domNode==source){
+ if(i!=oldIndex){
+ // new col.
+ this.sortIndex=i;
+ this.sortDirection=0;
+ this.columns[i].domNode.className=this.headerSortDownClass
+ }else{
+ this.sortDirection=(oldDirection==0)?1:0;
+ if(this.sortDirection==0){
+ this.columns[i].domNode.className=this.headerSortDownClass;
+ }else{
+ this.columns[i].domNode.className=this.headerSortUpClass;
+ }
+ }
+ }else{
+ // reset the header class.
+ this.columns[i].domNode.className=this.headerClass;
+ }
+ }
+ this.render();
+ },
+
+ postCreate:function(){
+ // summary
+ // overridden from HtmlWidget, initializes and renders the widget.
+ var thead=this.domNode.getElementsByTagName("thead")[0];
+ if(this.headClass.length>0){
+ thead.className=this.headClass;
+ }
+
+ // disable selections
+ dojo.html.disableSelection(this.domNode);
+
+ // parse the columns.
+ this.parseColumns(thead);
+
+ // attach header handlers.
+
+
+ // parse the tbody element and re-render it.
+ var tbody=this.domNode.getElementsByTagName("tbody")[0];
+ if (this.tbodyClass.length>0) {
+ tbody.className=this.tbodyClass;
+ }
+
+ this.parseDataFromTable(tbody);
+ this.render(true);
+ }
+
+});
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css Mon Mar 26 16:53:34 2007
@@ -0,0 +1,66 @@
+/*
+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.
+*/
+
+.pageEditPane
+{
+ width: 100%;
+ font-size: 8pt;
+ color: blue;
+ overflow: hidden;
+ clip: auto;
+}
+
+.pageEditPane .container { }
+
+.pageEditPane label,
+.pageEditPane input,
+.pageEditPane select
+{
+ font-size: 8pt;
+ color: blue;
+}
+
+.pageEditPane .detail .pageEditorName { font-weight: bold; vertical-align: 50% }
+
+.pageEditPane .detail .rowContainer { margin-top: 7px; float: left; clear: both }
+
+.pageEditPane .detail .layoutDecoratorContainer{ width: 80px; float: left; margin-right: 20px }
+.pageEditPane .detail .layoutDecorator { font-size: xx-small; width: 100% }
+
+.pageEditPane .detail .portletDecoratorContainer{ width: 150px; float: left; margin-right: 20px }
+.pageEditPane .detail .portletDecorator { font-size: xx-small; width: 100% }
+
+.pageEditPane .detail .pageEditorDetailContainer .dojoButton { float: left; margin-right: 5px }
+.pageEditPane .detail .buttonContainerRight { float: right }
+.pageEditPane .detail .buttonContainerRight .dojoButton { }
+
+.dojoDialog .container { padding: 0.5em; background: #fff; border: 2px solid #333; -moz-border-radius : 5px; }
+
+.dojoDialog .deletePageDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
+.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: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
+.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 }
+
+
+
+
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.css
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html Mon Mar 26 16:53:34 2007
@@ -0,0 +1,89 @@
+<!--
+ 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.
+-->
+<!-- need to wrap inside a body tag to allow the above license header
+ dojo will look for a body tag and use its content -->
+<body>
+<div class="pageEditPane">
+ <div dojoAttachPoint="containerNode" class="container"></div>
+
+ <fieldset class="pageEditorPaneContainer" dojoAttachPoint="pageEditContainer">
+ <div class="detail">
+ <div><img src="${this.layoutImagesRoot}customizer.png"> <span class="pageEditorName">Jetspeed Customizer</span></div>
+ <div class="rowContainer">
+ <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditLDContainer">
+ <div class="layoutDecoratorContainer">
+ <select class="layoutDecorator" name="layoutDecoratorSelect" dojoAttachPoint="layoutDecoratorSelect" dojoType="Select" autocomplete="false"></select>
+ </div>
+ <button dojoType="Button" dojoAttachPoint="changeLayoutDecoratorButton" dojoAttachEvent="onClick:changeLayoutDecorator"><img height="16" src="${this.layoutImagesRoot}button_ok.png"> Change Layout Theme</button>
+ </fieldset>
+ <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditPDContainer">
+ <div class="portletDecoratorContainer">
+ <select class="portletDecorator" name="portletDecoratorSelect" dojoAttachPoint="portletDecoratorSelect" dojoType="Select" autocomplete="false"></select>
+ </div>
+ <button dojoType="Button" dojoAttachPoint="changePortletDecoratorButton" dojoAttachEvent="onClick:changePortletDecorator"><img height="16" src="${this.layoutImagesRoot}button_ok.png"> Change Portlet Theme</button>
+ </fieldset>
+ <div class="buttonContainerRight">
+ <table cellpadding="0" cellspacing="6" border="0">
+ <!-- height on images is currently needed to size the button properly, especially when button is inside a table -->
+ <tr align="right">
+ <td><button dojoType="Button" dojoAttachEvent="onClick:createPage"><img height="16" src="${this.layoutImagesRoot}page_new.png"> Create New Page…</button></td>
+ </tr>
+ <tr align="right">
+ <td><button dojoType="Button" dojoAttachEvent="onClick:deletePage"><img height="16" src="${this.layoutImagesRoot}page_delete.png"> Delete Page…</button></td>
+ </tr>
+ </table>
+ </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>
+</body>
\ No newline at end of file
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js Mon Mar 26 16:53:34 2007
@@ -0,0 +1,194 @@
+/*
+ * 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.
+ *
+ * author: Steve Milek
+ */
+
+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
+ pageEditContainer: null,
+ pageEditLDContainer: null,
+ pageEditPDContainer: null,
+
+ deletePageDialog: null,
+ deletePageDialogBg: null,
+ deletePageDialogFg: null,
+
+ createPageDialog: null,
+ createPageDialogBg: null,
+ createPageDialogFg: null,
+
+ layoutDecoratorSelect: null,
+ portletDecoratorSelect: null,
+
+ // fields
+ isContainer: true,
+ widgetsInTemplate: true,
+ layoutDecoratorDefinitions: null,
+ portletDecoratorDefinitions: null,
+
+
+ // 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 );
+
+ 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 );
+
+ jetspeed.widget.PageEditPane.superclass.fillInTemplate.call( this );
+ },
+
+ postCreate: function( args, fragment, parent )
+ {
+ jetspeed.widget.PageEditPane.superclass.postCreate.apply( this, arguments );
+
+ if ( ! dojo.render.html.ie )
+ { /* in IE6, if fieldset background color is set the fieldset will not be rendered nicely (with rounded borders) */
+ if ( this.pageEditContainer != null )
+ this.pageEditContainer.style.backgroundColor = "#d3d3d3";
+ if ( this.pageEditLDContainer != null )
+ this.pageEditLDContainer.style.backgroundColor = "#eeeeee";
+ if ( this.pageEditPDContainer != null )
+ this.pageEditPDContainer.style.backgroundColor = "#eeeeee";
+ }
+
+ 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 );
+ }
+ },
+
+
+ // 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 pageRealPath = jetspeed.page.getPageDirectory( true ) + pageName;
+ var pagePath = jetspeed.page.getPageDirectory() + pageName;
+ var addPageContentManager = new jetspeed.widget.AddPageContentManager( pageRealPath, pagePath, pageName, null, pageTitle, pageShortTitle, this.pageEditorWidget );
+ addPageContentManager.getContent();
+ }
+ },
+ changeLayoutDecorator: function()
+ {
+ var updatePageInfoContentManager = new jetspeed.widget.UpdatePageInfoContentManager( this.layoutDecoratorSelect.getValue(), null, this.pageEditorWidget );
+ updatePageInfoContentManager.getContent();
+ },
+ changePortletDecorator: function()
+ {
+ var updatePageInfoContentManager = new jetspeed.widget.UpdatePageInfoContentManager( null, this.portletDecoratorSelect.getValue(), this.pageEditorWidget );
+ updatePageInfoContentManager.getContent();
+ }
+ }
+);
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditPane.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css Mon Mar 26 16:53:34 2007
@@ -0,0 +1,64 @@
+/*
+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.
+*/
+
+.dojoDialog .container { padding: 0.5em; background: #fff; border: 2px solid #333; -moz-border-radius : 5px; }
+
+.dojoDialog .deletePortletDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
+.dojoDialog .deletePortletDialog h2 { margin-top: 0; padding-top: 0; }
+.dojoDialog .deletePortletDialog p { clear: both; }
+.dojoDialog .deletePortletDialog .dojoButton { float: right; margin-right: 5px }
+
+.dojoDialog .deleteLayoutDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
+.dojoDialog .deleteLayoutDialog h2 { margin-top: 0; padding-top: 0; }
+.dojoDialog .deleteLayoutDialog p { clear: both; }
+.dojoDialog .deleteLayoutDialog .dojoButton { float: right; margin-right: 5px }
+
+.dojoDialog .columnSizeDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
+.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 }
+
+.pageEditorPaneContainer {
+ padding: 0.35em 0.625em 0.75em 0.625em;
+ /*background-color: #d3d3d3;*/
+ /* ^^ set conditionally in code - in IE6, if fieldset background-color is set, fieldset is rendered poorly */
+ -moz-border-radius: 5px;
+ -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
+ -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
+ -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
+ -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
+}
+
+.pageEditorDetailContainer {
+ padding: 0.35em 0.625em 0.75em 0.625em;
+ /*background-color: #eeeeee;*/
+ /* ^^ set conditionally in code - in IE6, if fieldset background-color is set, fieldset is rendered poorly */
+ -moz-border-radius: 5px;
+ -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
+ -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
+ -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
+ -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
+
+ float: left;
+ margin-right: 10px;
+ margin-bottom: 10px;
+}
+
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.css
------------------------------------------------------------------------------
svn:keywords = Id
Added: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html?view=auto&rev=522665
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html (added)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html Mon Mar 26 16:53:34 2007
@@ -0,0 +1,79 @@
+<!--
+ 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.
+-->
+<!-- need to wrap inside a body tag to allow the above license header
+ dojo will look for a body tag and use its content -->
+<body>
+<div class="pageEditorPane">
+ <div dojoAttachPoint="containerNode" class="container"></div>
+
+ <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"> </div>
+ <button dojoType="Button" dojoAttachEvent="onClick:deletePortletConfirmed">OK</button>
+ <button dojoType="Button" dojoAttachPoint="deletePortletCancel">Cancel</button>
+ <p></p>
+ </div>
+ </div>
+ </div>
+
+ <div dojoAttachPoint="deleteLayoutDialog">
+ <div class="container" dojoAttachPoint="deleteLayoutDialogBg">
+ <div class="deleteLayoutDialog" dojoAttachPoint="deleteLayoutDialogFg">
+ <h2>Are you sure you want to delete this layout?</h2>
+ <div dojoAttachPoint="deleteLayoutTitle"> </div>
+ <button dojoType="Button" dojoAttachEvent="onClick:deleteLayoutConfirmed">OK</button>
+ <button dojoType="Button" dojoAttachPoint="deleteLayoutCancel">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>
+</body>
\ No newline at end of file
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/branches/J2-M2-REDUX/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PageEditor.html
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org