Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 54907 invoked from network); 12 Oct 2007 00:36:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 00:36:46 -0000 Received: (qmail 59251 invoked by uid 500); 12 Oct 2007 00:36:33 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 58930 invoked by uid 500); 12 Oct 2007 00:36:33 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 58919 invoked by uid 99); 12 Oct 2007 00:36:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2007 17:36:32 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 00:36:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 154D21A983A; Thu, 11 Oct 2007 17:36:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r583998 [1/4] - /portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/ Date: Fri, 12 Oct 2007 00:36:13 -0000 To: jetspeed-dev@portals.apache.org From: smilek@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071012003617.154D21A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: smilek Date: Thu Oct 11 17:36:12 2007 New Revision: 583998 URL: http://svn.apache.org/viewvc?rev=583998&view=rev Log: continuation of desktop overhaul Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/EditorTable.src.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.css portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.html portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.src.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.css portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.html portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.src.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PortalTooltipManager.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PortalTooltipManager.src.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PortletWindow.css portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PortletWindow.js portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PortletWindow.src.js Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/EditorTable.src.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/EditorTable.src.js?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/EditorTable.src.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/EditorTable.src.js Thu Oct 11 17:36:12 2007 @@ -1,318 +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 += " " + "\r\n"; - else - { - dataVal = tTableWidget.data[masterDataIndex][ slotKey ]; - buff += " (" + ( dataVal == null ? "null" : dataVal ) + ")" + "\r\n"; - } - } - } - } - return buff; - } -}); + * 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 += " " + "\r\n"; + else + { + dataVal = tTableWidget.data[masterDataIndex][ slotKey ]; + buff += " (" + ( dataVal == null ? "null" : dataVal ) + ")" + "\r\n"; + } + } + } + } + return buff; + } +}); Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css Thu Oct 11 17:36:12 2007 @@ -18,8 +18,6 @@ .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 Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html Thu Oct 11 17:36:12 2007 @@ -17,31 +17,32 @@ -
+
+
-
+
- +
 
-
+
- - + + - - + +
@@ -50,4 +51,4 @@
- \ No newline at end of file + Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js Thu Oct 11 17:36:12 2007 @@ -11,7 +11,7 @@ dojo.require("dojo.html.display"); jetspeed.widget.LayoutEditPane=function(){ }; -dojo.widget.defineWidget("jetspeed.widget.LayoutEditPane",dojo.widget.HtmlWidget,{layoutId:null,layoutDefinitions:null,pageEditContainer:null,pageEditLNContainer:null,layoutNameSelect:null,deleteLayoutButton:null,editModeLayoutMoveButton:null,editModeNormalButton:null,layoutMoveContainer:null,isContainer:true,widgetsInTemplate:true,isLayoutPane:true,containingColumn:null,windowPositionStatic:true,postMixInProperties:function(_1,_2,_3){ +dojo.widget.defineWidget("jetspeed.widget.LayoutEditPane",dojo.widget.HtmlWidget,{layoutId:null,layoutDefinitions:null,layoutColumn:null,layoutInfo:null,parentLayoutInfo:null,pageEditContainer:null,pageEditLNContainer:null,layoutNameSelect:null,buttonGroupRight:null,deleteLayoutButton:null,editMoveModeButton:null,editMoveModeExitButton:null,layoutMoveContainer:null,isContainer:true,widgetsInTemplate:true,isLayoutPane:true,drag:null,posStatic:true,moveModeLayoutRelative:"movemode_layout",moveModes:["movemode_layout","movemode_portlet"],postMixInProperties:function(_1,_2,_3){ 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"); @@ -24,90 +24,176 @@ } return _6; },postCreate:function(_7,_8,_9){ -if(!jetspeed.UAie){ +var _a=dojo; +var _b=_a.html; +var _c=jetspeed.widget.PageEditor.prototype; if(this.pageEditContainer!=null){ -this.pageEditContainer.style.backgroundColor="#d3d3d3"; +_b.addClass(this.pageEditContainer,_c.styleBaseAdd); } if(this.pageEditLNContainer!=null){ -this.pageEditLNContainer.style.backgroundColor="#eeeeee"; -} +_b.addClass(this.pageEditLNContainer,_c.styleDetailAdd); } if(this.layoutNameSelect!=null){ -var _a=this.getCurrentLayout(); -var _b=null; -if(_a!=null){ -_b=_a.name; +var _d=this.getCurrentLayout(); +var _e=null; +if(_d!=null){ +_e=_d.name; } -var _c=[]; +var _f=[]; if(this.layoutDefinitions){ for(var i=0;i"}); Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js Thu Oct 11 17:36:12 2007 @@ -43,23 +43,33 @@ layoutId: null, layoutDefinitions: null, + layoutColumn: null, + layoutInfo: null, + parentLayoutInfo: null, + // template parameters pageEditContainer: null, pageEditLNContainer: null, layoutNameSelect: null, + buttonGroupRight: null, deleteLayoutButton: null, - editModeLayoutMoveButton: null, - editModeNormalButton: null, + editMoveModeButton: null, + editMoveModeExitButton: null, layoutMoveContainer: null, - + // fields isContainer: true, widgetsInTemplate: true, isLayoutPane: true, // drag variables - containingColumn: null, - windowPositionStatic: true, + drag: null, + posStatic: true, + + // move modes + moveModeLayoutRelative: "movemode_layout", + moveModes: [ "movemode_layout", "movemode_portlet" ], + // protocol - dojo.widget.Widget create @@ -88,13 +98,14 @@ postCreate: function( args, fragment, parent ) { - if ( ! jetspeed.UAie ) - { /* 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"; - } + var djObj = dojo; + var djH = djObj.html; + + var pageEditorProto = jetspeed.widget.PageEditor.prototype; + if ( this.pageEditContainer != null ) + djH.addClass( this.pageEditContainer, pageEditorProto.styleBaseAdd ); + if ( this.pageEditLNContainer != null ) + djH.addClass( this.pageEditLNContainer, pageEditorProto.styleDetailAdd ); if ( this.layoutNameSelect != null ) { @@ -124,7 +135,7 @@ } this.syncButtons(); - this.layoutMoveContainer = dojo.widget.createWidget( "jetspeed:LayoutEditPaneMoveHandle", + this.layoutMoveContainer = djObj.widget.createWidget( "jetspeed:LayoutEditPaneMoveHandle", { layoutImagesRoot: this.layoutImagesRoot }); @@ -132,12 +143,6 @@ this.domNode.appendChild( this.layoutMoveContainer.domNode ); }, - initializeDrag: function() - { - this.containingColumn = this.getContainingColumn(); - this.drag = new dojo.dnd.Moveable( this, {handle: this.layoutMoveContainer.domNode}); - }, - // methods changeLayout: function() @@ -172,50 +177,171 @@ { this.pageEditorWidget.deleteLayout( this.layoutId ); }, - editModeNormal: function() + editMoveModeExit: function() + { + this.pageEditorWidget.editMoveModeExit(); + if ( this.editMoveModeButton != null ) + this.editMoveModeButton.domNode.style.display = "block"; + if ( this.editMoveModeExitButton != null ) + this.editMoveModeExitButton.domNode.style.display = "none"; + }, + editMoveModeStart: function() + { + this.pageEditorWidget.editMoveModeStart(); + if ( this.editMoveModeButton != null ) + this.editMoveModeButton.domNode.style.display = "none"; + if ( this.editMoveModeExitButton != null ) + this.editMoveModeExitButton.domNode.style.display = "block"; + }, + + _enableMoveMode: function() + { + if ( this.layoutMoveContainer && this.drag ) + { + this.layoutMoveContainer.domNode.style.display = "block"; + } + }, + _disableMoveMode: function() + { + if ( this.layoutMoveContainer && this.drag ) + { + this.layoutMoveContainer.domNode.style.display = "none"; + } + }, + + initializeDrag: function() + { + var layoutCol = this.layoutColumn; + if ( layoutCol != null && layoutCol.domNode != null ) + { + this.dragStartStaticWidth = layoutCol.domNode.style.width; + this.drag = new dojo.dnd.Moveable( this, {handle: this.layoutMoveContainer.domNode }); + } + }, + + startDragging: function( e, moveableObj, djObj, jsObj ) { - this.pageEditorWidget.editModeNormal(); - if ( this.editModeLayoutMoveButton != null ) - this.editModeLayoutMoveButton.domNode.style.display = "block"; - if ( this.editModeNormalButton != null ) - this.editModeNormalButton.domNode.style.display = "none"; + var dragLayoutColumn = this.layoutColumn; + if ( dragLayoutColumn != null ) + { + var dragNode = dragLayoutColumn.domNode; + if ( dragNode ) + { + if ( this.buttonGroupRight ) + this.buttonGroupRight.style.display = "none"; + var notifyOnAbsolute = true; + moveableObj.beforeDragColRowInfo = jsObj.page.getPortletCurColRow( dragNode ); + moveableObj.node = dragNode; + moveableObj.mover = new djObj.dnd.Mover( this, dragNode, dragLayoutColumn, moveableObj, e, notifyOnAbsolute, djObj, jsObj ); + } + } }, - editModeLayoutMove: function() + + dragChangeToAbsolute: function( moverObj, layoutColNode, mbLayoutColNode, djObj, jsObj ) { - this.pageEditorWidget.editModeLayoutMove(); - if ( this.editModeLayoutMoveButton != null ) - this.editModeLayoutMoveButton.domNode.style.display = "none"; - if ( this.editModeNormalButton != null ) - this.editModeNormalButton.domNode.style.display = "block"; + var mbLayoutColNodeFresh = djObj.getMarginBox( layoutColNode, null, jsObj ); + //dojo.debug( "dragChangeToAbsolute - passed-mb=" + jsObj.printobj( mbLayoutColNode ) + " fresh-mb=" + jsObj.printobj( mbLayoutColNodeFresh ) ); + var reduceWidth = 400 - mbLayoutColNode.w; + if ( reduceWidth < 0 ) + { + mbLayoutColNode.l = mbLayoutColNode.l + ( reduceWidth * -1 ); // ( mbLayoutColNode.w + reduceWidth ); + mbLayoutColNode.w = 400; + djObj.setMarginBox( layoutColNode, mbLayoutColNode.l, null, mbLayoutColNode.w, null, null, jsObj ); + } + + if ( jsObj.UAie ) + { + var bgIframeNode = this.pageEditorWidget.bgIframe.iframe; + this.domNode.appendChild( bgIframeNode ); + bgIframeNode.style.display = "block"; + djObj.setMarginBox( bgIframeNode, null, null, null, mbLayoutColNode.h, null, jsObj ); + //djObj.debug( "layout bgIframe mb: " + jsObj.printobj( djObj.getMarginBox( bgIframeNode, null, jsObj ) ) ); + } }, - endDragging: function() + endDragging: function( posObj ) { - 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 jsObj = jetspeed; + var djObj = dojo; + var layoutCol = this.layoutColumn; + if ( this.drag == null || layoutCol == null || layoutCol.domNode == null ) return; + var dNode = layoutCol.domNode; + dNode.style.position = "static"; + dNode.style.width = this.dragStartStaticWidth; + dNode.style.left = "auto"; + dNode.style.top = "auto"; + + if ( this.buttonGroupRight ) + this.buttonGroupRight.style.display = "block"; + + if ( jsObj.UAie ) + this.pageEditorWidget.bgIframe.iframe.style.display = "none"; + + var beforeDragColRowInfo = this.drag.beforeDragColRowInfo; + var afterDragColRowInfo = jsObj.page.getPortletCurColRow( dNode ); + if ( beforeDragColRowInfo != null && afterDragColRowInfo != null ) { - var afterDragColumnRowInfo = jetspeed.page.getPortletCurColRow( 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 ) ) + var ind = jsObj.debugindent; + //djObj.hostenv.println( "move-layout[" + this.layoutId + " / " + dNode.id + "]" ); + //djObj.hostenv.println( ind + "before (col=" + beforeDragColRowInfo.column + " row=" + beforeDragColRowInfo.row + " layout=" + beforeDragColRowInfo.layout + ")" ); + //djObj.hostenv.println( ind + "before-" + jetspeed.debugColumn( beforeDragColRowInfo.columnObj, true ) ); + //djObj.hostenv.println( ind + "after (col=" + afterDragColRowInfo.column + " row=" + afterDragColRowInfo.row + " layout=" + afterDragColRowInfo.layout + ")" ); + //djObj.hostenv.println( ind + "after-" + jetspeed.debugColumn( afterDragColRowInfo.columnObj, true ) ); + + if ( afterDragColRowInfo != null && ( afterDragColRowInfo.row != beforeDragColRowInfo.row || afterDragColRowInfo.column != beforeDragColRowInfo.column || afterDragColRowInfo.layout != beforeDragColRowInfo.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(); + var moveLayoutContentManager = new jsObj.widget.MoveLayoutContentManager( this.layoutId, afterDragColRowInfo.layout, afterDragColRowInfo.column, afterDragColRowInfo.row, this.pageEditorWidget ); + moveLayoutContentManager.getContent(); } } }, - getContainingColumn: function() + getLayoutColumn: function() { - return jetspeed.page.getColWithNode( this.domNode ); + return this.layoutColumn; }, getPageColumnIndex: function() { - return jetspeed.page.getColIndexForNode( this.domNode ); + if ( this.layoutColumn ) + { + var parentColObj = jetspeed.page.getColWithNode( this.layoutColumn.domNode ); + if ( parentColObj != null ) + return parentColObj.getPageColumnIndex(); + } + return null; }, - + _getLayoutInfoMoveable: function() + { + return this.layoutInfo; + }, + _getWindowMarginBox: function( layoutColumnLayoutInfo, jsObj ) + { + if ( this.layoutColumn ) + { + var parentLayoutInfo = this.parentLayoutInfo; + if ( jsObj.UAope && parentLayoutInfo == null ) // needs parentNode layout-info + { + var pageLayoutInfo = jsObj.page.layoutInfo; + var parentColIndex = jsObj.page.getColIndexForNode( this.layoutColumn.domNode ); + if ( parentColIndex != null ) + { + var parentCol = jsObj.page.columns[parentColIndex]; + if ( parentCol.layoutHeader ) + parentLayoutInfo = pageLayoutInfo.columnLayoutHeader; + else + parentLayoutInfo = pageLayoutInfo.column; + } + else + { + parentLayoutInfo = pageLayoutInfo.columns; + } + this.parentLayoutInfo = parentLayoutInfo; + } + return jsObj.ui.getMarginBox( this.layoutColumn.domNode, layoutColumnLayoutInfo, parentLayoutInfo, jsObj ); + } + return null; + }, + editModeRedisplay: function() { this.show(); @@ -227,18 +353,23 @@ { 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"; + if ( this.editMoveModeButton != null ) + this.editMoveModeButton.domNode.style.display = "block"; + if ( this.editMoveModeExitButton != null ) + this.editMoveModeExitButton.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"; + if ( this.editMoveModeButton != null ) + this.editMoveModeButton.domNode.style.display = "none"; + if ( this.editMoveModeExitButton != null ) + this.editMoveModeExitButton.domNode.style.display = "none"; } + }, + + onBrowserWindowResize: function() + { // called after ie6 resize window + // nothing to do here } } ); Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.css URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.css?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.css (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.css Thu Oct 11 17:36:12 2007 @@ -52,8 +52,10 @@ .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 .deletePageDialog p { } +.dojoDialog .deletePageDialog .dojoButton { margin-right: 5px } +.dojoDialog .dialogBottom { position: relative; width: 100%; height: 30px; margin: 3px } +.dojoDialog .dialogButtonContainerRight { position: absolute; bottom: 2px; left: 2px; } .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; } Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.html URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.html?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.html (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.html Thu Oct 11 17:36:12 2007 @@ -18,32 +18,33 @@ dojo will look for a body tag and use its content -->
+
-
 Jetspeed Customizer
+
 ${this.labels.title}
-
+
- +
-
+
- +
- + - +
@@ -54,9 +55,15 @@
-

Are you sure you want to delete this page?

- - +

${this.dialogLabels.deletepage}

+
+
+ + + +
+
+

@@ -65,25 +72,25 @@
-

Create New Page

+

${this.dialogLabels.newpage}

-
Name
+
${this.dialogLabels.newpage_name}
-
Title
+
${this.dialogLabels.newpage_title}
-
Short Title
+
${this.dialogLabels.newpage_titleshort}
- - + +

- \ No newline at end of file + Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.js?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.js Thu Oct 11 17:36:12 2007 @@ -42,71 +42,83 @@ } jetspeed.widget.PageEditPane.superclass.destroy.apply(this,arguments); },postCreate:function(_b,_c,_d){ -jetspeed.widget.PageEditPane.superclass.postCreate.apply(this,arguments); -if(!jetspeed.UAie){ +var _e=jetspeed; +var _f=dojo.html; +_e.widget.PageEditPane.superclass.postCreate.apply(this,arguments); +var _10=_e.widget.PageEditor.prototype; if(this.pageEditContainer!=null){ -this.pageEditContainer.style.backgroundColor="#d3d3d3"; +_f.addClass(this.pageEditContainer,_10.styleBaseAdd); } if(this.pageEditLDContainer!=null){ -this.pageEditLDContainer.style.backgroundColor="#eeeeee"; +_f.addClass(this.pageEditLDContainer,_10.styleDetailAdd); } if(this.pageEditPDContainer!=null){ -this.pageEditPDContainer.style.backgroundColor="#eeeeee"; -} +_f.addClass(this.pageEditPDContainer,_10.styleDetailAdd); } if(this.layoutDecoratorSelect!=null){ -var _e=jetspeed.page.layoutDecorator; -var _f=[]; +var _11=_e.page.layoutDecorator; +var _12=[]; if(this.layoutDecoratorDefinitions){ for(var i=0;i0){ -var _19=jetspeed.page.getPageDirectory(true)+_16; -var _1a=jetspeed.page.getPageDirectory()+_16; -var _1b=new jetspeed.widget.AddPageContentManager(_19,_1a,_16,null,_17,_18,this.pageEditorWidget); -_1b.getContent(); +this.pageEditorWidget._openDialog(this.createPageDialog); +},createPageConfirmed:function(_19,_1a,_1b){ +if(_19!=null&&_19.length>0){ +var _1c=jetspeed.page.getPageDirectory(true)+_19; +var _1d=jetspeed.page.getPageDirectory()+_19; +var _1e=new jetspeed.widget.AddPageContentManager(_1c,_1d,_19,null,_1a,_1b,this.pageEditorWidget); +_1e.getContent(); } },changeLayoutDecorator:function(){ -var _1c=new jetspeed.widget.UpdatePageInfoContentManager(this.layoutDecoratorSelect.getValue(),null,this.pageEditorWidget); -_1c.getContent(); +var _1f=new jetspeed.widget.UpdatePageInfoContentManager(this.layoutDecoratorSelect.getValue(),null,this.pageEditorWidget); +_1f.getContent(); },changePortletDecorator:function(){ -var _1d=new jetspeed.widget.UpdatePageInfoContentManager(null,this.portletDecoratorSelect.getValue(),this.pageEditorWidget); -_1d.getContent(); +var _20=new jetspeed.widget.UpdatePageInfoContentManager(null,this.portletDecoratorSelect.getValue(),this.pageEditorWidget); +_20.getContent(); },editModeRedisplay:function(){ this.show(); +},onBrowserWindowResize:function(){ +var _21=this.deletePageDialog; +var _22=this.createPageDialog; +if(_21&&_21.isShowing()){ +_21.domNode.style.display="none"; +_21.domNode.style.display="block"; +} +if(_22&&_22.isShowing()){ +_22.domNode.style.display="none"; +_22.domNode.style.display="block"; +} }}); Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.src.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.src.js?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.src.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditPane.src.js Thu Oct 11 17:36:12 2007 @@ -103,21 +103,21 @@ postCreate: function( args, fragment, parent ) { - jetspeed.widget.PageEditPane.superclass.postCreate.apply( this, arguments ); - - if ( ! jetspeed.UAie ) - { /* 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"; - } + var jsObj = jetspeed; + var djH = dojo.html; + jsObj.widget.PageEditPane.superclass.postCreate.apply( this, arguments ); + + var pageEditorProto = jsObj.widget.PageEditor.prototype; + if ( this.pageEditContainer != null ) + djH.addClass( this.pageEditContainer, pageEditorProto.styleBaseAdd ); + if ( this.pageEditLDContainer != null ) + djH.addClass( this.pageEditLDContainer, pageEditorProto.styleDetailAdd ); + if ( this.pageEditPDContainer != null ) + djH.addClass( this.pageEditPDContainer, pageEditorProto.styleDetailAdd ); if ( this.layoutDecoratorSelect != null ) { - var currentLayoutDecorator = jetspeed.page.layoutDecorator; + var currentLayoutDecorator = jsObj.page.layoutDecorator; var layoutDecoratorData = []; if ( this.layoutDecoratorDefinitions ) @@ -140,7 +140,7 @@ if ( this.portletDecoratorSelect != null ) { - var currentPortletDecorator = jetspeed.page.portletDecorator; + var currentPortletDecorator = jsObj.page.portletDecorator; var portletDecoratorData = []; if ( this.portletDecoratorDefinitions ) @@ -167,7 +167,7 @@ deletePage: function() { - this.deletePageDialog.show(); + this.pageEditorWidget._openDialog( this.deletePageDialog ); }, deletePageConfirmed: function() { @@ -176,7 +176,7 @@ }, createPage: function() { - this.createPageDialog.show(); + this.pageEditorWidget._openDialog( this.createPageDialog ); }, createPageConfirmed: function( pageName, pageTitle, pageShortTitle ) { @@ -201,6 +201,21 @@ editModeRedisplay: function() { this.show(); + }, + onBrowserWindowResize: function() + { // called after ie6 resize window + var deletePageDialog = this.deletePageDialog; + var createPageDialog = this.createPageDialog; + if ( deletePageDialog && deletePageDialog.isShowing() ) + { + deletePageDialog.domNode.style.display = "none"; + deletePageDialog.domNode.style.display = "block"; + } + if ( createPageDialog && createPageDialog.isShowing() ) + { + createPageDialog.domNode.style.display = "none"; + createPageDialog.domNode.style.display = "block"; + } } } ); Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.css URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.css?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.css (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.css Thu Oct 11 17:36:12 2007 @@ -36,29 +36,134 @@ .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; + + -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; +} + +.pageEditorPaneContainerNotIE { + background-color: #d3d3d3; + +} +.pageEditorPaneContainerIE { + /* background-color: #d3d3d3; */ + /* if background-color is set, IE6 and IE7 will not render rounded corner border for fieldset node */ + /* the reason fieldset is used here is to make it possible to get rounded corners in IE */ +} + +.pageEditorDetailContainer { + float: left; + + margin-right: 10px; + margin-bottom: 10px; +} + +.pageEditorDetailContainerNotIE { + background-color: #eeeeee; + +} + +.pageEditorDetailContainerIE { + /* background-color: #eeeeee; */ + /* if background-color is set, IE6 and IE7 will not render rounded corner border for fieldset node */ + /* the reason fieldset is used here is to make it possible to get rounded corners in IE */ +} + +.layoutEdgeTop { + clear: both; + height: 30px; + + display: none; +} + +.layoutEdgeBottom { + clear: both; + height: 30px; + + display: none; +} + +.ieLayoutBackgroundIFrame { + position: absolute; + display: none; + + left: 0px; + top: 0px; + width: 100%; + height: 100%; + + z-index: -1; + + filter: Alpha(Opacity="100"); +} + + +.layoutEdgeTopTest { + width: 100%; + height: 20px; + display: block; + /*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; + + border-bottom-color: #000; + border-bottom-style: groove; + border-bottom-width: 2px; + border-collapse: separate; + border-left-color: #000; + border-left-style: groove; + border-left-width: 2px; + border-right-color: #000; + border-right-style: groove; + border-right-width: 2px; + border-top-color: #000; + border-top-style: groove; + border-top-width: 2px; + + padding: 0.35em 0.62em 0.75em; + background-color: transparent; } -.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 */ +.layoutEdgeBottomTest { + width: 100%; + height: 20px; + display: block; + + /*background-color: #d3d3d3;*/ + -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; + border-bottom-color: #000; + border-bottom-style: groove; + border-bottom-width: 2px; + border-collapse: separate; + border-left-color: #000; + border-left-style: groove; + border-left-width: 2px; + border-right-color: #000; + border-right-style: groove; + border-right-width: 2px; + border-top-color: #000; + border-top-style: groove; + border-top-width: 2px; + + padding: 0.35em 0.62em 0.75em; + background-color: transparent; } Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.html URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.html?rev=583998&r1=583997&r2=583998&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.html (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/widget/PageEditor.html Thu Oct 11 17:36:12 2007 @@ -18,15 +18,16 @@ dojo will look for a body tag and use its content -->
+
-

Are you sure you want to delete this portlet?

+

${this.dialogLabels.removeportlet}

 
- - + +

@@ -35,10 +36,10 @@
-

Are you sure you want to delete this layout?

+

${this.dialogLabels.deletelayout}

 
- - + +

@@ -47,33 +48,33 @@
-

Change Column Sizes

+

${this.dialogLabels.columnsizes}

-
Column 1
+
${this.dialogLabels.columnsizes_column1}
-
Column 2
+
${this.dialogLabels.columnsizes_column2}
-
Column 3
+
${this.dialogLabels.columnsizes_column3}
-
Column 4
+
${this.dialogLabels.columnsizes_column4}
-
Column 5
+
${this.dialogLabels.columnsizes_column5}
- - + +

- \ No newline at end of file + --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org