portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r602412 - /portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js
Date Sat, 08 Dec 2007 09:32:56 GMT
Author: smilek
Date: Sat Dec  8 01:32:56 2007
New Revision: 602412

URL: http://svn.apache.org/viewvc?rev=602412&view=rev
Log:
The following revision comments are from branches/JETSPEED-2.1.3 revisions which were not
individually checked-in to trunk
=== ---------------------------------------------------------------- ===
[ from branches/JETSPEED-2.1.3 r595411 ] | smilek | 2007-11-15 13:06:54 -0700 (Thu, 15 Nov
2007) | 1 line

major improvements to page editor (UI, config options, flow, no action layouts); support for
create-new-page-on-edit
=== ---------------------------------------------------------------- ===
[ from branches/JETSPEED-2.1.3 r588405 ] | smilek | 2007-10-25 18:00:39 -0600 (Thu, 25 Oct
2007) | 1 line

in endDragging(), added call to jetspeed.page.onBrowserWindowResize() if browser is IE6
=== ---------------------------------------------------------------- ===
[ from branches/JETSPEED-2.1.3 r583998 ] | smilek | 2007-10-11 18:36:12 -0600 (Thu, 11 Oct
2007) | 1 line

continuation of desktop overhaul
=== ---------------------------------------------------------------- ===
[ from branches/JETSPEED-2.1.3 r578909 ] | smilek | 2007-09-24 13:08:29 -0600 (Mon, 24 Sep
2007) | 1 line

desktop overhaul - PortletWindow is no longer a dojo widget
=== ---------------------------------------------------------------- ===

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

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js?rev=602412&r1=602411&r2=602412&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/javascript/jetspeed/widget/LayoutEditPane.src.js
Sat Dec  8 01:32:56 2007
@@ -43,23 +43,34 @@
         layoutId: null,
         layoutDefinitions: null,
 
+        layoutColumn: null,
+        layoutInfo: null,
+        parentLayoutInfo: null,
+
         // template parameters
         pageEditContainer: null,
         pageEditLNContainer: null,
         layoutNameSelect: null,
+        buttonGroupRight: null,
         deleteLayoutButton: null,
-        editModeLayoutMoveButton: null,
-        editModeNormalButton: null,
+        editMoveModeButton: null,
+        editMoveModeExitButton: null,
         layoutMoveContainer: null,
-        
+
         // fields
 		isContainer: true,
         widgetsInTemplate: true,
         isLayoutPane: true,
+        depth: null,
 
         // drag variables
-        containingColumn: null,
-        windowPositionStatic: true,
+        drag: null,
+        posStatic: true,
+
+        // move modes
+        moveModeLayoutRelative: "movemode_layout",
+        moveModes: [ "movemode_layout", "movemode_portlet" ],
+
 
         // protocol - dojo.widget.Widget create
 
@@ -86,15 +97,27 @@
             return currentLayout;
         },
 
-        postCreate: function( args, fragment, parent )
+        destroy: function()
         {
-            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";
+            var jsObj = jetspeed;
+            if ( this.layoutColumn )
+            {
+                jsObj.ui.evtDisconnect( "after", this.layoutColumn, "layoutDepthChanged",
this, "syncLayoutDepth" );
             }
+            jsObj.widget.LayoutEditPane.superclass.destroy.call( this );
+        },
+
+        postCreate: function( args, fragment, parent )
+        {
+            var jsObj = jetspeed;
+            var djObj = dojo;
+            var djH = djObj.html;
+
+            var peProto = jsObj.widget.PageEditor.prototype;
+            if ( this.pageEditContainer != null )
+                djH.addClass( this.pageEditContainer, peProto.styleBaseAdd );
+            if ( this.pageEditLNContainer != null )
+                djH.addClass( this.pageEditLNContainer, peProto.styleDetailAdd );
 
             if ( this.layoutNameSelect != null )
             {
@@ -122,20 +145,48 @@
                 }
                 this.layoutNameSelect.dataProvider.setData( layoutNameData );
             }
