Completed
Pull Request — master (#14)
by
unknown
04:23
created
src/View/Helper/JqGrid/Grid.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
         $escape = $view->plugin('escapeHtml');
39 39
         $bottomNavigationBar = $this->renderNavigationBar($grid->getBottomNavigationBar());
40 40
         $topNavigationBar = $this->renderNavigationBar($grid->getTopNavigationBar());
41
-        $res = $topNavigationBar['html'] . '<table id="grid-' . $escape($grid->getName()) . '"></table>' . $bottomNavigationBar['html'];
42
-        $buttonsJs = $topNavigationBar['js'] . $bottomNavigationBar['js'];
41
+        $res = $topNavigationBar['html'].'<table id="grid-'.$escape($grid->getName()).'"></table>'.$bottomNavigationBar['html'];
42
+        $buttonsJs = $topNavigationBar['js'].$bottomNavigationBar['js'];
43 43
         /** @var PhpRenderer $view */
44 44
         $view = $this->getView();
45 45
         $config = $this->getGridConfig($grid);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $columnClass = get_class($column);
48 48
             $columnPath = explode('\\', $columnClass);
49 49
             $colName = array_pop($columnPath);
50
-            $helperName = 'nnxGridJqGrid' . $colName;
50
+            $helperName = 'nnxGridJqGrid'.$colName;
51 51
             /** @var string $columnsJqOptions */
52 52
             $config['colModel'][] = $view->$helperName($column);
53 53
         }
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
             foreach ($mutators as $mutator) {
58 58
                 if ($mutator instanceof HighlightMutatorInterface) {
59 59
                     $config['rowattr'] = '%rowAttrFunction%';
60
-                    $rowAttr = 'function(rd) {' .
61
-                        'if(rd.' . $mutator->getDataName() . ') {'
62
-                        . 'return {"class": rd.' . $mutator->getDataName() . '};'
60
+                    $rowAttr = 'function(rd) {'.
61
+                        'if(rd.'.$mutator->getDataName().') {'
62
+                        . 'return {"class": rd.'.$mutator->getDataName().'};'
63 63
                         . '}'
64 64
                         . '}';
65 65
                 }
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
         );
74 74
 
75 75
         $view->headScript()->appendScript('$(function(){'
76
-            . 'var grid = $("#grid-' . $grid->getName() . '").jqGrid('
77
-            . str_replace('"%rowAttrFunction%"', $rowAttr, $options) . ');'
78
-            . str_replace('%gridName%', $grid->getName(), $buttonsJs) . '});');
76
+            . 'var grid = $("#grid-'.$grid->getName().'").jqGrid('
77
+            . str_replace('"%rowAttrFunction%"', $rowAttr, $options).');'
78
+            . str_replace('%gridName%', $grid->getName(), $buttonsJs).'});');
79 79
         return $res;
80 80
     }
81 81
 
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
             /** @var ButtonInterface $button */
99 99
             foreach ($navigationBar->getButtons() as $button) {
100 100
                 $buttonResult = $view->nnxGridJqGridButton($button, $urlVariables);
101
-                $html .=  $buttonResult['html'];
102
-                $js .=  $buttonResult['js'];
101
+                $html .= $buttonResult['html'];
102
+                $js .= $buttonResult['js'];
103 103
             }
104 104
             $html = "<div class='buttons-panel'>$html</div><br>";
105 105
         }
106
-        return ['html' => $html,'js' => $js];
106
+        return ['html' => $html, 'js' => $js];
107 107
     }
108 108
 
109 109
     /**
Please login to merge, or discard this patch.