skipv1_0_0Color

The Facebook Fanpage Import skip v1 0 Color class.

Defined (1)

The class is defined in the following location(s).

/includes/skip/elements/forms/color.php  
  1. class Color extends Textfield{ 
  2.  
  3. /** 
  4. * Constructor 
  5. * @package Skip 
  6. * @since 1.0 
  7. * @param string $name Name of Color field. 
  8. * @param array/string $args List of Arguments. 
  9. */ 
  10. function __construct( $name, $label = FALSE, $args = array() ) { 
  11. /** 
  12. * Additional parent args: 
  13. * 'id' 
  14. * 'classes' 
  15. * 'before_element' 
  16. * 'after_element' 
  17. * 'params' 
  18. * 'default_value' 
  19. */ 
  20. parent::__construct( $name, $label, $args ); 
  21.  
  22. /** 
  23. * Rendering Color field 
  24. * @package Skip 
  25. * @since 1.0 
  26. * @return string $html Returns The HTML Code. 
  27. */  
  28. public function render() { 
  29. global $skip_javascripts; 
  30.  
  31. $skip_javascripts[] = ' 
  32. $("#' . $this->params[ 'id' ] . '").colorpicker({ 
  33. altField: "#' . $this->params[ 'id' ] . '",  
  34. altProperties: "background-color",  
  35. }); 
  36. '; 
  37.  
  38. return parent::render();