Source for file class.acBlockType_colorpicker.php

Documentation is available at class.acBlockType_colorpicker.php

  1. <?php
  2. {
  3.     function __construct(&$content_obj$params array())
  4.     {
  5.         $params['block_type''colorpicker';
  6.         parent::__construct($content_obj$params);
  7.     }
  8.     
  9.     public function GetInput()
  10.     {
  11.         return '# <input id="'$this->GetProperty('id'.'" type="text"'($this->GetProperty('style'!= ''?'style="'$this->GetProperty('style'.' "' ''.' maxlength="6" size="7" name="'$this->GetProperty('id'.'" value="'htmlspecialchars($this->GetContent()) .'" />';
  12.     }
  13.     
  14.     public function GetHeaderHTML()
  15.     {
  16.         if($this->_header_html_called)
  17.             return;
  18.         
  19.         $this->_header_html_called true;
  20.         
  21.         $config cmsms()->GetConfig();
  22.         $ret '
  23. <link rel=stylesheet href="'.$config['root_url'].'/modules/AdvancedContent/css/jpicker.css" type="text/css" />
  24. <script language="javascript" type="text/javascript" src="'.$config['root_url'].'/modules/AdvancedContent/js/jquery.jpicker.min.js" defer="true"></script>
  25. <script language="javascript" type="text/javascript">
  26. /* <![CDATA[ */
  27. ac_onload.push(function(){
  28.     (function($){
  29.         $.fn.jPicker.defaults.images.clientPath="'.$config['root_url'].'/modules/AdvancedContent/images/jpicker/";';
  30.         foreach(acContentBlockManager::GetBlocksByType('colorpicker'as $block_id)
  31.             $ret .= '$("#'$block_id .'").jPicker();';
  32.         
  33.         return $ret '
  34.         
  35.     })(jQuery);
  36. });
  37. /* ]]> */
  38. </script>';
  39.     }
  40. }
  41. ?>

Documentation generated on Tue, 09 Oct 2012 16:57:03 +0200 by phpDocumentor 1.4.1