- Candidatos (sin terminar)

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@64 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
This commit is contained in:
David Arranz 2012-10-22 15:47:11 +00:00
parent ad8fa63b30
commit 0c77b8e37a
53 changed files with 8901 additions and 228 deletions

View File

@ -12,7 +12,6 @@ $config = array(
'sourceLanguage' => 'es',
'language' => 'es',
'name' => 'PROFIND',
'defaultController' => 'usuario',
// preloading 'log' component
@ -23,10 +22,8 @@ $config = array(
// Modelos
'application.models.*',
'application.models.formularios.*',
// Helpers
'application.helpers.*',
// Componentes y extensiones
'application.components.*',
'application.extensions.yii-mail.YiiMailMessage',
@ -58,7 +55,12 @@ $config = array(
'errorAction' => 'site/error',
),
),
'params' => array(
'salarios_candidatos' => array(
'salario_minimo' => 12000,
'salario_maximo' => 60000,
),
'phpass' => array(
'iteration_count_log2' => 8,
'portable_hashes' => false,

View File

@ -49,6 +49,8 @@ $configSpecific = array(
'port' => 25,
),
'viewPath' => 'application.views.mails',
'logging' => true,
'dryRun' => false
),
'socialConnect' => array(
'class' => 'application.extensions.yii-socialconnect.YiiSocialConnect',
@ -87,14 +89,14 @@ $configSpecific = array(
// Save log messages on file
array(
'class' => 'CFileLogRoute',
'levels' => 'error, trace',
'categories' => 'application.*',
'levels' => 'error, warning, trace, info',
//'categories' => 'application.*',
),
// Show log messages on web pages
array(
'class' => 'CWebLogRoute',
'levels' => 'error, trace',
'categories' => 'application.*',
'levels' => 'error, warning, trace',
//'categories' => 'application.*',
'showInFireBug' => true,
),
),

View File

@ -0,0 +1,194 @@
<?php
/**
* @class CandidatoController
* @brief Controlador del modelo del candidato
*
* @package application.controllers
*/
class CandidatoController extends Controller {
/**
* @return array action filters
*/
public function filters() {
return array(
'accessControl', // perform access control for CRUD operations
);
}
/**
* Specifies the access control rules.
* This method is used by the 'accessControl' filter.
* @return array access control rules
*/
public function accessRules() {
return array(
array('allow',
'actions' => array('index', 'view', 'create', 'update', 'delete', 'admin', 'updateEstado'),
'users' => array('@'),
),
);
}
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$this->render('view', array(
'model' => $this->loadModel($id),
));
}
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate() {
$candidato = new Candidato;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if (isset($_POST['Candidato'])) {
$candidato->attributes = $_POST['Candidato'];
if ($candidato->save())
$this->redirect(array('index'));
}
$this->render('create', array(
'candidato' => $candidato,
));
}
/**
* @brief Modificar un candidato.
* @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'])) {
$candidato->attributes = $_POST['Candidato'];
$ficheroFotografia = CUploadedFile::getInstance($candidato, 'ficheroFotografia');
$quitarFotografia = Yii::app()->request->getParam('quitar_fotografia', '0');
if ($candidato->save()) {
if (($quitarFotografia == '1') && ($candidato->fotografia->tieneFotografia()))
$candidato->fotografia->eliminarFotografia();
if ($ficheroFotografia)
$candidato->fotografia->guardarFotografia($ficheroFotografia);
Yii::app()->user->setFlash('success', Yii::t('profind', 'Se ha actualizado el candidato'));
$this->redirect(array('index'));
}
}
$this->render('update', array(
'candidato' => $candidato,
));
}
public function actionUpdateEstado($id) {
$model = $this->loadModel($id);
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_GET['ajax']))
var_dump($_GET['ajax']);
if (isset($_POST['Candidato'])) {
$model->id_estado = $_POST['Candidato']['id_estado'];
if ($model->save()) {
} else {
}
} else {
echo $this->renderPartial('_form_estado', array('model' => $model, false, true));
}
}
/**
* Deletes a particular model.
* If deletion is successful, the browser will be redirected to the 'admin' page.
* @param integer $id the ID of the model to be deleted
*/
public function actionDelete($id) {
if (Yii::app()->request->isPostRequest) {
// we only allow deletion via POST request
$this->loadModel($id)->delete();
$this->borrarFoto($id);
Yii::app()->user->setFlash('success', "Candidato eliminardo correctamente.");
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if (!isset($_GET['ajax']))
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));
}
else
throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
}
/**
* @brief Lista todos los candidatos
*
*/
public function actionIndex() {
$candidatos = new Candidato('search');
$candidatos->unsetAttributes(); // clear any default values
if (isset($_GET['Candidato']))
$candidatos->attributes = $_GET['Candidato'];
$this->render('index', array(
'candidatos' => $candidatos));
}
public function actionHistorial($id) {
$this->layout = '//layouts/candidato';
$this->render('historial', array(
'model' => $this->loadModel($id),
));
}
/**
* Manages all models.
*/
public function actionAdmin() {
$model = new Candidato('search');
$model->unsetAttributes(); // clear any default values
if (isset($_GET['Candidato']))
$model->attributes = $_GET['Candidato'];
$this->render('admin', array(
'model' => $model,
));
}
/**
* @brief Devuelve los datos del candidato con id $id.
* Si el candidato no existe, se lanza una excepción HTTP 404
* @param integer $id el ID del candidato a recuperar
*/
public function loadModel($id) {
Yii::trace('Cargar el modelo', 'application.controllers.CandidatoController');
$model = Candidato::model()->findByPk($id);
if ($model === null)
throw new CHttpException(404, Yii::t('profind', 'La página solicitada no existe.'));
return $model;
}
}
?>

View File

@ -1,3 +1,7 @@
INSERT INTO `tbl_productos` (`id`, `titulo`, `n_agentes`, `n_publicaciones`) VALUES
(1, '1 Publicación - Gratis', NULL, 1),
(2, 'Hasta 5 Agentes - 500 euros/mes', 5, NULL);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(1, '1 Publicación - Gratis', 'PERSONAL', '0.00', '0', '1', 1);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(2, '5 agentes', 'EQUIPO', '500.00', '5', '-1', 0);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(3, '5 publicaciones', 'PERSONAL', '80.00', '0', '5', 0);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(4, '10 publicaciones', 'PERSONAL', '120.00', '0', '10', 0);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(5, '20 publicaciones', 'PERSONAL', '180.00', '0', '20', 0);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(6, 'Hasta 10 agentes', 'EQUIPO', '800.00', '10', '-1', 0);
INSERT INTO `tbl_productos` (`id`, `titulo`, `tipo`, `coste_mensual`, `max_agentes`, `max_publicaciones`, `predeterminado`) VALUES(7, 'Hasta 20 agentes', 'EQUIPO', '1200.00', '20', '-1', 0);

View File

@ -0,0 +1,14 @@
<?php
class m121014_170834_tbl_estados_candidatos extends CDbMigration {
public function safeUp() {
$this->createTable('tbl_estados_candidatos', array(
'id' => 'pk',
'descripcion' => 'string NOT NULL',
));
}
public function safeDown() {
$this->dropTable('tbl_estados_candidatos');
}
}
?>

View File

@ -0,0 +1,38 @@
<?php
class m121014_171025_tbl_idiomas_tecnologias_titulaciones extends CDbMigration {
public function safeUp() {
$this->createTable('tbl_idiomas', array(
'id' => 'pk',
'descripcion' => 'string NOT NULL',
));
$this->createTable('tbl_tecnologias', array(
'id' => 'pk',
'descripcion' => 'string NOT NULL',
));
$this->createTable('tbl_perfiles_tecnicos', array(
'id' => 'pk',
'descripcion' => 'string NOT NULL',
));
$this->createTable('tbl_perfiles_funcionales', array(
'id' => 'pk',
'descripcion' => 'string NOT NULL',
));
}
public function safeDown() {
$this->dropTable('tbl_perfiles_tecnicos');
$this->dropTable('tbl_perfiles_funcionales');
$this->dropTable('tbl_tecnologias');
$this->dropTable('tbl_idiomas');
}
}
?>

View File

@ -0,0 +1,53 @@
<?php
class m121014_171033_tbl_candidatos extends CDbMigration {
public function safeUp() {
$this->createTable('tbl_candidatos', array(
'id' => 'pk',
'id_estado' => 'integer',
'n_identificacion' => 'string',
'nombre' => 'string',
'apellidos' => 'string',
'email' => 'string',
'telefono_fijo' => 'string',
'telefono_movil' => 'string',
'sexo' => 'string',
'localidad' => 'string',
'fecha_nacimiento' => 'date',
'lugar_nacimiento' => 'string',
'created_time' => 'datetime',
'modified_time' => 'datetime',
'deleted_time' => 'datetime',
// Carnet de conducir
'carnet_conducir' => 'string',
'vehiculo_propio' => 'boolean',
// Observaciones
'observaciones' => 'text',
// Rango de salarios
'salario_minimo' => 'integer',
'salario_maximo' => 'integer',
// Procedencia del candidato
'procedencia' => 'string',
// Disponibilidades
'disponibilidad_incorporacion' => 'string',
'disponibilidad_entrevistas' => 'string',
'disponibilidad_guardias' => 'string',
'disponibilidad_viajar' => 'string',
'disponibilidad_proyectos_internacionales' => 'string',
));
}
public function safeDown() {
$this->dropTable('tbl_candidatos');
}
}

View File

@ -0,0 +1,24 @@
<?php
class m121014_171456_tbl_candidatos_idiomas extends CDbMigration {
public function safeUp() {
$this->createTable('tbl_candidatos_idiomas', array(
'id' => 'pk',
'candidato_id' => 'integer NOT NULL',
'idioma' => 'string NOT NULL',
'conversacion' => 'string',
'lectura_traduccion' => 'string',
));
$this->addForeignKey('fk_candidatos_idiomas_1', 'tbl_candidatos_idiomas', 'candidato_id', 'tbl_candidatos', 'id', 'CASCADE', 'CASCADE');
}
public function safeDown() {
$this->dropForeignKey('fk_candidatos_idiomas_1', 'tbl_candidatos_idiomas');
$this->dropTable('tbl_candidatos_idiomas');
}
}
?>

View File

@ -0,0 +1,22 @@
<?php
class m121014_171501_tbl_candidatos_titulaciones extends CDbMigration {
public function safeUp() {
$this->createTable('tbl_candidatos_titulaciones', array(
'id' => 'pk',
'candidato_id' => 'integer NOT NULL',
'titulacion' => 'string NOT NULL',
));
$this->addForeignKey('fk_candidatos_titulaciones_1', 'tbl_candidatos_titulaciones', 'candidato_id', 'tbl_candidatos', 'id', 'CASCADE', 'CASCADE');
}
public function safeDown() {
$this->dropForeignKey('fk_candidatos_titulaciones_1', 'tbl_candidatos_titulaciones');
$this->dropTable('tbl_candidatos_titulaciones');
}
}
?>

View File

