minicolors-colorpicker Yii extension for the miniColors jQuery color chooser plugin

  1. Requirements
  2. Usage
  3. Resources

Simple wrapper extension for the simple and excellent miniColors jQuery color picker plugin

Requirements

Yii 1.1 or above (I assume - built with Yii 1.1.8)

Usage

Extract / checkout these files into the SMiniColors directory under protected/extensions in your Yii project

This extension contains two classes:

SColorPicker Widget

Generates a standard HTML input tag with the ID you specify

$this->widget('ext.SMiniColors.SColorPicker', array(
    'id' => 'myInputId',
    'defaultValue'=>'#000000',
    'hidden'=>false, // defaults to false - can be set to hide the textarea with the hex
    'options' => array(), // jQuery plugin options
    'htmlOptions' => array(), // html attributes
));
SActiveColorPicker Widget

Generates an "Active" HTML input for the CActiveRecord model you specify

$this->widget('ext.SMiniColors.SActiveColorPicker', array(
    'model' => $model,
    'attribute' => 'myModelAttribute',
    'hidden'=>false, // defaults to false - can be set to hide the textarea with the hex
    'options' => array(), // jQuery plugin options
    'htmlOptions' => array(), // html attributes
));

Resources

5 0
8 followers
1 334 downloads
Yii Version: 1.1
License: GPL-2.0
Category: User Interface
Developed by: thaddeusmt
Created on: Oct 12, 2011
Last updated: 13 years ago

Downloads

show all