- Titulaciones de candidatos
- Extensión "jQuery Chosen" - Arreglos en migraciones para indicar el tipo de tablas InnoDB git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@67 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
This commit is contained in:
parent
8933c75317
commit
e81ded2173
@ -88,6 +88,8 @@ class UsuarioWeb extends CWebUser {
|
||||
protected function loadUser() {
|
||||
if ($this->_model === null) {
|
||||
$this->_model = Usuario::model()->findByPk($this->id);
|
||||
if ($this->_model === null)
|
||||
throw new CHttpException(404, Yii::t('profind', 'La página solicitada no existe.'));
|
||||
}
|
||||
return $this->_model;
|
||||
}
|
||||
@ -100,7 +102,6 @@ class UsuarioWeb extends CWebUser {
|
||||
return Subscripcion::model()->activa()->findByAttributes(array('id_usuario' => $this->id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -9,7 +9,7 @@
|
||||
$config = array(
|
||||
'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
|
||||
'theme' => 'profind',
|
||||
'sourceLanguage' => 'es',
|
||||
'sourceLanguage' => 'en',
|
||||
'language' => 'es',
|
||||
'name' => 'PROFIND',
|
||||
'defaultController' => 'usuario',
|
||||
@ -22,12 +22,15 @@ $config = array(
|
||||
// Modelos
|
||||
'application.models.*',
|
||||
'application.models.formularios.*',
|
||||
|
||||
// Helpers
|
||||
'application.helpers.*',
|
||||
|
||||
// Componentes y extensiones
|
||||
'application.components.*',
|
||||
'application.extensions.yii-mail.YiiMailMessage',
|
||||
'application.extensions.PasswordHash.PasswordHash',
|
||||
'application.extensions.yii-chosen.Chosen',
|
||||
),
|
||||
|
||||
'modules' => array(
|
||||
|
||||
@ -89,14 +89,14 @@ $configSpecific = array(
|
||||
// Save log messages on file
|
||||
array(
|
||||
'class' => 'CFileLogRoute',
|
||||
'levels' => 'error, warning, trace, info',
|
||||
//'categories' => 'application.*',
|
||||
'levels' => 'trace',
|
||||
'categories' => 'application.*',
|
||||
),
|
||||
// Show log messages on web pages
|
||||
array(
|
||||
'class' => 'CWebLogRoute',
|
||||
'levels' => 'error, warning, trace',
|
||||
//'categories' => 'application.*',
|
||||
'levels' => 'error, warning',
|
||||
'categories' => 'application.*',
|
||||
'showInFireBug' => true,
|
||||
),
|
||||
),
|
||||
|
||||
@ -28,6 +28,9 @@ class CandidatoController extends Controller {
|
||||
'actions' => array('index', 'view', 'create', 'update', 'delete', 'admin', 'updateEstado'),
|
||||
'users' => array('@'),
|
||||
),
|
||||
array('deny', // deny all users
|
||||
'users' => array('*'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -67,44 +70,52 @@ class CandidatoController extends Controller {
|
||||
* @param integer $id el ID del candidato a modificar
|
||||
*/
|
||||
public function actionUpdate($id) {
|
||||
|
||||
$candidato = $this->loadModel($id);
|
||||
|
||||
|
||||
// Uncomment the following line if AJAX validation is needed
|
||||
// $this->performAjaxValidation($candidato);
|
||||
|
||||
if (isset($_POST['Candidato'])) {
|
||||
Yii::trace(CVarDumper::dumpAsString($_POST));
|
||||
|
||||
|
||||
// Candidato
|
||||
$candidato->attributes = $_POST['Candidato'];
|
||||
$ficheroFotografia = CUploadedFile::getInstance($candidato, 'ficheroFotografia');
|
||||
$ficheroFotografia = CUploadedFile::getInstance($candidato, 'ficheroFotografia');
|
||||
$quitarFotografia = Yii::app()->request->getParam('quitar_fotografia', '0');
|
||||
|
||||
// Titulaciones del candidato
|
||||
$listaTitulacionesBorrar = $candidato->titulaciones;
|
||||
if (isset($_POST['CandidatoTitulacion'])) {
|
||||
$listaTitulaciones = array();
|
||||
foreach ($_POST['CandidatoTitulacion'] as $titulacion) {
|
||||
$candidatoTitulacion = new CandidatoTitulacion();
|
||||
$candidatoTitulacion->titulacion = $titulacion;
|
||||
$candidatoTitulacion->candidato_id = $candidato->id;
|
||||
$listaTitulaciones[] = $candidatoTitulacion;
|
||||
}
|
||||
$candidato->titulaciones = $listaTitulaciones;
|
||||
}
|
||||
|
||||
// Idiomas del candidato
|
||||
$listaIdiomas = array();
|
||||
$listaIdiomasBorrar = array();
|
||||
foreach ($_POST['CandidatoIdioma'] as $key => $idioma) {
|
||||
if ($idioma['id'])
|
||||
$candidatoIdioma = CandidatoIdioma::model()->findByPk($idioma['id']);
|
||||
else
|
||||
$candidatoIdioma = new CandidatoIdioma();
|
||||
$candidatoIdioma->attributes = $idioma;
|
||||
$candidatoIdioma->candidato_id = $candidato->id;
|
||||
|
||||
if ($idioma['_borrar'])
|
||||
$listaIdiomasBorrar[] = $candidatoIdioma;
|
||||
else
|
||||
$listaIdiomas[] = $candidatoIdioma;
|
||||
|
||||
Yii::trace('Idioma ' . $key);
|
||||
Yii::trace(CVarDumper::dumpAsString($candidatoIdioma->attributes));
|
||||
if (isset($_POST['CandidatoIdioma'])) {
|
||||
$listaIdiomas = array();
|
||||
foreach ($_POST['CandidatoIdioma'] as $key => $idioma) {
|
||||
if ($idioma['id'])
|
||||
$candidatoIdioma = CandidatoIdioma::model()->findByPk($idioma['id']);
|
||||
else
|
||||
$candidatoIdioma = new CandidatoIdioma();
|
||||
$candidatoIdioma->attributes = $idioma;
|
||||
$candidatoIdioma->candidato_id = $candidato->id;
|
||||
|
||||
if ($idioma['_borrar'])
|
||||
$listaIdiomasBorrar[] = $candidatoIdioma;
|
||||
else
|
||||
$listaIdiomas[] = $candidatoIdioma;
|
||||
}
|
||||
$candidato->idiomas = $listaIdiomas;
|
||||
}
|
||||
$candidato->idiomas = $listaIdiomas;
|
||||
|
||||
Yii::trace('Idiomas a borrar');
|
||||
Yii::trace(CVarDumper::dumpAsString($listaIdiomasBorrar));
|
||||
|
||||
|
||||
// Guardar los datos
|
||||
$transaccion = Yii::app()->db->beginTransaction();
|
||||
try {
|
||||
@ -116,13 +127,29 @@ class CandidatoController extends Controller {
|
||||
Yii::trace('Eliminando la fotografía del candidato', 'application.controllers.CandidatoController');
|
||||
$candidato->fotografia->eliminarFotografia();
|
||||
}
|
||||
|
||||
|
||||
if ($ficheroFotografia) {
|
||||
Yii::trace('Guardando la fotografía del candidato', 'application.controllers.CandidatoController');
|
||||
$candidato->fotografia->guardarFotografia($ficheroFotografia);
|
||||
}
|
||||
|
||||
// Titulaciones
|
||||
if (!empty($listaTitulacionesBorrar)) {
|
||||
Yii::trace('Eliminando titulaciones marcadas para borrar', 'application.controllers.CandidatoController');
|
||||
foreach ($listaIdiomasBorrar as $candidatoTitulacion) {
|
||||
if (!$candidatoTitulacion->delete())
|
||||
throw new CException('Error al eliminar una titulación del candidato');
|
||||
}
|
||||
}
|
||||
if (!empty($candidato->titulaciones)) {
|
||||
Yii::trace('Guardando la lista de titulaciones', 'application.controllers.CandidatoController');
|
||||
foreach ($candidato->titulaciones as $candidatoTitulacion) {
|
||||
if (!$candidatoTitulacion->save())
|
||||
throw new CException('Error al guardar una titulación del candidato');
|
||||
}
|
||||
}
|
||||
|
||||
// Idiomas
|
||||
if (!empty($listaIdiomasBorrar)) {
|
||||
Yii::trace('Eliminando idiomas marcados para borrar', 'application.controllers.CandidatoController');
|
||||
foreach ($listaIdiomasBorrar as $candidatoIdioma) {
|
||||
@ -130,9 +157,8 @@ class CandidatoController extends Controller {
|
||||
throw new CException('Error al eliminar un idioma del candidato');
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($candidato->idiomas)) {
|
||||
Yii::trace('Guardando la lista de idiomas', 'application.controllers.CandidatoController');
|
||||
Yii::trace('Guardando la lista de idiomas', 'application.controllers.CandidatoController');
|
||||
foreach ($candidato->idiomas as $candidatoIdioma) {
|
||||
if (!$candidatoIdioma->save())
|
||||
throw new CException('Error al guardar un idioma del candidato');
|
||||
@ -144,15 +170,24 @@ class CandidatoController extends Controller {
|
||||
Yii::trace('Candidato guardado', 'application.controllers.CandidatoController');
|
||||
Yii::app()->user->setFlash('success', Yii::t('profind', 'Se ha actualizado el candidato'));
|
||||
$this->redirect(array('index'));
|
||||
|
||||
} catch (Exception $e) {
|
||||
Yii::trace($e->getMessage(), 'application.controllers.CandidatoController');
|
||||
|
||||
$transaccion->rollBack();
|
||||
$errores = array_merge($candidato->getErrors() /*, $nueva_empresa->getErrors(), $nueva_subscripcion->getErrors()*/);
|
||||
foreach ($errores as $campo => $mensaje) $resultado[$campo] = $mensaje;
|
||||
Yii::trace(CVarDumper::dumpAsString($resultado), 'application.controllers.CandidatoController');
|
||||
Yii::app()->user->setFlash('error', Yii::t('profind', 'Se ha producido un error al actualizar el candidato'));
|
||||
|
||||
if (YII_DEBUG) {
|
||||
$errores = $candidato->getErrors();
|
||||
if (isset($candidatoTitulacion))
|
||||
$errores = array_merge($errores, $candidatoTitulacion->getErrors());
|
||||
if (isset($candidatoIdioma))
|
||||
$errores = array_merge($errores, $candidatoIdioma->getErrors());
|
||||
|
||||
$resultado = array();
|
||||
foreach ($errores as $campo => $mensaje)
|
||||
$resultado[$campo] = $mensaje;
|
||||
Yii::trace(CVarDumper::dumpAsString($resultado), 'application.controllers.CandidatoController');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,7 +196,6 @@ class CandidatoController extends Controller {
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
public function actionUpdateEstado($id) {
|
||||
|
||||
$model = $this->loadModel($id);
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Vitoria');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Albacete');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Alicante');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Almería');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Ávila');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Badajoz');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Palma');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Barcelona');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Burgos');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Cáceres');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Cádiz');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Castellón de la Plana');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Ciudad Real');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Córdoba');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('La Coruña');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Cuenca');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Girona');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Granada');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Guadalajara');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('San Sebastián');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Huelva');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Huesca');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Jaén');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('León');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Lleida');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Logroño');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Lugo');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Madrid');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Málaga');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Murcia');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Pamplona');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Ourense');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Oviedo');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Palencia');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Las Palmas de Gran Canaria');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Pontevedra');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Salamanca');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Santa Cruz de Tenerife');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Santander');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Segovia');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Sevilla');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Soria');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Tarragona');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Teruel');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Toledo');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Valencia');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Valladolid');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Bilbao');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Zamora');
|
||||
INSERT INTO `tbl_poblaciones`(`poblacion`) VALUES ('Zaragoza');
|
||||
32
www/protected/data/tbl_idiomas.sql
Normal file
32
www/protected/data/tbl_idiomas.sql
Normal file
@ -0,0 +1,32 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.3.2deb1ubuntu1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Servidor: localhost
|
||||
-- Tiempo de generación: 24-10-2012 a las 13:42:04
|
||||
-- Versión del servidor: 5.1.63
|
||||
-- Versión de PHP: 5.3.2-1ubuntu4.18
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Base de datos: `intranet`
|
||||
--
|
||||
|
||||
--
|
||||
-- Volcar la base de datos para la tabla `tbl_idiomas`
|
||||
--
|
||||
|
||||
INSERT INTO `tbl_idiomas` (`id`, `descripcion`) VALUES
|
||||
(1, 'Alemán'),
|
||||
(2, 'Francés'),
|
||||
(3, 'Japonés'),
|
||||
(4, 'Inglés'),
|
||||
(5, 'Italiano'),
|
||||
(6, 'Portugués');
|
||||
81
www/protected/data/tbl_poblaciones.sql
Normal file
81
www/protected/data/tbl_poblaciones.sql
Normal file
@ -0,0 +1,81 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.4.5
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Servidor: localhost
|
||||
-- Tiempo de generación: 24-10-2012 a las 11:41:30
|
||||
-- Versión del servidor: 5.5.16
|
||||
-- Versión de PHP: 5.3.8
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Base de datos: `usuarios_dev`
|
||||
--
|
||||
|
||||
--
|
||||
-- Volcado de datos para la tabla `tbl_poblaciones`
|
||||
--
|
||||
|
||||
INSERT INTO `tbl_poblaciones` (`id`, `poblacion`) VALUES
|
||||
(1, 'Vitoria'),
|
||||
(2, 'Albacete'),
|
||||
(3, 'Alicante'),
|
||||
(4, 'Almería'),
|
||||
(5, 'Ávila'),
|
||||
(6, 'Badajoz'),
|
||||
(7, 'Palma'),
|
||||
(8, 'Barcelona'),
|
||||
(9, 'Burgos'),
|
||||
(10, 'Cáceres'),
|
||||
(11, 'Cádiz'),
|
||||
(12, 'Castellón de la Plana'),
|
||||
(13, 'Ciudad Real'),
|
||||
(14, 'Córdoba'),
|
||||
(15, 'La Coruña'),
|
||||
(16, 'Cuenca'),
|
||||
(17, 'Girona'),
|
||||
(18, 'Granada'),
|
||||
(19, 'Guadalajara'),
|
||||
(20, 'San Sebastián'),
|
||||
(21, 'Huelva'),
|
||||
(22, 'Huesca'),
|
||||
(23, 'Jaén'),
|
||||
(24, 'León'),
|
||||
(25, 'Lleida'),
|
||||
(26, 'Logroño'),
|
||||
(27, 'Lugo'),
|
||||
(28, 'Madrid'),
|
||||
(29, 'Málaga'),
|
||||
(30, 'Murcia'),
|
||||
(31, 'Pamplona'),
|
||||
(32, 'Ourense'),
|
||||
(33, 'Oviedo'),
|
||||
(34, 'Palencia'),
|
||||
(35, 'Las Palmas de Gran Canaria'),
|
||||
(36, 'Pontevedra'),
|
||||
(37, 'Salamanca'),
|
||||
(38, 'Santa Cruz de Tenerife'),
|
||||
(39, 'Santander'),
|
||||
(40, 'Segovia'),
|
||||
(41, 'Sevilla'),
|
||||
(42, 'Soria'),
|
||||
(43, 'Tarragona'),
|
||||
(44, 'Teruel'),
|
||||
(45, 'Toledo'),
|
||||
(46, 'Valencia'),
|
||||
(47, 'Valladolid'),
|
||||
(48, 'Bilbao'),
|
||||
(49, 'Zamora'),
|
||||
(50, 'Zaragoza');
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
54
www/protected/data/tbl_titulaciones.sql
Normal file
54
www/protected/data/tbl_titulaciones.sql
Normal file
@ -0,0 +1,54 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.3.2deb1ubuntu1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Servidor: localhost
|
||||
-- Tiempo de generación: 24-10-2012 a las 13:40:04
|
||||
-- Versión del servidor: 5.1.63
|
||||
-- Versión de PHP: 5.3.2-1ubuntu4.18
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Base de datos: `intranet`
|
||||
--
|
||||
|
||||
--
|
||||
-- Volcar la base de datos para la tabla `tbl_titulaciones`
|
||||
--
|
||||
|
||||
INSERT INTO `tbl_titulaciones` (`id`, `descripcion`) VALUES
|
||||
(1, 'Ciclo G.Sup. Administración Sistemas Informático'),
|
||||
(2, 'Diplomado en Estadística'),
|
||||
(4, 'FPII Téc. Especialista Administrativo Comercial'),
|
||||
(5, 'FPIII Administración de Empresas'),
|
||||
(6, 'Informática Gestión y Sistemas (No homologado)'),
|
||||
(9, 'Ingeniería Superior en Electrónica'),
|
||||
(10, 'Ingeniería Superior Informática'),
|
||||
(12, 'Ingeniería Técnica Informática Sistemas'),
|
||||
(13, 'Ingeniería Técnica Telecomunicaciones'),
|
||||
(14, 'Ingenieria Superior Telecomunicaciones'),
|
||||
(15, 'Ingenieria Técnica Informática Gestión'),
|
||||
(16, 'Licenciado en Físicas'),
|
||||
(17, 'Licenciado en Informática'),
|
||||
(18, 'Licenciatura C. Químicas'),
|
||||
(19, 'Ciclo G.Sup. Desarrollo Aplicaciones'),
|
||||
(20, 'Licenciatura Publicidad y RRPP'),
|
||||
(21, 'Diseño Gráfico (No homologado)'),
|
||||
(22, 'FPII Informática'),
|
||||
(23, 'ESO'),
|
||||
(24, 'Licenciatura en Matemáticas'),
|
||||
(25, 'Ingeniería Superior Industriales'),
|
||||
(26, 'FPII Electrónica'),
|
||||
(27, 'FPIII Informática y/o Electrónica'),
|
||||
(28, 'BUP'),
|
||||
(29, 'Licenciatura Otros'),
|
||||
(30, 'Licenciatura en Economía'),
|
||||
(31, 'Diplomado en Empresariales'),
|
||||
(32, 'Ingeniería Técnica Industrial');
|
||||
5
www/protected/extensions/yii-chosen/.hg_archival.txt
Normal file
5
www/protected/extensions/yii-chosen/.hg_archival.txt
Normal file
@ -0,0 +1,5 @@
|
||||
repo: 71b41104a806e44aed263531d51071c76c7f288b
|
||||
node: 5e65b1eb38fbb7017b67801337f40d7d3e7ec53d
|
||||
branch: default
|
||||
latesttag: null
|
||||
latesttagdistance: 9
|
||||
148
www/protected/extensions/yii-chosen/Chosen.php
Normal file
148
www/protected/extensions/yii-chosen/Chosen.php
Normal file
@ -0,0 +1,148 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget to use Chosen in Yii application.
|
||||
*
|
||||
* Chosen script:
|
||||
* @link http://harvesthq.github.com/chosen/
|
||||
*
|
||||
* @author Bogdan Savluk <savluk.bogdan@gmail.com>
|
||||
*/
|
||||
class Chosen extends CInputWidget
|
||||
{
|
||||
/** @var string Path to assets directory published in init() */
|
||||
private $assetsDir;
|
||||
|
||||
/** @var bool Multiple or single item should be selected */
|
||||
public $multiple = false;
|
||||
|
||||
/** @var string|null If is set will override default label "Select Some Options" */
|
||||
public $placeholderMultiple;
|
||||
|
||||
/** @var string|null If is set will override default label "Select an Option" */
|
||||
public $placeholderSingle;
|
||||
|
||||
/**
|
||||
* @var bool Allow deselect single selected item from dropDown.
|
||||
* Chosen will add a UI element for option deselection.
|
||||
* This will only work if the first option has blank text.
|
||||
*/
|
||||
public $allowSingleDeselect = true;
|
||||
|
||||
/** @var string|null If is set will override default label "No results match" */
|
||||
public $noResults;
|
||||
|
||||
/** @var array Chosen script settings passed to $.fn.chosen() */
|
||||
private $settings = array();
|
||||
|
||||
/** @var array See CHtml::listData() */
|
||||
public $data;
|
||||
|
||||
/** Publish assets and set default values for properties */
|
||||
public function init()
|
||||
{
|
||||
$dir = dirname(__FILE__) . '/assets';
|
||||
$this->assetsDir = Yii::app()->assetManager->publish($dir);
|
||||
|
||||
if ($this->multiple) {
|
||||
if (isset($this->htmlOptions['multiple']))
|
||||
$this->multiple = true;
|
||||
elseif ($this->multiple)
|
||||
$this->htmlOptions['multiple'] = true;
|
||||
}
|
||||
if ($this->multiple) {
|
||||
if (isset($this->placeholderMultiple))
|
||||
$this->htmlOptions['data-placeholder'] = $this->placeholderMultiple;
|
||||
else
|
||||
$this->htmlOptions['data-placeholder'] = Yii::t('Chosen.main', "Select Some Options");
|
||||
} else {
|
||||
|
||||
if (isset($this->placeholderSingle))
|
||||
$this->htmlOptions['data-placeholder'] = $this->placeholderSingle;
|
||||
else
|
||||
$this->htmlOptions['data-placeholder'] = Yii::t('Chosen.main', "Select an Option");
|
||||
}
|
||||
|
||||
if (isset($this->noResults))
|
||||
$this->settings['no_results_text'] = $this->noResults;
|
||||
else
|
||||
$this->settings['no_results_text'] = Yii::t('Chosen.main', "No results match");
|
||||
if (!$this->multiple)
|
||||
$this->settings['allow_single_deselect'] = $this->allowSingleDeselect;
|
||||
}
|
||||
|
||||
/** Render widget html and register client scripts */
|
||||
public function run()
|
||||
{
|
||||
list($name, $id) = $this->resolveNameID();
|
||||
if (isset($this->htmlOptions['id']))
|
||||
$id = $this->htmlOptions['id'];
|
||||
else
|
||||
$this->htmlOptions['id'] = $id;
|
||||
if (isset($this->htmlOptions['name']))
|
||||
$name = $this->htmlOptions['name'];
|
||||
|
||||
if ($this->multiple && substr($name, -2) !== '[]')
|
||||
$name .= '[]';
|
||||
|
||||
if (isset($this->model)) {
|
||||
echo CHtml::dropDownList($name, CHtml::value($this->model, $this->attribute), $this->data, $this->htmlOptions);
|
||||
} else {
|
||||
echo CHtml::dropDownList($name, $this->value, $this->data, $this->htmlOptions);
|
||||
}
|
||||
$this->registerScripts($id);
|
||||
}
|
||||
|
||||
/** Register client scripts */
|
||||
private function registerScripts($id)
|
||||
{
|
||||
$cs = Yii::app()->getClientScript();
|
||||
$cs->registerCoreScript('jquery');
|
||||
if (defined('YII_DEBUG'))
|
||||
$cs->registerScriptFile($this->assetsDir . '/chosen.jquery.js');
|
||||
else
|
||||
$cs->registerScriptFile($this->assetsDir . '/chosen.jquery.min.js');
|
||||
|
||||
$cs->registerCssFile($this->assetsDir . '/chosen.css');
|
||||
|
||||
$settings = CJavaScript::encode($this->settings);
|
||||
$cs->registerScript("{$id}_chosen", "$('#{$id}').chosen({$settings});");
|
||||
}
|
||||
|
||||
/** Single item select */
|
||||
public static function dropDownList($name, $select, $data, $htmlOptions = array())
|
||||
{
|
||||
return Yii::app()->getController()->widget(__CLASS__, array(
|
||||
'name' => $name,
|
||||
'value' => $select,
|
||||
'data' => $data,
|
||||
'htmlOptions' => $htmlOptions,
|
||||
), true);
|
||||
}
|
||||
|
||||
public static function activeDropDownList($model, $attribute, $data, $htmlOptions = array())
|
||||
{
|
||||
return self::dropDownList(CHtml::activeName($model, $attribute), CHtml::value($model, $attribute), $data, $htmlOptions);
|
||||
}
|
||||
|
||||
/** Multiple items select */
|
||||
public static function multiSelect($name, $select, $data, $htmlOptions = array())
|
||||
{
|
||||
if (substr($name, -2) !== '[]')
|
||||
$name .= '[]';
|
||||
|
||||
return Yii::app()->getController()->widget(__CLASS__, array(
|
||||
'name' => $name,
|
||||
'value' => $select,
|
||||
'data' => $data,
|
||||
'htmlOptions' => $htmlOptions,
|
||||
'multiple' => true,
|
||||
), true);
|
||||
}
|
||||
|
||||
public static function activeMultiSelect($model, $attribute, $data, $htmlOptions = array())
|
||||
{
|
||||
return self::multiSelect(CHtml::activeName($model, $attribute) . '[]', CHtml::value($model, $attribute), $data, $htmlOptions);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 559 B |
@ -1,349 +1,396 @@
|
||||
/* @group Base */
|
||||
.chzn-container {
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
.chzn-container .chzn-drop {
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0;
|
||||
position: absolute;
|
||||
top: 29px;
|
||||
left: 0;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
||||
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
-o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
z-index: 1010;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Single Chosen */
|
||||
.chzn-container-single .chzn-single {
|
||||
background-color: #ffffff;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius : 3px;
|
||||
border-radius : 3px;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
height: 28px;
|
||||
line-height: 27px;
|
||||
padding: 0 0 0 8px;
|
||||
color: #444444;
|
||||
text-decoration: none;
|
||||
}
|
||||
.chzn-container-single .chzn-default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-single .chzn-single span {
|
||||
margin-right: 26px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
-ms-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 9px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: url('chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
||||
background-position: right top;
|
||||
}
|
||||
.chzn-container-single .chzn-single div {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 18px;
|
||||
}
|
||||
.chzn-container-single .chzn-single div b {
|
||||
background: url('chosen-sprite.png') no-repeat 0 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.chzn-container-single .chzn-search {
|
||||
padding: 3px 4px;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
z-index: 1010;
|
||||
}
|
||||
.chzn-container-single .chzn-search input {
|
||||
background: #fff url('chosen-sprite.png') no-repeat 100% -22px;
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
margin: 1px 0;
|
||||
padding: 3px 20px 2px 5px;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
font-family: sans-serif;
|
||||
font-size: 13px;
|
||||
min-height: 13px;
|
||||
}
|
||||
.chzn-container-single .chzn-drop {
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius : 0 0 4px 4px;
|
||||
border-radius : 0 0 4px 4px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
margin-top: 1px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
.chzn-container-single-nosearch .chzn-search input {
|
||||
position: absolute;
|
||||
left: -9000px;
|
||||
}
|
||||
|
||||
/* @group Multi Chosen */
|
||||
.chzn-container-multi .chzn-choices {
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
border-radius:3px;
|
||||
border:1px solid #ccc;
|
||||
overflow:hidden;
|
||||
margin: 0;
|
||||
padding: 0 5px 0 0;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
position: relative;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field {
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field input {
|
||||
color: #666;
|
||||
background: transparent !important;
|
||||
border: 0 !important;
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
height: 16px;
|
||||
padding: 5px;
|
||||
margin: 1px 0;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow : none;
|
||||
-o-box-shadow : none;
|
||||
box-shadow : none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field .default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius : 3px;
|
||||
border-radius : 3px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
background-color: #cee5f5;
|
||||
color: #2b4f62;
|
||||
line-height: 13px;
|
||||
padding: 4px 20px 5px 5px;
|
||||
margin: 3px 0 3px 5px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
color:#6a6a6a;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 5px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: url('chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
||||
background-position: right -11px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Results */
|
||||
.chzn-container .chzn-results {
|
||||
margin: 0 2px 2px 0;
|
||||
max-height: 240px;
|
||||
padding: 0 0 0 4px;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.chzn-container-multi .chzn-results {
|
||||
margin: -1px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container .chzn-results li {
|
||||
display: none;
|
||||
line-height: 15px;
|
||||
padding: 5px 6px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container .chzn-results .active-result {
|
||||
cursor: pointer;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted {
|
||||
background-color: #48A6D2;
|
||||
color: #fff;
|
||||
}
|
||||
.chzn-container .chzn-results li em {
|
||||
background: #feffde;
|
||||
font-style: normal;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted em {
|
||||
background: transparent;
|
||||
}
|
||||
.chzn-container .chzn-results .no-results {
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .group-result {
|
||||
cursor: default;
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
.chzn-container .chzn-results .group-option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.chzn-container-multi .chzn-drop .result-selected {
|
||||
display: none;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll {
|
||||
background: white;
|
||||
margin: 0 4px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 321px; /* This should by dynamic with js */
|
||||
z-index: 1;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll span {
|
||||
display: inline-block;
|
||||
height: 17px;
|
||||
text-indent: -5000px;
|
||||
width: 9px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down {
|
||||
bottom: 0;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down span {
|
||||
background: url('chosen-sprite.png') no-repeat -4px -3px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-up span {
|
||||
background: url('chosen-sprite.png') no-repeat -22px -3px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Active */
|
||||
|
||||
.chzn-container-active .chzn-single-with-drop {
|
||||
-webkit-border-bottom-left-radius : 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft : 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-left-radius : 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div {
|
||||
background: transparent;
|
||||
border-left: none;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div b {
|
||||
background-position: -18px 3px;
|
||||
}
|
||||
.chzn-container-active .chzn-choices .search-field input {
|
||||
color: #111 !important;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Disabled Support */
|
||||
.chzn-disabled {
|
||||
cursor: default;
|
||||
opacity:0.5 !important;
|
||||
}
|
||||
.chzn-disabled .chzn-single {
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @group Right to Left */
|
||||
.chzn-rtl { text-align: right; }
|
||||
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
|
||||
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
|
||||
|
||||
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
|
||||
.chzn-rtl .chzn-single abbr {
|
||||
left: 26px;
|
||||
right: auto;
|
||||
}
|
||||
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
|
||||
.chzn-rtl .chzn-choices li { float: right; }
|
||||
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
|
||||
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;}
|
||||
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
|
||||
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
|
||||
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
||||
.chzn-rtl .chzn-search input {
|
||||
background: #fff url('chosen-sprite.png') no-repeat -38px -22px;
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
padding: 4px 5px 4px 20px;
|
||||
direction: rtl;
|
||||
}
|
||||
/* @end */
|
||||
/* @group Base */
|
||||
.chzn-container {
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
.chzn-container .chzn-drop {
|
||||
background: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 0;
|
||||
position: absolute;
|
||||
top: 29px;
|
||||
left: 0;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
||||
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
-o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
z-index: 1010;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Single Chosen */
|
||||
.chzn-container-single .chzn-single {
|
||||
background-color: #ffffff;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -ms-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius : 5px;
|
||||
border-radius : 5px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
border: 1px solid #aaaaaa;
|
||||
-webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
height: 23px;
|
||||
line-height: 24px;
|
||||
padding: 0 0 0 8px;
|
||||
color: #444444;
|
||||
text-decoration: none;
|
||||
}
|
||||
.chzn-container-single .chzn-default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-single .chzn-single span {
|
||||
margin-right: 26px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
-ms-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 6px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: url('chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
||||
background-position: right top;
|
||||
}
|
||||
.chzn-container-single .chzn-single div {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 18px;
|
||||
}
|
||||
.chzn-container-single .chzn-single div b {
|
||||
background: url('chosen-sprite.png') no-repeat 0 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.chzn-container-single .chzn-search {
|
||||
padding: 3px 4px;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
z-index: 1010;
|
||||
}
|
||||
.chzn-container-single .chzn-search input {
|
||||
background: #fff url('chosen-sprite.png') no-repeat 100% -22px;
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
margin: 1px 0;
|
||||
padding: 4px 20px 4px 5px;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
.chzn-container-single .chzn-drop {
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius : 0 0 4px 4px;
|
||||
border-radius : 0 0 4px 4px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
.chzn-container-single-nosearch .chzn-search input {
|
||||
position: absolute;
|
||||
left: -9000px;
|
||||
}
|
||||
|
||||
/* @group Multi Chosen */
|
||||
.chzn-container-multi .chzn-choices {
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
border: 1px solid #aaa;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
position: relative;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field {
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field input {
|
||||
color: #666;
|
||||
background: transparent !important;
|
||||
border: 0 !important;
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
height: 15px;
|
||||
padding: 5px;
|
||||
margin: 1px 0;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow : none;
|
||||
-o-box-shadow : none;
|
||||
box-shadow : none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field .default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius : 3px;
|
||||
border-radius : 3px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
background-color: #e4e4e4;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
color: #333;
|
||||
border: 1px solid #aaaaaa;
|
||||
line-height: 13px;
|
||||
padding: 3px 20px 3px 5px;
|
||||
margin: 3px 0 3px 5px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 4px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: url('chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
||||
background-position: right -11px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Results */
|
||||
.chzn-container .chzn-results {
|
||||
margin: 0 4px 4px 0;
|
||||
max-height: 240px;
|
||||
padding: 0 0 0 4px;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.chzn-container-multi .chzn-results {
|
||||
margin: -1px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container .chzn-results li {
|
||||
display: none;
|
||||
line-height: 15px;
|
||||
padding: 5px 6px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container .chzn-results .active-result {
|
||||
cursor: pointer;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted {
|
||||
background-color: #3875d7;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
||||
background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -ms-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
color: #fff;
|
||||
}
|
||||
.chzn-container .chzn-results li em {
|
||||
background: #feffde;
|
||||
font-style: normal;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted em {
|
||||
background: transparent;
|
||||
}
|
||||
.chzn-container .chzn-results .no-results {
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .group-result {
|
||||
cursor: default;
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
.chzn-container .chzn-results .group-option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.chzn-container-multi .chzn-drop .result-selected {
|
||||
display: none;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll {
|
||||
background: white;
|
||||
margin: 0 4px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 321px; /* This should by dynamic with js */
|
||||
z-index: 1;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll span {
|
||||
display: inline-block;
|
||||
height: 17px;
|
||||
text-indent: -5000px;
|
||||
width: 9px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down {
|
||||
bottom: 0;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down span {
|
||||
background: url('chosen-sprite.png') no-repeat -4px -3px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-up span {
|
||||
background: url('chosen-sprite.png') no-repeat -22px -3px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Active */
|
||||
.chzn-container-active .chzn-single {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-box-shadow: 0 1px 0 #fff inset;
|
||||
-moz-box-shadow : 0 1px 0 #fff inset;
|
||||
-o-box-shadow : 0 1px 0 #fff inset;
|
||||
box-shadow : 0 1px 0 #fff inset;
|
||||
background-color: #eee;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
-webkit-border-bottom-left-radius : 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft : 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-left-radius : 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div {
|
||||
background: transparent;
|
||||
border-left: none;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div b {
|
||||
background-position: -18px 1px;
|
||||
}
|
||||
.chzn-container-active .chzn-choices {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
.chzn-container-active .chzn-choices .search-field input {
|
||||
color: #111 !important;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Disabled Support */
|
||||
.chzn-disabled {
|
||||
cursor: default;
|
||||
opacity:0.5 !important;
|
||||
}
|
||||
.chzn-disabled .chzn-single {
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @group Right to Left */
|
||||
.chzn-rtl { text-align: right; }
|
||||
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
|
||||
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
|
||||
|
||||
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
|
||||
.chzn-rtl .chzn-single abbr {
|
||||
left: 26px;
|
||||
right: auto;
|
||||
}
|
||||
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
|
||||
.chzn-rtl .chzn-choices li { float: right; }
|
||||
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
|
||||
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;}
|
||||
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
|
||||
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
|
||||
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
||||
.chzn-rtl .chzn-search input {
|
||||
background: #fff url('chosen-sprite.png') no-repeat -38px -22px;
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
padding: 4px 5px 4px 20px;
|
||||
direction: rtl;
|
||||
}
|
||||
/* @end */
|
||||
File diff suppressed because it is too large
Load Diff
10
www/protected/extensions/yii-chosen/assets/chosen.jquery.min.js
vendored
Normal file
10
www/protected/extensions/yii-chosen/assets/chosen.jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
14
www/protected/extensions/yii-chosen/messages/config.php
Normal file
14
www/protected/extensions/yii-chosen/messages/config.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'sourcePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
|
||||
'messagePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'messages',
|
||||
'languages' => array('es', 'en'),
|
||||
'fileTypes' => array('php'),
|
||||
'overwrite' => true,
|
||||
'exclude' => array(
|
||||
'/messages',
|
||||
'/vendors',
|
||||
'/assets',
|
||||
),
|
||||
);
|
||||
25
www/protected/extensions/yii-chosen/messages/en/main.php
Normal file
25
www/protected/extensions/yii-chosen/messages/en/main.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yiic message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE, this file must be saved in UTF-8 encoding.
|
||||
*
|
||||
* @version $Id: $
|
||||
*/
|
||||
return array(
|
||||
'No results match' => '',
|
||||
'Select Some Options' => '',
|
||||
'Select an Option' => '',
|
||||
);
|
||||
25
www/protected/extensions/yii-chosen/messages/es/main.php
Normal file
25
www/protected/extensions/yii-chosen/messages/es/main.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yiic message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE, this file must be saved in UTF-8 encoding.
|
||||
*
|
||||
* @version $Id: $
|
||||
*/
|
||||
return array (
|
||||
'No results match' => 'No hay coincidencias',
|
||||
'Select Some Options' => 'Seleccione algunas opciones',
|
||||
'Select an Option' => 'Seleccione una opción',
|
||||
);
|
||||
28
www/protected/extensions/yii-chosen/readme.md
Normal file
28
www/protected/extensions/yii-chosen/readme.md
Normal file
@ -0,0 +1,28 @@
|
||||
Chosen usage instructions
|
||||
===========================
|
||||
|
||||
1. Checkout source code to your project, for example to ext.chosen.
|
||||
2. Use it, as any input widget.
|
||||
|
||||
Example:
|
||||
|
||||
$this->widget('ext.chosen.Chosen',array(
|
||||
'name' => 'inputName', // input name
|
||||
'value' => '2', // selection
|
||||
'data' => array( // list of select options
|
||||
'1'=>'Option 1',
|
||||
'2'=>'Option 2',
|
||||
'3'=>'Option 3',
|
||||
'4'=>'Option 4',
|
||||
),
|
||||
));
|
||||
|
||||
Also you can use it like CHtml helper
|
||||
----------------------------------------
|
||||
Before this import ext.chosen.Chosen, you can add it to config/main.php or call Yii::import('ext.chosen.Chosen') before usage.
|
||||
|
||||
Chosen::dropDownList($name, $select, $data, $htmlOptions);
|
||||
Chosen::activeDropDownList($model, $attribute, $data, $htmlOptions);
|
||||
Chosen::multiSelect($name, $select, $data, $htmlOptions);
|
||||
Chosen::activeMultiSelect($model, $attribute, $data, $htmlOptions);
|
||||
|
||||
6
www/protected/extensions/yii-chosen/upgradeAssets.sh
Normal file
6
www/protected/extensions/yii-chosen/upgradeAssets.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
cp ./vendors/chosen/chosen/chosen-sprite.png ./assets/
|
||||
cp ./vendors/chosen/chosen/chosen.jquery.min.js ./assets/
|
||||
cp ./vendors/chosen/chosen/chosen.jquery.js ./assets/
|
||||
cp ./vendors/chosen/chosen/cchosen.css ./assets/
|
||||
5
www/protected/extensions/yii-chosen/vendors.sh
Normal file
5
www/protected/extensions/yii-chosen/vendors.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
mkdir vendors
|
||||
git clone https://github.com/harvesthq/chosen.git ./vendors/chosen/
|
||||
|
||||
@ -1,23 +1,22 @@
|
||||
<?php
|
||||
|
||||
class m120905_183258_tbl_empresas extends CDbMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->createTable('tbl_empresas', array(
|
||||
'id' => 'pk',
|
||||
'cif' => 'string',
|
||||
'nombre' => 'string',
|
||||
'email' => 'string',
|
||||
'pagina_web' => 'string',
|
||||
'empleados' => 'integer',
|
||||
'direccion' => 'string',
|
||||
'descripcion' => 'text',
|
||||
));
|
||||
}
|
||||
class m120905_183258_tbl_empresas extends CDbMigration {
|
||||
|
||||
public function up() {
|
||||
$this->createTable('tbl_empresas', array(
|
||||
'id' => 'pk',
|
||||
'cif' => 'string',
|
||||
'nombre' => 'string',
|
||||
'email' => 'string',
|
||||
'pagina_web' => 'string',
|
||||
'empleados' => 'integer',
|
||||
'direccion' => 'string',
|
||||
'descripcion' => 'text',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function down() {
|
||||
$this->dropTable('tbl_empresas');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dropTable('tbl_empresas');
|
||||
}
|
||||
}
|
||||
@ -1,33 +1,31 @@
|
||||
<?php
|
||||
|
||||
class m120905_184758_tbl_usuarios extends CDbMigration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('tbl_usuarios', array(
|
||||
'id' => 'pk',
|
||||
'id_empresa' => 'integer',
|
||||
'estado' => 'decimal(1,0)',
|
||||
'clave_seguridad' => 'string',
|
||||
'email' => 'string NOT NULL',
|
||||
'nombre' => 'string',
|
||||
'apellidos' => 'string',
|
||||
'password' => 'string NOT NULL',
|
||||
'tipo' => 'string NOT NULL',
|
||||
'titulo' => 'string',
|
||||
'localidad' => 'string',
|
||||
'telefono' => 'string',
|
||||
'descripcion' => 'text',
|
||||
'last_login_time' => 'datetime',
|
||||
));
|
||||
|
||||
$this->addForeignKey('fk_usuarios_1', 'tbl_usuarios', 'id_empresa', 'tbl_empresas', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
class m120905_184758_tbl_usuarios extends CDbMigration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_usuarios', array(
|
||||
'id' => 'pk',
|
||||
'id_empresa' => 'integer',
|
||||
'estado' => 'decimal(1,0)',
|
||||
'clave_seguridad' => 'string',
|
||||
'email' => 'string NOT NULL',
|
||||
'nombre' => 'string',
|
||||
'apellidos' => 'string',
|
||||
'password' => 'string NOT NULL',
|
||||
'tipo' => 'string NOT NULL',
|
||||
'titulo' => 'string',
|
||||
'localidad' => 'string',
|
||||
'telefono' => 'string',
|
||||
'descripcion' => 'text',
|
||||
'last_login_time' => 'datetime',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->addForeignKey('fk_usuarios_1', 'tbl_usuarios', 'id_empresa', 'tbl_empresas', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropForeignKey('fk_usuarios_1', 'tbl_usuarios');
|
||||
$this->dropTable('tbl_usuarios');
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropForeignKey('fk_usuarios_1', 'tbl_usuarios');
|
||||
$this->dropTable('tbl_usuarios');
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,28 +1,30 @@
|
||||
<?php
|
||||
|
||||
class m120911_174500_tbl_social_connect extends CDbMigration
|
||||
{
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_social_connect', array(
|
||||
'id' => 'pk',
|
||||
'userId' => 'integer NOT NULL',
|
||||
'provider' => 'string NOT NULL',
|
||||
'providerUser' => 'string NOT NULL',
|
||||
));
|
||||
$this->createIndex('idx_provider_provideruser', 'tbl_social_connect', 'provider, providerUser', true);
|
||||
$this->createIndex('idx_provider', 'tbl_social_connect', 'provider');
|
||||
$this->createIndex('idx_provideruser', 'tbl_social_connect', 'providerUser');
|
||||
$this->createIndex('idx_userId', 'tbl_social_connect', 'userId');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropIndex('idx_provider_provideruser', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_provider', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_provideruser', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_userId', 'tbl_social_connect');
|
||||
class m120911_174500_tbl_social_connect extends CDbMigration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_social_connect', array(
|
||||
'id' => 'pk',
|
||||
'userId' => 'integer NOT NULL',
|
||||
'provider' => 'string NOT NULL',
|
||||
'providerUser' => 'string NOT NULL',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->createIndex('idx_provider_provideruser', 'tbl_social_connect', 'provider, providerUser', true);
|
||||
$this->createIndex('idx_provider', 'tbl_social_connect', 'provider');
|
||||
$this->createIndex('idx_provideruser', 'tbl_social_connect', 'providerUser');
|
||||
$this->createIndex('idx_userId', 'tbl_social_connect', 'userId');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropIndex('idx_provider_provideruser', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_provider', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_provideruser', 'tbl_social_connect');
|
||||
$this->dropIndex('idx_userId', 'tbl_social_connect');
|
||||
|
||||
$this->dropTable('tbl_social_connect');
|
||||
}
|
||||
|
||||
$this->dropTable('tbl_social_connect');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,17 +1,16 @@
|
||||
<?php
|
||||
|
||||
class m120925_162525_create_tbl_poblaciones extends CDbMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->createTable('tbl_poblaciones', array(
|
||||
'id' => 'pk',
|
||||
'poblacion' => 'string',
|
||||
));
|
||||
}
|
||||
class m120925_162525_create_tbl_poblaciones extends CDbMigration {
|
||||
|
||||
public function up() {
|
||||
$this->createTable('tbl_poblaciones', array(
|
||||
'id' => 'pk',
|
||||
'poblacion' => 'string',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function down() {
|
||||
$this->dropTable('tbl_poblaciones');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dropTable('tbl_poblaciones');
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
class m120926_090957_tbl_empresas extends CDbMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->dropColumn('tbl_empresas', 'empleados');
|
||||
$this->addColumn('tbl_empresas', 'empleados', 'string');
|
||||
}
|
||||
class m120926_090957_tbl_empresas extends CDbMigration {
|
||||
|
||||
public function up() {
|
||||
$this->dropColumn('tbl_empresas', 'empleados');
|
||||
$this->addColumn('tbl_empresas', 'empleados', 'string');
|
||||
}
|
||||
|
||||
public function down() {
|
||||
$this->dropColumn('tbl_empresas', 'empleados');
|
||||
$this->addColumn('tbl_empresas', 'empleados', 'integer');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dropColumn('tbl_empresas', 'empleados');
|
||||
$this->addColumn('tbl_empresas', 'empleados', 'integer');
|
||||
}
|
||||
}
|
||||
@ -1,35 +1,36 @@
|
||||
<?php
|
||||
|
||||
class m120927_143321_tbl_productos extends CDbMigration
|
||||
{
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_productos', array(
|
||||
'id' => 'pk',
|
||||
'titulo' => 'string',
|
||||
'n_agentes' => 'integer',
|
||||
'n_publicaciones' => 'integer',
|
||||
|
||||
));
|
||||
|
||||
$this->createTable('tbl_subscripciones', array(
|
||||
'id' => 'pk',
|
||||
'id_usuario' => 'integer NOT NULL',
|
||||
'id_producto' => 'integer NOT NULL',
|
||||
'estado' => 'string',
|
||||
'fecha_inicio' => 'datetime',
|
||||
'fecha_fin' => 'datetime',
|
||||
));
|
||||
|
||||
$this->addForeignKey('fk_subscripciones_1', 'tbl_subscripciones', 'id_usuario', 'tbl_usuarios', 'id', 'CASCADE', 'CASCADE');
|
||||
$this->addForeignKey('fk_subscripciones_2', 'tbl_subscripciones', 'id_producto', 'tbl_productos', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
class m120927_143321_tbl_productos extends CDbMigration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_productos', array(
|
||||
'id' => 'pk',
|
||||
'titulo' => 'string',
|
||||
'n_agentes' => 'integer',
|
||||
'n_publicaciones' => 'integer',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
|
||||
$this->createTable('tbl_subscripciones', array(
|
||||
'id' => 'pk',
|
||||
'id_usuario' => 'integer NOT NULL',
|
||||
'id_producto' => 'integer NOT NULL',
|
||||
'estado' => 'string',
|
||||
'fecha_inicio' => 'datetime',
|
||||
'fecha_fin' => 'datetime',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
|
||||
$this->addForeignKey('fk_subscripciones_1', 'tbl_subscripciones', 'id_usuario', 'tbl_usuarios', 'id', 'CASCADE', 'CASCADE');
|
||||
$this->addForeignKey('fk_subscripciones_2', 'tbl_subscripciones', 'id_producto', 'tbl_productos', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropForeignKey('fk_subscripciones_2', 'tbl_subscripciones');
|
||||
$this->dropForeignKey('fk_subscripciones_1', 'tbl_subscripciones');
|
||||
|
||||
$this->dropTable('tbl_subscripciones');
|
||||
$this->dropTable('tbl_productos');
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropForeignKey('fk_subscripciones_2', 'tbl_subscripciones');
|
||||
$this->dropForeignKey('fk_subscripciones_1', 'tbl_subscripciones');
|
||||
|
||||
$this->dropTable('tbl_subscripciones');
|
||||
$this->dropTable('tbl_productos');
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ class m121014_170834_tbl_estados_candidatos extends CDbMigration {
|
||||
$this->createTable('tbl_estados_candidatos', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
|
||||
@ -5,30 +5,23 @@ class m121014_171025_tbl_idiomas_tecnologias_titulaciones extends CDbMigration {
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_idiomas', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
));
|
||||
'descripcion' => 'string NOT NULL',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->createTable('tbl_tecnologias', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->createTable('tbl_perfiles_tecnicos', array(
|
||||
$this->createTable('tbl_titulaciones', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
));
|
||||
|
||||
$this->createTable('tbl_perfiles_funcionales', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropTable('tbl_perfiles_tecnicos');
|
||||
|
||||
$this->dropTable('tbl_perfiles_funcionales');
|
||||
|
||||
$this->dropTable('tbl_titulaciones');
|
||||
|
||||
$this->dropTable('tbl_tecnologias');
|
||||
|
||||
$this->dropTable('tbl_idiomas');
|
||||
|
||||
@ -43,7 +43,7 @@ class m121014_171033_tbl_candidatos extends CDbMigration {
|
||||
'disponibilidad_guardias' => 'string',
|
||||
'disponibilidad_viajar' => 'string',
|
||||
'disponibilidad_proyectos_internacionales' => 'string',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
|
||||
@ -9,7 +9,7 @@ class m121014_171456_tbl_candidatos_idiomas extends CDbMigration {
|
||||
'idioma' => 'string NOT NULL',
|
||||
'conversacion' => 'string',
|
||||
'lectura_traduccion' => 'string',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->addForeignKey('fk_candidatos_idiomas_1', 'tbl_candidatos_idiomas', 'candidato_id', 'tbl_candidatos', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ class m121014_171501_tbl_candidatos_titulaciones extends CDbMigration {
|
||||
'id' => 'pk',
|
||||
'candidato_id' => 'integer NOT NULL',
|
||||
'titulacion' => 'string NOT NULL',
|
||||
));
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->addForeignKey('fk_candidatos_titulaciones_1', 'tbl_candidatos_titulaciones', 'candidato_id', 'tbl_candidatos', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
|
||||
22
www/protected/migrations/m121024_103612_tbl_perfiles.php
Normal file
22
www/protected/migrations/m121024_103612_tbl_perfiles.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class m121024_103612_tbl_perfiles extends CDbMigration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->createTable('tbl_perfiles_tecnicos', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
|
||||
$this->createTable('tbl_perfiles_funcionales', array(
|
||||
'id' => 'pk',
|
||||
'descripcion' => 'string NOT NULL',
|
||||
), 'ENGINE=InnoDB CHARSET=utf8');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropTable('tbl_perfiles_tecnicos');
|
||||
$this->dropTable('tbl_perfiles_funcionales');
|
||||
}
|
||||
|
||||
}
|
||||
90
www/protected/models/CandidatoTitulacion.php
Normal file
90
www/protected/models/CandidatoTitulacion.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @class CandidatoIdioma
|
||||
* @brief Modelo de la tabla "tbl_candidatos_titulaciones".
|
||||
*
|
||||
* The followings are the available columns in table 'tbl_candidatos_titulaciones':
|
||||
* @property integer $id
|
||||
* @property integer $candidato_id
|
||||
* @property string $titulacion
|
||||
*
|
||||
* The followings are the available model relations:
|
||||
* @property Candidato $candidato
|
||||
*/
|
||||
class CandidatoTitulacion extends CActiveRecord {
|
||||
|
||||
/**
|
||||
* Returns the static model of the specified AR class.
|
||||
* @param string $className active record class name.
|
||||
* @return CandidatoTitulacion the static model class
|
||||
*/
|
||||
public static function model($className = __CLASS__) {
|
||||
return parent::model($className);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string the associated database table name
|
||||
*/
|
||||
public function tableName() {
|
||||
return 'tbl_candidatos_titulaciones';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array validation rules for model attributes.
|
||||
*/
|
||||
public function rules() {
|
||||
// NOTE: you should only define rules for those attributes that
|
||||
// will receive user inputs.
|
||||
return array(
|
||||
array('candidato_id, titulacion', 'required'),
|
||||
array('candidato_id', 'numerical', 'integerOnly' => true),
|
||||
array('titulacion', 'length', 'max' => 255),
|
||||
// The following rule is used by search().
|
||||
// Please remove those attributes that should not be searched.
|
||||
array('id, candidato_id, titulacion', 'safe', 'on' => 'search'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array relational rules.
|
||||
*/
|
||||
public function relations() {
|
||||
// NOTE: you may need to adjust the relation name and the related
|
||||
// class name for the relations automatically generated below.
|
||||
return array(
|
||||
'candidato' => array(self::BELONGS_TO, 'Candidato', 'candidato_id'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array customized attribute labels (name=>label)
|
||||
*/
|
||||
public function attributeLabels() {
|
||||
return array(
|
||||
'id' => 'ID',
|
||||
'candidato_id' => 'Candidato',
|
||||
'titulacion' => 'Titulación',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of models based on the current search/filter conditions.
|
||||
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
|
||||
*/
|
||||
public function search() {
|
||||
// Warning: Please modify the following code to remove attributes that
|
||||
// should not be searched.
|
||||
|
||||
$criteria = new CDbCriteria;
|
||||
|
||||
$criteria->compare('id', $this->id);
|
||||
$criteria->compare('candidato_id', $this->candidato_id);
|
||||
$criteria->compare('titulacion', $this->titulacion, true);
|
||||
|
||||
return new CActiveDataProvider($this, array(
|
||||
'criteria' => $criteria,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
@ -45,6 +45,15 @@ class Titulacion extends CActiveRecord {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array Default scope for this model.
|
||||
*/
|
||||
public function defaultScope() {
|
||||
return array(
|
||||
'order' => 'descripcion'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of models based on the current search/filter conditions.
|
||||
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
|
||||
|
||||
@ -42,10 +42,7 @@ $(document).ready(function() {
|
||||
}
|
||||
//* external links
|
||||
//profind_external_links.init();
|
||||
|
||||
/* Chosen */
|
||||
//profind_chosen.init();
|
||||
|
||||
|
||||
//* accordion icons
|
||||
profind_acc_icons.init();
|
||||
|
||||
@ -68,17 +65,6 @@ profind_external_links = {
|
||||
}
|
||||
};
|
||||
|
||||
//* external links
|
||||
profind_chosen = {
|
||||
init: function() {
|
||||
$('.chosen').chosen({
|
||||
allow_single_deselect: true,
|
||||
no_results_text: 'No existe'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
profind_sidebar = {
|
||||
init: function() {
|
||||
// sidebar onload state
|
||||
|
||||
@ -10,12 +10,15 @@ $(document).ready(function() {
|
||||
profind_template = {
|
||||
init: function() {
|
||||
profind_template.hideHeaderIfEmpty();
|
||||
profind_template.onAppend();
|
||||
$(".add").click(function(){
|
||||
var template = jQuery.format(jQuery.trim($(this).siblings(".template").val()));
|
||||
var place = $(this).parents(".templateFrame:first").children(".templateTarget");
|
||||
var i = place.find(".rowIndex").length>0 ? place.find(".rowIndex").max()+1 : 0;
|
||||
$(template(i)).appendTo(place);
|
||||
profind_template.showHeader(this);
|
||||
profind_template.onAppend();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -41,5 +44,9 @@ profind_template = {
|
||||
var place = $(element).parents(".templateFrame:first");
|
||||
$(place).children('.templateHead').show();
|
||||
$(place).addClass('table');
|
||||
},
|
||||
|
||||
onAppend: function() {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
# Chosen, a Select Box Enhancer for jQuery and Protoype
|
||||
## by Patrick Filler for [Harvest](http://getharvest.com)
|
||||
|
||||
Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
||||
|
||||
Copyright (c) 2011 by Harvest
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@ -1,50 +0,0 @@
|
||||
# Chosen
|
||||
|
||||
Chosen is a library for making long, unwieldy select boxes more user friendly.
|
||||
|
||||
- jQuery support: 1.4+
|
||||
- Prototype support: 1.7+
|
||||
|
||||
For documentation, usage, and examples, see:
|
||||
http://harvesthq.github.com/chosen
|
||||
|
||||
### Contributing to Chosen
|
||||
|
||||
Contributions and pull requests are very welcome. Please follow these guidelines when submitting new code.
|
||||
|
||||
1. Make all changes in Coffeescript files, **not** JavaScript files.
|
||||
2. For feature changes, update both jQuery *and* Prototype versions
|
||||
3. Use `npm install -d` to install the correct development dependencies.
|
||||
4. Use `cake build` or `cake watch` to generate Chosen's JavaScript file and minified version.
|
||||
5. Don't touch the `VERSION` file
|
||||
6. Submit a Pull Request using GitHub.
|
||||
|
||||
### Using CoffeeScript & Cake
|
||||
|
||||
First, make sure you have the proper CoffeeScript / Cake set-up in place. We have added a package.json that makes this easy:
|
||||
|
||||
```
|
||||
npm install -d
|
||||
```
|
||||
|
||||
This will install `coffee-script` and `uglifyjs`.
|
||||
|
||||
Once you're configured, building the JavasScript from the command line is easy:
|
||||
|
||||
cake build # build Chosen from source
|
||||
cake watch # watch coffee/ for changes and build Chosen
|
||||
|
||||
If you're interested, you can find the recipes in Cakefile.
|
||||
|
||||
|
||||
### Chosen Credits
|
||||
|
||||
- Built by [Harvest](http://www.getharvest.com/). Want to work on projects like this? [We’re hiring](http://www.getharvest.com/careers)!
|
||||
- Concept and development by [Patrick Filler](http://www.patrickfiller.com/)
|
||||
- Design and CSS by [Matthew Lettini](http://matthewlettini.com/)
|
||||
|
||||
### Notable Forks
|
||||
|
||||
- [Chosen for MooTools](https://github.com/julesjanssen/chosen), by Jules Janssen
|
||||
- [Chosen Drupal 7 Module](http://drupal.org/project/chosen), by Pol Dell'Aiera, Arshad Chummun, Bart Feenstra, Kálmán Hosszu, etc.
|
||||
- [Chosen CakePHP Plugin](https://github.com/paulredmond/chosen-cakephp), by Paul Redmond
|
||||
@ -1 +0,0 @@
|
||||
0.9.8
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -2,87 +2,94 @@
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.calculation.min.js', CClientScript::POS_END); ?>
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/profind-template.js', CClientScript::POS_END); ?>
|
||||
|
||||
<fieldset>
|
||||
<div class="row-fluid formSep">
|
||||
<div class="span12">
|
||||
<legend class="control-label" style="text-align: left;"><?php echo Yii::t('profind', 'Idiomas'); ?></legend>
|
||||
<div class="controls">
|
||||
|
||||
<table class="table templateFrame">
|
||||
<thead class="templateHead">
|
||||
<tr>
|
||||
<th style="width: 50%;"><?php echo Yii::t('profind', 'Idioma'); ?></th>
|
||||
<th style="width: 20%;"><?php echo Yii::t('profind', 'Conversación'); ?></th>
|
||||
<th style="width: 20%;"><?php echo Yii::t('profind', 'Lectura / traducción'); ?></th>
|
||||
<th style="width: 10%;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="templateTarget">
|
||||
<?php foreach($candidato->idiomas as $i=>$idioma): ?>
|
||||
<tr class="templateContent">
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]idioma",
|
||||
CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'),
|
||||
array('class' => 'span12')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]conversacion",
|
||||
$idioma->opcionesNivel,
|
||||
array('class' => 'span12')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]lectura_traduccion",
|
||||
$idioma->opcionesNivel,
|
||||
array('class' => 'span12')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeHiddenField($idioma, "[$i]id", array('class' => 'pk')); ?>
|
||||
<?php echo CHtml::activeHiddenField($idioma, "[$i]candidato_id"); ?>
|
||||
<?php echo CHtml::hiddenField("CandidatoIdioma[$i][_borrar]", '0', array('class' => 'to_remove')); ?>
|
||||
<input type="hidden" class="rowIndex" value="<?php echo $i;?>" />
|
||||
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a class="btn btn-small add" href="#"><i class="icon-plus"></i> <?php echo Yii::t('profind', 'Añadir un idioma');?></a>
|
||||
<textarea class="hide template">
|
||||
<tr class="templateContent">
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][idioma]', '', CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'), array('class' => 'span12')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][conversacion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][lectura_traduccion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][id]', '', array('class' => 'pk')); ?>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][candidato_id]'); ?>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][_borrar]', '0', array('class' => 'to_remove')); ?>
|
||||
<input type="hidden" class="rowIndex" value="{0}" />
|
||||
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
$js_chosen = <<<JS
|
||||
profind_template.onAppend = function() {
|
||||
$('.chosen').chosen();
|
||||
};
|
||||
JS;
|
||||
Yii::app()->clientScript->registerScript('js_chosen', $js_chosen, CClientScript::POS_END);
|
||||
?>
|
||||
|
||||
<div class="row-fluid formSep">
|
||||
<div class="span12">
|
||||
<label class="control-label"><?php echo Yii::t('profind', 'Idiomas'); ?></label>
|
||||
<div class="controls">
|
||||
|
||||
<table class="table templateFrame">
|
||||
<thead class="templateHead">
|
||||
<tr>
|
||||
<th style="width: 50%;"><?php echo Yii::t('profind', 'Idioma'); ?></th>
|
||||
<th style="width: 20%;"><?php echo Yii::t('profind', 'Conversación'); ?></th>
|
||||
<th style="width: 20%;"><?php echo Yii::t('profind', 'Lectura / traducción'); ?></th>
|
||||
<th style="width: 10%;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="templateTarget">
|
||||
<?php foreach($candidato->idiomas as $i=>$idioma): ?>
|
||||
<tr class="templateContent">
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]idioma",
|
||||
CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'),
|
||||
array('class' => 'span12 chosen')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]conversacion",
|
||||
$idioma->opcionesNivel,
|
||||
array('class' => 'span12 chosen')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeDropDownList($idioma,
|
||||
"[$i]lectura_traduccion",
|
||||
$idioma->opcionesNivel,
|
||||
array('class' => 'span12 chosen')
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::activeHiddenField($idioma, "[$i]id", array('class' => 'pk')); ?>
|
||||
<?php echo CHtml::activeHiddenField($idioma, "[$i]candidato_id"); ?>
|
||||
<?php echo CHtml::hiddenField("CandidatoIdioma[$i][_borrar]", '0', array('class' => 'to_remove')); ?>
|
||||
<input type="hidden" class="rowIndex" value="<?php echo $i;?>" />
|
||||
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a class="btn btn-small add" href="#"><i class="icon-plus"></i> <?php echo Yii::t('profind', 'Añadir un idioma');?></a>
|
||||
<textarea class="hide template">
|
||||
<tr class="templateContent">
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][idioma]', '', CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'), array('class' => 'span12 chosen')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][conversacion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12 chosen')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][lectura_traduccion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12 chosen')); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][id]', '', array('class' => 'pk')); ?>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][candidato_id]'); ?>
|
||||
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][_borrar]', '0', array('class' => 'to_remove')); ?>
|
||||
<input type="hidden" class="rowIndex" value="{0}" />
|
||||
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
23
www/themes/profind/views/candidato/__titulaciones.php
Normal file
23
www/themes/profind/views/candidato/__titulaciones.php
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="row-fluid formSep">
|
||||
<div class="span12">
|
||||
<label class="control-label"><?php echo Yii::t('profind', 'Titulaciones'); ?></label>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$lista = CHtml::listData(Titulacion::model()->findAll(), 'descripcion', 'descripcion');
|
||||
$seleccion = ($candidato->titulaciones) ? CHtml::listData($candidato->titulaciones, 'titulacion', 'titulacion') : '';
|
||||
|
||||
$this->widget('ext.yii-chosen.Chosen', array(
|
||||
'name' => 'CandidatoTitulacion[]',
|
||||
'value' => $seleccion,
|
||||
'data' => $lista,
|
||||
'placeholderSingle' => Yii::t('profind', 'Seleccione las titulaciones'),
|
||||
'htmlOptions' => array(
|
||||
'multiple' => true,
|
||||
'empty' => '',
|
||||
'class' => 'span12'
|
||||
)
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,21 +1,7 @@
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/bootstrap-inputmask.js', CClientScript::POS_END); ?>
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/bootstrap-fileupload.js', CClientScript::POS_END); ?>
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/lib/chosen/chosen.jquery.min.js', CClientScript::POS_END); ?>
|
||||
|
||||
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/lib/chosen/chosen.css'); ?>
|
||||
|
||||
<?php
|
||||
$js_chosen = <<<JS
|
||||
profind_localidad_chosen = {
|
||||
init: function() {
|
||||
$('.localidad').chosen({
|
||||
allow_single_deselect: true,
|
||||
no_results_text: 'Localidad no encontrada:'
|
||||
});
|
||||
}
|
||||
};
|
||||
JS;
|
||||
Yii::app()->clientScript->registerScript('js_chosen', $js_chosen, CClientScript::POS_END);
|
||||
|
||||
$js_quitar_foto = <<<JS
|
||||
profind_fotografia = {
|
||||
@ -32,7 +18,6 @@ Yii::app()->clientScript->registerScript('js_quitar_foto', $js_quitar_foto, CCli
|
||||
|
||||
$js_init = <<<JS
|
||||
$(document).ready(function(){
|
||||
profind_localidad_chosen.init();
|
||||
profind_fotografia.init();
|
||||
});
|
||||
JS;
|
||||
@ -116,11 +101,16 @@ $form = $this->beginWidget('CActiveForm', array(
|
||||
<?php echo $form->labelEx($candidato, 'lugar_nacimiento', array('class' => 'control-label')); ?>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$lista = CHtml::listData(Poblacion::model()->findAll(), 'id', 'poblacion');
|
||||
echo $form->dropDownList($candidato, 'lugar_nacimiento', $lista, array(
|
||||
'empty' => '',
|
||||
'data-placeholder' => Yii::t('profind', 'Elegir la localidad...'),
|
||||
'class' => 'span6 localidad',
|
||||
$lista = CHtml::listData(Poblacion::model()->findAll(), 'poblacion', 'poblacion');
|
||||
$this->widget('ext.yii-chosen.Chosen', array(
|
||||
'name' => CHtml::activeName($candidato, 'lugar_nacimiento'),
|
||||
'value' => $candidato->lugar_nacimiento,
|
||||
'data' => $lista,
|
||||
'placeholderSingle' => Yii::t('profind', 'Seleccione una localidad'),
|
||||
'htmlOptions' => array(
|
||||
'empty' => '',
|
||||
'class' => 'span12'
|
||||
)
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
@ -154,7 +144,7 @@ $form = $this->beginWidget('CActiveForm', array(
|
||||
<div class="span6">
|
||||
<?php echo $form->labelEx($candidato, 'email', array('class' => 'control-label')); ?>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<div class="input-prepend span6">
|
||||
<span class="add-on"><i class="icon-envelope"></i></span>
|
||||
<?php echo $form->textField($candidato, 'email', array('class' => 'span12')); ?>
|
||||
</div>
|
||||
@ -177,6 +167,12 @@ $form = $this->beginWidget('CActiveForm', array(
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend class="control-label" style="text-align: left;"><?php echo Yii::t('profind', 'Datos académicos'); ?></legend>
|
||||
<?php echo $this->renderPartial('__titulaciones', array('candidato' => $candidato)); ?>
|
||||
<?php echo $this->renderPartial('__idiomas', array('candidato' => $candidato)); ?>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Yii::t('profind', 'Disponibilidad'); ?></legend>
|
||||
@ -219,6 +215,7 @@ $form = $this->beginWidget('CActiveForm', array(
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend class="control-label" style="text-align: left;"><?php echo Yii::t('profind', 'Otros datos'); ?></legend>
|
||||
<div class="row-fluid sepH_b">
|
||||
<div class="span12">
|
||||
<label class="control-label"><?php echo Yii::t('profind', 'Rango salarial'); ?> </label>
|
||||
@ -267,7 +264,6 @@ $form = $this->beginWidget('CActiveForm', array(
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<?php echo $this->renderPartial('__idiomas', array('candidato' => $candidato)); ?>
|
||||
|
||||
<fieldset>
|
||||
<div class="row-fluid formSep">
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/bootstrap-inputmask.js'); ?>
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/bootstrap-fileupload.js'); ?>
|
||||
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/lib/chosen/chosen.jquery.min.js'); ?>
|
||||
|
||||
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/lib/chosen/chosen.css'); ?>
|
||||
|
||||
<?php
|
||||
Yii::app()->clientScript->registerScript(
|
||||
@ -102,13 +99,17 @@ Yii::app()->clientScript->registerScript(
|
||||
<?php echo $form->labelEx($model, 'localidad', array('class' => 'control-label')); ?>
|
||||
<div class="controls">
|
||||
<?php
|
||||
$lista = CHtml::listData(Poblacion::model()->findAll(), 'id', 'poblacion');
|
||||
echo $form->dropDownList(
|
||||
$model, 'localidad', $lista, array(
|
||||
'empty' => '',
|
||||
'data-placeholder' => Yii::t('profind', 'Elegir la localidad...'),
|
||||
'class' => 'chzn_a input-xlarge',
|
||||
));
|
||||
$lista = CHtml::listData(Poblacion::model()->findAll(), 'poblacion', 'poblacion');
|
||||
$this->widget('ext.yii-chosen.Chosen', array(
|
||||
'name' => CHtml::activeName($model, 'localidad'),
|
||||
'value' => $model->localidad,
|
||||
'data' => $lista,
|
||||
'placeholderSingle' => Yii::t('profind', 'Seleccione una localidad'),
|
||||
'htmlOptions' => array(
|
||||
'empty' => '',
|
||||
'class' => 'input-xlarge'
|
||||
)
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user