Commit 3670604529770f5a23bd059782793e8c879f3dc7

Authored by Виталий
1 parent 0cdfad3f

Веталь

frontend/views/layouts/main.php
... ... @@ -29,7 +29,7 @@
29 29 $('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'});
30 30 ", View::POS_READY, 'call');
31 31  
32   -$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_HEAD]);
  32 +$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]);
33 33 $this->registerJs ("
34 34 var activeTab = $('.social li:first a').attr('id');
35 35 $('.'+activeTab+'_box').show();
... ...
frontend/web/js/fix_height.js
  1 +$(document).ready(function(){
  2 + autoHeight();
  3 + function autoHeight() {
  4 +
  5 + footerBottom();
  6 + resizeFooterBottom();
  7 +
  8 + function footerBottom(){
  9 + var heightHeader1 = $('nav.top').height()
  10 + var heightHeader2 = $('.section-box-header').height()
  11 + var heightHeader3 = $('.menu').height()
  12 + var heightHeader = heightHeader1+heightHeader2+heightHeader3
  13 + var heightFooter1 = $('.bottom').height()
  14 + var heightFooter2 = $('.fotter').height()
  15 + var heightFooter = heightFooter1+heightFooter2
  16 + var windowHeight = $(window).height()
  17 + $('.wrapper_all').css({minHeight:windowHeight-heightHeader-heightFooter})
  18 + }
  19 +
  20 + function resizeFooterBottom(){
  21 + $(window).resize(function(){
  22 + footerBottom();
  23 + })
  24 + }
  25 + }
  26 +})
  27 +
  28 +
  29 +
  30 +
  31 +
  32 +
  33 +
... ...