Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from derhaeuptling/hotfix/2.0.1
Browse files Browse the repository at this point in the history
Hotfix/2.0.1
  • Loading branch information
Martin Schwenzer committed Jul 26, 2017
2 parents 3964656 + 6df7c36 commit 1277587
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
39 changes: 20 additions & 19 deletions dca/tl_article.php
Expand Up @@ -12,29 +12,30 @@
/**
* Add operations
*/
$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnDesktop'] = [
'label' => &$GLOBALS['TL_LANG']['tl_article']['toggleOnDesktop'],
'attributes' => 'onclick="Backend.getScrollOffset();"',
'haste_ajax_operation' => [
'field' => 'hideOnDesktop',
'options' => [
['value' => '', 'icon' => 'system/modules/mobilecontent/assets/desktop-visible.svg'],
['value' => '1', 'icon' => 'system/modules/mobilecontent/assets/desktop-invisible.svg'],
array_insert($GLOBALS['TL_DCA']['tl_article']['list']['operations'], 6, [
'toggleOnDesktop' => [
'label' => &$GLOBALS['TL_LANG']['tl_article']['toggleOnDesktop'],
'attributes' => 'onclick="Backend.getScrollOffset();"',
'haste_ajax_operation' => [
'field' => 'hideOnDesktop',
'options' => [
['value' => '', 'icon' => 'system/modules/mobilecontent/assets/desktop-visible.svg'],
['value' => '1', 'icon' => 'system/modules/mobilecontent/assets/desktop-invisible.svg'],
],
],
],
];

$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnMobile'] = [
'label' => &$GLOBALS['TL_LANG']['tl_article']['toggleOnMobile'],
'attributes' => 'onclick="Backend.getScrollOffset();"',
'haste_ajax_operation' => [
'field' => 'hideOnMobile',
'options' => [
['value' => '', 'icon' => 'system/modules/mobilecontent/assets/mobile-visible.svg'],
['value' => '1', 'icon' => 'system/modules/mobilecontent/assets/mobile-invisible.svg'],
'toggleOnMobile' => [
'label' => &$GLOBALS['TL_LANG']['tl_article']['toggleOnMobile'],
'attributes' => 'onclick="Backend.getScrollOffset();"',
'haste_ajax_operation' => [
'field' => 'hideOnMobile',
'options' => [
['value' => '', 'icon' => 'system/modules/mobilecontent/assets/mobile-visible.svg'],
['value' => '1', 'icon' => 'system/modules/mobilecontent/assets/mobile-invisible.svg'],
],
],
],
];
]);

/**
* Extend palettes
Expand Down
6 changes: 4 additions & 2 deletions dca/tl_content.php
Expand Up @@ -18,8 +18,10 @@
/**
* Add operations
*/
$GLOBALS['TL_DCA']['tl_content']['list']['operations']['toggleOnDesktop'] = &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnDesktop'];
$GLOBALS['TL_DCA']['tl_content']['list']['operations']['toggleOnMobile'] = &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnMobile'];
array_insert($GLOBALS['TL_DCA']['tl_content']['list']['operations'], 5, [
'toggleOnDesktop' => &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnDesktop'],
'toggleOnMobile' => &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnMobile'],
]);

/**
* Extend palettes
Expand Down
6 changes: 4 additions & 2 deletions dca/tl_module.php
Expand Up @@ -18,8 +18,10 @@
/**
* Add operations
*/
$GLOBALS['TL_DCA']['tl_module']['list']['operations']['toggleOnDesktop'] = &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnDesktop'];
$GLOBALS['TL_DCA']['tl_module']['list']['operations']['toggleOnMobile'] = &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnMobile'];
array_insert($GLOBALS['TL_DCA']['tl_module']['list']['operations'], 4, [
'toggleOnDesktop' => &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnDesktop'],
'toggleOnMobile' => &$GLOBALS['TL_DCA']['tl_article']['list']['operations']['toggleOnMobile'],
]);

/**
* Add palettes
Expand Down

0 comments on commit 1277587

Please sign in to comment.