Files
bdalsass 5157f511fc N°5073 - Implements line actions in a datatable (#337)
* datatable row actions

Below is a sample of extra param to enable feature:

		$aExtraParams['row_actions'] = [
			[
				'tooltip'        => 'add an element',
				'icon_css_class' => 'fa-plus',
				'css_class'      => 'ibo-is-success',
				'level'          => 'secondary',
				'on_action_js'   => 'console.log(aData);',
			],
			[
				'tooltip'        => 'remove an element',
				'icon_css_class' => 'fa-minus',
				'css_class'      => 'ibo-is-danger',
				'level'          => 'secondary',
				'on_action_js'   => 'console.log("You clicked the remove button");',
			],
			[
				'tooltip'        => 'open in new tab',
				'icon_css_class' => 'fa-external-link-square-alt',
				'on_action_js'   => 'window.open("http://localhost/itop-branchs/dev/pages/UI.php?operation=details&class=UserRequest&id=" + aData.id + "&c[menu]=UserRequest%3AOpenRequests");',
			],
			[
				'tooltip'        => 'other actions',
				'icon_css_class' => 'fa-ellipsis-v',
				'on_action_js'   => 'console.log(event);',
			],
		];

* datatable row actions (update)

* datatable row actions (update)

* datatable row actions (add template role)

* datatable row actions (align actions)

* datatable row actions (change template factory make to make standard)

* datatable row actions (use trait to handle row actions)

* datatable row actions (row actions templates)

* datatable row actions (row actions templates)

* datatable row actions (row actions templates)

* datatable row actions (extends to static and form)

* datatable row actions (extends to static and form)

* datatable row actions (code review S)

* datatable row actions (code review S)

* datatable row actions (code review S)

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update templates/base/components/datatable/row-actions/handler.js.twig

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* datatable row actions (code review M)

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update js/dataTables.main.js

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/DataTableUIBlockFactory.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update application/utils.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* datatable row actions (code review M2)

* datatable row actions (code review M3)

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2022-09-26 08:20:28 +02:00
..
2022-02-02 10:35:50 +01:00
2021-03-01 11:44:37 +01:00

Description

This is a brief description of the SASS 7-1 system and how to use it.

File structure

SCSS files are structured following the 7-1 pattern.
@rveitch made a great summary with the following, which can also be found here.

Note: Folders with an * are customizations we made to the original 7-1 pattern to best fit our needs

css/backoffice/
|
| utils/
|   | _variables.scss   # Sass Variables
|   | _functions.scss   # Sass Functions
|   | _mixins.scss      # Sass Mixins
|   | _helpers.scss     # Class & placeholders helpers
|
| vendors/
|   | _bootstrap.scss   # Bootstrap
|   | _jquery-ui.scss   # jQuery UI
|   ...                  # Etc…
|
| base/
|   | _reset.scss       # Reset/normalize
|   | _typography.scss  # Typography rules
|   ...                  # Etc…
|
| components/
|   | _buttons.scss     # Buttons
|   | _carousel.scss    # Carousel
|   | _cover.scss       # Cover
|   | _dropdown.scss    # Dropdown
|   ...                  # Etc…
|
| layout/
|   | _navigation.scss  # Navigation
|   | _grid.scss        # Grid system
|   | _header.scss      # Header
|   | _footer.scss      # Footer
|   | _sidebar.scss     # Sidebar
|   | _forms.scss       # Forms
|   ...                  # Etc…
|
|- *application/         # Elements that are not usable as a standalone (like componants and layouts are) and very application (the backoffice) specific
|   |- display-block
|   |- tabular-fields
|   ...
|
|- *datamodel/           # SCSS / CSS3 variables and CSS classes for PHP classes of the DM that are part of the core (not in a module) and cannot be styled otherwise
|   |- _user.scss
|   ...
|
| pages/
|   | _home.scss        # Home specific styles
|   | _contact.scss     # Contact specific styles
|   ...                  # Etc…
|
|- *blocks-integrations  # Specific rules for the integration of a block with another one, those kind of rules should never be in the block partial directly
|   |- _panel-with-datatable.scss   # Changes the negative margins of the datatable so it overlaps the panel's original padding
|   ...
|
| themes/
|   | _theme.scss       # Default theme
|   | _admin.scss       # Admin theme
|   ...                  # Etc…
|
|
`- _shame.scss           # Shame file, should contain all the ugly hacks (https://sass-guidelin.es/#shame-file)
` main.scss             # Main Sass file

Usage

To avoid common errors, files should be imported in the final file in the following order. Again those are just following the SASS guidelines:

  • Utils
    • Variables
    • Functions
    • Mixins
    • Helpers
  • Vendors
  • Base
  • Components
  • Layout
  • *Application
  • Pages
  • *Block integrations
  • Themes
  • Shame file