portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r547641 [3/5] - in /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed: ./ desktop/ widget/
Date Fri, 15 Jun 2007 11:47:22 GMT
Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js?view=diff&rev=547641&r1=547640&r2=547641
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js Fri Jun
15 04:47:21 2007
@@ -1,318 +1,217 @@
-/*
- * 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,updateEditor:function(_1){
+},saveEntrySubmit:function(_2,_3){
+},clearAndDisableEditor:function(){
+},getNewEntryPrototype:function(){
+return {};
+},render:function(_4){
+_4=true;
+jetspeed.widget.EditorTable.superclass.render.call(this,_4);
+},buildRendering:function(_5,_6){
+jetspeed.widget.EditorTable.superclass.buildRendering.call(this,_5,_6);
+if(_5.templateCssPath){
+dojo.html.insertCssFile(dojo.uri.dojoUri(_5.templateCssPath),document,true);
+}
+},hasRowChanged:function(_7){
+if(!_7){
+return false;
+}
+var _8=_7.Id;
+var _9=this.getData(this.js_masterdata,_8);
+var _a=(_7.__isNew||_7.__isModified)?true:false;
+if(!_a){
+for(var _b in _9){
+if(_7[_b]!=_9[_b]){
+_a=true;
+break;
+}
+}
+}
+return _a;
+},entryIsNew:function(_c){
+if(!_c){
+return false;
+}
+return _c.__isNew;
+},setModified:function(_d){
+if(!_d){
+return;
+}
+_d.__isModified=true;
+},getSelectedRow:function(){
+if(this.selected&&this.selected.length==1){
+var _e=this.selected[0].Id;
+var _f=this.getData(this.data,_e);
+return _f;
+}
+return null;
+},getData:function(_10,_11){
+if(!_10){
+return null;
+}
+for(var i=0;i<_10.length;i++){
+if(_10[i].Id==_11){
+return _10[i];
+}
+}
+return null;
+},getDataIndex:function(_13,_14){
+if(!_13){
+return -1;
+}
+for(var i=0;i<_13.length;i++){
+if(_13[i].Id==_14){
+return i;
+}
+}
+return -1;
+},processTableRowEvent:function(e){
+var row=dojo.html.getParentByType(e.target,"tr");
+var _18=this.getObjectFromRow(row);
+this.updateEditor(_18);
+},checkForChanges:function(){
+var _19=this.getSelectedRow();
+if(!_19){
+return false;
+}
+var _1a=this.hasRowChanged(_19);
+return (!_1a?false:(_19.__isNew?"new":"modified"));
+},updateClonedData:function(_1b,_1c){
+if(!_1b||!_1c){
+return;
+}
+for(var _1d in _1b){
+_1c[_1d]=_1b[_1d];
+}
+},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 _1e=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;
+}
+}
+_1e.Id=tId;
+this.js_masterdata.push(dojo.lang.shallowCopy(_1e));
+_1e.__isNew=true;
+this.data.push(_1e);
+this.selected=[dojo.lang.shallowCopy(_1e)];
+this.render(true);
+this.showSelections();
+this.updateEditor(_1e);
+},deleteEntry:function(){
+var _21=this.getSelectedRow();
+if(!_21){
+return;
+}
+var tId=_21.Id;
+if(!_21.__isNew){
+this.saveEntrySubmit(_21,true);
+}
+var _23=this.getDataIndex(this.js_masterdata,tId);
+if(_23!=-1){
+this.js_masterdata.splice(_23,1);
+}
+_23=this.getDataIndex(this.data,tId);
+if(_23!=-1){
+this.data.splice(_23,1);
+}
+this.selected=[];
+this.render(true);
+this.showSelections();
+this.clearAndDisableEditor();
+},saveEntry:function(){
+var _24=this.getSelectedRow();
+if(!_24){
+dojo.raise("saveEntry can't find selectedRowData");
+return;
+}
+var _25=this.getData(this.js_masterdata,_24.Id);
+if(!_25){
+dojo.raise("saveEntry can't find masterdata");
+return;
+}
+this.saveEntrySubmit(_24);
+delete _24.__isNew;
+delete _24.__isModified;
+this.updateClonedData(_24,_25);
+this.updateClonedData(_24,this.selected[0]);
+this.updateEditor(_24);
+},revertEntry:function(){
+var _26=this.getSelectedRow();
+if(!_26){
+return;
+}
+if(_26.__isNew){
+deleteEntry();
+}else{
+delete _26.__isModified;
+var _27=this.getData(this.js_masterdata,_26.Id);
+if(!_27){
+return;
+}
+this.updateClonedData(_27,_26);
+this.updateClonedData(_27,this.selected[0]);
+this.render(true);
+this.showSelections();
+this.updateEditor(_27);
+}
+},okToChangeSelectionOrExit:function(_28){
+if(this.checkForChanges()){
+if(this.saveWarningDialogWidgetId){
+dojo.widget.byId(this.saveWarningDialogWidgetId).show();
+return false;
+}else{
+this.saveEntry();
+}
+}
+if(_28!=null){
+_28.proceed();
+}
+return true;
+},dojoDebugTableData:function(){
+dojo.debug(debugTableData());
+},debugTableData:function(){
+var _29=this;
+buff=_29.widgetId+" data:"+"\r\n";
+for(var _2a=0;_2a<_29.js_masterdata.length;_2a++){
+buff+="["+_2a+"]"+"\r\n";
+var _2b=new Object();
+for(var _2c in _29.js_masterdata[_2a]){
+buff+="   "+_2c+"="+_29.js_masterdata[_2a][_2c];
+if(_2c=="__isModified"||_2c=="__isNew"){
+buff+="\r\n";
+}else{
+var _2d=null;
+if(_29.data.length<=_2a){
+buff+=" <out-of-bounds>"+"\r\n";
+}else{
+_2d=_29.data[_2a][_2c];
+buff+=" ("+(_2d==null?"null":_2d)+")"+"\r\n";
+}
+}
+}
+}
+return buff;
+}});
 
-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;
-    }
-});

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js?view=diff&rev=547641&r1=547640&r2=547641
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js Fri Jun
15 04:47:21 2007
@@ -1,25 +1,5 @@
-/*
- * 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.*");
@@ -27,282 +7,167 @@
 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 );
-            }
-            this.syncButtons();
-            
-            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 );
-        },
-        
-        editModeRedisplay: function()
-        {
-            this.show();
-            this.syncButtons();
-        },
-        syncButtons: function()
-        {
-            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";
-            }
-        }
-	}
-);
-
-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 );
+jetspeed.widget.LayoutEditPane=function(){
 };
-
-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.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,containingColumn:null,windowPositionStatic:true,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");
+},fillInTemplate:function(_4,_5){
+jetspeed.widget.LayoutEditPane.superclass.fillInTemplate.call(this);
+},getCurrentLayout:function(){
+var _6=null;
+if(this.layoutId!=null){
+_6=jetspeed.page.layouts[this.layoutId];
+}
+return _6;
+},postCreate:function(_7,_8,_9){
+if(!jetspeed.browser_IE){
+if(this.pageEditContainer!=null){
+this.pageEditContainer.style.backgroundColor="#d3d3d3";
+}
+if(this.pageEditLNContainer!=null){
+this.pageEditLNContainer.style.backgroundColor="#eeeeee";
+}
+}
+if(this.layoutNameSelect!=null){
+var _a=this.getCurrentLayout();
+var _b=null;
+if(_a!=null){
+_b=_a.name;
+}
+var _c=[];
+if(this.layoutDefinitions){
+for(var i=0;i<this.layoutDefinitions.length;i++){
+var _e=this.layoutDefinitions[i];
+if(_e&&_e.length==2){
+_c.push([_e[0],_e[1]]);
+if(_b==_e[1]){
+this.layoutNameSelect.setAllValues(_e[0],_e[1]);
+}
+}
+}
+}
+this.layoutNameSelect.dataProvider.setData(_c);
+}
+this.syncButtons();
+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);
+},changeLayout:function(){
+var _f=new jetspeed.widget.UpdateFragmentContentManager(this.layoutId,this.layoutNameSelect.getValue(),null,this.pageEditorWidget);
+_f.getContent();
+},openColumnSizeEditor:function(){
+this.pageEditorWidget.openColumnSizesEditor(this.layoutId);
+},addPortlet:function(){
+var _10=jetspeed.page.getPagePathAndQuery();
+_10=jetspeed.url.addQueryParameter(_10,"editPage","true",true);
+jetspeed.page.addPortletInitiate(this.layoutId,_10.toString());
+},addLayout:function(){
+var _11=this.getCurrentLayout();
+if(_11!=null){
+var _12=new jetspeed.widget.AddLayoutContentManager(this.layoutId,_11.name,this.pageEditorWidget);
+_12.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 _13=this.drag.beforeDragColumnRowInfo;
+if(_13!=null){
+var _14=jetspeed.page.getPortletCurrentColumnRow(this.containingColumn.domNode);
+if(_14!=null&&(_14.row!=_13.row||_14.column!=_13.column||_14.layout!=_13.layout)){
+var _15=new jetspeed.widget.MoveLayoutContentManager(this.layoutId,_14.layout,_14.column,_14.row,this.pageEditorWidget);
+_15.getContent();
+}
+}
+},getContainingColumn:function(){
+return jetspeed.page.getColumnContainingNode(this.domNode);
+},getPageColumnIndex:function(){
+return jetspeed.page.getColumnIndexContainingNode(this.domNode);
+},editModeRedisplay:function(){
+this.show();
+this.syncButtons();
+},syncButtons:function(){
+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";
+}
+}
+}});
+dojo.widget.defineWidget("jetspeed.widget.LayoutEditPaneMoveHandle",dojo.widget.HtmlWidget,{templateString:"<span
class=\"layoutMoveContainer\"><img src=\"${this.layoutImagesRoot}layout_move.png\"></span>"});
+jetspeed.widget.LayoutDragMoveSource=function(_16){
+this.layoutEditPane=_16;
+this.beforeDragColumnRowInfo=null;
+this.beforeDragColumn=_16.containingColumn;
+var _17=((this.beforeDragColumn!=null)?this.beforeDragColumn.domNode:null);
+dojo.dnd.HtmlDragMoveSource.call(this,_17);
+};
+dojo.inherits(jetspeed.widget.LayoutDragMoveSource,dojo.dnd.HtmlDragMoveSource);
+dojo.lang.extend(jetspeed.widget.LayoutDragMoveSource,{onDragStart:function(){
+this.beforeDragColumnRowInfo=null;
+var _18=null;
+if(this.dragObject!=null){
+if(this.beforeDragColumn!=null&&this.beforeDragColumn.domNode!=null){
+this.beforeDragColumnRowInfo=jetspeed.page.getPortletCurrentColumnRow(this.beforeDragColumn.domNode);
+}
+_18=new jetspeed.widget.LayoutDragMoveObject(this.dragObject,this.type,this.layoutEditPane,this.beforeDragColumn);
+if(this.constrainToContainer){
+_18.constrainTo(this.constrainingContainer);
+}
+}
+return _18;
+},onDragEnd:function(){
+}});
+dojo.declare("jetspeed.widget.LayoutDragMoveObject",jetspeed.widget.PortletWindowDragMoveObject,{qualifyTargetColumn:function(_19){
+if(_19==null){
+return false;
+}
+if(this.disqualifiedColumnIndexes[_19.getPageColumnIndex()]!=null){
+return false;
+}
+return true;
+}},function(_1a,_1b,_1c,_1d){
+this.layoutEditPane=_1c;
+this.disqualifiedColumnIndexes=_1d.getDescendantColumns();
 });
-
-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();
-    }
-);
+

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js?view=diff&rev=547641&r1=547640&r2=547641
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js Fri Jun
15 04:47:21 2007
@@ -1,24 +1,4 @@
-/*
- * 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.*");
@@ -26,173 +6,99 @@
 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();
-        },
-        editModeRedisplay: function()
-        {
-            this.show();
-        }
-	}
-);
+jetspeed.widget.PageEditPane=function(){
+};
+dojo.widget.defineWidget("jetspeed.widget.PageEditPane",dojo.widget.HtmlWidget,{pageEditContainer:null,pageEditLDContainer:null,pageEditPDContainer:null,deletePageDialog:null,deletePageDialogBg:null,deletePageDialogFg:null,createPageDialog:null,createPageDialogBg:null,createPageDialogFg:null,layoutDecoratorSelect:null,portletDecoratorSelect:null,isContainer:true,widgetsInTemplate:true,layoutDecoratorDefinitions:null,portletDecoratorDefinitions:null,postMixInProperties:function(_1,_2,_3){
+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(_4,_5){
+var _6=this;
+this.deletePageDialog=dojo.widget.createWidget("dialog",{widgetsInTemplate:true,deletePageConfirmed:function(){
+this.hide();
+_6.deletePageConfirmed();
+}},this.deletePageDialog);
+this.deletePageDialog.setCloseControl(this.deletePageDialog.deletePageCancel.domNode);
+var _7={};
+_7.widgetsInTemplate=true;
+_7.createPageConfirmed=function(){
+var _8=this.createPageNameTextbox.textbox.value;
+var _9=this.createPageTitleTextbox.textbox.value;
+var _a=this.createPageShortTitleTextbox.textbox.value;
+this.hide();
+_6.createPageConfirmed(_8,_9,_a);
+};
+this.createPageDialog=dojo.widget.createWidget("dialog",_7,this.createPageDialog);
+this.createPageDialog.setCloseControl(this.createPageDialog.createPageCancel.domNode);
+jetspeed.widget.PageEditPane.superclass.fillInTemplate.call(this);
+},postCreate:function(_b,_c,_d){
+jetspeed.widget.PageEditPane.superclass.postCreate.apply(this,arguments);
+if(!dojo.render.html.ie){
+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 _e=jetspeed.page.layoutDecorator;
+var _f=[];
+if(this.layoutDecoratorDefinitions){
+for(var i=0;i<this.layoutDecoratorDefinitions.length;i++){
+var _11=this.layoutDecoratorDefinitions[i];
+if(_11&&_11.length==2){
+_f.push([_11[0],_11[1]]);
+if(_e==_11[1]){
+this.layoutDecoratorSelect.setAllValues(_11[0],_11[1]);
+}
+}
+}
+}
+this.layoutDecoratorSelect.dataProvider.setData(_f);
+}
+if(this.portletDecoratorSelect!=null){
+var _12=jetspeed.page.portletDecorator;
+var _13=[];
+if(this.portletDecoratorDefinitions){
+for(var i=0;i<this.portletDecoratorDefinitions.length;i++){
+var _14=this.portletDecoratorDefinitions[i];
+if(_14&&_14.length==2){
+_13.push([_14[0],_14[1]]);
+if(_12==_14[1]){
+this.portletDecoratorSelect.setAllValues(_14[0],_14[1]);
+}
+}
+}
+}
+this.portletDecoratorSelect.dataProvider.setData(_13);
+}
+},deletePage:function(){
+this.deletePageDialog.show();
+},deletePageConfirmed:function(){
+var _15=new jetspeed.widget.RemovePageContentManager(this.pageEditorWidget);
+_15.getContent();
+},createPage:function(){
+this.createPageDialog.show();
+},createPageConfirmed:function(_16,_17,_18){
+if(_16!=null&&_16.length>0){
+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();
+}
+},changeLayoutDecorator:function(){
+var _1c=new jetspeed.widget.UpdatePageInfoContentManager(this.layoutDecoratorSelect.getValue(),null,this.pageEditorWidget);
+_1c.getContent();
+},changePortletDecorator:function(){
+var _1d=new jetspeed.widget.UpdatePageInfoContentManager(null,this.portletDecoratorSelect.getValue(),this.pageEditorWidget);
+_1d.getContent();
+},editModeRedisplay:function(){
+this.show();
+}});
+



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


Mime
View raw message