@@ -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, |
@@ -246,11 +246,11 @@ discard block |
||
| 246 | 246 | $recordSet = $this->getEditRecordSet(); |
| 247 | 247 | |
| 248 | 248 | $recordClassname = $this->getRecordClassName(); |
| 249 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 249 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 250 | 250 | /* @var $editor app_RecordEditor */ |
| 251 | 251 | $editor = $Ui->$editorClassname(); |
| 252 | 252 | if (!isset($itemId)) { |
| 253 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 253 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 254 | 254 | } |
| 255 | 255 | $editor->setId($itemId); |
| 256 | 256 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | public function getModelViewDefaultId($itemId = null) |
| 294 | 294 | { |
| 295 | 295 | if (!isset($itemId)) { |
| 296 | - $itemId = $this->getClass() . '_modelView'; |
|
| 296 | + $itemId = $this->getClass().'_modelView'; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | return $itemId; |
@@ -327,20 +327,20 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | switch ($type) { |
| 329 | 329 | case 'cards': |
| 330 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 330 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 331 | 331 | break; |
| 332 | 332 | |
| 333 | 333 | case 'map': |
| 334 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 334 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 335 | 335 | break; |
| 336 | 336 | |
| 337 | 337 | case 'calendar': |
| 338 | - $tableviewClassname = $recordClassname . 'CalendarView'; |
|
| 338 | + $tableviewClassname = $recordClassname.'CalendarView'; |
|
| 339 | 339 | break; |
| 340 | 340 | |
| 341 | 341 | case 'table': |
| 342 | 342 | default: |
| 343 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 343 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 344 | 344 | break; |
| 345 | 345 | } |
| 346 | 346 | |
@@ -406,10 +406,10 @@ discard block |
||
| 406 | 406 | $Ui = $App->Ui(); |
| 407 | 407 | |
| 408 | 408 | $recordClassname = $this->getRecordClassName(); |
| 409 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 409 | + $editorClassname = $recordClassname.'Editor'; |
|
| 410 | 410 | $editor = $Ui->$editorClassname(); |
| 411 | 411 | if (!isset($itemId)) { |
| 412 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 412 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 413 | 413 | } |
| 414 | 414 | $editor->setId($itemId); |
| 415 | 415 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $W->Link( |
| 455 | 455 | '', |
| 456 | 456 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 457 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 457 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 458 | 458 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 459 | 459 | ->setTitle($viewType['label']) |
| 460 | 460 | ->setAjaxAction() |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | |
| 499 | 499 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 500 | 500 | $filterVisibility = !$filterVisibility; |
| 501 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 501 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 502 | 502 | |
| 503 | 503 | return true; |
| 504 | 504 | } |
@@ -511,10 +511,10 @@ discard block |
||
| 511 | 511 | protected function getFilterVisibility($itemId) |
| 512 | 512 | { |
| 513 | 513 | $W = bab_Widgets(); |
| 514 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 514 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 515 | 515 | if (!isset($filterVisibility)) { |
| 516 | 516 | $filterVisibility = false; |
| 517 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 517 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 518 | 518 | } |
| 519 | 519 | return $filterVisibility; |
| 520 | 520 | } |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | protected function getFilteredViewType($itemId) |
| 529 | 529 | { |
| 530 | 530 | $W = bab_Widgets(); |
| 531 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 531 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 532 | 532 | if (!isset($type)) { |
| 533 | 533 | $type = 'table'; |
| 534 | 534 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | public function setFilteredViewType($itemId, $type = null) |
| 545 | 545 | { |
| 546 | 546 | $W = bab_Widgets(); |
| 547 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 547 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 548 | 548 | |
| 549 | 549 | return true; |
| 550 | 550 | } |
@@ -686,17 +686,17 @@ discard block |
||
| 686 | 686 | |
| 687 | 687 | switch ($format) { |
| 688 | 688 | case 'xlsx': |
| 689 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 689 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 690 | 690 | break; |
| 691 | 691 | case 'xls': |
| 692 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 692 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 693 | 693 | break; |
| 694 | 694 | case 'ssv': |
| 695 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 695 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 696 | 696 | break; |
| 697 | 697 | case 'csv': |
| 698 | 698 | default: |
| 699 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 699 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 700 | 700 | break; |
| 701 | 701 | } |
| 702 | 702 | } |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | $Ui = $App->Ui(); |
| 726 | 726 | |
| 727 | 727 | $recordClassname = $this->getRecordClassName(); |
| 728 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 728 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 729 | 729 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 730 | 730 | |
| 731 | 731 | |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | |
| 889 | 889 | $recordTitle = $record->getRecordTitle(); |
| 890 | 890 | |
| 891 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 891 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 892 | 892 | return $message; |
| 893 | 893 | } |
| 894 | 894 | |
@@ -987,7 +987,7 @@ discard block |
||
| 987 | 987 | $this->addMessage($message); |
| 988 | 988 | } |
| 989 | 989 | |
| 990 | - $this->addReloadSelector('.depends-' . $this->getRecordClassName()); |
|
| 990 | + $this->addReloadSelector('.depends-'.$this->getRecordClassName()); |
|
| 991 | 991 | return true; |
| 992 | 992 | } |
| 993 | 993 | |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | $this->addMessage($deletedMessage); |
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | - $this->addReloadSelector('.depends-' . strtolower($record->getClassName())); |
|
| 1022 | + $this->addReloadSelector('.depends-'.strtolower($record->getClassName())); |
|
| 1023 | 1023 | |
| 1024 | 1024 | return true; |
| 1025 | 1025 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | |
| 1051 | 1051 | $recordTitle = $record->getRecordTitle(); |
| 1052 | 1052 | |
| 1053 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1053 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1054 | 1054 | $form->addItem($W->Title($subTitle, 5)); |
| 1055 | 1055 | |
| 1056 | 1056 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | |
| 25 | -require_once APP_CTRL_PATH . '/record.ctrl.php'; |
|
| 25 | +require_once APP_CTRL_PATH.'/record.ctrl.php'; |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | foreach ($allViewSections as $viewSection) {
|
| 59 | 59 | $fields = $viewSection->getFields(); |
| 60 | 60 | foreach ($fields as $field) {
|
| 61 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 61 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 82 | 82 | |
| 83 | 83 | foreach ($availableFields as $field) {
|
| 84 | - $fieldName = $field['name']; |
|
| 84 | + $fieldName = $field['name']; |
|
| 85 | 85 | $fieldDescription = $field['description']; |
| 86 | 86 | |
| 87 | 87 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $recordSet = $this->getRecordSet(); |
| 391 | 391 | $record = $recordSet->request($id); |
| 392 | 392 | |
| 393 | - $object = $record->object . 'Set'; |
|
| 393 | + $object = $record->object.'Set'; |
|
| 394 | 394 | |
| 395 | 395 | $objectRecordSet = $App->$object(); |
| 396 | 396 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $recordSet = $this->getRecordSet(); |
| 465 | 465 | $record = $recordSet->request($data['id']); |
| 466 | 466 | |
| 467 | - $object = $record->object . 'Set'; |
|
| 467 | + $object = $record->object.'Set'; |
|
| 468 | 468 | |
| 469 | 469 | $objectRecordSet = $App->$object(); |
| 470 | 470 | |
@@ -536,17 +536,17 @@ discard block |
||
| 536 | 536 | $nbCol = 0; |
| 537 | 537 | foreach ($customSections as $customSection) {
|
| 538 | 538 | |
| 539 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy);
|
|
| 539 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy);
|
|
| 540 | 540 | |
| 541 | 541 | $currentColumn += $nbCol; |
| 542 | 542 | |
| 543 | 543 | $sectionSection = $W->Section( |
| 544 | - $customSection->name . ' (' . $customSection->rank . ')',
|
|
| 545 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id))
|
|
| 544 | + $customSection->name.' ('.$customSection->rank.')',
|
|
| 545 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id))
|
|
| 546 | 546 | ); |
| 547 | 547 | $sectionSection->addClass('app-custom-section');
|
| 548 | 548 | $sectionSection->addClass($customSection->classname); |
| 549 | - $sectionSection->setSizePolicy($customSection->sizePolicy . ' widget-sameheight'); |
|
| 549 | + $sectionSection->setSizePolicy($customSection->sizePolicy.' widget-sameheight'); |
|
| 550 | 550 | |
| 551 | 551 | $row->addItem($sectionSection); |
| 552 | 552 | |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | $fieldItem = $W->HBoxItems( |
| 589 | 589 | $W->Label($fieldDescription)->setSizePolicy('maximum')->addClass('icon', Func_Icons::ACTIONS_ZOOM_FIT_HEIGHT),
|
| 590 | 590 | $W->HBoxItems( |
| 591 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 591 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 592 | 592 | $W->Link('', $customSectionCtrl->editDisplayField($customSection->id, $field['name']))
|
| 593 | 593 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT)
|
| 594 | 594 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | } |
| 666 | 666 | |
| 667 | 667 | header('Content-type: application/json');
|
| 668 | - header('Content-Disposition: attachment; filename="' . $object . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n");
|
|
| 668 | + header('Content-Disposition: attachment; filename="'.$object.'.'.($view === '' ? 'default' : $view).'.json"'."\n");
|
|
| 669 | 669 | |
| 670 | 670 | $json = bab_json_encode($sectionsValues); |
| 671 | 671 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |