forked from ZwiiCMS-Team/ZwiiCampus
1410 changement d'id
This commit is contained in:
parent
a0ffcca22a
commit
21c49d8e53
@ -501,7 +501,7 @@ class layout extends common
|
|||||||
$this->getData(['theme', 'menu', 'selectSpace']) === true
|
$this->getData(['theme', 'menu', 'selectSpace']) === true
|
||||||
) {
|
) {
|
||||||
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
|
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
|
||||||
$itemsRight .= '<li><select id="barSelectCourse" >';
|
$itemsRight .= '<li><select id="menuSelectCourse" >';
|
||||||
$itemsRight .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
$itemsRight .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
||||||
foreach ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group')) as $courseId => $value) {
|
foreach ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group')) as $courseId => $value) {
|
||||||
$itemsRight .= '<option name="' . $this->getData(['course', $courseId, 'title']) . '" value="' . helper::baseUrl(true) . 'course/swap/' . $courseId . '" ' . ($courseId === self::$siteContent ? 'selected' : '') . '>' . $this->getData(['course', $courseId, 'title']) . '</option>';
|
$itemsRight .= '<option name="' . $this->getData(['course', $courseId, 'title']) . '" value="' . helper::baseUrl(true) . 'course/swap/' . $courseId . '" ' . ($courseId === self::$siteContent ? 'selected' : '') . '>' . $this->getData(['course', $courseId, 'title']) . '</option>';
|
||||||
|
@ -364,7 +364,7 @@ class core extends common
|
|||||||
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}';
|
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}';
|
||||||
$colors = helper::colorVariants($this->getData(['admin', 'backgroundBlockColor']));
|
$colors = helper::colorVariants($this->getData(['admin', 'backgroundBlockColor']));
|
||||||
$css .= '.buttonTab, .block {border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}.buttonTab, .block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
|
$css .= '.buttonTab, .block {border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}.buttonTab, .block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
|
||||||
$css .= 'table tr,input[type=email],input[type=date],input[type=time],input[type=month],input[type=week],input[type=datetime-local],input[type=text],input[type=password],select:not(#barSelectCourse),select:not(#barSelectPage),textarea:not(.editorWysiwyg), textarea:not(.editorWysiwygComment),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}';
|
$css .= 'table tr,input[type=email],input[type=date],input[type=time],input[type=month],input[type=week],input[type=datetime-local],input[type=text],input[type=password],select:not(#barSelectCourse),select:not(#menuSelectCourse),select:not(#barSelectPage),textarea:not(.editorWysiwyg), textarea:not(.editorWysiwygComment),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}';
|
||||||
// Bordure du contour TinyMCE
|
// Bordure du contour TinyMCE
|
||||||
$css .= '.mce-tinymce{border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . '!important;}';
|
$css .= '.mce-tinymce{border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . '!important;}';
|
||||||
// Enregistre la personnalisation
|
// Enregistre la personnalisation
|
||||||
|
@ -525,7 +525,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sélection d'une langue du site
|
* Sélection d'un espace du site
|
||||||
*/
|
*/
|
||||||
$("select#barSelectCourse").on("change", function () {
|
$("select#barSelectCourse").on("change", function () {
|
||||||
// La langue courante ne déclenche pas de chargement
|
// La langue courante ne déclenche pas de chargement
|
||||||
@ -545,7 +545,30 @@ $(document).ready(function () {
|
|||||||
var select = document.getElementById("barSelectCourse");
|
var select = document.getElementById("barSelectCourse");
|
||||||
var selectedOption = select.options[select.selectedIndex];
|
var selectedOption = select.options[select.selectedIndex];
|
||||||
if (selectedOption.value !== "") {
|
if (selectedOption.value !== "") {
|
||||||
window.location = selectedOption.value; }
|
window.location = selectedOption.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("select#menuSelectCourse").on("change", function () {
|
||||||
|
// La langue courante ne déclenche pas de chargement
|
||||||
|
var langSelected = $(this).val();
|
||||||
|
var langSelected = langSelected.split("/");
|
||||||
|
// Lit le cookie de langue
|
||||||
|
var langSession = "<?php echo isset($_SESSION['ZWII_SITE_CONTENT']) ? $_SESSION['ZWII_SITE_CONTENT'] : '';?>";
|
||||||
|
// Découpe l'URL pour exclure le changement de page avec le thème
|
||||||
|
var url = window.location;
|
||||||
|
var currentUrl = url.href.split("/");
|
||||||
|
// Change si différent, corrige le problème avec le thème et le rechargement de la langue.
|
||||||
|
if ((currentUrl !== "?theme" ||
|
||||||
|
currentUrl !== "theme") &&
|
||||||
|
langSelected[6] !== langSession
|
||||||
|
) {
|
||||||
|
var select = document.getElementById("menuSelectCourse");
|
||||||
|
var selectedOption = select.options[select.selectedIndex];
|
||||||
|
if (selectedOption.value !== "") {
|
||||||
|
window.location = selectedOption.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -604,11 +604,11 @@ nav li ul li {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li ul #barSelectCourse {
|
nav li ul #menuSelectCourse {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav #barSelectCourse {
|
nav #menuSelectCourse {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: #111112;
|
color: #111112;
|
||||||
|
Loading…
Reference in New Issue
Block a user