Skip to content
Snippets Groups Projects
Commit 2f1ee2e9 authored by Hannes Kirsman's avatar Hannes Kirsman Committed by Hannes Kirsman
Browse files

Issue #3274569 by hkirsman: Disable in admin

parent f9f8910c
Branches
No related tags found
No related merge requests found
......@@ -11,6 +11,11 @@ use Drupal\Core\Render\Markup;
* Implements hook_page_attachments().
*/
function stacktable_page_attachments(array &$page) {
// Don't enable in admin.
if (\Drupal::service('router.admin_context')->isAdminRoute()) {
return;
}
$config = \Drupal::config('stacktable.settings');
$page['#attached']['library'][] = 'stacktable/stacktablejs_init';
......@@ -38,6 +43,11 @@ function stacktable_page_attachments(array &$page) {
* Adds label for the placeholder for tables that are opened in modal.
*/
function stacktable_preprocess_html(&$variables) {
// Don't enable in admin.
if (\Drupal::service('router.admin_context')->isAdminRoute()) {
return;
}
$config = \Drupal::config('stacktable.settings');
// Sub-feature of "On demand" method is opening the table in modal - add
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment