Exemplo n.º 1
0
 public function __construct($message, $title = "ATENÇÃO", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $warningPicture = new HTMLImage(AppConfig::baseIcons() . "dialog-warning-48.png");
     $this->dialog->setPosition(50, 50);
     $buttTop = $this->panel->getHeight() - 30;
     $buttLeft = $this->panel->getWidth() - 100;
     $this->panel->appendChild($this->btnOk, $buttTop, $buttLeft);
     $this->panel->appendChild($warningPicture, 25, 25);
     $this->dialog->appendChild($this->panel);
 }
Exemplo n.º 2
0
 public function __construct($message, $title = "INFORMATIVO.", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $info = new HTMLImage(AppConfig::baseIcons() . "web-basic.png");
     $this->dialog->setPosition(0, 0);
     //$buttTop= $this->panel->getHeight()-30;
     //$buttLeft = $this->panel->getWidth()-10;
     $windowId = $this->dialog->getWindowId();
     $this->btnConfirm->onclick = "p=document.getElementById('{$windowId}');(p.parentNode.removeChild(p));";
     $this->panel->appendChild($info, 20, 10);
     $this->dialog->appendChild($this->panel);
 }
Exemplo n.º 3
0
 public function __construct($message, $title = "INFORMATIVO", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $errorPicture = new HTMLImage(AppConfig::baseIcons() . "dialog-error-48.png");
     $this->dialog->setPosition(50, 50);
     $buttTop = $this->panel->getHeight() - 30;
     $buttLeft = $this->panel->getWidth() - 100;
     //$this->btnCancel->src = parent::ICON_PATH."/icons/button-cancel-light.png";
     $this->panel->appendChild($this->btnCancel, $buttTop, $buttLeft);
     $this->panel->appendChild($errorPicture, 25, 15);
     $this->dialog->appendChild($this->panel);
 }
Exemplo n.º 4
0
 /**
  * Cria uma caixa de diálogo de informação
  * @param string $message Mensagem a ser exibida
  * @param string $title título da caixa de diálogo
  * @param int $width Largura da caixa de diálogo
  * @param int $height Altura da caixa de diálogo
  */
 public function __construct($message, $title = "INFORMAÇÃO", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $info = new HTMLImage(AppConfig::baseIcons() . "dialog-information-48.png");
     $this->dialog->setPosition(50, 50);
     $buttTop = $this->panel->getHeight() - 30;
     $buttLeft = $this->panel->getWidth() - 100;
     $windowId = $this->dialog->getWindowId();
     $this->btnOk->{IMouseEvent::CLICK} = "\$('#{$windowId}').fadeOut('slow', function(){p=document.getElementById('{$windowId}');(p.parentNode.removeChild(p));});";
     $this->panel->appendChild($this->btnOk, $buttTop, $buttLeft);
     $this->panel->appendChild($info, 25, 15);
     $this->dialog->appendChild($this->panel);
 }
Exemplo n.º 5
0
 public function __construct($message, $title = "Solicitação.", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $this->dialog->setPosition(50, 50);
     $questionPicture = new HTMLImage(AppConfig::baseIcons() . "dialog-question-48.png");
     $buttTop = $this->panel->getHeight() - 30;
     $buttLeft = $this->panel->getWidth() - 100;
     $this->btnConfirm->src = AppConfig::baseIcons() . "button-ok-light.png";
     $windowId = $this->dialog->getWindowId();
     $this->btnConfirm->{IMouseEvent::CLICK} = "\$('#{$windowId}').fadeOut('slow', function(){p=document.getElementById('{$windowId}');(p.parentNode.removeChild(p));});";
     $this->panel->appendChild($this->btnConfirm, $buttTop, $buttLeft - 110);
     $this->panel->appendChild($this->btnCancel, $buttTop, $buttLeft);
     $this->panel->appendChild($questionPicture, 25, 15);
     $this->dialog->appendChild($this->panel);
 }
Exemplo n.º 6
0
 public function __construct($title = '', $width = 350, $height = 100)
 {
     $this->content = [];
     $this->title = (string) $title;
     $this->titleAlign = 'left';
     $this->width = intval($width);
     $this->height = intval($height);
     $this->windowId = "HTMLWindow" . self::$counter++ . "_" . date('his');
     self::$counter++;
     $this->closeIcon = new HTMLImage(AppConfig::baseIcons() . "closing.png");
     $this->closeIcon->setAttribute('id', 'closeButton');
     $this->closeIcon->setStyle('cursor', 'pointer');
     $this->closeIcon->setStyle('float', 'right');
     $this->closeIcon->{IMouseEvent::CLICK} = "\$('#{$this->windowId}').fadeOut('slow');";
     $this->window = new HTMLElement('div');
     $this->window->setAttribute('id', $this->windowId);
     $this->window->setAttribute('class', 'ui-widget ui-corner-bottom');
     $this->window->setStyle('position', 'fixed');
     $this->zIndex = self::$counter + 1000;
 }