-            this.syncButtons();
+
+            var currentLayout = this.getCurrentLayout();
+            var isNA = ( currentLayout == null || currentLayout.layoutActionsDisabled );
+            var cL_NA_ED = false;
+            if ( isNA )
+            {
+                cL_NA_ED = peProto.canL_NA_ED(jsObj,peProto);
+                if ( cL_NA_ED ) isNA = false;
+                else this["_n"+"a"] = true;
+            }
+
+            this.syncButtons( this.startInEditModeMove );
+            delete this.startInEditModeMove;
             
-            this.layoutMoveContainer = dojo.widget.createWidget( "jetspeed:LayoutEditPaneMoveHandle",
+            this.layoutMoveContainer = djObj.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 dojo.dnd.Moveable( this, {handle: this.layoutMoveContainer.domNode});
+            var addPortletPerm = ( ! isNA && peProto.checkPerm(peProto.PM_P_AD,jsObj,peProto)
);
+            if ( ! addPortletPerm && this.addPortletButton )
+            {
+                this.addPortletButton.domNode.style.display = "none";
+            }
+            var colSizePerm = peProto.checkPerm(peProto.PM_L_CS,jsObj,peProto);
+            if ( colSizePerm && isNA )
+            {
+                colSizePerm = peProto.checkPerm(peProto.PM_L_NA_CS,jsObj,peProto);
+            }
+            if ( ! colSizePerm && this.columnSizeButton )
+            {
+                this.columnSizeButton.domNode.style.display = "none";
+            }
+
+            this.syncLayoutDepth( peProto, jsObj );
+
+            if ( this.layoutColumn )
+            {
+                jsObj.ui.evtConnect( "after", this.layoutColumn, "layoutDepthChanged", this,
"syncLayoutDepth", djObj.event );
+            }
         },
 
         // methods
@@ -151,16 +202,23 @@
         },
         addPortlet: function()
         {
-            var jspage = jetspeed.page.getPagePathAndQuery();
-            jspage = jetspeed.url.addQueryParameter( jspage, jetspeed.id.PG_ED_PARAM, "true",
true );
-            jetspeed.page.addPortletInitiate( this.layoutId, jspage.toString() );
+            var jsObj = jetspeed;
+            var jspage = jsObj.page.getPagePathAndQuery();
+            jspage = jsObj.url.addQueryParameter( jspage, jsObj.id.PG_ED_PARAM, "true", true
);
+            jsObj.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 );
+                var lns = this.layoutNameSelect;
+                var layoutName = null;
+                if ( lns )
+                    layoutName = lns.getValue();
+                if ( layoutName == null )
+                    layoutName = currentLayout.name;
+                var addLayoutContentManager = new jetspeed.widget.AddLayoutContentManager(
this.layoutId, layoutName, this.pageEditorWidget );
                 addLayoutContentManager.getContent();
             }
             else
@@ -172,73 +230,291 @@
         {
             this.pageEditorWidget.deleteLayout( this.layoutId );
         },
-        editModeNormal: function()
+        editMoveModeExit: function()
         {
-            this.pageEditorWidget.editModeNormal();
-            if ( this.editModeLayoutMoveButton != null )
-                this.editModeLayoutMoveButton.domNode.style.display = "block";
-            if ( this.editModeNormalButton != null )
-                this.editModeNormalButton.domNode.style.display = "none";
+            this.pageEditorWidget.editMoveModeExit();
+            if ( this.editMoveModeButton != null )
+                this.editMoveModeButton.domNode.style.display = "block";
+            if ( this.editMoveModeExitButton != null )
+                this.editMoveModeExitButton.domNode.style.display = "none";
         },
-        editModeLayoutMove: function()
+        editMoveModeStart: function()
         {
-            this.pageEditorWidget.editModeLayoutMove();
-            if ( this.editModeLayoutMoveButton != null )
-                this.editModeLayoutMoveButton.domNode.style.display = "none";
-            if ( this.editModeNormalButton != null )
-                this.editModeNormalButton.domNode.style.display = "block";
+            this.pageEditorWidget.editMoveModeStart();
+            if ( this.editMoveModeButton != null )
+                this.editMoveModeButton.domNode.style.display = "none";
+            if ( this.editMoveModeExitButton != null )
+                this.editMoveModeExitButton.domNode.style.display = "block";
         },
 
