first global commit

This commit is contained in:
2020-09-23 15:50:29 +02:00
commit 78adf3a099
6052 changed files with 1221183 additions and 0 deletions
@@ -0,0 +1,182 @@
<?php
abstract class PerfApiMigration extends XMLMigration {
public function __construct(){
parent::__construct(MigrateGroup::getInstance('PerfMigrate'));
}
public function getTextsAuthors($xml, $attr, $l){
$values = array();
$authors = array();
$language = array();
foreach ($xml as $xml_value) {
$values = array_merge( $values, array( $this->getAttribute($xml_value, $attr), $this->getAttribute($xml_value, 'TRADUCTION')) );
$auteur_nom = $this->getAttribute($xml_value, 'NOM_AUTEUR');
$auteur_prenom = $this->getAttribute($xml_value, 'PRENOM_AUTEUR');
$auteur = $auteur_nom != '' || $auteur_prenom != '' ? trim($auteur_prenom .' '. $auteur_nom) : '';
$authors = array_merge($authors, array($auteur,$auteur));
$language = array_merge($language, $l);
}
return array(
'values'=>$values,
'authors'=>$authors,
'language'=>$language,
);
}
public function getAttribute($object, $attr){
$attr_objects = $object->xpath('@'.$attr);
return isset($attr_objects[0]) ? (string) $attr_objects[0] : '';
}
public function getPersonne($object, $suffix = ''){
$nom = $this->getAttribute($object, 'NOM'.$suffix);
$prenom = $this->getAttribute($object, 'PRENOM'.$suffix);
return $nom != '' || $prenom != '' ? trim($prenom .' '. $nom) : '';
}
public function getDate($o, $moment){
$date = $this->getAttribute($o, 'ANNEE_'.$moment)
.'/'. $this->getAttribute($o, 'MOIS_'.$moment)
.'/'. $this->getAttribute($o, 'JOUR_'.$moment)
.'-'. $this->getAttribute($o, 'HEURE_'.$moment)
.':'. $this->getAttribute($o, 'MINUTE_'.$moment);
do {
$date = preg_replace('/(\/+|:+|-+)$/', '', $date, 1, $count);
} while ($count);
return $date;
}
public function recordGroup(&$node, $field, $xml, $attr){
foreach ($xml->xpath('GROUPE_ARTISTES[@'.$attr.'="oui"]') as $xml_group){
# group d'artiste
$gname = trim($this->getAttribute($xml_group, 'NOM'));
// drush_log(dt('recordGroup !name', array('!name'=>$gname)), 'status');
$gts = taxonomy_get_term_by_name($gname);
//
// drush_log(dt('group_term : !gt', array('!gt'=>print_r($gt, true))));
if(!count($gts)){
$gt = new stdClass();
$gt->name = $gname;
$gt->vid = 7;
taxonomy_term_save($gt);
}else{
// print_r($gts);
foreach ($gts as $tid => $t) {
$gt = $t;
break;
}
}
// drush_log(dt('term group !name, tid : !tid', array('!name'=>$gt->name,'!tid'=>$gt->tid)), 'status');
$node->{$field}['und'][] = array('tid'=>$gt->tid);
# personne dans le group d'artist
//!\\ ici ça ne boucle pas
foreach ($xml->xpath('GROUPE_ARTISTES[@NOM="'.$gname.'"]/PERSONNE[@'.$attr.'="oui"]') as $xml_p){
$term_name = trim($this->getPersonne($xml_p));
// drush_log(dt('recordGroup :: personne : !p', array('!p'=>$term_name)), 'status');
$tbn = taxonomy_get_term_by_name($term_name);
if(!count($tbn)){
$t = new stdClass();
$t->name = $term_name;
$t->vid = 7;
taxonomy_term_save($t);
}else{
foreach ($tbn as $tid => $tt) {
$t = $tt;
break;
}
}
$parents = taxonomy_get_parents($t->tid);
$t->parent = array();
foreach ($parents as $tid => $parent_term) {
$t->parent[] = $tid;
}
if(!in_array($gt->tid, $t->parent)){
$t->parent[] = $gt->tid;
}
$nom = trim($this->getAttribute($xml_p, 'NOM'));
$prenom = trim($this->getAttribute($xml_p, 'PRENOM'));
$t->field_nom = array(
'und'=>array(
array(
'value' => $nom,
'format' => null,
'safe_value' => $nom,
)
)
);
$t->field_prenom = array(
'und'=>array(
array(
'value' => $prenom,
'format' => null,
'safe_value' => $prenom,
)
)
);
taxonomy_term_save($t);
// drush_log(dt('term personne !name, tid : !tid', array('!name'=>$t->name,'!tid'=>$t->tid)), 'status');
$node->{$field}['und'][] = array('tid'=>$t->tid);
}
}
}
public function updatePersonneTerms($xml){
foreach ($xml->xpath('PERSONNE') as $xml_concepteur){
$nom = trim($this->getAttribute($xml_concepteur, 'NOM'));
$prenom = trim($this->getAttribute($xml_concepteur, 'PRENOM'));
$term_name = $nom != '' || $prenom != '' ? trim($prenom .' '. $nom) : '';
$tbn = taxonomy_get_term_by_name($term_name);
// if(!count($tbn)){
// $t = new stdClass();
// $t->name = $term_name;
// $t->vid = 7;
// taxonomy_term_save($t);
// }else{
foreach ($tbn as $tid => $tt) {
$term = $tt;
break;
}
// }
$term->field_nom = array(
'und'=>array(
array(
'value' => $nom,
'format' => null,
'safe_value' => $nom,
)
)
);
$term->field_prenom = array(
'und'=>array(
array(
'value' => $prenom,
'format' => null,
'safe_value' => $prenom,
)
)
);
taxonomy_term_save($term);
}
}
}
@@ -0,0 +1,375 @@
<?php
abstract class PerfBasicMigration extends PerfApiMigration {
public function __construct(){
$this->description = t('Migrate Performance Basic Class');
parent::__construct();
// There isn't a consistent way to automatically identify appropriate "fields"
// from an XML feed, so we pass an explicit list of source fields
$fields = array(
'treeline_id' => t('Treeline id'),
'title' => t('title'),
'sous_titre' => t('Sous-titre'),
'language' => t('Language'),
'description' => t('description'),
'auteur_description' => t('Auteur description'),
'language_description' => t('Language description'),
'intention' => t('Intention'),
'auteur_intention' => t('Auteur intention'),
'language_intention' => t('Language intention'),
'serie' => t('Série'),
'typologie_performance' => t('Typologie performance'),
'tags_libre' => t('Tags libres'),
'concepteur' => t('Concepteur'),
'executant' => t('Executant'),
'organisateur' => t('Organisateur'),
'contexte_theorique' => t('contexte_theorique'),
'auteur_contexte_theorique' => t('auteur_contexte_theorique'),
'language_contexte_theorique' => t('Language contexte'),
// 'date_de_debut' => t('Date de debut'),
// 'date_de_fin' => t('Date de fin'),
// 'lieu' => t('Lieu'),
// 'duree' => t('Durée'),
// 'topologie' => t('Topologie'),
'effectuations_id' => t('effectuations id'),
'temoin' => t('Temoin'),
'site_internet' => t('Site internet'),
'images' => t('Images'),
'images_alt' => t('Images Alt'),
'images_title' => t('Images Title'),
'recherche' => t('recherche'),
'sources_bibliographiques' => t('Sources bibliographiques'), // BIBLIOGRAPHIE
'docs_audiovisuels' => t('docs audio visuel'), // DOC_AUDIOVISUEL
'docs_sonor' => t('docs sonor'),//DOC_SONORE
'documents' => t('documents'), // DOC_IMPRIME
'objects' => t('Objets'), // OBJET
// 'docs_press' => t('doc press'), // DOC_PRESSE
// 'docs_manuscrit' => t('doc manuscrits'), // DOC_MANUSCRITS
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'treeline_id' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-parsed.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $this->item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('performance');
$this->addFieldMapping('language')->defaultValue('fr');
$this->addFieldMapping('is_new')->defaultValue(TRUE);
// $this->addFieldMapping('created', 'date_creation');
// $this->addFieldMapping('changed', 'date_modif');
$this->addFieldMapping('status')->defaultValue(1);
$this->addFieldMapping('promote')->defaultValue(0);
$this->addFieldMapping('sticky')->defaultValue(0);
# titre & sous titre
// $this->addFieldMapping('title', 'title')
// ->xpath('@TITRE');
$this->addFieldMapping('title_field', 'title');
$this->addFieldMapping('title_field:language', 'language');
$this->addFieldMapping('field_sous_titre', 'sous_titre')
->xpath('@SOUS_TITRE');
# description
$this->addFieldMapping('field_description', 'description');
$this->addFieldMapping('field_description:format')->defaultValue('filtred_html');
$this->addFieldMapping('field_description:language', 'language_description');
$this->addFieldMapping('field_description:author', 'auteur_description');
# intention (nexiste pas dans la base xml)
$this->addFieldMapping('field_intention', 'intention');
$this->addFieldMapping('field_intention:format')->defaultValue('filtred_html');
$this->addFieldMapping('field_intention:language', 'language_intention');
$this->addFieldMapping('field_intention:author', 'auteur_intention');
# contexte theorique
$this->addFieldMapping('field_contexte_theorique', 'contexte_theorique');
$this->addFieldMapping('field_contexte_theorique:format')->defaultValue('filtred_html');
$this->addFieldMapping('field_contexte_theorique:language', 'language_contexte_theorique');
$this->addFieldMapping('field_contexte_theorique:author', 'auteur_contexte_theorique');
# typologie perf
$this->addFieldMapping('field_type_de_performance', 'typologie_performance')
->xpath('TYPOLOGIE_PERFORMANCE/@TYPOLOGIE_PERFORMANCE');
$this->addFieldMapping('field_type_de_performance:create_term')->defaultValue(TRUE);
# serie
$this->addFieldMapping('field_serie', 'serie')
->xpath('SERIE/@NOM_SERIE');
$this->addFieldMapping('field_serie:create_term')->defaultValue(TRUE);
# tags libre perf
$this->addFieldMapping('field_tags_libre', 'tags_libre');
$this->addFieldMapping('field_tags_libre:create_term')->defaultValue(TRUE);
# personnes
$this->addFieldMapping('field_concepteur', 'concepteur');
$this->addFieldMapping('field_concepteur:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_executant', 'executant');
$this->addFieldMapping('field_executant:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_organisateur', 'organisateur');
$this->addFieldMapping('field_organisateur:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_temoin', 'temoin');
$this->addFieldMapping('field_temoin:create_term')->defaultValue(TRUE);
# lieu date contexte
// $this->addFieldMapping('field_date_de_debut', 'date_de_debut');
// $this->addFieldMapping('field_date_de_fin', 'date_de_fin');
// $this->addFieldMapping('field_dure', 'duree');
// $this->addFieldMapping('field_lieu', 'lieu')
// ->xpath('LIEU_DATE_CONTEXTE/@NOM_LIEU');
// $this->addFieldMapping('field_lieu:create_term')->defaultValue(TRUE);
// $this->addFieldMapping('field_topologie', 'topologie')
// ->xpath('LIEU_DATE_CONTEXTE/@TYPE');
// $this->addFieldMapping('field_topologie:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_effectuations', 'effectuations_id')
->sourceMigration('PerfLDCNode');
#site internet
$this->addFieldMapping('field_site_internet', 'site_internet');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
// $this->addFieldMapping('field_images:destination_file', 'images');
// $this->addFieldMapping('field_images:alt', 'images_alt');
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
$this->addFieldMapping('field_recherche', 'recherche')
->xpath('/RECHERCHE/@NOTES');
$this->addFieldMapping('field_sources_bibliographiques', 'sources_bibliographiques')
->xpath('/BIBLIOGRAPHIE/@BIBLIOGRAPHIE');
$this->addFieldMapping('field_documents_videos', 'docs_audiovisuels')
->sourceMigration('PerfDvidsNode');
$this->addFieldMapping('field_documents_sonor', 'docs_sonor')
->sourceMigration('PerfDsonsNode');
$this->addFieldMapping('field_documents', 'documents')
->sourceMigration(array('PerfDimpNode', 'PerfDpressNode', 'PerfDmanuNode')); // ?????
$this->addFieldMapping('field_objects', 'objects')
->sourceMigration('PerfObjetNode');
$this->addUnmigratedDestinations(array('revision_uid', 'created', 'changed', 'revision', 'log', 'tnid','comment', 'uid','path', 'pathauto',
'title',
'title_field:format',
'field_sous_titre:format', 'field_sous_titre:language',
'field_performances_associees',
// 'body:summary',
// 'field_auteur_description:source_type',
// 'field_auteur_intention:source_type',
// 'field_auteur_contexte:source_type',
'field_serie:source_type', 'field_type_de_performance:source_type', 'field_tags_libre:source_type',
'field_concepteur:source_type','field_executant:source_type','field_organisateur:source_type','field_temoin:source_type',
// 'field_date_de_debut:format', 'field_date_de_debut:language', 'field_date_de_fin:format', 'field_date_de_fin:language',
// 'field_dure:format', 'field_dure:language',
// 'field_lieu:source_type', 'field_topologie:source_type'
'field_images:file_class', 'field_images:language', 'field_images:destination_dir', 'field_images:destination_file', 'field_images:file_replace', 'field_images:preserve_files',
'field_recherche:language', 'field_recherche:format',
'field_sources_bibliographiques:language', 'field_sources_bibliographiques:format',
//'field_images:alt', //'field_images:title',
));
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
$row->language = array('fr', 'en');
$titre = $this->getAttribute($xml, 'TITRE');
$traduction_titre = $this->getAttribute($xml, 'TRADUCTION_TITRE');
$traduction_titre = $traduction_titre != '' ? $traduction_titre : $titre;
$row->title = array(
$titre,
$traduction_titre,
);
# description
$results = $this->getTextsAuthors($xml->xpath('DESCRIPTION'), 'DESCRIPTION', $row->language);
$row->description = $results['values'];
$row->auteur_description = $results['authors'];
$row->language_description = $results['language'];
# intention
$results = $this->getTextsAuthors($xml->xpath('INTENTION'), 'INTENTION', $row->language);
$row->intention = $results['values'];
$row->auteur_intention = $results['authors'];
$row->language_intention = $results['language'];
# Contexte theorique
$results = $this->getTextsAuthors($xml->xpath('CONTEXTE_THEORIQUE'), 'CONTEXTE_THEORIQUE', $row->language);
$row->contexte_theorique = $results['values'];
$row->auteur_contexte_theorique = $results['authors'];
$row->language_contexte_theorique = $results['language'];
#tags libres
$tags = array();
foreach ($xml->xpath('MOTS_CLE') as $xml_mot_clef)
$tags[] = $this->getAttribute($xml_mot_clef, 'MOT_CLE');
$row->tags_libre = $tags;
# personnes
$concepteurs = array();
foreach ($xml->xpath('PERSONNE[@CONCEPTEUR="oui"]') as $xml_concepteur)
$concepteurs[] = $this->getPersonne($xml_concepteur);
$row->concepteur = $concepteurs;
$executants = array();
foreach ($xml->xpath('PERSONNE[@EXECUTANT="oui"]') as $xml_executant)
$executants[] = $this->getPersonne($xml_executant);
$row->executant = $executants;
$organisateurs = array();
foreach ($xml->xpath('PERSONNE[@ORGANISATEUR="oui"]') as $xml_organisateur)
$organisateurs[] = $this->getPersonne($xml_organisateur);
$row->organisateur = $organisateurs;
$temoins = array();
foreach ($xml->xpath('TEMOIN') as $xml_temoin)
$temoins[] = $this->getPersonne($xml_temoin, '_TEMOIN');
$row->temoin = $temoins;
# lieu date contexte
// $ldc = $xml->LIEU_DATE_CONTEXTE;
// $row->date_de_debut = $this->getDate($ldc, 'DEBUT');
// $row->date_de_fin = $this->getDate($ldc, 'FIN');
// $row->duree = $this->getAttribute($ldc, 'DUREE') .' '. $this->getAttribute($ldc, 'UNITE_DUREE');
// $row->lieu = $this->getAttribute($ldc, 'NOM_LIEU');
$effectuations_id = array();
foreach ($xml->xpath('LIEU_DATE_CONTEXTE') as $ldc)
$effectuations_id[] = $this->getAttribute($ldc, 'ID');
$row->effectuations_id = count($effectuations_id) ? $effectuations_id : NULL;
# doc audiovisuel
$docs = array();
foreach ($xml->xpath('DOC_AUDIOVISUEL') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
$row->docs_audiovisuels = count($docs) ? $docs : NULL;
# doc sonor
$docs = array();
foreach ($xml->xpath('DOC_SONORE') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
$row->docs_sonor = count($docs) ? $docs : NULL;
# doc imprime
$docs = array();
foreach ($xml->xpath('DOC_IMPRIME') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
foreach ($xml->xpath('DOC_PRESSE') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
foreach ($xml->xpath('DOC_MANUSCRITS') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
$row->documents = count($docs) ? $docs : NULL;
# objet
$docs = array();
foreach ($xml->xpath('OBJET') as $doc)
$docs[] = $this->getAttribute($doc, 'ID');
$row->objects = count($docs) ? $docs : NULL;
#site internet
// $sites = array();
// foreach ($xml->xpath('SITE_INTERNET') as $xml)
// $sites[] = str_replace('http://', '', $this->getAttribute($xml, 'URL'));
// $row->site_internet = $sites;
// dsm($row->site_internet)
/*
TODO site internet ne marche pas !!!
*/
// $row->site_internet = '';
foreach ($xml->xpath('SITE_INTERNET') as $xml_site)
//$row->site_internet = array('url'=>str_replace('http://', '', $this->getAttribute($xml_site, 'URL')));
$row->site_internet = str_replace('http://', '', $this->getAttribute($xml_site, 'URL'));
// dsm($row->site_internet, '$row->site_internet');
// drush_log(dt('web : !url', array('!url'=>$row->site_internet)), 'status');
#images
$images = array();
$titles = array();
$alts = array();
// $i = 0;
$str_xml = print_r($xml, true);
//drush_log(dt('xml : !xml', array('!xml'=>$str_xml)), 'status');
//drush_log(dt('start images import : !images', array('!images'=>count($xml->IMAGE_CONSULTABLE))), 'status');
foreach ($xml->IMAGE_CONSULTABLE as $xml_image) { //IMAGE_CONSULTABLE
// drush_log(dt('image'), 'status');
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
// $i++;
}
$row->images = $images;
$row->images_title = $titles;
$row->images_alt = $alts;
// dsm($row->images, '$row->images');
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
}
public function complete($node, stdClass $row){
$handler = entity_translation_get_handler('node', $node);
$translation = array(
'translate' => 0,
'status' => 1,
'language' => 'en',
'source' => $node->language,
);
$handler->setTranslation($translation, $node);
node_save($node);
}
}
@@ -0,0 +1,138 @@
<?php
abstract class PerfBasicUpdateMigration extends PerfApiMigration {
public function __construct(){
$this->description = t('Migrate Update Performance Basic Class');
parent::__construct();
$this->systemOfRecord = Migration::DESTINATION;
// There isn't a consistent way to automatically identify appropriate "fields"
// from an XML feed, so we pass an explicit list of source fields
$fields = array(
'treeline_id' => t('Treeline id'),
'language'=>t('language'),
// 'title' => t('title'),
'site_internet' => t('Site internet'),
// 'images' => t('Images'),
'images_alt' => t('Images Alt'),
'images_title' => t('Images Title'),
'sources_bibliographiques' => t('Sources bibliographiques'), // BIBLIOGRAPHIE
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'treeline_id' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-parsed.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $this->item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('performance');
#site internet
$this->addFieldMapping('field_site_internet', 'site_internet');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
$this->addFieldMapping('field_images:file_replace')->defaultValue(FILE_EXISTS_REPLACE);
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
$this->addFieldMapping('field_sources_bibliographiques', 'sources_bibliographiques')
->xpath('BIBLIOGRAPHIE/@BIBLIOGRAPHIE');
$this->addUnmigratedDestinations(array());
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
#site internet
$row->site_internet = array();
foreach ($xml->xpath('SITE_INTERNET') as $xml_site){
$row->site_internet[] = trim($this->getAttribute($xml_site, 'URL'));
}
#images
$images = array();
$titles = array();
$alts = array();
//drush_log(dt('start images import : !images', array('!images'=>count($xml->IMAGE_CONSULTABLE))), 'status');
foreach ($xml->IMAGE_CONSULTABLE as $xml_image) { //IMAGE_CONSULTABLE
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
}
$row->images = $images;
$row->images_title = $titles;
$row->images_alt = $alts;
}
// public function prepare($node, stdClass $row) {
// // $xml = $row->xml;
// }
public function complete($node, stdClass $row){
$xml = $row->xml;
# images
# this script only update title and alt field of image files that already exists
# but i sa that some files are missing after the first import …
// $delta = 0;
// foreach ($xml->IMAGE_CONSULTABLE as $xml_image) { //IMAGE_CONSULTABLE
// if(isset($node->field_images['und'][$delta])){
// $node->field_images['und'][$delta]['title'] = $this->getAttribute($xml_image, 'TITLE');
// $node->field_images['und'][$delta]['alt'] = $this->getAttribute($xml_image, 'ALT');
// }
// $delta ++;
// }
# personnes
$this->recordGroup($node, 'field_concepteur', $xml, 'CONCEPTEUR');
$this->recordGroup($node, 'field_executant',$xml, 'EXECUTANT');
$this->recordGroup($node, 'field_organisateur', $xml, 'ORGANISATEUR');
$this->recordGroup($node, 'field_temoin', $xml, 'TEMOIN');
node_save($node);
# personnes
$this->updatePersonneTerms($xml);
}
}
@@ -0,0 +1,109 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
abstract class PerfDNodeMigration extends PerfApiMigration {
public function __construct() {
$this->description = t('Migrate Document Sonore Class');
parent::__construct();
$this->fields += array(
'ID' => t('id'),
'title' => t('title'),
'synopsis_description' => t('SYNOPSIS_DESCRIPTION'),
'duree' => t('duree'),
'proprietaire' => t('proprietaire'),
'realisateur' => t('realisateur'),
'date_realisation' => t('date_realisation'),
'production' => t('production'),
'notes' => t('notes'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($this->items_url, $this->item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $this->fields);
$this->addFieldMapping('language')->defaultValue('fr');
$this->addFieldMapping('is_new')->defaultValue(TRUE);
// $this->addFieldMapping('created', 'date_creation');
// $this->addFieldMapping('changed', 'date_modif');
$this->addFieldMapping('status')->defaultValue(1);
$this->addFieldMapping('promote')->defaultValue(0);
$this->addFieldMapping('sticky')->defaultValue(0);
$this->addFieldMapping('title', 'title');
$this->addFieldMapping('field_duree', 'duree');
$this->addFieldMapping('field_synopsis_description', 'synopsis_description')
->xpath('@SYNOPSIS_DESCRIPTION');
$this->addFieldMapping('field_synopsis_description:format')->defaultValue('filtred_html');
$this->addFieldMapping('field_proprietaire', 'proprietaire')
->xpath('@ID_PROPRIETAIRE_OBJET');
$this->addFieldMapping('field_realisateur', 'realisateur')
->xpath('@REALISATEUR');
$this->addFieldMapping('field_date_realisation', 'date_realisation')
->xpath('@DATE_REALISATION');
$this->addFieldMapping('field_production', 'production')
->xpath('@PRODUCTION');
$this->addFieldMapping('field_notes', 'notes')
->xpath('@NOTES');
$this->addUnmigratedDestinations(array('revision_uid', 'created', 'changed', 'revision', 'log', 'tnid','comment', 'uid','path', 'pathauto',
'field_duree:format', 'field_duree:language',
'field_synopsis_description:language',
'field_proprietaire:language', 'field_proprietaire:format',
'field_realisateur:language', 'field_realisateur:format',
'field_date_realisation:language', 'field_date_realisation:format',
'field_production:language', 'field_production:format',
'field_notes:language', 'field_notes:format',
'field_performances'
));
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
$title = $this->getAttribute($xml, 'TITRE');
if(strlen($title) > 255)
$title = substr($title, 0, 250) . '...';
$row->title = $title;
$row->duree = $this->getAttribute($xml, 'DUREE') .' '. $this->getAttribute($xml, 'UNITE_DUREE');
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
}
}
@@ -0,0 +1,41 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDimpNodeMigration extends PerfDocsNodeMigration {
public function __construct() {
$this->description = t('Migrate Document Imprimé Class');
$this->fields = array(
'fichier_pdf' => t('fichier_pdf'),
);
$this->itemsfile = 'baseperf-dimps.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_IMPRIME'; // relative to document
parent::__construct();
$this->addFieldMapping('field_type')->defaultValue('imprime');
$this->addFieldMapping('field_fichier_pdf', 'fichier_pdf')
->xpath('@FICHIER_PDF');
$this->addUnmigratedDestinations(array(
'field_fichier_pdf:language', 'field_fichier_pdf:format',
// 'field_resume_retranscription', 'field_resume_retranscription:format', 'field_resume_retranscription:language',
));
}
// public function prepareRow($row){
// // $xml = $row->xml;
// parent::prepareRow($row);
//
//
// }
}
@@ -0,0 +1,25 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDimpNodeUpdateMigration extends PerfDocsNodeUpdateMigration {
public function __construct() {
$this->description = t('Migrate Document Imprimé Update Class');
$this->fields = array();
$this->itemsfile = 'baseperf-dimps.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_IMPRIME'; // relative to document
parent::__construct();
$this->addFieldMapping('nid', 'ID')
->sourceMigration('PerfDimpNode');
}
}
@@ -0,0 +1,35 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDmanuNodeMigration extends PerfDocsNodeMigration {
public function __construct() {
$this->description = t('Migrate Document Manuel Class');
$this->fields = array();
$this->itemsfile = 'baseperf-dmanus.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_MANUSCRITS'; // relative to document
parent::__construct();
$this->addFieldMapping('field_type')->defaultValue('manuscrit');
// $this->addUnmigratedDestinations(array());
}
// public function prepareRow($row){
// // $xml = $row->xml;
// parent::prepareRow($row);
//
//
// }
public function prepare($node, stdClass $row) {
parent::prepare($node, $row);
// dsm($node);
}
}
@@ -0,0 +1,24 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDmanuNodeUpdateMigration extends PerfDocsNodeUpdateMigration {
public function __construct() {
$this->description = t('Update Document Manuel Class');
$this->fields = array();
$this->itemsfile = 'baseperf-dmanus.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_MANUSCRITS'; // relative to document
parent::__construct();
$this->addFieldMapping('nid', 'ID')
->sourceMigration('PerfDmanuNode');
}
}
@@ -0,0 +1,133 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
abstract class PerfDocsNodeMigration extends PerfApiMigration {
public function __construct() {
parent::__construct();
$this->fields += array(
'ID' => t('id'),
'title' => t('title'),
'technique_description' => t('technique_description'),
'dimensions' => t('dimensions'),
'proprietaire' => t('proprietaire'),
'images' => t('images'),
'images_title' => t('images title'),
'images_alt' => t('images alt'),
'serie' => t('serie'),
'notes' => t('notes'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . $this->itemsfile;
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $this->item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $this->fields);
$this->destination = new MigrateDestinationNode('document');
$this->addFieldMapping('language')->defaultValue('fr');
$this->addFieldMapping('is_new')->defaultValue(TRUE);
// $this->addFieldMapping('created', 'date_creation');
// $this->addFieldMapping('changed', 'date_modif');
$this->addFieldMapping('status')->defaultValue(1);
$this->addFieldMapping('promote')->defaultValue(0);
$this->addFieldMapping('sticky')->defaultValue(0);
$this->addFieldMapping('title', 'title');
$this->addFieldMapping('field_technique_description', 'technique_description')
->xpath('@TECHNIQUE_DESCRIPTION_REFERENCE');
$this->addFieldMapping('field_dimensions', 'dimensions')
->xpath('@DIMENSIONS_OBJET');
$this->addFieldMapping('field_proprietaire', 'proprietaire')
->xpath('@ID_PROPRIETAIRE_OBJET');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
# serie
$this->addFieldMapping('field_serie', 'serie')
->xpath('@SERIE');
$this->addFieldMapping('field_serie:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_notes', 'notes')
->xpath('@NOTES');
$this->addUnmigratedDestinations(array('revision_uid', 'created', 'changed', 'revision', 'log', 'tnid','comment', 'uid','path', 'pathauto',
'field_technique_description:language', 'field_technique_description:format',
'field_dimensions:language', 'field_dimensions:format',
'field_proprietaire:language', 'field_proprietaire:format',
'field_images:file_class', 'field_images:language', 'field_images:destination_dir', 'field_images:destination_file', 'field_images:file_replace', 'field_images:preserve_files',
// 'field_images:title', 'field_images:alt',
'field_serie:source_type',
'field_notes:language', 'field_notes:format',
'field_performances',
));
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
$title = $this->getAttribute($xml, 'TITRE');
if(strlen($title) > 255)
$title = substr($title, 0, 250) . '...';
$row->title = $title;
#images
$images = array();
$titles = array();
$alts = array();
$i = 0;
foreach ($xml->xpath('IMAGE_CONSULTABLE') as $xml_image) {
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
$i++;
}
$row->images = $images;
$row->images_title = $titles;
$row->images_alt = $alts;
// dsm($row->images, '$row->images');
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
}
}
@@ -0,0 +1,81 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
abstract class PerfDocsNodeUpdateMigration extends PerfApiMigration {
public function __construct() {
parent::__construct();
$this->systemOfRecord = Migration::DESTINATION;
$this->fields += array(
'ID' => t('id'),
'images' => t('images'),
'images_title' => t('images title'),
'images_alt' => t('images alt'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . $this->itemsfile;
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $this->item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $this->fields);
$this->destination = new MigrateDestinationNode('document');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
$this->addFieldMapping('field_images:file_replace')->defaultValue(FILE_EXISTS_REPLACE);
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
#images
$images = array();
$titles = array();
$alts = array();
foreach ($xml->xpath('IMAGE_CONSULTABLE') as $xml_image) {
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
}
$row->images = $images;
$row->images_title = $titles;
$row->images_alt = $alts;
}
// public function prepare($node, stdClass $row) {
// }
}
@@ -0,0 +1,45 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDpressNodeMigration extends PerfDocsNodeMigration {
public function __construct() {
$this->description = t('Migrate Document Presse Class');
$this->fields = array(
'fichier_pdf' => t('fichier_pdf'),
'resume_retranscription' => t('resume_retranscription'),
);
$this->itemsfile = 'baseperf-dpress.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_PRESSE'; // relative to document
parent::__construct();
$this->addFieldMapping('field_type')->defaultValue('presse');
$this->addFieldMapping('field_fichier_pdf', 'fichier_pdf')
->xpath('@FICHIER_PDF');
$this->addFieldMapping('field_resume_retranscription', 'fichier_pdf')
->xpath('@RESUME_RETRANSCRIPTION');
$this->addFieldMapping('field_resume_retranscription:format')->defaultValue('filtred_html');
$this->addUnmigratedDestinations(array(
'field_fichier_pdf:language', 'field_fichier_pdf:format',
'field_resume_retranscription:language',
));
}
// public function prepareRow($row){
// // $xml = $row->xml;
// parent::prepareRow($row);
//
//
// }
}
@@ -0,0 +1,31 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDpressNodeUpdateMigration extends PerfDocsNodeUpdateMigration {
public function __construct() {
$this->description = t('Migrate Document Presse Class');
$this->fields = array();
$this->itemsfile = 'baseperf-dpress.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_PRESSE'; // relative to document
parent::__construct();
$this->addFieldMapping('nid', 'ID')
->sourceMigration('PerfDpressNode');
}
// public function prepareRow($row){
// // $xml = $row->xml;
// parent::prepareRow($row);
//
//
// }
}
@@ -0,0 +1,42 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDsonsNodeMigration extends PerfDNodeMigration {
public function __construct() {
$this->description = t('Migrate Document Sonore Class');
$this->fields = array(
'support' => t('support'),
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$this->items_url = $xml_folder . 'baseperf-dsons.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_SONORE'; // relative to document
$this->destination = new MigrateDestinationNode('document_sonor');
parent::__construct();
$this->addFieldMapping('field_support', 'support')
->xpath('@SUPPORT');
$this->addUnmigratedDestinations(array('field_support:language', 'field_support:format'));
}
public function prepareRow($row){
parent::prepareRow($row);
}
public function prepare($node, stdClass $row) {
parent::prepare($node, $row);
}
}
@@ -0,0 +1,52 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDvidsNodeMigration extends PerfDNodeMigration {
public function __construct() {
$this->description = t('Migrate Document Video Class');
$this->fields = array(
'fichiers' => t('fichiers'),
'etat_conservation' => t('etat_conservation'),
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$this->items_url = $xml_folder . 'baseperf-dvids.xml';
$this->item_xpath = '/ROOT/ITEMS/DOC_AUDIOVISUEL'; // relative to document
$this->destination = new MigrateDestinationNode('document_video');
parent::__construct();
$this->addFieldMapping('field_etat_de_conservation', 'etat_conservation')
->xpath('@ETAT_CONSERVATION');
$this->addFieldMapping('field_fichiers', 'fichiers');
$this->addUnmigratedDestinations(array(
'field_etat_de_conservation:language', 'field_etat_de_conservation:format',
'field_fichiers:language', 'field_fichiers:format',
));
}
public function prepareRow($row){
parent::prepareRow($row);
$xml = $row->xml;
$row->fichiers .= "\n".'Fichier MP4 : '.$this->getAttribute($xml, 'FICHIER_MP4');
$row->fichiers .= "\n".'Fichier FLV : '.$this->getAttribute($xml, 'FICHIER_FLV');
}
public function prepare($node, stdClass $row) {
parent::prepare($node, $row);
}
}
@@ -0,0 +1,24 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfDvidsVimeoMigration extends PerfDNodeMigration {
public function __construct() {
}
public function prepareRow($row){
}
public function prepare($node, stdClass $row) {
}
}
@@ -0,0 +1,23 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfGroupeNodeMigration extends PerfBasicMigration {
public function __construct() {
$this->item_xpath = '/RACINE/ARBRE/INITIALE/GROUPE/PERFORMANCE'; // relative to document
parent::__construct();
$this->description = t('XML feed of groupe of performances');
// $this->dependencies = array('WineRegion', 'WineUser');
}
// public function prepareRow($row){
// parent::prepareRow($row);
// }
}
@@ -0,0 +1,26 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfGroupeNodeUpdateMigration extends PerfBasicUpdateMigration {
public function __construct() {
$this->item_xpath = '/RACINE/ARBRE/INITIALE/GROUPE/PERFORMANCE'; // relative to document
parent::__construct();
$this->description = t('XML feed of groupe of performances');
// $this->dependencies = array('WineRegion', 'WineUser');
$this->addFieldMapping('nid', 'treeline_id')
->sourceMigration('PerfGroupeNode');
}
// public function prepareRow($row){
// parent::prepareRow($row);
// }
}
@@ -0,0 +1,54 @@
name = PerfMigrate
description = "The description of this module"
; Core version (required)
core = 7.x
; Package name (see http://drupal.org/node/542202 for a list of names)
; package =
; PHP version requirement (optional)
; php = 5.2
; Loadable code files
files[] = PerfMigrate.module
files[] = PerfMigrate.api.inc
files[] = PerfMigrate.basic.inc
files[] = PerfMigrate.performance.inc
files[] = PerfMigrate.groupe.inc
files[] = PerfMigrate.ldcs.inc
files[] = PerfMigrate.d.inc
files[] = PerfMigrate.dvids.inc
files[] = PerfMigrate.dsons.inc
files[] = PerfMigrate.docs.inc
files[] = PerfMigrate.dimp.inc
files[] = PerfMigrate.dpresse.inc
files[] = PerfMigrate.dmanu.inc
files[] = PerfMigrate.objet.inc
; files[] = PerfMigrate.dvidsVimeo.inc
files[] = PerfMigrate.basic_update.inc
files[] = PerfMigrate.performance_update.inc
files[] = PerfMigrate.groupe_update.inc
files[] = PerfMigrate.ldcs_update.inc
;files[] = PerfMigrate.d.inc
;files[] = PerfMigrate.dvids.inc
;files[] = PerfMigrate.dsons.inc
files[] = PerfMigrate.docs_update.inc
files[] = PerfMigrate.dimp_update.inc
files[] = PerfMigrate.dpresse_update.inc
files[] = PerfMigrate.dmanu_update.inc
files[] = PerfMigrate.objet_update.inc
; Module dependencies
dependencies[] = migrate
dependencies[] = migrate_extras
; dependencies[] = anothermodule (>=2.4)
; dependencies[] = views (3.x)
; Configuration page
; configure = admin/config/PerfMigration
; For further information about configuration options, see
; - http://drupal.org/node/542202
@@ -0,0 +1,233 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfLDCNodeMigration extends PerfApiMigration {
public function __construct() {
$this->description = t('Migrate Lieu Date Contexte (effectuation) Class');
parent::__construct();
$fields = array(
'language' => t('Lanuguage'),
'ID' => t('id'),
'title' => t('title'),
'structure_organisatrice' => t('Structure organisatrice'), // STRUCTURE_ORGANISATRICE
'topologie' => t('Topologie'),
'date_de_debut' => t('date debut'),
'date_de_fin' => t('date fin'),
'duree' => t('duree'), //'UNITE_DUREE' => t('UNITE_DUREE'),
'contexte' => t('contexte'), // CONTEXTE- TRADUCTION_CONTEXTE
'lieu' => t('lieu'),
'adresse' => t('adresse'),
'precision'=> t('precision'),
'ville' => t('ville'),
'pays' => t('pays'),
'executant'=> t('executant'),
'concepteur'=> t('concepteur'),
'organisateur'=> t('organisateur'),
'notes' => t('notes'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-ldcs.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_xpath = '/ROOT/ITEMS/LIEU_DATE_CONTEXTE'; // relative to document
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('effectuation');
$this->addFieldMapping('language')->defaultValue('fr');
$this->addFieldMapping('is_new')->defaultValue(TRUE);
// $this->addFieldMapping('created', 'date_creation');
// $this->addFieldMapping('changed', 'date_modif');
$this->addFieldMapping('status')->defaultValue(1);
$this->addFieldMapping('promote')->defaultValue(0);
$this->addFieldMapping('sticky')->defaultValue(0);
$this->addFieldMapping('title', 'title');
# temps
$this->addFieldMapping('field_date_de_debut', 'date_de_debut');
$this->addFieldMapping('field_date_de_fin', 'date_de_fin');
$this->addFieldMapping('field_duree', 'duree');
# lieu
$this->addFieldMapping('field_lieu', 'lieu')
->xpath('@NOM_LIEU');
$this->addFieldMapping('field_lieu:create_term')->defaultValue(TRUE);
# topologie
$this->addFieldMapping('field_topologie', 'topologie')
->xpath('@TYPE');
$this->addFieldMapping('field_topologie:create_term')->defaultValue(TRUE);
# structure_organisatrice
$this->addFieldMapping('field_structure', 'structure_organisatrice');
$this->addFieldMapping('field_structure:create_term')->defaultValue(TRUE);
# contexte
$this->addFieldMapping('field_contexte', 'contexte');
$this->addFieldMapping('field_contexte:format')->defaultValue('filtred_html');
$this->addFieldMapping('field_contexte:language', 'language');
# personnes
$this->addFieldMapping('field_concepteur', 'concepteur');
$this->addFieldMapping('field_concepteur:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_executant', 'executant');
$this->addFieldMapping('field_executant:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_organisateur', 'organisateur');
$this->addFieldMapping('field_organisateur:create_term')->defaultValue(TRUE);
# note
$this->addFieldMapping('field_note', 'notes')
->xpath('@NOTES');
# addresse
// $this->addFieldMapping('field_precision', 'precision')
// ->xpath('@PRECISION');
// $this->addFieldMapping('field_precision:format')->defaultValue('filtred_html');
// $this->addFieldMapping('field_precision:language')->defaultValue('fr');
$arguments = array(
'thoroughfare' => array('source_field' => 'adresse'),
'premise' => array('source_field' => 'precision'),
// 'sub_premise' => array('source_field' => 'sub_premise'),
'locality' => array('source_field' => 'ville'),
// 'postal_code' => array('source_field' => 'zip'),
);
$this->addFieldMapping('field_address', 'pays')
->arguments($arguments);
$this->addFieldMapping(NULL, 'adresse');
$this->addFieldMapping(NULL, 'precision');
$this->addFieldMapping(NULL, 'ville');
$this->addUnmigratedDestinations(array('revision_uid', 'created', 'changed', 'revision', 'log', 'tnid','comment', 'uid','path', 'pathauto',
'field_date_de_debut:format', 'field_date_de_debut:language', 'field_date_de_fin:format', 'field_date_de_fin:language',
'field_dure:format', 'field_dure:language',
'field_lieu:source_type', 'field_topologie:source_type', 'field_structure:source_type',
'field_concepteur:source_type','field_executant:source_type','field_organisateur:source_type',
'field_note:format', "field_note:language",
));
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
$row->language = array('fr', 'en');
$title = $this->getAttribute($xml, 'TITLE');
if(strlen($title) > 255)
$title = substr($title, 0, 250) . '...';
$row->title = $title;
# temps
$row->date_de_debut = $this->getDate($xml, 'DEBUT');
$row->date_de_fin = $this->getDate($xml, 'FIN');
$row->duree = $this->getAttribute($xml, 'DUREE') .' '. $this->getAttribute($xml, 'UNITE_DUREE');
# espace
$row->lieu = $this->getAttribute($xml, 'NOM_LIEU');
# structure
$structure = array();
foreach ($xml->xpath('STRUCTURE_ORGANISATRICE') as $xml_strucrture)
$structure[] = $this->getAttribute($xml_strucrture, 'NOM');
$row->structure_organisatrice = $structure;
# contexte
$row->contexte = array(
$this->getAttribute($xml, "CONTEXTE"),
$this->getAttribute($xml, "TRADUCTION_CONTEXTE"),
);
# personnes
$concepteurs = array();
foreach ($xml->xpath('PERSONNE[@CONCEPTEUR="oui"]') as $xml_concepteur)
$concepteurs[] = $this->getPersonne($xml_concepteur);
$row->concepteur = $concepteurs;
$executants = array();
foreach ($xml->xpath('PERSONNE[@EXECUTANT="oui"]') as $xml_executant)
$executants[] = $this->getPersonne($xml_executant);
$row->executant = $executants;
$organisateurs = array();
foreach ($xml->xpath('PERSONNE[@ORGANISATEUR="oui"]') as $xml_organisateur)
$organisateurs[] = $this->getPersonne($xml_organisateur);
$row->organisateur = $organisateurs;
#address
$row->adresse = $this->getAttribute($xml, 'ADRESSE');
$row->precision = $this->getAttribute($xml, 'PRECISION');
$row->ville = $this->getAttribute($xml, 'VILLE');
$pays = $this->getAttribute($xml, 'PAYS');
if($pays == 'France' || $pays == 'france' || $pays = ''){
$pays = 'FR';
}else if($pays == 'Allemagne' || $pays == 'RFA'){
$pays = 'DE';
}else if($pays == 'Monaco' || $pays == "Principauté de Monaco"){
$pays = 'MC';
}else if($pays == 'Canada'){
$pays = 'CA';
}else if($pays == 'Italie'){
$pays = 'IT';
}else if($pays == 'USA'){
$pays = 'US';
}else{
// dsm($pays, '$pays');
$pays = '';
}
$row->pays = $pays;
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
$node->language = 'fr';
}
}
@@ -0,0 +1,86 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfLDCNodeUpdateMigration extends PerfApiMigration {
public function __construct() {
$this->description = t('Update Lieu Date Contexte (effectuation) Class');
parent::__construct();
$this->systemOfRecord = Migration::DESTINATION;
$fields = array(
'ID' => t('id'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-ldcs.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_xpath = '/ROOT/ITEMS/LIEU_DATE_CONTEXTE'; // relative to document
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('effectuation');
$this->addFieldMapping('nid', 'ID')
->sourceMigration('PerfLDCNode');
}
public function prepareRow($row){
}
public function prepare($node, stdClass $row) {
}
public function complete($node, stdClass $row){
$xml = $row->xml;
# personnes
$this->recordGroup($node, 'field_concepteur', $xml, 'CONCEPTEUR');
$this->recordGroup($node, 'field_executant',$xml, 'EXECUTANT');
$this->recordGroup($node, 'field_organisateur', $xml, 'ORGANISATEUR');
$this->recordGroup($node, 'field_temoin', $xml, 'TEMOIN');
node_save($node);
# personnes
$this->updatePersonneTerms($xml);
}
}
@@ -0,0 +1,51 @@
<?php
/**
* @file
* This is the file description for PerfMigration module.
*
* In this more verbose, multi-line description, you can specify what this
* file does exactly. Make sure to wrap your documentation in column 78 so
* that the file can be displayed nicely in default-sized consoles.
*/
/**
* Implements hook_menu().
*/
// function PerfMigrate_menu() {
// $items = array();
//
// // Type '$item ⇥' to create a new menu item.
//
// return $items;
// }
/**
* You must implement hook_migrate_api(), setting the API level to 2, for
* your migration classes to be recognized by the Migrate module (for the 7.x-2.x branch).
*/
function PerfMigrate_migrate_api() {
$api = array(
'api' => 2,
'migrations' => array(
'PerfPerformanceNode' => array('class_name' => 'PerfPerformanceNodeMigration'),
'PerfGroupeNode' => array('class_name' => 'PerfGroupeNodeMigration'),
'PerfLDCNode' => array('class_name' => 'PerfLDCNodeMigration'),
'PerfDimpNode' => array('class_name' => 'PerfDimpNodeMigration'),
'PerfDmanuNode' => array('class_name' => 'PerfDmanuNodeMigration'),
'PerfDpressNode' => array('class_name' => 'PerfDpressNodeMigration'),
'PerfDsonsNode' => array('class_name' => 'PerfDsonsNodeMigration'),
'PerfDvidsNode' => array('class_name' => 'PerfDvidsNodeMigration'),
'PerfObjetNode' => array('class_name' => 'PerfObjetNodeMigration'),
// updates
'PerfPerformanceUpdateNode' => array('class_name' => 'PerfPerformanceUpdateNodeMigration'),
'PerfGroupeNodeUpdate' => array('class_name' => 'PerfGroupeNodeUpdateMigration'),
'PerfLDCNodeUpdate' => array('class_name' => 'PerfLDCNodeUpdateMigration'),
'PerfDimpNodeUpdate' => array('class_name' => 'PerfDimpNodeUpdateMigration'),
'PerfDmanuNodeUpdate' => array('class_name' => 'PerfDmanuNodeUpdateMigration'),
'PerfDpressNodeUpdate' => array('class_name' => 'PerfDpressNodeUpdateMigration'),
'PerfObjetNodeUpdate' => array('class_name' => 'PerfObjetNodeUpdateMigration'),
)
);
return $api;
}
@@ -0,0 +1,143 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfObjetNodeMigration extends PerfApiMigration {
public function __construct() {
$this->description = t('Migrate Objects Class');
parent::__construct();
$fields = array(
'ID' => t('id'),
'title' => t('title'),
'technique_description' => t('technique_description'),
'dimensions' => t('dimensions'),
'proprietaire' => t('proprietaire'),
'images' => t('images'),
'images_title' => t('images title'),
'images_alt' => t('images alt'),
'serie' => t('serie'),
'notes' => t('notes'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-objets.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_xpath = '/ROOT/ITEMS/OBJET'; // relative to document
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('object');
$this->addFieldMapping('language')->defaultValue('fr');
$this->addFieldMapping('is_new')->defaultValue(TRUE);
// $this->addFieldMapping('created', 'date_creation');
// $this->addFieldMapping('changed', 'date_modif');
$this->addFieldMapping('status')->defaultValue(1);
$this->addFieldMapping('promote')->defaultValue(0);
$this->addFieldMapping('sticky')->defaultValue(0);
$this->addFieldMapping('title', 'title');
$this->addFieldMapping('field_technique_description', 'technique_description')
->xpath('@TECHNIQUE_DESCRIPTION_REFERENCE');
$this->addFieldMapping('field_dimensions', 'dimensions')
->xpath('@DIMENSIONS_OBJET');
$this->addFieldMapping('field_proprietaire', 'proprietaire')
->xpath('@ID_PROPRIETAIRE_OBJET');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
# serie
$this->addFieldMapping('field_serie', 'serie')
->xpath('@SERIE');
$this->addFieldMapping('field_serie:create_term')->defaultValue(TRUE);
$this->addFieldMapping('field_notes', 'notes')
->xpath('@NOTES');
$this->addUnmigratedDestinations(array('revision_uid', 'created', 'changed', 'revision', 'log', 'tnid','comment', 'uid','path', 'pathauto',
'field_technique_description:language', 'field_technique_description:format',
'field_dimensions:language', 'field_dimensions:format',
'field_proprietaire:language', 'field_proprietaire:format',
'field_images:file_class', 'field_images:language', 'field_images:destination_dir', 'field_images:destination_file', 'field_images:file_replace', 'field_images:preserve_files',
// 'field_images:title', 'field_images:alt',
'field_serie:source_type',
'field_notes:language', 'field_notes:format',
'field_performances'
));
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
$title = $this->getAttribute($xml, 'TITRE');
if(strlen($title) > 255)
$title = substr($title, 0, 250) . '...';
$row->title = $title;
#images
$images = array();
$titles = array();
$alts = array();
$i = 0;
foreach ($xml->xpath('IMAGE_CONSULTABLE') as $xml_image) {
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
$i++;
}
$row->images = $images;
// $row->images_title = $alt;
// $row->images_alt = $titles;
// dsm($row->images, '$row->images');
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
}
}
@@ -0,0 +1,97 @@
<?php
/**
* PerfGroupeNodeMigration
*
*/
class PerfObjetNodeUpdateMigration extends PerfApiMigration {
public function __construct() {
$this->description = t('Update Objects Class');
parent::__construct();
$this->systemOfRecord = Migration::DESTINATION;
$fields = array(
'ID' => t('id'),
'images' => t('images'),
'images_title' => t('images title'),
'images_alt' => t('images alt'),
);
// The source ID here is the one retrieved from the XML listing file, and
// used to identify the specific item's file
$this->map = new MigrateSQLMap($this->machineName,
array(
'ID' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
)
),
MigrateDestinationNode::getKeySchema()
);
// This can also be an URL instead of a file path.
$xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
$items_url = $xml_folder . 'baseperf-objets.xml';
// We use the MigrateSourceMultiItems class for any source where we obtain the list
// of IDs to process and the data for each item from the same file. Typically the data
// for an item is not contained in a single line within the source file. Examples include
// multiple items defined in a single xml file or a single json file where in both cases
// the id is part of the item.
$item_xpath = '/ROOT/ITEMS/OBJET'; // relative to document
$item_ID_xpath = '@ID'; // relative to item_xpath and gets assembled
// into full path /producers/producer/sourceid
$items_class = new MigrateItemsXML($items_url, $item_xpath, $item_ID_xpath); //
$this->source = new MigrateSourceMultiItems($items_class, $fields);
$this->destination = new MigrateDestinationNode('object');
$this->addFieldMapping('nid', 'ID')
->sourceMigration('PerfObjetNode');
#images
$this->addFieldMapping('field_images', 'images');
$this->addFieldMapping('field_images:source_dir')->defaultValue('public://SRC_IMAGES');
$this->addFieldMapping('field_images:file_replace')->defaultValue(FILE_EXISTS_REPLACE);
$this->addFieldMapping('field_images:title', 'images_title');
$this->addFieldMapping('field_images:alt', 'images_alt');
}
public function prepareRow($row){
// dsm($row , '--- $row ---');
$xml = $row->xml;
#images
$images = array();
$titles = array();
$alts = array();
foreach ($xml->xpath('IMAGE_CONSULTABLE') as $xml_image) {
$images[] = $this->getAttribute($xml_image, 'SRC');
$alts[] = $this->getAttribute($xml_image, 'ALT');
$titles[] = $this->getAttribute($xml_image, 'TITLE');
}
$row->images = $images;
$row->images_title = $titles;
$row->images_alt = $alts;
}
public function prepare($node, stdClass $row) {
$node->name = 'migration';
$node->workflow = 2;
}
}
@@ -0,0 +1,22 @@
<?php
/**
* MaterioMateriauNodeMigration
*
*/
class PerfPerformanceNodeMigration extends PerfBasicMigration {
public function __construct() {
$this->item_xpath = '/RACINE/ARBRE/INITIALE/PERFORMANCE'; // relative to document
parent::__construct();
$this->description = t('XML feed of performances');
// $this->dependencies = array('WineRegion', 'WineUser');
}
// public function prepareRow($row){
// parent::prepareRow($row);
// }
}
@@ -0,0 +1,25 @@
<?php
/**
* MaterioMateriauNodeMigration
*
*/
class PerfPerformanceUpdateNodeMigration extends PerfBasicUpdateMigration {
public function __construct() {
$this->item_xpath = '/RACINE/ARBRE/INITIALE/PERFORMANCE'; // relative to document
parent::__construct();
$this->description = t('XML feed of performances');
// $this->dependencies = array('WineRegion', 'WineUser');
$this->addFieldMapping('nid', 'treeline_id')
->sourceMigration('PerfPerformanceNode');
}
// public function prepareRow($row){
// parent::prepareRow($row);
// }
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
name = Contents admin relink
description = "Relink admin/content and admin/content/node with the path of your choice (a view for example)"
; Core version (required)
core = 7.x
; Package name (see http://drupal.org/node/542202 for a list of names)
; package =
; PHP version requirement (optional)
; php = 5.2
; Loadable code files
; files[] = contentsadminrelink.module
; files[] = contentsadminrelink.admin.inc
; files[] = contentsadminrelink.class.inc
; Module dependencies
; dependencies[] = mymodule
; dependencies[] = theirmodule (1.2)
; dependencies[] = anothermodule (>=2.4)
; dependencies[] = views (3.x)
; Configuration page
; configure = admin/config/contentsadminrelink
; For further information about configuration options, see
; - http://drupal.org/node/542202
@@ -0,0 +1,90 @@
<?php
/**
* @file
* This is the file description for Contentsadminrelink module.
*
* In this more verbose, multi-line description, you can specify what this
* file does exactly. Make sure to wrap your documentation in column 78 so
* that the file can be displayed nicely in default-sized consoles.
*/
/**
* Implements hook_menu().
*/
function contentsadminrelink_menu() {
$items = array();
return $items;
}
/**
* Implements hook_url_outbound_alter().
*/
# useless, just play with perms and menu_alter
// function contentsadminrelink_url_outbound_alter(&$path, &$options, $original_path) {
// if ($path == 'admin/content' || $path == 'admin/content/node') {
// $path = 'admin/content/nodes';
// }
//}
/**
* Implements hook_permission().
*/
function contentsadminrelink_permission() {
return array(
'access core content overview' => array(
'title' => t('Access core content overview'),
// 'description' => t('Perform administration tasks for my module.'),
),
'access core media overview' => array(
'title' => t('Access classic media overview'),
// 'description' => t('Perform administration tasks for my module.'),
),
);
}
/**
* Implements hook_menu_alter().
*/
function contentsadminrelink_menu_alter(&$items) {
// dsm($items, '$items');
if(isset($items['admin/content']))
$items['admin/content']['access arguments'] = array('access core content overview');
if(isset($items['admin/content/node']))
$items['admin/content/node']['access arguments'] = array('access core content overview');
if(isset($items['admin/content/media']))
$items['admin/content/media']['access arguments'] = array('access classic media overview');
// dsm($items, '$items');
}
/**
* Implements hook_menu_local_tasks_alter().
*/
function contentsadminrelink_menu_local_tasks_alter(&$data, $router_item, $root_path) {
switch($root_path){
case 'admin/content/nodes' : // for example 'page/view/news'
$item = menu_get_item('node/add');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
break;
// case 'admin/content/medias' : // for example 'page/view/news'
// $item = menu_get_item('admin/content/media/import');
// if ($item['access']) {
// $data['actions']['output'][] = array(
// '#theme' => 'menu_local_action',
// '#link' => $item,
// );
// }
// break;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

+339
View File
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+62
View File
@@ -0,0 +1,62 @@
--- README -------------------------------------------------------------
EditMenu, Version 6.0
Written by Ted Serbinski, aka, m3avrck
hello@tedserbinski.com
http://tedserbinski.com
Requirements: Drupal 6.x
jQuery Superfish: http://users.tpg.com.au/j_birch/plugins/superfish/
--- INSTALLATION --------------------------------------------------------
1. Place editmenu folder in your modules directory
2. Enable "EditMenu" under administer > site building > modules
3. Enable access to "view editmenu" under administer > user management > access control
4. Configure menu to use under administer > site configuration > editmenu
--- CHANGELOG --------------------------------------------------------
6.0, 2008-xx-xx
----------------------
- compatible with Drupal 6.x
- Superfish 1.4.1
- separate superfish.js into own file
- remove devel links, since devel module links in 6.x can be moved to any menu now
5.0, 2008-Jan-26
----------------------
- #199224, fix display issues in IE6/7
- #200086, don't load non-existent custom.css file
- #195972, better default CSS to avoid conflicts with themes
- #199715, remove absolute positioning to improve theme and CSS attaching compatibility
- #199882, new options for controlling menu effects and timing
4.0, 2007-Nov-22
----------------------
- new CHANGELOG to keep track of changes
- #156256 upgrade to SuperFish 1.3
- upgrade to bgIframe 2.1.1 (for IE6 compatibility with forms)
- #136478 - fix Opera compatibility
- remove RTL option; this conflicts with other changes and is properly implemented in Drupal 6
- new option to select which theme to style EditMenu with, or provide a custom one
- #184051 - don't hardcode CSS, add class to body
- #180106 - fix missing translatable strings
- #144742 - don't show annoying anchor titles
- remove dependency on menu module, now works with menu module off
- new black & blue theme, design by Jeremy Caldwell (http://nerdliness.com/article/2007/11/01/editmenu-module-customizations)
- alter height of menu and rollover to fix gaps
@@ -0,0 +1,245 @@
<?php
/**
* @file
* Settings of the editmenu.
*/
/**
* EditMenu settings page.
*/
function editmenu_admin_settings() {
$editmenu_path = drupal_get_path('module', 'editmenu');
// menu selection
$form['default_menu'] = array(
'#type' => 'fieldset',
'#title' => t('Menu settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
if (module_exists('menu')) {
$form['default_menu']['editmenu_menu'] = array(
'#type' => 'select',
'#title' => t('Menu'),
'#options' => menu_parent_options(menu_get_menus(), array('mlid' => 0)), // return complete tree
'#default_value' => variable_get('editmenu_menu', 'management:0'),
'#description' => t('Select the menu to display.'),
'#weight' => -1,
);
}
$themes = file_scan_directory($editmenu_path . '/themes', '%.*%',
array('key' => 'filename', 'recurse' => FALSE));
$theme_selection = array('custom' => 'custom');
foreach ($themes as $name => $ignore) {
$theme_selection[$name] = $name;
}
$form['default_menu']['editmenu_theme'] = array(
'#type' => 'select',
'#title' => t('Theme'),
'#options' => $theme_selection,
'#default_value' => variable_get('editmenu_theme', 'original'),
'#description' => t('Select which theme to use. If you specify custom, you need to define CSS in your theme.'),
);
// standard settings
$form['settings'] = array(
'#type' => 'fieldset',
'#title' => t('Editmenu settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$fix_options = array(
'scroll' => t('Scroll with page'),
'top' => t('Fix at the Top (Forces Body, Prepend)'),
//'bottom' => t('Fix at the Bottom (Forces Body, Append)'), -- this requires another CSS... hmmm...
);
$form['settings']['editmenu_fix'] = array(
'#type' => 'radios',
'#title' => t('Scroll or fix menu'),
'#options' => $fix_options,
'#default_value' => variable_get('editmenu_fix', 'scroll'),
'#description' => t('Select the mode to use. The default is to let the menu scroll with the page.')
. '<br /><span style="color: red;">' . t('WARNING') . ':</span> '
. t('The At the Top option prevents you from ever seeing the bottom of your drop-down menus when they are too long. In other words, if you have many modules installed, it is not unlikely that some drop down menus will not fit the height of the screen and the last few entries won\'t be accessible via Editmenu.'),
);
$form['settings']['editmenu_hide_delay'] = array(
'#type' => 'textfield',
'#title' => t('Hide delay'),
'#size' => 4,
'#default_value' => variable_get('editmenu_hide_delay', 800),
'#description' => t('How long (in milliseconds) should a menu still appear after losing focus.'),
);
$form['settings']['editmenu_effect'] = array(
'#type' => 'radios',
'#title' => t('Show effect'),
'#options' => array(
'opacity' => t('Fade'),
'height' => t('Slide'),
'none' => t('None')
),
'#default_value' => variable_get('editmenu_effect', 'opacity'),
'#description' => t('The effect used when displaying a menu.'),
);
$form['settings']['editmenu_effect_speed'] = array(
'#type' => 'radios',
'#title' => t('Show speed'),
'#options' => array('slow' => t('Slow'), 'medium' => t('Medium'), 'fast' => t('Fast')),
'#default_value' => variable_get('editmenu_effect_speed', 'fast'),
'#description' => t('The speed of the effect, not used when "none" is set to show effect.'),
);
// advanced options
$form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['editmenu_uid1'] = array(
'#type' => 'checkbox',
'#title' => t('Show to User ID 1'),
'#description' => t('Check this option to enable editmenu for user 1 (superuser/administration). This is useful if you want to use a different menu (such as admin_menu) for the superuser/admin and editmenu for others.'),
'#default_value' => variable_get('editmenu_uid1', 1),
);
$superfish_js = file_scan_directory($editmenu_path, '%^superfish-[0-9.]*\.js$%',
array('key' => 'filename', 'recurse' => FALSE));
$superfish = array('custom' => 'custom or theme');
foreach ($superfish_js as $name => $ignore) {
$superfish[$name] = $name;
}
$form['advanced']['editmenu_superfish_version'] = array(
'#type' => 'select',
'#title' => t('SuperFish Version'),
'#options' => $superfish,
'#description' => t('Select which version of SuperFish you prefer using. The choice "custom or theme" means that Editmenu does not include one of its own version of Superfish. It is expected that another module or your theme does so already.'),
'#default_value' => variable_get('editmenu_superfish_version', 'superfish-1.4.1.js'),
);
$scope = array(
'header' => 'Header',
'footer' => 'Footer',
);
$form['advanced']['editmenu_menu_scope'] = array(
'#type' => 'select',
'#title' => t('Scope of editmenu variable'),
'#options' => $scope,
'#description' => t('By default, the <code>editmenu</code> variable is put in the footer (backward compatible.) It is possible to put it in the header instead.'),
'#default_value' => variable_get('editmenu_menu_scope', 'footer'),
);
$form['advanced']['editmenu_cache_menu'] = array(
'#type' => 'checkbox',
'#title' => t('Cache the editmenu variable'),
'#description' => t('The Editmenu now has the capability to cache the editmenu variable in a .js file. This accelerate the transfer by using the Browser cache.'),
'#default_value' => variable_get('editmenu_cache_menu', TRUE),
);
$form['advanced']['editmenu_menubar_zindex'] = array(
'#type' => 'textfield',
'#title' => t('Menubar CSS z-index value'),
'#description' => t('By default, the menubar CSS z-index is set to 9999. Some themes or other modules may require you to change this value. Use -1 to completely disable the z-index in the menubar. If this value is not set to -1, then the following z-index will not have any effect and can as well be set to -1.'),
'#default_value' => variable_get('editmenu_menubar_zindex', 9999),
);
$form['advanced']['editmenu_dropdown_zindex'] = array(
'#type' => 'textfield',
'#title' => t('Dropdown CSS z-index value'),
'#description' => t('By default, the dropdown CSS z-index is set to 9999. However, some themes and modules use an even larger z-index. For instance, the AddThis overlay is put at z-index 100,000 (although from my tests, it seems that they use a much higher z-index...). So if you want the Editmenu to appear over the AddThis pop-up, you want to use a z-index which is even larger (i.e. 2,000,000 [do not enter the commas!].) On the other hand, 9999 may be too large for your site. You can use a smaller number if that works better for you. Use -1 to not remove the z-index from your dropdown.'),
'#default_value' => variable_get('editmenu_dropdown_zindex', 9999),
);
$form['advanced']['editmenu_element'] = array(
'#type' => 'textfield',
'#title' => t('CSS selector to attach menu to'),
'#default_value' => variable_get('editmenu_element', 'body'),
'#description' => t('A valid CSS selector to attach the menu to. <em>Example: body, #primary, div.my-class</em>'),
'#required' => TRUE,
);
$form['advanced']['editmenu_element_method'] = array(
'#type' => 'radios',
'#title' => t('Attach method'),
'#options' => array(
'prepend' => t('Prepend'),
'append' => t('Append'),
'replace' => t('Replace'),
),
'#default_value' => variable_get('editmenu_element_method', 'prepend'),
'#description' => t('Choose how the menu should be attached to the above selector.<br /><span style="color: red;">WARNING:</span> The Replace option should only be used with a specialized theme that offers a tag that is to be replaced by the simple menu. Make sure you don\'t use that option with your body!'),
'#required' => TRUE,
);
// when someone has many themes, this list grows big!
$themes = list_themes();
$use_list = count($themes) > 15;
$form['advanced']['editmenu_exclusions'] = array(
'#type' => $use_list ? 'select' : 'checkboxes',
'#title' => t('Theme exclusions'),
'#options' => drupal_map_assoc(array_keys($themes)),
'#multiple' => $use_list,
'#default_value' => variable_get('editmenu_exclusions', array()),
'#description' => t('Select which themes to <strong>not</strong> display the menu. Use this when you have a theme that displays its own admin navigation.'),
);
$form['advanced']['editmenu_detect_popup'] = array(
'#type' => 'checkbox',
'#title' => t('Detect pop-up windows'),
'#default_value' => variable_get('editmenu_detect_popup', 1),
'#description' => t("Choose whether EditMenu should attempt to detect if it is inside of a pop-up window. If enabled, EditMenu will not display if it is inside of a pop-up window."),
);
$form['advanced']['editmenu_visibility_operator'] = array(
'#type' => 'radios',
'#title' => t('Show block on specific pages'),
'#default_value' => variable_get('editmenu_visibility_operator', 0),
'#options' => array(
0 => t('Show on every page except the listed pages.'),
1 => t('Show on only the listed pages.'),
),
);
$form['advanced']['editmenu_visibility_pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages'),
'#default_value' => variable_get('editmenu_visibility_pages', ''),
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.",
array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
'#wysiwyg' => FALSE,
);
$form['#validate'][] = 'editmenu_admin_settings_validate';
$form['#submit'][] = 'editmenu_admin_settings_submit';
return system_settings_form($form);
}
/**
* Verify that we have settings that are sensical.
*/
function editmenu_admin_settings_validate($form, &$form_state) {
$values = &$form_state['values'];
if ($values['editmenu_fix'] != 'scroll' && $values['editmenu_menubar_zindex'] < 1) {
form_set_error('editmenu_menubar_zindex', t('In order to use a Fix mode, you want to increase the menubar z-index value to 1 or more.'));
}
}
/**
* Handle some special cases.
*/
function editmenu_admin_settings_submit($form, $form_state) {
// make sure we regenerate the CSS file
variable_set('editmenu_css_filename', '');
}
// vim: ts=2 sw=2 et syntax=php
@@ -0,0 +1,64 @@
/* There is a version of this file commented in great detail for educational purposes here:
* http://users.tpg.com.au/j_birch/plugins/superfish/superfish.commented.css
*/
/*** ESSENTIAL STYLES ***/
#editmenu, #editmenu * {
margin: 0;
padding: 0;
list-style: none;
}
#editmenu {
line-height: 1.0;
position: relative;
/*position: fixed;
top: 0;*/
z-index: 9999;
}
#editmenu ul {
position: absolute;
top: -999em;
width: 14em;
font-size: 1em;
line-height: 1em;
}
#editmenu ul li,
#editmenu a {
width: 100%;
}
#editmenu li {
float: left;
position: relative;
z-index: 99;
}
#editmenu a {
display: block;
}
#editmenu li:hover ul,
ul#editmenu li.sfHover ul {
left: 0px;
top: 21px;
}
#editmenu li:hover li ul,
#editmenu li.sfHover li ul {
top: -999em;
}
#editmenu li li:hover ul,
ul#editmenu li li.sfHover ul {
left: 14em;
top: -1px;
}
.superfish li:hover ul,
.superfish li li:hover ul {
top: -999em;
}
@@ -0,0 +1,68 @@
/* There is a version of this file commented in great detail for educational purposes here:
* http://users.tpg.com.au/j_birch/plugins/superfish/superfish.commented.css
*/
/*** ESSENTIAL STYLES ***/
#editmenu, #editmenu * {
margin: 0;
padding: 0;
list-style: none;
}
#editmenu {
line-height: 1.0;
@FIX@
@MENUBAR_ZINDEX@
}
#editmenu ul {
position: absolute;
top: -999em;
width: 14em;
font-size: 1em;
line-height: 1em;
}
#editmenu ul li,
#editmenu a {
width: 100%;
}
#editmenu li {
float: left;
position: relative;
}
#editmenu a {
display: block;
}
#editmenu li ul {
@DROPDOWN_ZINDEX@
}
#editmenu li:hover ul,
ul#editmenu li.sfHover ul {
left: 0px;
top: 21px;
}
#editmenu li:hover li ul,
#editmenu li.sfHover li ul {
top: -999em;
}
#editmenu li li:hover ul,
ul#editmenu li li.sfHover ul {
left: 14em;
top: -1px;
}
.superfish li:hover ul,
.superfish li li:hover ul {
top: -999em;
}
/* vim: ts=2 sw=2 et syntax=css
*/
@@ -0,0 +1,20 @@
name = EditMenu
description = Displays a menu bar with drop down items. By default it appears at the top of the screen with the Navigation menu.
core = 7.x
package = Menu
files[] = editmenu.admin.inc
files[] = editmenu.install
files[] = editmenu.module
configure = admin/config/editmenu
; Normally aded by Drupal
version = "7.x-1.x-dev"
project = editmenu
datestamp = "1274876110"
; Information added by drupal.org packaging script on 2011-11-10
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1320887030"
@@ -0,0 +1,34 @@
<?php
/**
* @file
* EditMenu module installation file.
*/
/**
* Implements hook_uninstall().
*/
function editmenu_uninstall() {
// Get rid of the variables used by simple menu.
variable_del('editmenu_cache_menu');
variable_del('editmenu_css_error');
variable_del('editmenu_css_filename');
variable_del('editmenu_detect_popup');
variable_del('editmenu_dropdown_zindex');
variable_del('editmenu_effect');
variable_del('editmenu_effect_speed');
variable_del('editmenu_element');
variable_del('editmenu_element_method');
variable_del('editmenu_exclusions');
variable_del('editmenu_fix');
variable_del('editmenu_hide_delay');
variable_del('editmenu_menu');
variable_del('editmenu_menu_scope');
variable_del('editmenu_menubar_zindex');
variable_del('editmenu_running');
variable_del('editmenu_superfish_version');
variable_del('editmenu_theme');
variable_del('editmenu_uid1');
variable_del('editmenu_visibility_operator');
variable_del('editmenu_visibility_pages');
}
@@ -0,0 +1,79 @@
(function($){
Drupal.behaviors.editmenuAttach = {
attach: function(context, settings) {
// If detect pop-ups setting is enabled and we are in a pop-up window
if (settings.editmenu.detectPopup && window.opener) {
return;
}
if ($('body').hasClass('editmenu-enabled')) {
return;
}
$('body').addClass('editmenu-enabled');
// get the element to add the menu to
var element = settings.editmenu.element;
if ($(element).length == 0) {
// this happens when you open a pop-up or a different theme
// that does not have such an element or the named element
// just does not exist in the first place.
return;
}
var menu = $(editmenu);
switch (settings.editmenu.placement) {
case 'prepend':
$(menu).prependTo(element);
break;
case 'append':
$(menu).appendTo(element);
break;
case 'replace':
$(element).html(menu);
break;
}
var animation = {};
animation[settings.editmenu.effect] = 'toggle';
// Build menu
$(menu)
.find('#editmenu')
.superfish({
pathClass: 'current',
animation: animation,
delay: settings.editmenu.hideDelay,
speed: settings.editmenu.effectSpeed,
autoArrows: false
})
.find(">li:has(ul)")
.mouseover(function(){
$("ul", this).bgIframe();
})
.find("a")
.focus(function(){
$("ul", $(".nav>li:has(ul)")).bgIframe();
})
.end()
.end()
.find("a")
.removeAttr('title');
$('#editmenu').children('li.expanded').addClass('root');
}
};
})(jQuery);
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
* $Rev: 2447 $
*
* Version 2.1.1
*/
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);
@@ -0,0 +1,523 @@
<?php
/**
* @file
* Creates a editmenu.
*/
/**
* Implements hook_menu().
*/
function editmenu_menu() {
$items = array();
$items['admin/config/user-interface/editmenu'] = array(
'title' => 'EditMenu',
'description' => 'Select the menu to display.',
'page callback' => 'drupal_get_form',
'page arguments' => array('editmenu_admin_settings'),
'access arguments' => array('administer editmenu'),
'file' => 'editmenu.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
/**
* Is editmenu enabled for this page request?
*/
function editmenu_enabled() {
$enabled = &drupal_static(__FUNCTION__);
if (!isset($enabled)) {
global $theme;
$is_overlay = FALSE;
if (function_exists('overlay_get_mode')) {
$is_overlay = (overlay_get_mode() == 'child') ? TRUE : FALSE;
}
$exclusions = variable_get('editmenu_exclusions', array());
$enabled = (!isset($exclusions[$theme]) || !$exclusions[$theme])
&& user_access('view editmenu')
&& _editmenu_page_visibility()
&& _editmenu_superuser_active()
&& !$is_overlay;
}
return $enabled;
}
/**
* Implements hook_init().
*/
function editmenu_init() {
// do a simple access check here, since theme isn't available to check yet
if (editmenu_enabled()) {
_editmenu_add_menu();
_editmenu_add_css(); // basic CSS must be before _editmenu_add_theme()
_editmenu_add_theme();
_editmenu_add_js();
}
}
/** \brief Add the editmenu variable with the menu to be displayed.
*
* This function loads the menu to be displayed and transforms it so
* it works with superfish.
*
* If the cache version of the editmenu JavaScript string cannot be
* created, then it is sent inline whether or not the user asked for it
* to be sent inline.
*/
function _editmenu_add_menu() {
// XXX -- should we put that in the settings instead? why put it in its own variable?
$editmenu = 'var editmenu=' . drupal_json_encode(editmenu_get_menu()) . ';';
$has_file = variable_get('editmenu_cache_menu', TRUE);
if ($has_file) {
$js_hash = drupal_hash_base64($editmenu);
$js_path = 'public://js'; // same path as concatenated Core JS
$js_filename = $js_path . '/editmenu_' . $js_hash . '.js';
if (!file_exists($js_filename)) {
file_prepare_directory($js_path, FILE_CREATE_DIRECTORY);
if (!file_unmanaged_save_data($editmenu, $js_filename, FILE_EXISTS_REPLACE)) {
$has_file = FALSE;
}
}
}
$options = array(
'scope' => variable_get('editmenu_menu_scope', 'footer'),
// 'version' => ?, -- could we make use of the version?
);
if ($has_file) {
//$options['type'] = 'file'; -- default
drupal_add_js($js_filename, $options);
}
else {
// inline adds the value as is (untouched)
$options['type'] = 'inline';
drupal_add_js($editmenu, $options);
}
}
/** \brief Generate the CSS and add it to the page.
*
* This function generates the dynamic CSS and then insert that to
* the header of the page.
*
* The function regenerates the CSS only when the settings were
* modified. Otherwise, it uses the cached version.
*
* The function has a fall back, in case the dynamic CSS cannot
* be created.
*/
function _editmenu_add_css() {
global $user;
$editmenu_path = drupal_get_path('module', 'editmenu');
$css_path = 'public://css'; // same path as concatenated Core CSS
if (file_prepare_directory($css_path, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
$fix = variable_get('editmenu_fix', 'scroll');
// XXX add a variable editmenu_update which is set to TRUE whenever
// the settings get modified and false here
$output_filename = variable_get('editmenu_css_filename', '');
if (!$output_filename) {
$tags = array(
'@MENUBAR_ZINDEX@' => simplemnu_get_zindex('editmenu_menubar_zindex', 9999),
'@DROPDOWN_ZINDEX@' => simplemnu_get_zindex('editmenu_dropdown_zindex', 9999),
);
switch ($fix) {
case 'top':
$tags['@FIX@'] = "position: fixed;\n top: 0; left: 0;";
break;
case 'bottom':
$tags['@FIX@'] = "position: fixed;\n bottom: 0; left: 0;";
break;
default: // scroll
$tags['@FIX@'] = 'position: relative;';
break;
}
$css = file_get_contents($editmenu_path . '/editmenu.css.tpl');
$css = strtr($css, $tags);
$css_hash = hash('sha256', $css);
$output_filename = $css_path . '/editmenu-' . $css_hash . '.css';
if (!file_exists($output_filename)) {
// new content, create a new file
file_put_contents($output_filename, $css);
}
else {
// this call is rather ugly, but we must make sure that the
// system cache will take the current Editmenu CSS in account
_drupal_flush_css_js();
}
//variable_set('editmenu_css_filename', $output_filename);
}
drupal_add_css($output_filename);
}
else {
// in case we cannot create the dynamic CSS
$last_msg = variable_get('editmenu_css_error', 0);
if (($last_msg != -1 && $last_msg + 3600 > time()) || $user->uid == 1) {
// avoid displaying the error on each page... only once per hour.
// (unless you are the admin, in which case you probably want to know!)
variable_set('editmenu_css_error', time());
drupal_set_message(t('Editmenu could not create the folder @path in order to save the dynamic CSS data.',
array('@path' => $css_path)), 'warning');
}
// use a default that cannot react to the dynamic changes...
drupal_add_css($editmenu_path .'/editmenu.css');
}
}
/** \brief Add the module theme.
*
* This function adds a theme for the Editmenu look.
*
* By default, the original theme is used. The module also offers the
* blackblue theme. It is also possible to create new themes or use
* the theming of the current theme for editmenu (so the menu fits
* perfectly for that theme.)
*/
function _editmenu_add_theme() {
// we want to put the editmenu theme CSS first
// so we can change some CSS entries dynamically
// but at this time the editmenu.css is used to
// reset many of the CSS entries... Hmmm...
$editmenu_theme = variable_get('editmenu_theme', 'original');
if ($editmenu_theme != 'custom') {
$editmenu_path = drupal_get_path('module', 'editmenu');
$theme_file = $editmenu_path . '/themes/' . $editmenu_theme
. '/' . $editmenu_theme . '.css';
if (is_file($theme_file)) {
drupal_add_css($theme_file);
}
}
}
/** \brief Add the JavaScript that makes it all work.
*
* This function adds the Editmenu JavaScript, the Superfish JavaScript
* and settings from the user.
*/
function _editmenu_add_js() {
$editmenu_path = drupal_get_path('module', 'editmenu');
// Settings
$fix = variable_get('editmenu_fix', 'scroll');
switch ($fix) {
case 'top':
$element = 'body';
$placement = 'prepend';
break;
case 'bottom':
$element = 'body';
$placement = 'append';
break;
default: // 'scroll'
// let user defined other elements when not fixed
$element = variable_get('editmenu_element', 'body');
$placement = variable_get('editmenu_element_method', 'prepend');
break;
}
$settings = array(
'effect' => variable_get('editmenu_effect', 'opacity'),
'effectSpeed' => variable_get('editmenu_effect_speed', 'fast'),
'element' => $element,
'placement' => $placement,
'hideDelay' => variable_get('editmenu_hide_delay', 800),
'detectPopup' => variable_get('editmenu_detect_popup', 1),
);
drupal_add_js(array('editmenu' => $settings), array('type' => 'setting'));
// Editmenu
drupal_add_js($editmenu_path . '/editmenu.js', array('version' => '1.2'));
// Superfish
$superfish = variable_get('editmenu_superfish_version', 'superfish-1.4.1.js');
if ($superfish != 'custom') {
$sf_version = str_replace(array('superfish-', '.js'), '', $superfish);
drupal_add_js($editmenu_path . '/' . $superfish, array('version' => $sf_version));
}
}
/**
* \brief Retrieve the zindex for the CSS files.
*
* This function retrieves a z-index from a Drupal variable and
* transform it to fit in a CSS file.
*
* \param[in] $name The name of the z-index variable to read.
* \param[in] $default The default value to use when the variable is not defined.
*
* \return A string representing the current value of the specified z-index.
*/
function simplemnu_get_zindex($name, $default) {
$zindex = variable_get($name, $default);
if ($zindex == -1) {
$zindex = '';
}
else {
$zindex = 'z-index: ' . $zindex . ';';
}
return $zindex;
}
/**
* Implements hook_permission().
*/
function editmenu_permission() {
return array(
'view editmenu' => array(
'title' => t('View EditMenu'),
'description' => t('Display EditMenu to this user.'),
),
'administer editmenu' => array(
'title' => t('Administer EditMenu'),
'description' => t('Change settings of EditMenu.'),
),
);
}
/**
* Render an HTML list of links for a given menu.
*/
function editmenu_get_menu() {
variable_set('editmenu_running', TRUE);
// if a user turned off menu module but EditMenu was previously set
// reset variable so a menu appears
$all_menus = array(variable_get('editmenu_menu', 'management:0'));
drupal_alter('editmenu_menus', $all_menus);
if (count($all_menus) > 1) {
// if menu is not enable then we cannot have a count other than 1
$menu_titles = menu_get_menus();
$tree = array();
foreach ($all_menus as $full_name) {
list($menu_name, $mlid) = explode(':', $full_name);
$tree[] = array(
'link' => array(
'editmenu_multi_menu_root' => TRUE,
'mlid' => $mlid,
'menu_name' => $full_name,
'hidden' => FALSE,
'title' => $menu_titles[$menu_name],
'href' => 'admin/settings/editmenu', /// ??? -- we should not have a link here
'in_active_trail' => FALSE,
'has_children' => TRUE,
'localized_options' => array(
'attributes' => array('class' => 'editmenu-top-level'),
),
),
'below' => editmenu_menu_tree($full_name),
);
}
}
else {
reset($all_menus);
$tree = editmenu_menu_tree(current($all_menus));
}
// allow other modules to modify the menu tree
drupal_alter('editmenu_tree', $tree);
$tree = editmenu_tree_remove_hidden($tree);
// now generate the output
$menu_form = menu_tree_output($tree);
$menu = drupal_render($menu_form);
if (!$menu) {
$menu = '<ul class="menu"><li><a href="' . url('admin/settings/editmenu') . '">'
. t('No menu items found. Try a different menu as the default.') . '</a></li></ul>';
}
// add the id to the UL tag here instead of the JavaScript
// otherwise it could be added to the <div> tag instead...
$pos = strpos($menu, '>');
$menu = str_replace('class="menu', 'class="menu clear-block', substr($menu, 0, $pos))
. ' id="editmenu"' . substr($menu, $pos);
variable_set('editmenu_running', FALSE);
return '<div class="editmenu-block">' . $menu . '&nbsp;</div>';
}
/**
* At this point (May 31, 2010) the menu tree includes
* many 'below' that should be considered empty but
* aren't... unless we make sure we remove the children
* ourselves.
*/
function editmenu_tree_remove_hidden($tree) {
$clean = array();
foreach ($tree as $key => $data) {
if (!$data['link']['hidden']) {
if ($data['below']) {
$data['below'] = editmenu_tree_remove_hidden($data['below']);
if (count($data['below']) == 0) {
$data['below'] = 0;
}
}
$clean[] = $data;
}
}
return $clean;
}
/**
* Custom implementation of menu_tree().
* We want to retrieve the entire menu structure for a given menu,
* regardless of whether or not the menu item is expanded or not.
*/
function editmenu_menu_tree($menu_name = 'management:0') {
$menu_tree = &drupal_static(__FUNCTION__, array());
// until we take $mlid in account, we can use $mname
// for the rest of the function
list($mname, $mlid) = explode(':', $menu_name);
if (!isset($menu_tree[$mname])) {
$menu_tree[$mname] = menu_tree_all_data($mname);
}
return $menu_tree[$mname];
}
/**
* Modified menu_tree_all_data(), providing the complete menu tree below $root_menu
* (which can be *any* menu item, not just the root of a custom menu).
*
* @param $root_menu
* root menu item of the tree to return as "menu_name:mlid" (mlid = menu link id)
*
* @todo we don't actually need $menu_name, $mlid would be sufficient
*/
function editmenu_tree_all_data($root_menu = 'management:0') {
$tree = &drupal_static(__FUNCTION__, array());
list($menu_name, $mlid) = explode(':', $root_menu);
// Generate the cache ID for Drupal 7.
$max_depth = NULL;
$cid = 'links:' . $menu_name . ':all:' . $mlid . ':' . $GLOBALS['language']->language . ':' . (int) $max_depth;
if (!isset($tree[$cid])) {
$cache = cache_get($cid, 'cache_menu');
if ($cache && isset($cache->data)) {
$data = $cache->data;
}
else {
// Build the query using a LEFT JOIN since there is no match in
// {menu_router} for an external link.
$query = db_select('menu_links', 'ml', array('fetch' => PDO::FETCH_ASSOC));
$query->addTag('translatable');
$query->leftJoin('menu_router', 'm', 'm.path = ml.router_path');
$query->fields('ml');
$query->fields('m', array(
'load_functions',
'to_arg_functions',
'access_callback',
'access_arguments',
'page_callback',
'page_arguments',
'delivery_callback',
'tab_parent',
'tab_root',
'title',
'title_callback',
'title_arguments',
'theme_callback',
'theme_arguments',
'type',
'description',
));
for ($i = 1; $i <= MENU_MAX_DEPTH; $i++) {
$query->orderBy('p' . $i, 'ASC');
}
$query->condition('ml.menu_name', $menu_name);
if ($mlid > 0) {
$item = menu_link_load($mlid);
if ($item) {
// The tree is a subtree of $menu_name, so we need to restrict the query to
// this subtree.
$px = "p" . (int) $item['depth'];
$and = db_and()->condition("ml.$px", $item[$px])->condition("ml.mlid", $mlid, '!=');
$query->condition($and);
}
}
// Build an ordered array of links using the query result object.
$links = array();
foreach ($query->execute() as $item) {
$links[] = $item;
}
$data['tree'] = menu_tree_data($links);
if (count($data['tree']) == 1) {
// Move the menu items from below to root
$key = key($data['tree']);
foreach ($data['tree'][$key]['below'] as $id => $item) {
$data['tree'][$id] = $item;
unset($data['tree'][$key]['below'][$id]);
}
}
$data['node_links'] = array();
menu_tree_collect_node_links($data['tree'], $data['node_links']);
menu_tree_check_access($data['tree'], $data['node_links']);
cache_set($cid, $data, 'cache_menu');
}
$tree[$cid] = $data['tree'];
}
return $tree[$cid];
}
/**
* Determine if editmenu should be displayed based on visibility settings.
*
* @return boolean
*/
function _editmenu_page_visibility() {
$operator = variable_get('editmenu_visibility_operator', 0);
$pages = variable_get('editmenu_visibility_pages', '');
if ($pages) {
$path = drupal_get_path_alias($_GET['q']);
// Compare with the internal and path alias (if any).
$page_match = drupal_match_path($path, $pages);
if ($path != $_GET['q']) {
$page_match = $page_match || drupal_match_path($_GET['q'], $pages);
}
// When $operator has a value of 0, the menu is displayed on
// all pages except those listed in $pages. When set to 1, it
// is displayed only on those pages listed in $pages.
$page_match = !($operator ^ $page_match);
}
else {
$page_match = TRUE;
}
return $page_match;
}
/**
* Check whether the superuser/admin should be shown editmenu.
*/
function _editmenu_superuser_active() {
global $user;
return $user->uid != 1 || variable_get('editmenu_uid1', 1) == 1;
}
@@ -0,0 +1,22 @@
name = EditMenu Devel Menu
description = Include the developer menu in the editmenu tree.
dependencies[] = editmenu
dependencies[] = devel
files[] = editmenu_devel.module
core = 7.x
package = Menu
project = editmenu
; Information added by drupal.org packaging script on 2010-05-26
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1274876110"
; Information added by drupal.org packaging script on 2011-11-10
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1320887030"
@@ -0,0 +1,33 @@
<?php
/**
* @file
* Prepend the devel menu to Editmenu.
*/
/**
* Implementation of hook_editmenu_tree_alter()
*/
function editmenu_devel_editmenu_tree_alter(&$tree) {
if (user_access('access devel information')) {
$devel = array(
'link' => array(
'mlid' => 0,
'menu_name' => 'devel',
'hidden' => FALSE,
'access' => TRUE,
'title' => t('Devel module'),
'href' => 'admin/settings/devel',
'in_active_trail' => FALSE,
'has_children' => TRUE,
'localized_options' => array(
'attributes' => array('id' => 'editmenu_devel'),
),
),
'below' => editmenu_menu_tree('devel:0'),
);
array_unshift($tree, $devel);
}
}
// vim: ts=2 sw=2 et syntax=php
@@ -0,0 +1,21 @@
name = EditMenu Inactive Parent Menu
description = Make all the parent menus inactive so users cannot click on them inadvertendly.
dependencies[] = editmenu
files[] = editmenu_inactive_parents.module
core = 7.x
package = Menu
project = editmenu
; Information added by drupal.org packaging script on 2010-05-26
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1274876110"
; Information added by drupal.org packaging script on 2011-11-10
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1320887030"
@@ -0,0 +1,63 @@
<?php
/**
* @file
* Make all the editmenu parent menu items non-clickable.
*/
/**
* \brief Alter the menu item link theme registry.
*
* This function grabs the editmenu theme registry for the
* menu_link theming. This gives us a way to remove the
* link and replace it with a name (anchor) instead.
*
* This is only applied to the Editmenu as intefering with
* other menus could have unwanted side effects.
*
* \note
* This is called at the time the theme registry is built.
* It is then put in the cache until next time the registry
* is built by the system (i.e. caches are cleared by user,
* because a module is installed, etc.)
*/
function editmenu_inactive_parents_theme_registry_alter(&$theme_registry) {
global $theme;
// Save theme function
$themes = variable_get('editmenu_inactive_parents_theme_function', array());
$themes[$theme] = $theme_registry['menu_link']['function'];
variable_set('editmenu_inactive_parents_theme_function', $themes);
// Replace with our own
$theme_registry['menu_item_link']['function'] = 'editmenu_inactive_parents_theme_menu_link';
}
/**
* \brief Transform the menu item link.
*
* This function intercepts the menu item link theming function of
* the system and
*/
function editmenu_inactive_parents_theme_menu_link($link) {
global $theme;
static $cnt = 0;
// this is a drop down?
if (!empty($link['has_children']) && variable_get('editmenu_running', FALSE)) {
++$cnt;
return '<a name="menu-id-' . $cnt . '">' . $link['title'] . '</a>';
}
// got a theme function?
$themes = variable_get('editmenu_inactive_parents_theme_function', array());
if (isset($themes[$theme])) {
return $themes[$theme]($link);
}
// somehow the preprocess function did not get called?!
// use the core default
return theme_menu_link($link);
}
// vim: ts=2 sw=2 et syntax=php
@@ -0,0 +1,26 @@
name = EditMenu Multi-Menu support
description = Give support to display multiple menu in the top row.
dependencies[] = editmenu
dependencies[] = menu
files[] = editmenu_multi_menu.install
files[] = editmenu_multi_menu.module
core = 7.x
package = Menu
project = editmenu
version = "7.x-1.x-dev"
; Information added by drupal.org packaging script on 2010-05-26
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1274876110"
; Information added by drupal.org packaging script on 2011-11-10
version = "7.x-1.x-dev"
core = "7.x"
project = "editmenu"
datestamp = "1320887030"
@@ -0,0 +1,8 @@
<?php
function editmenu_multi_menu_uninstall() {
variable_del('editmenu_menus');
variable_del('editmenu_multi_menu_theme_function');
}
// vim: ts=2 sw=2 et syntax=php
@@ -0,0 +1,89 @@
<?php
/**
* @file
* Make all the editmenu parent menu items non-clickable.
*/
/**
* \brief Make the 'select' a list.
*
* Transform the menu selector from a drop-down to a list so people
* can select more than one menu.
*/
function editmenu_multi_menu_form_editmenu_admin_settings_alter(&$form, $form_state) {
$form['default_menu']['editmenu_menus'] = $form['default_menu']['editmenu_menu'];
unset($form['default_menu']['editmenu_menu']);
$def = variable_get('editmenu_menus', array(variable_get('editmenu_menu', 'navigation:0')));
$form['default_menu']['editmenu_menus']['#multiple'] = TRUE;
$form['default_menu']['editmenu_menus']['#title'] = t('Menus');
$form['default_menu']['editmenu_menus']['#default_value'] = $def;
$form['default_menu']['editmenu_menus']['#description'] = t('Select one or more menus to show each one of them (use Ctrl or Shift to select multiple entries.) Please, avoid selecting a parent and a child from the same menu.');
}
/**
* \brief Replace the default with our own user selection.
*
* In this case we ignore the user selection unless the editmenu_menus
* was not yet defined, then we keep the default.
*/
function editmenu_multi_menu_editmenu_menus_alter($all_menus) {
$all_menus = variable_get('editmenu_menus', $all_menus);
}
/**
* \brief Alter the menu item link theme registry.
*
* This function grabs the editmenu theme registry for the
* menu_item_link theming. This gives us a way to remove the
* link and replace it with a name (anchor) instead.
*
* This is only applied to the Editmenu as intefering with
* other menus could have unwanted side effects.
*
* \note
* This is called at the time the theme registry is built.
* It is then put in the cache until next time the registry
* is built by the system (i.e. caches are cleared by user,
* because a module is installed, etc.)
*/
function editmenu_multi_menu_theme_registry_alter(&$theme_registry) {
global $theme;
// Save theme function
$themes = variable_get('editmenu_multi_menu_theme_function', array());
$themes[$theme] = $theme_registry['menu_item_link']['function'];
variable_set('editmenu_multi_menu_theme_function', $themes);
// Replace with our own
$theme_registry['menu_item_link']['function'] = 'editmenu_multi_menu_theme_menu_item_link';
}
/**
* \brief Transform the menu item link.
*
* This function intercepts the menu item link theming function of
* the system and
*/
function editmenu_multi_menu_theme_menu_item_link($link) {
global $theme;
static $cnt = 0;
// this is a drop down?
if (!empty($link['editmenu_multi_menu_root']) && variable_get('editmenu_running', FALSE)) {
++$cnt;
return '<a name="menu-id-' . $cnt . '">' . $link['title'] . '</a>';
}
// got a theme function?
$themes = variable_get('editmenu_multi_menu_theme_function', array());
if (isset($themes[$theme])) {
return $themes[$theme]($link);
}
// somehow the preprocess function did not get called?!
// use the core default
return theme_menu_item_link($link);
}
// vim: ts=2 sw=2 et syntax=php
Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

@@ -0,0 +1,100 @@
/*
* Superfish v1.4.1 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
(function($){
$.superfish = {};
$.superfish.o = [];
$.superfish.op = {};
$.superfish.defaults = {
hoverClass : 'sfHover',
pathClass : 'overideThisToUse',
delay : 800,
animation : {opacity:'show'},
speed : 'normal',
oldJquery : false, /* set to true if using jQuery version below 1.2 */
disableHI : false, /* set to true to disable hoverIntent usage */
// callback functions:
onInit : function(){},
onBeforeShow: function(){},
onShow : function(){}, /* note this name changed ('onshow' to 'onShow') from version 1.4 onward */
onHide : function(){}
};
$.fn.superfish = function(op){
var bcClass = 'sfbreadcrumb',
over = function(){
var $$ = $(this), menu = getMenu($$);
getOpts(menu,true);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
out = function(){
var $$ = $(this), menu = getMenu($$);
var o = getOpts(menu,true);
clearTimeout(menu.sfTimer);
if ( !$$.is('.'+bcClass) ) {
menu.sfTimer=setTimeout(function(){
$$.hideSuperfishUl();
if (o.$path.length){over.call(o.$path);}
},o.delay);
}
},
getMenu = function($el){ return $el.parents('ul.superfish:first')[0]; },
getOpts = function(el,menuFound){ el = menuFound ? el : getMenu(el); return $.superfish.op = $.superfish.o[el.serial]; },
hasUl = function(){ return $.superfish.op.oldJquery ? 'li[ul]' : 'li:has(ul)'; };
return this.each(function() {
var s = this.serial = $.superfish.o.length;
var o = $.extend({},$.superfish.defaults,op);
o.$path = $('li.'+o.pathClass,this).each(function(){
$(this).addClass(o.hoverClass+' '+bcClass)
.filter(hasUl()).removeClass(o.pathClass);
});
$.superfish.o[s] = $.superfish.op = o;
$(hasUl(),this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out)
.not('.'+bcClass)
.hideSuperfishUl();
var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
});
o.onInit.call(this);
}).addClass('superfish');
};
$.fn.extend({
hideSuperfishUl : function(){
var o = $.superfish.op,
$ul = $('li.'+o.hoverClass,this).add(this).removeClass(o.hoverClass)
.find('>ul').hide().css('visibility','hidden');
o.onHide.call($ul);
return this;
},
showSuperfishUl : function(){
var o = $.superfish.op,
$ul = this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');
o.onBeforeShow.call($ul);
$ul.animate(o.animation,o.speed,function(){ o.onShow.call(this); });
return this;
}
});
$(window).unload(function(){
$('ul.superfish').each(function(){
$('li',this).unbind('mouseover','mouseout','mouseenter','mouseleave');
});
});
})(jQuery);
@@ -0,0 +1,121 @@
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
;(function($){
$.fn.superfish = function(op){
var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
out = function(){
var $$ = $(this), menu = getMenu($$), o = sf.op;
clearTimeout(menu.sfTimer);
menu.sfTimer=setTimeout(function(){
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
},o.delay);
},
getMenu = function($menu){
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
sf.op = sf.o[menu.serial];
return menu;
},
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
return this.each(function() {
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
$(this).addClass([o.hoverClass,c.bcClass].join(' '))
.filter('li:has(ul)').removeClass(o.pathClass);
});
sf.o[s] = sf.op = o;
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
if (o.autoArrows) addArrow( $('>a:first-child',this) );
})
.not('.'+c.bcClass)
.hideSuperfishUl();
var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
});
o.onInit.call(this);
}).each(function() {
var menuClasses = [c.menuClass];
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
$(this).addClass(menuClasses.join(' '));
});
};
var sf = $.fn.superfish;
sf.o = [];
sf.op = {};
sf.IE7fix = function(){
var o = sf.op;
if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');
};
sf.c = {
bcClass : 'sf-breadcrumb',
menuClass : 'sf-js-enabled',
anchorClass : 'sf-with-ul',
arrowClass : 'sf-sub-indicator',
shadowClass : 'sf-shadow'
};
sf.defaults = {
hoverClass : 'sfHover',
pathClass : 'overideThisToUse',
pathLevels : 1,
delay : 800,
animation : {opacity:'show'},
speed : 'normal',
autoArrows : true,
dropShadows : true,
disableHI : false, // true disables hoverIntent detection
onInit : function(){}, // callback functions
onBeforeShow: function(){},
onShow : function(){},
onHide : function(){}
};
$.fn.extend({
hideSuperfishUl : function(){
var o = sf.op,
not = (o.retainPath===true) ? o.$path : '';
o.retainPath = false;
var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
.find('>ul').hide().css('visibility','hidden');
o.onHide.call($ul);
return this;
},
showSuperfishUl : function(){
var o = sf.op,
sh = sf.c.shadowClass+'-off',
$ul = this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');
sf.IE7fix.call($ul);
o.onBeforeShow.call($ul);
$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
return this;
}
});
})(jQuery);
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

@@ -0,0 +1,49 @@
.editmenu-block {
height: 21px;
}
#editmenu {
background: #000;
color: #fff;
font:11px Verdana, Helvetica, sans-serif;
width: 100%;
text-align: left;
}
#editmenu a {
color: #fff;
text-decoration: none;
padding: 3px 12px 5px 12px;
width: auto;
}
#editmenu li {
background: transparent;
}
#editmenu li.expanded > a {
background: url(arrow_right.gif) no-repeat 94%;
padding-right: 18px;
}
#editmenu li.root > a {
background: url(arrow_down.gif) no-repeat 94%;
padding-right: 18px;
}
#editmenu li:hover, #editmenu li.sfHover,
#editmenu a:focus, #editmenu a:hover, #editmenu a:active {
background: #4c77b3;
color: #fff;
}
#editmenu li ul {
border: 1px solid #ccc;
background: #fafcff;
}
#editmenu li ul a {
color: #4e4e4e;
height: auto;
}
#editmenu li ul li:hover, #editmenu li ul li.sfHover,
#editmenu li ul a:focus, #editmenu li ul a:hover, #editmenu li ul a:active {
background-color: #cde;
color: #4e4e4e;
}
/* vim: ts=2 sw=2 et syntax=css
*/
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,92 @@
/* ------ DISPLAY ------ */
body.editmenu-enabled{margin-top:23px;}
.editmenu-block{height:23px;position:fixed;top:0;left:0;width:100%;z-index:9999;}
ul#editmenu,ul#editmenu *{margin:0;padding:0;list-style:none;}
ul#editmenu{line-height:1.0;position:relative;width:100%;z-index:9999;}
ul#editmenu ul{position:absolute;top:-999em;width:14em;font-size:1em;line-height:1em;}
ul#editmenu ul li{width:100%;}
ul#editmenu a{width:auto;}
ul#editmenu li{float:left;position:relative;z-index:99;}
ul#editmenu a{display:block;}
ul#editmenu li:hover ul,
ul#editmenu li.sfHover ul{left:0px;top:30px;}
ul#editmenu li:hover li ul,
ul#editmenu li.sfHover li ul{top:-999em;}
ul#editmenu li li:hover ul,
ul#editmenu li li.sfHover ul{left:14em;top:-1px;}
.superfish li:hover ul,
.superfish li li:hover ul{top:-999em;}
ul#editmenu:after{
clear: both;
content: '.';
display: block;
height:0px;
overflow:hidden;
visibility:hidden;
width:0px;
}
/* ------ STYLE ------ */
ul#editmenu {
background-color:#333;
border-bottom: 1px dotted #9A9A9A;
box-shadow: 0 0 15px #000000 inset;
-moz-box-shadow: 0 0 15px #000000 inset;
-webkit-box-shadow: 0 0 15px #000000 inset;
}
.editmenu-block:after{
content:'by g.u.i.';
color:#fff;
font: italic 600 1em 'Baskerville',serif;
display:block;
position:fixed;
top:6px;
right:1em;
z-index:10000;
}
ul#editmenu li:hover ul,
ul#editmenu li.sfHover ul{
background:#1a1a1a;
border: 1px dotted #9A9A9A;
padding: 6px 0;
}
ul#editmenu li:hover ul:before,
ul#editmenu li.sfHover ul:before{
background:url('bkgd-border.png') 15px 0 no-repeat;
content:'';
display:block;
height:9px;
margin-top:-15px;
width:100%;
}
/* ------ FONT ------ */
.editmenu-block{font:normal normal 100 11px/1em 'Monaco','Lucida Console','Consolas',monospace;color:#fff;}
ul#editmenu a{color:#fff;margin:4px;padding:2px;text-decoration:none;word-spacing:-.35em;
transition: background-color .5s, color .5s;
-moz-transition: background-color .5s, color .5s;
-o-transition: background-color .5s, color .5s;
-webkit-transition: background-color .5s, color .5s;
}
ul#editmenu>li.first a{color:#777;}
ul#editmenu li.sfHover>a,
ul#editmenu a:focus,
ul#editmenu a:hover,
ul#editmenu a:active{
color: #000;
background-color:#fff;
transition-duration:0s;
-moz-transition-duration:0s;
-o-transition-duration:0s;
-webkit-transition-duration:0s;
}
ul#editmenu>li.first a:focus,
ul#editmenu>li.first a:hover,
ul#editmenu>li.first a:active{
color: #000;
background-color:#cc3733;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

