Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 83235 invoked from network); 27 Feb 2007 06:29:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2007 06:29:40 -0000 Received: (qmail 56406 invoked by uid 500); 27 Feb 2007 06:29:48 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 56373 invoked by uid 500); 27 Feb 2007 06:29:47 -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 56362 invoked by uid 99); 27 Feb 2007 06:29:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2007 22:29:47 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME 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; Mon, 26 Feb 2007 22:29:37 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 30E591A981A; Mon, 26 Feb 2007 22:29:17 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r512152 - /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js Date: Tue, 27 Feb 2007 06:29:17 -0000 To: jetspeed-dev@portals.apache.org From: smilek@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070227062917.30E591A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org