-        endDragging: function()
+        _enableMoveMode: 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 lmc = this.layoutMoveContainer;
+            if ( ! lmc ) return;
+            mmOk = (this.drag != null);
+            if ( mmOk )
             {
-                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 ) )
+                mmOk = ( ! this._na );
+                if ( ! mmOk )
                 {
-                    //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 jsObj = jetspeed;
+                    var peProto = jsObj.widget.PageEditor.prototype;
+                    var mvNATL = peProto.checkPerm(peProto.PM_L_NA_TLMV,jsObj,peProto);
+                    var layoutColumnDomNode = ( this.layoutColumn ? this.layoutColumn.domNode
: null  );
+                    if ( mvNATL && layoutColumnDomNode )
+                    {
+                        var parentCol = jsObj.page.getColFromColNode( layoutColumnDomNode.parentNode
);
+                        if ( parentCol && parentCol.layoutActionsDisabled == false
)
+                            mmOk = true;
+                    }
                 }
             }
+            lmc.domNode.style.display = ( mmOk ? "block" : "none" );
+        },
+        _disableMoveMode: function()
+        {
+            var lmc = this.layoutMoveContainer;
+            if ( ! lmc ) return;
+            lmc.domNode.style.display = "none";
         },
 
-        getContainingColumn: function()
+        initializeDrag: function()
+        {
+            var layoutCol = this.layoutColumn;
+            if ( layoutCol != null && layoutCol.domNode != null )
+            {
+                this.dragStartStaticWidth = layoutCol.domNode.style.width;
+                this.drag = new dojo.dnd.Moveable( this, {handle: this.layoutMoveContainer.domNode
});
+            }
+        },
+        
+        startDragging: function( e, moveableObj, djObj, jsObj )
         {
-            return jetspeed.page.getColumnContainingNode( this.domNode );
+            var dragLayoutColumn = this.layoutColumn;
+            if ( dragLayoutColumn != null )
+            {
+                var dragNode = dragLayoutColumn.domNode;
+                if ( dragNode )
+                {
+                    if ( this.buttonGroupRight )
+                        this.buttonGroupRight.style.display = "none";
+                    var notifyOnAbsolute = true;
+
+                    var peProto = jsObj.widget.PageEditor.prototype;
+                    var cL_NA_ED = peProto.canL_NA_ED(jsObj,peProto);
+
+                    var layoutDepthMax = peProto.getLDepthPerm( jsObj );
+                    var childDepth = dragLayoutColumn.getLayoutMaxChildDepth();
+                    var layoutDepth = dragLayoutColumn.getLayoutDepth();
+                    var maxDragDepth = layoutDepthMax;
+                    if ( childDepth > layoutDepth )
+                        maxDragDepth = Math.max( (layoutDepthMax - (childDepth - layoutDepth)),
layoutDepth );
+                    
+                    moveableObj.beforeDragColRowInfo = jsObj.page.getPortletCurColRow( dragNode
);
+                    moveableObj.node = dragNode;
+                    var dragLayoutColInfo = { col: dragLayoutColumn, maxdepth: maxDragDepth
};
+		            moveableObj.mover = new djObj.dnd.Mover( this, dragNode, dragLayoutColInfo,
cL_NA_ED, moveableObj, e, notifyOnAbsolute, djObj, jsObj );
+                }
+            }
+        },
+
+        dragChangeToAbsolute: function( moverObj, layoutColNode, mbLayoutColNode, djObj,
jsObj )
+        {
+            var mbLayoutColNodeFresh = djObj.getMarginBox( layoutColNode, null, jsObj );
+            //dojo.debug( "dragChangeToAbsolute - passed-mb=" + jsObj.printobj( mbLayoutColNode
) + "  fresh-mb=" + jsObj.printobj( mbLayoutColNodeFresh ) );
+            var reduceWidth = 400 - mbLayoutColNode.w;
+            if ( reduceWidth < 0 )
+            {
+                mbLayoutColNode.l = mbLayoutColNode.l + ( reduceWidth * -1 );  // ( mbLayoutColNode.w
+ reduceWidth );
+                mbLayoutColNode.w = 400;
+                djObj.setMarginBox( layoutColNode, mbLayoutColNode.l, null, mbLayoutColNode.w,
null, null, jsObj );
+            }
+            
+            if ( jsObj.UAie )
+            {
+                var bgIframeNode = this.pageEditorWidget.bgIframe.iframe;
+                this.domNode.appendChild( bgIframeNode );
+                bgIframeNode.style.display = "block";
+                djObj.setMarginBox( bgIframeNode, null, null, null, mbLayoutColNode.h, null,
jsObj );
+                //djObj.debug( "layout bgIframe mb: " + jsObj.printobj( djObj.getMarginBox(
bgIframeNode, null, jsObj ) ) );
+            }
+        },
+
+        endDragging: function( posObj )
+        {
+            var jsObj = jetspeed;
+            var djObj = dojo;
+            var layoutCol = this.layoutColumn;
+            if ( this.drag == null || layoutCol == null || layoutCol.domNode == null ) return;
+            var dNode = layoutCol.domNode;
+            dNode.style.position = "static";
+            dNode.style.width = this.dragStartStaticWidth;
+            dNode.style.left = "auto";
+            dNode.style.top = "auto";
+
+            if ( this.buttonGroupRight )
+                this.buttonGroupRight.style.display = "block";
+
+            if ( jsObj.UAie )
+            {
+                this.pageEditorWidget.bgIframe.iframe.style.display = "none";
+                if ( jsObj.UAie6 )
+                    jsObj.page.onBrowserWindowResize();   // force resize of descendent portlet
windows
+            }
+
+            var beforeDragColRowInfo = this.drag.beforeDragColRowInfo;
+            var afterDragColRowInfo = jsObj.page.getPortletCurColRow( dNode );
+            if ( beforeDragColRowInfo != null && afterDragColRowInfo != null )
+            {
+                var ind = jsObj.debugindent;
+                //djObj.hostenv.println( "move-layout[" + this.layoutId + " / " + dNode.id
+ "]" );
+                //djObj.hostenv.println( ind + "before (col=" + beforeDragColRowInfo.column
+ " row=" + beforeDragColRowInfo.row + " layout=" + beforeDragColRowInfo.layout + ")" );
+                //djObj.hostenv.println( ind + "before-" + jetspeed.debugColumn( beforeDragColRowInfo.columnObj,
true ) );
+                //djObj.hostenv.println( ind + "after (col=" + afterDragColRowInfo.column
+ " row=" + afterDragColRowInfo.row + " layout=" + afterDragColRowInfo.layout + ")" );
+                //djObj.hostenv.println( ind + "after-" + jetspeed.debugColumn( afterDragColRowInfo.columnObj,
true ) );
+
+                if ( afterDragColRowInfo != null && ( afterDragColRowInfo.row !=
beforeDragColRowInfo.row || afterDragColRowInfo.column != beforeDragColRowInfo.column || afterDragColRowInfo.layout
!= beforeDragColRowInfo.layout ) )
+                {
+                    var moveLayoutContentManager = new jsObj.widget.MoveLayoutContentManager(
this.layoutId, afterDragColRowInfo.layout, afterDragColRowInfo.column, afterDragColRowInfo.row,
this.pageEditorWidget );
+                    moveLayoutContentManager.getContent();
+                }
+            }
+            jsObj.ui.updateChildColInfo();
+        },
+
+        getLayoutColumn: function()
+        {
+            return this.layoutColumn;
         },
         getPageColumnIndex: function()
         {
-            return jetspeed.page.getColumnIndexContainingNode( this.domNode );
+            if ( this.layoutColumn )
+            {
+                var parentColObj = jetspeed.page.getColWithNode( this.layoutColumn.domNode
);
+                if ( parentColObj != null )
+                    return parentColObj.getPageColumnIndex();
+            }
+            return null;
+        },
+        _getLayoutInfoMoveable: function()
+        {
+            return this.layoutInfo;
         },
