Fixed bug #12616: Set recycler height dynamic
authorSteffen Kamper <info@sk-typo3.de>
Tue, 17 Nov 2009 15:45:44 +0000 (15:45 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 17 Nov 2009 15:45:44 +0000 (15:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6448 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/recycler/ext_tables.php
typo3/sysext/recycler/locallang_csh_mod.xml [deleted file]
typo3/sysext/recycler/locallang_db.xml
typo3/sysext/recycler/mod1/index.php
typo3/sysext/recycler/res/js/t3_recycler.js

index 25560de..fd2a8cb 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 
 2009-11-17  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12616: Set recycler height dynamic
        * Fixed bug #12624: Unreplaced marker in login screen of classic skin
 
 2009-11-17  Stanislas Rolland  <typo3@sjbr.ca>
index da61e9c..fcdcc0a 100644 (file)
@@ -8,13 +8,5 @@ if (TYPO3_MODE == 'BE') {
        t3lib_extMgm::addModulePath('web_txrecyclerM1',t3lib_extMgm::extPath ($_EXTKEY).'mod1/');
        t3lib_extMgm::addModule('web','txrecyclerM1','',t3lib_extMgm::extPath($_EXTKEY).'mod1/');
 
-       $GLOBALS['TYPO3_USER_SETTINGS']['columns']['recyclerGridHeight'] = array(
-               'type' => 'text',
-               'label' => 'LLL:EXT:recycler/locallang_db.xml:userSettings.RecyclerHeight',
-               'default' => 600,
-               'csh' => 'tx_recycler_grid_height',
-       );
-       t3lib_extMgm::addFieldsToUserSettings('recyclerGridHeight', 'after:resizeTextareas_Flexible');
-       t3lib_extMgm::addLLrefForTCAdescr('_MOD_user_setup','EXT:recycler/locallang_csh_mod.xml');
 }
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/recycler/locallang_csh_mod.xml b/typo3/sysext/recycler/locallang_csh_mod.xml
deleted file mode 100644 (file)
index ebf2e15..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>\r
-<!-- $Id$ -->\r
-<T3locallang>\r
-    <meta type="array">\r
-        <description>CSH labels</description>\r
-        <type>CSH</type>\r
-        <csh_table>recycler</csh_table>\r
-        <fileId>EXT:recycler/locallang_csh_mod.xml</fileId>\r
-        <labelContext type="array">\r
-        </labelContext>\r
-    </meta>\r
-    <data type="array">\r
-        <languageKey index="default" type="array">\r
-            <label index="option_tx_recycler_grid_height.alttitle">Height of Recycler Grid</label>\r
-            <label index="option_tx_recycler_grid_height.description">Define the height of the recycler grid (in pixels). If the recycler grid does not fit your screen size, try to use a smaller value.</label>\r
-        </languageKey>\r
-    </data>\r
-</T3locallang>
\ No newline at end of file
index beb9b9d..7cdd4f0 100644 (file)
@@ -7,7 +7,6 @@
        <data type="array">
                <languageKey index="default" type="array">
                        <label index="moduleFunction.tx_recycler_modfunc1">Recycler</label>
-                       <label index="userSettings.RecyclerHeight">Height of Recycler Grid</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file
index 4dbf91e..b66eaeb 100644 (file)
@@ -178,7 +178,6 @@ class  tx_recycler_module1 extends t3lib_SCbase {
         * @return      array           The JavaScript configuration
         */
        protected function getJavaScriptConfiguration() {
-               $gridHeight = isset($GLOBALS['BE_USER']->uc['recyclerGridHeight']) && intval($GLOBALS['BE_USER']->uc['recyclerGridHeight']) ? intval($GLOBALS['BE_USER']->uc['recyclerGridHeight']) : 600;
                $configuration = array(
                        'pagingSize' => $this->recordsPageLimit,
                        'showDepthMenu' => 1,
@@ -190,7 +189,6 @@ class  tx_recycler_module1 extends t3lib_SCbase {
                        'deleteDisable' => $this->allowDelete ? 0 : 1,
                        'depthSelection' => $this->getDataFromSession('depthSelection', 0),
                        'tableSelection' => $this->getDataFromSession('tableSelection', 'pages'),
-                       'gridHeight' => $gridHeight,
                );
                return $configuration;
        }
index 2387092..3770df2 100644 (file)
@@ -260,7 +260,6 @@ Recycler.grid = {
                        layout: 'fit',
                        renderTo: Recycler.statics.renderTo,
                        width: '98%',
-                       height: parseInt(Recycler.statics.gridHeight),
                        frame: true,
                        border: true,
                        defaults: {autoScroll: false},
@@ -485,6 +484,9 @@ Ext.ux.plugins.FitToParent = Ext.extend(Object, {
                }
        },
        fitSizeToParent : function() {
+               // Uses the dimension of the current viewport, but removes the document header
+               // and an addtional margin of 40 pixels (e.g. Safari needs this addition)
+               this.fitToElement.setHeight(document.viewport.getHeight() - this.fitToElement.getTop() - 40);
                var pos = this.getPosition(true), size = this.fitToElement
                                .getViewSize();
                this.setSize(size.width - pos[0], size.height - pos[1]);