Blame view

backend/views/site/stab.php 470 Bytes
c39f00f8   Alexey Boroda   -Am charts ready
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  <?php
      use speixoto\amcharts\AmChartAsset;
      use yii\web\View;
      
      /**
       * @var View $this
       */
      
      AmChartAsset::register($this);
      
      $js = <<<JS
    $.ajax({
              url: "site/analytics",
              type: "GET",
              success: function(data) {
                  console.log(data);
                  $('#stab').replaceWith(data);
              }
          });
  JS;
      
      $this->registerJs($js, View::POS_READY);
  ?>
  
  <div id="stab"></div>