-        
-        editModeRedisplay: function()
+        _getWindowMarginBox: function( layoutColumnLayoutInfo, jsObj )
+        {
+            if ( this.layoutColumn )
+            {
+                var parentLayoutInfo = this.parentLayoutInfo;
+                if ( jsObj.UAope && parentLayoutInfo == null )  // needs parentNode
layout-info 
+                {
+                    var pageLayoutInfo = jsObj.page.layoutInfo;
+                    var parentColIndex = jsObj.page.getColIndexForNode( this.layoutColumn.domNode
);
+                    if ( parentColIndex != null )
+                    {
+                        var parentCol = jsObj.page.columns[parentColIndex];
+                        if ( parentCol.layoutHeader )
+                            parentLayoutInfo = pageLayoutInfo.columnLayoutHeader;
+                        else
+                            parentLayoutInfo = pageLayoutInfo.column;
+                    }
+                    else
+                    {
+                        parentLayoutInfo = pageLayoutInfo.columns;
+                    }
+                    this.parentLayoutInfo = parentLayoutInfo;
+                }
+                return jsObj.ui.getMarginBox( this.layoutColumn.domNode, layoutColumnLayoutInfo,
parentLayoutInfo, jsObj );
+            }
+            return null;
+        },
+
+        editModeRedisplay: function( moveModeIsEnabled )
         {
             this.show();
-            this.syncButtons();
+            this.syncButtons( moveModeIsEnabled );
         },