@@ -0,0 +1,52 @@
.editmenu-block {
height: 21px;
}
#editmenu {
background: #ddd;
color: #333;
border-bottom: 1px solid #999;
font: 11px Verdana, Helvetica, sans-serif;
width: 100%;
text-align: left;
}
#editmenu a {
color: #333;
text-decoration: none;
background: #ddd;
border-right: 1px solid #999;
border-left: 1px solid #eee;
padding: 2px 6px 3px 6px;
width: auto;
}
#editmenu li {
background: #ddd;
text-align: left;
}
#editmenu li.expanded > a {
background: url(right-green.gif) no-repeat 97%;
padding-right: 2em;
}
#editmenu li.root > a {
font-weight: 700;
background: url(down-green.gif) no-repeat 97%;
}
#editmenu li:hover,
#editmenu li.sfHover,
#editmenu a:focus,
#editmenu a:hover,
#editmenu a:active {
background: #3875d7;
color: #fff;
}
#editmenu li:hover ul,
ul#editmenu li.sfHover ul {
border-top: 1px solid white;
border-bottom: 1px solid #999;
}
#editmenu li ul a {
height: auto;
}
/* vim: ts=2 sw=2 et syntax=css
*/
Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

@@ -0,0 +1,17 @@
K 25
svn:wc:ra_dav:version-url
V 52
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug
END
jqplug.module
K 25
svn:wc:ra_dav:version-url
V 66
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/jqplug.module
END
jqplug.info
K 25
svn:wc:ra_dav:version-url
V 64
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/jqplug.info
END
+102
View File
@@ -0,0 +1,102 @@
9
dir
1
http://192.168.1.122/svn/mdld/sites/all/modules/custom/jqplug
http://192.168.1.122/svn/mdld
2009-07-08T17:22:35.498919Z
1
svn:special svn:externals svn:needs-lock
5345f8a9-ac18-4ae0-b042-0c8c2e191c0c
jqplug.module
file
2009-07-08T17:23:12.000000Z
0dfa07bd2886cfea2a55d0b5958aba65
2009-07-08T17:22:35.498919Z
1
3695
css
dir
js
dir
jqplug.info
file
2009-07-08T17:23:12.000000Z
7009b8a6c2bc6fa8b0bd2f4723db865c
2009-07-08T17:22:35.498919Z
1
143
+1
View File
@@ -0,0 +1 @@
9
@@ -0,0 +1,9 @@
; $Id$
name = "jqplug"
description = loads plugins for jquery
package = gui-admintools
project = "jquery"
version = "6.x-0.dev"
core = "6.x"
@@ -0,0 +1,140 @@
<?php
// $Id$
//
// jqplug.module
//
//
//
// Created by Bach on 2008-04.
// Copyright 2008 gui. All rights reserved.
//
/**
* @file
* Loads plugins for jQuery
*
*
*
*/
/**
*
* hook_perm()
*
*/
function jqplug_perm(){
return array('administer jqplug');
}
/**
* Implementation of hook_init().
*/
function jqplug_init() {
# Add the JS for this module.
$mod_path = drupal_get_path('module', 'jqplug');
/*drupal_add_js($mod_path.'/js/jquery.dimensions.pack.js', 'module', 'header', FALSE, TRUE);*/
drupal_add_js($mod_path.'/js/jquery.mousewheel.pack.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jqem-compressed.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jScrollPane.js', 'module', 'header', FALSE, TRUE);
drupal_add_css($mod_path.'/css/jScrollPane.css', 'module', 'all', FALSE);
// http://plugins.jquery.com/project/Easing
drupal_add_js($mod_path.'/js/jquery.easing.1.2.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.checkbox.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.cookie.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.color.js', 'module', 'header', FALSE, TRUE);
// url = http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/
drupal_add_js($mod_path.'/js/jqminmax-compressed.js', 'module', 'header', FALSE, TRUE);
//
drupal_add_js($mod_path.'/js/AC_OETags.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/swfobject.js', 'module', 'header', FALSE, TRUE);
}
/**
*
* Implementation of hook_menu().
*
*/
function jqplug_menu($may_cache = false) {
/*
$items = array();
if ($may_cache) {
#
}
else {
# Add the JS for this module.
$mod_path = drupal_get_path('module', 'jqplug');
drupal_add_js($mod_path.'/js/jquery.dimensions.pack.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.mousewheel.pack.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jqem-compressed.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jScrollPane.js', 'module', 'header', FALSE, TRUE);
drupal_add_css($mod_path.'/css/jScrollPane.css', 'module', 'all', FALSE);
drupal_add_js($mod_path.'/js/jquery.easing.1.2.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.checkbox.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/jquery.cookie.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/AC_OETags.js', 'module', 'header', FALSE, TRUE);
drupal_add_js($mod_path.'/js/swfobject.js', 'module', 'header', FALSE, TRUE);
}
return $items;
*/
}
/**
* nouveaute_admin
*
* */
function jqplug_admin(){
/*
drupal_set_title('nouveaute administration');
$form = array();
$form['nouveautes']['#tree'] = TRUE;
$form['nouveautes']['nouveaute_bouton_ic_presetid'] = array(
'#type' => 'select',
'#title' => t('image_bouton'),
'#multiple' => FALSE,
'#description' => t('Select the imageCache preset which will be choose for image bouton.'),
'#options' => $presetsname,
'#default_value' => array_search(variable_get('nouveaute_bouton_ic_presetid', 0), $presetsid),
);
$form['hidden'] = array('#type' => 'value', '#value' => $presetsid);
return system_settings_form($form);
}
*/
}
function jqplug_admin_submit($form_id, $form_values){
/*
print('<pre>');
print_r($form_values);
print('</pre>');
*/
//
/*
foreach($form_values['nouveautes'] as $var => $pos){
variable_set($var, $form_values['hidden'][$pos]);
}
drupal_set_message(t('nouveaute configuration has been saved.'));
*/
}
@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 56
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/css
END
jScrollPane.css
K 25
svn:wc:ra_dav:version-url
V 72
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/css/jScrollPane.css
END
@@ -0,0 +1,62 @@
9
dir
1
http://192.168.1.122/svn/mdld/sites/all/modules/custom/jqplug/css
http://192.168.1.122/svn/mdld
2009-07-08T17:22:35.498919Z
1
svn:special svn:externals svn:needs-lock
5345f8a9-ac18-4ae0-b042-0c8c2e191c0c
jScrollPane.css
file
2009-07-08T17:23:12.000000Z
9d281fcbd7e527cd671c5a86dbcc0c2e
2009-07-08T17:22:35.498919Z
1
1033
@@ -0,0 +1 @@
9
@@ -0,0 +1,65 @@
.jScrollPaneContainer {
position: relative;
overflow: hidden;
z-index: 1;
}
.jScrollPaneTrack {
position: absolute;
cursor: pointer;
right: 0;
top: 0;
height: 100%;
background: #aaa;
}
.jScrollPaneDrag {
position: absolute;
background: #666;
cursor: pointer;
overflow: hidden;
}
.jScrollPaneDragTop {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
}
.jScrollPaneDragBottom {
position: absolute;
bottom: 0;
left: 0;
overflow: hidden;
}
a.jScrollArrowUp {
display: block;
position: absolute;
z-index: 1;
top: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowUp:hover {
/*background-color: #f60;*/
}
a.jScrollArrowDown {
display: block;
position: absolute;
z-index: 1;
bottom: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowDown:hover {
/*background-color: #f60;*/
}
a.jScrollActiveArrowButton, a.jScrollActiveArrowButton:hover {
/*background-color: #f00;*/
}
@@ -0,0 +1,65 @@
.jScrollPaneContainer {
position: relative;
overflow: hidden;
z-index: 1;
}
.jScrollPaneTrack {
position: absolute;
cursor: pointer;
right: 0;
top: 0;
height: 100%;
background: #aaa;
}
.jScrollPaneDrag {
position: absolute;
background: #666;
cursor: pointer;
overflow: hidden;
}
.jScrollPaneDragTop {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
}
.jScrollPaneDragBottom {
position: absolute;
bottom: 0;
left: 0;
overflow: hidden;
}
a.jScrollArrowUp {
display: block;
position: absolute;
z-index: 1;
top: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowUp:hover {
/*background-color: #f60;*/
}
a.jScrollArrowDown {
display: block;
position: absolute;
z-index: 1;
bottom: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowDown:hover {
/*background-color: #f60;*/
}
a.jScrollActiveArrowButton, a.jScrollActiveArrowButton:hover {
/*background-color: #f00;*/
}
+8
View File
@@ -0,0 +1,8 @@
name = "jqplug"
description = loads plugins for jquery
; dependencies[]
package = gui
project = "jquery"
version = "7.x-0.dev"
core = "7.x"
+183
View File
@@ -0,0 +1,183 @@
<?php
// $Id$
//
// jqplug.module
//
//
//
// Created by Bach on 2008-04.
// Modified by bach on 2009-09-09
// Copyright 2009 gui. All rights reserved.
//
/**
* @file
* Loads plugins for jQuery
*
*
*
*/
define('JQPLUG_PERM_ADMIN', 'administer jqplug');
/**
*
* hook_permission()
*
*/
function jqplug_permission(){
return array('administer jqplug' => array(
'title' => 'administer jqplug',
'description' => 'administer what jquery plugin will be loaded',
),
);
}
/**
* hook_menu()
*
*/
function jqplug_menu() {
$items['admin/config/user-interface/jgplug'] = array(
'title' => 'jq plug',
'description' => 'Control which plugin are loaded by theme using jqplug.',
'page callback' => 'drupal_get_form',
'page arguments' => array('jqplug_admin_settings'),
'access arguments' => array(JQPLUG_PERM_ADMIN),
'type' => MENU_NORMAL_ITEM
);
return $items;
}
function jqplug_admin_settings() {
$form = array();
$form['jqplug'] = array(
'#type' => 'fieldset',
'#title' => t('jqplug settings'),
'#description' => t('Control which plugin are loaded by theme using jqplug.')
);
$default = array();
$options = array();
$list = _get_plugList();
## DEFINE OPTIONS
foreach($list as $plug){
$options[$plug['file']] = t($plug['name']);
}
# config by theme, does'nt work yet 'cause of hook_init which does'nt have acces to global $theme
/*
$themes = list_themes();
foreach($themes as $theme){
if( $theme->status == 1){
$form['jqplug']['jqplug_theme_' . $theme->name] = array(
'#type' => 'checkboxes',
'#title' => t($theme->name),
'#default_value' => variable_get('jqplug_theme_' . $theme->name, $default),
'#options' => $options,
'#description' =>t('<b>' . $theme->name . ' :</b> selecte which plugins will be load for this theme.'),
);
}
}
*/
#same config for alla themes
$form['jqplug']['jqplug'] = array(
'#type' => 'checkboxes',
'#title' => t('jQuery Plugins'),
'#default_value' => variable_get('jqplug', $default),
'#options' => $options,
'#description' =>t('selecte which plugins will be load for all theme.'),
);
return system_settings_form($form);
}
// function jqplug_add($adds = array()){
//
// $activated = variable_get('jqplug', array());
// $list = _get_plugList();
//
// $match = true;
// foreach ($adds as $add) {
// foreach($list as $plug){
// if($plug['name'] == $add){
// variable_set();
// }
// }
// }
//
//
//
// return $match;
//
// }
function _get_plugList(){
$list = array();
$mod_path = drupal_get_path('module', 'jqplug');
$pluginsFolderPath = $mod_path.'/js/*';
$strToRemove = array("jquery.", ".pack", "jQuery", ".js", ".compressed", ".minified", ".min");
$strToSpace = array(".", "-");
foreach(glob($pluginsFolderPath) as $file){
$pathParts = explode("/", $file);
$file = $pathParts[count($pathParts)-1];
$fileParts = explode(".", $file);
$extension = $fileParts[count($fileParts)-1];
if($extension == "js"){
$PlugName = str_replace($strToRemove, '', $file);
$PlugName = str_replace($strToSpace, ' ', $PlugName);
array_push($list, array("file"=>$file,"name"=>$PlugName));
}
}
return $list;
}
/**
* Implementation of hook_init().
*/
function jqplug_init() {
# Add the JS for this module.
$mod_path = drupal_get_path('module', 'jqplug');
// dsm($mod_path);
# config by theme, does'nt work yet 'cause of hook_init which does'nt have acces to global $theme
// global $theme;
// $theme_plugs = variable_get('jqplug_theme_'.$theme, array());
// foreach($theme_plugs as $plug){
// if( $plug != 0 ){
// drupal_add_js($mod_path.'/js/'.$plug, 'module', 'header', FALSE, TRUE);
// }
// }
#same config for alla themes
$plugs = variable_get('jqplug', array());
// dsm($plugs);
foreach($plugs as $plug){
if( $plug != "0" ){
// dsm($mod_path.'/js/'.$plug);
if(file_exists($mod_path.'/js/'.$plug))
drupal_add_js($mod_path.'/js/'.$plug, array('scope'=>'header', 'group'=>JS_LIBRARY));
$cssFile = preg_replace("/\.js$/", '.css', $plug);
$cssFile = str_replace(".min", '', $cssFile);
if(file_exists($mod_path.'/js/'.$cssFile))
drupal_add_css($mod_path.'/js/'.$cssFile, array('media'=>'screen', 'group'=>CSS_DEFAULT));
}
}
}
@@ -0,0 +1,101 @@
K 25
svn:wc:ra_dav:version-url
V 55
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js
END
jquery.checkbox.js
K 25
svn:wc:ra_dav:version-url
V 74
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.checkbox.js
END
animateClass.compressed.js
K 25
svn:wc:ra_dav:version-url
V 82
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/animateClass.compressed.js
END
jquery.mousewheel.pack.js
K 25
svn:wc:ra_dav:version-url
V 81
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.mousewheel.pack.js
END
jScrollPane.js
K 25
svn:wc:ra_dav:version-url
V 70
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jScrollPane.js
END
jquery.easing.1.2.js
K 25
svn:wc:ra_dav:version-url
V 76
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.easing.1.2.js
END
AC_OETags.js
K 25
svn:wc:ra_dav:version-url
V 68
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/AC_OETags.js
END
swfobject.js
K 25
svn:wc:ra_dav:version-url
V 68
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/swfobject.js
END
jqminmax-compressed.js
K 25
svn:wc:ra_dav:version-url
V 78
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jqminmax-compressed.js
END
jScrollPane*.js
K 25
svn:wc:ra_dav:version-url
V 71
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jScrollPane*.js
END
jquery.cookie.js
K 25
svn:wc:ra_dav:version-url
V 72
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.cookie.js
END
jScrollPane.css
K 25
svn:wc:ra_dav:version-url
V 71
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jScrollPane.css
END
jquery.color.js
K 25
svn:wc:ra_dav:version-url
V 71
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.color.js
END
jqem-compressed.js
K 25
svn:wc:ra_dav:version-url
V 74
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jqem-compressed.js
END
interface.js
K 25
svn:wc:ra_dav:version-url
V 68
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/interface.js
END
animateStyle.compressed.js
K 25
svn:wc:ra_dav:version-url
V 82
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/animateStyle.compressed.js
END
jquery.dimensions.pack.js
K 25
svn:wc:ra_dav:version-url
V 81
/svn/mdld/!svn/ver/1/sites/all/modules/custom/jqplug/js/jquery.dimensions.pack.js
END
@@ -0,0 +1,572 @@
9
dir
1
http://192.168.1.122/svn/mdld/sites/all/modules/custom/jqplug/js
http://192.168.1.122/svn/mdld
2009-07-08T17:22:35.498919Z
1
svn:special svn:externals svn:needs-lock
5345f8a9-ac18-4ae0-b042-0c8c2e191c0c
jquery.checkbox.js
file
2009-07-08T17:23:12.000000Z
3826dcfc83aec33b4ad3d888e55d83d9
2009-07-08T17:22:35.498919Z
1
2116
animateClass.compressed.js
file
2009-07-08T17:23:12.000000Z
c89e1d04a84a2c828eff6544d3477ae0
2009-07-08T17:22:35.498919Z
1
2898
jquery.mousewheel.pack.js
file
2009-07-08T17:23:12.000000Z
206df8978990c8423331ba07f73ef284
2009-07-08T17:22:35.498919Z
1
1781
jScrollPane.js
file
2009-07-08T17:23:12.000000Z
eb0371b4cc58b9fcf4a3a1bec6419188
2009-07-08T17:22:35.498919Z
1
17397
jquery.easing.1.2.js
file
2009-07-08T17:23:12.000000Z
6c0edab4dbbc8ab1b4dcd05cc2b26a09
2009-07-08T17:22:35.498919Z
1
4757
AC_OETags.js
file
2009-07-08T17:23:12.000000Z
593f918ab82a3b908fa4b4f1c0f71a3f
2009-07-08T17:22:35.498919Z
1
has-props
8088
swfobject.js
file
2009-07-08T17:23:12.000000Z
b58ba837a6ae52321cdaadb813b7ae6e
2009-07-08T17:22:35.498919Z
1
8868
jqminmax-compressed.js
file
2009-07-08T17:23:12.000000Z
54f79dbab017711e0e20d9daa46a44c3
2009-07-08T17:22:35.498919Z
1
1958
jScrollPane*.js
file
2009-07-08T17:23:12.000000Z
d41d8cd98f00b204e9800998ecf8427e
2009-07-08T17:22:35.498919Z
1
0
jquery.cookie.js
file
2009-07-08T17:23:12.000000Z
384772142d1907d7d3aea3ac11fad9d0
2009-07-08T17:22:35.498919Z
1
4246
jScrollPane.css
file
2009-07-08T17:23:12.000000Z
9d281fcbd7e527cd671c5a86dbcc0c2e
2009-07-08T17:22:35.498919Z
1
1033
jquery.color.js
file
2009-07-08T17:23:12.000000Z
8738618224090e7a179a6248cb00d1bb
2009-07-08T17:22:35.498919Z
1
3660
jqem-compressed.js
file
2009-07-08T17:23:12.000000Z
4f588f9f0193037a077deaee0c430f18
2009-07-08T17:22:35.498919Z
1
1724
interface.js
file
2009-07-08T17:23:12.000000Z
847407c01f884853efd73974931e2195
2009-07-08T17:22:35.498919Z
1
has-props
79413
animateStyle.compressed.js
file
2009-07-08T17:23:12.000000Z
4c54eeaa5d6a10d3ff298b6cd699d822
2009-07-08T17:22:35.498919Z
1
2773
jquery.dimensions.pack.js
file
2009-07-08T17:23:12.000000Z
4fdd4bc72ee834bc132ddaa05a7ec018
2009-07-08T17:22:35.498919Z
1
2239
@@ -0,0 +1 @@
9
@@ -0,0 +1,5 @@
K 14
svn:executable
V 0
END
@@ -0,0 +1,5 @@
K 14
svn:executable
V 0
END
@@ -0,0 +1,276 @@
// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version;
var axo;
var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
}
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
//alert("flashVer="+flashVer);
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
for (var i in params)
str += '><param name="' + i + '" value="' + params[i] + '" /> ';
str += '></object>';
} else {
str += '<embed ';
for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';
str += '> </embed>';
}
document.write(str);
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
ret.objAttrs[args[i]] = args[i+1];
break;
case "id":
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}
@@ -0,0 +1 @@
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('18.1N.1i=q(z,s,X){c V=[];c p=[];P 18(d).1j(q(){17(c i=0;i<d.A.F(" ").u;i++){8(d.A.F(" ")[i]==z)P}c N={};c m=(s&&r s!="O")?s:X;c j=($(d).o("l")||\'\');8(r j==\'K\')j=j["E"];c h=d.1l(1m);$(h).1f($(d).1f());$(h).J("1n","1o").J("R","1p");$(d.1q).1r(h);8(r s!="O")$(h).10(0).A=d.A;t $(h).10(0).A="";$(h).W(z);8(Q.L){c w=Q.L.1d(d,11);c g=Q.L.1d(h,11)}t{c w=d.19;c g=h.19}8(y.v!=T)v.U("1s 1A 1t 1u "+z+" 1v 1w 1x 1y:");17(c n 1z g){8(r g[n]!="q"&&g[n]&&n.G("1B")==-1&&n.G("u")==-1&&g[n]!=w[n]){8(n.G("1C")==-1&&n.G("1D")==-1){8(!1E(9(g[n].D(/S/,"")))){8(w.R!="1a"||(w.R=="1a"&&n!="1G"&&n!="1H"&&n!="1I"&&n!="1J")){8(y.v!=T)v.U(n+": "+9(g[n].D(/S/,"")));N[n]=9(g[n].D(/S/,""))}}}t{12(d,n,w[n],g[n],m,j);8(y.v!=T)v.U(n+": "+g[n])}}}$(d).1M(N,m,q(){8(r s=="O")$(d).1h(s);$(d).W(z);8(r $(d).o("l")==\'K\'){$(d).o("l")["E"]="";$(d).o("l")["E"]=j}t{$(d).o("l",j)}$(h).1k()})});q 12(C,f,a,b,m,j){c k,e;8(a=="Z"){e=[x,x,x]}t{8(a.6(0,3)=="B")e=a.6(4).D(/\\)/,"").F(",");8(a.6(0,1)=="#"&&a.u==7)e=[9(a.6(1,2),16),9(a.6(3,2),16),9(a.6(5,2),16)];8(a.6(0,1)=="#"&&a.u==4)e=[9(a.6(1,1)+a.6(1,1),16),9(a.6(2,1)+a.6(2,1),16),9(a.6(3,1)+a.6(3,1),16)];8(a.6(0,3)!="B"&&a.6(0,1)!="#")e=M(a)}8(b=="Z"){k=[x,x,x]}t{8(b.6(0,3)=="B")k=b.6(4).D(/\\)/,"").F(",");8(b.6(0,1)=="#"&&b.u==7)k=[9(b.6(1,2),16),9(b.6(3,2),16),9(b.6(5,2),16)];8(b.6(0,1)=="#"&&b.u==4)k=[9(b.6(1,1)+b.6(1,1),16),9(b.6(2,1)+b.6(2,1),16),9(b.6(3,1)+b.6(3,1),16)];8(b.6(0,3)!="B"&&b.6(0,1)!="#")k=M(b)}c 1e=9(k[0])-9(e[0]);c 1g=9(k[1])-9(e[1]);c Y=9(k[2])-9(e[2]);p[f]=0;V[f]=y.1F(1b,1c);q 1b(){p[f]=p[f]+1c;c 14=H.I(9(e[0])+(1e/m)*p[f]);c 13=H.I(9(e[1])+(1g/m)*p[f]);c 15=H.I(9(e[2])+(Y/m)*p[f]);$(C).J(f,"B("+14+","+13+","+15+")");8(p[f]==m){y.1K(V[f]);8(r $(C).o("l")==\'K\'){$(C).o("l")["E"]="";$(C).o("l")["E"]=j}}};q M(1L){P[0,0,0]}}};',62,112,'||||||substr||if|parseInt|oldColor|newColor|var|this|oSC|prop|newStyle|dummyEl||oldStyleAttr|nSC|style|aniDuration||attr|colorTimers|function|typeof|c2|else|length|console|oldStyle|255|window|c1|className|rgb|that|replace|cssText|split|indexOf|Math|round|css|object|defaultView|colorToArray|aniObj|string|return|document|position|px|undefined|log|colorIntervals|addClass|c3|diffB|transparent|get|null|animateColor|newG|newR|newB||for|jQuery|currentStyle|static|intervalColor|20|getComputedStyle|diffR|html|diffG|removeClass|animateClass|each|remove|cloneNode|true|visibility|hidden|absolute|parentNode|append|Animating|to|class|with|the|following|properties|in|element|Moz|Color|color|isNaN|setInterval|left|top|bottom|right|clearInterval|cColor|animate|fn'.split('|'),0,{}))
@@ -0,0 +1 @@
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('c B=[];T.1w.1g=s(L,10){c K=[];c o=[];17 T(d).1h(s(){c Q={};c m=10;c k=($(d).j("h")||\'\');9(A k==\'I\')k=k["y"];9(B[d]==H)17;p B[d]=H;c l=d.1i(H);$(l).V($(d).V());$(d.1j).1k(l);$(l).j("h",L);$(l).D("19","1m").D("E","1n");9(J.M){c t=J.M.12(d,15);c e=J.M.12(l,15)}p{c t=d.Y;c e=l.Y}9(x.q!=P)q.F("1o 1v 1p h "+L+" 1q 1r 1s 1t:");1u(c n 1x e){9(A e[n]!="s"&&e[n]&&n.C("1y")==-1&&n.C("w")==-1&&e[n]!=t[n]){9(n.C("1z")==-1&&n.C("1A")==-1){9(!1B(8(e[n].u(/N/,"")))){9(t.E!="13"||(t.E=="13"&&n!="1C"&&n!="1D"&&n!="1E"&&n!="1G")){9(x.q!=P)q.F(n+": "+8(e[n].u(/N/,"")));Q[n]=8(e[n].u(/N/,""))}}p{9(n!="19"&&n!="E")$(d).D(n,e[n])}}p{X(d,n,t[n],e[n],m,k);9(x.q!=P)q.F(n+": "+e[n])}}}$(d).1d(Q,m,s(){9(A $(d).j("h")==\'I\'){$(d).j("h")["y"]="";$(d).j("h")["y"]=k}p{$(d).j("h",k)}$(l).1e();B[d]=1f})});s X(v,g,a,b,m,k){c i,f;9(a=="U"){f=[r,r,r]}p{9(a.6(0,3)=="z")f=a.6(4).u(/\\)/,"").W(",");9(a.6(0,1)=="#"&&a.w==7)f=[8(a.6(1,2),16),8(a.6(3,2),16),8(a.6(5,2),16)];9(a.6(0,1)=="#"&&a.w==4)f=[8(a.6(1,1)+a.6(1,1),16),8(a.6(2,1)+a.6(2,1),16),8(a.6(3,1)+a.6(3,1),16)];9(a.6(0,3)!="z"&&a.6(0,1)!="#")f=11(a)}9(b=="U"){i=[r,r,r]}p{9(b.6(0,3)=="z")i=b.6(4).u(/\\)/,"").W(",");9(b.6(0,1)=="#"&&b.w==7)i=[8(b.6(1,2),16),8(b.6(3,2),16),8(b.6(5,2),16)];9(b.6(0,1)=="#"&&b.w==4)i=[8(b.6(1,1)+b.6(1,1),16),8(b.6(2,1)+b.6(2,1),16),8(b.6(3,1)+b.6(3,1),16)];9(b.6(0,3)!="z"&&b.6(0,1)!="#")i=11(b)}c R=8(i[0])-8(f[0]);c S=8(i[1])-8(f[1]);c Z=8(i[2])-8(f[2]);o[g]=0;K[g]=x.1F(1a,1b);s 1a(){o[g]=o[g]+1b;c 14=O.G(8(f[0])+(R/m)*o[g]);c 18=O.G(8(f[1])+(S/m)*o[g]);c 1c=O.G(8(f[2])+(Z/m)*o[g]);$(v).D(g,"z("+14+","+18+","+1c+")");9(o[g]==m){x.1l(K[g]);9(A $(v).j("h")==\'I\'){$(v).j("h")["y"]="";$(v).j("h")["y"]=k}}}}};',62,105,'||||||substr||parseInt|if|oldColor|newColor|var|this|newStyle|oSC|prop|style|nSC|attr|oldStyleAttr|dummyEl|aniDuration||colorTimers|else|console|255|function|oldStyle|replace|that|length|window|cssText|rgb|typeof|animateStyleIsRunning|indexOf|css|position|log|round|true|object|document|colorIntervals|c1|defaultView|px|Math|undefined|aniString|diffR|diffG|jQuery|transparent|html|split|animateColor|currentStyle|diffB|c2|colorToArray|getComputedStyle|static|newR|null||return|newG|visibility|intervalColor|20|newB|animate|remove|false|animateStyle|each|cloneNode|parentNode|append|clearInterval|hidden|absolute|Animating|to|with|the|following|properties|for|element|fn|in|Moz|Color|color|isNaN|left|top|bottom|setInterval|right'.split('|'),0,{}))
File diff suppressed because one or more lines are too long
@@ -0,0 +1,65 @@
.jScrollPaneContainer {
position: relative;
overflow: hidden;
z-index: 1;
}
.jScrollPaneTrack {
position: absolute;
cursor: pointer;
right: 0;
top: 0;
height: 100%;
background: #aaa;
}
.jScrollPaneDrag {
position: absolute;
background: #666;
cursor: pointer;
overflow: hidden;
}
.jScrollPaneDragTop {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
}
.jScrollPaneDragBottom {
position: absolute;
bottom: 0;
left: 0;
overflow: hidden;
}
a.jScrollArrowUp {
display: block;
position: absolute;
z-index: 1;
top: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowUp:hover {
/*background-color: #f60;*/
}
a.jScrollArrowDown {
display: block;
position: absolute;
z-index: 1;
bottom: 0;
right: 0;
text-indent: -2000px;
overflow: hidden;
/*background-color: #666;*/
height: 9px;
}
a.jScrollArrowDown:hover {
/*background-color: #f60;*/
}
a.jScrollActiveArrowButton, a.jScrollActiveArrowButton:hover {
/*background-color: #f00;*/
}
@@ -0,0 +1,508 @@
/* Copyright (c) 2006 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* See http://kelvinluck.com/assets/jquery/jScrollPane/
* $Id: jScrollPane.js 47 2009-02-08 17:56:16Z kelvin.luck $
*/
/**
* Replace the vertical scroll bars on any matched elements with a fancy
* styleable (via CSS) version. With JS disabled the elements will
* gracefully degrade to the browsers own implementation of overflow:auto.
* If the mousewheel plugin has been included on the page then the scrollable areas will also
* respond to the mouse wheel.
*
* @example jQuery(".scroll-pane").jScrollPane();
*
* @name jScrollPane
* @type jQuery
* @param Object settings hash with options, described below.
* scrollbarWidth - The width of the generated scrollbar in pixels
* scrollbarMargin - The amount of space to leave on the side of the scrollbar in pixels
* wheelSpeed - The speed the pane will scroll in response to the mouse wheel in pixels
* showArrows - Whether to display arrows for the user to scroll with
* arrowSize - The height of the arrow buttons if showArrows=true
* animateTo - Whether to animate when calling scrollTo and scrollBy
* dragMinHeight - The minimum height to allow the drag bar to be
* dragMaxHeight - The maximum height to allow the drag bar to be
* animateInterval - The interval in milliseconds to update an animating scrollPane (default 100)
* animateStep - The amount to divide the remaining scroll distance by when animating (default 3)
* maintainPosition- Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
* scrollbarOnLeft - Display the scrollbar on the left side? (needs stylesheet changes, see examples.html)
* reinitialiseOnImageLoad - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded
* @return jQuery
* @cat Plugins/jScrollPane
* @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
*/
(function($) {
$.jScrollPane = {
active : []
};
$.fn.jScrollPane = function(settings)
{
settings = $.extend({}, $.fn.jScrollPane.defaults, settings);
var rf = function() { return false; };
return this.each(
function()
{
var $this = $(this);
// Switch the element's overflow to hidden to ensure we get the size of the element without the scrollbars [http://plugins.jquery.com/node/1208]
$this.css('overflow', 'hidden');
var paneEle = this;
if ($(this).parent().is('.jScrollPaneContainer')) {
var currentScrollPosition = settings.maintainPosition ? $this.position().top : 0;
var $c = $(this).parent();
var paneWidth = $c.innerWidth();
var paneHeight = $c.outerHeight();
var trackHeight = paneHeight;
$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown', $c).remove();
$this.css({'top':0});
} else {
var currentScrollPosition = 0;
this.originalPadding = $this.css('paddingTop') + ' ' + $this.css('paddingRight') + ' ' + $this.css('paddingBottom') + ' ' + $this.css('paddingLeft');
this.originalSidePaddingTotal = (parseInt($this.css('paddingLeft')) || 0) + (parseInt($this.css('paddingRight')) || 0);
var paneWidth = $this.innerWidth();
var paneHeight = $this.innerHeight();
var trackHeight = paneHeight;
$this.wrap(
$('<div></div>').attr(
{'className':'jScrollPaneContainer'}
).css(
{
'height':paneHeight+'px',
'width':paneWidth+'px'
}
)
);
// deal with text size changes (if the jquery.em plugin is included)
// and re-initialise the scrollPane so the track maintains the
// correct size
$(document).bind(
'emchange',
function(e, cur, prev)
{
$this.jScrollPane(settings);
}
);
}
if (settings.reinitialiseOnImageLoad) {
// code inspired by jquery.onImagesLoad: http://plugins.jquery.com/project/onImagesLoad
// except we re-initialise the scroll pane when each image loads so that the scroll pane is always up to size...
// TODO: Do I even need to store it in $.data? Is a local variable here the same since I don't pass the reinitialiseOnImageLoad when I re-initialise?
var $imagesToLoad = $.data(paneEle, 'jScrollPaneImagesToLoad') || $('img', $this);
var loadedImages = [];
if ($imagesToLoad.length) {
$imagesToLoad.each(function(i, val) {
$(this).bind('load', function() {
if($.inArray(i, loadedImages) == -1){ //don't double count images
loadedImages.push(val); //keep a record of images we've seen
$imagesToLoad = $.grep($imagesToLoad, function(n, i) {
return n != val;
});
$.data(paneEle, 'jScrollPaneImagesToLoad', $imagesToLoad);
settings.reinitialiseOnImageLoad = false;
$this.jScrollPane(settings); // re-initialise
}
}).each(function(i, val) {
if(this.complete || this.complete===undefined) {
//needed for potential cached images
this.src = this.src;
}
});
});
};
}
var p = this.originalSidePaddingTotal;
var cssToApply = {
'height':'auto',
'width':paneWidth - settings.scrollbarWidth - settings.scrollbarMargin - p + 'px'
}
if(settings.scrollbarOnLeft) {
cssToApply.paddingLeft = settings.scrollbarMargin + settings.scrollbarWidth + 'px';
} else {
cssToApply.paddingRight = settings.scrollbarMargin + 'px';
}
$this.css(cssToApply);
var contentHeight = $this.outerHeight();
var percentInView = paneHeight / contentHeight;
if (percentInView < .99) {
var $container = $this.parent();
$container.append(
$('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(
$('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(
$('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),
$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'})
)
)
);
var $track = $('>.jScrollPaneTrack', $container);
var $drag = $('>.jScrollPaneTrack .jScrollPaneDrag', $container);
if (settings.showArrows) {
var currentArrowButton;
var currentArrowDirection;
var currentArrowInterval;
var currentArrowInc;
var whileArrowButtonDown = function()
{
if (currentArrowInc > 4 || currentArrowInc%4==0) {
positionDrag(dragPosition + currentArrowDirection * mouseWheelMultiplier);
}
currentArrowInc ++;
};
var onArrowMouseUp = function(event)
{
$('html').unbind('mouseup', onArrowMouseUp);
currentArrowButton.removeClass('jScrollActiveArrowButton');
clearInterval(currentArrowInterval);
};
var onArrowMouseDown = function() {
$('html').bind('mouseup', onArrowMouseUp);
currentArrowButton.addClass('jScrollActiveArrowButton');
currentArrowInc = 0;
whileArrowButtonDown();
currentArrowInterval = setInterval(whileArrowButtonDown, 100);
};
$container
.append(
$('<a></a>')
.attr({'href':'javascript:;', 'className':'jScrollArrowUp'})
.css({'width':settings.scrollbarWidth+'px'})
.html('Scroll up')
.bind('mousedown', function()
{
currentArrowButton = $(this);
currentArrowDirection = -1;
onArrowMouseDown();
this.blur();
return false;
})
.bind('click', rf),
$('<a></a>')
.attr({'href':'javascript:;', 'className':'jScrollArrowDown'})
.css({'width':settings.scrollbarWidth+'px'})
.html('Scroll down')
.bind('mousedown', function()
{
currentArrowButton = $(this);
currentArrowDirection = 1;
onArrowMouseDown();
this.blur();
return false;
})
.bind('click', rf)
);
var $upArrow = $('>.jScrollArrowUp', $container);
var $downArrow = $('>.jScrollArrowDown', $container);
if (settings.arrowSize) {
trackHeight = paneHeight - settings.arrowSize - settings.arrowSize;
$track
.css({'height': trackHeight+'px', top:settings.arrowSize+'px'})
} else {
var topArrowHeight = $upArrow.height();
settings.arrowSize = topArrowHeight;
trackHeight = paneHeight - topArrowHeight - $downArrow.height();
$track
.css({'height': trackHeight+'px', top:topArrowHeight+'px'})
}
}
var $pane = $(this).css({'position':'absolute', 'overflow':'visible'});
var currentOffset;
var maxY;
var mouseWheelMultiplier;
// store this in a seperate variable so we can keep track more accurately than just updating the css property..
var dragPosition = 0;
var dragMiddle = percentInView*paneHeight/2;
// pos function borrowed from tooltip plugin and adapted...
var getPos = function (event, c) {
var p = c == 'X' ? 'Left' : 'Top';
return event['page' + c] || (event['client' + c] + (document.documentElement['scroll' + p] || document.body['scroll' + p])) || 0;
};
var ignoreNativeDrag = function() { return false; };
var initDrag = function()
{
ceaseAnimation();
currentOffset = $drag.offset(false);
currentOffset.top -= dragPosition;
maxY = trackHeight - $drag[0].offsetHeight;
mouseWheelMultiplier = 2 * settings.wheelSpeed * maxY / contentHeight;
};
var onStartDrag = function(event)
{
initDrag();
dragMiddle = getPos(event, 'Y') - dragPosition - currentOffset.top;
$('html').bind('mouseup', onStopDrag).bind('mousemove', updateScroll);
if ($.browser.msie) {
$('html').bind('dragstart', ignoreNativeDrag).bind('selectstart', ignoreNativeDrag);
}
return false;
};
var onStopDrag = function()
{
$('html').unbind('mouseup', onStopDrag).unbind('mousemove', updateScroll);
dragMiddle = percentInView*paneHeight/2;
if ($.browser.msie) {
$('html').unbind('dragstart', ignoreNativeDrag).unbind('selectstart', ignoreNativeDrag);
}
};
var positionDrag = function(destY)
{
destY = destY < 0 ? 0 : (destY > maxY ? maxY : destY);
dragPosition = destY;
$drag.css({'top':destY+'px'});
var p = destY / maxY;
$this.data('jScrollPanePosition', (paneHeight-contentHeight)*-p);
$pane.css({'top':((paneHeight-contentHeight)*p) + 'px'});
$this.trigger('scroll');
if (settings.showArrows) {
$upArrow[destY == 0 ? 'addClass' : 'removeClass']('disabled');
$downArrow[destY == maxY ? 'addClass' : 'removeClass']('disabled');
}
};
var updateScroll = function(e)
{
positionDrag(getPos(e, 'Y') - currentOffset.top - dragMiddle);
};
var dragH = Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2), settings.dragMaxHeight), settings.dragMinHeight);
$drag.css(
{'height':dragH+'px'}
).bind('mousedown', onStartDrag);
var trackScrollInterval;
var trackScrollInc;
var trackScrollMousePos;
var doTrackScroll = function()
{
if (trackScrollInc > 8 || trackScrollInc%4==0) {
positionDrag((dragPosition - ((dragPosition - trackScrollMousePos) / 2)));
}
trackScrollInc ++;
};
var onStopTrackClick = function()
{
clearInterval(trackScrollInterval);
$('html').unbind('mouseup', onStopTrackClick).unbind('mousemove', onTrackMouseMove);
};
var onTrackMouseMove = function(event)
{
trackScrollMousePos = getPos(event, 'Y') - currentOffset.top - dragMiddle;
};
var onTrackClick = function(event)
{
initDrag();
onTrackMouseMove(event);
trackScrollInc = 0;
$('html').bind('mouseup', onStopTrackClick).bind('mousemove', onTrackMouseMove);
trackScrollInterval = setInterval(doTrackScroll, 100);
doTrackScroll();
return false;
};
$track.bind('mousedown', onTrackClick);
$container.bind(
'mousewheel',
function (event, delta) {
initDrag();
ceaseAnimation();
var d = dragPosition;
positionDrag(dragPosition - delta * mouseWheelMultiplier);
var dragOccured = d != dragPosition;
return !dragOccured;
}
);
var _animateToPosition;
var _animateToInterval;
function animateToPosition()
{
var diff = (_animateToPosition - dragPosition) / settings.animateStep;
if (diff > 1 || diff < -1) {
positionDrag(dragPosition + diff);
} else {
positionDrag(_animateToPosition);
ceaseAnimation();
}
}
var ceaseAnimation = function()
{
if (_animateToInterval) {
clearInterval(_animateToInterval);
delete _animateToPosition;
}
};
var scrollTo = function(pos, preventAni)
{
if (typeof pos == "string") {
$e = $(pos, $this);
if (!$e.length) return;
pos = $e.offset().top - $this.offset().top;
}
$container.scrollTop(0);
ceaseAnimation();
var maxScroll = contentHeight - paneHeight;
pos = pos > maxScroll ? maxScroll : pos;
$this.data('jScrollPaneMaxScroll', maxScroll);
var destDragPosition = pos/maxScroll * maxY;
if (preventAni || !settings.animateTo) {
positionDrag(destDragPosition);
} else {
_animateToPosition = destDragPosition;
_animateToInterval = setInterval(animateToPosition, settings.animateInterval);
}
};
$this[0].scrollTo = scrollTo;
$this[0].scrollBy = function(delta)
{
var currentPos = -parseInt($pane.css('top')) || 0;
scrollTo(currentPos + delta);
};
initDrag();
scrollTo(-currentScrollPosition, true);
// Deal with it when the user tabs to a link or form element within this scrollpane
$('*', this).bind(
'focus',
function(event)
{
var $e = $(this);
// loop through parents adding the offset top of any elements that are relatively positioned between
// the focused element and the jScrollPaneContainer so we can get the true distance from the top
// of the focused element to the top of the scrollpane...
var eleTop = 0;
while ($e[0] != $this[0]) {
eleTop += $e.position().top;
$e = $e.offsetParent();
}
var viewportTop = -parseInt($pane.css('top')) || 0;
var maxVisibleEleTop = viewportTop + paneHeight;
var eleInView = eleTop > viewportTop && eleTop < maxVisibleEleTop;
if (!eleInView) {
var destPos = eleTop - settings.scrollbarMargin;
if (eleTop > viewportTop) { // element is below viewport - scroll so it is at bottom.
destPos += $(this).height() + 15 + settings.scrollbarMargin - paneHeight;
}
scrollTo(destPos);
}
}
)
if (location.hash) {
scrollTo(location.hash);
}
// use event delegation to listen for all clicks on links and hijack them if they are links to
// anchors within our content...
$(document).bind(
'click',
function(e)
{
$target = $(e.target);
if ($target.is('a')) {
var h = $target.attr('href');
if (h && h.substr(0, 1) == '#') {
scrollTo(h);
}
}
}
);
$.jScrollPane.active.push($this[0]);
} else {
$this.css(
{
'height':paneHeight+'px',
'width':paneWidth-this.originalSidePaddingTotal+'px',
'padding':this.originalPadding
}
);
// remove from active list?
$this.parent().unbind('mousewheel');
}
}
)
};
$.fn.jScrollPaneRemove = function()
{
$(this).each(function()
{
$this = $(this);
var $c = $this.parent();
if ($c.is('.jScrollPaneContainer')) {
$this.css(
{
'top':'',
'height':'',
'width':'',
'padding':'',
'overflow':'',
'position':''
}
);
$c.after($this).remove();
}
});
}
$.fn.jScrollPane.defaults = {
scrollbarWidth : 10,
scrollbarMargin : 5,
wheelSpeed : 18,
showArrows : false,
arrowSize : 0,
animateTo : false,
dragMinHeight : 1,
dragMaxHeight : 99999,
animateInterval : 100,
animateStep: 3,
maintainPosition: true,
scrollbarOnLeft: false,
reinitialiseOnImageLoad: false
};
// clean up the scrollTo expandos
$(window)
.bind('unload', function() {
var els = $.jScrollPane.active;
for (var i=0; i<els.length; i++) {
els[i].scrollTo = els[i].scrollBy = null;
}
}
);
})(jQuery);
@@ -0,0 +1,2 @@
// jQEm v0.2: http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('× ¢(){¿ ¾={\'²\':¢(»){£ »!=¤?¡.²=»:¡.²},\'¬\':¢(){£ ¡.¬()},\'«\':¢(¥){£ ¡.«(¥)},\'¯\':¢(¥){£ ¡.¯(¥)},\'¨\':¢(­,¶){£ ¡.¨(­,¶)},\'ª\':¢(){£ ¡.ª},\'³\':¢(¸){£ ¸?¡.³=¸:¡.³},\'©\':¢(){£ ¡.©()},\'°\':¢(){£ ¡.°()},\'§\':¢(){£ ¡.§},\'±\':¢(){£ ¡.±}};$.Ã=¾;¿ ¡={\'e\':$(Á.Ç(\'i\')),\'ª\':·,\'´\':¤,\'§\':¤,\'³\':È,\'½\':¤,\'±\':¤,\'²\':Å,\'¬\':¬,\'«\':«,\'¯\':¯,\'¨\':¨,\'º\':¢(){¡.¨(·);£\'¼\'},\'©\':©,\'°\':°};$(Á).É(¢(){¦(¡.²)¬()});¢ ¬(){$(\'Ê\').Ë(¡.e.Ì({\'Í\':\'Î\',\'Ï\':\'-¼\',\'Ð\':\'Ñ\',\'Ó\':\'Ô\',\'®\':\'¼\'}));¡.´=(¡.e.µ!=¤&&¡.e.µ.Â!=¤);¡.©()};¢ «(¥){¡.e.«(\'¹\',¥)};¢ ¯(¥){¡.e.¯(\'¹\',¥)};¢ ¨(­,¶){¦(­==¤)­=·;¦(­||¡.e.®()!=¡.§){¡.±=¡.§;¡.§=¡.e.®();$.Æ.¨(\'¹\',¶)}};¢ ©(){¦(¡.ª)£;¡.§=¡.±=¡.e.®();¦(¡.´){¡.e.µ.Â(\'®\',\'$.Ã.º();\')}À{¡.½=Ä.Ò(¡.º,¡.³)}¡.ª=Å};¢ °(){¦(!¡.ª)£;¦(¡.´){¡.e.µ.Õ(\'®\')}À{Ä.Ö(¡.½)}}}();',55,55,'Private|function|return|undefined|callback|if|current|trigger|start|active|bind|init|force|width|unbind|stop|previous|auto|delay|canExp|style|args|false|milliseconds|emchange|update|bool|1em|iid|Public|var|else|document|setExpression|jqem|window|true|event|createElement|100|ready|body|prepend|css|display|block|left|position|absolute|setInterval|visibility|hidden|removeExpression|removeInterval|new'.split('|')))
@@ -0,0 +1,3 @@
/* jQMinMax v0.1 - Copyright (c) 2006 Dave Cardwell (http://davecardwell.co.uk/)
Released under the MIT License (http://www.opensource.org/licenses/mit-license.php) */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u m(){$.5={D:y,v:y};$(G).12(m(){8 h=G.W(\'I\');$(h).e({\'3\':\'J\',\'6-3\':\'K\'});$(\'L\').M(h);$.5.v=(h.s&&h.s==2);$(h).N();b($.5.v)o;$.5.D=O;$.5.A();$(\':5\').5()});$.5.A=m(){8 p=u E(\'6-3\',\'6-4\',\'9-3\',\'9-4\');8 5=u E();Q(8 i=0;i<p.R;i++){8 n="$.e(a,\'"+p[i]+"\')!=\'S\'&&"+"$.e(a,\'"+p[i]+"\')!=\'z\'&&"+"$.e(a,\'"+p[i]+"\')!=f.g";b(p[i].U(2)==\'x\')n+="&&$.e(a,\'"+p[i]+"\')!=\'X\'";$.n[\':\'][p[i]]=n;5[i]=\'(\'+n+\')\'}$.n[\':\'][\'5\']=5.Y(\'||\')};$.Z.5=m(){o $(c).10(m(){8 7={\'6-3\':r(c,\'6-3\'),\'9-3\':r(c,\'9-3\'),\'6-4\':r(c,\'6-4\'),\'9-4\':r(c,\'9-4\')};8 3=c.s;8 4=c.w;8 k=3;8 l=4;b(7[\'9-3\']!=f.g&&k>7[\'9-3\'])k=7[\'9-3\'];b(7[\'6-3\']!=f.g&&k<7[\'6-3\'])k=7[\'6-3\'];b(7[\'9-4\']!=f.g&&l>7[\'9-4\'])l=7[\'9-4\'];b(7[\'6-4\']!=f.g&&l<7[\'6-4\'])l=7[\'6-4\'];b(k!=3)$(c).e(\'3\',k);b(l!=4)$(c).e(\'4\',l)})};m r(t,p){8 q=$(t).e(p);b(q==f.g||q==\'z\')o f.g;8 j;j=q.B(/^\\+?(\\d*(?:\\.\\d+)?)%$/);b(j){o T.V(C((/3$/.h(p)?$(t).F().H(0).s:$(t).F().H(0).w)*j[1]/P))}j=q.B(/^\\+?(\\d*(?:\\.\\d+)?)(?:11)?$/);b(j){o C(j[1])}o f.g}}();',62,65,'|||width|height|minmax|min|constraint|var|max||if|this||css|window|undefined|test||result|newWidth|newHeight|function|expr|return||raw|calculate|offsetWidth|obj|new|native|offsetHeight||false|auto|expressions|match|Number|active|Array|parent|document|get|div|1px|2px|body|append|remove|true|100|for|length|0px|Math|charAt|round|createElement|none|join|fn|each|px|ready'.split('|'),0,{}))
@@ -0,0 +1,91 @@
jQuery.fn.checkboxToggle = function(opt){
var check = jQuery(this).next()[0].checked == true;
jQuery(this)
.attr({ src: check ? opt.unchecked : opt.checked })
.next()[0].checked = !check;
}
jQuery.fn.checkbox = function(opt){
jQuery(":checkbox", this)
// Hide each native checkbox
.hide()
// Iterate through checkboxes and do all the magical stuff
.each(function (){
jQuery("<img>")
// Set image attributes
.attr({src: this.checked ? opt.checked : opt.unchecked, alt: "" })
//
.click(function() {
jQuery(this).checkboxToggle(opt);
})
// Attach image
.insertBefore(this);
});
}
jQuery.fn.cssCheckboxToggle = function(){
jQuery(this).each(function(){
var label = jQuery(this);
label.toggleClass("checked");
var check = jQuery(":checkbox[@name='"+label.attr("for")+"']")[0];
check.checked = !check.checked;
});
}
jQuery.fn.cssCheckboxCheck = function(){
jQuery(this).each(function(){
var label = jQuery(this);
label.addClass("checked");
var check = jQuery(":checkbox[@name='"+label.attr("for")+"']")[0];
check.checked = true;
});
}
jQuery.fn.cssCheckboxUncheck = function(){
jQuery(this).each(function(){
var label = jQuery(this);
label.removeClass("checked");
var check = jQuery(":checkbox[@name='"+label.attr("for")+"']")[0];
check.checked = false;
});
}
jQuery.fn.cssCheckbox = function(){
jQuery(":checkbox", this)
// Hide native checkboxes
.hide()
// Find related labels and add all the fancy stuff
.each(function(){
var check = this;
var jlabel = jQuery("label[@for='"+jQuery(check).attr("name")+"']");
// Initial state check
if (check.checked) {
jlabel.addClass("checked");
}
jlabel
// Label hover state
.hover(
function() { jQuery(this).addClass("over"); },
function() { jQuery(this).removeClass("over"); }
)
// Label click state
.click(function(){
jQuery(this).cssCheckboxToggle();
});
});
}
@@ -0,0 +1,123 @@
/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/
(function(jQuery){
// We override the animation for all of these color styles
jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
jQuery.fx.step[attr] = function(fx){
if ( fx.state == 0 ) {
fx.start = getColor( fx.elem, attr );
fx.end = getRGB( fx.end );
}
fx.elem.style[attr] = "rgb(" + [
Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
].join(",") + ")";
}
});
// Color Conversion functions from highlightFade
// By Blair Mitchelmore
// http://jquery.offput.ca/highlightFade/
// Parse strings looking for color tuples [255,255,255]
function getRGB(color) {
var result;
// Check if we're already dealing with an array of colors
if ( color && color.constructor == Array && color.length == 3 )
return color;
// Look for rgb(num,num,num)
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
// Look for rgb(num%,num%,num%)
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
// Look for #a0b1c2
if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
// Look for #fff
if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
// Otherwise, we're most likely dealing with a named color
return colors[jQuery.trim(color).toLowerCase()];
}
function getColor(elem, attr) {
var color;
do {
color = jQuery.curCSS(elem, attr);
// Keep going until we find an element that has color, or we hit the body
if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
break;
attr = "backgroundColor";
} while ( elem = elem.parentNode );
return getRGB(color);
};
// Some named colors to work with
// From Interface by Stefan Petre
// http://interface.eyecon.ro/
var colors = {
aqua:[0,255,255],
azure:[240,255,255],
beige:[245,245,220],
black:[0,0,0],
blue:[0,0,255],
brown:[165,42,42],
cyan:[0,255,255],
darkblue:[0,0,139],
darkcyan:[0,139,139],
darkgrey:[169,169,169],
darkgreen:[0,100,0],
darkkhaki:[189,183,107],
darkmagenta:[139,0,139],
darkolivegreen:[85,107,47],
darkorange:[255,140,0],
darkorchid:[153,50,204],
darkred:[139,0,0],
darksalmon:[233,150,122],
darkviolet:[148,0,211],
fuchsia:[255,0,255],
gold:[255,215,0],
green:[0,128,0],
indigo:[75,0,130],
khaki:[240,230,140],
lightblue:[173,216,230],
lightcyan:[224,255,255],
lightgreen:[144,238,144],
lightgrey:[211,211,211],
lightpink:[255,182,193],
lightyellow:[255,255,224],
lime:[0,255,0],
magenta:[255,0,255],
maroon:[128,0,0],
navy:[0,0,128],
olive:[128,128,0],
orange:[255,165,0],
pink:[255,192,203],
purple:[128,0,128],
violet:[128,0,128],
red:[255,0,0],
silver:[192,192,192],
white:[255,255,255],
yellow:[255,255,0]
};
})(jQuery);
@@ -0,0 +1,96 @@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
* used when the cookie was set.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// CAUTION: Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
@@ -0,0 +1,12 @@
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
* $Rev: 4257 $
*
* Version: 1.2
*
* Requires: jQuery 1.2+
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.19={P:\'1.2\'};$.u([\'j\',\'w\'],5(i,d){$.q[\'O\'+d]=5(){p(!3[0])6;g a=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';6 3.B(\':y\')?3[0][\'L\'+d]:4(3,d.x())+4(3,\'n\'+a)+4(3,\'n\'+e)};$.q[\'I\'+d]=5(b){p(!3[0])6;g c=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';b=$.F({t:Z},b||{});g a=3.B(\':y\')?3[0][\'8\'+d]:4(3,d.x())+4(3,\'E\'+c+\'w\')+4(3,\'E\'+e+\'w\')+4(3,\'n\'+c)+4(3,\'n\'+e);6 a+(b.t?(4(3,\'t\'+c)+4(3,\'t\'+e)):0)}});$.u([\'m\',\'s\'],5(i,b){$.q[\'l\'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b==\'m\'?a:$(h)[\'U\'](),b==\'s\'?a:$(h)[\'T\']()):3[\'l\'+b]=a}):3[0]==h||3[0]==r?S[(b==\'m\'?\'R\':\'Q\')]||$.N&&r.M[\'l\'+b]||r.A[\'l\'+b]:3[0][\'l\'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,\'K\');8.k-=4(o,\'J\');9.f+=4(7,\'H\');9.k+=4(7,\'Y\');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,\'z\')==\'13\'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);',62,72,'|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions'.split('|'),0,{}))
@@ -0,0 +1,140 @@
/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.extend( jQuery.easing,
{
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
@@ -0,0 +1,14 @@
/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* 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.
*
* $LastChangedDate: 2007-12-14 23:57:10 -0600 (Fri, 14 Dec 2007) $
* $Rev: 4163 $
*
* Version: 3.0
*
* Requires: $ 1.2.2+
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.6.j.4={L:5(){9 b=$.6.j.4.i;7($.8.f)$(2).o(\'y.4\',5(a){$.d(2,\'h\',{x:a.x,l:a.l,s:a.s,r:a.r})});7(2.q)2.q(($.8.f?\'v\':\'4\'),b,n);m 2.w=b},D:5(){9 a=$.6.j.4.i;$(2).k(\'y.4\');7(2.u)2.u(($.8.f?\'v\':\'4\'),a,n);m 2.w=5(){};$.A(2,\'h\')},i:5(a){9 c=U.T.S.P(O,1);a=$.6.N(a||M.6);$.t(a,$.d(2,\'h\')||{});9 b=0,K=J;7(a.e)b=a.e/I;7(a.p)b=-a.p/3;7($.8.H)b=-a.e;a.d=a.d||{};a.G="4";c.z(b);c.z(a);g $.6.F.E(2,c)}};$.Q.t({4:5(a){g a?2.o("4",a):2.R("4")},C:5(a){g 2.k("4",a)}})})(B);',57,57,'||this||mousewheel|function|event|if|browser|var||||data|wheelDelta|mozilla|return|mwcursorposdata|handler|special|unbind|pageY|else|false|bind|detail|addEventListener|clientY|clientX|extend|removeEventListener|DOMMouseScroll|onmousewheel|pageX|mousemove|unshift|removeData|jQuery|unmousewheel|teardown|apply|handle|type|opera|120|true|returnValue|setup|window|fix|arguments|call|fn|trigger|slice|prototype|Array'.split('|'),0,{}))
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('18.1N.1i=q(z,s,X){c V=[];c p=[];P 18(d).1j(q(){17(c i=0;i<d.A.F(" ").u;i++){8(d.A.F(" ")[i]==z)P}c N={};c m=(s&&r s!="O")?s:X;c j=($(d).o("l")||\'\');8(r j==\'K\')j=j["E"];c h=d.1l(1m);$(h).1f($(d).1f());$(h).J("1n","1o").J("R","1p");$(d.1q).1r(h);8(r s!="O")$(h).10(0).A=d.A;t $(h).10(0).A="";$(h).W(z);8(Q.L){c w=Q.L.1d(d,11);c g=Q.L.1d(h,11)}t{c w=d.19;c g=h.19}8(y.v!=T)v.U("1s 1A 1t 1u "+z+" 1v 1w 1x 1y:");17(c n 1z g){8(r g[n]!="q"&&g[n]&&n.G("1B")==-1&&n.G("u")==-1&&g[n]!=w[n]){8(n.G("1C")==-1&&n.G("1D")==-1){8(!1E(9(g[n].D(/S/,"")))){8(w.R!="1a"||(w.R=="1a"&&n!="1G"&&n!="1H"&&n!="1I"&&n!="1J")){8(y.v!=T)v.U(n+": "+9(g[n].D(/S/,"")));N[n]=9(g[n].D(/S/,""))}}}t{12(d,n,w[n],g[n],m,j);8(y.v!=T)v.U(n+": "+g[n])}}}$(d).1M(N,m,q(){8(r s=="O")$(d).1h(s);$(d).W(z);8(r $(d).o("l")==\'K\'){$(d).o("l")["E"]="";$(d).o("l")["E"]=j}t{$(d).o("l",j)}$(h).1k()})});q 12(C,f,a,b,m,j){c k,e;8(a=="Z"){e=[x,x,x]}t{8(a.6(0,3)=="B")e=a.6(4).D(/\\)/,"").F(",");8(a.6(0,1)=="#"&&a.u==7)e=[9(a.6(1,2),16),9(a.6(3,2),16),9(a.6(5,2),16)];8(a.6(0,1)=="#"&&a.u==4)e=[9(a.6(1,1)+a.6(1,1),16),9(a.6(2,1)+a.6(2,1),16),9(a.6(3,1)+a.6(3,1),16)];8(a.6(0,3)!="B"&&a.6(0,1)!="#")e=M(a)}8(b=="Z"){k=[x,x,x]}t{8(b.6(0,3)=="B")k=b.6(4).D(/\\)/,"").F(",");8(b.6(0,1)=="#"&&b.u==7)k=[9(b.6(1,2),16),9(b.6(3,2),16),9(b.6(5,2),16)];8(b.6(0,1)=="#"&&b.u==4)k=[9(b.6(1,1)+b.6(1,1),16),9(b.6(2,1)+b.6(2,1),16),9(b.6(3,1)+b.6(3,1),16)];8(b.6(0,3)!="B"&&b.6(0,1)!="#")k=M(b)}c 1e=9(k[0])-9(e[0]);c 1g=9(k[1])-9(e[1]);c Y=9(k[2])-9(e[2]);p[f]=0;V[f]=y.1F(1b,1c);q 1b(){p[f]=p[f]+1c;c 14=H.I(9(e[0])+(1e/m)*p[f]);c 13=H.I(9(e[1])+(1g/m)*p[f]);c 15=H.I(9(e[2])+(Y/m)*p[f]);$(C).J(f,"B("+14+","+13+","+15+")");8(p[f]==m){y.1K(V[f]);8(r $(C).o("l")==\'K\'){$(C).o("l")["E"]="";$(C).o("l")["E"]=j}}};q M(1L){P[0,0,0]}}};',62,112,'||||||substr||if|parseInt|oldColor|newColor|var|this|oSC|prop|newStyle|dummyEl||oldStyleAttr|nSC|style|aniDuration||attr|colorTimers|function|typeof|c2|else|length|console|oldStyle|255|window|c1|className|rgb|that|replace|cssText|split|indexOf|Math|round|css|object|defaultView|colorToArray|aniObj|string|return|document|position|px|undefined|log|colorIntervals|addClass|c3|diffB|transparent|get|null|animateColor|newG|newR|newB||for|jQuery|currentStyle|static|intervalColor|20|getComputedStyle|diffR|html|diffG|removeClass|animateClass|each|remove|cloneNode|true|visibility|hidden|absolute|parentNode|append|Animating|to|class|with|the|following|properties|in|element|Moz|Color|color|isNaN|setInterval|left|top|bottom|right|clearInterval|cColor|animate|fn'.split('|'),0,{}))
@@ -0,0 +1 @@
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('c B=[];T.1w.1g=s(L,10){c K=[];c o=[];17 T(d).1h(s(){c Q={};c m=10;c k=($(d).j("h")||\'\');9(A k==\'I\')k=k["y"];9(B[d]==H)17;p B[d]=H;c l=d.1i(H);$(l).V($(d).V());$(d.1j).1k(l);$(l).j("h",L);$(l).D("19","1m").D("E","1n");9(J.M){c t=J.M.12(d,15);c e=J.M.12(l,15)}p{c t=d.Y;c e=l.Y}9(x.q!=P)q.F("1o 1v 1p h "+L+" 1q 1r 1s 1t:");1u(c n 1x e){9(A e[n]!="s"&&e[n]&&n.C("1y")==-1&&n.C("w")==-1&&e[n]!=t[n]){9(n.C("1z")==-1&&n.C("1A")==-1){9(!1B(8(e[n].u(/N/,"")))){9(t.E!="13"||(t.E=="13"&&n!="1C"&&n!="1D"&&n!="1E"&&n!="1G")){9(x.q!=P)q.F(n+": "+8(e[n].u(/N/,"")));Q[n]=8(e[n].u(/N/,""))}}p{9(n!="19"&&n!="E")$(d).D(n,e[n])}}p{X(d,n,t[n],e[n],m,k);9(x.q!=P)q.F(n+": "+e[n])}}}$(d).1d(Q,m,s(){9(A $(d).j("h")==\'I\'){$(d).j("h")["y"]="";$(d).j("h")["y"]=k}p{$(d).j("h",k)}$(l).1e();B[d]=1f})});s X(v,g,a,b,m,k){c i,f;9(a=="U"){f=[r,r,r]}p{9(a.6(0,3)=="z")f=a.6(4).u(/\\)/,"").W(",");9(a.6(0,1)=="#"&&a.w==7)f=[8(a.6(1,2),16),8(a.6(3,2),16),8(a.6(5,2),16)];9(a.6(0,1)=="#"&&a.w==4)f=[8(a.6(1,1)+a.6(1,1),16),8(a.6(2,1)+a.6(2,1),16),8(a.6(3,1)+a.6(3,1),16)];9(a.6(0,3)!="z"&&a.6(0,1)!="#")f=11(a)}9(b=="U"){i=[r,r,r]}p{9(b.6(0,3)=="z")i=b.6(4).u(/\\)/,"").W(",");9(b.6(0,1)=="#"&&b.w==7)i=[8(b.6(1,2),16),8(b.6(3,2),16),8(b.6(5,2),16)];9(b.6(0,1)=="#"&&b.w==4)i=[8(b.6(1,1)+b.6(1,1),16),8(b.6(2,1)+b.6(2,1),16),8(b.6(3,1)+b.6(3,1),16)];9(b.6(0,3)!="z"&&b.6(0,1)!="#")i=11(b)}c R=8(i[0])-8(f[0]);c S=8(i[1])-8(f[1]);c Z=8(i[2])-8(f[2]);o[g]=0;K[g]=x.1F(1a,1b);s 1a(){o[g]=o[g]+1b;c 14=O.G(8(f[0])+(R/m)*o[g]);c 18=O.G(8(f[1])+(S/m)*o[g]);c 1c=O.G(8(f[2])+(Z/m)*o[g]);$(v).D(g,"z("+14+","+18+","+1c+")");9(o[g]==m){x.1l(K[g]);9(A $(v).j("h")==\'I\'){$(v).j("h")["y"]="";$(v).j("h")["y"]=k}}}}};',62,105,'||||||substr||parseInt|if|oldColor|newColor|var|this|newStyle|oSC|prop|style|nSC|attr|oldStyleAttr|dummyEl|aniDuration||colorTimers|else|console|255|function|oldStyle|replace|that|length|window|cssText|rgb|typeof|animateStyleIsRunning|indexOf|css|position|log|round|true|object|document|colorIntervals|c1|defaultView|px|Math|undefined|aniString|diffR|diffG|jQuery|transparent|html|split|animateColor|currentStyle|diffB|c2|colorToArray|getComputedStyle|static|newR|null||return|newG|visibility|intervalColor|20|newB|animate|remove|false|animateStyle|each|cloneNode|parentNode|append|clearInterval|hidden|absolute|Animating|to|with|the|following|properties|for|element|fn|in|Moz|Color|color|isNaN|left|top|bottom|setInterval|right'.split('|'),0,{}))
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More