Commit fa49386bfe0702dcab7cf3e621a22f5b1349bfd2

Authored by Administrator
1 parent 105da0b0

24.02.16

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