@ -0,0 +1,437 @@
<?php
/**
* @class Candidato
* @brief Modelo de la tabla "tbl_candidatos".
*
* @property integer $id
* @property integer $id_estado
* @property string $n_identificacion
* @property string $nombre
* @property string $apellidos
* @property string $email
* @property string $telefono_fijo
* @property string $telefono_movil
* @property string $sexo
* @property date $fecha_nacimiento
* @property string $lugar_nacimiento
* @property string $carnet_conducir
* @property string $vehiculo_propio
* @property text $observaciones
* @property integer $salario_minimo
* @property integer $salario_maximo
* @property string $procedencia
* @property string $disponibilidad_incorporacion
* @property string $disponibilidad_entrevistas
* @property string $disponibilidad_guardias
* @property string $disponibilidad_viajar
* @property string $disponibilidad_proyectos_internacionales
* @property datetime $created_time
* @property datetime $modified_time
* @property datetime $deleted_time
*
* @property string $ficheroFotografia
* @property FotografiaPerfil $fotografia
*
* @property CandidatoCapacidad[] $capacidades
* @property CandidatoIdioma[] $idiomas
* @property CandidatoTitulacion[] $titulaciones
* @property CandidatoDocumento[] $documentos
*
* @package application.models
*
*/
class Candidato extends CActiveRecord {
const GENERO_HOMBRE = 'Hombre';
const GENERO_MUJER = 'Mujer';
public $ficheroFotografia;
public $fotografia;
public $capacidad_tecnica_search;
public $idiomas_search;
public $tecnologias_search;
public $funciones_search;
public $salario_ini_search;
public $salario_fin_search;
public $nombre_estado_search;
public $nombreCompleto_search;
/**
* @brief Devuelve el nombre completo de un candidato.
* @return string $nombreCompleto
*/
public function getNombreCompleto() {
if (isset($this->nombreCompleto_search)) {
return $this->nombreCompleto_search;
}
$this->nombreCompleto_search = $this->nombre . ' ' . $this->apellidos;
return $this->nombreCompleto_search;
}
public function getRangoSalarial() {
return Yii::app()->numberFormatter->formatCurrency($this->salario_minimo, 'EUR') . ' - ' .
Yii::app()->numberFormatter->formatCurrency($this->salario_maximo, 'EUR');
}
public function getTieneVehiculoPropio() {
return Yii::app()->format->boolean($this->vehiculo_propio);
}
public function getNombreLocalidad() {
return Poblacion::model()->findByPk($this->localidad)->poblacion;
}
public function getNombreCompletoLocalidad() {
$nombre = '';
$poblacion = Poblacion::model()->with('provincia')->findByPk($this->localidad);
if (isset($poblacion)) {
$nombre = $poblacion->poblacion;
if (isset($poblacion->provincia)) {
$nombre .= ' (' . $poblacion->provincia->provincia . ')';
}
}
return $nombre;
}
/**
* Devuelve la lista de géneros de un candidato.
* @return array lista de géneros permitidos
*/
public function getOpcionesGenero() {
return array(
self::GENERO_HOMBRE => 'Hombre',
self::GENERO_MUJER => 'Mujer'
);
}
public function getCssClassEstado() {
return "estado" . array_search($this->id_estado, $this->opcionesEstado);
}
/**
* Devuelve la lista de estados permitidos para un candidato.
* @return array lista de estados permitidos
*/
public function getOpcionesEstado() {
return array(
0 => '510',
1 => '511',
2 => '520',
3 => '530',
4 => '540',
5 => '560',
6 => '600',
);
}
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return Candidato 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';
}
/**
* @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('nombre, email', 'required'),
array('email', 'unique'),
array('email', 'email'),
array('ficheroFotografia', 'file',
'types' => 'jpg',
'maxSize' => 1024 * 1024 * 1, // 1MB como máximo
'tooLarge' => Yii::t('profind', 'La imagen es demasiado pesada. Elija otra fotografía más pequeña.'),
'wrongType' => Yii::t('profind', 'Sólo se permiten imágenes en formato JPG.'),
'allowEmpty' => 'true',
),
array('salario_minimo, salario_maximo', 'numerical','allowEmpty' => 'true'),
array('salario_minimo', 'default', 'value' => Yii::app()->params['salarios_candidatos']['salario_minimo']),
array('salario_maximo', 'default', 'value' => Yii::app()->params['salarios_candidatos']['salario_maximo']),
array('n_identificacion, nombre, apellidos, email, telefono_fijo,
telefono_movil, sexo, lugar_nacimiento, localidad,
carnet_conducir, procedencia, disponibilidad_incorporacion,
disponibilidad_entrevistas, disponibilidad_guardias,
disponibilidad_viajar,
disponibilidad_proyectos_internacionales',
'length', 'max' => 255),
array('id_estado', 'numerical', 'integerOnly' => true),
array('fecha_nacimiento, observaciones', 'safe'),
array('fecha_nacimiento', 'date', 'format' => 'dd/MM/yyyy'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, id_estado,
nombre_estado_search, nombreCompleto_search, capacidad_tecnica_search,
idiomas_search, salario_ini_search, salario_fin_search,
tecnologias_search, funciones_search,
n_identificacion, email, telefono_fijo,
telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento,
localidad, fecha_alta, usuario_alta,
usuario_modificacion, carnet_conducir, vehiculo_propio,
observaciones, salario_minimo, salario_maximo, procedencia,
disponibilidad_incorporacion, disponibilidad_entrevistas,
disponibilidad_guardias, disponibilidad_viajar,
disponibilidad_proyectos_internacionales',
'safe', 'on' => 'search')
);
}
/**
* @return array relational rules.
*/
public function relations() {
return array(
//'capacidades' => array(self::HAS_MANY, 'CandidatoCapacidad', 'candidato_id'),
//'capacidadesCount' => array(self::STAT, 'CandidatoCapacidad', 'candidato_id'),
'idiomas' => array(self::HAS_MANY, 'CandidatoIdioma', 'candidato_id'),
'idiomasCount' => array(self::STAT, 'CandidatoIdioma', 'candidato_id'),
'titulaciones' => array(self::HAS_MANY, 'CandidatoTitulacion', 'candidato_id'),
'titulacionesCount' => array(self::STAT, 'CandidatoTitulacion', 'candidato_id'),
//'documentos' => array(self::HAS_MANY, 'CandidatoDocumento', 'candidato_id'),
//'documentosCount' => array(self::STAT, 'CandidatoDocumento', 'candidato_id'),
'estados' => array(self::BELONGS_TO, 'EstadoCandidato', 'id_estado'),
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels() {
return array(
'id' => 'ID',
'id_estado' => 'ID estado',
'nombre_estado_search' => 'Estado',
'idiomas_search' => 'Idioma',
'nombreApellidos' => 'Candidato',
'foto' => 'Foto',
'n_identificacion' => 'DNI/Pasaporte',
'nombre' => 'Nombre',
'apellidos' => 'Apellidos',
'email' => 'Email',
'telefono_fijo' => 'Teléfono fijo',
'telefono_movil' => 'Teléfono móvil',
'sexo' => 'Sexo',
'fecha_nacimiento' => 'Fecha de nacimiento',
'lugar_nacimiento' => 'Lugar de nacimiento',
'localidad' => 'Localidad',
'carnet_conducir' => 'Carnet de conducir',
'vehiculo_propio' => 'Vehículo propio',
'observaciones' => 'Observaciones',
'salario_minimo' => 'Salario mínimo',
'salario_maximo' => 'Salario máximo',
'procedencia' => 'Procedencia',
'disponibilidad_incorporacion' => 'Disponibilidad de incorportación',
'disponibilidad_entrevistas' => 'Disponibilidad para entrevistas',
'disponibilidad_guardias' => 'Disponibilidad para guardias',
'disponibilidad_viajar' => 'Disponibilidad para viajar',
'disponibilidad_proyectos_internacionales' => 'Disponibilidad para proyectos internacionales',
'nombreCompleto_search' => 'Candidato',
'observaciones' => 'Observaciones',
'tecnologias_search' => 'Tecnologías',
'funciones_search' => 'Perfiles funcionales',
);
}
/**
* 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('id_estado', $this->id_estado);
$criteria->compare('n_identificacion', $this->n_identificacion, true);
$criteria->compare('nombre', $this->nombre, true);
$criteria->compare('apellidos', $this->apellidos, true);
$criteria->compare('email', $this->email, true);
$criteria->compare('telefono_fijo', $this->telefono_fijo, true);
$criteria->compare('telefono_movil', $this->telefono_movil, true);
$criteria->compare('sexo', $this->sexo, true);
$criteria->compare('localidad', $this->localidad, true);
$criteria->compare('fecha_nacimiento', $this->fecha_nacimiento, true);
$criteria->compare('lugar_nacimiento', $this->lugar_nacimiento, true);
$criteria->compare('created_time', $this->created_time, true);
$criteria->compare('modified_time', $this->modified_time, true);
$criteria->compare('deleted_time', $this->deleted_time, true);
$criteria->compare('carnet_conducir', $this->carnet_conducir, true);
$criteria->compare('vehiculo_propio', $this->vehiculo_propio);
$criteria->compare('observaciones', $this->observaciones, true);
$criteria->compare('salario_minimo', $this->salario_minimo);
$criteria->compare('salario_maximo', $this->salario_maximo);
$criteria->compare('procedencia', $this->procedencia, true);
$criteria->compare('disponibilidad_incorporacion', $this->disponibilidad_incorporacion, true);
$criteria->compare('disponibilidad_entrevistas', $this->disponibilidad_entrevistas, true);
$criteria->compare('disponibilidad_guardias', $this->disponibilidad_guardias, true);
$criteria->compare('disponibilidad_viajar', $this->disponibilidad_viajar, true);
$criteria->compare('disponibilidad_proyectos_internacionales', $this->disponibilidad_proyectos_internacionales, true);
$sort = new CSort();
$sort->attributes = array(
'defaultOrder' => 'id',
'nombreCompleto' => array(
'asc' => 'concat(t.nombre, " ", t.apellidos)',
'desc' => 'concat(t.nombre, " ", t.apellidos) desc',
),
);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
//'sort' => $sort,
));
// $sort = new CSort();
// $sort->attributes = array(
// 'defaultOrder' => '',
// 'nombre_estado_search' => array(
// 'asc' => 'estados.descripcion',
// 'desc' => 'estados.descripcion DESC',
// ),
// 'fecha_modificacion' => array(
// 'asc' => 't.fecha_modificacion',
// 'desc' => 't.fecha_modificacion desc',
// ),
// 'nombreCompleto_search' => array(
// 'asc' => 'concat(t.nombre, " ", t.apellidos)',
// 'desc' => 'concat(t.nombre, " ", t.apellidos) desc',
// ),
// 'capacidad_tecnica_search' => array(
// 'asc' => 'capacidades.perfil_tecnico_id',
// 'desc' => 'capacidades.perfil_tecnico_id desc',
// ),
// );
// echo $criteria->condition;
// return new CActiveDataProvider($this, array(
// 'criteria' => $criteria,
// 'sort' => $sort,
// ));
}
protected function beforeValidate() {
if ($this->isNewRecord) {
$this->id_estado = 510;
$this->created_time = date('Y-m-d H:i:s', time());
} else {
$this->modified_time = date('Y-m-d H:i:s', time());
}
return parent::beforeValidate();
}
protected function beforeSave() {
if ($this->isNewRecord)
$this->created_time = date("Y-m-d H:i:s");
/*if (($this->estado === self::ESTADO_BORRADO) && ($this->deleted_time === NULL))
$this->deleted_time = date("Y-m-d H:i:s");*/
//PHP dates are displayed as dd/mm/yyyy
//MYSQL dates are stored as yyyy-mm-dd
if ($this->fecha_nacimiento != '') {
$dateToMySQL = date('Y-m-d', CDateTimeParser::parse($this->fecha_nacimiento, Yii::app()->locale->dateFormat));
$this->fecha_nacimiento = $dateToMySQL;
}
return parent::beforeSave();
}
protected function afterFind() {
$this->fotografia = new FotografiaPerfil();
$this->fotografia->modelo = $this;
//PHP dates are displayed as dd/mm/yyyy
//MYSQL dates are stored as yyyy-mm-dd
$dateToLocale = Yii::app()->dateFormatter->formatDateTime(CDateTimeParser::parse($this->fecha_nacimiento, 'yyyy-MM-dd'), 'medium', null);
$this->fecha_nacimiento = $dateToLocale;
parent::afterFind();
}
protected function afterSave() {
parent::afterSave();
if ($this->isNewRecord)
$this->createUploadDir();
}
protected function afterDelete() {
parent::afterDelete();
$this->deleteUploadDir();
}
protected function afterConstruct() {
parent::afterConstruct();
$this->fotografia = new FotografiaPerfil();
$this->fotografia->modelo = $this;
}
/**
* @brief Devuelve el nombre del fichero por defecto cuando no se tiene imagen
* @return string ruta
*/
public function getImagenDefault() {
return 'user_photo.jpg';
}
/**
* @brief Devuelve la ruta con los ficheros del usuario.
* Incluye el separador de directorios al final de la ruta.
* @return string ruta
*/
public function getUploadPath() {
return Yii::getPathOfAlias('application.uploads.candidatos') . DIRECTORY_SEPARATOR . $this->id . DIRECTORY_SEPARATOR;
}
/**
* @brief Crea un directorio para almacenar ficheros del usuario
* @return boolean
*/
private function createUploadDir() {
$upload = $this->getUploadPath();
if(!is_dir($upload)) {
return mkdir($upload);
}
else return false;
}
/**
* @brief Elimina el directorio del usuario y todos sus ficheros
* @return boolean
*/
private function deleteUploadDir() {
$upload = $this->getUploadPath();
if(is_dir($upload))
return GHelper::recursiveRemoveDirectory($upload);
else return false;
}
}
?>

View File

@ -0,0 +1,70 @@
<?php
/**
* @class Idioma
* @brief Modelo de la tabla "tbl_idiomas".
*
* @property integer $id
* @property string descripcion
*
* @package application.models
*
*/
class Idioma extends CActiveRecord {
public static function model($className = __CLASS__) {
return parent::model($className);
}
/**
* @return string nombre de la tabla en la base de datos
*/
public function tableName() {
return 'tbl_idiomas';
}
/**
* @return array reglas de validación
*/
public function rules() {
return array(
array('descripcion', 'required'),
array('descripcion', 'length', 'max' => 255),
array('id, descripcion', 'safe', 'on' => 'search'),
);
}
/**
* @return array etiquetas para los campos (campo=>etiqueta)
*/
public function attributeLabels() {
return array(
'id' => 'ID',
'descripcion' => 'Descripció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('descripcion', $this->descripcion, true);
$sort = new CSort;
$sort->defaultOrder = 'descripcion ASC';
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => $sort,
));
}
}
?>

View File

@ -0,0 +1,71 @@
<?php
/**
* @class Tecnologia
* @brief Modelo de la tabla "tbl_tecnologias".
*
* @property integer $id
* @property string $descripcion
*
* @package application.models
*
*/
class Tecnologia extends CActiveRecord {
public static function model($className = __CLASS__) {
return parent::model($className);
}
/**
* @return string nombre de la tabla en la base de datos
*/
public function tableName() {
return 'tbl_tecnologias';
}
/**
* @return array reglas de validación
*/
public function rules() {
return array(
array('descripcion', 'required'),
array('descripcion', 'length', 'max' => 255),
array('id, descripcion', 'safe', 'on' => 'search'),
);
}
/**
* @return array etiquetas para los campos (campo=>etiqueta)
*/
public function attributeLabels() {
return array(
'id' => 'ID',
'descripcion' => 'Descripció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('descripcion', $this->descripcion, true);
$sort = new CSort;
$sort->defaultOrder = 'descripcion ASC';
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => $sort,
));
}
}
?>

View File

