diff --git a/application/core/LS_Twig_Extension.php b/application/core/LS_Twig_Extension.php index a321eede99a..fbe7837f31d 100644 --- a/application/core/LS_Twig_Extension.php +++ b/application/core/LS_Twig_Extension.php @@ -103,8 +103,8 @@ public static function registerGeneralScript($sGeneralScriptFileName, $position= */ public static function registerTemplateScript($sTemplateScriptFileName, $position=null, array $htmlOptions=array()) { - $oTemplate = self::getTemplateForRessource($sTemplateCssFileName); - Yii::app()->getClientScript()->packages[$oTemplate->sPackageName]['js'][]=$sTemplateCssFileName; + $oTemplate = self::getTemplateForRessource($sTemplateScriptFileName); + Yii::app()->getClientScript()->packages[$oTemplate->sPackageName]['js'][]=$sTemplateScriptFileName; } /** diff --git a/application/models/TemplateConfiguration.php b/application/models/TemplateConfiguration.php index e5cfc4d434e..29826c77b75 100644 --- a/application/models/TemplateConfiguration.php +++ b/application/models/TemplateConfiguration.php @@ -486,29 +486,32 @@ public function getOptionPage() protected function getFilesToLoad($oTemplate, $sType) { if (empty($this->aFilesToLoad)){ - $sField = 'files_'.$sType; - $jFiles = $oTemplate->$sField; - $this->aFilesToLoad = array(); + } + + $sField = 'files_'.$sType; + $jFiles = $oTemplate->$sField; + $this->aFilesToLoad[$sType] = array(); - if(!empty($jFiles)){ - $oFiles = json_decode($jFiles); - foreach($oFiles as $action => $aFileList){ - if ($action == "add" || $action == "replace"){ - // Specific inheritance of one of the value of the json array - if ($aFileList[0] == 'inherit'){ - $aParentjFiles = (array) json_decode($oTemplate->getParentConfiguration->$sField); - $aFileList = $aParentjFiles[$action]; - } + if(!empty($jFiles)){ + $oFiles = json_decode($jFiles); + foreach($oFiles as $action => $aFileList){ + if ($action == "add" || $action == "replace"){ - $this->aFilesToLoad = array_merge($this->aFilesToLoad, $aFileList); + // Specific inheritance of one of the value of the json array + if ($aFileList[0] == 'inherit'){ + $aParentjFiles = (array) json_decode($oTemplate->getParentConfiguration->$sField); + $aFileList = $aParentjFiles[$action]; } + + $this->aFilesToLoad[$sType] = array_merge($this->aFilesToLoad[$sType], $aFileList); } } } + - return $this->aFilesToLoad; + return $this->aFilesToLoad[$sType]; } /** @@ -642,30 +645,34 @@ protected function addMotherTemplatePackage($packages) protected function getFrameworkAssetsToReplace( $sType, $bInlcudeRemove = false) { if (empty($this->aFrameworkAssetsToReplace)){ - $sFieldName = 'cssframework_'.$sType; - $aFieldValue = (array) json_decode($this->$sFieldName); - $this->aFrameworkAssetsToReplace = array(); - if (!empty( $aFieldValue )){ - $this->aFrameworkAssetsToReplace = (array) $aFieldValue['replace'] ; - - // Inner field inheritance - foreach ($this->aFrameworkAssetsToReplace as $key => $aFiles){ - foreach($aFiles as $sReplacement){ - if ( $sReplacement == "inherit"){ - $aParentReplacement = $this->getParentConfiguration()->getFrameworkAssetsToReplace($sType); - $this->aFrameworkAssetsToReplace[$key][1] = $aParentReplacement[$key][1]; - } + } + + $this->aFrameworkAssetsToReplace[$sType] = array(); + + $sFieldName = 'cssframework_'.$sType; + $aFieldValue = (array) json_decode($this->$sFieldName); + + if (!empty( $aFieldValue )){ + $this->aFrameworkAssetsToReplace[$sType] = (array) $aFieldValue['replace'] ; + + // Inner field inheritance + foreach ($this->aFrameworkAssetsToReplace[$sType] as $key => $aFiles){ + foreach($aFiles as $sReplacement){ + if ( $sReplacement == "inherit"){ + $aParentReplacement = $this->getParentConfiguration()->getFrameworkAssetsToReplace($sType); + $this->aFrameworkAssetsToReplace[$sType][$key][1] = $aParentReplacement[$key][1]; } } + } - if($bInlcudeRemove && isset($aFieldValue['remove'])){ - $this->aFrameworkAssetsToReplace = array_merge($this->aFrameworkAssetsToReplace, (array) $aFieldValue['remove'] ); - } + if($bInlcudeRemove && isset($aFieldValue['remove'])){ + $this->aFrameworkAssetsToReplace[$sType] = array_merge($this->aFrameworkAssetsToReplace, (array) $aFieldValue['remove'] ); } } + - return $this->aFrameworkAssetsToReplace; + return $this->aFrameworkAssetsToReplace[$sType]; } /** @@ -677,16 +684,19 @@ protected function getFrameworkAssetsToReplace( $sType, $bInlcudeRemove = false) protected function getFrameworkAssetsReplacement( $sType ) { if (empty($this->aReplacements)){ - $aFrameworkAssetsToReplace = $this->getFrameworkAssetsToReplace($sType); - $this->aReplacements = array(); - foreach($aFrameworkAssetsToReplace as $key => $aAsset ){ - $aReplace = $aAsset[1]; - $this->aReplacements[] = $aReplace; - } } + $this->aReplacements[$sType] = array(); + + $aFrameworkAssetsToReplace = $this->getFrameworkAssetsToReplace($sType); + + foreach($aFrameworkAssetsToReplace as $key => $aAsset ){ + $aReplace = $aAsset[1]; + $this->aReplacements[$sType][] = $aReplace; + } + - return $this->aReplacements; + return $this->aReplacements[$sType]; } diff --git a/templates/default/css/animate.css b/templates/default/css/animate.css index 1e79e03adec..b4f208da24f 100644 --- a/templates/default/css/animate.css +++ b/templates/default/css/animate.css @@ -1,4 +1,4 @@ -@charset "UTF-8"; +/* @charset "UTF-8"; */ /*! * animate.css -http://daneden.me/animate diff --git a/templates/default/css/flatly.css b/templates/default/css/flatly.css index c3c1f3650e8..2abfc0ac3fb 100644 --- a/templates/default/css/flatly.css +++ b/templates/default/css/flatly.css @@ -11,7 +11,9 @@ */ /* Replace google font by included font (see mantis) */ /* @see : http://www.latofonts.com/lato-free-fonts/ */ -/* Webfont: Lato-Regular */@font-face { + +/* Webfont: Lato-Regular */ +@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; @@ -23,7 +25,8 @@ url('../fonts/Lato-Regular.ttf') format('truetype'); } -/* Webfont: Lato-Italic */@font-face { +/* Webfont: Lato-Italic */ +@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; @@ -35,7 +38,8 @@ url('../fonts/Lato-Italic.ttf') format('truetype'); } -/* Webfont: Lato-Bold */@font-face { +/* Webfont: Lato-Bold */ +@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; @@ -48,7 +52,8 @@ } -/* Webfont: Lato-BoldItalic */@font-face { +/* Webfont: Lato-BoldItalic */ +@font-face { font-family: 'Lato'; font-style: italic; font-weight: 700; diff --git a/templates/default/css/template.css b/templates/default/css/template.css index 5731f6a0ff8..5415b370de6 100644 --- a/templates/default/css/template.css +++ b/templates/default/css/template.css @@ -1,13 +1,9 @@ -body -{ +body { padding-bottom: 10px; background-color: #f6f6f6; -} -/* The header */ -body -{ padding-top: 60px;/* now is redefine in JS to fit any title length */ } + .navbar-action-link{ padding-right:1em; /* really close to window without */ }