Blame view

backend/modules/page/views/iframe.php 493 Bytes
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  <?php
  use yii\helpers\Url;
  
  /**
   *
   * @author FilamentV <vortex.filament@gmail.com>
   * @copyright (c), Thread
   */
  ?>
  <iframe onload="autoResize(this);" class="iframebox" src="<?= Url::toRoute($link) ?>"
          style="width: 100%; border: 0; height: 10px;">
  </iframe>
  <script type="text/javascript">
      function autoResize(iframe) {
          console.log($(iframe).contents().find('#wrapper').height());
          $(iframe).height($(iframe).contents().find('#wrapper').height());
      }
  </script>