@@ -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, |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $viewClassname = $recordClassname . 'CalendarView'; |
|
| 172 | + $viewClassname = $recordClassname.'CalendarView'; |
|
| 173 | 173 | if (method_exists($Ui, $viewClassname)) { |
| 174 | 174 | $types['calendar'] = array( |
| 175 | 175 | 'classname' => $viewClassname, |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | foreach ($allViewSections as $viewSection) { |
| 242 | 242 | $fields = $viewSection->getFields(); |
| 243 | 243 | foreach ($fields as $field) { |
| 244 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 244 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 245 | 245 | } |
| 246 | 246 | } |
| 247 | 247 | |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 266 | 266 | |
| 267 | 267 | foreach ($availableFields as $field) { |
| 268 | - $fieldName = $field['name']; |
|
| 268 | + $fieldName = $field['name']; |
|
| 269 | 269 | $fieldDescription = $field['description']; |
| 270 | 270 | |
| 271 | 271 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | $nbCol = 0; |
| 460 | 460 | foreach ($customSections as $customSection) { |
| 461 | 461 | |
| 462 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 462 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 463 | 463 | |
| 464 | 464 | // if ($currentColumn + $nbCol > 12) { |
| 465 | 465 | // $sectionsSection->addItem($row); |
@@ -470,8 +470,8 @@ discard block |
||
| 470 | 470 | $currentColumn += $nbCol; |
| 471 | 471 | |
| 472 | 472 | $sectionSection = $W->Section( |
| 473 | - $customSection->name . ' (' . $customSection->rank . ')', |
|
| 474 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id)) |
|
| 473 | + $customSection->name.' ('.$customSection->rank.')', |
|
| 474 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id)) |
|
| 475 | 475 | // ->addClass('widget-dockable-content') |
| 476 | 476 | ); |
| 477 | 477 | $sectionSection->addClass('crm-custom-section'); |
@@ -516,16 +516,16 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | $fieldItem = $W->FlowItems( |
| 519 | - $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-80pc' ), |
|
| 519 | + $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-80pc'), |
|
| 520 | 520 | $W->FlowItems( |
| 521 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 521 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 522 | 522 | $W->Link('', $this->proxy()->editDisplayField($customSection->id, $field['name'])) |
| 523 | 523 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT) |
| 524 | 524 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
| 525 | 525 | $W->Link('', $this->proxy()->removeDisplayField($customSection->id, $field['name'])) |
| 526 | 526 | ->addClass('icon', Func_Icons::ACTIONS_LIST_REMOVE) |
| 527 | 527 | ->setAjaxAction() |
| 528 | - )->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-20pc widget-align-right widget-actions' ) |
|
| 528 | + )->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-20pc widget-align-right widget-actions') |
|
| 529 | 529 | )->setSizePolicy('widget-list-element widget-actions-target'); |
| 530 | 530 | |
| 531 | 531 | $sectionBox->addItem($fieldItem); |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | header('Content-type: application/json'); |
| 601 | - header('Content-Disposition: attachment; filename="' . $objectName . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n"); |
|
| 601 | + header('Content-Disposition: attachment; filename="'.$objectName.'.'.($view === '' ? 'default' : $view).'.json"'."\n"); |
|
| 602 | 602 | |
| 603 | 603 | $json = bab_json_encode($sectionsValues); |
| 604 | 604 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |
@@ -842,11 +842,11 @@ discard block |
||
| 842 | 842 | $recordSet = $this->getEditRecordSet(); |
| 843 | 843 | |
| 844 | 844 | $recordClassname = $this->getRecordClassName(); |
| 845 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 845 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 846 | 846 | /* @var $editor app_RecordEditor */ |
| 847 | 847 | $editor = $Ui->$editorClassname(); |
| 848 | 848 | if (!isset($itemId)) { |
| 849 | - $itemId = $this->getClass() . '.' . __FUNCTION__; |
|
| 849 | + $itemId = $this->getClass().'.'.__FUNCTION__; |
|
| 850 | 850 | } |
| 851 | 851 | $editor->setId($itemId); |
| 852 | 852 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | public function getModelViewDefaultId($itemId = null) |
| 890 | 890 | { |
| 891 | 891 | if (!isset($itemId)) { |
| 892 | - $itemId = $this->getClass() . '.modelView'; |
|
| 892 | + $itemId = $this->getClass().'.modelView'; |
|
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | return $itemId; |
@@ -923,20 +923,20 @@ discard block |
||
| 923 | 923 | |
| 924 | 924 | switch ($type) { |
| 925 | 925 | case 'cards': |
| 926 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 926 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 927 | 927 | break; |
| 928 | 928 | |
| 929 | 929 | case 'map': |
| 930 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 930 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 931 | 931 | break; |
| 932 | 932 | |
| 933 | 933 | case 'calendar': |
| 934 | - $tableviewClassname = $recordClassname . 'CalendarView'; |
|
| 934 | + $tableviewClassname = $recordClassname.'CalendarView'; |
|
| 935 | 935 | break; |
| 936 | 936 | |
| 937 | 937 | case 'table': |
| 938 | 938 | default: |
| 939 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 939 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 940 | 940 | break; |
| 941 | 941 | } |
| 942 | 942 | |
@@ -1002,10 +1002,10 @@ discard block |
||
| 1002 | 1002 | $Ui = $App->Ui(); |
| 1003 | 1003 | |
| 1004 | 1004 | $recordClassname = $this->getRecordClassName(); |
| 1005 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 1005 | + $editorClassname = $recordClassname.'Editor'; |
|
| 1006 | 1006 | $editor = $Ui->$editorClassname(); |
| 1007 | 1007 | if (!isset($itemId)) { |
| 1008 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 1008 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 1009 | 1009 | } |
| 1010 | 1010 | $editor->setId($itemId); |
| 1011 | 1011 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | $W->Link( |
| 1051 | 1051 | '', |
| 1052 | 1052 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 1053 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 1053 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 1054 | 1054 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 1055 | 1055 | ->setTitle($viewType['label']) |
| 1056 | 1056 | ->setAjaxAction() |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | |
| 1095 | 1095 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 1096 | 1096 | $filterVisibility = !$filterVisibility; |
| 1097 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1097 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1098 | 1098 | |
| 1099 | 1099 | return true; |
| 1100 | 1100 | } |
@@ -1107,10 +1107,10 @@ discard block |
||
| 1107 | 1107 | protected function getFilterVisibility($itemId) |
| 1108 | 1108 | { |
| 1109 | 1109 | $W = bab_Widgets(); |
| 1110 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 1110 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 1111 | 1111 | if (!isset($filterVisibility)) { |
| 1112 | 1112 | $filterVisibility = false; |
| 1113 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1113 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1114 | 1114 | } |
| 1115 | 1115 | return $filterVisibility; |
| 1116 | 1116 | } |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | protected function getFilteredViewType($itemId) |
| 1125 | 1125 | { |
| 1126 | 1126 | $W = bab_Widgets(); |
| 1127 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 1127 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 1128 | 1128 | if (!isset($type)) { |
| 1129 | 1129 | $type = 'table'; |
| 1130 | 1130 | } |
@@ -1140,7 +1140,7 @@ discard block |
||
| 1140 | 1140 | public function setFilteredViewType($itemId, $type = null) |
| 1141 | 1141 | { |
| 1142 | 1142 | $W = bab_Widgets(); |
| 1143 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 1143 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 1144 | 1144 | |
| 1145 | 1145 | return true; |
| 1146 | 1146 | } |
@@ -1285,14 +1285,14 @@ discard block |
||
| 1285 | 1285 | |
| 1286 | 1286 | switch ($format) { |
| 1287 | 1287 | case 'xlsx': |
| 1288 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 1288 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 1289 | 1289 | case 'xls': |
| 1290 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 1290 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 1291 | 1291 | case 'ssv': |
| 1292 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 1292 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 1293 | 1293 | case 'csv': |
| 1294 | 1294 | default: |
| 1295 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 1295 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 1296 | 1296 | } |
| 1297 | 1297 | } |
| 1298 | 1298 | |
@@ -1320,7 +1320,7 @@ discard block |
||
| 1320 | 1320 | $Ui = $App->Ui(); |
| 1321 | 1321 | |
| 1322 | 1322 | $recordClassname = $this->getRecordClassName(); |
| 1323 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 1323 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 1324 | 1324 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 1325 | 1325 | |
| 1326 | 1326 | |
@@ -1483,7 +1483,7 @@ discard block |
||
| 1483 | 1483 | |
| 1484 | 1484 | $recordTitle = $record->getRecordTitle(); |
| 1485 | 1485 | |
| 1486 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 1486 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 1487 | 1487 | return $message; |
| 1488 | 1488 | } |
| 1489 | 1489 | |
@@ -1610,7 +1610,7 @@ discard block |
||
| 1610 | 1610 | $this->addMessage($deletedMessage); |
| 1611 | 1611 | } |
| 1612 | 1612 | |
| 1613 | - $this->addReloadSelector('.depends-' . strtolower($record->getClassName())); |
|
| 1613 | + $this->addReloadSelector('.depends-'.strtolower($record->getClassName())); |
|
| 1614 | 1614 | |
| 1615 | 1615 | return true; |
| 1616 | 1616 | } |
@@ -1641,7 +1641,7 @@ discard block |
||
| 1641 | 1641 | |
| 1642 | 1642 | $recordTitle = $record->getRecordTitle(); |
| 1643 | 1643 | |
| 1644 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1644 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1645 | 1645 | $form->addItem($W->Title($subTitle, 5)); |
| 1646 | 1646 | |
| 1647 | 1647 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |