@@ -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; |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | if ($showLabel) { |
| 105 | 105 | $text = $actions->getTitle(); |
| 106 | 106 | } |
| 107 | - $html = '<li><a class="icon ' . $actions->getIcon() . '"href="' . $actions->url() . '">' . $text . '</a></li>'; |
|
| 107 | + $html = '<li><a class="icon '.$actions->getIcon().'"href="'.$actions->url().'">'.$text.'</a></li>'; |
|
| 108 | 108 | } elseif ($actions instanceof Widget_Link) { |
| 109 | - $html = '<li>' . $actions->display($canvas) . '</li>'; |
|
| 109 | + $html = '<li>'.$actions->display($canvas).'</li>'; |
|
| 110 | 110 | } elseif (is_array($actions)) { |
| 111 | 111 | if (isset($actions['items'])) { |
| 112 | 112 | $items = $actions['items']; |
@@ -119,10 +119,10 @@ discard block |
||
| 119 | 119 | if (isset($actions['icon'])) { |
| 120 | 120 | |
| 121 | 121 | $html = '<li class="dropdown">' |
| 122 | - . '<a href="#" class="' . $actions['icon'] . ' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 122 | + . '<a href="#" class="'.$actions['icon'].' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 123 | 123 | . ($actions['icon'] === 'actions-context-menu'/*Func_Icons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>') |
| 124 | 124 | . '</a>' |
| 125 | - . '<ul class="dropdown-menu dropdown-menu-right ' . Func_Icons::ICON_LEFT_SYMBOLIC . '">' |
|
| 125 | + . '<ul class="dropdown-menu dropdown-menu-right '.Func_Icons::ICON_LEFT_SYMBOLIC.'">' |
|
| 126 | 126 | . $html |
| 127 | 127 | . '</ul>'; |
| 128 | 128 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $recordClassname = $this->getRecordClassName(); |
| 147 | 147 | |
| 148 | - $viewClassname = $recordClassname . 'TableView'; |
|
| 148 | + $viewClassname = $recordClassname.'TableView'; |
|
| 149 | 149 | if (method_exists($Ui, $viewClassname)) { |
| 150 | 150 | $types['table'] = array( |
| 151 | 151 | 'classname' => $viewClassname, |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | ); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - $viewClassname = $recordClassname . 'CardsView'; |
|
| 157 | + $viewClassname = $recordClassname.'CardsView'; |
|
| 158 | 158 | if (method_exists($Ui, $viewClassname)) { |
| 159 | 159 | $types['cards'] = array( |
| 160 | 160 | 'classname' => $viewClassname, |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $viewClassname = $recordClassname . 'MapView'; |
|
| 166 | + $viewClassname = $recordClassname.'MapView'; |
|
| 167 | 167 | if (method_exists($Ui, $viewClassname)) { |
| 168 | 168 | $types['map'] = array( |
| 169 | 169 | 'classname' => $viewClassname, |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | ); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - $viewClassname = $recordClassname . 'CalendarView'; |
|
| 175 | + $viewClassname = $recordClassname.'CalendarView'; |
|
| 176 | 176 | if (method_exists($Ui, $viewClassname)) { |
| 177 | 177 | $types['calendar'] = array( |
| 178 | 178 | 'classname' => $viewClassname, |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | foreach ($allViewSections as $viewSection) { |
| 245 | 245 | $fields = $viewSection->getFields(); |
| 246 | 246 | foreach ($fields as $field) { |
| 247 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 247 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 269 | 269 | |
| 270 | 270 | foreach ($availableFields as $field) { |
| 271 | - $fieldName = $field['name']; |
|
| 271 | + $fieldName = $field['name']; |
|
| 272 | 272 | $fieldDescription = $field['description']; |
| 273 | 273 | |
| 274 | 274 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $nbCol = 0; |
| 466 | 466 | foreach ($customSections as $customSection) { |
| 467 | 467 | |
| 468 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 468 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 469 | 469 | |
| 470 | 470 | // if ($currentColumn + $nbCol > 12) { |
| 471 | 471 | // $sectionsSection->addItem($row); |
@@ -476,8 +476,8 @@ discard block |
||
| 476 | 476 | $currentColumn += $nbCol; |
| 477 | 477 | |
| 478 | 478 | $sectionSection = $W->Section( |
| 479 | - $customSection->name . ' (' . $customSection->rank . ')', |
|
| 480 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id)) |
|
| 479 | + $customSection->name.' ('.$customSection->rank.')', |
|
| 480 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id)) |
|
| 481 | 481 | // ->addClass('widget-dockable-content') |
| 482 | 482 | ); |
| 483 | 483 | $sectionSection->addClass('crm-custom-section'); |
@@ -522,16 +522,16 @@ discard block |
||
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | $fieldItem = $W->FlowItems( |
| 525 | - $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-80pc' ), |
|
| 525 | + $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-80pc'), |
|
| 526 | 526 | $W->FlowItems( |
| 527 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 527 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 528 | 528 | $W->Link('', $this->proxy()->editDisplayField($customSection->id, $field['name'])) |
| 529 | 529 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT) |
| 530 | 530 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
| 531 | 531 | $W->Link('', $this->proxy()->removeDisplayField($customSection->id, $field['name'])) |
| 532 | 532 | ->addClass('icon', Func_Icons::ACTIONS_LIST_REMOVE) |
| 533 | 533 | ->setAjaxAction() |
| 534 | - )->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-20pc widget-align-right widget-actions' ) |
|
| 534 | + )->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-20pc widget-align-right widget-actions') |
|
| 535 | 535 | )->setSizePolicy('widget-list-element widget-actions-target'); |
| 536 | 536 | |
| 537 | 537 | $sectionBox->addItem($fieldItem); |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | header('Content-type: application/json'); |
| 606 | - header('Content-Disposition: attachment; filename="' . $objectName . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n"); |
|
| 606 | + header('Content-Disposition: attachment; filename="'.$objectName.'.'.($view === '' ? 'default' : $view).'.json"'."\n"); |
|
| 607 | 607 | |
| 608 | 608 | $json = bab_json_encode($sectionsValues); |
| 609 | 609 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |
@@ -854,11 +854,11 @@ discard block |
||
| 854 | 854 | $recordSet = $this->getEditRecordSet(); |
| 855 | 855 | |
| 856 | 856 | $recordClassname = $this->getRecordClassName(); |
| 857 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 857 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 858 | 858 | /* @var $editor app_RecordEditor */ |
| 859 | 859 | $editor = $Ui->$editorClassname(); |
| 860 | 860 | if (!isset($itemId)) { |
| 861 | - $itemId = $this->getClass() . '.' . __FUNCTION__; |
|
| 861 | + $itemId = $this->getClass().'.'.__FUNCTION__; |
|
| 862 | 862 | } |
| 863 | 863 | $editor->setId($itemId); |
| 864 | 864 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -901,7 +901,7 @@ discard block |
||
| 901 | 901 | public function getModelViewDefaultId($itemId = null) |
| 902 | 902 | { |
| 903 | 903 | if (!isset($itemId)) { |
| 904 | - $itemId = $this->getClass() . '.modelView'; |
|
| 904 | + $itemId = $this->getClass().'.modelView'; |
|
| 905 | 905 | } |
| 906 | 906 | |
| 907 | 907 | return $itemId; |
@@ -935,20 +935,20 @@ discard block |
||
| 935 | 935 | |
| 936 | 936 | switch ($type) { |
| 937 | 937 | case 'cards': |
| 938 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 938 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 939 | 939 | break; |
| 940 | 940 | |
| 941 | 941 | case 'map': |
| 942 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 942 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 943 | 943 | break; |
| 944 | 944 | |
| 945 | 945 | case 'calendar': |
| 946 | - $tableviewClassname = $recordClassname . 'CalendarView'; |
|
| 946 | + $tableviewClassname = $recordClassname.'CalendarView'; |
|
| 947 | 947 | break; |
| 948 | 948 | |
| 949 | 949 | case 'table': |
| 950 | 950 | default: |
| 951 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 951 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 952 | 952 | break; |
| 953 | 953 | } |
| 954 | 954 | |
@@ -1014,10 +1014,10 @@ discard block |
||
| 1014 | 1014 | $Ui = $App->Ui(); |
| 1015 | 1015 | |
| 1016 | 1016 | $recordClassname = $this->getRecordClassName(); |
| 1017 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 1017 | + $editorClassname = $recordClassname.'Editor'; |
|
| 1018 | 1018 | $editor = $Ui->$editorClassname(); |
| 1019 | 1019 | if (!isset($itemId)) { |
| 1020 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 1020 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 1021 | 1021 | } |
| 1022 | 1022 | $editor->setId($itemId); |
| 1023 | 1023 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | $W->Link( |
| 1063 | 1063 | '', |
| 1064 | 1064 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 1065 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 1065 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 1066 | 1066 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 1067 | 1067 | ->setTitle($viewType['label']) |
| 1068 | 1068 | ->setAjaxAction() |
@@ -1106,7 +1106,7 @@ discard block |
||
| 1106 | 1106 | |
| 1107 | 1107 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 1108 | 1108 | $filterVisibility = !$filterVisibility; |
| 1109 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1109 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1110 | 1110 | |
| 1111 | 1111 | return true; |
| 1112 | 1112 | } |
@@ -1119,10 +1119,10 @@ discard block |
||
| 1119 | 1119 | protected function getFilterVisibility($itemId) |
| 1120 | 1120 | { |
| 1121 | 1121 | $W = bab_Widgets(); |
| 1122 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 1122 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 1123 | 1123 | if (!isset($filterVisibility)) { |
| 1124 | 1124 | $filterVisibility = false; |
| 1125 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1125 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1126 | 1126 | } |
| 1127 | 1127 | return $filterVisibility; |
| 1128 | 1128 | } |
@@ -1136,7 +1136,7 @@ discard block |
||
| 1136 | 1136 | protected function getFilteredViewType($itemId) |
| 1137 | 1137 | { |
| 1138 | 1138 | $W = bab_Widgets(); |
| 1139 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 1139 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 1140 | 1140 | if (!isset($type)) { |
| 1141 | 1141 | $type = 'table'; |
| 1142 | 1142 | } |
@@ -1152,7 +1152,7 @@ discard block |
||
| 1152 | 1152 | public function setFilteredViewType($itemId, $type = null) |
| 1153 | 1153 | { |
| 1154 | 1154 | $W = bab_Widgets(); |
| 1155 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 1155 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 1156 | 1156 | |
| 1157 | 1157 | return true; |
| 1158 | 1158 | } |
@@ -1294,17 +1294,17 @@ discard block |
||
| 1294 | 1294 | |
| 1295 | 1295 | switch ($format) { |
| 1296 | 1296 | case 'xlsx': |
| 1297 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 1297 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 1298 | 1298 | break; |
| 1299 | 1299 | case 'xls': |
| 1300 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 1300 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 1301 | 1301 | break; |
| 1302 | 1302 | case 'ssv': |
| 1303 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 1303 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 1304 | 1304 | break; |
| 1305 | 1305 | case 'csv': |
| 1306 | 1306 | default: |
| 1307 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 1307 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 1308 | 1308 | break; |
| 1309 | 1309 | } |
| 1310 | 1310 | } |
@@ -1333,7 +1333,7 @@ discard block |
||
| 1333 | 1333 | $Ui = $App->Ui(); |
| 1334 | 1334 | |
| 1335 | 1335 | $recordClassname = $this->getRecordClassName(); |
| 1336 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 1336 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 1337 | 1337 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 1338 | 1338 | |
| 1339 | 1339 | |
@@ -1496,7 +1496,7 @@ discard block |
||
| 1496 | 1496 | |
| 1497 | 1497 | $recordTitle = $record->getRecordTitle(); |
| 1498 | 1498 | |
| 1499 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 1499 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 1500 | 1500 | return $message; |
| 1501 | 1501 | } |
| 1502 | 1502 | |
@@ -1623,7 +1623,7 @@ discard block |
||
| 1623 | 1623 | $this->addMessage($deletedMessage); |
| 1624 | 1624 | } |
| 1625 | 1625 | |
| 1626 | - $this->addReloadSelector('.depends-' . strtolower($record->getClassName())); |
|
| 1626 | + $this->addReloadSelector('.depends-'.strtolower($record->getClassName())); |
|
| 1627 | 1627 | |
| 1628 | 1628 | return true; |
| 1629 | 1629 | } |
@@ -1654,7 +1654,7 @@ discard block |
||
| 1654 | 1654 | |
| 1655 | 1655 | $recordTitle = $record->getRecordTitle(); |
| 1656 | 1656 | |
| 1657 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1657 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1658 | 1658 | $form->addItem($W->Title($subTitle, 5)); |
| 1659 | 1659 | |
| 1660 | 1660 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |