[FEATURE] devlog: ExtJS integration - fixed a few flaws mentioned by Steffen Mueller... testing-extjs
authorfabien_u <fabien_u@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 16 Nov 2010 20:19:54 +0000 (20:19 +0000)
committerfabien_u <fabien_u@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 16 Nov 2010 20:19:54 +0000 (20:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/devlog/branches/testing-extjs@40296 735d13b6-9817-0410-8766-e36946ffe9aa

Resources/Public/images/icons/application_put.png [new file with mode: 0755]
Resources/Public/images/icons/arrow_rotate_clockwise.png [new file with mode: 0755]
Resources/Public/javascripts/Listing/LogGrid.js
Resources/Public/stylesheets/devlog.css

diff --git a/Resources/Public/images/icons/application_put.png b/Resources/Public/images/icons/application_put.png
new file mode 100755 (executable)
index 0000000..c30cf59
Binary files /dev/null and b/Resources/Public/images/icons/application_put.png differ
diff --git a/Resources/Public/images/icons/arrow_rotate_clockwise.png b/Resources/Public/images/icons/arrow_rotate_clockwise.png
new file mode 100755 (executable)
index 0000000..aa65210
Binary files /dev/null and b/Resources/Public/images/icons/arrow_rotate_clockwise.png differ
index 7cf2e82..7768702 100644 (file)
@@ -51,32 +51,37 @@ TYPO3.Devlog.Listing.LogGrid = Ext.extend(Ext.grid.GridPanel, {
                                {
                                        xtype: 'TYPO3.Devlog.Listing.TimeList',
                                        ref: '../timeList'
-                               },
-                               {
+                               }, {
+                                       xtype: 'tbspacer'
+                               }, {
                                        xtype: 'TYPO3.Devlog.Listing.SeverityList',
                                        ref: '../severityList'
-                               },
-                               {
+                               }, {
+                                       xtype: 'tbspacer'
+                               }, {
                                        xtype: 'TYPO3.Devlog.Listing.ExtensionList',
                                        ref: '../extensionList'
-                               },
-                               {
+                               }, {
+                                       xtype: 'tbspacer'
+                               }, {
                                        xtype: 'TYPO3.Devlog.Listing.PageList',
                                        ref: '../pageList'
-                               },
-                               '-',
-                               {
+                               }, {
+                                       xtype: 'tbfill'
+                               }, {
                                        pressed: false,
                                        enableToggle: true,
+                                       xtype: 'button',
                                        text: TYPO3.Devlog.Language.expand_all_extra_data,
-                                       cls: 'x-btn-text-icon details',
+                                       cls: 'x-btn-text-icon expandall',
                                        toggleHandler: this.ontoggleexpand
-                               },
-                               {
+                               }, {
+                                       xtype: 'tbspacer'
+                               }, {
                                        pressed: false,
                                        enableToggle: true,
                                        text: TYPO3.Devlog.Language.auto_refresh,
-                                       cls: 'x-btn-text-icon details',
+                                       cls: 'x-btn-text-icon reload',
                                        toggleHandler: this.ontoggleautorefresh
                                }
 
@@ -165,16 +170,23 @@ TYPO3.Devlog.Listing.LogGrid = Ext.extend(Ext.grid.GridPanel, {
         * @return void
         */
        ontoggleexpand: function(button, pressed){
+               var expander, row, view, numberOfRows, isCollapsed;
 
-               var view = TYPO3.Devlog.UserInterface.container.logGrid.getView();
-               var numberOfRows = TYPO3.Devlog.Store.LogStore.getCount();
+               view = TYPO3.Devlog.UserInterface.container.logGrid.getView();
+               numberOfRows = TYPO3.Devlog.Store.LogStore.getCount();
 
                for (index = 0; index < numberOfRows; index++) {
-                       var row = view.getRow(index);
-                               var expander = Ext.query('div.x-grid3-row-expander', row)[0];
-                               if (expander) {
+                       row = view.getRow(index);
+                       expander = Ext.query('div.x-grid3-row-expander', row)[0];
+                       isCollapsed = Ext.get(row).hasClass('x-grid3-row-collapsed');
+                       
+                       // expander may be null if there is no extra data on the GUI => no arrow
+                       if (expander) {
+                               if ((pressed && isCollapsed) || (!pressed && !isCollapsed)) {
                                        TYPO3.Devlog.Utils.fireEvent('mousedown', expander);
                                }
+                               
+                       }
                }
        },
 
@@ -289,58 +301,52 @@ TYPO3.Devlog.Listing.LogGrid = Ext.extend(Ext.grid.GridPanel, {
                                id: 'uid',
                                dataIndex: 'uid',
                                header: 'UID',
-                               width: 30,
+                               width: 50,
+                               align: 'center',
                                sortable: true
-                       },
-                       {
+                       }, {
                                id: 'crdate',
                                dataIndex: 'crdate',
                                header: TYPO3.Devlog.Language.crdate,
                                sortable: true,
                                renderer: this._renderCrdate
-                       },
-                       {
+                       }, {
                                id: 'severity',
                                dataIndex: 'severity',
                                header: TYPO3.Devlog.Language.severity,
                                renderer: this._renderSeverity,
-                               width: 60,
+                               width: 80,
+                               align: 'center',
                                sortable: true
-                       },
-                       {
+                       }, {
                                id: 'extkey',
                                dataIndex: 'extkey_formatted',
                                header: TYPO3.Devlog.Language.extkey,
                                sortable: true
-                       },
-                       {
+                       }, {
                                id: 'msg',
                                dataIndex: 'msg',
                                header: TYPO3.Devlog.Language.msg,
                                renderer: this._renderMessage
-                       },
-                       {
+                       }, {
                                id: 'location',
                                dataIndex: 'location',
                                header: TYPO3.Devlog.Language.location,
                                width: 200,
                                renderer: this._renderLocation
-                       },
-                       {
+                       }, {
                                id: 'page',
                                dataIndex: 'pid_formatted',
                                header: TYPO3.Devlog.Language.pid,
-                               width: 50,
+//                             width: 50,
                                sortable: true
-                       },
-                       {
+                       }, {
                                id: 'user',
                                dataIndex: 'cruser_formatted',
                                header: TYPO3.Devlog.Language.cruser_id,
                                width: 50,
                                sortable: true
-                       },
-                       {
+                       }, {
                                id: 'line',
                                dataIndex: 'line',
                                header: TYPO3.Devlog.Language.line,
index 877f9ec..16908ea 100644 (file)
@@ -1,6 +1,18 @@
-.x-selectable, .x-selectable * {
-               -moz-user-select: text!important;
-               -khtml-user-select: text!important;
+.x-grid3-row td,
+.x-grid3-summary-row td,
+.x-selectable {
+       -moz-user-select: text!important;
+       -khtml-user-select: text!important;
+       cursor: text;
+}
+
+.x-grid3-row-expander {
+       cursor: pointer;
+}
+
+.x-selectable * {
+       -moz-user-select: text!important;
+       -khtml-user-select: text!important;
 }
 
 /* Makes column msg beeing wrapped */
@@ -64,6 +76,14 @@ td.x-grid3-td-location div.x-grid3-cell-inner {
        background-image:url(../images/icons/error.png) !important;
 }
 
+.expandall {
+       background-image:url(../images/icons/application_put.png) !important;
+}
+
+.reload {
+       background-image:url(../images/icons/arrow_rotate_clockwise.png) !important;
+}
+
 .page {
        background-image:url(../../../../../../typo3/sysext/t3skin/images/icons/apps/pagetree-page-default.png) !important;
 }
@@ -72,6 +92,11 @@ td.x-grid3-td-location div.x-grid3-cell-inner {
        background-image:url(../../../../../../typo3/sysext/t3skin/images/icons/status/status-icon-missing.png) !important;
 }
 
+.x-btn-text-icon {
+       background-repeat: no-repeat;
+       background-position:3px 50%;
+}
+
 .loading {
        background-image: url(../images/icons/loading.gif);
        background-repeat: no-repeat;