Phundament-Components
[ class tree: Phundament-Components ] [ index: Phundament-Components ] [ all elements ]

Source for file LThickboxImage.php

Documentation is available at LThickboxImage.php

  1. <?php
  2. /**
  3.  * Class file.
  4.  *
  5.  * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  6.  * @copyright 2005, diemeisterei GmbH. All rights reserved.
  7.  * @author $Author: schmunk $
  8.  * @version $Revision: 1 $  $Date: 2006-06-01 15:11:24 +0000 (Do, 01 Jun 2006) $
  9.  * @package Phundament.Components
  10.  * @subpackage WebControls
  11.  */
  12.  
  13. /**
  14.  * class
  15.  *
  16.  * @package System.Web.UI.WebControls
  17.  * @subpackage Graphics
  18.  */
  19.  class LThickboxImage extends LImage {
  20.  
  21.      public function setNavigateUrl($value)
  22.     {
  23.         $this->setViewState('NavigateUrl'$value);
  24.     }
  25.  
  26.     public function getNavigateUrl()
  27.     {
  28.         return $this->getViewState('NavigateUrl'null);
  29.     }
  30.  
  31.      public function setGroup($value)
  32.     {
  33.         $this->setViewState('Group'$value);
  34.     }
  35.  
  36.     public function getGroup()
  37.     {
  38.         return $this->getViewState('Group'null);
  39.     }
  40.  
  41.      public function setTitle($value)
  42.     {
  43.         $this->setViewState('Title'$value);
  44.     }
  45.  
  46.     public function getTitle()
  47.     {
  48.         return $this->getViewState('Title'null);
  49.     }
  50.  
  51.      public function setText($value)
  52.     {
  53.         $this->setViewState('Text'$value);
  54.     }
  55.  
  56.     public function getText()
  57.     {
  58.         return $this->getViewState('Text'null);
  59.     }
  60.  
  61.  
  62.     public function getTagName()
  63.     {
  64.         return 'a';
  65.     }
  66.  
  67.     public function renderContents($writer)
  68.     {
  69.         TWebControl::renderChildren($writer);
  70.     }
  71.  
  72.     protected function addAttributesToRender($writer)
  73.     {
  74.         $isEnabled=$this->getEnabled(true);
  75.         parent::addAttributesToRender($writer);
  76.         $writer->addAttribute('href',$this->ImageUrl);
  77.         $writer->addAttribute('rel',$this->Group);
  78.         $writer->addAttribute('title',$this->Title);
  79.     }
  80.  
  81.     public function onInit($param)
  82.     {
  83.         parent::onInit($param);
  84.  
  85.         $jQueryJs $this->publishAsset("LImage/support/jquery-1.0.2-JQ.js");
  86.         $thickboxJs $this->publishAsset("LImage/support/thickbox-JQ.js");
  87.         $thickboxCss $this->publishAsset("LImage/support/thickbox.css");
  88.  
  89.         $scriptMgr $this->getPage()->getClientScript();
  90.         $scriptMgr->registerScriptFile('LThickBoxLink:jQueryJs'$jQueryJs);
  91.         $scriptMgr->registerScriptFile('LThickBoxLink:thickboxJs'$thickboxJs);
  92.         $scriptMgr->registerStyleSheetFile('LThickBox:Css'$thickboxCss);
  93.  
  94.         $this->setCssClass("thickbox ".$this->CssClass);
  95.     }
  96.  
  97.     public function onPreRender($param)
  98.     {
  99.         parent::onPreRender($param);
  100.         $this->Style->setStyleField("width","auto");
  101.         $this->Style->setStyleField("height","auto");
  102.         if (!count($this->Controls)) $this->Controls[$this->Text;
  103.     }
  104. }
  105.  
  106. ?>

Documentation generated on Sun, 25 Feb 2007 16:11:44 +0100 by phpDocumentor 1.3.1