Fixed bug #11635: Remove "Preview of workspace ..." box when in workspace preview...
authortolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Sat, 25 Dec 2010 09:27:07 +0000 (09:27 +0000)
committertolleiv <tolleiv@743128fe-103e-dd11-99c4-001b210b3e58>
Sat, 25 Dec 2010 09:27:07 +0000 (09:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/CoreProjects/workspaces/workspaces/trunk@3560 743128fe-103e-dd11-99c4-001b210b3e58

typo3/sysext/workspaces/ChangeLog
typo3/sysext/workspaces/Resources/Private/Templates/Preview/Preview.html

index eaa9a87..a55b39f 100644 (file)
@@ -1,5 +1,6 @@
 2010-12-25  Tolleiv Nietsch <typo3@tolleiv.de>
 
+       * Fixed bug #11635: Remove "Preview of workspace ..." box when in workspace preview module
        * Fixed bug #11657: singleView should not have depth and mass-action combos
        * Fixed bug #11600: [All] tab in ws-module should not have action-buttons
 
index 7a0d38e..42623f8 100644 (file)
@@ -2,11 +2,18 @@
        document.domain =  '{backendDomain}';
 
                // @todo redirect to split module if this is opened standalone
-       parent.resize(
-               Math.max(
-                       Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
-                       Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
-                       Math.max(document.body.clientHeight, document.documentElement.clientHeight)
-               )
-       );
+
+               // make sure we're in the workspace preview module 
+       if (typeof parent.resize == 'function') {
+               parent.resize(
+                       Math.max(
+                               Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
+                               Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
+                               Math.max(document.body.clientHeight, document.documentElement.clientHeight)
+                       )
+               );
+
+               var element = document.getElementById('typo3-previewInfo');
+               element.parentNode.removeChild(element);
+       }
 </script>