Skip to content

Commit

Permalink
Contao 4.4 Kompatibilität
Browse files Browse the repository at this point in the history
Anpassungen für Contao 4
  • Loading branch information
fenepedia committed Oct 4, 2017
1 parent dd965c5 commit 70036fa
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 79 deletions.
134 changes: 70 additions & 64 deletions assets/academy.css
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,65 +1,71 @@
.ca-list,
.ca-item {
list-style: decimal-leading-zero;
}

.ca-list {
}

.ca-item,
.ca-item a {
font-size: 1rem;
}

.ca-item a {
display: block;
line-height: 2;
}

.ca-item {
border-bottom: 1px solid #e9e9e9;
}

.ca-item:nth-child(even) {
background: #f5f5f5 ;
}

.promoHeader {

}

.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
width: 1060px;
max-width: 100%;
margin: 10px 0;
background: #434343;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.modal-popup {
padding: 10px;
}

.header_videohandbuch {
padding:2px 0 3px 20px;
background-position:left center;
background-repeat:no-repeat;
margin-left:15px;
}

.header_videohandbuch {
background-image:url("/system/modules/contao_academy_client/assets/icon.jpg");
#tl_navigation .tl_level_1_group .group-contao_academy {
background: url(icon_academy.svg) 3px 2px no-repeat;
}

.ca-list,
.ca-item {
list-style: decimal-leading-zero;
}

.ca-list {
margin: 1em 0;
padding: 0;
}

.ca-item,
.ca-item a {
font-size: 1rem;
}

.ca-item a {
line-height: 2;
}

.ca-item {
border-bottom: 1px solid #e9e9e9;
list-style-position: inside;
}

.ca-item:nth-child(even) {
background: #f5f5f5 ;
}

.promoHeader {

}

.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
width: 1060px;
max-width: 100%;
margin: 10px 0;
background: #434343;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.modal-popup {
padding: 10px;
}

.header_videohandbuch {
padding:2px 0 3px 20px;
background-position:left center;
background-repeat:no-repeat;
margin-left:15px;
}

.header_videohandbuch {
background-image:url("/system/modules/contao_academy_client/assets/icon.jpg");
}
1 change: 1 addition & 0 deletions assets/icon_academy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contaoacademy/contao-videohandbuch",
"description": "",
"description": "Contao Open Source CMS Videohandbuch für Anwender",
"keywords": [
"contao",
"videohandbuch",
Expand All @@ -13,12 +13,14 @@
"authors": [
{
"name": "Christian Feneberg",
"email": "[email protected]"
"email": "[email protected]",
"homepage":"http://www.contao-academy.de"
}
],
"require": {
"php": ">=5.4.0",
"contao/core": ">=3.2,<4"
"php": ">=5.4",
"contao/core-bundle":"~3.2 || ^4.4.1",
"contao-community-alliance/composer-plugin":"~2.4 || ~3.0"
},
"extra": {
"contao": {
Expand Down
38 changes: 29 additions & 9 deletions config/config.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

define('academy_client', '1.0');
define('academy_client', '1.2');

if(file_exists(TL_ROOT . '/system/modules/contao_academy_client/classes/AcademyHelper.php')):
$GLOBALS['TL_HOOKS']['outputBackendTemplate'][] = array('AcademyHelper', 'HeaderVideohandbuch');
Expand All @@ -16,22 +16,42 @@
// CSS und JS fuer Backendview Academy
if (TL_MODE == 'BE')
{
$GLOBALS['TL_CSS'][] = 'system/modules/contao_academy_client/assets/academy.css?v10||static';
$GLOBALS['TL_CSS'][] = 'system/modules/contao_academy_client/assets/academy.css?v171004||static';

if(\Input::get('id') && \Input::get('do') == 'Videohandbuch') // Detailseite
{
// jQuery
if (!is_array($GLOBALS['TL_JAVASCRIPT']))
// jQuery no conflict
if (isset($GLOBALS['TL_JAVASCRIPT']) && is_array($GLOBALS['TL_JAVASCRIPT']))
{
$arrAppendJs = $GLOBALS['TL_JAVASCRIPT'];
$GLOBALS['TL_JAVASCRIPT'] = array();
}
else
{
$arrAppendJs = array();
$GLOBALS['TL_JAVASCRIPT'] = array();
}
array_unshift($GLOBALS['TL_JAVASCRIPT'], 'system/modules/contao_academy_client/assets/jquery.noconflict.js');
$jquery_src = 'assets/jquery/core/' . JQUERY . '/jquery.min.js';

//Check Contao 4
if (version_compare(VERSION, '4.4', '<'))
{
// Code für Contao 3.5
$jquery_src = 'assets/jquery/core/' . JQUERY . '/jquery.min.js';
$GLOBALS['TL_JAVASCRIPT'][] = 'assets/jquery/colorbox/' . COLORBOX . '/js/colorbox.min.js';
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/' . COLORBOX . '/css/colorbox.min.css||static';
}
else
{
// Code für Versionen ab 4.4
$jquery_src = 'assets/jquery/js/jquery.min.js';
$GLOBALS['TL_JAVASCRIPT'][] = 'assets/colorbox/js/colorbox.min.js';
$GLOBALS['TL_CSS'][] = 'assets/colorbox/css/colorbox.min.css||static';
}


//
array_unshift($GLOBALS['TL_JAVASCRIPT'], $jquery_src);

//Colorbox
$GLOBALS['TL_JAVASCRIPT'][] = 'assets/jquery/colorbox/' . COLORBOX . '/js/colorbox.min.js';
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/' . COLORBOX . '/css/colorbox.min.css||static';
}
}

Expand Down
2 changes: 0 additions & 2 deletions templates/be_contao_academy_details.html5
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<ol class="ca-list">
<?php foreach ($this->Videos as $objVideo): ?>
<li class="ca-item video_<?= $objVideo->videoid ?>"">
<div class="video-item">
<a data-lightbox="inline" data-videoid="<?= $objVideo->videoid ?>"
class="video-open"
href="#vimeo_<?= $objVideo->videoid ?>"><?=$objVideo->headline ?>
Expand All @@ -38,7 +37,6 @@
<?php endif; ?>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ol>
Expand Down

0 comments on commit 70036fa

Please sign in to comment.