From 8b3e027552c43de63855bee0e72ea6736002c6b7 Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Fri, 10 May 2019 16:45:38 +0200 Subject: [PATCH] Remove the contao-components/mediaelement component (see #332) --- composer.json | 1 - src/Resources/contao/dca/tl_image_size.php | 20 +------------------ .../contao/dca/tl_image_size_item.php | 20 +------------------ .../templates/jquery/j_mediaelement.html5 | 20 ------------------- .../contao/templates/js/js_mediaelement.html5 | 19 ------------------ 5 files changed, 2 insertions(+), 78 deletions(-) delete mode 100644 src/Resources/contao/templates/jquery/j_mediaelement.html5 delete mode 100644 src/Resources/contao/templates/js/js_mediaelement.html5 diff --git a/composer.json b/composer.json index ddfa3c6601..81c551c593 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,6 @@ "contao-components/jquery": "^1.12 || ^2.0 || ^3.0", "contao-components/jquery-ui": "^1.11.4", "contao-components/mediabox": "^1.5", - "contao-components/mediaelement": "^4.1", "contao-components/mootools": "^1.6.0.1", "contao-components/simplemodal": "^2.1", "contao-components/swipe": "^2.0.3", diff --git a/src/Resources/contao/dca/tl_image_size.php b/src/Resources/contao/dca/tl_image_size.php index f525129551..d3909ff553 100644 --- a/src/Resources/contao/dca/tl_image_size.php +++ b/src/Resources/contao/dca/tl_image_size.php @@ -22,8 +22,7 @@ 'markAsCopy' => 'name', 'onload_callback' => array ( - array('tl_image_size', 'checkPermission'), - array('tl_image_size', 'showJsLibraryHint') + array('tl_image_size', 'checkPermission') ), 'oncreate_callback' => array ( @@ -353,23 +352,6 @@ public function listImageSize($row) return $html; } - /** - * Show a hint if a JavaScript library needs to be included in the page layout - */ - public function showJsLibraryHint() - { - if ($_POST || Contao\Input::get('act') != 'edit') - { - return; - } - - // Return if the user cannot access the layout module (see #6190) - if (!$this->User->hasAccess('themes', 'modules') || !$this->User->hasAccess('layout', 'themes')) - { - return; - } - } - /** * Return the edit header button * diff --git a/src/Resources/contao/dca/tl_image_size_item.php b/src/Resources/contao/dca/tl_image_size_item.php index 552feceb82..b1db86458b 100644 --- a/src/Resources/contao/dca/tl_image_size_item.php +++ b/src/Resources/contao/dca/tl_image_size_item.php @@ -22,8 +22,7 @@ 'markAsCopy' => 'media', 'onload_callback' => array ( - array('tl_image_size_item', 'checkPermission'), - array('tl_image_size_item', 'showJsLibraryHint') + array('tl_image_size_item', 'checkPermission') ), 'sql' => array ( @@ -261,23 +260,6 @@ public function listImageSizeItem($row) return $html; } - /** - * Show a hint if a JavaScript library needs to be included in the page layout - */ - public function showJsLibraryHint() - { - if ($_POST || Contao\Input::get('act') != 'edit') - { - return; - } - - // Return if the user cannot access the layout module (see #6190) - if (!$this->User->hasAccess('themes', 'modules') || !$this->User->hasAccess('layout', 'themes')) - { - return; - } - } - /** * Return the "toggle visibility" button * diff --git a/src/Resources/contao/templates/jquery/j_mediaelement.html5 b/src/Resources/contao/templates/jquery/j_mediaelement.html5 deleted file mode 100644 index 69e22536bd..0000000000 --- a/src/Resources/contao/templates/jquery/j_mediaelement.html5 +++ /dev/null @@ -1,20 +0,0 @@ - - - - diff --git a/src/Resources/contao/templates/js/js_mediaelement.html5 b/src/Resources/contao/templates/js/js_mediaelement.html5 deleted file mode 100644 index 3999a34934..0000000000 --- a/src/Resources/contao/templates/js/js_mediaelement.html5 +++ /dev/null @@ -1,19 +0,0 @@ - - - -