@ -0,0 +1,71 @@
<?php
/**
* @class Titulacion
* @brief Modelo de la tabla "tbl_titulaciones".
*
* @property integer $id
* @property string descripcion
*
* @package application.models
*
*/
class Titulacion extends CActiveRecord {
public static function model($className = __CLASS__) {
return parent::model($className);
}
/**
* @return string nombre de la tabla en la base de datos
*/
public function tableName() {
return 'tbl_titulaciones';
}
/**
* @return array reglas de validación
*/
public function rules() {
return array(
array('descripcion', 'required'),
array('descripcion', 'length', 'max' => 255),
array('id, descripcion', 'safe', 'on' => 'search'),
);
}
/**
* @return array etiquetas para los campos (campo=>etiqueta)
*/
public function attributeLabels() {
return array(
'id' => 'ID',
'descripcion' => 'Descripció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('descripcion', $this->descripcion, true);
$sort = new CSort;
$sort->defaultOrder = 'descripcion ASC';
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => $sort,
));
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,738 @@
/*
* jQuery UI CSS Framework 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
.ui-widget-content a { color: #4F4F4F; }
.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
.ui-widget-header {
background: #ededed url(images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
}
.ui-widget-header a { color: #4F4F4F; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
background: #ededed url(images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
outline: none;
color: #1c4257; border: 1px solid #7096ab;
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(images/icon_sprite.png) -16px 0 no-repeat !important; }
.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background: url(images/icon_sprite.png) 0 0 no-repeat !important; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
/* Overlays */
.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
* jQuery UI Resizable 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute; font-size: 0.1px; z-index: 999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Accordion 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 12px; font-weight: bold; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }/*
* jQuery UI Autocomplete 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete {
position: absolute; cursor: default; z-index: 3;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
}
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
background: #5f83b9;
color: #FFFFFF;
text-shadow: 0px 1px 1px #234386;
border-color: #466086;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
/*
* jQuery UI Button 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; -webkit-user-select: none; -moz-user-select: none; user-select: none; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/* button animation properties */
.ui-button {
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
/*states*/
.ui-button.ui-state-hover {
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
}
.ui-button.ui-state-focus {
outline: none;
color: #1c4257;
border-color: #7096ab;
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
}
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button, .ui-widget-content input.ui-button { font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); padding: 0 1em !important; height: 33px; }
/*remove submit button internal padding in Firefox*/
input.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
/* fix webkits handling of the box model */
@media screen and (-webkit-min-device-pixel-ratio:0) {
input.ui-button {
height: 31px !important;
}
}
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
.ui-buttonset .ui-button.ui-state-active { color: #1c4257; border-color: #7096ab; }
.ui-buttonset .ui-button.ui-state-active {
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
.ui-dialog {
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
-moz-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.ui-dialog .ui-dialog-titlebar { padding: 0.7em 1em 0.6em 1em; position: relative; border: none; border-bottom: 1px solid #979797; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; font-size: 14px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .8em; top: 55%; width: 16px; margin: -10px 0 0 0; padding: 0; height: 16px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; background: url(images/icon_sprite.png) 0 -16px no-repeat; }
.ui-dialog .ui-dialog-titlebar-close:hover span { background-position: -16px -16px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; border: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Slider 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; background: #d7d7d7; z-index: 1; }
.ui-slider { -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; }
.ui-slider .ui-slider-handle { background: url(images/slider_handles.png) 0px -23px no-repeat; position: absolute; z-index: 2; width: 23px; height: 23px; cursor: default; border: none; outline: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
.ui-slider .ui-state-hover, .ui-slider .ui-state-active { background-position: 0 0; }
.ui-slider .ui-slider-range { background: #a3cae0; position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider .ui-slider-range { -moz-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; -webkit-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; }
.ui-slider-horizontal { height: 5px; }
.ui-slider-horizontal .ui-slider-handle { top: -8px; margin-left: -13px; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: 5px; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -8px; margin-left: 0; margin-bottom: -13px; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; zoom: 1; border: 0; background: transparent; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: 0; background: transparent; border-width: 0 0 1px 0; }
.ui-tabs .ui-tabs-nav {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; font-size: 12px; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; background: #fff; border-color: #B6B6B6; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; outline: none; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0 1px 1px 1px; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-panel { background: #FFF;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI Datepicker 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
.ui-datepicker {
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(images/icon_sprite.png) no-repeat; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Progressbar 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height: 12px; text-align: left; background: #FFF url(images/progress_bar.gif) 0 -14px repeat-x; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: url(images/progress_bar.gif) 0 0 repeat-x; }
/* Extra Input Field Styling */
.ui-form textarea, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) {
padding: 3px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #cecece;
outline: none;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
.ui-form textarea:hover, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):hover {
border: 1px solid #bdbdbd;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
}
.ui-form textarea:focus, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus {
border: 1px solid #95bdd4;
-webkit-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
}

View File

@ -0,0 +1,34 @@
/* datatables */
div.dataTables_length label{float:left;text-align:left}
div.dataTables_length select{width:75px}
div.dataTables_filter label{float:right}
div.dataTables_info{padding-top:8px}
div.dataTables_paginate{float:right;margin:0}
.dataTables_wrapper{position:relative;overflow:hidden}
.dataTables_wrapper table.table {clear:both;margin-bottom:6px!important;max-width:inherit}
.dataTables_wrapper table.table thead .sorting,table.table thead .sorting_asc,table.table thead .sorting_desc,table.table thead .sorting_asc_disabled,table.table thead .sorting_desc_disabled{cursor:hand;cursor:pointer}
.dataTables_wrapper table.table thead .sorting{background: #e9f3f8 url(../lib/datatables/images/sort_both.png) no-repeat center right}
.dataTables_wrapper table.table thead .sorting_asc{background: #e9f3f8 url(../lib/datatables/images/sort_asc.png) no-repeat center right}
.dataTables_wrapper table.table thead .sorting_desc{background: #e9f3f8 url(../lib/datatables/images/sort_desc.png) no-repeat center right}
.dataTables_wrapper table.table thead .sorting_asc_disabled{background: #e9f3f8 url(../lib/datatables/images/sort_asc_disabled.png) no-repeat center right}
.dataTables_wrapper table.table thead .sorting_desc_disabled{background: #e9f3f8 url(../lib/datatables/images/sort_desc_disabled.png) no-repeat center right}
.dataTables_wrapper table.dataTable th:active{outline:none}
.dataTables_wrapper .row{margin:0 0 5px}
.dataTables_wrapper select{min-height:inherit}
.dataTables_wrapper table + .row{margin-bottom:0;margin-top:10px}
.dataTables_scrollBody{-webkit-overflow-scrolling:touch}
.dataTables_wrapper .top,.dataTables_wrapper .bottom{background-color:#f5f5f5;border:1px solid #CCC;padding:15px}
.top .dataTables_info{float:none}
.dataTables_empty{text-align:center!important;font-size:15px;background:#fff!important;padding:20px 0!important}
.dataTables_scroll{clear:both;margin-bottom:10px}
.dataTables_scrollHeadInner table.table-bordered{-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;border-bottom:none}
.dataTables_scrollHeadInner table.table-bordered,.dataTables_scrollHeadInner table.table-bordered thead{border-bottom:none}
.dataTables_scrollBody table{border-top:none}
.dataTables_processing{position:absolute;top:50%;margin-top:-24px;z-index:100;left:50%;width:250px;margin-left:-125px;border:1px solid #ddd;text-align:center;color:#000;background:#fff;font-size:15px!important;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2);-moz-box-shadow:0 0 4px rgba(0,0,0,0.2);-ms-box-shadow:0 0 4px rgba(0,0,0,0.2);box-shadow:0 0 4px rgba(0,0,0,0.2);padding:10px 0}
.dataTables_wrapper .center{text-align:center}
.dataTables_wrapper .details,.dataTables_wrapper .details:hover{background:#ddd!important}
.dataTables_wrapper .details table td{background:#fff!important}
.dataTables_scrollHeadInner table.table,.dataTables_wrapper .details table.table{margin:0!important}
.dataTables_wrapper .dt_actions {float:left;margin-right:20px}
.dataTables_empty {cursor:default}
.dTableR {width:100% !important}

View File

@ -1,47 +1,55 @@
/* media queries */
/* webkit extra margin fix */
@media screen and (-webkit-min-device-pixel-ratio:0) {
button {
margin: 0px
}
}
@media (min-width: 980px) {
@media (min-width: 980px) {
.sidebar {
position: fixed;
top: 40px;
left: 0;
margin-left: 0;
position: fixed;
top: 40px;
}
.navbar-fixed-top .nav-collapse {
height: 40px !important
height: 40px !important;
}
.navbar .nav > li > a {
padding-top: 10px
padding-top: 10px;
}
/* fixed layout */
.profind-fixed {
max-width: 940px;
.gebo-fixed {
margin: 0 auto;
}
.profind-fixed header .container-fluid {
max-width: 940px;
margin: 0 auto;
}
.profind-fixed #maincontainer {
border-right: 1px solid #ccc;
.gebo-fixed header .container-fluid {
margin: 0 auto;
max-width: 940px;
}
.gebo-fixed #maincontainer {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
.profind-fixed .sidebar {
.gebo-fixed .sidebar {
left: 50%;
margin-left: -469px;
}
.profind-fixed .brand {
width: 120px
.gebo-fixed .sidebar_switch {
left: 50%;
margin-left: -250px;
}
.gebo-fixed.sidebar_hidden .sidebar_switch {
left: 50%;
margin-left: -465px;
}
.gebo-fixed .search_page .box_view .search_item {
height: 210px;
margin: 0 0 2% 2%;
width: 48%;
}
.gebo-fixed .activeMediaTable th.optional,.gebo-fixed .activeMediaTable td.optional {
display: none;
}
.gebo-fixed .brand {
width: 120px;
}
.sidebar_right #maincontainer {
background-image: url(../images/main_bg_right.gif);
background-image: url(../img/main_bg_right.gif);
background-position: right 0;
}
.sidebar_right .sidebar {
@ -53,120 +61,121 @@
right: 6px;
}
.sidebar_right .main_content {
margin-right: 240px;
margin-left: 0;
border-left: none;
margin-left: 0;
margin-right: 240px;
}
.sidebar_right.sidebar_hidden #maincontainer {
background: #fff
background: #fff;
}
.sidebar_right.sidebar_hidden .main_content {
margin: 0
margin: 0;
}
.profind-fixed.sidebar_right .sidebar {
.gebo-fixed.sidebar_right .sidebar {
left: auto;
right: 50%;
margin-left: 0;
margin-right: -470px;
right: 50%;
}
.profind-fixed.sidebar_right .sidebar_switch {
.gebo-fixed.sidebar_right .sidebar_switch {
left: auto;
right: 50%;
margin-left: 0;
margin-right: -465px;
right: 50%;
}
.profind-fixed.sidebar_hidden.sidebar_right .sidebar_switch {
laeft: auto;
.gebo-fixed.sidebar_hidden.sidebar_right .sidebar_switch {
left: auto;
margin-left: 0;
margin-right: -465px;
right: 50%;
}
}
@media (max-width: 1279px) {
@media (max-width: 1279px) {
.search_page .box_view .search_item {
width: 49%
width: 49%;
}
}
@media (max-width: 979px) {
@media (max-width: 979px) {
#maincontainer {
background: #fff
background: #fff;
}
.row > [class*="span"],
.navbar-fixed-top {
margin: 0 !important
.row > [class*="span"],.navbar-fixed-top {
margin: 0 !important;
}
.navbar-fixed-top .container-fluid {
padding: 0 !important
padding: 0 !important;
}
.navbar .brand {
width: auto;
line-height: 18px;
margin: 3px 0 6px 34px;
width: auto;
}
.navbar .user_menu {
padding-top: 5px
padding-top: 5px;
}
.navbar .user_menu .dropdown-menu {
margin: 8px 10px 0 0
margin: 8px 10px 0 0;
}
.navbar .user_menu > li > a {
padding: 0 10px 0 0
padding: 0 10px 0 0;
}
.navbar-inner {
min-height: 28px;
position: relative;
z-index: 990;
min-height: 28px;
}
.nav-collapse a {
color: #fff !important
color: #fff !important;
}
.nav-collapse .dropdown-menu li {
padding: 0
padding: 0;
}
.nav-collapse .dropdown-menu li a {
font-weight: 400
font-weight: 400;
}
.nav-collapse .sub-menu {
display: block;
left: 0;
right: auto;
position: relative;
right: auto;
visibility: visible;
}
.nav-collapse .caret-right {
display: none
display: none;
}
.btn-navbar {
margin-top: 2px !important;
padding: 2px 8px !important;
}
.user_menu .dropdown {
margin-left: 10px
margin-left: 10px;
}
.main_content {
margin: 0 !important;
border: none !important;
margin: 0 !important;
padding: 28px 14px 20px;
}
.main_content .row-fluid + .row-fluid {
margin-top: 20px
margin-top: 20px;
}
.sidebar {
background: #f1f1f1;
border-color: #ccc;
border-radius: 0px 5px 5px 0px;
border-style: solid;
border-width: 0 1px;
box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
height: 400px;
left: 0;
margin: 0;
moz-box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
position: absolute;
top: 39px;
left: 0;
background: #f1f1f1;
border-width: 0 1px;
border-style: solid;
border-color: #ccc;
margin: 0;
-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
webkit-border-radius: 0px 5px 5px 0px;
webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
z-index: 1000;
-webkit-border-radius: 0px 5px 5px 0px;
border-radius: 0px 5px 5px 0px;
}
.sidebar:after {
border-bottom: 6px solid #fff;
@ -179,154 +188,167 @@
top: -6px;
}
.sidebar_hidden .sidebar {
border: none
border: none;
}
.sidebar_switch {
position: absolute;
z-index: 1000;
left: 5px !important;
top: 14px;
padding: 0 10px;
position: absolute;
top: 14px;
z-index: 1000;
}
.off_switch {
background-position: center 1px
background-position: center 1px;
}
.on_switch {
background-position: center -17px
background-position: center -17px;
}
.sidebar_inner {
padding-bottom: 0 !important
padding-bottom: 0 !important;
}
div.sticky-queue {
z-index: 10000;
top: 0;
z-index: 10000;
}
.ms-container {
background-position: 160px 83px
background-position: 160px 83px;
}
.ms-container ul.ms-list {
width: 152px
width: 152px;
}
#multi_search {
width: 136px
width: 136px;
}
.btn_menu {
display: block;
clear: both;
padding: 8px 0 6px;
border-top: 1px solid rgba(255,255,255,.2);
box-shadow: 0 -1px 0 rgba(0,0,0,.2);
text-align: center;
position: relative;
top: 4px;
clear: both;
cursor: pointer;
display: block;
padding: 8px 0 6px;
position: relative;
text-align: center;
top: 4px;
}
.btn_menu span {
opacity: .8
opacity: .8;
}
.ssw_trigger {
display: none
display: none;
}
}
@media (max-width: 767px) {
@media (max-width: 767px) {
.row-fluid > [class*="span"] + [class*="span"] {
margin-top: 20px
margin-top: 20px;
}
.row-fluid input[class*="span"],
.row-fluid textarea[class*="span"],
.row-fluid select[class*="span"] {
width: 80%
.row-fluid input[class*="span"],.row-fluid textarea[class*="span"],.row-fluid select[class*="span"] {
width: 80%;
}
.input-prepend,
.input-append {
margin-bottom: 10px
.input-prepend, .input-append {
margin-bottom: 10px;
}
form .row-fluid > [class*="span"] + [class*="span"] {
margin-top: 0
margin-top: 0;
}
.login_page .content_b {
margin: 0 20px
margin: 0 20px;
}
.search_page .box_view .search_item {
width: 99%;
margin-bottom: 3%;
width: 99%;
}
.error_page .error_box {
background: none;
width: 100%;
}
.error_page .error_box h1 {
padding: 40px 20px 0
padding: 40px 20px 0;
}
.error_page .error_box p {
margin: 0 20px 10px
margin: 0 20px 10px;
}
.error_page .error_box .back_link {
margin: 0 20px
margin: 0 20px;
}
.style_switcher {
display: none
display: none;
}
.dshb_icoNav {
text-align: center
text-align: center;
}
.dshb_icoNav li {
float: none;
display: inline-block;
float: none;
}
#cboxContent .video-js {
width: 100% !important;
height: 100% !important;
width: 100% !important;
}
.vcard > .thumbnail {
display: none
display: none;
}
.vcard > ul {
margin: 0
margin: 0;
}
.item-list .thumbnail {
float: none;
display: inline-block;
float: none;
margin: 0 10px 10px 0;
}
}
@media (max-width: 479px) {
@media (max-width: 479px) {
.login_page .login_box {
width: 100%
width: 100%;
}
.login_page .cnt_b {
margin: 0 auto;
padding: 20px 0;
width: 68%;
margin: 0 auto;
}
.-list-container {
height: 300px
height: 300px;
}
}
@media (min-width: 1681px) {
@media (min-width: 1681px) {
body {
max-width: 1680px;
margin: 0 auto;
max-width: 1680px;
}
header .container-fluid {
max-width: 1640px;
margin: 0 auto;
max-width: 1640px;
}
#maincontainer {
border-right: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
.main_content {
border-left: none
border-left: none;
}
.sidebar {
left: 50%;
margin-left: -839px;
}
.sidebar_switch {
left: 50%;
margin-left: -620px;
}
.sidebar_hidden .sidebar_switch {
left: 50%;
margin-left: -832px;
}
.sidebar_right .sidebar {
right: 50%;
margin-left: 0;
margin-right: -840px;
right: 50%;
}
}
.sidebar_right .sidebar_switch {
left: auto;
margin-left: 0;
margin-right: -836px;
right: 50%;
}
}

View File

@ -354,6 +354,63 @@ a.rowlink {
.btn_menu {
display: none
}
/* sidebar scroll */
.antiScroll {
display:inline-block;
position:relative;
overflow:hidden;
}
.antiscroll-scrollbar {
background:rgba(0,0,0,0.5);
-webkit-border-radius:7px;
-moz-border-radius:7px;
border-radius:7px;
-webkit-box-shadow:0 0 1px #fff;
-moz-box-shadow:0 0 1px #fff;
box-shadow:0 0 1px #fff;
position:absolute;
opacity:0;
filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
-webkit-transition:linear 300ms opacity;
-moz-transition:linear 300ms opacity;
-o-transition:linear 300ms opacity;
}
.antiscroll-scrollbar-shown {
opacity:1;
filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
}
.antiscroll-scrollbar-horizontal {
height:7px;
margin-left:2px;
bottom:2px;
left:0;
}
.antiscroll-scrollbar-vertical {
width:7px;
left:2px;
top:0;
margin:2px 0;
}
.antiscroll-inner {
overflow-y:scroll;
}
.antiScroll,.antiscroll-content,.antiscroll-inner {
width:240px;
}
.antiscroll-inner::-webkit-scrollbar,.antiscroll-inner::scrollbar {
width:0;
height:0;
}
/* main content */
#maincontainer {
background-image: url(../images/main_bg.gif);
@ -575,6 +632,11 @@ a.rowlink {
.form-horizontal .control-group {
margin-bottom: 14px
}
.form-horizontal .control-label.error {
color: #B94A48;
font-weight: bold;
}
input.focused {
border-color: rgba(82,168,236,.8);
-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
@ -665,12 +727,17 @@ input[type="text"] + label.error, input[type="password"] + label.error, select +
.ui-tooltip label {
margin-bottom: 0
}
.f_legend {
font-size: 16px;
line-height: 16px;
legend {
font-size: 15px;
line-height: 15px;
padding-bottom: 10px;
margin-bottom: 22px;
border-bottom: 1px solid #dcdcdc;
margin-bottom: 10px;
border-bottom: 0px;
font-weight: bold;
color: #0088CC;
width: auto;
display: inline;
}
.radio.inline, .checkbox.inline {
margin-left: 0 !important;

View File

@ -0,0 +1,257 @@
//* detect touch devices
function is_touch_device() {
return !!('ontouchstart' in window);
}
$(document).ready(function() {
//* accordion change actions
$('#side_accordion').on('hidden shown', function () {
profind_sidebar.make_active();
profind_sidebar.update_scroll();
});
//* resize elements on window resize
var lastWindowHeight = $(window).height();
var lastWindowWidth = $(window).width();
$(window).on("debouncedresize", function() {
if($(window).height()!=lastWindowHeight || $(window).width()!=lastWindowWidth){
lastWindowHeight = $(window).height();
lastWindowWidth = $(window).width();
profind_sidebar.update_scroll();
if(!is_touch_device()){
$('.sidebar_switch').qtip('hide');
}
}
});
//* tooltips
profind_tips.init();
if(!is_touch_device()){
//* popovers
profind_popOver.init();
}
//* sidebar
profind_sidebar.init();
profind_sidebar.make_active();
//* pre block prettify
if(typeof prettyPrint == 'function') {
prettyPrint();
}
//* external links
profind_external_links.init();
//* accordion icons
profind_acc_icons.init();
//* main menu mouseover
profind_nav_mouseover.init();
//* top submenu
profind_submenu.init();
profind_sidebar.make_scroll();
profind_sidebar.update_scroll();
});
//* external links
profind_external_links = {
init: function() {
$("a[href^='http']").not('.thumbnail>a,.ext_disabled').each(function() {
$(this).attr('target','_blank').addClass('external_link');
})
}
};
profind_sidebar = {
init: function() {
// sidebar onload state
if($(window).width() > 979){
if(!$('body').hasClass('sidebar_hidden')) {
if( $.cookie('profind_sidebar') == "hidden") {
$('body').addClass('sidebar_hidden');
$('.sidebar_switch').toggleClass('on_switch off_switch').attr('title', 'Ver barra');
}
} else {
$('.sidebar_switch').toggleClass('on_switch off_switch').attr('title', 'Ver barra');
}
} else {
$('body').addClass('sidebar_hidden');
$('.sidebar_switch').removeClass('on_switch').addClass('off_switch');
}
profind_sidebar.info_box();
//* sidebar visibility switch
$('.sidebar_switch').click(function(){
$('.sidebar_switch').removeClass('on_switch off_switch');
if( $('body').hasClass('sidebar_hidden') ) {
$.cookie('profind_sidebar', null);
$('body').removeClass('sidebar_hidden');
$('.sidebar_switch').addClass('on_switch').show();
$('.sidebar_switch').attr( 'title', 'Ocultar barra');
} else {
$.cookie('profind_sidebar', 'hidden');
$('body').addClass('sidebar_hidden');
$('.sidebar_switch').addClass('off_switch');
$('.sidebar_switch').attr( 'title', 'Ver barra');
}
profind_sidebar.info_box();
profind_sidebar.update_scroll();
$(window).resize();
});
//* prevent accordion link click
$('.sidebar .accordion-toggle').click(function(e) {
e.preventDefault()
});
},
info_box: function(){
var s_box = $('.sidebar_info');
var s_box_height = s_box.actual('height');
s_box.css({
'height' : s_box_height
});
$('.push').height(s_box_height);
$('.sidebar_inner').css({
'margin-bottom' : '-'+s_box_height+'px',
'min-height' : '100%'
});
},
make_active: function() {
var thisAccordion = $('#side_accordion');
thisAccordion.find('.accordion-heading').removeClass('sdb_h_active');
var thisHeading = thisAccordion.find('.accordion-body.in').prev('.accordion-heading');
if(thisHeading.length) {
thisHeading.addClass('sdb_h_active');
}
},
make_scroll: function() {
antiScroll = $('.antiScroll').antiscroll().data('antiscroll');
},
update_scroll: function() {
if($('.antiScroll').length) {
if( $(window).width() > 979 ){
$('.antiscroll-inner,.antiscroll-content').height($(window).height() - 40);
} else {
$('.antiscroll-inner,.antiscroll-content').height('400px');
}
antiScroll.refresh();
}
}
};
//* tooltips
profind_tips = {
init: function() {
if(!is_touch_device()){
var shared = {
style : {
classes: 'ui-tooltip-shadow ui-tooltip-tipsy'
},
show : {
delay: 100,
event: 'mouseenter focus'
},
hide : {
delay: 0
}
};
if($('.ttip_b').length) {
$('.ttip_b').qtip( $.extend({}, shared, {
position : {
my : 'top center',
at : 'bottom center',
viewport: $(window)
}
}));
}
if($('.ttip_t').length) {
$('.ttip_t').qtip( $.extend({}, shared, {
position: {
my : 'bottom center',
at : 'top center',
viewport: $(window)
}
}));
}
if($('.ttip_l').length) {
$('.ttip_l').qtip( $.extend({}, shared, {
position: {
my : 'right center',
at : 'left center',
viewport: $(window)
}
}));
}
if($('.ttip_r').length) {
$('.ttip_r').qtip( $.extend({}, shared, {
position: {
my : 'left center',
at : 'right center',
viewport: $(window)
}
}));
};
}
}
};
//* popovers
profind_popOver = {
init: function() {
$(".pop_over").popover({
trigger: 'hover'
});
}
};
//* accordion icons
profind_acc_icons = {
init: function() {
var accordions = $('.main_content .accordion');
accordions.find('.accordion-group').each(function(){
var acc_active = $(this).find('.accordion-body').filter('.in');
acc_active.prev('.accordion-heading').find('.accordion-toggle').addClass('acc-in');
});
accordions.on('show', function(option) {
$(this).find('.accordion-toggle').removeClass('acc-in');
$(option.target).prev('.accordion-heading').find('.accordion-toggle').addClass('acc-in');
});
accordions.on('hide', function(option) {
$(option.target).prev('.accordion-heading').find('.accordion-toggle').removeClass('acc-in');
});
}
};
//* main menu mouseover
profind_nav_mouseover = {
init: function() {
$('header li.dropdown').mouseenter(function() {
if($('body').hasClass('menu_hover')) {
$(this).addClass('navHover')
}
}).mouseleave(function() {
if($('body').hasClass('menu_hover')) {
$(this).removeClass('navHover open')
}
});
}
};
//* submenu
profind_submenu = {
init: function() {
$('.dropdown-menu li').each(function(){
var $this = $(this);
if($this.children('ul').length) {
$this.addClass('sub-dropdown');
$this.children('ul').addClass('sub-menu');
}
});
$('.sub-dropdown').on('mouseenter',function(){
$(this).addClass('active').children('ul').addClass('sub-open');
}).on('mouseleave', function() {
$(this).removeClass('active').children('ul').removeClass('sub-open');
})
}
};

View File

@ -0,0 +1,2 @@
.DS_Store

View File

@ -0,0 +1,65 @@
# jQuery Actual Plugin CHANGELOG
## 1.0.10
- [bug fix] Override `!imporant` css declarations
## 1.0.9
- [bug fix] jQuery 1.8.0 compatibility
## 1.0.8
- [bug fix] Inverted code lines
## 1.0.7
- [refactoring] Save/restore element style rather than individual CSS attributes( thanks to Jon Tara )
## 1.0.6
- [bug fixed] Pass `configs.includeMargin` to only `outerWidth` and `outerHeight` so it does not break in $ 1.7.2
## 1.0.5
- Add package.json for new jquery plugin site
## 1.0.4
- Add `includeMargin` for `outerWidth`( thanks to Erwin Derksen )
## 1.0.3
- [bug fixed] `$` namespace conflict
## 1.0.2
- [bug fixed] Typo
## 1.0.1
- [bug fixed] Typo
## 1.0.0
- First stable release

View File

@ -0,0 +1,20 @@
Copyright 2011, Ben Lin (http://dreamerslab.com/)
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.

View File

@ -0,0 +1,107 @@
# jQuery Actual Plugin
Get the actual width/height of invisible DOM elements with jQuery.
## Description
jQuery has trouble finding the width/height of invisible DOM elements. With element or its parent element has css property 'display' set to 'none'. `$('.hidden').width();` will return 0 instead of the actual width; This plugin simply fix it.
## Demo
- Normal usage see demo/normal.html
- If you use [css3pie](http://css3pie.com/) you might also want to take a look at another demo( demo/css3pie.html )
- Live demo please take a look at [this](http://dreamerslab.com/demos/get-hidden-element-width-with-jquery-actual-plugin) and [this](http://dreamerslab.com/demos/get-hidden-element-width-with-jquery-actual-plugin-with-css3pie/)
## Documentation
- There is a syntax highlight version, please see [this post](http://dreamerslab.com/blog/en/get-hidden-elements-width-and-height-with-jquery/)
- For chinese version please go [here](http://dreamerslab.com/blog/tw/get-hidden-elements-width-and-height-with-jquery/)
## Requires
- jQuery 1.2.3 ~ 1.8.0
## Browser Compatibility
- [Firefox](http://mzl.la/RNaI) 2.0+
- [Internet Explorer](http://bit.ly/9fMgIQ) 6+
- [Safari](http://bit.ly/gMhzVR) 3+
- [Opera](http://bit.ly/fWJzaC) 10.6+
- [Chrome](http://bit.ly/ePHvYZ) 8+
## Installation
- First, make sure you are using valid [DOCTYPE](http://bit.ly/hQK1Rk)
- Include necessary JS files
<!-- -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="path-to-file/jquery.actual.js"></script>
## Usage
Example code:
// get hidden element actual width
$( '.hidden' ).actual( 'width' );
// get hidden element actual innerWidth
$( '.hidden' ).actual( 'innerWidth' );
// get hidden element actual outerWidth
$( '.hidden' ).actual( 'outerWidth' );
// get hidden element actual outerWidth and set the `includeMargin` argument
$( '.hidden' ).actual( 'outerWidth', { includeMargin : true });
// get hidden element actual height
$( '.hidden' ).actual( 'height' );
// get hidden element actual innerHeight
$( '.hidden' ).actual( 'innerHeight' );
// get hidden element actual outerHeight
$( '.hidden' ).actual( 'outerHeight' );
// get hidden element actual outerHeight and set the `includeMargin` argument
$( '.hidden' ).actual( 'outerHeight', { includeMargin : true });
// if the page jumps or blinks, pass a attribute '{ absolute : true }'
// be very careful, you might get a wrong result depends on how you makrup your html and css
$( '.hidden' ).actual( 'height', { absolute : true });
// if you use css3pie with a float element
// for example a rounded corner navigation menu you can also try to pass a attribute '{ clone : true }'
// please see demo/css3pie in action
$( '.hidden' ).actual( 'width', { clone : true });
## Credits
- Erwin Derksen
- [Jon Tara](https://github.com/jtara)
- [Matt Hinchliffe](https://github.com/i-like-robots)
- [Ryan Millikin](https://github.com/dhamma)
## License
The expandable plugin is licensed under the MIT License (LICENSE.txt).
Copyright (c) 2012 [Ben Lin](http://dreamerslab.com)

View File

@ -0,0 +1,97 @@
/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 1.0.10
*
* Requires: jQuery 1.2.3 ~ 1.8.0
*/
;( function ( $ ){
$.fn.extend({
actual : function ( method, options ){
// check if the jQuery method exist
if( !this[ method ]){
throw '$.actual => The jQuery method "' + method + '" you called does not exist';
}
var defaults = {
absolute : false,
clone : false,
includeMargin : false
};
var configs = $.extend( defaults, options );
var $target = this;
var fix, restore;
if( configs.clone === true ){
fix = function (){
var style = 'position: absolute !important; top: -1000 !important; ';
// this is useful with css3pie
$target = $target.
filter( ':first' ).
clone().
attr( 'style', style ).
appendTo( 'body' );
};
restore = function (){
// remove DOM element after getting the width
$target.remove();
};
}else{
var tmp = [];
var $hidden, style;
fix = function (){
// get all hidden parents
$hidden = $target.
parents().
andSelf().
filter( ':hidden' );
style += 'visibility: hidden !important; display: block !important; ';
if( configs.absolute === true ) style += 'position: absolute !important; ';
// save the origin style props
// set the hidden el css to be got the actual value later
$hidden.each( function (){
var $this = $( this );
// Save original style. If no style was set, attr() returns undefined
tmp.push( $this.attr( 'style' ));
$this.attr( 'style', style );
});
};
restore = function (){
// restore origin style values
$hidden.each( function ( i ){
var $this = $( this );
var _tmp = tmp[ i ];
if( _tmp === undefined ){
$this.removeAttr( 'style' );
}else{
$this.attr( 'style', _tmp );
}
});
};
}
fix();
// get the actual value with user specific methed
// it can be 'width', 'height', 'outerWidth', 'innerWidth'... etc
// configs.includeMargin only works for 'outerWidth' and 'outerHeight'
var actual = /(outer)/g.test( method ) ?
$target[ method ]( configs.includeMargin ) :
$target[ method ]();
restore();
// IMPORTANT, this plugin only return the value of the first element
return actual;
}
});
})( jQuery );

View File

@ -0,0 +1,8 @@
/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 1.0.10
*
* Requires: jQuery 1.2.3 ~ 1.8.0
*/
;(function(a){a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';}var f={absolute:false,clone:false,includeMargin:false};var i=a.extend(f,l);var e=this;var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";e=e.filter(":first").clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d,c;h=function(){d=e.parents().andSelf().filter(":hidden");c+="visibility: hidden !important; display: block !important; ";if(i.absolute===true){c+="position: absolute !important; ";}d.each(function(){var m=a(this);g.push(m.attr("style"));m.attr("style",c);});};j=function(){d.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");}else{o.attr("style",n);}});};}h();var k=/(outer)/g.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});})(jQuery);

View File

@ -0,0 +1,25 @@
{
"name" : "actual",
"version" : "1.0.10",
"title" : "jQuery Actual Plugin",
"author" : "dreamerslab <ben@dreamerslab.com>",
"description": "Older version of jQuery has trouble finding the width/height of invisible DOM elements. With element or its parent element has css property 'display' set to 'none'. `$('.hidden').width();` will return 0 instead of the actual width; This plugin simply fix it.",
"keywords": [
"width", "height", "hidden element width", "hidden element height", "actual"
],
"dependencies": {
"jquery": ">=1.2.3"
},
"contributors": [
{ "name": "Ben Lin", "email": "ben@dreamerslab.com" },
{ "name": "Erwin Derksen" },
{ "name": "Jon Tara", "email": "jtara-github-public@spamex.com" },
{ "name": "Matt Hinchliffe", "email": "matt@maketea.co.uk" },
{ "name": "Ryan Millikin" }
],
"licenses": [{
"type" : "MIT",
"url" : "LICENSE.txt"
}],
"homepage": "http://dreamerslab.com/blog/get-hidden-elements-width-and-height-with-jquery/"
}

View File

@ -0,0 +1,54 @@
.antiScroll {
display: inline-block;
position: relative;
overflow: hidden;
}
.antiscroll-scrollbar {
background: gray;
background: rgba(0, 0, 0, 0.5);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
-webkit-box-shadow: 0 0 1px #fff;
-moz-box-shadow: 0 0 1px #fff;
box-shadow: 0 0 1px #fff;
position: absolute;
opacity: 0;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
-webkit-transition: linear 300ms opacity;
-moz-transition: linear 300ms opacity;
-o-transition: linear 300ms opacity;
}
.antiscroll-scrollbar-shown {
opacity: 1;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
}
.antiscroll-scrollbar-horizontal {
height: 7px;
margin-left: 2px;
bottom: 2px;
left: 0;
}
.antiscroll-scrollbar-vertical {
width: 7px;
margin-top: 2px;
right: 2px;
top: 0;
}
.antiscroll-inner {
overflow-y: scroll;
}
.antiScroll,.antiscroll-content, .antiscroll-inner {
width: 240px;
}
.antiscroll-inner::-webkit-scrollbar, .antiscroll-inner::scrollbar {
width: 0;
height: 0;
}

View File

@ -0,0 +1,446 @@
(function ($) {
/**
* Augment jQuery prototype.
*/
$.fn.antiscroll = function (options) {
return this.each(function () {
if ($(this).data('antiscroll')) {
$(this).data('antiscroll').destroy();
}
$(this).data('antiscroll', new $.Antiscroll(this, options));
});
};
/**
* Expose constructor.
*/
$.Antiscroll = Antiscroll;
/**
* Antiscroll pane constructor.
*
* @param {Element|jQuery} main pane
* @parma {Object} options
* @api public
*/
function Antiscroll (el, opts) {
this.el = $(el);
this.options = opts || {};
this.x = false !== this.options.x;
this.y = false !== this.options.y;
this.padding = undefined == this.options.padding ? 2 : this.options.padding;
this.inner = this.el.find('.antiscroll-inner');
this.inner.css({
'width': '+=' + scrollbarSize()
, 'height': '+=' + scrollbarSize()
});
this.refresh();
}
/**
* refresh scrollbars
*
* @api public
*/
Antiscroll.prototype.refresh = function() {
var needHScroll = this.inner.get(0).scrollWidth > this.el.width()
, needVScroll = this.inner.get(0).scrollHeight > this.el.height();
if (!this.horizontal && needHScroll && this.x) {
this.horizontal = new Scrollbar.Horizontal(this);
} else if (this.horizontal && !needHScroll) {
this.horizontal.destroy();
this.horizontal = null
}
if (!this.vertical && needVScroll && this.y) {
this.vertical = new Scrollbar.Vertical(this);
} else if (this.vertical && !needVScroll) {
this.vertical.destroy();
this.vertical = null
}
};
/**
* Cleans up.
*
* @return {Antiscroll} for chaining
* @api public
*/
Antiscroll.prototype.destroy = function () {
if (this.horizontal) {
this.horizontal.destroy();
this.horizontal = null
}
if (this.vertical) {
this.vertical.destroy();
}
return this;
};
/**
* Rebuild Antiscroll.
*
* @return {Antiscroll} for chaining
* @api public
*/
Antiscroll.prototype.rebuild = function () {
this.destroy();
this.inner.attr('style', '');
Antiscroll.call(this, this.el, this.options);
return this;
};
/**
* Scrollbar constructor.
*
* @param {Element|jQuery} element
* @api public
*/
function Scrollbar (pane) {
this.pane = pane;
this.pane.el.append(this.el);
this.innerEl = this.pane.inner.get(0);
this.dragging = false;
this.enter = false;
this.shown = false;
// hovering
this.pane.el.mouseenter($.proxy(this, 'mouseenter'));
this.pane.el.mouseleave($.proxy(this, 'mouseleave'));
// dragging
this.el.mousedown($.proxy(this, 'mousedown'));
// scrolling
this.innerPaneScrollListener = $.proxy(this, 'scroll');
this.pane.inner.scroll(this.innerPaneScrollListener);
// wheel -optional-
this.innerPaneMouseWheelListener = $.proxy(this, 'mousewheel');
this.pane.inner.bind('mousewheel', this.innerPaneMouseWheelListener);
// show
var initialDisplay = this.pane.options.initialDisplay;
if (initialDisplay !== false) {
this.show();
this.hiding = setTimeout($.proxy(this, 'hide'), parseInt(initialDisplay, 10) || 3000);
}
}
/**
* Cleans up.
*
* @return {Scrollbar} for chaining
* @api public
*/
Scrollbar.prototype.destroy = function () {
this.el.remove();
this.pane.inner.unbind('scroll', this.innerPaneScrollListener);
this.pane.inner.unbind('mousewheel', this.innerPaneMouseWheelListener);
return this;
};
/**
* Called upon mouseenter.
*
* @api private
*/
Scrollbar.prototype.mouseenter = function () {
this.enter = true;
this.show();
};
/**
* Called upon mouseleave.
*
* @api private
*/
Scrollbar.prototype.mouseleave = function () {
this.enter = false;
if (!this.dragging) {
this.hide();
}
}
/**
* Called upon wrap scroll.
*
* @api private
*/
Scrollbar.prototype.scroll = function () {
if (!this.shown) {
this.show();
if (!this.enter && !this.dragging) {
this.hiding = setTimeout($.proxy(this, 'hide'), 1500);
}
}
this.update();
};
/**
* Called upon scrollbar mousedown.
*
* @api private
*/
Scrollbar.prototype.mousedown = function (ev) {
ev.preventDefault();
this.dragging = true;
this.startPageY = ev.pageY - parseInt(this.el.css('top'), 10);
this.startPageX = ev.pageX - parseInt(this.el.css('left'), 10);
// prevent crazy selections on IE
document.onselectstart = function () { return false; };
var pane = this.pane
, move = $.proxy(this, 'mousemove')
, self = this
$(document)
.mousemove(move)
.mouseup(function () {
self.dragging = false;
document.onselectstart = null;
$(document).unbind('mousemove', move);
if (!self.enter) {
self.hide();
}
})
};
/**
* Show scrollbar.
*
* @api private
*/
Scrollbar.prototype.show = function (duration) {
if (!this.shown) {
this.update();
this.el.addClass('antiscroll-scrollbar-shown');
if (this.hiding) {
clearTimeout(this.hiding);
this.hiding = null;
}
this.shown = true;
}
};
/**
* Hide scrollbar.
*
* @api private
*/
Scrollbar.prototype.hide = function () {
var autoHide = this.pane.options.autoHide;
if (autoHide !== false && this.shown) {
// check for dragging
this.el.removeClass('antiscroll-scrollbar-shown');
this.shown = false;
}
};
/**
* Horizontal scrollbar constructor
*
* @api private
*/
Scrollbar.Horizontal = function (pane) {
this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-horizontal">');
Scrollbar.call(this, pane);
}
/**
* Inherits from Scrollbar.
*/
inherits(Scrollbar.Horizontal, Scrollbar);
/**
* Updates size/position of scrollbar.
*
* @api private
*/
Scrollbar.Horizontal.prototype.update = function () {
var paneWidth = this.pane.el.width()
, trackWidth = paneWidth - this.pane.padding * 2
, innerEl = this.pane.inner.get(0)
this.el
.css('width', trackWidth * paneWidth / innerEl.scrollWidth)
.css('left', trackWidth * innerEl.scrollLeft / innerEl.scrollWidth)
}
/**
* Called upon drag.
*
* @api private
*/
Scrollbar.Horizontal.prototype.mousemove = function (ev) {
var trackWidth = this.pane.el.width() - this.pane.padding * 2
, pos = ev.pageX - this.startPageX
, barWidth = this.el.width()
, innerEl = this.pane.inner.get(0)
// minimum top is 0, maximum is the track height
var y = Math.min(Math.max(pos, 0), trackWidth - barWidth)
innerEl.scrollLeft = (innerEl.scrollWidth - this.pane.el.width())
* y / (trackWidth - barWidth)
};
/**
* Called upon container mousewheel.
*
* @api private
*/
Scrollbar.Horizontal.prototype.mousewheel = function (ev, delta, x, y) {
if ((x < 0 && 0 == this.pane.inner.get(0).scrollLeft) ||
(x > 0 && (this.innerEl.scrollLeft + this.pane.el.width()
== this.innerEl.scrollWidth))) {
ev.preventDefault();
return false;
}
};
/**
* Vertical scrollbar constructor
*
* @api private
*/
Scrollbar.Vertical = function (pane) {
this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-vertical">');
Scrollbar.call(this, pane);
};
/**
* Inherits from Scrollbar.
*/
inherits(Scrollbar.Vertical, Scrollbar);
/**
* Updates size/position of scrollbar.
*
* @api private
*/
Scrollbar.Vertical.prototype.update = function () {
var paneHeight = this.pane.el.height()
, trackHeight = paneHeight - this.pane.padding * 2
, innerEl = this.innerEl
this.el
.css('height', trackHeight * paneHeight / innerEl.scrollHeight)
.css('top', trackHeight * innerEl.scrollTop / innerEl.scrollHeight)
};
/**
* Called upon drag.
*
* @api private
*/
Scrollbar.Vertical.prototype.mousemove = function (ev) {
var paneHeight = this.pane.el.height()
, trackHeight = paneHeight - this.pane.padding * 2
, pos = ev.pageY - this.startPageY
, barHeight = this.el.height()
, innerEl = this.innerEl
// minimum top is 0, maximum is the track height
var y = Math.min(Math.max(pos, 0), trackHeight - barHeight)
innerEl.scrollTop = (innerEl.scrollHeight - paneHeight)
* y / (trackHeight - barHeight)
};
/**
* Called upon container mousewheel.
*
* @api private
*/
Scrollbar.Vertical.prototype.mousewheel = function (ev, delta, x, y) {
if ((y > 0 && 0 == this.innerEl.scrollTop) ||
(y < 0 && (this.innerEl.scrollTop + this.pane.el.height()
== this.innerEl.scrollHeight))) {
ev.preventDefault();
return false;
}
};
/**
* Cross-browser inheritance.
*
* @param {Function} constructor
* @param {Function} constructor we inherit from
* @api private
*/
function inherits (ctorA, ctorB) {
function f() {};
f.prototype = ctorB.prototype;
ctorA.prototype = new f;
};
/**
* Scrollbar size detection.
*/
var size;
function scrollbarSize () {
if (size === undefined) {
var div = $(
'<div style="width:50px;height:50px;overflow:hidden;'
+ 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;">'
+ '</div>'
);
$('body').append(div);
var w1 = $('div', div).innerWidth();
div.css('overflow-y', 'scroll');
var w2 = $('div', div).innerWidth();
$(div).remove();
size = w1 - w2;
}
return size;
};
})(jQuery);

View File

@ -0,0 +1,446 @@
(function ($) {
/**
* Augment jQuery prototype.
*/
$.fn.antiscroll = function (options) {
return this.each(function () {
if ($(this).data('antiscroll')) {
$(this).data('antiscroll').destroy();
}
$(this).data('antiscroll', new $.Antiscroll(this, options));
});
};
/**
* Expose constructor.
*/
$.Antiscroll = Antiscroll;
/**
* Antiscroll pane constructor.
*
* @param {Element|jQuery} main pane
* @parma {Object} options
* @api public
*/
function Antiscroll (el, opts) {
this.el = $(el);
this.options = opts || {};
this.x = false !== this.options.x;
this.y = false !== this.options.y;
this.padding = undefined == this.options.padding ? 2 : this.options.padding;
this.inner = this.el.find('.antiscroll-inner');
this.inner.css({
'width': '+=' + scrollbarSize()
, 'height': '+=' + scrollbarSize()
});
this.refresh();
}
/**
* refresh scrollbars
*
* @api public
*/
Antiscroll.prototype.refresh = function() {
var needHScroll = this.inner.get(0).scrollWidth > this.el.width()
, needVScroll = this.inner.get(0).scrollHeight > this.el.height();
if (!this.horizontal && needHScroll && this.x) {
this.horizontal = new Scrollbar.Horizontal(this);
} else if (this.horizontal && !needHScroll) {
this.horizontal.destroy();
this.horizontal = null
}
if (!this.vertical && needVScroll && this.y) {
this.vertical = new Scrollbar.Vertical(this);
} else if (this.vertical && !needVScroll) {
this.vertical.destroy();
this.vertical = null
}
};
/**
* Cleans up.
*
* @return {Antiscroll} for chaining
* @api public
*/
Antiscroll.prototype.destroy = function () {
if (this.horizontal) {
this.horizontal.destroy();
this.horizontal = null
}
if (this.vertical) {
this.vertical.destroy();
}
return this;
};
/**
* Rebuild Antiscroll.
*
* @return {Antiscroll} for chaining
* @api public
*/
Antiscroll.prototype.rebuild = function () {
this.destroy();
this.inner.attr('style', '');
Antiscroll.call(this, this.el, this.options);
return this;
};
/**
* Scrollbar constructor.
*
* @param {Element|jQuery} element
* @api public
*/
function Scrollbar (pane) {
this.pane = pane;
this.pane.el.append(this.el);
this.innerEl = this.pane.inner.get(0);
this.dragging = false;
this.enter = false;
this.shown = false;
// hovering
this.pane.el.mouseenter($.proxy(this, 'mouseenter'));
this.pane.el.mouseleave($.proxy(this, 'mouseleave'));
// dragging
this.el.mousedown($.proxy(this, 'mousedown'));
// scrolling
this.innerPaneScrollListener = $.proxy(this, 'scroll');
this.pane.inner.scroll(this.innerPaneScrollListener);
// wheel -optional-
this.innerPaneMouseWheelListener = $.proxy(this, 'mousewheel');
this.pane.inner.bind('mousewheel', this.innerPaneMouseWheelListener);
// show
var initialDisplay = this.pane.options.initialDisplay;
if (initialDisplay !== false) {
this.show();
this.hiding = setTimeout($.proxy(this, 'hide'), parseInt(initialDisplay, 10) || 3000);
}
}
/**
* Cleans up.
*
* @return {Scrollbar} for chaining
* @api public
*/
Scrollbar.prototype.destroy = function () {
this.el.remove();
this.pane.inner.unbind('scroll', this.innerPaneScrollListener);
this.pane.inner.unbind('mousewheel', this.innerPaneMouseWheelListener);
return this;
};
/**
* Called upon mouseenter.
*
* @api private
*/
Scrollbar.prototype.mouseenter = function () {
this.enter = true;
this.show();
};
/**
* Called upon mouseleave.
*
* @api private
*/
Scrollbar.prototype.mouseleave = function () {
this.enter = false;
if (!this.dragging) {
this.hide();
}
}
/**
* Called upon wrap scroll.
*
* @api private
*/
Scrollbar.prototype.scroll = function () {
if (!this.shown) {
this.show();
if (!this.enter && !this.dragging) {
this.hiding = setTimeout($.proxy(this, 'hide'), 1500);
}
}
this.update();
};
/**
* Called upon scrollbar mousedown.
*
* @api private
*/
Scrollbar.prototype.mousedown = function (ev) {
ev.preventDefault();
this.dragging = true;
this.startPageY = ev.pageY - parseInt(this.el.css('top'), 10);
this.startPageX = ev.pageX - parseInt(this.el.css('left'), 10);
// prevent crazy selections on IE
document.onselectstart = function () { return false; };
var pane = this.pane
, move = $.proxy(this, 'mousemove')
, self = this
$(document)
.mousemove(move)
.mouseup(function () {
self.dragging = false;
document.onselectstart = null;
$(document).unbind('mousemove', move);
if (!self.enter) {
self.hide();
}
})
};
/**
* Show scrollbar.
*
* @api private
*/
Scrollbar.prototype.show = function (duration) {
if (!this.shown) {
this.update();
this.el.addClass('antiscroll-scrollbar-shown');
if (this.hiding) {
clearTimeout(this.hiding);
this.hiding = null;
}
this.shown = true;
}
};
/**
* Hide scrollbar.
*
* @api private
*/
Scrollbar.prototype.hide = function () {
var autoHide = this.pane.options.autoHide;
if (autoHide !== false && this.shown) {
// check for dragging
this.el.removeClass('antiscroll-scrollbar-shown');
this.shown = false;
}
};
/**
* Horizontal scrollbar constructor
*
* @api private
*/
Scrollbar.Horizontal = function (pane) {
this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-horizontal">');
Scrollbar.call(this, pane);
}
/**
* Inherits from Scrollbar.
*/
inherits(Scrollbar.Horizontal, Scrollbar);
/**
* Updates size/position of scrollbar.
*
* @api private
*/
Scrollbar.Horizontal.prototype.update = function () {
var paneWidth = this.pane.el.width()
, trackWidth = paneWidth - this.pane.padding * 2
, innerEl = this.pane.inner.get(0)
this.el
.css('width', trackWidth * paneWidth / innerEl.scrollWidth)
.css('left', trackWidth * innerEl.scrollLeft / innerEl.scrollWidth)
}
/**
* Called upon drag.
*
* @api private
*/
Scrollbar.Horizontal.prototype.mousemove = function (ev) {
var trackWidth = this.pane.el.width() - this.pane.padding * 2
, pos = ev.pageX - this.startPageX
, barWidth = this.el.width()
, innerEl = this.pane.inner.get(0)
// minimum top is 0, maximum is the track height
var y = Math.min(Math.max(pos, 0), trackWidth - barWidth)
innerEl.scrollLeft = (innerEl.scrollWidth - this.pane.el.width())
* y / (trackWidth - barWidth)
};
/**
* Called upon container mousewheel.
*
* @api private
*/
Scrollbar.Horizontal.prototype.mousewheel = function (ev, delta, x, y) {
if ((x < 0 && 0 == this.pane.inner.get(0).scrollLeft) ||
(x > 0 && (this.innerEl.scrollLeft + this.pane.el.width()
== this.innerEl.scrollWidth))) {
ev.preventDefault();
return false;
}
};
/**
* Vertical scrollbar constructor
*
* @api private
*/
Scrollbar.Vertical = function (pane) {
this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-vertical">');
Scrollbar.call(this, pane);
};
/**
* Inherits from Scrollbar.
*/
inherits(Scrollbar.Vertical, Scrollbar);
/**
* Updates size/position of scrollbar.
*
* @api private
*/
Scrollbar.Vertical.prototype.update = function () {
var paneHeight = this.pane.el.height()
, trackHeight = paneHeight - this.pane.padding * 2
, innerEl = this.innerEl
this.el
.css('height', trackHeight * paneHeight / innerEl.scrollHeight)
.css('top', trackHeight * innerEl.scrollTop / innerEl.scrollHeight)
};
/**
* Called upon drag.
*
* @api private
*/
Scrollbar.Vertical.prototype.mousemove = function (ev) {
var paneHeight = this.pane.el.height()
, trackHeight = paneHeight - this.pane.padding * 2
, pos = ev.pageY - this.startPageY
, barHeight = this.el.height()
, innerEl = this.innerEl
// minimum top is 0, maximum is the track height
var y = Math.min(Math.max(pos, 0), trackHeight - barHeight)
innerEl.scrollTop = (innerEl.scrollHeight - paneHeight)
* y / (trackHeight - barHeight)
};
/**
* Called upon container mousewheel.
*
* @api private
*/
Scrollbar.Vertical.prototype.mousewheel = function (ev, delta, x, y) {
if ((y > 0 && 0 == this.innerEl.scrollTop) ||
(y < 0 && (this.innerEl.scrollTop + this.pane.el.height()
== this.innerEl.scrollHeight))) {
ev.preventDefault();
return false;
}
};
/**
* Cross-browser inheritance.
*
* @param {Function} constructor
* @param {Function} constructor we inherit from
* @api private
*/
function inherits (ctorA, ctorB) {
function f() {};
f.prototype = ctorB.prototype;
ctorA.prototype = new f;
};
/**
* Scrollbar size detection.
*/
var size;
function scrollbarSize () {
if (size === undefined) {
var div = $(
'<div style="width:50px;height:50px;overflow:hidden;'
+ 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;">'
+ '</div>'
);
$('body').append(div);
var w1 = $('div', div).innerWidth();
div.css('overflow-y', 'scroll');
var w2 = $('div', div).innerWidth();
$(div).remove();
size = w1 - w2;
}
return size;
};
})(jQuery);

View File

@ -0,0 +1,78 @@
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function($) {
var types = ['DOMMouseScroll', 'mousewheel'];
$.event.special.mousewheel = {
setup: function() {
if ( this.addEventListener ) {
for ( var i=types.length; i; ) {
this.addEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i=types.length; i; ) {
this.removeEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
},
unmousewheel: function(fn) {
return this.unbind("mousewheel", fn);
}
});
function handler(event) {
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
event = $.event.fix(orgEvent);
event.type = "mousewheel";
// Old school scrollwheel delta
if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
if ( event.detail ) { delta = -event.detail/3; }
// New school multidimensional scroll (touchpads) deltas
deltaY = delta;
// Gecko
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaY = 0;
deltaX = -1*delta;
}
// Webkit
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
return $.event.handle.apply(this, args);
}
})(jQuery);

View File

@ -0,0 +1,304 @@
<!doctype html>
<html>
<head>
<title>Antiscroll - os x lion style cross-browser native scrolling on the web that gets out of the way</title>
<link href="antiscroll.css" rel="stylesheet" />
<style>
body {
padding: 80px 100px;
font: 14px/1.4 'helvetica neue', helvetica, arial, sans-serif;
}
h1 {
font-size: 28px;
}
.box {
background: #eee;
}
.box, .box .antiscroll-inner {
width: 250px;
height: 250px;
font: 14px Helvetica, Arial;
}
.box-wrap {
margin: 20px 40px;
border: 1px solid #999;
}
.box-inner {
background: #eee;
padding: 10px;
color: #999;
text-shadow: 0 1px 0 #fff;
}
.button {
-webkit-user-select: none;
display: block;
background: #3b88d8;
text-decoration: none;
background: -o-linear-gradient(0% 100% 90deg, #377ad0, #52a8e8);
background: -moz-linear-gradient(0% 100% 90deg, #377ad0, #52a8e8);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#52a8e8), to(#377ad0));
border-top: 1px solid #4081af;
border-right: 1px solid #2e69a3;
border-bottom: 1px solid #20559a;
border-left: 1px solid #2e69a3;
-moz-border-radius: 16px;
-webkit-border-radius: 16px;
border-radius: 16px;
-moz-box-shadow: inset 0 1px 0 0 #72b9eb, 0 1px 2px 0 #b3b3b3;
-webkit-box-shadow: inset 0 1px 0 0 #72b9eb, 0 1px 2px 0 #b3b3b3;
box-shadow: inset 0 1px 0 0 #72b9eb, 0 1px 2px 0 #b3b3b3;
color: #fff;
font-family: "lucida grande", sans-serif;
font-size: 11px;
font-weight: normal;
line-height: 1;
padding: 3px 0 5px 0;
text-align: center;
text-shadow: 0 -1px 1px #3275bc;
width: 112px;
-webkit-background-clip: padding-box;
}
.button:hover {
background: #2a81d7;
background: -o-linear-gradient(0% 100% 90deg, #206bcb, #3e9ee5);
background: -moz-linear-gradient(0% 100% 90deg, #206bcb, #3e9ee5);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#3e9ee5), to(#206bcb));
border-top: 1px solid #2a73a6;
border-right: 1px solid #165899;
border-bottom: 1px solid #07428f;
border-left: 1px solid #165899;
-moz-box-shadow: inset 0 1px 0 0 #62b1e9;
-webkit-box-shadow: inset 0 1px 0 0 #62b1e9;
cursor: pointer;
text-shadow: 0 -1px 1px #1d62ab;
-webkit-background-clip: padding-box;
text-decoration: none;
}
.button:active {
background: #3282d3;
border: 1px solid #154c8c;
border-bottom: 1px solid #0e408e;
-moz-box-shadow: inset 0 0 6px 3px #1657b5, 0 1px 0 0 #fff;
-webkit-box-shadow: inset 0 0 6px 3px #1657b5, 0 1px 0 0 #fff;
box-shadow: inset 0 0 6px 3px #1657b5, 0 1px 0 0 #fff;
text-shadow: 0 -1px 1px #2361a4;
-webkit-background-clip: padding-box;
}
ul#features {
margin: 40px 0;
padding: 0 20px;
float: left;
width: 600px;
}
ul#features li {
list-style: none;
}
ul {
padding: 0 15px;
}
ul li {
margin: 0 5px;
padding: 3px 0;
}
.action {
color: #0069d6;
cursor: pointer;
}
.action:hover {
color: #00438a;
}
</style>
<script src="deps/jquery.js"></script>
<script src="deps/jquery-mousewheel.js"></script>
<script src="antiscroll.js"></script>
<script>
$(function () {
scroller = $('.box-wrap').antiscroll().data('antiscroll');
$("#addRow").click(function() {
$('.box-wrap tr:last').clone().appendTo('.box-wrap table');
$("#rows b").text($(".box-wrap tr").length);
scroller.refresh();
});
$("#removeRow").click(function() {
$('.box-wrap tr:last').remove();
$("#rows b").text($(".box-wrap tr").length);
scroller.refresh();
});
$("#addCol").click(function() {
$('.box-wrap tr').each(function(index, tr) {
$('td:last', tr).clone().appendTo(tr);
});
$("#cols b").text($(".box-wrap tr:last td").length);
scroller.refresh();
});
$("#removeCol").click(function() {
$('.box-wrap tr').find('td:last').remove();
$("#cols b").text($(".box-wrap tr:last td").length);
scroller.refresh();
});
$("#rows b").text($(".box-wrap tr").length);
$("#cols b").text($(".box-wrap tr:last td").length);
});
</script>
</head>
<body>
<div id="page">
<h1>Antiscroll</h1>
<p>os x lion style cross-browser native scrolling on the web that gets out of the way.</p>
<ul id="features">
<li>supports mousewheels, trackpads, other input devices natively.</li>
<li>total size is <b>1kb</b> minified and gzipped.</li>
<li>doesn't magically autowrap your elements with divs (manual wrapping is necessary, please see index.html demo).</li>
<li>fade in/out controlled with CSS3 animations.</li>
<li>shows scrollbars upon hovering.</li>
<li>scrollbars are draggable.</li>
<li>size of container can be dynamically adjusted and scrollbars will adapt.</li>
<li>supports IE7+, Firefox 3+, Chrome, Safari, Opera</li>
</ul>
<div class="box-wrap antiscroll-wrap">
<div class="box">
<div class="antiscroll-inner">
<div class="box-inner">
<table>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
<tr>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
<td>Body</td><td>Body</td><td>Body</td><td>Body</td><td>Body</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<br style="clear: both">
<a href="https://github.com/learnboost/antiscroll/downloads" class="button">Download</a>
<br />
<p id="rows"><b>X</b> rows</p>
<ul>
<li><a class="action" id="addRow" >Add row</a></li>
<li><a class="action" id="removeRow">Remove row</a></li>
</ul>
<p id="cols"><b>X</b> cols</p>
</ul>
<li><a class="action" id="addCol" >Add col</a></li>
<li><a class="action" id="removeCol">Remove col</a></li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
1.3 (wip)
---
- Configuration options: `raw`, `json`. Replaces raw option, becomes config:
```javascript
$.cookie.raw = true; // bypass encoding/decoding the cookie value
$.cookie.json = true; // automatically JSON stringify/parse value
```
Thus the default options now cleanly contain cookie attributes only.
1.2
---
- Adding `$.removeCookie('foo')` for deleting a cookie, using `$.cookie('foo', null)` is now deprecated.
1.1
---
- Default options.

View File

@ -0,0 +1,92 @@
# jquery.cookie
A simple, lightweight jQuery plugin for reading, writing and deleting cookies.
## Installation
Include script *after* the jQuery library (unless you are packaging scripts somehow else):
<script src="/path/to/jquery.cookie.js"></script>
**Do not include the script directly from GitHub (http://raw.github.com/...).** The file is being served as text/plain and as such being blocked
in Internet Explorer on Windows 7 for instance (because of the wrong MIME type). Bottom line: GitHub is not a CDN.
## Usage
Create session cookie:
$.cookie('the_cookie', 'the_value');
Create expiring cookie, 7 days from then:
$.cookie('the_cookie', 'the_value', { expires: 7 });
Create expiring cookie, valid across entire site:
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });
Read cookie:
$.cookie('the_cookie'); // => "the_value"
$.cookie('not_existing'); // => null
Delete cookie:
// Returns true when cookie was found, false when no cookie was found...
$.removeCookie('the_cookie');
// Same path as when the cookie was written...
$.removeCookie('the_cookie', { path: '/' });
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie, unless you're relying on the default options that is.*
## Configuration
By default the cookie value is encoded/decoded when writing/reading, using `encodeURIComponent`/`decodeURIComponent`. Bypass this by setting raw to true:
$.cookie.raw = true;
Turn on automatic storage of JSON objects passed as the cookie value. Assumes `JSON.stringify` and `JSON.parse`:
$.cookie.json = true;
## Cookie Options
Cookie attributes can be set globally by setting properties of the `$.cookie.defaults` object or individually for each call to `$.cookie()` by passing a plain object to the options argument. Per-call options override the default options.
expires: 365
Define lifetime of the cookie. Value can be a `Number` which will be interpreted as days from time of creation or a `Date` object. If omitted, the cookie becomes a session cookie.
path: '/'
Define the path where the cookie is valid. *By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).* If you want to make it available for instance across the entire domain use `path: '/'`. Default: path of page where the cookie was created.
domain: 'example.com'
Define the domain where the cookie is valid. Default: domain of page where the cookie was created.
secure: true
If true, the cookie transmission requires a secure protocol (https). Default: `false`.
## Tests
Requires Node. Startup server:
$ node server.js
Open in browser:
$ open http://0.0.0.0:8124/test.html
## Development
- Source hosted at [GitHub](https://github.com/carhartl/jquery-cookie)
- Report issues, questions, feature requests on [GitHub Issues](https://github.com/carhartl/jquery-cookie/issues)
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
## Authors
[Klaus Hartl](https://github.com/carhartl)

View File

@ -0,0 +1,72 @@
/*!
* jQuery Cookie Plugin v1.3
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function ($, document, undefined) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return decodeURIComponent(s.replace(pluses, ' '));
}
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = config.json ? JSON.stringify(value) : String(value);
return (document.cookie = [
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// read
var decode = config.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
if (decode(parts.shift()) === key) {
var cookie = decode(parts.join('='));
return config.json ? JSON.parse(cookie) : cookie;
}
}
return null;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) !== null) {
$.cookie(key, null, options);
return true;
}
return false;
};
})(jQuery, document);

View File

@ -0,0 +1,557 @@
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: nightly
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Apr 2 13:46:17.0000000000 2012
*/
/* Core qTip styles */
.ui-tooltip, .qtip{
position: absolute;
left: -28000px;
top: -28000px;
display: none;
max-width: 280px;
min-width: 50px;
font-size: 10.5px;
line-height: 12px;
}
/* Fluid class for determining actual width in IE */
.ui-tooltip-fluid{
display: block;
visibility: hidden;
position: static !important;
float: left !important;
}
.ui-tooltip-content{
position: relative;
padding: 5px 9px;
overflow: hidden;
border: 1px solid #000001;
text-align: left;
word-wrap: break-word;
overflow: hidden;
}
.ui-tooltip-titlebar{
position: relative;
min-height: 14px;
padding: 5px 35px 5px 10px;
overflow: hidden;
border: 1px solid #000001;
border-width: 1px 1px 0;
font-weight: bold;
}
.ui-tooltip-titlebar + .ui-tooltip-content{ border-top-width: 0px !important; }
/*! Default close button class */
.ui-tooltip-titlebar .ui-state-default{
position: absolute;
right: 4px;
top: 50%;
margin-top: -9px;
cursor: pointer;
outline: medium none;
border-width: 1px;
border-style: solid;
}
* html .ui-tooltip-titlebar .ui-state-default{ top: 16px; } /* IE fix */
.ui-tooltip-titlebar .ui-icon,
.ui-tooltip-icon .ui-icon{
display: block;
text-indent: -1000em;
}
.ui-tooltip-icon, .ui-tooltip-icon .ui-icon{
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.ui-tooltip-icon .ui-icon{
width: 18px;
height: 14px;
text-align: center;
text-indent: 0;
font: normal bold 10px/13px Tahoma,sans-serif;
color: inherit;
background: transparent none no-repeat -100em -100em;
}
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
.ui-tooltip-focus{
}
/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
.ui-tooltip-hover{
}
/*! Default tooltip style */
.ui-tooltip-default .ui-tooltip-titlebar,
.ui-tooltip-default .ui-tooltip-content{
border-color: #F1D031;
background-color: #FFFFA3;
color: #555;
}
.ui-tooltip-default .ui-tooltip-titlebar{
background-color: #FFEF93;
}
.ui-tooltip-default .ui-tooltip-icon{
border-color: #CCC;
background: #F1F1F1;
color: #777;
}
.ui-tooltip-default .ui-tooltip-titlebar .ui-state-hover{
border-color: #AAA;
color: #111;
}
/* Tips plugin */
.ui-tooltip .ui-tooltip-tip{
margin: 0 auto;
overflow: hidden;
z-index: 10;
}
.ui-tooltip .ui-tooltip-tip,
.ui-tooltip .ui-tooltip-tip *{
position: absolute;
line-height: 0.1px !important;
font-size: 0.1px !important;
color: #123456;
background: transparent;
border: 0px dashed transparent;
}
.ui-tooltip .ui-tooltip-tip canvas{ top: 0; left: 0; }
/* Modal plugin */
#qtip-overlay{
position: fixed;
left: -10000em;
top: -10000em;
}
/* Applied to modals with show.modal.blur set to true */
#qtip-overlay.blurs{ cursor: pointer; }
/* Change opacity of overlay here */
#qtip-overlay div{
position: absolute;
left: 0; top: 0;
width: 100%; height: 100%;
background-color: black;
opacity: 0.7;
filter:alpha(opacity=70);
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
}
/*! Light tooltip style */
.ui-tooltip-light .ui-tooltip-titlebar,
.ui-tooltip-light .ui-tooltip-content{
border-color: #E2E2E2;
color: #454545;
}
.ui-tooltip-light .ui-tooltip-content{
background-color: white;
}
.ui-tooltip-light .ui-tooltip-titlebar{
background-color: #f1f1f1;
}
/*! Dark tooltip style */
.ui-tooltip-dark .ui-tooltip-titlebar,
.ui-tooltip-dark .ui-tooltip-content{
border-color: #303030;
color: #f3f3f3;
}
.ui-tooltip-dark .ui-tooltip-content{
background-color: #505050;
}
.ui-tooltip-dark .ui-tooltip-titlebar{
background-color: #404040;
}
.ui-tooltip-dark .ui-tooltip-icon{
border-color: #444;
}
.ui-tooltip-dark .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/*! Cream tooltip style */
.ui-tooltip-cream .ui-tooltip-titlebar,
.ui-tooltip-cream .ui-tooltip-content{
border-color: #F9E98E;
color: #A27D35;
}
.ui-tooltip-cream .ui-tooltip-content{
background-color: #FBF7AA;
}
.ui-tooltip-cream .ui-tooltip-titlebar{
background-color: #F0DE7D;
}
.ui-tooltip-cream .ui-state-default .ui-tooltip-icon{
background-position: -82px 0;
}
/*! Red tooltip style */
.ui-tooltip-red .ui-tooltip-titlebar,
.ui-tooltip-red .ui-tooltip-content{
border-color: #D95252;
color: #912323;
}
.ui-tooltip-red .ui-tooltip-content{
background-color: #F78B83;
}
.ui-tooltip-red .ui-tooltip-titlebar{
background-color: #F06D65;
}
.ui-tooltip-red .ui-state-default .ui-tooltip-icon{
background-position: -102px 0;
}
.ui-tooltip-red .ui-tooltip-icon{
border-color: #D95252;
}
.ui-tooltip-red .ui-tooltip-titlebar .ui-state-hover{
border-color: #D95252;
}
/*! Green tooltip style */
.ui-tooltip-green .ui-tooltip-titlebar,
.ui-tooltip-green .ui-tooltip-content{
border-color: #90D93F;
color: #3F6219;
}
.ui-tooltip-green .ui-tooltip-content{
background-color: #CAED9E;
}
.ui-tooltip-green .ui-tooltip-titlebar{
background-color: #B0DE78;
}
.ui-tooltip-green .ui-state-default .ui-tooltip-icon{
background-position: -42px 0;
}
/*! Blue tooltip style */
.ui-tooltip-blue .ui-tooltip-titlebar,
.ui-tooltip-blue .ui-tooltip-content{
border-color: #ADD9ED;
color: #5E99BD;
}
.ui-tooltip-blue .ui-tooltip-content{
background-color: #E5F6FE;
}
.ui-tooltip-blue .ui-tooltip-titlebar{
background-color: #D0E9F5;
}
.ui-tooltip-blue .ui-state-default .ui-tooltip-icon{
background-position: -2px 0;
}
/*! Add shadows to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE6+, Safari 2+ */
.ui-tooltip-shadow{
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
}
.ui-tooltip-shadow .ui-tooltip-titlebar,
.ui-tooltip-shadow .ui-tooltip-content{
filter: progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3);
-ms-filter:"progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3)";
_margin-bottom: -3px; /* IE6 */
.margin-bottom: -3px; /* IE7 */
}
/*! Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
.ui-tooltip-rounded,
.ui-tooltip-rounded .ui-tooltip-content,
.ui-tooltip-tipsy,
.ui-tooltip-tipsy .ui-tooltip-content,
.ui-tooltip-youtube,
.ui-tooltip-youtube .ui-tooltip-content{
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.ui-tooltip-rounded .ui-tooltip-titlebar,
.ui-tooltip-tipsy .ui-tooltip-titlebar,
.ui-tooltip-youtube .ui-tooltip-titlebar{
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
.ui-tooltip-rounded .ui-tooltip-titlebar + .ui-tooltip-content,
.ui-tooltip-tipsy .ui-tooltip-titlebar + .ui-tooltip-content,
.ui-tooltip-youtube .ui-tooltip-titlebar + .ui-tooltip-content{
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/*! Youtube tooltip style */
.ui-tooltip-youtube{
-webkit-box-shadow: 0 0 3px #333;
-moz-box-shadow: 0 0 3px #333;
box-shadow: 0 0 3px #333;
}
.ui-tooltip-youtube .ui-tooltip-titlebar,
.ui-tooltip-youtube .ui-tooltip-content{
_margin-bottom: 0; /* IE6 */
.margin-bottom: 0; /* IE7 */
background: transparent;
background: rgba(0, 0, 0, 0.85);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
color: white;
border-color: #CCCCCC;
}
.ui-tooltip-youtube .ui-tooltip-icon{
border-color: #222;
}
.ui-tooltip-youtube .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/* jQuery TOOLS Tooltip style */
.ui-tooltip-jtools{
background: #232323;
background: rgba(0, 0, 0, 0.7);
background-image: -moz-linear-gradient(top, #717171, #232323);
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
border: 2px solid #ddd;
border: 2px solid rgba(241,241,241,1);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0 0 12px #333;
-moz-box-shadow: 0 0 12px #333;
box-shadow: 0 0 12px #333;
}
/* IE Specific */
.ui-tooltip-jtools .ui-tooltip-titlebar{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
}
.ui-tooltip-jtools .ui-tooltip-content{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
}
.ui-tooltip-jtools .ui-tooltip-titlebar,
.ui-tooltip-jtools .ui-tooltip-content{
background: transparent;
color: white;
border: 0 dashed transparent;
}
.ui-tooltip-jtools .ui-tooltip-icon{
border-color: #555;
}
.ui-tooltip-jtools .ui-tooltip-titlebar .ui-state-hover{
border-color: #333;
}
/* Cluetip style */
.ui-tooltip-cluetip{
-webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
}
.ui-tooltip-cluetip .ui-tooltip-titlebar{
background-color: #87876A;
color: white;
border: 0 dashed transparent;
}
.ui-tooltip-cluetip .ui-tooltip-content{
background-color: #D9D9C2;
color: #111;
border: 0 dashed transparent;
}
.ui-tooltip-cluetip .ui-tooltip-icon{
border-color: #808064;
}
.ui-tooltip-cluetip .ui-tooltip-titlebar .ui-state-hover{
border-color: #696952;
color: #696952;
}
/* Tipsy style */
.ui-tooltip-tipsy{
border: 0;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar,
.ui-tooltip-tipsy .ui-tooltip-content{
_margin-bottom: 0; /* IE6 */
.margin-bottom: 0; /* IE7 */
background: transparent;
background: rgba(0, 0, 0, .87);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
color: white;
border: 0px transparent;
font-size: 11px;
font-family: 'Lucida Grande', sans-serif;
font-weight: bold;
line-height: 16px;
text-shadow: 0 1px black;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar{
padding: 6px 35px 0 10;
}
.ui-tooltip-tipsy .ui-tooltip-content{
padding: 6px 10;
}
.ui-tooltip-tipsy .ui-tooltip-icon{
border-color: #222;
text-shadow: none;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/* Tipped style */
.ui-tooltip-tipped{
}
.ui-tooltip-tipped .ui-tooltip-titlebar,
.ui-tooltip-tipped .ui-tooltip-content{
border: 3px solid #959FA9;
filter: none; -ms-filter: none;
}
.ui-tooltip-tipped .ui-tooltip-titlebar{
background: #3A79B8;
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
color: white;
font-weight: normal;
font-family: serif;
border-bottom-width: 0;
-moz-border-radius: 3px 3px 0 0;
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.ui-tooltip-tipped .ui-tooltip-content{
background-color: #F9F9F9;
color: #454545;
-moz-border-radius: 0 0 3px 3px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.ui-tooltip-tipped .ui-tooltip-icon{
border: 2px solid #285589;
background: #285589;
}
.ui-tooltip-tipped .ui-tooltip-icon .ui-icon{
background-color: #FBFBFB;
color: #555;
}
/* IE9 fix - removes all filters */
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-content,
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-titlebar{
filter: none;
-ms-filter: none;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,95 @@
Debounced and Throttled Resize Events for jQuery
================================================
It has always been a pain to deal with cross browser issues of the `window`'s resize event:
* in IE, many resize events fire as long as the user continues resizing the window,
* Chrome an Safari behave like IE, but resize events always fire two by two,
* Firefox used to fire one resize event at the end of the resizing, but now behaves like IE,
* Opera behaves like IE, but fires resize events at a reduced rate.
This project offers two scripts, each providing a special jQuery event that make `resize` more manageable:
* **jquery.debouncedresize.js**: adds a special event that fires once after the window has been resized,
* **jquery.throttledresize.js**: adds a special event that fires at a reduced rate (no more double events from Chrome and Safari).
The [Demo](http://louisremi.github.com/jquery-smartresize/demo/index.html) should help you make your choice.
**Note to previous users**: jquery.debouncedresize.js is the equivalent of the old jquery.smartresize.js, only the name of the special event changes.
Update is not required unless you want to add jquery.throttledresize.js to a page page that already has jquery.smartresize.js.
Binding / Unbinding
-------------------
Simply bind your special event just like a normal resize event.
$(window).on("debouncedresize", function( event ) {
// Your event handler code goes here.
});
// or...
$(window).on("throttledresize", function( event ) {
// Your event handler code goes here.
});
// unbind at will
$(window).off( "debouncedresize" );
Threshold
---------
Both special events have a `.threshold` option:
* in jquery.debouncedresize.js, it defines the interval used to determine if two `resize` events are part of the same `debouncedresize` event. **Defaults to 150 (milliseconds)**
* in jquery.throttledresize.js, it defines the number of animation ticks (or frames) between each `throttledresize` event. **Defaults to 0 (tick)**, which means that it's going to fire at a maximum of 60fps.
They can be modified globally once the script has been loaded:
// increase the threshold to 250ms
$.event.special.debouncedresize.threshold = 250;
// decrease the firing rate to a maximum of 30fps
$.event.special.throttledresize.threshold = 1;
// 2 <=> 20fps, 3 <=> 15fps, ...
(Synchronous) Trigger
---------------------
Triggering those events is achieved using jQuery's standard API:
$(window).trigger( "debouncedresize" );
It's also possible to execute the handler of any listener synchronously (without the delays):
$(window).trigger( "throttledresize", [true] );
Minimalist Standalone Version
=============================
Most of the time, I find myself using `debouncedresize` just to register a single listener on `window`.
As it turns out, all the features I need actually fit in 91 bytes:
// debulked onresize handler
function on_resize(c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};
Using it is pretty simple:
on_resize(function() {
// handle the resize event here
...
});
Initializing a page (by executing the resize handler when the page loads) couldn't be easier:
on_resize(function() {
...
})(); // these parenthesis does the trick
No files are provided for this function, simply copy/paste it from this README.
License
=======
MIT licensed http://louisremi.mit-license.org/
Copyright (c) 2012 [Louis-Rémi Babé](http://twitter.com/louis_remi).

View File

@ -0,0 +1,47 @@
/*
* debouncedresize: special jQuery event that happens once after a window resize
*
* latest version and complete README available on Github:
* https://github.com/louisremi/jquery-smartresize
*
* Copyright 2012 @louis_remi
* Licensed under the MIT license.
*
* This saved you an hour of work?
* Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON
*/
(function($) {
var $event = $.event,
$special,
resizeTimeout;
$special = $event.special.debouncedresize = {
setup: function() {
$( this ).on( "resize", $special.handler );
},
teardown: function() {
$( this ).off( "resize", $special.handler );
},
handler: function( event, execAsap ) {
// Save the context
var context = this,
args = arguments,
dispatch = function() {
// set correct event type
event.type = "debouncedresize";
$event.dispatch.apply( context, args );
};
if ( resizeTimeout ) {
clearTimeout( resizeTimeout );
}
execAsap ?
dispatch() :
resizeTimeout = setTimeout( dispatch, $special.threshold );
},
threshold: 150
};
})(jQuery);

View File

@ -0,0 +1,58 @@
/*
* throttledresize: special jQuery event that happens at a reduced rate compared to "resize"
*
* latest version and complete README available on Github:
* https://github.com/louisremi/jquery-smartresize
*
* Copyright 2012 @louis_remi
* Licensed under the MIT license.
*
* This saved you an hour of work?
* Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON
*/
(function($) {
var $event = $.event,
$special,
dummy = {_:0},
frame = 0,
wasResized, animRunning;
$special = $event.special.throttledresize = {
setup: function() {
$( this ).on( "resize", $special.handler );
},
teardown: function() {
$( this ).off( "resize", $special.handler );
},
handler: function( event, execAsap ) {
// Save the context
var context = this,
args = arguments;
wasResized = true;
if ( !animRunning ) {
setInterval(function(){
frame++;
if ( frame > $special.threshold && wasResized || execAsap ) {
// set correct event type
event.type = "throttledresize";
$event.dispatch.apply( context, args );
wasResized = false;
frame = 0;
}
if ( frame > 9 ) {
$(dummy).stop();
animRunning = false;
frame = 0;
}
}, 30);
animRunning = true;
}
},
threshold: 0
};
})(jQuery);

View File

@ -0,0 +1,296 @@
<?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
$js_chosen = <<<JS
profind_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 = {
init: function() {
$(document).find(':file').bind('change', function(event, param) {
if (param == 'clear') {
$('#quitar_fotografia').val('1');
}
});
}
};
JS;
Yii::app()->clientScript->registerScript('js_quitar_foto', $js_quitar_foto, CClientScript::POS_END);
$js_init = <<<JS
$(document).ready(function(){
profind_chosen.init();
profind_fotografia.init();
});
JS;
Yii::app()->clientScript->registerScript('js_init', $js_init, CClientScript::POS_END);
?>
<?php
$form = $this->beginWidget('CActiveForm', array(
'id' => 'candidato-form',
'enableAjaxValidation' => false,
'htmlOptions' => array(
'enctype' => 'multipart/form-data',
'class' => 'form-horizontal'
)
));
?>
<div class="row-fluid">
<div class="span12">
<?php if ($candidato->hasErrors()) { ?>
<div class="alert alert-error">
<a data-dismiss="alert" class="close">×</a>
<?php
echo CHtml::errorSummary($candidato, '<strong>' . Yii::t('profind', 'Se han encontrado errores') . '</strong>', '', array('firstError' => true));
?>
</div>
<?php } ?>
</div>
</div>
<fieldset>
<legend><?php echo Yii::t('profind', 'Datos personales'); ?></legend>
<div class="row-fluid formSep">
<div class="span6">
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'n_identificacion', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'n_identificacion', array('class' => 'span6')); ?>
</div>
</div>
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'nombre', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'nombre', array('class' => 'span12')); ?>
</div>
</div>
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'apellidos', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'apellidos', array('class' => 'span12')); ?>
</div>
</div>
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'sexo', array('class' => 'control-label')); ?>
<div class="controls">
<label class="radio inline">
<?php echo $form->radioButton($candidato, 'sexo', array('value' => Candidato::GENERO_HOMBRE, 'uncheckValue' => null)); ?>
<?php echo Yii::t('profind', 'Hombre'); ?>
</label>
<label class="radio inline">
<?php echo $form->radioButton($candidato, 'sexo', array('value' => Candidato::GENERO_MUJER, 'uncheckValue' => null)); ?>
<?php echo Yii::t('profind', 'Mujer'); ?>
</label>
</div>
</div>
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'fecha_nacimiento', array('class' => 'control-label')); ?>
<div class="controls sepH_b">
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model' => $candidato,
'attribute' => 'fecha_nacimiento',
'language' => 'es',
'options' => array('showAnim' => 'fold'),
'htmlOptions' => array('class' => 'span6'),
));
?>
</div>
</div>
<div class="sepH_b">
<?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',
));
?>
</div>
</div>
</div> <!--/span-->
<div class="span6">
<label class="control-label"><?php echo Yii::t('profind', 'Fotografía'); ?></label>
<div class="controls">
<div class="fileupload <?php echo ($candidato->fotografia->tieneFotografia()) ? 'fileupload-exists' : 'fileupload-new'; ?>" data-provides="fileupload">
<div class="fileupload-preview thumbnail" style="width: 150px; height: 150px;">
<?php echo CHtml::image($candidato->fotografia->getThumbnail()); ?>
</div>
<div>
<span class="btn btn-file">
<span class="fileupload-new"><?php echo Yii::t('profind', 'Seleccionar imagen'); ?></span>
<span class="fileupload-exists"><?php echo Yii::t('profind', 'Cambiar'); ?></span>
<?php echo $form->fileField($candidato, 'ficheroFotografia'); ?>
<input type="hidden" id="quitar_fotografia" name="quitar_fotografia" value="0">
</span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><?php echo Yii::t('profind', 'Quitar'); ?></a>
</div>
</div>
</div>
</div> <!--/span-->
</div> <!--/row-->
</fieldset>
<fieldset>
<legend><?php echo Yii::t('profind', 'Datos de contacto'); ?></legend>
<div class="row-fluid">
<div class="span6">
<?php echo $form->labelEx($candidato, 'email', array('class' => 'control-label')); ?>
<div class="controls">
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span>
<?php echo $form->textField($candidato, 'email', array('class' => 'span12')); ?>
</div>
</div>
</div>
</div>
<div class="row-fluid formSep">
<div class="span6 sepH_b">
<?php echo $form->labelEx($candidato, 'telefono_fijo', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'telefono_fijo', array('class' => 'span12')); ?>
</div>
</div>
<div class="span6">
<?php echo $form->labelEx($candidato, 'telefono_movil', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'telefono_movil', array('class' => 'span12')); ?>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend><?php echo Yii::t('profind', 'Disponibilidad'); ?></legend>
<div class="row-fluid formSep">
<div class="span6">
<div class="sepH_b">
<label class="control-label"><?php echo Yii::t('profind', '...de incorporación'); ?></label>
<div class="controls">
<?php echo $form->textField($candidato, 'disponibilidad_incorporacion', array('class' => 'span12')); ?>
</div>
</div>
<div class="sepH_b">
<label class="control-label"><?php echo Yii::t('profind', '...para entrevistas'); ?></label>
<div class="controls">
<?php echo $form->textField($candidato, 'disponibilidad_entrevistas', array('class' => 'span12')); ?>
</div>
</div>
<div class="sepH_b">
<label class="control-label"><?php echo Yii::t('profind', '...para guardias'); ?></label>
<div class="controls">
<?php echo $form->textField($candidato, 'disponibilidad_guardias', array('class' => 'span12')); ?>
</div>
</div>
</div>
<div class="span6">
<div class="sepH_b">
<label class="control-label"><?php echo Yii::t('profind', '...para viajar'); ?></label>
<div class="controls">
<?php echo $form->textField($candidato, 'disponibilidad_viajar', array('class' => 'span12')); ?>
</div>
</div>
<div class="sepH_b">
<label class="control-label"><?php echo Yii::t('profind', '...para proyectos internacionales'); ?></label>
<div class="controls">
<?php echo $form->textField($candidato, 'disponibilidad_proyectos_internacionales', array('class' => 'span12')); ?>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset>
<div class="row-fluid sepH_b">
<div class="span12">
<label class="control-label"><?php echo Yii::t('profind', 'Rango salarial'); ?> </label>
<div class="controls">
<div class="sepH_b">
<span id="salario_min"><?php echo $candidato->salario_minimo; ?></span> &euro; - <span id="salario_max"><?php echo $candidato->salario_maximo; ?></span>&euro;
</div>
<?php
$this->widget('zii.widgets.jui.CJuiSliderInput', array(
'model' => $candidato,
'attribute' => 'salario_minimo',
'maxAttribute' => 'salario_maximo',
'event' => 'change',
'options' => array(
'range' => true,
'step'=> 1000,
'min' => Yii::app()->params['salarios_candidatos']['salario_minimo'],
'max' =>Yii::app()->params['salarios_candidatos']['salario_maximo'],
'slide' => 'js:function(event,ui){$("#salario_min").text(ui.values[0]); $("#salario_max").text(ui.values[1]);}',
),
'htmlOptions' => array('class' => 'sepH_b'),
));
?>
</div>
</div>
</div>
</fieldset>
<fieldset>
<div class="row-fluid sepH_b">
<div class="span6">
<div class="sepH_b">
<?php echo $form->labelEx($candidato, 'carnet_conducir', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'carnet_conducir', array('class' => 'span12')); ?>
</div>
</div>
</div>
<div class="span6">
<?php echo $form->labelEx($candidato, 'vehiculo_propio', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($candidato, 'vehiculo_propio', array('class' => 'span12')); ?>
</div>
</div>
</div>
</fieldset>
<fieldset>
<div class="row-fluid formSep">
<div class="span12">
<?php echo $form->labelEx($candidato, 'observaciones', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textArea($candidato, 'observaciones', array('class' => 'span12', 'rows' => 5)); ?>
</div>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary"><?php echo $candidato->isNewRecord ? Yii::t('profind', 'Crear') : Yii::t('profind', 'Guardar cambios'); ?></button>
<button class="btn"><?php echo Yii::t('profind', 'Cancelar'); ?></button>
</div>
</fieldset>
</div>
<div class="span4">
<fieldset>
<div class="control-group">
</div>
</fieldset>
</div>
</div>
<?php $this->endWidget(); ?>

View File

@ -0,0 +1,238 @@
<?php //Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/lib/datatables/js/jquery.dataTables.min.js', CClientScript::POS_END); ?>
<?php //Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/lib/datatables/extras/Scroller/media/js/Scroller.min.js', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/grid.css'); ?>
<?php
Yii::app()->clientScript->registerScript('init_grid', '
$(document).ready(function() {
$row = $("<div class=\'row\'/>");
$row.appendTo("#candidato-grid");
$column1 = $("<div class=\'span6\'/>");
$column2 = $("<div class=\'span6\'/>");
$column1.appendTo($row);
$column2.appendTo($row);
$column1.append($("#candidato-grid .dataTables_info"));
$column2.append($("#candidato-grid .pagination"));
$("#candidato-grid table").dataTable({
"aaSorting": [[ 2, "asc" ]],
//"bProcessing": true,
//"bServerSide": true,
//"sDom": "<\'row\'<\'span6\'l><\'span6\'f>r>t<\'row\'<\'span6\'i><\'span6\'p>>",
});
});'
);
?>
<?php
$columnas = array(
'id',
'nombreCompleto',
'email',
array(
'header' => Yii::t('intranet', 'Acciones'),
'class' => 'CButtonColumn',
'headerHtmlOptions' => array(
'style' => 'width:55px;',
'class' => '',
),
'template' => '{update}{delete}',
),
// array(
// 'type' => 'html',
// 'name' => 'email',
// 'value' => 'CHtml::mailto(CHtml::encode($data->email));',
// 'headerHtmlOptions' => array(
// 'class' => '',
// ),
// 'cssClassExpression' => '',
// ),
);
$gridView = $this->widget('zii.widgets.grid.CGridView', array(
'id' => 'candidato-grid',
'dataProvider' => $candidatos->search(),
'columns' => $columnas,
'filter' => $candidatos,
'filterPosition' => 'footer',
'cssFile' => false,
'htmlOptions' => array('class' => 'dataTables_wrapper form-inline'),
'itemsCssClass' => 'table table-striped table-bordered dataTable',
'template' => '{items}{summary}{pager}',
'emptyText' => Yii::t('profind', 'No hay candidatos'),
'summaryCssClass' => 'dataTables_info',
//'summaryText' => Yii::t('profind', 'Mostrando registros del {start} al {end} de {count} en total.'),
'pagerCssClass' => 'dataTables_paginate paging_bootstrap_alt pagination',
'pager' => array(
'htmlOptions' => array('class' => ''),
'header' => '',
'hiddenPageCssClass' => 'disabled',
//'cssFile' =>Yii::app()->theme->baseUrl."/css/style-of-pager.css",
),
), true);
?>
<div class="row-fluid">
<div class="span12">
<div class="heading">
<ul class="nav nav-tabs">
<li><a href="#mbox_new" data-toggle="tab"><i class="splashy-document_letter_edit"></i> New message</a></li>
<li class="active"><a href="#mbox_inbox" data-toggle="tab"><i class="splashy-mail_light_down"></i> Inbox</a></li>
<li><a href="#mbox_outbox" data-toggle="tab"><i class="splashy-mail_light_up"></i> Outbox</a></li>
<li><a href="#mbox_trash" data-toggle="tab"><i class="icon-adt_trash"></i> Trash</a></li>
</ul>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php echo $gridView; ?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div role="grid" class="dataTables_wrapper form-inline" id="dt_gal_wrapper">
<div class="row"><div class="span6"><div class="dt_actions">
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a data-tableid="dt_gal" class="delete_rows_dt" href="#"><i class="icon-trash"></i> Delete</a></li>
<li><a href="javascript:void(0)">Lorem ipsum</a></li>
<li><a href="javascript:void(0)">Lorem ipsum</a></li>
</ul>
</div>
</div>
<div id="dt_gal_length" class="dataTables_length">
<label>Show <select name="dt_gal_length" size="1" aria-controls="dt_gal">
<option value="10" selected="selected">10</option><option value="25">25</option>
<option value="50">50</option><option value="100">100</option></select> entries</label>
</div>
</div>
<div class="span6">
<div class="dataTables_filter" id="dt_gal_filter">
<label>Search: <input type="text" aria-controls="dt_gal"></label>
</div>
</div>
</div>
<table id="dt_gal" class="table table-bordered table-striped table_vam dataTable" aria-describedby="dt_gal_info">
<thead>
<tr role="row"><th class="table_checkbox sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 13px;" aria-label=""><input type="checkbox" data-tableid="dt_gal" class="select_rows" name="select_rows"></th><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 60px;" aria-label="Image">Image</th><th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="dt_gal" rowspan="1" colspan="1" style="width: 484px;" aria-sort="ascending" aria-label="Name: activate to sort column descending">Name</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="dt_gal" rowspan="1" colspan="1" style="width: 195px;" aria-label="Size: activate to sort column ascending">Size</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="dt_gal" rowspan="1" colspan="1" style="width: 269px;" aria-label="Date: activate to sort column ascending">Date</th><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 255px;" aria-label="Actions">Actions</th></tr>
</thead>
<tbody role="alert" aria-live="polite" aria-relevant="all"><tr class="odd">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 10" href="gallery/Image10.jpg">
<img style="height:50px;width:50px" src="gallery/Image10_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image10.jpg</small></td>
<td class=" ">200 KB</td>
<td class=" ">28/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr><tr class="even">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 11" href="gallery/Image11.jpg">
<img style="height:50px;width:50px" src="gallery/Image11_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image11.jpg</small></td>
<td class=" ">210 KB</td>
<td class=" ">27/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr><tr class="odd">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 12" href="gallery/Image12.jpg">
<img style="height:50px;width:50px" src="gallery/Image12_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image12.jpg</small></td>
<td class=" ">360 KB</td>
<td class=" ">25/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr><tr class="even">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 13" href="gallery/Image13.jpg">
<img style="height:50px;width:50px" src="gallery/Image13_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image13.jpg</small></td>
<td class=" ">215 KB</td>
<td class=" ">24/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr><tr class="odd">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 14" href="gallery/Image14.jpg">
<img style="height:50px;width:50px" src="gallery/Image14_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image14.jpg</small></td>
<td class=" ">650 KB</td>
<td class=" ">24/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr><tr class="even">
<td class=" "><input type="checkbox" class="row_sel" name="row_sel"></td>
<td style="width:60px" class=" ">
<a class="cbox_single thumbnail cboxElement" title="Image 15" href="gallery/Image15.jpg">
<img style="height:50px;width:50px" src="gallery/Image15_tn.jpg" alt="">
</a>
</td>
<td class=" sorting_1">Lorem ipsum dolor sit<br><small>Image15.jpg</small></td>
<td class=" ">428 KB</td>
<td class=" ">23/06/2012</td>
<td class=" ">
<a title="Edit" class="sepV_a" href="#"><i class="icon-pencil"></i></a>
<a title="View" class="sepV_a" href="#"><i class="icon-eye-open"></i></a>
<a title="Delete" href="#"><i class="icon-trash"></i></a>
</td>
</tr></tbody></table>
<div class="row">
<div class="span6">
<div class="dataTables_info" id="dt_gal_info">Showing 1 to 6 of 6 entries</div>
</div>
<div class="span6">
<div class="dataTables_paginate paging_bootstrap pagination">
<ul>
<li class="prev disabled"><a href="#">&lt; Previous</a></li>
<li class="active"><a href="#">1</a></li><li class="next disabled"><a href="#">Next &gt; </a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,18 @@
<?php
$this->pageTitle = Yii::t('profind', 'Nuevo candidato');
$this->breadcrumbs = array(
Yii::t('profind', 'BD Candidatos') => array('/candidato/index'),
);
// Sidebar
//echo $this->renderPartial('//sidebars/_menu_candidato');
?>
<div class="row-fluid">
<div class="span12">
<h2 class="heading"><?php echo Yii::t('profind', 'Nuevo candidato'); ?></h3>
<?php echo $this->renderPartial('_form', array('candidato' => $candidato)); ?>
</div>
</div>

View File

@ -0,0 +1,24 @@
<?php
$this->pageTitle = Yii::t('profind', 'BD Candidatos');
$this->breadcrumbs = array(
Yii::t('profind', 'BD Candidatos'),
);
// Sidebar
//echo $this->renderPartial('//sidebars/_menu_candidato');
// Contenido
//echo $this->renderPartial('_form', array('model' => $model));
?>
<div class="row-fluid">
<div class="span12">
<h3 class="heading"><?php echo Yii::t('profind', 'BD Candidatos'); ?></h3>
</div>
</div>
<?php $this->renderPartial('_grid', array('candidatos' => $candidatos)); ?>

View File

@ -0,0 +1,18 @@
<?php
$this->pageTitle = Yii::t('profind', 'Modificación de candidato');
$this->breadcrumbs = array(
Yii::t('profind', 'BD Candidatos') => array('/candidato/index'),
);
// Sidebar
//echo $this->renderPartial('//sidebars/_menu_candidato');
?>
<div class="row-fluid">
<div class="span12">
<h2 class="heading"><?php echo $candidato->nombreCompleto; ?> <small><?php echo Yii::t('profind', 'Modificación de candidato'); ?></small></h3>
<?php echo $this->renderPartial('_form', array('candidato' => $candidato)); ?>
</div>
</div>

View File

@ -6,9 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
<!-- Chosen CSS -->
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/lib/chosen/chosen.css" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/css/bootstrap-responsive.min.css" />
@ -16,6 +13,9 @@
<!-- Notificaciones -->
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.css" />
<!-- Tooltips-->
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/lib/qtip2/jquery.qtip.min.css" />
<!-- Estilos -->
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/profind.css" />
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/media.css" />
@ -24,20 +24,19 @@
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body class="">
<body>
<div id="maincontainer" class="clearfix">
<!-- cabecera -->
<header>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<!-- Logo -->
<div class="brand">
<?php echo CHtml::image(Yii::app()->baseUrl . '/images/logo_profind.png', Yii::app()->name); ?>
</div>
<ul class="nav nav-collapse user_menu pull-right">
<!-- Menú usuario -->
<ul class="nav user_menu pull-right">
<li class="hidden-phone hidden-tablet"></li>
<li class="divider-vertical hidden-phone hidden-tablet"></li>
<li class="dropdown">
@ -59,67 +58,59 @@
</ul>
</li>
<li>
<?php echo CHtml::link(
CHtml::tag('i', array('class' => 'icon-off icon-white'), '') . ' ' . Yii::t('profind', 'Salir'),
$this->createUrl('site/logout')
);
<?php
echo CHtml::link(
CHtml::tag('i', array('class' => 'icon-off icon-white'), '') . ' ' . Yii::t('profind', 'Salir'), $this->createUrl('site/logout')
);
?>
</li>
</ul>
<a data-target=".nav-collapse" data-toggle="collapse" class="btn_menu">
<span class="icon-align-justify icon-white"></span>
</a>
</ul>
<!-- Separador del menú principal -->
<div class="btn_menu"></div>
<!-- Menú principal -->
<nav>
<div class="nav-collapse">
<?php
$itemsMenu = array();
<?php
$itemsMenu = array();
// Tablero
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-th icon-white'), '') . ' ' . Yii::t('profind', 'Tablero'),
'url' => '',
'linkOptions' => array(),
);
// Tablero
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-th icon-white'), '') . ' ' . Yii::t('profind', 'Tablero'),
'url' => '',
'linkOptions' => array(),
);
// Publicaciones
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-tags icon-white'), '') . ' ' . Yii::t('profind', 'Publicaciones'),
'url' => '',
'linkOptions' => array(),
);
// Publicaciones
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-tags icon-white'), '') . ' ' . Yii::t('profind', 'Publicaciones'),
'url' => '',
'linkOptions' => array(),
);
// Inscripciones
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-bookmark icon-white'), '') . ' ' . Yii::t('profind', 'Inscripciones'),
'url' => '',
'linkOptions' => array(),
);
// Inscripciones
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-bookmark icon-white'), '') . ' ' . Yii::t('profind', 'Inscripciones'),
'url' => '',
'linkOptions' => array(),
);
// BD Candidatos
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-hdd icon-white'), '') . ' ' . Yii::t('profind', 'BD Candidatos'),
'url' => array('/candidato/index'),
'linkOptions' => array(),
);
// BD Candidatos
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-hdd icon-white'), '') . ' ' . Yii::t('profind', 'BD Candidatos'),
'url' => array('/candidato/index'),
'linkOptions' => array(),
);
// Blog
$itemsMenu[] = array(
'label' => CHtml::tag('i', array('class' => 'icon-globe icon-white'), '') . ' ' . Yii::t('profind', 'Blog'),
'url' => 'http://www.profindtic.com/blog',
'linkOptions' => array(),
);
$this->widget('zii.widgets.CMenu', array(
'activeCssClass' => 'active',
'encodeLabel' => false,
'htmlOptions' => array(
'class' => 'nav',
),
'items' => $itemsMenu,
));
?>
</div>
$this->widget('zii.widgets.CMenu', array(
'activeCssClass' => 'active',
'encodeLabel' => false,
'htmlOptions' => array(
'class' => 'nav',
),
'items' => $itemsMenu,
));
?>
</nav>
</div>
</div>
@ -129,9 +120,10 @@
<!-- contenido -->
<div id="contentwrapper">
<div class="main_content">
<?php if(isset($this->breadcrumbs)):?>
<?php $this->widget('zii.widgets.CBreadcrumbs', array(
<?php if (isset($this->breadcrumbs)): ?>
<?php
$this->widget('zii.widgets.CBreadcrumbs', array(
'homeLink' => CHtml::link(Yii::t('intranet', 'Tablero'), array('/site/index')),
'tagName' => 'ul',
'links' => $this->breadcrumbs,
@ -139,61 +131,100 @@
'inactiveLinkTemplate' => '<li class="active">{label}</li>',
'separator' => '<span class="divider">/</span>',
'htmlOptions' => array('class' => 'breadcrumb'),
)); ?>
));
?>
<?php endif; ?>
<?php echo $content; ?>
</div>
</div>
<!-- sidebar -->
<a href="javascript:void(0)" class="sidebar_switch on_switch ttip_r" title="Ocultar barra">Conmutar barra</a>
<div class="sidebar">
<div class="sidebar_inner">
<form action="#" class="input-append" method="post" >
<input autocomplete="off" name="query" class="search_query input-medium" size="16" type="text" placeholder="<?php echo Yii::t('profind', 'Buscar...'); ?>" />
<button type="submit" class="btn"><i class="icon-search"></i></button>
</form>
<div id="side_accordion" class="accordion">
<?php if (count($this->menu )> 0): ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapseMenu">
<i class="icon-cog"></i> <?php echo Yii::t('profind', 'Menú'); ?>
</a>
</div>
<div id="collapseMenu" class="accordion-body in collapse" style="height: auto;">
<div class="accordion-inner">
<?php $this->widget('zii.widgets.CMenu', array(
'activeCssClass' => 'active',
'encodeLabel' => false,
'items'=> (isset($this->menu['sidebar'])) ? $this->menu['sidebar'] : $this->menu,
'htmlOptions' => array(
'class' => 'nav nav-list',
),
)); ?>
<div class="antiScroll">
<div class="antiscroll-inner">
<div class="antiscroll-content">
<div class="sidebar_inner">
<form action="#" class="input-append" method="post" >
<input autocomplete="off" name="query" class="search_query input-medium" size="16" type="text" placeholder="<?php echo Yii::t('profind', 'Buscar...'); ?>" />
<button type="submit" class="btn"><i class="icon-search"></i></button>
</form>
<div id="side_accordion" class="accordion">
<?php if (count($this->menu) > 0): ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapseMenu">
<i class="icon-cog"></i> <?php echo Yii::t('profind', 'Menú'); ?>
</a>
</div>
<div id="collapseMenu" class="accordion-body in collapse" style="height: auto;">
<div class="accordion-inner">
<?php
$this->widget('zii.widgets.CMenu', array(
'activeCssClass' => 'active',
'encodeLabel' => false,
'items' => (isset($this->menu['sidebar'])) ? $this->menu['sidebar'] : $this->menu,
'htmlOptions' => array(
'class' => 'nav nav-list',
),
));
?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (isset($this->clips['sidebar'])) echo $this->clips['sidebar']; ?>
</div>
<div class="push"></div>
</div>
</div>
<?php endif; ?>
<?php if (isset($this->clips['sidebar'])) echo $this->clips['sidebar']; ?>
<div class="sidebar_info">
<ul class="unstyled">
<li>
<span class="act act-warning">65</span>
<strong>New comments</strong>
</li>
<li>
<span class="act act-success">10</span>
<strong>New articles</strong>
</li>
<li>
<span class="act act-danger">85</span>
<strong>New registrations</strong>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/js/bootstrap.min.js"></script>
<!-- Arreglo orientación en iOS -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/ios-orientationchange-fix.js"></script>
<!-- Eventos en el redimensionado -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/actual/jquery.debouncedresize.js"></script>
<!-- width/height -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/actual/jquery.actual.min.js"></script>
<!-- js cookie plugin -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/cookie/jquery.cookie.js"></script>
<!-- Tooltips -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/qtip2/jquery.qtip.min.js"></script>
<!-- Mensajes -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.min.js"></script>
<!-- Scrollbar -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/antiscroll/antiscroll.js"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/antiscroll/deps/jquery-mousewheel.js"></script>
<!-- Arreglo orientación en iOS -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/ios-orientationchange-fix.js"></script>
<!-- General -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/profind-general.js"></script>
</div>
</body>
</html>
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
<?php Yii::app()->clientScript->registerCoreScript('jquery.ui'); ?>
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/aristo/jquery-ui.css'); ?>
<?php
$flashMessages = Yii::app()->user->getFlashes(false);

View File

@ -0,0 +1,54 @@
<?php
$itemsSubmenu = array();
// Perfil
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Perfil'),
'url' => array('/usuario/modificar', 'id' => Yii::app()->user->id),
'linkOptions' => array(),
);
// Empresa
if (Yii::app()->user->esCoordinador)
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Empresa'),
'url' => array('/empresa/modificar', 'id' => Yii::app()->user->id_empresa),
'linkOptions' => array(),
);
// Producto
if (Yii::app()->user->esCoordinador)
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Productos'),
'url' => array('/subscripcion/modificar', 'id' => Yii::app()->user->subscripcion->id),
'linkOptions' => array(),
);
// Equipo
if ((Yii::app()->user->esCoordinador) && (Yii::app()->user->tieneEquipo))
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Equipo'),
'url' => array('/equipo/index'),
'linkOptions' => array('class' => 'icon_block contacto'),
);
// Networks
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Networks'),
'url' => array('/network/index'),
'linkOptions' => array(),
);
// Portales
$itemsSubmenu[] = array(
'label' => Yii::t('profind', 'Portales'),
'url' => array('/portal/index'),
'linkOptions' => array(),
);
$this->menu = array(
'sidebar' => $itemsSubmenu
);
?>