leonam-carlos

TWindow OVER TWindow - Close in Order!

May 1st, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @Author: SisSoftwares WEB (Sistemas PHP)
  5.  * @Date:   2019-05-01 23:48:50
  6.  * @Last Modified by:   Usuario
  7.  * @Last Modified time: 2019-05-02 00:05:45
  8.  */
  9.  
  10. /**
  11.  * SingleWindowView
  12.  *
  13.  * @version    1.0
  14.  * @package    samples
  15.  * @subpackage tutor
  16.  * @author     Pablo Dall'Oglio
  17.  * @copyright  Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
  18.  * @license    http://www.adianti.com.br/framework-license
  19.  */
  20. class TWindowMulti extends TWindow
  21. {
  22.     /**
  23.      * Constructor method
  24.      */
  25.     public function __construct()
  26.     {
  27.         parent::__construct();
  28.         parent::setTitle('Window');
  29.  
  30.         // with: 500, height: automatic
  31.         parent::setSize(0.6, null); // use 0.6, 0.4 (for relative sizes 60%, 40%)
  32.  
  33.         // create the HTML Renderer
  34.         $this->html = new THtmlRenderer('app/resources/page.html');
  35.  
  36.         $replaces = [];
  37.         $replaces['title']  = 'Panel title';
  38.         $replaces['footer'] = 'Panel footer';
  39.         $replaces['name']   = 'Someone famous';
  40.  
  41.         // replace the main section variables
  42.         $this->html->enableSection('main', $replaces);
  43.  
  44.         $window = TWindow::create('TWindow - SEGUNDA!', 0.8, null);
  45.  
  46.         // https://www.adianti.com.br/forum/pt/view_3362?twindow-que-invoca-outro-twindow-versao-2
  47.         $window->setStackOrder(4000);
  48.  
  49.         $html_2 = new THtmlRenderer('app/resources/page.html');
  50.  
  51.         $replaces = [];
  52.         $replaces['title']  = 'Panel title - SEGUNDO!';
  53.         $replaces['footer'] = 'Panel footer - SEGUNDO!';
  54.         $replaces['name']   = 'Someone famous - SEGUNDO!';
  55.  
  56.         // replace the main section variables
  57.         $html_2->enableSection('main', $replaces);
  58.  
  59.         $window->add($html_2);
  60.  
  61.         parent::add($this->html);
  62.         parent::add($window);
  63.         // parent::add($this->html);
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment