portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r553985 - in /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget: LayoutEditPane.js LayoutEditPane.src.js
Date Fri, 06 Jul 2007 18:32:04 GMT
Author: smilek
Date: Fri Jul  6 11:32:04 2007
New Revision: 553985

URL: http://svn.apache.org/viewvc?view=rev&rev=553985
Log:
removed drag&drop types which are replaced by new code in PortletWindow

Modified:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js

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=553985&r1=553984&r2=553985
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js Fri Jul
 6 11:32:04 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,containingColumn:null,windowPositionStatic:true,postMixInProperties:function(_1,_2,_3){
+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){
 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");
@@ -58,8 +58,7 @@
 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);
+this.drag=new dojo.dnd.Moveable(this,{handle:this.layoutMoveContainer.domNode});
 },changeLayout:function(){
 var _f=new jetspeed.widget.UpdateFragmentContentManager(this.layoutId,this.layoutNameSelect.getValue(),null,this.pageEditorWidget);
 _f.getContent();
@@ -103,8 +102,6 @@
 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(){
@@ -135,39 +132,4 @@
 }
 }});
 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();
-});
 

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js?view=diff&rev=553985&r1=553984&r2=553985
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js Fri
Jul  6 11:32:04 2007
@@ -55,6 +55,7 @@
         // fields
 		isContainer: true,
         widgetsInTemplate: true,
+        isLayoutPane: true,
 
         // drag variables
         containingColumn: null,
@@ -134,8 +135,7 @@
         initializeDrag: function()
         {
             this.containingColumn = this.getContainingColumn();
-            this.drag = new jetspeed.widget.LayoutDragMoveSource( this );
-            this.drag.setDragHandle( this.layoutMoveContainer.domNode );
+            this.drag = new dojo.dnd.Moveable( this, {handle: this.layoutMoveContainer.domNode});
         },
 
         // methods
@@ -201,8 +201,8 @@
                 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();
+                    //var moveLayoutContentManager = new jetspeed.widget.MoveLayoutContentManager(
this.layoutId, afterDragColumnRowInfo.layout, afterDragColumnRowInfo.column, afterDragColumnRowInfo.row,
this.pageEditorWidget );
+                    //moveLayoutContentManager.getContent();
                 }
             }
         },
@@ -253,56 +253,3 @@
 	templateString: '<span class="layoutMoveContainer"><img src="${this.layoutImagesRoot}layout_move.png"></span>'
 
 });
-
-jetspeed.widget.LayoutDragMoveSource = function( /* jetspeed.widget.LayoutEditPane */ layoutEditPane
)
-{
-    this.layoutEditPane = layoutEditPane;
-    this.beforeDragColumnRowInfo = null;
-    this.beforeDragColumn = layoutEditPane.containingColumn;
-    var dragNode = ( ( this.beforeDragColumn != null ) ? this.beforeDragColumn.domNode :
null );
-	dojo.dnd.HtmlDragMoveSource.call( this, dragNode );
-};
-
-dojo.inherits( jetspeed.widget.LayoutDragMoveSource, dojo.dnd.HtmlDragMoveSource );
-
-dojo.lang.extend( jetspeed.widget.LayoutDragMoveSource, {
-	onDragStart: function()
-    {
-        this.beforeDragColumnRowInfo = null;
-        var dragMoveObj = null;
-        if ( this.dragObject != null )
-        {
-            if ( this.beforeDragColumn != null && this.beforeDragColumn.domNode !=
null )
-                this.beforeDragColumnRowInfo = jetspeed.page.getPortletCurrentColumnRow(
this.beforeDragColumn.domNode );
-
-//jetspeed.page.getColumnContainingNode(  );
-
-            dragMoveObj = new jetspeed.widget.LayoutDragMoveObject( this.dragObject, this.type,
this.layoutEditPane, this.beforeDragColumn );
-            if ( this.constrainToContainer )
-            {
-                dragMoveObj.constrainTo( this.constrainingContainer );
-            }
-        }
-		return dragMoveObj;
-	},
-    onDragEnd: function()
-    {
-    }
-});
-
-dojo.declare( "jetspeed.widget.LayoutDragMoveObject", jetspeed.widget.PortletWindowDragMoveObject,
{
-    qualifyTargetColumn: function( /* jetspeed.om.Column */ column )
-    {
-        if ( column == null ) return false;
-        if ( this.disqualifiedColumnIndexes[ column.getPageColumnIndex() ] != null )
-            return false;
-        return true;
-    }
-    },    
-    function( node, type, /* jetspeed.widget.LayoutEditPane */ layoutEditPane, /* jetspeed.om.Column
*/ beforeDragColumn )
-    {
-        this.layoutEditPane = layoutEditPane;
-    
-        this.disqualifiedColumnIndexes = beforeDragColumn.getDescendantColumns();
-    }
-);



---------------------------------------------------------------------
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