-        syncButtons: function()
+        syncButtons: function( moveModeIsEnabled )
         {
+            var isNA = this._na;
+            var mmB = this.editMoveModeButton;
+            var mmEB = this.editMoveModeExitButton;
+            var dLB = this.deleteLayoutButton;
+            this._delEnabled = false;
             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";
+                var mmStartBtn = "none", mmExitBtn = "none";
+                if ( ! isNA )
+                {
+                    mmStartBtn = moveModeIsEnabled ? "none" : "block";
+                    mmExitBtn = moveModeIsEnabled ? "block" : "none";
+                }
+                if ( mmB )
+                    mmB.domNode.style.display = mmStartBtn;
+                if ( mmEB )
+                    mmEB.domNode.style.display = mmExitBtn;
+                if ( dLB )
+                    dLB.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";
+                if ( mmB )
+                    mmB.domNode.style.display = "none";
+                if ( mmEB )
+                    mmEB.domNode.style.display = "none";
+                if ( dLB )
+                {
+                    if ( isNA )
+                    {
+                        var jsObj = jetspeed;
+                        var layoutColNode = null;
+                        var layoutCol = this.getLayoutColumn();
+                        if ( layoutCol )
+                            layoutColNode = layoutCol.domNode;
+                        else if ( this.isRootLayout )
+                            layoutColNode = dojo.byId( jsObj.id.COLUMNS );
+                        if ( layoutColNode )
+                        {
+                            if ( jsObj.page.columnsEmptyCheck( layoutColNode ) )
+                                isNA = false;   // allow delete if layout is empty
+                        }
+                    }
+                    this._delEnabled = ( ! isNA );
+                    dLB.domNode.style.display = ( isNA ? "none" : "block" );
+                }
+            }
+        },
+        syncLayoutDepth: function( peProto, jsObj )
+        {
+            if ( ! jsObj ) jsObj = jetspeed;
+            if ( ! peProto ) peProto = jsObj.widget.PageEditor.prototype;
+
+            var isNA = this._na;
+            var chgLayoutPerm = ( ( ! isNA || this._delEnabled ) && peProto.checkPerm(
peProto.PM_L_N, jsObj, peProto ) );
+            if ( this.changeLayoutButton )
+                this.changeLayoutButton.domNode.style.display = ( chgLayoutPerm ? "block"
: "none" );
+
+            if ( this.layoutColumn )
+                this.depth = this.layoutColumn.getLayoutDepth();
+            
+            var layoutDepthMax = peProto.getLDepthPerm( jsObj );
+            var atMaxDepth = ( this.depth == null || this.depth >= layoutDepthMax );
+            var addLayoutPerm = ( ! atMaxDepth && ! isNA );
+            
+            if ( this.addLayoutButton )
+                this.addLayoutButton.domNode.style.display = ( addLayoutPerm ? "block" :
"none" );
+
+            if ( this.layoutNameSelect )
+            {
+                if ( ! addLayoutPerm && ! chgLayoutPerm )
+                    this.layoutNameSelect.disable();
+                else if ( this.layoutNameSelect.disabled )
+                    this.layoutNameSelect.enable();
             }
+        },
+
+        onBrowserWindowResize: function()
+        {   // called after ie6 resize window
+            // nothing to do here
         }
 	}
 );



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