Kaynağa Gözat

Backend : correction url redirection JS change-etablissement

prodstable
keun 6 yıl önce
ebeveyn
işleme
cdef1910c4
2 değiştirilmiş dosya ile 7 ekleme ve 3 silme
  1. +1
    -0
      backend/views/layouts/main.php
  2. +6
    -3
      backend/web/js/lechatdesnoisettes.js

+ 1
- 0
backend/views/layouts/main.php Dosyayı Görüntüle

@@ -28,6 +28,7 @@ if(!Yii::$app->user->isGuest)
<meta charset="<?= Yii::$app->charset ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="baseurl" content="<?= Yii::$app->urlManagerBackend->baseUrl ; ?>">
<meta name="baseurl-absolute" content="<?= Yii::$app->urlManagerBackend->getHostInfo().Yii::$app->urlManagerBackend->baseUrl; ?>">
<link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?> - La boîte à pain</title>

+ 6
- 3
backend/web/js/lechatdesnoisettes.js Dosyayı Görüntüle

@@ -20,8 +20,11 @@ $(document).ready(function() {

var UrlManager = {
getBaseUrl: function() {
var base_url = $('meta[name=baseurl]').attr('content')+'/' ;
return base_url ;
return $('meta[name=baseurl]').attr('content')+'/' ;
},
getBaseUrlAbsolute: function() {
return $('meta[name=baseurl-absolute]').attr('content')+'/' ;
}
};

@@ -154,7 +157,7 @@ function chat_points_vente_acces_event() {

function chat_select_etablissement() {
$('select[name="select_etablissement"]').change(function() {
window.location.href = UrlManager.getBaseUrl()+'/site/change-etablissement?id='+$(this).val() ;
window.location.href = UrlManager.getBaseUrlAbsolute()+'/site/change-etablissement?id='+$(this).val() ;
}) ;
}


Yükleniyor…
İptal
Kaydet