Author: smilek
Date: Mon Feb 26 22:29:16 2007
New Revision: 512152
URL: http://svn.apache.org/viewvc?view=rev&rev=512152
Log:
added switches to disable window move (drag) and window resize via portlet
decoration properties (these switches are automatically set when viewing a
portlet in print-mode)
Modified:
portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
Modified:
portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js?view=diff&rev=512152&r1=512151&r2=512152
==============================================================================
---
portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
(original)
+++
portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
Mon Feb 26 22:29:16 2007
@@ -27,6 +27,7 @@
dojo.widget.FloatingPane.call( this );
this.widgetType = "PortletWindow";
this.resizable = true;
+ this.movable = true;
this.portletInitialized = false;
this.actionButtons = {};
this.actionMenus = {};
@@ -571,7 +572,13 @@
}
this.windowActionButtonSync();
+
+ if ( this.windowDecorationConfig.windowDisableResize )
+ this.resizable = false;
+ if ( this.windowDecorationConfig.windowDisableMove )
+ this.movable = false;
}
+
// j2o - deletion - initialization of HtmlDragMoveSource and call
to setDragHandle
// equivalent is done in postCreate with
PortletWindowDragMoveSource
@@ -965,12 +972,13 @@
// dojo.widget.Widget create protocol
postCreate: function( args, fragment, parentComp )
{ // FloatingPane 0.3.1 essentially calls resizeTo - this is done in
portletInitDimensions()
- this.drag = new jetspeed.widget.PortletWindowDragMoveSource( this );
- if ( this.constrainToContainer )
+ if ( this.movable )
{
- this.drag.constrainTo();
+ this.drag = new jetspeed.widget.PortletWindowDragMoveSource( this
);
+ if ( this.constrainToContainer )
+ this.drag.constrainTo();
+ this.drag.setDragHandle( this.titleBar );
}
- this.drag.setDragHandle( this.titleBar );
this.domNode.id = this.widgetId; // BOZO: must set the id here - it
gets defensively cleared by dojo
@@ -1516,10 +1524,7 @@
if ( ! this.windowIsSizing )
{
var resizeWidget = this.getResizeHandleWidget();
- if ( ! resizeWidget )
- dojo.raise( "PortletWindow cannot find its resize widget" );
-
- if ( resizeWidget._isSizing )
+ if ( resizeWidget != null && resizeWidget._isSizing )
{
dojo.event.connect( resizeWidget, "_endSizing", this,
"endSizing" );
// NOTE: connecting directly to document.body onmouseup
results in notification for second and subsequent onmouseup
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]