Exemplo n.º 1
0
 public function generateLink($text)
 {
     $spanClass = 'mImageLinkLabel';
     if ($this->imageType == 'normal') {
         $spanClass .= ' mImageLabel';
     }
     $span = new MSpan('label' . $this->getId(), $this->getLabel(), $spanClass);
     if ($this->imageType == 'icon') {
         $span->setClass('mImageLinkLabelIcon');
         $text .= $span->generate();
     } else {
         $text .= $span->generate();
         if ($this->getSource()) {
             $text = new MDiv('', $text);
             $text->setClass('mImageSource');
         }
     }
     return new MLink('link' . $this->getId(), '', $this->getAction(), $text, $this->getTarget());
 }
Exemplo n.º 2
0
 public function init($action)
 {
     parent::init();
     $spanX = new MSpan('', 'x', 'closeText');
     $span = new MSpan('', $spanX->generate(), 'dijitDialogCloseIcon');
     $span->setHTMLTitle('Fechar');
     $span->addEvent('mouseover', "event.currentTarget.className='dijitDialogCloseIcon  dijitDialogCloseIconHover';");
     $span->addEvent('mouseout', "event.currentTarget.className='dijitDialogCloseIcon';");
     $span->addEvent('mouseup', "event.currentTarget.className='dijitDialogCloseIcon';");
     $span->addEvent('mousedown', "event.currentTarget.className='dijitDialogCloseIcon dijitDialogCloseIconActive';");
     $this->setAction($action);
     $this->setText($span->generate());
 }