Exemplo n.º 7
0
 public function __construct($message = "", $title = "Login...", $width = 360, $height = 180)
 {
     parent::__construct($message, $title, $width, $height);
     $this->dialog->setPosition(150, 150);
     self::$icon = new HTMLImage(AppConfig::baseIcons() . "dialog-password.png");
     $this->form = new HTMLElement("form");
     $this->tblLogin = new HTMLTable();
     $txtLogin = new HTMLInputText("login");
     $txtPasswd = new HTMLInputPassword("passwd");
     $hiddenFrom = new HTMLInputHidden("fromPage");
     $this->form->name = "fLogin";
     $this->form->id = "fLogin";
     $this->form->method = "post";
     $this->form->enctype = "multipart/form-data";
     $this->form->action = "../processa/";
     $hiddenFrom->setValue("clogin");
     //----------------------------------------
     $nameRow = $this->tblLogin->insertRow();
     $nameCol = $nameRow->insertCell("Usuário: ");
     $userCol = $nameRow->insertCell($txtLogin);
     $userCol->colspan = "2";
     //----------------------------------------
     $loginRow = $this->tblLogin->insertRow();
     $loginCol = $loginRow->insertCell("Senha:");
     $loginCol = $loginRow->insertCell($txtPasswd);
     $loginCol->colspan = "2";
     //----------------------------------------
     $btnRow = $this->tblLogin->insertRow();
     $hidCol = $btnRow->insertCell("");
     $cfmCol = $btnRow->insertCell($this->btnConfirm);
     $cclCol = $btnRow->insertCell($this->btnCancel);
     $txtStyle = "font-size:12px;border:1px solid #ADBCC7;color:#6893C3;background:#ffffff;width:100%";
     $viewCss = "color:#4F576C;font-family:Sans Serif;font-size:12px;width:100%;";
     $txtLogin->addCSSStyle($txtStyle);
     $txtPasswd->addCSSStyle($txtStyle);
     $this->tblLogin->style = $viewCss;
     $this->tblLogin->cellspacing = "5";
     $cfmCol->style = "height:50px;vertical-align:bottom;text-align:left;width:90px;";
     $cclCol->style = "height:50px;vertical-align:bottom;text-align:right";
 }
Exemplo n.º 8
0
 public function __construct($message, $title = "", $width = 360, $height = 180)
 {
     //Um HTMLWindow para posicionar os obetos na tela
     //mudancas na aprencia de HTMLWindow tambem deve ser realizada em HTMLPanel
     $this->dialog = new HTMLWindow("{$title}", $width, $height);
     $windowId = $this->dialog->getWindowId();
     $this->dialog->setPosition("40%", "40%");
     //um painel HTMLPanel para dispor os objetos em HTMLWindow
     $panelWidth = $this->dialog->getWidth() - 15;
     $panelHeight = $this->dialog->getHeight() - 2;
     $this->panel = new HTMLPanel($panelWidth, $panelHeight);
     $this->panel->backgroundColor = "#FAFAFB";
     //$this->panel->padding = '5px';
     //CRIA OS BOTÕES PADRÕES DOS DIALOGS
     $this->btnConfirm = new HTMLElement('input');
     $this->btnConfirm->type = 'image';
     $this->btnConfirm->src = AppConfig::baseIcons() . 'button-ok-light.png';
     $this->btnConfirm->value = "Confirmar";
     $this->btnConfirm->style = 'border:0px;';
     $this->btnConfirm->title = 'Fechar Caixa de Diálogo.';
     $this->btnOk = new HTMLElement('input');
     $this->btnOk->type = 'image';
     $this->btnOk->src = AppConfig::baseIcons() . 'button-exit-light.png';
     $this->btnOk->{IMouseEvent::CLICK} = "\$('#{$windowId}').fadeOut('slow', function(){p=document.getElementById('{$windowId}');(p.parentNode.removeChild(p));});";
     $this->btnOk->value = 'Sair';
     $this->btnOk->style = 'border:0px;';
     $this->btnOk->title = 'Fechar Caixa de Diálogo.';
     $this->btnCancel = new HTMLElement("input");
     $this->btnCancel->type = 'image';
     $this->btnCancel->src = AppConfig::baseIcons() . 'button-cancel-light.png';
     $this->btnCancel->{IMouseEvent::CLICK} = "\$('#{$windowId}').fadeOut('slow', function(){p=document.getElementById('{$windowId}');(p.parentNode.removeChild(p));});";
     $this->btnCancel->value = 'Cancelar';
     $this->btnCancel->style = 'border:0px;';
     $msgParagraph = new HTMLParagraph($message);
     $msgParagraph->style = "font-family:Sans Serif;font-size:12px; padding-right: 10px; text-align:justify; ";
     $this->panel->appendChild($msgParagraph, 0, 80);
 }