| 1 | <?php |
||
| 15 | class ShowHideColumns extends Simple |
||
| 16 | { |
||
| 17 | protected $name ='showhidecolums'; |
||
| 18 | |||
| 19 | protected $title = 'Столбцы'; |
||
| 20 | |||
| 21 | protected $attributes = [ |
||
| 22 | 'class' => 'btn btn-default', |
||
| 23 | 'id' => 'show-hide-columns' |
||
| 24 | ]; |
||
| 25 | |||
| 26 | protected $url = '#'; |
||
| 27 | |||
| 28 | /** @var string */ |
||
| 29 | protected $msSearchable = false; |
||
| 30 | |||
| 31 | protected $js = |
||
|
|
|||
| 32 | '$("a#show-hide-columns").on("click", function () { |
||
| 33 | $("#grid-%gridName%").jqGrid("columnChooser",{ |
||
| 34 | msel_opts : {searchable : %msSearchable%}, |
||
| 35 | jqModal : true, |
||
| 36 | done: function(perm) { |
||
| 37 | NNX.jqGrid.saveColums($(this),perm); |
||
| 38 | } |
||
| 39 | }); |
||
| 40 | return false; |
||
| 41 | });'; |
||
| 42 | |||
| 43 | public function __construct($options) |
||
| 48 | |||
| 49 | public function setMsSearchable($msSearchable) |
||
| 53 | |||
| 54 | public function getMsSearchable() |
||
| 58 | } |
||
| 59 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.