portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r568555 [3/3] - in /portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed: desktop/core.js desktop/core.src.js widget/PortletWindow.js widget/PortletWindow.src.js
Date Wed, 22 Aug 2007 10:57:49 GMT
Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.src.js?rev=568555&r1=568554&r2=568555&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.src.js
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/desktop/core.src.js
Wed Aug 22 03:57:49 2007
@@ -324,16 +324,43 @@
     navToPageUrl = currentPage.makePageUrl( navToPageUrl );
     if ( navToPageUrl != null )
     {
+        jetspeed.updatePageBegin();
         var currentLayoutDecorator = currentPage.layoutDecorator;
         var currentEditMode = currentPage.editMode;
         currentPage.destroy();
         var newJSPage = new jetspeed.om.Page( currentLayoutDecorator, navToPageUrl, (! djConfig.preventBackButtonFix
&& ! backOrForwardPressed), currentEditMode );
         jetspeed.page = newJSPage;
-        newJSPage.retrievePsml();
+        newJSPage.retrievePsml( new jetspeed.om.PageContentListenerCreateWidget( true ) );
         window.focus();   // to prevent IE from sending alt-arrow to tab container
     }
 };
 
+jetspeed.updatePageBegin = function()
+{
+    if ( dojo.render.html.ie60 )
+    {
+        document.body.attachEvent( "onclick", jetspeed.ie6StopMouseEvts );
+        document.body.setCapture();
+    }
+}
+jetspeed.ie6StopMouseEvts = function( e )
+{
+    if ( e )
+    {
+        e.cancelBubble = true;
+        e.returnValue = false;
+    }
+}
+jetspeed.updatePageEnd = function()
+{
+    if ( dojo.render.html.ie60 )
+    {
+        document.body.releaseCapture();
+        document.body.detachEvent( "onclick", jetspeed.ie6StopMouseEvts );
+        document.body.releaseCapture();
+    }
+}
+
 // ... jetspeed.doRender
 jetspeed.doRender = function( bindArgs, portletEntityId )
 {
@@ -355,11 +382,11 @@
 };
 
 // ... jetspeed.doRenderAll
-jetspeed.doRenderAll = function( url, windowArray, isPageLoad )
+jetspeed.doRenderAll = function( url, windowArray, isPageLoad, isUpdatePage )
 {
     var debugMsg = jetspeed.debug.doRenderDoAction;
     var debugPageLoad = jetspeed.debug.pageLoad && isPageLoad;
-    if ( ! windowArray )
+    if ( ! windowArray || windowArray == null )
         windowArray = jetspeed.page.getPortletArray();
     var renderMsg = "";
     var suppressGetActions = true;
@@ -981,14 +1008,17 @@
 };
 
 // ... jetspeed.om.PageContentListenerCreateWidget
-jetspeed.om.PageContentListenerCreateWidget = function()
+jetspeed.om.PageContentListenerCreateWidget = function( isUpdatePage )
 {
+    if ( typeof isUpdatePage == "undefined" )
+        isUpdatePage = false ;
+    this.isUpdatePage = isUpdatePage ;
 };
 jetspeed.om.PageContentListenerCreateWidget.prototype =
 {
     notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, /* Page */
page )
     {
-        page.loadFromPSML( data );
+        page.loadFromPSML( data, this.isUpdatePage );
     },
     notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl,
/* Page */ page )
     {
@@ -1152,7 +1182,7 @@
         jetspeed.url.retrieveContent( { url: psmlUrl, mimetype: mimetype }, pageContentListener,
this, jetspeed.debugContentDumpIds );
     },
 
-    loadFromPSML: function( psml )
+    loadFromPSML: function( psml, isUpdatePage )
     {
         // parse PSML
         var parsedRootLayoutFragment = this._parsePSML( psml );
@@ -1211,7 +1241,7 @@
             // render portlets
             if ( windowsToRender && windowsToRender.length > 0 )
             {
-                jetspeed.doRenderAll( null, windowsToRender, true );
+                jetspeed.doRenderAll( null, windowsToRender, true, isUpdatePage );
             }
 
             // initialize portlet window state
@@ -1227,7 +1257,7 @@
             }
 
             // load menus
-            this.retrieveMenuDeclarations( true, initiateEditMode );
+            this.retrieveMenuDeclarations( true, initiateEditMode, isUpdatePage );
     
             // render page buttons
             this.renderPageControls();
@@ -1247,6 +1277,10 @@
 
                 this._portletsInitializeWindowState( portletsByPageColumn[ "z" ] );
             }
+            if ( isUpdatePage )
+            {
+                jetspeed.updatePageEnd() ;
+            }
         }
     },
     _parsePSML: function( psml )
@@ -2340,9 +2374,9 @@
         }
         return menuNamesArray;
     },
-    retrieveMenuDeclarations: function( includeMenuDefs, initiateEditMode )
+    retrieveMenuDeclarations: function( includeMenuDefs, initiateEditMode, isUpdatePage )
     {
-        contentListener = new jetspeed.om.MenusAjaxApiContentListener( includeMenuDefs, initiateEditMode
);
+        contentListener = new jetspeed.om.MenusAjaxApiContentListener( includeMenuDefs, initiateEditMode,
isUpdatePage );
 
         this.clearMenus();
 
@@ -3730,7 +3764,7 @@
         {
             if ( jetspeed.debug.doRenderDoAction )
                 dojo.debug( "PortletActionContentListener calling doRenderAll=" + renderUrl
);
-            jetspeed.doRenderAll( renderUrl );
+            jetspeed.doRenderAll( renderUrl, null, false, false );
         }
         else
         {
@@ -4005,10 +4039,11 @@
 });
 
 // ... jetspeed.om.MenusAjaxApiContentListener
-jetspeed.om.MenusAjaxApiContentListener = function( /* boolean */ includeMenuDefs, /* boolean
*/ initiateEditMode )
+jetspeed.om.MenusAjaxApiContentListener = function( /* boolean */ includeMenuDefs, /* boolean
*/ initiateEditMode, /* boolean */ isUpdatePage )
 {
     this.includeMenuDefs = includeMenuDefs;
     this.initiateEditMode = initiateEditMode;
+    this.isUpdatePage = isUpdatePage ;
 };
 dojo.inherits( jetspeed.om.MenusAjaxApiContentListener, jetspeed.om.MenuAjaxApiContentListener);
 dojo.lang.extend( jetspeed.om.MenusAjaxApiContentListener,
@@ -4052,6 +4087,8 @@
             jetspeed.notifyRetrieveAllMenusFinished();
         if ( this.initiateEditMode )
             jetspeed.editPageInitiate();
+        if ( this.isUpdatePage )
+            jetspeed.updatePageEnd();
     }
 });
 

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.js?rev=568555&r1=568554&r2=568555&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.js
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.js
Wed Aug 22 03:57:49 2007
@@ -1744,6 +1744,9 @@
 }
 };
 dojo.extend(dojo.dnd.Moveable,{onMouseDown:function(e){
+if(e&&e.button==2){
+return;
+}
 if(this.mover!=null){
 this.mover.destroy();
 }else{

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.src.js?rev=568555&r1=568554&r2=568555&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.src.js
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/PortletWindow.src.js
Wed Aug 22 03:57:49 2007
@@ -2526,6 +2526,7 @@
 	onMouseDown: function(e){
 		// summary: event processor for onmousedown, creates a Mover for the node
 		// e: Event: mouse event
+        if ( e && e.button == 2 ) return ;
         if ( this.mover != null )
         {
             this.mover.destroy();



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