@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -require_once dirname(__FILE__) . '/controller.class.php'; |
|
| 24 | +require_once dirname(__FILE__).'/controller.class.php'; |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $App = $this->App(); |
| 54 | 54 | $recordClassname = $this->getRecordClassName(); |
| 55 | - $recordSetClassname = $recordClassname . 'Set'; |
|
| 55 | + $recordSetClassname = $recordClassname.'Set'; |
|
| 56 | 56 | |
| 57 | 57 | $recordSet = $App->$recordSetClassname(); |
| 58 | 58 | return $recordSet; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | if ($showLabel) { |
| 104 | 104 | $text = $actions->getTitle(); |
| 105 | 105 | } |
| 106 | - $html = '<li><a class="icon ' . $actions->getIcon() . '"href="' . $actions->url() . '">' . $text . '</a></li>'; |
|
| 106 | + $html = '<li><a class="icon '.$actions->getIcon().'"href="'.$actions->url().'">'.$text.'</a></li>'; |
|
| 107 | 107 | } elseif (is_array($actions)) { |
| 108 | 108 | if (isset($actions['items'])) { |
| 109 | 109 | $items = $actions['items']; |
@@ -116,10 +116,10 @@ discard block |
||
| 116 | 116 | if (isset($actions['icon'])) { |
| 117 | 117 | |
| 118 | 118 | $html = '<li class="dropdown">' |
| 119 | - . '<a href="#" class="' . $actions['icon'] . ' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 119 | + . '<a href="#" class="'.$actions['icon'].' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 120 | 120 | . ($actions['icon'] === 'actions-context-menu'/*Func_Icons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>') |
| 121 | 121 | . '</a>' |
| 122 | - . '<ul class="dropdown-menu dropdown-menu-right ' . Func_Icons::ICON_LEFT_SYMBOLIC . '">' |
|
| 122 | + . '<ul class="dropdown-menu dropdown-menu-right '.Func_Icons::ICON_LEFT_SYMBOLIC.'">' |
|
| 123 | 123 | . $html |
| 124 | 124 | . '</ul>'; |
| 125 | 125 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $recordClassname = $this->getRecordClassName(); |
| 144 | 144 | |
| 145 | - $viewClassname = $recordClassname . 'TableView'; |
|
| 145 | + $viewClassname = $recordClassname.'TableView'; |
|
| 146 | 146 | if (method_exists($Ui, $viewClassname)) { |
| 147 | 147 | $types['table'] = array( |
| 148 | 148 | 'classname' => $viewClassname, |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - $viewClassname = $recordClassname . 'CardsView'; |
|
| 154 | + $viewClassname = $recordClassname.'CardsView'; |
|
| 155 | 155 | if (method_exists($Ui, $viewClassname)) { |
| 156 | 156 | $types['cards'] = array( |
| 157 | 157 | 'classname' => $viewClassname, |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $viewClassname = $recordClassname . 'MapView'; |
|
| 163 | + $viewClassname = $recordClassname.'MapView'; |
|
| 164 | 164 | if (method_exists($Ui, $viewClassname)) { |
| 165 | 165 | $types['map'] = array( |
| 166 | 166 | 'classname' => $viewClassname, |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | foreach ($allViewSections as $viewSection) { |
| 233 | 233 | $fields = $viewSection->getFields(); |
| 234 | 234 | foreach ($fields as $field) { |
| 235 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 235 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 257 | 257 | |
| 258 | 258 | foreach ($availableFields as $field) { |
| 259 | - $fieldName = $field['name']; |
|
| 259 | + $fieldName = $field['name']; |
|
| 260 | 260 | $fieldDescription = $field['description']; |
| 261 | 261 | |
| 262 | 262 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $nbCol = 0; |
| 451 | 451 | foreach ($customSections as $customSection) { |
| 452 | 452 | |
| 453 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 453 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 454 | 454 | |
| 455 | 455 | // if ($currentColumn + $nbCol > 12) { |
| 456 | 456 | // $sectionsSection->addItem($row); |
@@ -461,8 +461,8 @@ discard block |
||
| 461 | 461 | $currentColumn += $nbCol; |
| 462 | 462 | |
| 463 | 463 | $sectionSection = $W->Section( |
| 464 | - $customSection->name . ' (' . $customSection->rank . ')', |
|
| 465 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id)) |
|
| 464 | + $customSection->name.' ('.$customSection->rank.')', |
|
| 465 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id)) |
|
| 466 | 466 | // ->addClass('widget-dockable-content') |
| 467 | 467 | ); |
| 468 | 468 | $sectionSection->addClass('crm-custom-section'); |
@@ -507,16 +507,16 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | $fieldItem = $W->FlowItems( |
| 510 | - $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-80pc' ), |
|
| 510 | + $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-80pc'), |
|
| 511 | 511 | $W->FlowItems( |
| 512 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 512 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 513 | 513 | $W->Link('', $this->proxy()->editDisplayField($customSection->id, $field['name'])) |
| 514 | 514 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT) |
| 515 | 515 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
| 516 | 516 | $W->Link('', $this->proxy()->removeDisplayField($customSection->id, $field['name'])) |
| 517 | 517 | ->addClass('icon', Func_Icons::ACTIONS_LIST_REMOVE) |
| 518 | 518 | ->setAjaxAction() |
| 519 | - )->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-20pc widget-align-right widget-actions' ) |
|
| 519 | + )->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-20pc widget-align-right widget-actions') |
|
| 520 | 520 | )->setSizePolicy('widget-list-element widget-actions-target'); |
| 521 | 521 | |
| 522 | 522 | $sectionBox->addItem($fieldItem); |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | header('Content-type: application/json'); |
| 592 | - header('Content-Disposition: attachment; filename="' . $objectName . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n"); |
|
| 592 | + header('Content-Disposition: attachment; filename="'.$objectName.'.'.($view === '' ? 'default' : $view).'.json"'."\n"); |
|
| 593 | 593 | |
| 594 | 594 | $json = bab_json_encode($sectionsValues); |
| 595 | 595 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |
@@ -833,11 +833,11 @@ discard block |
||
| 833 | 833 | $recordSet = $this->getEditRecordSet(); |
| 834 | 834 | |
| 835 | 835 | $recordClassname = $this->getRecordClassName(); |
| 836 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 836 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 837 | 837 | /* @var $editor app_RecordEditor */ |
| 838 | 838 | $editor = $Ui->$editorClassname(); |
| 839 | 839 | if (!isset($itemId)) { |
| 840 | - $itemId = $this->getClass() . '.' . __FUNCTION__; |
|
| 840 | + $itemId = $this->getClass().'.'.__FUNCTION__; |
|
| 841 | 841 | } |
| 842 | 842 | $editor->setId($itemId); |
| 843 | 843 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | public function getModelViewDefaultId($itemId = null) |
| 881 | 881 | { |
| 882 | 882 | if (!isset($itemId)) { |
| 883 | - $itemId = $this->getClass() . '.modelView'; |
|
| 883 | + $itemId = $this->getClass().'.modelView'; |
|
| 884 | 884 | } |
| 885 | 885 | |
| 886 | 886 | return $itemId; |
@@ -914,16 +914,16 @@ discard block |
||
| 914 | 914 | |
| 915 | 915 | switch ($type) { |
| 916 | 916 | case 'cards': |
| 917 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 917 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 918 | 918 | break; |
| 919 | 919 | |
| 920 | 920 | case 'map': |
| 921 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 921 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 922 | 922 | break; |
| 923 | 923 | |
| 924 | 924 | case 'table': |
| 925 | 925 | default: |
| 926 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 926 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 927 | 927 | break; |
| 928 | 928 | } |
| 929 | 929 | |
@@ -989,10 +989,10 @@ discard block |
||
| 989 | 989 | $Ui = $App->Ui(); |
| 990 | 990 | |
| 991 | 991 | $recordClassname = $this->getRecordClassName(); |
| 992 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 992 | + $editorClassname = $recordClassname.'Editor'; |
|
| 993 | 993 | $editor = $Ui->$editorClassname(); |
| 994 | 994 | if (!isset($itemId)) { |
| 995 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 995 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 996 | 996 | } |
| 997 | 997 | $editor->setId($itemId); |
| 998 | 998 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | $W->Link( |
| 1038 | 1038 | '', |
| 1039 | 1039 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 1040 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 1040 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 1041 | 1041 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 1042 | 1042 | ->setTitle($viewType['label']) |
| 1043 | 1043 | ->setAjaxAction() |
@@ -1081,7 +1081,7 @@ discard block |
||
| 1081 | 1081 | |
| 1082 | 1082 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 1083 | 1083 | $filterVisibility = !$filterVisibility; |
| 1084 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1084 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1085 | 1085 | |
| 1086 | 1086 | return true; |
| 1087 | 1087 | } |
@@ -1094,10 +1094,10 @@ discard block |
||
| 1094 | 1094 | protected function getFilterVisibility($itemId) |
| 1095 | 1095 | { |
| 1096 | 1096 | $W = bab_Widgets(); |
| 1097 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 1097 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 1098 | 1098 | if (!isset($filterVisibility)) { |
| 1099 | 1099 | $filterVisibility = false; |
| 1100 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1100 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1101 | 1101 | } |
| 1102 | 1102 | return $filterVisibility; |
| 1103 | 1103 | } |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | protected function getFilteredViewType($itemId) |
| 1112 | 1112 | { |
| 1113 | 1113 | $W = bab_Widgets(); |
| 1114 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 1114 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 1115 | 1115 | if (!isset($type)) { |
| 1116 | 1116 | $type = 'table'; |
| 1117 | 1117 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | public function setFilteredViewType($itemId, $type = null) |
| 1128 | 1128 | { |
| 1129 | 1129 | $W = bab_Widgets(); |
| 1130 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 1130 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 1131 | 1131 | |
| 1132 | 1132 | return true; |
| 1133 | 1133 | } |
@@ -1272,14 +1272,14 @@ discard block |
||
| 1272 | 1272 | |
| 1273 | 1273 | switch ($format) { |
| 1274 | 1274 | case 'xlsx': |
| 1275 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 1275 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 1276 | 1276 | case 'xls': |
| 1277 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 1277 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 1278 | 1278 | case 'ssv': |
| 1279 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 1279 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 1280 | 1280 | case 'csv': |
| 1281 | 1281 | default: |
| 1282 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 1282 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 1283 | 1283 | } |
| 1284 | 1284 | } |
| 1285 | 1285 | |
@@ -1307,7 +1307,7 @@ discard block |
||
| 1307 | 1307 | $Ui = $App->Ui(); |
| 1308 | 1308 | |
| 1309 | 1309 | $recordClassname = $this->getRecordClassName(); |
| 1310 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 1310 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 1311 | 1311 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 1312 | 1312 | |
| 1313 | 1313 | |
@@ -1470,7 +1470,7 @@ discard block |
||
| 1470 | 1470 | |
| 1471 | 1471 | $recordTitle = $record->getRecordTitle(); |
| 1472 | 1472 | |
| 1473 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 1473 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 1474 | 1474 | return $message; |
| 1475 | 1475 | } |
| 1476 | 1476 | |
@@ -1626,7 +1626,7 @@ discard block |
||
| 1626 | 1626 | |
| 1627 | 1627 | $recordTitle = $record->getRecordTitle(); |
| 1628 | 1628 | |
| 1629 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1629 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1630 | 1630 | $form->addItem($W->Title($subTitle, 5)); |
| 1631 | 1631 | |
| 1632 | 1632 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |