Index: trunk/phase3/resources/mediawiki/mediawiki.debug.js |
— | — | @@ -127,10 +127,15 @@ |
128 | 128 | /** |
129 | 129 | * Returns a jQuery element for a debug-bit div with a for a pane link |
130 | 130 | * |
131 | | - * @param id |
| 131 | + * @param id CSS id snippet. Will be prefixed with 'mw-debug-' |
| 132 | + * @param text Text to show |
| 133 | + * @param count Optional count to show |
132 | 134 | * @return {jQuery} |
133 | 135 | */ |
134 | | - function paneTriggerBitDiv( id, text ) { |
| 136 | + function paneTriggerBitDiv( id, text, count ) { |
| 137 | + if( count ) { |
| 138 | + text = text + ' (' + count + ')'; |
| 139 | + } |
135 | 140 | return $( '<div>' ).attr({ |
136 | 141 | id: 'mw-debug-' + id, |
137 | 142 | 'class': 'mw-debug-bit mw-debug-panelink' |
— | — | @@ -139,15 +144,15 @@ |
140 | 145 | .appendTo( $bits ); |
141 | 146 | } |
142 | 147 | |
143 | | - paneTriggerBitDiv( 'console', 'Console (' + this.data.log.length + ')' ); |
| 148 | + paneTriggerBitDiv( 'console', 'Console', this.data.log.length ); |
144 | 149 | |
145 | | - paneTriggerBitDiv( 'querylist', 'Queries: ' + this.data.queries.length ); |
| 150 | + paneTriggerBitDiv( 'querylist', 'Queries', this.data.queries.length ); |
146 | 151 | |
147 | | - paneTriggerBitDiv( 'debuglog', 'Debug Log (' + this.data.debugLog.length + ' lines)' ); |
| 152 | + paneTriggerBitDiv( 'debuglog', 'Debug Log', this.data.debugLog.length ); |
148 | 153 | |
149 | 154 | paneTriggerBitDiv( 'request', 'Request' ); |
150 | 155 | |
151 | | - paneTriggerBitDiv( 'includes', this.data.includes.length + ' Files Included' ); |
| 156 | + paneTriggerBitDiv( 'includes', 'PHP includes', this.data.includes.length ); |
152 | 157 | |
153 | 158 | bitDiv( 'mwversion' ) |
154 | 159 | .append( $( '<a href="https://www.mediawiki.org//www.mediawiki.org/"></a>' ).text( 'MediaWiki' ) ) |