Browse Source

Merge branch 'master' into dev

refactoring
keun 6 years ago
parent
commit
7a2e8b8384
2 changed files with 7 additions and 3 deletions
  1. +1
    -0
      backend/views/layouts/main.php
  2. +6
    -3
      backend/web/js/lechatdesnoisettes.js

+ 1
- 0
backend/views/layouts/main.php View File

<meta charset="<?= Yii::$app->charset ?>"> <meta charset="<?= Yii::$app->charset ?>">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="baseurl" content="<?= Yii::$app->urlManagerBackend->baseUrl ; ?>"> <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" /> <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
<?= Html::csrfMetaTags() ?> <?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?> - La boîte à pain</title> <title><?= Html::encode($this->title) ?> - La boîte à pain</title>

+ 6
- 3
backend/web/js/lechatdesnoisettes.js View File



var UrlManager = { var UrlManager = {
getBaseUrl: function() { 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')+'/' ;
} }
}; };




function chat_select_etablissement() { function chat_select_etablissement() {
$('select[name="select_etablissement"]').change(function() { $('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() ;
}) ; }) ;
} }



Loading…
Cancel
Save