Commit fa49386bfe0702dcab7cf3e621a22f5b1349bfd2

Authored by Administrator
1 parent 105da0b0

24.02.16

frontend/assets/AppAsset.php
@@ -22,7 +22,6 @@ class AppAsset extends AssetBundle @@ -22,7 +22,6 @@ class AppAsset extends AssetBundle
22 'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin', 22 'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin',
23 ]; 23 ];
24 public $js = [ 24 public $js = [
25 - 'http://code.jquery.com/jquery-2.1.4.min.js',  
26 '/js/script.js', 25 '/js/script.js',
27 //'http://maps.google.com/maps/api/js?sensor=false', 26 //'http://maps.google.com/maps/api/js?sensor=false',
28 '/js/markerclusterer.js', 27 '/js/markerclusterer.js',
@@ -34,12 +33,10 @@ class AppAsset extends AssetBundle @@ -34,12 +33,10 @@ class AppAsset extends AssetBundle
34 '/js/autoresize.jquery.js', 33 '/js/autoresize.jquery.js',
35 '/js/jquery.MultiFile.js', 34 '/js/jquery.MultiFile.js',
36 '/js/myGallery_min.js', 35 '/js/myGallery_min.js',
37 -// '/js/forms.js',  
38 'js/fieldWidget.js' 36 'js/fieldWidget.js'
39 ]; 37 ];
40 public $depends = [ 38 public $depends = [
41 - //'yii\web\YiiAsset',  
42 - 39 +// 'yii\web\YiiAsset',
43 ]; 40 ];
44 public $jsOptions = array( 41 public $jsOptions = array(
45 'position' => \yii\web\View::POS_HEAD 42 'position' => \yii\web\View::POS_HEAD
frontend/controllers/SiteController.php
@@ -50,6 +50,10 @@ class SiteController extends Controller @@ -50,6 +50,10 @@ class SiteController extends Controller
50 } 50 }
51 51
52 52
  53 + public function beforeAction($action) {
  54 + $this->enableCsrfValidation = false;
  55 + return parent::beforeAction($action);
  56 + }
53 57
54 public function actionCity($q = null, $id = null) { 58 public function actionCity($q = null, $id = null) {
55 \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; 59 \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
@@ -96,11 +100,13 @@ class SiteController extends Controller @@ -96,11 +100,13 @@ class SiteController extends Controller
96 100
97 public function actionFormsModalFav() 101 public function actionFormsModalFav()
98 { 102 {
  103 +
99 return $this->renderAjax('forms-modal-fav', []); 104 return $this->renderAjax('forms-modal-fav', []);
100 } 105 }
101 106
102 public function actionFormsModalOffer() 107 public function actionFormsModalOffer()
103 { 108 {
  109 +
104 return $this->renderAjax('forms-modal-offer', []); 110 return $this->renderAjax('forms-modal-offer', []);
105 } 111 }
106 112
frontend/views/layouts/main.php
@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 use yii\helpers\Html; 6 use yii\helpers\Html;
7 use yii\widgets\Menu; 7 use yii\widgets\Menu;
8 use frontend\assets\AppAsset; 8 use frontend\assets\AppAsset;
9 -  
10 AppAsset::register($this); 9 AppAsset::register($this);
11 ?> 10 ?>
12 11
@@ -18,12 +17,15 @@ AppAsset::register($this); @@ -18,12 +17,15 @@ AppAsset::register($this);
18 17
19 <head> 18 <head>
20 19
  20 +
  21 +
  22 +
21 <meta charset="<?= Yii::$app->charset ?>"> 23 <meta charset="<?= Yii::$app->charset ?>">
22 24
23 <?= Html::csrfMetaTags() ?> 25 <?= Html::csrfMetaTags() ?>
24 26
25 <title><?= Html::encode($this->title) ?></title> 27 <title><?= Html::encode($this->title) ?></title>
26 - 28 + <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
27 <?php $this->head() ?> 29 <?php $this->head() ?>
28 30
29 </head> 31 </head>