File tree 2 files changed +32
-3
lines changed
src/Symfony/Bundle/WebProfilerBundle 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
748
748
return ;
749
749
}
750
750
751
- // hide rows that don't match the current filters
751
+ /* hide rows that don't match the current filters */
752
752
let numVisibleRows = 0 ;
753
753
logs .querySelectorAll (' tbody tr' ).forEach ((row ) => {
754
754
if (' all' !== selectedType && selectedType !== row .getAttribute (' data-type' )) {
@@ -773,11 +773,11 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
773
773
document .querySelector (' table.logs' ).style .display = 0 === numVisibleRows ? ' none' : ' table' ;
774
774
document .querySelector (' .no-logs-message' ).style .display = 0 === numVisibleRows ? ' block' : ' none' ;
775
775
776
- // update the selected totals of all filters
776
+ /* update the selected totals of all filters */
777
777
document .querySelector (' #log-filter-priority .filter-active-num' ).innerText = (priorities .length === selectedPriorities .length ) ? ' All' : selectedPriorities .length ;
778
778
document .querySelector (' #log-filter-channel .filter-active-num' ).innerText = (channels .length === selectedChannels .length ) ? ' All' : selectedChannels .length ;
779
779
780
- // update the currently selected "log type" tab
780
+ /* update the currently selected "log type" tab */
781
781
document .querySelectorAll (' #log-filter-type li' ).forEach ((tab ) => tab .classList .remove (' active' ));
782
782
document .querySelector (` #log-filter-type input[value="${ selectedType} "]` ).parentElement .classList .add (' active' );
783
783
},
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony \Bundle \WebProfilerBundle \Tests \Resources ;
13
+
14
+ use PHPUnit \Framework \TestCase ;
15
+
16
+ /**
17
+ * Make sure we can minify content in toolbar.
18
+ * @author Tobias Nyholm <tobias.nyholm@gmail.com>
19
+ */
20
+ class MinifyTest extends TestCase
21
+ {
22
+ public function testNoSingleLineComments ()
23
+ {
24
+ $ dir = dirname (__DIR__ , 2 ).'/Resources/views/Profiler ' ;
25
+ $ message = 'There cannot be any single line comment in this file. Consider using multiple line comment. ' ;
26
+ $ this ->assertTrue (2 === substr_count (file_get_contents ($ dir . '/base_js.html.twig ' ), '// ' ), $ message );
27
+ $ this ->assertTrue (0 === substr_count (file_get_contents ($ dir .'/toolbar.css.twig ' ), '// ' ), $ message );
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments