[PLUGINS] +crayons et enluminures
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 25 Jun 2013 22:23:58 +0000 (00:23 +0200)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 25 Jun 2013 22:23:58 +0000 (00:23 +0200)
178 files changed:
www/plugins/crayons/action/crayons.php [new file with mode: 0644]
www/plugins/crayons/action/crayons_html.php [new file with mode: 0644]
www/plugins/crayons/action/crayons_store.php [new file with mode: 0644]
www/plugins/crayons/action/crayons_upload.php [new file with mode: 0644]
www/plugins/crayons/controleurs/article_intro.html [new file with mode: 0644]
www/plugins/crayons/controleurs/article_intro2.html [new file with mode: 0644]
www/plugins/crayons/controleurs/article_intro3.php [new file with mode: 0644]
www/plugins/crayons/controleurs/article_introduction.html [new file with mode: 0644]
www/plugins/crayons/controleurs/article_introduction.php [new file with mode: 0644]
www/plugins/crayons/controleurs/article_texte.html [new file with mode: 0644]
www/plugins/crayons/controleurs/auteur_email.html [new file with mode: 0644]
www/plugins/crayons/controleurs/auteur_nom.html [new file with mode: 0644]
www/plugins/crayons/controleurs/auteur_qui.html [new file with mode: 0644]
www/plugins/crayons/controleurs/breve_hyperlien.html [new file with mode: 0644]
www/plugins/crayons/controleurs/document_fichier.html [new file with mode: 0644]
www/plugins/crayons/controleurs/extra.html [new file with mode: 0644]
www/plugins/crayons/controleurs/extra_fonctions.php [new file with mode: 0644]
www/plugins/crayons/controleurs/forum_email.html [new file with mode: 0644]
www/plugins/crayons/controleurs/forum_id_article.html [new file with mode: 0644]
www/plugins/crayons/controleurs/forum_nom.html [new file with mode: 0644]
www/plugins/crayons/controleurs/forum_qui.html [new file with mode: 0644]
www/plugins/crayons/controleurs/hyperlien.html [new file with mode: 0644]
www/plugins/crayons/controleurs/id_parent.html [new file with mode: 0644]
www/plugins/crayons/controleurs/logo.html [new file with mode: 0644]
www/plugins/crayons/controleurs/mots_article_brut.html [new file with mode: 0644]
www/plugins/crayons/controleurs/portfolio.php [new file with mode: 0644]
www/plugins/crayons/controleurs/signature_email.html [new file with mode: 0644]
www/plugins/crayons/controleurs/signature_nom.html [new file with mode: 0644]
www/plugins/crayons/controleurs/signature_qui.html [new file with mode: 0644]
www/plugins/crayons/controleurs/statut.html [new file with mode: 0644]
www/plugins/crayons/controleurs/syndic_article_hyperlien.html [new file with mode: 0644]
www/plugins/crayons/controleurs/vignette.html [new file with mode: 0644]
www/plugins/crayons/crayons.css [new file with mode: 0644]
www/plugins/crayons/crayons.js.html [new file with mode: 0644]
www/plugins/crayons/crayons.js_fonctions.php [new file with mode: 0644]
www/plugins/crayons/crayons_fonctions.php [new file with mode: 0644]
www/plugins/crayons/fonds/cfg_crayons.html [new file with mode: 0644]
www/plugins/crayons/formulaires/configurer_crayons.html [new file with mode: 0644]
www/plugins/crayons/images/annuler-16.png [new file with mode: 0644]
www/plugins/crayons/images/changed.png [new file with mode: 0644]
www/plugins/crayons/images/crayon-128.png [new file with mode: 0644]
www/plugins/crayons/images/crayon-24.png [new file with mode: 0644]
www/plugins/crayons/images/crayon-32.png [new file with mode: 0644]
www/plugins/crayons/images/crayon.png [new file with mode: 0644]
www/plugins/crayons/images/crayon20.png [new file with mode: 0644]
www/plugins/crayons/images/edit.png [new file with mode: 0644]
www/plugins/crayons/images/ok-16.png [new file with mode: 0755]
www/plugins/crayons/images/pencil.png [new file with mode: 0644]
www/plugins/crayons/images/resizer.png [new file with mode: 0644]
www/plugins/crayons/images/searching.gif [new file with mode: 0644]
www/plugins/crayons/inc/compat_crayons.php [new file with mode: 0644]
www/plugins/crayons/inc/crayons-json.php [new file with mode: 0644]
www/plugins/crayons/inc/crayons.php [new file with mode: 0644]
www/plugins/crayons/js/crayons-fade.js [new file with mode: 0644]
www/plugins/crayons/js/crayons.js [new file with mode: 0644]
www/plugins/crayons/js/jquery.form.js [new file with mode: 0644]
www/plugins/crayons/js/jquery.html5uploader.min.js [new file with mode: 0644]
www/plugins/crayons/js/jquery.js [new file with mode: 0644]
www/plugins/crayons/js/jquery.px.js [new file with mode: 0644]
www/plugins/crayons/js/resizehandle.js [new file with mode: 0644]
www/plugins/crayons/js/uploader.js.html [new file with mode: 0644]
www/plugins/crayons/lang/crayons.xml [new file with mode: 0644]
www/plugins/crayons/lang/crayons_ar.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_ast.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_br.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_ca.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_de.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_en.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_eo.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_es.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_eu.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_fa.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_fr.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_fr_tu.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_gl.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_it.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_it_fem.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_km.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_lb.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_nl.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_oc_lnc.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_pt_br.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_ro.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_ru.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_sk.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_sv.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_tr.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_tw.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_zh.php [new file with mode: 0644]
www/plugins/crayons/lang/crayons_zh_tw.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons.xml [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_ar.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_de.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_en.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_es.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_fr.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_it.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_nl.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_ru.php [new file with mode: 0644]
www/plugins/crayons/lang/paquet-crayons_sk.php [new file with mode: 0644]
www/plugins/crayons/lib/JavaScriptPacker/class.JavaScriptPacker.php [new file with mode: 0644]
www/plugins/crayons/modeles/uploader_item.html [new file with mode: 0644]
www/plugins/crayons/modeles/uploader_liste.html [new file with mode: 0644]
www/plugins/crayons/paquet.xml [new file with mode: 0644]
www/plugins/crayons/plugin.xml [new file with mode: 0644]
www/plugins/crayons/prive/squelettes/contenu/configurer_crayons.html [new file with mode: 0644]
www/plugins/crayons/svn.revision [new file with mode: 0644]
www/plugins/crayons/tetecrayons.php [new file with mode: 0644]
www/plugins/crayons/vues/article_intro.html [new file with mode: 0644]
www/plugins/crayons/vues/article_intro2.html [new file with mode: 0644]
www/plugins/crayons/vues/article_intro3.html [new file with mode: 0644]
www/plugins/crayons/vues/article_introduction.html [new file with mode: 0644]
www/plugins/crayons/vues/article_texte.html [new file with mode: 0644]
www/plugins/crayons/vues/document_fichier.html [new file with mode: 0644]
www/plugins/crayons/vues/extra.html [new file with mode: 0644]
www/plugins/crayons/vues/extra_fonctions.php [new file with mode: 0644]
www/plugins/crayons/vues/hyperlien.html [new file with mode: 0644]
www/plugins/crayons/vues/id_parent.html [new file with mode: 0644]
www/plugins/crayons/vues/logo.html [new file with mode: 0644]
www/plugins/crayons/vues/mots_article_brut.html [new file with mode: 0644]
www/plugins/crayons/vues/qui.html [new file with mode: 0644]
www/plugins/crayons/vues/rubrique_id_parent.html [new file with mode: 0644]
www/plugins/crayons/vues/vignette.html [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/css/enluminurestypo.css [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/css/enluminurestypo_prive.css [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/inserer_colonne.gif [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/inserer_ligne.gif [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/supprimer_ligne.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/table.css [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/table.js [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/table_rtl.css [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/table_rtl.js [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/editeur/tableau_edit.html [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/enluminures_typo_pipelines.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/exec/tableau_edit.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/fonds/cfg_bte.html [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/formulaires/configurer_typoenluminee.html [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/avances.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/barre-tableau.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/barre-wiki.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/cadretexte.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/center.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/eacute-maj.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/exposant.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/indice.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/intertitre2.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/intertitre3.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/left.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/listenum.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/listepuces.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence2.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/oelig-maj.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/oelig.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code_red.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/petitescapitales.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/poesie.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/right.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/tag.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/icones_barre/text_strikethrough.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/img_pack/e.gif [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/img_pack/moinecopiste.gif [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/enlumtypo_ar.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/enlumtypo_en.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/enlumtypo_es.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/enlumtypo_fr.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/enlumtypo_it.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/lang/paquet-typoenluminee_fr.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/paquet.xml [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/plugin.xml [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/prive/squelettes/contenu/configurer_typoenluminee.html [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-16.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-32.png [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/svn.revision [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/typoenluminee.php [new file with mode: 0644]
www/plugins/enluminures_typographiques_v3/typoenluminee_pipelines.php [new file with mode: 0644]
www/plugins/skel_ptitvelo/paquet.xml

diff --git a/www/plugins/crayons/action/crayons.php b/www/plugins/crayons/action/crayons.php
new file mode 100644 (file)
index 0000000..ab776a0
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// On a ete appele par un formulaire normal (ajax est traite par crayons_store)
+function action_crayons_dist() {
+       include_spip('action/crayons_store');
+       $r = crayons_store();
+
+       // soit exit, soit un redirect gere par SPIP
+       if (trim($r['$erreur'])) {
+               include_spip('inc/minipres');
+               echo minipres($r['$erreur']);
+               exit;
+       }
+
+       // S'il n'y a pas de redirect, on est mal : eviter toutefois la page blanche
+       if (!_request('redirect'))
+               die('OK');
+
+       // Invalider le cache parce que bon... a priori on est dans une
+       // interface qui va avoir besoin de refresh
+       include_spip('inc/invalideur');
+       suivre_invalideur('1');
+}
+
+?>
\ No newline at end of file
diff --git a/www/plugins/crayons/action/crayons_html.php b/www/plugins/crayons/action/crayons_html.php
new file mode 100644 (file)
index 0000000..fcd47a0
--- /dev/null
@@ -0,0 +1,432 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+/**
+ * Affiche le controleur (formulaire) d'un crayon
+ * suivant la classe CSS décrivant le champ à éditer (produit par #EDIT)
+ *
+ * @param string $class
+ *   Class CSS décrivant le champ
+ * @param null $c
+ * 
+ * @return array
+ *   Tableau avec 2 entrées possibles :
+ *   - '$erreur' : texte d'erreur éventuel
+ *   - '$html' : code HTML du controleur
+**/
+function affiche_controleur($class, $c=null) {
+       $return = array('$erreur'=>'');
+
+       if (preg_match(_PREG_CRAYON, $class, $regs)) {
+               list(,$nomcrayon,$type,$champ,$id) = $regs;
+               $regs[] = $class;
+
+               // A-t-on le droit de crayonner ?
+               spip_log("autoriser('crayonner', $type, $id, NULL, array('modele'=>$champ)","crayons_distant");
+               if (!autoriser('crayonner',$type, $id, NULL, array('modele'=>$champ))) {
+                       $return['$erreur'] = "$type $id: " . _U('crayons:non_autorise');
+               } else {
+                       $f = charger_fonction($type.'_'.$champ, 'controleurs', true)
+                       OR $f = charger_fonction($champ, 'controleurs', true)
+                       OR $f = charger_fonction($type, 'controleurs', true)
+                       OR $f = 'controleur_dist';
+                       list($html,$status) = $f($regs, $c);
+                       if ($status) {
+                               $return['$erreur'] = $html;
+                       } else {
+                               $return['$html'] = $html;
+                       }
+               }
+       } else {
+               $return['$erreur'] = _U('crayons:donnees_mal_formatees');
+       }
+
+       return $return;
+}
+
+function controleur_dist($regs, $c=null) {
+       list( , $nomcrayon, $type, $champ, $id, $class) = $regs;
+       $options = array(
+               'class' => $class
+       );
+       list($distant,$table) = distant_table($type);
+
+       // Si le controleur est un squelette html, on va chercher
+       // les champs qu'il lui faut dans la table demandee
+       // Attention, un controleur multi-tables ne fonctionnera
+       // que si les champs ont le meme nom dans toutes les tables
+       // (par exemple: hyperlien est ok, mais pas nom)
+       if (($fichier = find_in_path(
+       ($controleur = 'controleurs/' . $type . '_' . $champ) . '.html'))
+       || ($fichier = find_in_path(
+       ($controleur = 'controleurs/' . $champ) .'.html'))) {
+               if (!lire_fichier($fichier, $controldata))
+                       die('erreur lecture controleur');
+               if (preg_match_all('/\bname=(["\'])#ENV\{name_(\w+)\}\1/',
+               $controldata, $matches, PREG_PATTERN_ORDER)) {
+                       $champ = $matches[2];
+               }
+       } else {
+               $controleur = '';
+       }
+
+       $valeur = valeur_colonne_table($type, $champ, $id);
+
+       #spip_log("$valeur = valeur_colonne_table($type, $champ, $id);");
+       #spip_log($champ);
+
+       if ($valeur === false) {
+               return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
+       }
+/*     if (is_scalar($valeur)) {
+               $valeur = array($champ => $valeur);
+       }*/
+
+       // type du crayon (a revoir quand le core aura type ses donnees)
+       $inputAttrs = array();
+       if ($controleur) {
+               $options['hauteurMini'] = 80; // base de hauteur mini
+               $option['inmode'] = 'controleur';
+               $options['controleur'] = $controleur;
+       } else
+       // si la valeur fait plusieurs lignes on doit mettre un textarea
+       // derogation specifique pour descriptif_site de spip_metas
+       if (
+       preg_match(",[\n\r],", $valeur[$champ])
+               OR (($champ == 'valeur') && ($id == 'descriptif_site'))
+               OR
+       // on regarde le type tel que defini dans serial
+       // (attention il y avait des blob dans les vieux spip)
+       ($sqltype = colonne_table($type, $champ)) &&
+          ( in_array($sqltype['type'] , array('mediumtext', 'longblob', 'longtext')) ||
+          (($sqltype['type'] == 'text' || $sqltype['type'] == 'blob') && in_array($champ, array('descriptif', 'bio'))))) {
+               $options['hauteurMini'] = 80; // hauteur mini d'un textarea
+               $option['inmode'] = 'texte';
+       } else { // ligne, hauteur naturelle
+               $options['hauteurMaxi'] = 0;
+               $option['inmode'] = 'ligne';
+               // c'est un nombre entier
+               if ($sqltype['long']) {
+                       // si long est [4,3] sa longueur maxi est 8 (1234,123)
+                       if (is_array($sqltype['long'])) {
+                               if (count($sqltype['long']) == 2) {
+                                       $inputAttrs['maxlength'] = $sqltype['long'][0] + 1 + $sqltype['long'][1];
+                               }
+                               // on ne sait pas ce que c'est !
+                               else {
+                                       $inputAttrs['maxlength'] = $sqltype['long'][0];
+                               }
+                       } else {
+                               $inputAttrs['maxlength'] = $sqltype['long'];
+                       } 
+               }
+       }
+
+       $crayon = new Crayon($nomcrayon, $valeur, $options, $c);
+       $inputAttrs['style'] = implode('',$crayon->styles);
+
+       if (!$controleur) {
+               $inputAttrs['style'] .= 'width:' . $crayon->largeur . 'px;' .
+                ($crayon->hauteur ? ' height:' . $crayon->hauteur . 'px;' : '');
+       }
+
+       $html = $controleur ? $crayon->formulaire(null, $inputAttrs) :
+                                       $crayon->formulaire($option['inmode'], $inputAttrs);
+       $status = NULL;
+
+       return array($html,$status);
+}
+
+// Definition des crayons
+class Crayon {
+       // le nom du crayon "type-modele-id" comme "article-introduction-237"
+       var $name;
+       // type, a priori une table, extrait du nom plus eventuellement base distante
+       var $type;
+       // table la table a crayonner
+       var $table;
+       // distant base distante
+       var $distant;
+       // modele, un champ comme "texte" ou un modele, extrait du nom
+       var $modele;
+       // l'identificateur dans le type, comme un numero d'article
+       var $id;
+       // la ou les valeurs des champs du crayon, tableau associatif champ => valeur
+       var $texts = array();
+       // une cle unique pour chaque crayon demande
+       var $key;
+       // un md5 associe aux valeurs pour verifier et detecter si elles changent
+       var $md5;
+       // dimensions indicatives
+       var $largeurMini = 170;
+       var $largeurMaxi = 700;
+       var $hauteurMini = 80;
+       var $hauteurMaxi = 700;
+       var $largeur;
+       // le mode d'entree: texte, ligne ou controleur
+       var $inmode = '';
+       // eventuellement le fond modele pour le controleur
+       var $controleur = '';
+       var $styles = array();
+
+       // le constructeur du crayon
+       // $name : son nom
+       // $texts : tableau associatif des valeurs ou valeur unique si crayon monochamp
+       // $options : options directes du crayon (developpement)
+       function Crayon($name, $texts = array(), $options = array(), $c=null) {
+               $this->name = $name;
+               list($this->type, $this->modele, $this->id) = explode('-', $this->name, 3);
+               list($this->distant,$this->table) = distant_table($this->type);
+               if (is_scalar($texts) || is_null($texts)) {
+                       $texts = array($this->modele => $texts);
+               }
+               $this->texts = $texts;
+               $this->key = strtr(uniqid('wid', true), '.', '_');
+               $this->md5 = $this->md5();
+               foreach ($options as $opt=>$val) {
+                       $this->$opt = $val;
+               }
+               $this->dimension($c);
+               $this->css();
+       }
+
+       // calcul du md5 associe aux valeurs
+       function md5() {
+               #spip_log($this->texts, 'crayons');
+               return md5(serialize($this->texts));
+       }
+
+       // dimensions indicatives
+       function dimension($c) {
+               // largeur du crayon
+               $this->largeur = min(max(intval(_request('w', $c)),
+                                       $this->largeurMini), $this->largeurMaxi);
+               // hauteur maxi d'un textarea selon wh: window height
+               $maxheight = min(max(intval(_request('wh', $c)) - 50, 400), $this->hauteurMaxi);
+               $this->hauteur = min(max(intval(_request('h', $c)), $this->hauteurMini), $maxheight);
+               $this->left = _request('left');
+               $this->top = _request('top');
+               $this->w = _request('w');
+               $this->h = _request('h');
+               $this->ww = _request('ww');
+               $this->wh = _request('wh');
+       }
+
+       // recuperer les elements de style
+       function css() {
+               foreach(array('color', 'font-size', 'font-family', 'font-weight', 'line-height', 'min-height', 'text-align') as $property) {
+                       if (null !== ($p = _request($property)))
+                               $this->styles[] = "$property:$p;";
+               }
+
+               $property = 'background-color';
+               if (!$p = _request($property)
+               OR $p == 'transparent') {
+                       $p = 'white';
+               }
+               $this->styles[] = "$property:$p;";
+       }
+
+       // formulaire standard
+       function formulaire($contexte = array(), $inputAttrs = array()) {
+               return
+                       $this->code() .
+                       $this->input($contexte, $inputAttrs);
+       }
+
+       // balises input type hidden d'identification du crayon
+       function code() {
+               return
+                '<input type="hidden" class="crayon-id" name="crayons[]"'
+               .' value="'.$this->key.'" />'."\n"
+               . '<input type="hidden" name="name_'.$this->key
+               .'" value="'.$this->name.'" />'."\n"
+               . '<input type="hidden" name="class_' . $this->key
+               . '" value="' . $this->class . '" />' . "\n"
+               . '<input type="hidden" name="md5_'.$this->key
+               .'" value="'.$this->md5.'" />'."\n"
+               . '<input type="hidden" name="fields_'.$this->key
+               .'" value="'.join(',',array_keys($this->texts)).'" />'
+               ."\n"
+               ;
+       }
+
+/*
+ Fabriquer les balises des champs d'apres un modele controleurs/(type_)modele.html
+       $contexte est un tableau (nom=>valeur) qui sera enrichi puis passe à recuperer_fond
+*/
+       function fond($contexte = array()) {
+               include_spip('inc/filtres');
+               $contexte['id_' . $this->type] = $this->id;
+               $contexte['id_' . $this->table] = $this->id;
+               $contexte['crayon_type'] = $this->type;
+               $contexte['crayon_modele'] = $this->modele;
+               $contexte['lang'] = $GLOBALS['spip_lang'];
+               $contexte['key'] = $this->key;
+               $contexte['largeur'] = $this->largeur;
+               $contexte['hauteur'] = $this->hauteur;
+               $contexte['self'] = _request('self');
+               foreach ($this->texts as $champ => $val) {
+                       $contexte['name_' . $champ] = 'content_' . $this->key . '_' . $champ;
+               }
+               $contexte['style'] = join(' ',$this->styles);
+               include_spip('public/assembler');
+               return recuperer_fond($this->controleur, $contexte);
+       }
+
+/*
+ Fabriquer les balises du ou des champs
+       $spec est soit un scalaire 'ligne' ou 'texte' précisant le type de balise
+       soit un array($champ=>array('type'=>'...', 'attrs'=>array(attributs specifique du champs)))
+       $attrs est un tableau (attr=>val) d'attributs communs ou pour le champs unique
+*/
+       function input($spec = 'ligne', $attrs = array()) {
+               if ($this->controleur) {
+                       return $this->fond($spec);
+               }
+               include_spip('inc/filtres');
+               $return = '';
+               foreach ($this->texts as $champ => $val) {
+                       $type = is_array($spec) ? $spec[$champ]['type'] : $spec;
+                       switch ($type) {
+                               case 'texte':
+                                       $id = uniqid('wid');
+                                       $input = '<textarea style="width:100%;" class="crayon-active"'
+                                       . ' name="content_'.$this->key.'_'.$champ.'" id="'.$id.'">'
+                                       . "\n"
+                                       . entites_html($val)
+                                       . "</textarea>\n";
+                                       break;
+                               case 'ligne':
+                               default:
+                                       $input = '<input class="crayon-active text" type="text"'
+                                       . ' name="content_'.$this->key.'_'.$champ.'"'
+                                       . ' value="'
+                                       . entites_html($val)
+                                       . '" />'."\n";
+                       }
+                       if (is_array($spec) && isset($spec[$champ]['attrs'])) {
+                               foreach ($spec[$champ]['attrs'] as $attr=>$val) {
+                                       $input = inserer_attribut($input, $attr, $val);
+                               }
+                       }
+
+                       foreach ($attrs as $attr=>$val) {
+                               $input = inserer_attribut($input, $attr, $val);
+                       }
+
+                       // petit truc crado pour mettre la barre typo si demandee
+                       // pour faire propre il faudra reprogrammer la bt en jquery
+                       $meta_crayon = isset($GLOBALS['meta']['crayons']) ? unserialize($GLOBALS['meta']['crayons']) : array();
+                       if (isset($meta_crayon['barretypo'])
+                       AND $meta_crayon['barretypo']
+                       AND $type == 'texte') {
+                               // Pas la peine de mettre cette barre si PortePlume est la
+                               if (
+                                       !(
+                                               function_exists('chercher_filtre')
+                                               AND $f = chercher_filtre('info_plugin')
+                                               AND $f('PORTE_PLUME','est_actif')
+                                       )
+                               ) {
+                                       include_spip('inc/barre');
+                                       $input = "<div style='width:".$this->largeur."px;height:23px;'>"
+                                               . (function_exists('afficher_barre')
+                                                       ? afficher_barre("document.getElementById('$id')")
+                                                       : '')
+                                               . '</div>'
+                                               . $input;
+                               }
+                       }
+
+                       $return .= $input;
+               }
+               return $return;
+       }
+
+}
+
+
+/*
+       Fabriquer les boutons du formulaire
+*/
+function crayons_boutons($boutons = array()) {
+       $boutons['submit'] = array('ok', texte_backend(_T('bouton_enregistrer')));
+       $boutons['cancel'] = array('cancel', texte_backend(_T('crayons:annuler')));
+
+       $html = '';
+       foreach ($boutons as $bnam => $bdef) if ($bdef) {
+               $html .= '<button type="button" class="crayon-' . $bnam .
+                       '" title="' . $bdef[1] . '">' . $bdef[1] . '</button>';
+       }
+
+       if ($html)
+               return '<div class="crayon-boutons"><div>'.$html.'</div></div>';
+}
+
+function crayons_formulaire($html, $action='crayons_store') {
+       if (!$html)
+               return '';
+
+       // on est oblige de recreer un Crayon pour connaitre la largeur du form.
+       // Pb conceptuel a revoir
+       $crayon = new Crayon("");
+       $class = ($crayon->largeur<250?" small":"");
+
+
+       include_spip('inc/filtres');
+       return liens_absolus(
+               '<div class="formulaire_spip">'
+               . '<form class="formulaire_crayon'.$class.'" method="post" action="'
+               . url_absolue(parametre_url(self(),'action', $action))
+               . '" enctype="multipart/form-data">'
+               . $html
+               . crayons_boutons()
+               . '</form>'
+               .'</div>'
+       );
+}
+
+//
+// Un Crayon avec une verification de code de securite
+//
+class SecureCrayon extends Crayon {
+
+       function SecureCrayon($name, $text='') {
+               parent::Crayon($name, $text);
+       }
+
+       function code() {
+               $code = parent::code();
+               $secu = md5($GLOBALS['meta']['alea_ephemere']. '=' . $this->name);
+
+               return
+                       $code
+                       .'<input type="hidden" name="secu_'.$this->key.'" value="'.$secu.'" />'."\n";
+       }
+}
+
+function action_crayons_html_dist() {
+       // CONTROLEUR
+       // on affiche le formulaire demande (controleur associe au crayon)
+       // Si le crayon n'est pas de type "crayon", c'est un crayon etendu, qui
+       // integre le formulaire requis à son controleur (pour avoir les boutons
+       // du formulaire dans un controleur Draggable, par exemple, mais il y a
+       // d'autres usages possibles)
+       include_spip('inc/crayons');
+
+       if(!isset($GLOBALS['forcer_lang']) OR !$GLOBALS['forcer_lang'] OR ($GLOBALS['forcer_lang'] === 'non'))
+               lang_select($GLOBALS['auteur_session']['lang']);
+       
+       $return = affiche_controleur(_request('class'));
+       if (!_request('type') OR _request('type') == 'crayon')
+         $return['$html'] = crayons_formulaire($return['$html']);
+
+       $json = trim(crayons_json_encode($return));
+
+       header("Content-Type: text/plain; charset=utf-8");
+       die($json);
+}
+
+?>
diff --git a/www/plugins/crayons/action/crayons_store.php b/www/plugins/crayons/action/crayons_store.php
new file mode 100644 (file)
index 0000000..da10a53
--- /dev/null
@@ -0,0 +1,483 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+function verif_secu($w, $secu) {
+    return (
+        $secu == md5($GLOBALS['meta']['alea_ephemere'].'='.$w)
+    OR
+        $secu == md5($GLOBALS['meta']['alea_ephemere_ancien'].'='.$w)
+    );
+}
+
+function post_crayons() {
+    $results = array();
+
+    if (isset($_POST['crayons']) AND is_array($_POST['crayons']))
+    foreach ($_POST['crayons'] as $crayon) {
+
+        $name = $_POST['name_'.$crayon];
+        $content = array();
+        if ($_POST['fields_'.$crayon]) {
+          foreach (explode(',', $_POST['fields_'.$crayon]) as $field) {
+            // cas particulier d'un envoi de fichier
+            if (isset($_FILES['content_'.$crayon.'_'.$field])) {
+               if ($_FILES['content_'.$crayon.'_'.$field]['size']>0)
+                       $content[$field] = $_FILES['content_'.$crayon.'_'.$field];
+               else
+                       $content[$field] = false;
+                       # cf. valeur passee dans crayon->md5() : false ou filemtime() du logo
+            } else {
+               /*
+                       le changement de charset n'est plus necessaire
+                       depuis jquery 1.5 (feature non documentee de jquery!)
+               */
+               $content[$field] = is_array($_POST['content_'.$crayon.'_'.$field])?implode(',',$_POST['content_'.$crayon.'_'.$field]):$_POST['content_'.$crayon.'_'.$field];
+            }
+          }
+        }
+
+        // Si les donnees POSTees ne correspondent pas a leur md5,
+        // il faut les traiter
+        if (isset($name)
+        AND md5(serialize($content)) != $_POST['md5_'.$crayon]) {
+            if (!isset($_POST['secu_'.$crayon])
+            OR verif_secu($name, $_POST['secu_'.$crayon])) {
+                $results[] = array($name, $content, $_POST['md5_'.$crayon], $crayon);
+            }
+            else {
+                return false; // erreur secu
+            }
+        }
+        // cas inchange
+        else
+            $results[] = array($name, $content, false, $crayon);
+    }
+
+    return $results;
+}
+
+
+function crayons_store($options = array()) {
+       // permettre de surcharger les fonctions de recuperation des valeurs
+       // et de sauvegardes de celles-ci
+       $options = array_merge(array(
+                       'f_get_valeur' => 'crayons_store_get_valeur',
+                       'f_set_modifs' => 'crayons_store_set_modifs',
+               ), $options);
+
+       include_spip('inc/crayons');
+       $wdgcfg = wdgcfg();
+
+       $return = array('$erreur'=>'');
+
+       $postees = post_crayons();
+
+       $modifs = $updates = array();
+       if (!is_array($postees)) {
+               $return['$erreur'] = _U('crayons:donnees_mal_formatees');
+       } else {
+               foreach ($postees as $postee)
+               if ($postee[2] !== false) {
+                       $name = $postee[0];
+                       $content = $postee[1];
+
+                       if ($content && preg_match(_PREG_CRAYON, 'crayon '.$name, $regs)) {
+                               list(,$crayon,$type,$modele,$id) = $regs;
+                               $wid = $postee[3];
+
+                               spip_log("autoriser('crayonner', $type, $id, NULL, array('modele'=>$modele)","crayons_distant");
+                               if (!autoriser('crayonner', $type, $id, NULL, array('modele'=>$modele))) {
+                                       $return['$erreur'] =
+                                               "$type $id: " . _U('crayons:non_autorise');
+                               } else {
+
+                                       // recuperer l'existant pour calculer son md5 et verifier
+                                       // qu'il n'a pas ete modifie entre-temps
+                                       $get_valeur = $options['f_get_valeur'];
+                                       $data = $get_valeur($content, $regs);
+
+                                       $md5 = md5(serialize($data));
+
+                                       // est-ce que le champ a ete modifie dans la base entre-temps ?
+                                       if ($md5 != $postee[2]) {
+                                               // si oui, la modif demandee correspond peut-etre
+                                               // a la nouvelle valeur ? dans ce cas on procede
+                                               // comme si "pas de modification", sinon erreur
+                                               if ($md5 != md5(serialize($content))) {
+                                                       $return['$erreur'] = "$type $id $modele: " .
+                                                               _U('crayons:modifie_par_ailleurs');
+                                               }
+                                       }
+
+                                       $modifs[] = array($type, $modele, $id, $content, $wid);
+                                       
+                                       /* aiguillage pour verification de la saisie
+                                       Pour traitement ulterieur les fonctions de verifications doivent renvoyer $invalides :
+                                        $invalides[wid_champ]['msg'] -> message de saisie invalide
+                                        $invalides[wid_champ]['retour'] -> caracteres invalides */
+                                       $f = 'verifier_'.$type.'_'.$modele;
+                                       if (function_exists($f)) {
+                                                if (count( $invalides = $f($modifs) )) {
+                                                       $return['$invalides'] = $invalides;
+                                                }
+                                                
+                                        }
+                               }
+                       }
+               }
+       }
+
+       if (!$modifs AND !$return['$erreur']) {
+               $return['$erreur'] = $wdgcfg['msgNoChange'] ?
+                  _U('crayons:pas_de_modification') : ' ';
+               $return['$annuler'] = true;
+       }
+       
+       // un champ invalide ... ou rien ==> on ne fait rien ! 
+       if (isset($return['$invalides']) && $return['$invalides'])
+               return $return;
+
+       // une quelconque erreur ... ou rien ==> on ne fait rien !
+       if (isset($return['$erreur']) && $return['$erreur'])
+               return $return;
+
+       // on traite toutes les modifications
+       // en appelant la fonction adequate de traitement
+       $set_modifs = $options['f_set_modifs'];
+       $return = $set_modifs($modifs, $return);
+
+       // une quelconque erreur ... ou rien ==> on ne fait rien !
+       if ($return['$erreur'])
+               return $return;
+
+       // et maintenant refaire l'affichage des crayons modifies
+       include_spip('inc/texte');
+       foreach ($modifs as $m) {
+               list($type, $modele, $id, $content, $wid) = $m;
+                       $f = charger_fonction($type.'_'.$modele, 'vues', true)
+                         OR $f = charger_fonction($modele, 'vues', true)
+                         OR $f = charger_fonction($type, 'vues', true)
+                         OR $f = 'vues_dist';
+                       $return[$wid] = $f($type, $modele, $id, $content, $wid);
+       }
+       return $return;
+}
+
+// recuperer une valeur en fonction des parametres recuperes
+// cette fonction cherche une valeur d'une colonne d'une table SQL
+function crayons_store_get_valeur($content, $regs) {
+       list(,$crayon,$type,$modele,$id) = $regs;
+       return valeur_colonne_table($type, array_keys($content), $id);
+}
+
+// stocke les valeurs envoyees dans des colonnes de table SQL
+function crayons_store_set_modifs($modifs, $return) {
+       // sinon on bosse : toutes les modifs ont ete acceptees
+       // verifier qu'on a tout ce qu'il faut pour mettre a jour la base
+       // et regrouper les mises a jour par type/id
+       foreach ($modifs as $modif) {
+               list($type, $modele, $id, $content, $wid) = $modif;
+
+               // MODELE
+               $fun = '';
+               if (function_exists($f = $type.'_'. $modele . "_revision")
+               OR function_exists($f = $modele . "_revision")
+               OR function_exists($f = $type . "_revision"))
+                       $fun = $f;
+               else switch($type) {
+                       case 'article':
+                               $fun = 'crayons_update_article';
+                               break;
+                       case 'breve':
+                               include_spip('action/editer_breve');
+                               $fun = 'revisions_breves';
+                               break;
+                       case 'forum':
+                               include_spip('inc/forum');
+                               $fun = 'enregistre_et_modifie_forum';
+                               break;
+                       case 'rubrique':
+                               include_spip('action/editer_rubrique');
+                               $fun = 'revisions_rubriques';
+                               break;
+                       case 'syndic':
+                       case 'site':
+                               include_spip('action/editer_site');
+                               $fun = 'revisions_sites';
+                               break;
+                       // cas geres de la maniere la plus standard
+                       case 'auteur':
+                       case 'document':
+                       case 'mot':
+                       case 'signature':
+                       case 'petition':
+                       default:
+                               include_spip('inc/modifier');
+                               $fun = 'revision_'.$type;
+                               break;
+               }
+               if (!$fun or !function_exists($fun)) {
+                               $fun = 'crayons_update';
+//                         $return['$erreur'] = "$type: " . _U('crayons:non_implemente');
+//                         break;
+               }
+
+               if (!isset($updates[$type][$fun])) {
+                       $updates[$type][$fun] = array();
+               }
+               if (!isset($updates[$type][$fun][$id])) {
+                       $updates[$type][$fun][$id] = array('wdg'=>array(), 'chval'=>array());
+               }
+               // pour reaffecter le retour d'erreur sql au cas ou
+               $updates[$type][$fun][$id]['wdg'][] = $wid;
+               foreach ($content as $champtable => $val) {
+                       $updates[$type][$fun][$id]['chval'][$champtable] = $val;
+               }
+       }
+
+       // il manque une fonction de mise a jour ==> on ne fait rien !
+       if ($return['$erreur'])
+           return $return;
+
+       // hop ! mises a jour table par table et id par id
+       foreach ($updates as $type => $idschamps)
+       foreach ($idschamps as $fun => $ids) {
+               foreach ($ids as $id => $champsvaleurs) {
+                       /* cas particulier du logo dans un crayon complexe :
+                          ce n'est pas un champ de la table */
+                       if (isset($champsvaleurs['chval']['logo'])) {
+                               spip_log('revision logo', 'crayons');
+                               logo_revision($id, $champsvaleurs['chval'], $type, $champsvaleurs['wdg']);
+                               unset($champsvaleurs['chval']['logo']);
+                       }
+                       if (count($champsvaleurs['chval'])) {
+                               // -- revisions_articles($id_article, $c) --
+                               spip_log("$fun($id ...)", 'crayons');
+                               $updok = $fun($id, $champsvaleurs['chval'], $type, $champsvaleurs['wdg']);
+                               // Renvoyer erreur si update base distante echoue, on ne regarde pas les updates base local car ils ne renvoient rien
+                               list($distant,$table) = distant_table($type);
+                               if ($distant AND !$updok)
+                                       $return['$erreur'] = "$type: " . _U('crayons:update_impossible');
+                       }
+           }
+       }
+
+       return $return;
+}
+
+//
+// VUE
+//
+function vues_dist($type, $modele, $id, $content, $wid){
+       // pour ce qui a une {lang_select} par defaut dans la boucle,
+       // la regler histoire d'avoir la bonne typo dans le propre()
+       // NB: ceci n'a d'impact que sur le "par defaut" en bas
+       list($distant,$table) = distant_table($type);
+       if (colonne_table($type, 'lang')) {
+               $b = valeur_colonne_table($type, 'lang', $id);
+               lang_select($a = array_pop($b));
+       } else {
+               lang_select($a = $GLOBALS['meta']['langue_site']);
+       }
+
+  // chercher vues/article_toto.html
+  // sinon vues/toto.html
+  if (find_in_path( ($fond = 'vues/' . $type . '_' . $modele) . '.html')
+  OR find_in_path( ($fond = 'vues/' . $modele) .'.html')
+  OR find_in_path( ($fond = 'vues/' . $type) .'.html')) {
+               $contexte = array(
+                   'id_' . $table => $id,
+                   'crayon_type' => $type,
+                       'crayon_modele' => $modele,
+                   'champ' => $modele,
+                   'class' => _request('class_'.$wid),
+                   'self' => _request('self'),
+                   'lang' => $GLOBALS['spip_lang']
+               );
+               $contexte = array_merge($contexte, $content);
+               include_spip('public/assembler');
+               return recuperer_fond($fond, $contexte);
+  }
+       // vue par defaut
+       else {
+               // Par precaution on va rechercher la valeur
+               // dans la base de donnees (meme si a priori la valeur est
+               // ce qu'on vient d'envoyer, il y a nettoyage des caracteres et
+               // eventuellement d'autres filtres de saisie...)
+               $bdd = valeur_colonne_table($type, $modele, $id);
+               if (count($bdd)) {
+                       $valeur = array_pop($bdd);
+               } else {
+                       // les champs n'ont pas ete retrouves dans la base
+                       // ce qui signifie a priori que nous sommes en face d'une cle primaire compose
+                       // et qu'un crayon a modifie un element de cette cle (c'est pas malin !)
+                       // dans ce cas, on reaffiche a minima ce qu'on vient de publier
+                       // mais il sera impossible de le reediter dans la foulee avec le meme crayon
+                       // (car l'identifiant du crayon se base sur l'id).
+                       // Il faudra donc recharger la page pour pouvoir reediter.
+                       if (is_scalar($id)) {
+                               $valeur = $content[$modele];
+                       }
+               }
+
+               // seul spip core sait rendre les donnees
+               if (in_array($modele,
+                 array('chapo', 'texte', 'descriptif', 'ps', 'bio'))) {
+                       return propre($valeur);
+               } else {
+                       return typo($valeur);
+               }
+       }
+}
+
+//
+// Fonctions de mise a jour generique
+//
+function crayons_update($id, $colval = array(), $type = '')
+{
+       if (!$colval OR !count($colval))
+               return false;
+       list($distant,$table) = distant_table($type);
+
+       if ($distant) {
+               list($nom_table, $where) = table_where($type, $id);
+               if (!$nom_table)
+                       return false;
+
+               $update = $sep = '';
+               foreach ($colval as $col => $val) {
+                       $update .= $sep . '`' . $col . '`=' . _q($val);
+                       $sep = ', ';
+               }
+
+               $a = spip_query($q =
+                                       'UPDATE `' . $nom_table . '` SET ' . $update . ' WHERE ' . $where , $distant );
+
+               #spip_log($q);
+               include_spip('inc/invalideur');
+               suivre_invalideur($cond, $modif=true);
+       }
+       else {
+               // cle primaire composee : 3-4-rubrique
+               // calculer un where approprie
+               // et modifier sans passer par la fonction destinee aux tables principales
+               // on limite a SPIP 2 mini car sql_updateq n'est pas mappe dans les crayons_compat
+               if (is_scalar($id) and ($GLOBALS['spip_version_code'] >= '1.93')) {
+                       list($nom_table, $where) = table_where($type, $id, true); // where sous forme de tableau
+                       $a = sql_updateq($nom_table, $colval, $where);
+               } else {
+                       // modification d'une table principale
+                       include_spip('inc/modifier');
+                       $a = modifier_contenu($type, $id, array(), $colval);
+               }
+       }
+
+       return $a;
+}
+
+//
+// Fonctions de mise a jour
+//
+function crayons_update_article($id_article, $c = false) {
+       include_spip('action/editer_article');
+
+       // Enregistrer les nouveaux contenus
+       revisions_articles($id_article, $c);
+
+       // En cas de statut ou de id_rubrique
+       // NB: instituer_article veut id_parent, et pas id_rubrique !
+       if (isset($c['id_rubrique'])) {
+               $c['id_parent'] = $c['id_rubrique'];
+               unset ($c['id_rubrique']);
+       }
+       instituer_article($id_article, $c);
+}
+
+/**
+ * Enregistre les modifications sur une configuration
+ * suite à un crayon sur une meta
+ *
+ * La colonne est toujours 'valeur' pour ces données.
+ * La donnée à enregistrer peut-être une sous partie de configuration.
+ * Si c'est le cas, on gère l'enregistrement via ecrire_config.
+ * 
+ * @param string $a
+ *   Nom ou clé de la meta (descriptif_site ou demo__truc pour demo/truc)
+ * @param bool|array $c
+ *   Liste des champs modifiés
+ *   Ici, 'valeur' normalement.
+ * @return void
+**/
+function revision_meta($a, $c = false) {
+       if (isset($c['valeur'])) {
+               // Certaines cles de configuration sont echapées ici (cf #EDIT_CONFIG{demo/truc})
+               $a = str_replace('__', '/', $a);
+               spip_log("meta '$a' = '$c[valeur]'", 'crayons');
+               // eviter de planter les vieux SPIP
+               if (false === strpos($a, '/')) {
+                       ecrire_meta($a, $c['valeur']);
+               // SPIP 3 ou Bonux 2 ou CFG
+               } else {
+                       include_spip('inc/config');
+                       ecrire_config($a, $c['valeur']);
+               }
+               include_spip('inc/invalideur');
+               suivre_invalideur('meta');
+       }
+}
+
+
+// TODO:
+// Ce modele est cense enregistrer les tags sous forme de ??
+// une ligne dans un champ spip_articles.tags, et/ou des mots-cles...
+function modeles_tags($id, $c) {
+       var_dump($id); #id_article
+       var_dump($c); # perturbant : ici on a array('id_article'=>'valeur envoyee')
+}
+
+function action_crayons_store_dist() {
+       return action_crayons_store_args();
+}
+
+// permettre de passer une autre fonction de stockage des informations
+function action_crayons_store_args($store = 'crayons_store') {
+       header("Content-Type: text/plain; charset=".$GLOBALS['meta']['charset']);
+       lang_select($GLOBALS['auteur_session']['lang']);
+
+       $r = $store();
+
+       // Si on a ete appeles par jQuery, on renvoie tout, c'est le client
+       // crayons.js qui va traiter l'affichage du resultat et status
+       # Attention le test $_SERVER["HTTP_X_REQUESTED_WITH"] === "XMLHttpRequest"
+       # n'est pas bon car le cas d'un fichier uploade via iframe n'est pas detecte
+
+       // S'il y a une adresse de redirection, on renvoie vers elle
+       // En cas d'erreur il faudrait ajouter &err=... dans l'url ?
+       if (_request('redirect')) {
+               if (!$r['$erreur']
+               OR $r['$annuler']) {
+                       include_spip('inc/headers');
+                       redirige_par_entete(_request('redirect'));
+               } else {
+                       echo "<h4 class='status'>".$r['$erreur']."</h4>\n";
+
+                       foreach ($r as $wid => $v) {
+                               if ($wid !== '$erreur')
+                                       echo "<div id='$wid'>$v</div><hr />\n";
+                       }
+                       echo "<a href='".quote_amp(_request('redirect'))."'>"
+                               .quote_amp(_request('redirect'))
+                               ."</a>\n";
+               }
+       }
+
+       // Cas normal : JSON
+       else {
+               echo crayons_json_export($r);
+       }
+
+       exit;
+}
+
+?>
diff --git a/www/plugins/crayons/action/crayons_upload.php b/www/plugins/crayons/action/crayons_upload.php
new file mode 100644 (file)
index 0000000..e43140b
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// upload d'images
+/*
+ * Cette action recoit des fichiers ($_FILES)
+ * et les affecte a l'objet courant ;
+ * puis renvoie la liste des documents joints
+ *
+ */
+
+function action_crayons_upload() {
+
+       $type = preg_replace('/\W+/', '', strval(_request('type')));
+       $id = intval(_request('id'));
+
+       // check securite :-)
+       include_spip('inc/autoriser');
+       if (!autoriser('joindredocument',$type,$id)) {
+               echo "Erreur: upload interdit";
+               return false;
+       }
+
+       // on n'accepte qu'un seul document à la fois, dans la variable 'upss'
+       if ($file = $_FILES['upss']
+       AND $file['error'] == 0) {
+       
+               $source = $file['tmp_name'];  # /tmp/php/phpxxx
+               $nom_envoye = $file['name'];  # mon-image.jpg   
+               
+               include_spip('plugins/installer'); // spip_version_compare dans SPIP 3.x 
+               include_spip('inc/plugin'); // spip_version_compare dans SPIP 2.x 
+               if (function_exists(spip_version_compare)) { // gerer son absence dans les branche precedente a SPIP 2.x
+                       if (spip_version_compare($GLOBALS['spip_version_branche'], '3.0.0alpha', '>=')) 
+                                       define('_SPIP3', true);                 
+               } 
+               if (defined('_SPIP3')) {
+                       include_spip('action/ajouter_documents');
+                       
+                       $ajouter_un_document = charger_fonction('ajouter_un_document','action');
+                       $id = $ajouter_un_document("new", $file, $type, $id, 'document');
+                       
+               } else {
+                       include_spip('inc/ajouter_documents');
+                       
+                       $id = ajouter_un_document($source, $nom_envoye, $type, $id, 'document', $id_document=0, &$documents_actifs, $titrer=true);
+               }
+       }
+
+       if (!$id) {
+               $erreur = "erreur !";
+       }
+
+       $a = recuperer_fond('modeles/uploader_item',array('id_document' => $id, 'erreur' => $erreur));
+
+       echo $a;
+}
+
+?>
diff --git a/www/plugins/crayons/controleurs/article_intro.html b/www/plugins/crayons/controleurs/article_intro.html
new file mode 100644 (file)
index 0000000..87a4d05
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'article_intro' , uniquement html
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+<textarea class="crayon-active" name="#ENV{name_descriptif}"
+ style="width:#ENV{largeur}px; height:#ENV{hauteur}px;#ENV{style}">
+[(#DESCRIPTIF**|sinon{#INTRODUCTION|textebrut|trim}|entites_html)]</textarea>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/article_intro2.html b/www/plugins/crayons/controleurs/article_intro2.html
new file mode 100644 (file)
index 0000000..803dd07
--- /dev/null
@@ -0,0 +1,17 @@
+[(#REM)
+
+       Controleur pour le crayon 'article_intro2' , uniquement html
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+<fieldset style="width:#ENV{largeur}px;#ENV{style}">
+<legend>Introduction</legend>
+<label>Descriptif</label><textarea class="crayon-active" name="#ENV{name_descriptif}"
+ style="width:100%; height:#ENV{hauteur}px;">
+[(#DESCRIPTIF**|entites_html)]</textarea>
+<label>Chapo</label><textarea class="crayon-active" name="#ENV{name_chapo}"
+ style="width:100%; height:#ENV{hauteur}|mul{2}px;">
+[(#CHAPO**|entites_html)]</textarea>
+</fieldset>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/article_intro3.php b/www/plugins/crayons/controleurs/article_intro3.php
new file mode 100644 (file)
index 0000000..491cb70
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// un controleur qui n'utilise que php et les inputs défauts
+function controleurs_article_intro3_dist($regs) {
+    list(,$crayon,$type,$champ,$id) = $regs;
+    $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
+    if ($valeur === false) {
+           return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
+    }
+
+       $n = new Crayon('article-intro3-' . $id, $valeur,
+                       array('hauteurMini' => 234));
+    
+    $return = array(
+       // html
+           $n->formulaire(
+               // champs et attributs propres
+               array(
+               'descriptif' => array('type' => 'texte', 'attrs' => array(
+                       'style' => 'height:' . ceil($n->hauteur*2/13) . 'px;' .
+                                               'width:' . $n->largeur . 'px;')),
+                       'chapo' =>  array('type' => 'texte', 'attrs' => array(
+                       'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
+                                               'width:' . $n->largeur . 'px;')),
+                       'texte' =>  array('type' => 'texte', 'attrs' => array(
+                       'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
+                                               'width:' . $n->largeur . 'px;'))) //,
+                   // attributs communs :( marche pas pour style , pas 2 fois ?
+//             array('style' => 'width:' . $n->largeur . 'px;')
+       ),
+       // status
+       null);
+
+       return $return;
+}
+
+?>
diff --git a/www/plugins/crayons/controleurs/article_introduction.html b/www/plugins/crayons/controleurs/article_introduction.html
new file mode 100644 (file)
index 0000000..75bb5bf
--- /dev/null
@@ -0,0 +1,54 @@
+[(#REM)
+
+       Controleur pour le crayon 'article_introduction' php+html
+       
+       (les balises écrites ci-dessous sont volontairement avec un espace pour ne pas être
+       compilée)
+       
+       Appelé via # EDIT{introduction} dans une boucle article
+       
+       Affiche les trois champs :
+       - descriptif (si rempli, il sera le rendu de # INTRODUCTION)
+       - chapo 
+       - texte
+       
+       Si aucun descriptif, le rendu de # INTRODUCTION est par défaut les 600 premiers caractères de
+       # CHAPO + # TEXTE
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+<ul>
+       <li class="fieldset" style="width:#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_introduction_article:></h3>
+               <p class="explication"><:crayons:explication_introduction_article:></p>
+               <ul>
+                       <li class="editer_descriptif">
+                               <label for="descriptif"><:texte_descriptif_rapide:></label>
+                               <textarea class="crayon-active maxheight150" 
+                                       name="#ENV{name_descriptif}"
+                                       id="descriptif"
+                                       style="width:100%;
+                                       height:#ENV{h_descriptif}px;">[(#DESCRIPTIF**|entites_html)]</textarea>
+                       </li>
+                       [(#CONFIG{articles_chapeau}|=={oui}|oui)
+                       <li class="editer_chapo">
+                               <label for="chapo"><:info_chapeau:></label>
+                               <textarea class="crayon-active"
+                                       name="#ENV{name_chapo}"
+                                       id="chapo"
+                                       style="width:100%;
+                                       height:#ENV{h_chapo}px;">[(#CHAPO**|entites_html)]</textarea>
+                       </li>]
+                       <li class="editer_texte">
+                               <label for="text_area"><:info_texte:></label>
+                               <textarea class="crayon-active"
+                                       name="#ENV{name_texte}"
+                                       id="text_area"
+                                       style="width:100%;
+                                       height:#ENV{h_texte}px;">[(#TEXTE**|entites_html)]</textarea>
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/article_introduction.php b/www/plugins/crayons/controleurs/article_introduction.php
new file mode 100644 (file)
index 0000000..4768534
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// un controleur php + html
+// html == avec un modele, controleurs/article_introduction.html)
+function controleurs_article_introduction_dist($regs) {
+    list(,$crayon,$type,$champ,$id) = $regs;
+    $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
+    if ($valeur === false) {
+           return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
+    }
+
+       $n = new Crayon('article-introduction-' . $id, $valeur,
+                       array('hauteurMini' => 234,
+                                 'controleur' => 'controleurs/article_introduction'));
+    
+    $contexte = array(
+       'h_descriptif' => (int)ceil($n->hauteur*2/13),
+               'h_chapo' => (int)ceil($n->hauteur*4/13),
+               'h_texte' => (int)ceil($n->hauteur*4/13));
+    $html = $n->formulaire($contexte);
+    $status = NULL;
+
+       return array($html, $status);
+}
+
+?>
diff --git a/www/plugins/crayons/controleurs/article_texte.html b/www/plugins/crayons/controleurs/article_texte.html
new file mode 100644 (file)
index 0000000..03e8303
--- /dev/null
@@ -0,0 +1,17 @@
+[(#REM)
+
+       Controleur pour le crayon 'article_intro' , uniquement html
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+<textarea class="crayon-active" name="#ENV{name_texte}"
+ style="width:#ENV{largeur}px; height:#ENV{hauteur}px;#ENV{style}">
+[(#TEXTE**|entites_html)]</textarea>
+
+[(#CONFIG{crayons/upload}|?{
+       #MODELE{uploader_liste,id_article}
+
+})<INCLURE{fond=js/uploader.js,id_article=#ID_ARTICLE}>]
+</BOUCLE_a>
+
diff --git a/www/plugins/crayons/controleurs/auteur_email.html b/www/plugins/crayons/controleurs/auteur_email.html
new file mode 100644 (file)
index 0000000..2272130
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'auteur_email', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+<input class="crayon-active" name="#ENV{name_email}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#EMAIL**|entites_html)]" />
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/auteur_nom.html b/www/plugins/crayons/controleurs/auteur_nom.html
new file mode 100644 (file)
index 0000000..d1ad82f
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'auteur_nom', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+<input class="crayon-active" name="#ENV{name_nom}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#NOM**|entites_html)]" />
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/auteur_qui.html b/www/plugins/crayons/controleurs/auteur_qui.html
new file mode 100644 (file)
index 0000000..b10d005
--- /dev/null
@@ -0,0 +1,26 @@
+[(#REM)
+
+       Controleur pour le crayon 'auteur_qui', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+<ul>
+       <li class="fieldset" style="#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_qui:></h3>
+               <ul>
+                       <li class="editer_nom">
+                               <label for="nom"><:ecrire:info_nom:> :</label>
+                               <input type="text" class="crayon-active text" name="#ENV{name_nom}" id="nom"
+                                       size="40" value="[(#NOM**|entites_html)]" />
+                       </li>
+                       <li class="editer_email">
+                               <label for="email"><:ecrire:email_2|ucfirst:></label>
+                               <input type="text" class="crayon-active text" name="#ENV{name_email}" id="email"
+                                       size="40" value="[(#EMAIL**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/breve_hyperlien.html b/www/plugins/crayons/controleurs/breve_hyperlien.html
new file mode 100644 (file)
index 0000000..1dd1401
--- /dev/null
@@ -0,0 +1,9 @@
+<BOUCLE_f(BREVES){id_breve}{statut==.}>
+<fieldset style="#ENV{largeur}px;#ENV{style}"><legend>Hyperlien</legend>
+<label><:form_prop_nom_site:></label> <input class="crayon-active" name="#ENV{name_lien_titre}"
+ style="width:100%;" value="[(#NOM_SITE**|entites_html)]" />
+ <br />
+ <label><:forum_url:></label> <input class="crayon-active" name="#ENV{name_lien_url}"
+ style="width:100%;" value="[(#URL_SITE**|entites_html)]" />
+</fieldset>
+</BOUCLE_f>
diff --git a/www/plugins/crayons/controleurs/document_fichier.html b/www/plugins/crayons/controleurs/document_fichier.html
new file mode 100644 (file)
index 0000000..1d0efdf
--- /dev/null
@@ -0,0 +1,46 @@
+[(#REM)
+
+       Controleur pour le crayon 'document'
+
+]
+#CACHE{0}
+
+
+[(#REM) En fonction de du contexte, choisir un logo ]
+
+<BOUCLE_d(DOCUMENTS){id_document}>
+
+[(#SET{image,[<img src="(#LOGO_DOCUMENT||extraire_attribut{src})" />]})]
+
+<fieldset[ style="(#ENV{style});"]>
+<legend>
+       [(#SET{logo,[(#GET{image}|image_reduire{0,40})]})]
+
+       [(#REM) hacke l'url pour eviter le cache du navigateur ]
+       [(#SET{url,[(#GET{logo}|extraire_attribut{src}
+               |parametre_url{s,#EVAL{time()}})]})]
+
+       <small>[(#GET{logo}|inserer_attribut{src,#GET{url}}
+               |inserer_attribut{style,vertical-align:middle;})]
+       &nbsp; remplacer ce document #EXTENSION
+       [((#GET{image}
+               |extraire_attribut{width})&times;[(#GET{image}
+               |extraire_attribut{height})]px)]&nbsp;:</small>
+
+</legend>
+
+<input class="crayon-active" name="#ENV{name_document}" type="file"[
+onchange="(#MODE|=={vignette}|?{' '})if (this.value && !this.value.match(/\.(png|jpeg|jpg|gif)$/i)) { alert('Il faut choisir une image :-)'); this.value=''; };"] />
+
+[(#REM)
+
+TODO: document distant (cf. document_fichier_revision dans inc/crayons)
+
+<br />
+<input class="crayon-active" name="#ENV{name_fichier}" type="text" value="#FICHIER" />
+
+]
+
+</fieldset>
+
+</BOUCLE_d>
diff --git a/www/plugins/crayons/controleurs/extra.html b/www/plugins/crayons/controleurs/extra.html
new file mode 100644 (file)
index 0000000..1863ec4
--- /dev/null
@@ -0,0 +1,38 @@
+[(#REM)
+
+       Controleur pour le crayon 'extra'
+
+]
+#CACHE{0}
+
+<fieldset[ style="(#ENV{style});"]>
+<legend>extra</legend>
+
+<input class="crayon-active" name="#ENV{name_extra}" type="hidden" value="go" />
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+[(#EXTRA**|extra_saisie{auteurs,#STATUT})]
+</BOUCLE_a>
+
+<BOUCLE_b(ARTICLES){id_article}{statut==.}>
+[(#EXTRA**|extra_saisie{articles,#ID_RUBRIQUE})]
+</BOUCLE_b>
+
+<BOUCLE_c(BREVES){id_breve}{statut==.}>
+[(#EXTRA**|extra_saisie{breves,#ID_RUBRIQUE})]
+</BOUCLE_c>
+
+<BOUCLE_d(RUBRIQUES){id_rubrique}{statut==.}>
+[(#EXTRA**|extra_saisie{rubriques,#ID_SECTEUR})]
+</BOUCLE_d>
+
+<BOUCLE_e(SITES){id_syndic=#ENV{id_site}}{statut==.}>
+[(#EXTRA**|extra_saisie{sites,#ID_RUBRIQUE})]
+</BOUCLE_e>
+
+<//B_d>
+<//B_c>
+<//B_b>
+<//B_a>
+
+</fieldset>
\ No newline at end of file
diff --git a/www/plugins/crayons/controleurs/extra_fonctions.php b/www/plugins/crayons/controleurs/extra_fonctions.php
new file mode 100644 (file)
index 0000000..9dacf6e
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+       include_spip('inc/extra');
+       include_spip('inc/presentation');
+
+?>
\ No newline at end of file
diff --git a/www/plugins/crayons/controleurs/forum_email.html b/www/plugins/crayons/controleurs/forum_email.html
new file mode 100644 (file)
index 0000000..ec7cc13
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'forum-email', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_b(FORUMS){id_forum}{statut==.}>
+<input class="crayon-active" name="#ENV{name_email_auteur}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#EMAIL**|entites_html)]" />
+</BOUCLE_b>
diff --git a/www/plugins/crayons/controleurs/forum_id_article.html b/www/plugins/crayons/controleurs/forum_id_article.html
new file mode 100644 (file)
index 0000000..703cce7
--- /dev/null
@@ -0,0 +1,33 @@
+[(#REM)
+
+       Controleur pour le crayon 'forum-id_article'
+
+       NB: il est possible d'ajouter ci-dessous un second menu
+       qui permettrait de passer d'un article a une breve ; la seule
+       difficulte etant de savoir remettre a zero la valeur id_article
+       si une breve a ete selectionnee (et vice-versa)
+
+       Tant qu'on en  pas besoin, hein, on va laisser comme \8da.
+
+]
+#CACHE{0}
+
+<BOUCLE_f(FORUMS){id_forum}{statut==.}{id_parent=0}{id_article>0}>
+
+<B_a>
+<fieldset style="#ENV{style}">
+Associer ce forum &#224; l'article :
+<select class="crayon-active" name="#ENV{name_id_article}"
+       onchange="cQuery(this).parents('form.formulaire_spip').submit();">
+<option value="0"[
+       (#ID_ARTICLE|?{'',selected})]>&gt;&gt;</option>
+<BOUCLE_a(ARTICLES)>
+<option value="#ID_ARTICLE"[
+       (#ID_ARTICLE|=={#_f:ID_ARTICLE}|?{selected})]>#ID_ARTICLE - [(#TITRE|couper{30})]</option>
+</BOUCLE_a>
+</select>
+</fieldset>
+</B_a>
+
+
+</BOUCLE_f>
diff --git a/www/plugins/crayons/controleurs/forum_nom.html b/www/plugins/crayons/controleurs/forum_nom.html
new file mode 100644 (file)
index 0000000..d40980b
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'forum-nom', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_b(FORUMS){id_forum}{statut==.}>
+<input class="crayon-active" name="#ENV{name_auteur}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#NOM**|entites_html)]" />
+</BOUCLE_b>
diff --git a/www/plugins/crayons/controleurs/forum_qui.html b/www/plugins/crayons/controleurs/forum_qui.html
new file mode 100644 (file)
index 0000000..933a329
--- /dev/null
@@ -0,0 +1,15 @@
+[(#REM)
+
+       Controleur pour le crayon 'forum_qui', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_d(FORUMS){id_forum}{statut==.}>
+<fieldset style="#ENV{style};text-align:right;"><legend>Qui ?</legend>
+<label><:ecrire:info_nom:> : <input class="crayon-active" name="#ENV{name_auteur}"
+ style="width:#ENV{largeur}px;" value="[(#NOM**|entites_html)]" /></label><br />
+ <label><:ecrire:email_2:> <input class="crayon-active" name="#ENV{name_email_auteur}"
+ style="width:#ENV{largeur}px;" value="[(#EMAIL**|entites_html)]" /></label>
+</fieldset>
+</BOUCLE_d>
diff --git a/www/plugins/crayons/controleurs/hyperlien.html b/www/plugins/crayons/controleurs/hyperlien.html
new file mode 100644 (file)
index 0000000..175db3e
--- /dev/null
@@ -0,0 +1,114 @@
+[(#REM)
+
+       Controleur pour le crayon 'hyperlien', uniquement html
+
+       (attention pour les syndic_articles et breves, les champs ne sont
+       pas les memes, il faut donc un autre controleur)
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+<ul>
+       <li class="fieldset" style="#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_hyperlien:></h3>
+               <ul>
+                       <li class="editer_nom_site">
+                               <label for="nom_site"><:form_prop_nom_site:></label>
+                               <input class="crayon-active text" name="#ENV{name_nom_site}" id="nom_site"
+                                       size="40" value="[(#NOM_SITE**|entites_html)]" />
+                       </li>
+                       <li class="editer_url_site">
+                               <label for="url_site"><:forum_url:></label>
+                               <input class="crayon-active text" name="#ENV{name_url_site}" id="url_site"
+                                       size="40" value="[(#URL_SITE**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_a>
+
+<BOUCLE_b(ARTICLES){id_article}{statut==.}>
+<ul>
+       <li class="fieldset" style="#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_hyperlien:></h3>
+               <ul>
+                       <li class="editer_nom_site">
+                               <label for="nom_site"><:form_prop_nom_site:></label>
+                               <input class="crayon-active text" name="#ENV{name_nom_site}" id="nom_site"
+                                       size="40" value="[(#NOM_SITE**|entites_html)]" />
+                       </li>
+                       <li class="editer_url_site">
+                               <label for="url_site"><:forum_url:></label>
+                               <input class="crayon-active text" name="#ENV{name_url_site}" id="url_site"
+                                       size="40" value="[(#URL_SITE**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_b>
+
+<BOUCLE_c(SIGNATURES){id_signature}{statut==.}>
+<ul>
+       <li class="fieldset" style="#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_hyperlien:></h3>
+               <ul>
+                       <li class="editer_nom_site">
+                               <label for="nom_site"><:form_prop_nom_site:></label>
+                               <input class="crayon-active text" name="#ENV{name_nom_site}" id="nom_site"
+                                       size="40" value="[(#NOM_SITE**|entites_html)]" />
+                       </li>
+                       <li class="editer_url_site">
+                               <label for="url_site"><:forum_url:></label>
+                               <input class="crayon-active text" name="#ENV{name_url_site}" id="url_site"
+                                       size="40" value="[(#URL_SITE**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_c>
+
+<BOUCLE_d(FORUMS){id_forum}{statut==.}>
+<ul>
+       <li class="fieldset" style="#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_hyperlien:></h3>
+               <ul>
+                       <li class="editer_nom_site">
+                               <label for="nom_site"><:form_prop_nom_site:></label>
+                               <input class="crayon-active text" name="#ENV{name_nom_site}" id="nom_site"
+                                       size="40" value="[(#NOM_SITE**|entites_html)]" />
+                       </li>
+                       <li class="editer_url_site">
+                               <label for="url_site"><:forum_url:></label>
+                               <input class="crayon-active text" name="#ENV{name_url_site}" id="url_site"
+                                       size="40" value="[(#URL_SITE**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_d>
+
+<BOUCLE_e(SITES){id_syndic=#ENV{id_site}}{statut==.}>
+<ul>
+       <li class="fieldset" style="#ENV{largeur}px;#ENV{style}">
+               <h3 class="legend"><:crayons:legend_controleur_hyperlien:></h3>
+               <ul>
+                       <li class="editer_nom_site">
+                               <label for="nom_site"><:form_prop_nom_site:></label>
+                               <input class="crayon-active text" name="#ENV{name_nom_site}" id="nom_site"
+                                       size="40" value="[(#NOM_SITE**|entites_html)]" />
+                       </li>
+                       <li class="editer_url_site">
+                               <label for="url_site"><:forum_url:></label>
+                               <input class="crayon-active text" name="#ENV{name_url_site}" id="url_site"
+                                       size="40" value="[(#URL_SITE**|entites_html)]" />
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_e>
+
+<//B_d>
+<//B_c>
+<//B_b>
+<//B_a>
diff --git a/www/plugins/crayons/controleurs/id_parent.html b/www/plugins/crayons/controleurs/id_parent.html
new file mode 100644 (file)
index 0000000..6961863
--- /dev/null
@@ -0,0 +1,31 @@
+[(#REM)
+
+       Controleur pour le crayon 'id_parent', uniquement html
+       
+       Utilisable dans une boucle rubriques et articles
+       On affiche toutes les rubriques même non publiées
+       On sépare visuellement les sous rubriques
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#SET{id,#ID_RUBRIQUE}
+</BOUCLE_a>
+<BOUCLE_r(RUBRIQUES){id_rubrique}{tout}>
+#SET{id,#ID_PARENT}
+</BOUCLE_r>
+<//B_a>
+<B_rubriques>
+<select class="crayon-active" name="#ENV{name_id_rubrique}"
+       style="width:#ENV{largeur}px;#ENV{style}" >
+       <BOUCLE_rubriques(RUBRIQUES){racine}{par num titre, titre}{tout}>
+               [(#SET{separateur_[(#ID_RUBRIQUE)],''})]
+               <option value="#ID_RUBRIQUE"[(#GET{id}|=={#ID_RUBRIQUE}|?{selected})]>[(#TITRE)]</option>
+               <BOUCLE_ss_rub(RUBRIQUES){id_parent}{tout}>
+                       [(#SET{separateur_[(#ID_RUBRIQUE)],[(#GET{separateur_[(#ID_PARENT)]}|concat{&nbsp;&rsaquo;&nbsp;})]})]
+                       <option value="#ID_RUBRIQUE"[(#GET{id}|=={#ID_RUBRIQUE}|?{selected})]>[(#GET{separateur_[(#ID_RUBRIQUE)]})][(#TITRE)]</option>
+                       <BOUCLE_ss_ss_rub(BOUCLE_ss_rub) />
+               </BOUCLE_ss_rub>
+       </BOUCLE_rubriques>
+</select>
+</B_rubriques>
\ No newline at end of file
diff --git a/www/plugins/crayons/controleurs/logo.html b/www/plugins/crayons/controleurs/logo.html
new file mode 100644 (file)
index 0000000..324ae9c
--- /dev/null
@@ -0,0 +1,51 @@
+[(#REM)
+
+       Controleur pour le crayon 'logo'
+
+]
+#CACHE{0}
+
+[(#REM) En fonction de du contexte, choisir un logo ]
+[(#SET{image,[(#ID_ARTICLE|?{#LOGO_ARTICLE_NORMAL}
+       |sinon{[(#ID_AUTEUR|?{#LOGO_AUTEUR_NORMAL})]}
+       |sinon{[(#ID_BREVE|?{#LOGO_BREVE_NORMAL})]}
+       |sinon{[(#ID_RUBRIQUE|?{[(#LOGO_RUBRIQUE_NORMAL|extraire_attribut{src}|match{[(#EVAL{_DIR_IMG})]rubon0\.}|?{'',#LOGO_RUBRIQUE_NORMAL})]})]}
+       |sinon{[(#ID_SYNDIC_ARTICLE|?{#LOGO_SYNDIC_ARTICLE})]}
+       |sinon{[(#ID_SYNDIC|?{#LOGO_SITE_NORMAL})]}
+       |sinon{[(#ID_MOT|?{#LOGO_MOT_NORMAL})]})]})]
+[(#GET{image}|?{
+       [(#SET{logo,[(#GET{image}|image_reduire{64})]})]
+       [(#REM) hacke l'url pour eviter le cache du navigateur ]
+       [(#SET{url,[(#GET{logo}|extraire_attribut{src}
+               |parametre_url{s,#EVAL{time()}})]})]
+       [(#SET{legend,
+               <:crayons:legend_controleur_logo_remplacer:>
+               [((#GET{image}
+               |extraire_attribut{width})&times;[(#GET{image}
+               |extraire_attribut{height})]px)]&nbsp;:
+       })]
+       [(#SET{supprimer,
+               [<div class="choix">
+                       <input type="checkbox" name="(#ENV{name_logo})_supprimer" id="#ENV{name_logo}_supprimer" /><label for="#ENV{name_logo}_supprimer"> <:crayons:bouton_supprimer:></label>
+               <div>]
+       })]
+})]
+
+<ul>
+       <li class="fieldset" [ style="(#ENV{style}); border:none;"]>
+               <h3 class="legend">
+                       [(#GET{legend}|sinon{<:crayons:legend_controleur_logo:>})]
+                       [<div style="float:#LANG_RIGHT">(#GET{logo}|inserer_attribut{src,#GET{url}}
+                               |inserer_attribut{style,vertical-align:middle;})</div>]
+               </h3>
+               <ul>
+                       <li class="editer_logo">
+                               <div class="choix">
+                                       <input class="crayon-active file" name="#ENV{name_logo}" type="file"
+                                               onchange="if (this.value && !this.value.match(/\.(png|jpeg|jpg|gif)$/i)) { alert('<:crayons:message_image_obligatoire:>'); this.value=''; }; var q=cQuery('##ENV{name_logo}_supprimer').parent(); this.value ? q.hide() : q.show();" size="1" />
+                               </div>
+                               #GET{supprimer} 
+                       </li>
+               </ul>
+       </li>
+</ul>
\ No newline at end of file
diff --git a/www/plugins/crayons/controleurs/mots_article_brut.html b/www/plugins/crayons/controleurs/mots_article_brut.html
new file mode 100644 (file)
index 0000000..159cc16
--- /dev/null
@@ -0,0 +1,20 @@
+[(#REM)
+
+       Controleur pour le crayon 'mots_article_brut'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+<fieldset style="#ENV{style}"><legend>Mots-clé pour #TITRE (#ID_ARTICLE)</legend>
+<B_moex>
+<label>Existants</label>
+<select class="crayon-active" name="#ENV{name_existants}" style="width:#ENV{largeur}px; height:#ENV{hauteur}px;">
+<BOUCLE_moex(MOTS){id_article}{doublons}>
+       <option value="#ID_GROUPE:#ID_MOT">[(#TITRE|entites_html)]</option>
+</BOUCLE_moex>
+</select>
+</B_moex>
+Pas d'existant
+<//B_moex>
+</fieldset>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/controleurs/portfolio.php b/www/plugins/crayons/controleurs/portfolio.php
new file mode 100644 (file)
index 0000000..19e3c8f
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// un controleur php (TODO -- NE FONCTIONNE PAS DU TOUT)
+
+function controleurs_portfolio_dist($regs) {
+    list(,$crayon,$type,$champ,$id) = $regs;
+
+       include_spip('inc/minipres'); # pour aide()
+       include_spip('inc/presentation'); # pour debut_cadre()
+       include_spip('inc/layer'); # pour le js des fleches
+       include_spip('inc/documents'); # pour aide()
+
+       $html =
+               http_script("\nvar ajax_image_searching = \n'<div style=\"float: ".$GLOBALS['spip_lang_right'].";\"><img src=\"".url_absolue(_DIR_IMG_PACK."searching.gif")."\" alt=\"\" /></div>';")
+               . http_script('', generer_url_public('jquery.js'))
+               . http_script('', _DIR_JAVASCRIPT . 'layer.js','')
+               . afficher_documents_colonne($id, $type, 'portfolio');
+
+    $status = NULL;
+
+       return array($html, $status);
+}
+
+
+
+
+?>
diff --git a/www/plugins/crayons/controleurs/signature_email.html b/www/plugins/crayons/controleurs/signature_email.html
new file mode 100644 (file)
index 0000000..ec501bb
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Controleur pour le crayon 'signature-email', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_c(SIGNATURES){id_signature}{statut==.}>
+<input class="crayon-active" name="#ENV{name_ad_email}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#EMAIL**|entites_html)]" />
+</BOUCLE_c>
diff --git a/www/plugins/crayons/controleurs/signature_nom.html b/www/plugins/crayons/controleurs/signature_nom.html
new file mode 100644 (file)
index 0000000..1f8136c
--- /dev/null
@@ -0,0 +1,10 @@
+[(#REM)
+
+       Controleur pour le crayon 'signature-nom', uniquement html
+]
+#CACHE{0}
+
+<BOUCLE_c(SIGNATURES){id_signature}{statut==.}>
+<input class="crayon-active" name="#ENV{name_nom_email}"
+ style="width:#ENV{largeur}px;#ENV{style}" value="[(#NOM**|entites_html)]" />
+</BOUCLE_c>
diff --git a/www/plugins/crayons/controleurs/signature_qui.html b/www/plugins/crayons/controleurs/signature_qui.html
new file mode 100644 (file)
index 0000000..fbb208c
--- /dev/null
@@ -0,0 +1,16 @@
+[(#REM)
+
+       Controleur pour le crayon 'signature_qui', uniquement html
+
+]
+#CACHE{0}
+
+<BOUCLE_c(SIGNATURES){id_signature}{statut==.}>
+<fieldset style="width:#ENV{largeur}px;#ENV{style}"><legend>Qui ?</legend>
+<label><:ecrire:info_nom:> :</label> <input class="crayon-active" name="#ENV{name_nom_email}"
+ style="width:100%;" value="[(#NOM**|entites_html)]" />
+ <br />
+ <label><:ecrire:email_2:></label> <input class="crayon-active" name="#ENV{name_ad_email}"
+ style="width:100%;" value="[(#EMAIL**|entites_html)]" />
+</fieldset>
+</BOUCLE_c>
diff --git a/www/plugins/crayons/controleurs/statut.html b/www/plugins/crayons/controleurs/statut.html
new file mode 100644 (file)
index 0000000..e532361
--- /dev/null
@@ -0,0 +1,26 @@
+
+[(#REM)
+
+       Un crayon pour changer le statut (autrement dit, une gomme)
+       
+       Plutot qu'un menu on peut avoir envie de faire une interface plus jolie
+       mais techniquement ça tourne (version SVN > 1.9.2).
+
+]
+
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#SET{id,#STATUT}
+<select class="crayon-active" name="#ENV{name_statut}"
+ style="width:#ENV{largeur}px;">
+       <option value="publie"[
+               (#GET{id}|=={publie}?{selected})="selected"]>publi&#233;</option>
+       <option value="prop"[
+               (#GET{id}|=={prop}?{selected})="selected"]>propos&#233;</option>
+       <option value="prepa"[
+               (#GET{id}|=={prepa}?{selected})="selected"]>en pr&#233;paration</option>
+</select>
+
+</BOUCLE_a>
+
+
+
diff --git a/www/plugins/crayons/controleurs/syndic_article_hyperlien.html b/www/plugins/crayons/controleurs/syndic_article_hyperlien.html
new file mode 100644 (file)
index 0000000..ac2ef20
--- /dev/null
@@ -0,0 +1,17 @@
+[(#REM)
+
+       Controleur pour le crayon 'hyperlien' des articles syndiques
+
+]
+#CACHE{0}
+
+<BOUCLE_f(SYNDIC_ARTICLES){id_syndic_article=#ENV{id_syndic_article}}
+       {statut==.}>
+<fieldset style="#ENV{largeur}px;#ENV{style}"><legend>Hyperlien</legend>
+<label><:forum_titre:></label> <input class="crayon-active" name="#ENV{name_titre}"
+ style="width:100%;" value="[(#TITRE**|entites_html)]" />
+ <br />
+ <label><:forum_url:></label> <input class="crayon-active" name="#ENV{name_url}"
+ style="width:100%;" value="[(#URL_ARTICLE**|sinon{http://}|entites_html)]" />
+</fieldset>
+</BOUCLE_f>
diff --git a/www/plugins/crayons/controleurs/vignette.html b/www/plugins/crayons/controleurs/vignette.html
new file mode 100644 (file)
index 0000000..db99f92
--- /dev/null
@@ -0,0 +1,49 @@
+[(#REM)
+
+       Controleur pour le crayon 'vignette'
+       Ce crayon ne s'applique qu'aux documents
+       On le mets dans une boucle documents contenant le critère {tous} au cas
+       ou le document ne soit pas considere comme publie
+
+]
+#CACHE{0}
+
+<BOUCLE_document(DOCUMENTS){id_document}{tous}>
+[(#SET{image,[(#ID_VIGNETTE|>{0}|?{#LOGO_DOCUMENT})]})]
+[(#GET{image}|?{
+       [(#SET{vignette,[(#GET{image}|image_reduire{64})]})]
+       [(#REM) hacke l'url pour eviter le cache du navigateur ]
+       [(#SET{url,[(#GET{vignette}|extraire_attribut{src}
+               |parametre_url{s,#EVAL{time()}})]})]
+       [(#SET{legend,
+               <:crayons:legend_controleur_vignette_remplacer:>
+               [((#GET{image}
+               |extraire_attribut{width})&times;[(#GET{image}
+               |extraire_attribut{height})]px)]&nbsp;:
+       })]
+       [(#SET{supprimer,
+               [<div class="choix">
+                       <input type="checkbox" name="(#ENV{name_vignette})_supprimer" id="#ENV{name_vignette}_supprimer" /><label for="#ENV{name_vignette}_supprimer"> <:crayons:bouton_supprimer:></label>
+               <div>]
+       })]
+})]
+
+<ul>
+       <li class="fieldset" [ style="(#ENV{style}); border:none;"]>
+               <h3 class="legend">
+                       [(#GET{legend}|sinon{<:crayons:legend_controleur_vignette:>})]
+                       [<div style="float:#LANG_RIGHT">(#GET{vignette}|inserer_attribut{src,#GET{url}}
+                               |inserer_attribut{style,vertical-align:middle;})</div>]
+               </h3>
+               <ul>
+                       <li class="editer_vignette">
+                               <div class="choix">
+                                       <input class="crayon-active file" name="#ENV{name_vignette}" type="file"
+                                               onchange="if (this.value && !this.value.match(/\.(png|jpeg|jpg|gif)$/i)) { alert('<:crayons:message_image_obligatoire:>'); this.value=''; }; var q=cQuery('##ENV{name_vignette}_supprimer').parent(); this.value ? q.hide() : q.show();" size="10" />
+                               </div>
+                               #GET{supprimer} 
+                       </li>
+               </ul>
+       </li>
+</ul>
+</BOUCLE_document>
\ No newline at end of file
diff --git a/www/plugins/crayons/crayons.css b/www/plugins/crayons/crayons.css
new file mode 100644 (file)
index 0000000..4c62420
--- /dev/null
@@ -0,0 +1,40 @@
+em.crayon-img-changed { display: none; }
+.crayon-changed em.crayon-img-changed {        display: block; }
+.crayon-changed em.crayon-crayon { display: none; }
+em.crayon-edit,
+em.crayon-crayon { display: none; }
+.crayon-boutons,
+.crayon-searching { float: right;padding:0;text-align: right;}
+.crayon-boutons button { border:1px solid; cursor: pointer;display:inline-block; }
+.crayon-boutons .crayon-submit { background: #e6efc2 url(images/ok-16.png) 2px center no-repeat; color: #264409; border-color: #c6d880;float:right;margin-bottom: 0.5em;margin-left:0.5em;padding-left:20px;}
+.crayon-boutons .crayon-cancel { background: #fbe3e4 url(images/annuler-16.png) center center no-repeat; color: #8a1f11; border-color: #fbc2c4;width: 40px; text-indent: -3000em;padding-right:20px;}
+.small .crayon-boutons {float:none;}
+.small .crayon-boutons .crayon-submit {text-indent: -3000em;background-position: center;width: 40px;}
+.small .crayon-boutons .crayon-cancel {float:left;}
+
+.crayon-icones { float: right; width: 20px; text-align: right; position: relative; top:0; left:0; z-index:4999; }
+.crayon-icones span,.crayon-icones em { position:absolute; left:0; }
+em.crayon-edit,
+em.crayon-crayon,
+em.crayon-img-changed { cursor: pointer; border:0; }
+
+/* definition des icones */
+.crayon-icones em.crayon-crayon { background: url(images/crayon20.png) no-repeat; height: 20px; width: 20px; }
+.crayon-icones em.crayon-searching { background: url(images/searching.gif) no-repeat; height: 13px; width: 13px; }
+.crayon-icones em.crayon-edit { background: url(images/edit.png) no-repeat; height: 20px; width: 20px; }
+.crayon-icones em.crayon-img-changed { background: url(images/changed.png) no-repeat; height: 20px; width: 20px; }
+
+.formulaire_crayon .crayon-active { padding: 1px; border: 1px inset; font: inherit; display:block; }
+.crayon-html .formulaire_crayon { max-width: 703px; }
+.crayon-html textarea { overflow: auto; font: inherit; }
+.crayon-html { z-index:5000; }
+.crayon-html .crayon-boutons { position:absolute; right:0px; }
+.crayon-html .small .crayon-boutons {position: relative;}
+
+
+.crayon-invalide { display: block; background-color: #ff8888; border: 1px dashed #ff0000; }
+.crayon-invalide p { margin:0; padding: 1%; font-style: italic; font-size: 80%; }
+/* resizer */
+.resizehandle { background:transparent url("images/resizer.png") no-repeat scroll 50%; cursor:ns-resize; font-size:0.1em; width: auto !important;margin-right: 150px;}
+.small .resizehandle {margin-right: 0;}
+.resizehandle_boutons { margin-top: -16px; }
diff --git a/www/plugins/crayons/crayons.js.html b/www/plugins/crayons/crayons.js.html
new file mode 100644 (file)
index 0000000..748b8e9
--- /dev/null
@@ -0,0 +1,35 @@
+[(#REM)
+
+       Charger la librairie crayons et ses addenda
+
+]
+#HTTP_HEADER{'Content-Type: text/javascript'}
+
+[(#ENV**{debug_crayons}|?{
+       #CACHE{0}
+,
+       #CACHE{7*24*3600,cache-client}
+})]
+
+/* cQuery est jQuery, renommee pour eviter tout conflit */
+
+[(#CHEMIN{js/jquery.js}|pack_cQuery)]
+
+cQuery.noConflict();
+
+[(#CHEMIN{js/jquery.form.js}|pack_cQuery)]
+
+[(#CHEMIN{js/jquery.px.js}|pack_cQuery)]
+
+[(#CHEMIN{js/crayons.js}|pack_cQuery)]
+
+[(#CHEMIN{js/resizehandle.js}|pack_cQuery)]
+
+[(#CHEMIN{js/jquery.html5uploader.min.js}|pack_cQuery)]
+
+[(#CONFIG{crayons}|match{s:11:"yellow_fade";s:2:"on";}|?{' ',''})
+       [(#CHEMIN{js/crayons-fade.js}|pack_cQuery)]
+]
+
+[(#REM) Appeler la callback si demandee ]
+[(#ENV{callback})();]
\ No newline at end of file
diff --git a/www/plugins/crayons/crayons.js_fonctions.php b/www/plugins/crayons/crayons.js_fonctions.php
new file mode 100644 (file)
index 0000000..4b66711
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+//
+// Les crayons ont leur propre copie du pack de Dean Edwards
+// pour compatibilite avec SPIP < [9717]
+//
+
+function pack_cQuery($chemin) {
+       $flux = spip_file_get_contents($chemin);
+       $flux = str_replace('jQuery', 'cQuery', $flux);
+       $flux = str_replace('cQuery.spip', 'jQuery.spip', $flux);
+
+       // On ne compacte PAS deux fois (c'est inutile et en plus ca bugge)
+       if (!strlen($flux)
+       // mode debug des crayons
+       OR _request('debug_crayons')
+       // le vieil auto_compress_js
+       OR ($GLOBALS['meta']['auto_compress_js'] == 'oui'
+         AND @file_exists(_DIR_RESTREINT.'inc/compacte_js.php'))
+       // ou l'espace prive
+       OR !function_exists('test_espace_prive')
+       OR test_espace_prive())
+               return $flux;
+
+       include_spip('lib/JavaScriptPacker/class.JavaScriptPacker');
+       $packer = new JavaScriptPacker($flux, 0, true, false);
+
+       // en cas d'echec (?) renvoyer l'original
+       if (strlen($t = $packer->pack()))
+               return $t;
+
+       // erreur
+       spip_log('erreur de pack_js');
+       return $flux;
+}
+
+?>
diff --git a/www/plugins/crayons/crayons_fonctions.php b/www/plugins/crayons/crayons_fonctions.php
new file mode 100644 (file)
index 0000000..0c0484b
--- /dev/null
@@ -0,0 +1,373 @@
+<?php\r
+/** \r
+ * Crayons plugin for spip (c) Fil, toggg 2006-2013 -- licence GPL\r
+ * \r
+ * @package SPIP\Crayons\Fonctions\r
+ */\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+/**\r
+ * Débuguer les crayons\r
+ * mettre a true dans mes_options pour avoir les crayons non compresses\r
+ */\r
+if(!defined('_DEBUG_CRAYONS'))\r
+       define('_DEBUG_CRAYONS', false);\r
+\r
+// Dire rapidement si ca vaut le coup de chercher des droits\r
+function analyse_droits_rapide_dist() {\r
+       return isset($GLOBALS['auteur_session']['statut']);\r
+}\r
+\r
+// Le pipeline header_prive (pour y tester les crayons)\r
+function Crayons_insert_head($head) {\r
+       // verifie la presence d'une meta crayons, si c'est vide\r
+       // on ne cherche meme pas a traiter l'espace prive\r
+       $config_espace_prive = @unserialize($GLOBALS['meta']['crayons']);\r
+       if (empty($config_espace_prive)) {\r
+               return $head;\r
+       }\r
+\r
+       // verifie que l'edition de l'espace prive est autorisee\r
+       if ($config_espace_prive['espaceprive'] == 'on') {\r
+               // determine les pages (exec) crayonnables\r
+               if (($config_espace_prive['exec_autorise'] == '*') ||\r
+              in_array(_request('exec'),explode(',',$config_espace_prive['exec_autorise']))) {\r
+                       // Calcul des droits\r
+                       include_spip('inc/crayons');\r
+                       $head = Crayons_preparer_page($head, '*', wdgcfg(), 'head');\r
+               }\r
+       }\r
+\r
+       // retourne l'entete modifiee\r
+       return $head;\r
+}\r
+\r
+// Le pipeline affichage_final, execute a chaque hit sur toute la page\r
+function &Crayons_affichage_final(&$page) {\r
+\r
+       // ne pas se fatiguer si le visiteur n'a aucun droit\r
+       if (!(function_exists('analyse_droits_rapide')?analyse_droits_rapide():analyse_droits_rapide_dist()))\r
+               return $page;\r
+\r
+       // sinon regarder rapidement si la page a des classes crayon\r
+       if (strpos($page, 'crayon')===FALSE)\r
+               return $page;\r
+\r
+       // voir un peu plus precisement lesquelles\r
+       include_spip('inc/crayons');\r
+       if (!preg_match_all(_PREG_CRAYON, $page, $regs, PREG_SET_ORDER))\r
+               return $page;\r
+       $wdgcfg = wdgcfg();\r
+\r
+       // calculer les droits sur ces crayons\r
+       include_spip('inc/autoriser');\r
+       $droits = array();\r
+       $droits_accordes = 0;\r
+       foreach ($regs as $reg) {\r
+               list(,$crayon,$type,$champ,$id) = $reg;\r
+               if (_DEBUG_CRAYONS) spip_log("autoriser('modifier', $type, $id, NULL, array('champ'=>$champ))","crayons_distant");\r
+               if (autoriser('modifier', $type, $id, NULL, array('champ'=>$champ))) {\r
+                       if(!isset($droits['.' . $crayon]))\r
+                               $droits['.' . $crayon] = 0;\r
+                       $droits['.' . $crayon]++;\r
+                       $droits_accordes ++;\r
+               }\r
+       }\r
+       // et les signaler dans la page\r
+       if ($droits_accordes == count($regs)) // tous les droits\r
+               $page = Crayons_preparer_page($page, '*', $wdgcfg);\r
+       else if ($droits) // seulement certains droits, preciser lesquels\r
+               $page = Crayons_preparer_page($page, join(',',array_keys($droits)), $wdgcfg);\r
+\r
+       return $page;\r
+}\r
+\r
+function &Crayons_preparer_page(&$page, $droits, $wdgcfg = array(), $mode='page') {\r
+       /**\r
+        * Si pas forcer_lang, on charge le contrôleur dans la langue que l'utilisateur a dans le privé\r
+        */\r
+       if(!isset($GLOBALS['forcer_lang']) OR !$GLOBALS['forcer_lang'] OR ($GLOBALS['forcer_lang'] === 'non'))\r
+               lang_select($GLOBALS['auteur_session']['lang']);\r
+       \r
+       $jsFile = generer_url_public('crayons.js');\r
+       if (_DEBUG_CRAYONS)\r
+               $jsFile = parametre_url($jsFile,'debug_crayons',1,'&');\r
+       include_spip('inc/filtres'); // rien que pour direction_css() :(\r
+       $cssFile = direction_css(find_in_path('crayons.css'));\r
+\r
+       $config = crayons_var2js(array(\r
+               'imgPath' => dirname(find_in_path('images/crayon.png')),\r
+               'droits' => $droits,\r
+               'dir_racine' => _DIR_RACINE,\r
+               'self' => self('&'),\r
+               'txt' => array(\r
+                       'error' => _U('crayons:svp_copier_coller'),\r
+                       'sauvegarder' => $wdgcfg['msgAbandon'] ? _U('crayons:sauvegarder') : ''\r
+               ),\r
+               'img' => array(\r
+                       'searching' => array(\r
+                               'txt' => _U('crayons:veuillez_patienter')\r
+                       ),\r
+                       'crayon' => array(\r
+                               'txt' => _U('crayons:editer')\r
+                       ),\r
+                       'edit' => array(\r
+                               'txt' => _U('crayons:editer_tout')\r
+                       ),\r
+                       'img-changed' => array(\r
+                               'txt' => _U('crayons:deja_modifie')\r
+                       )\r
+               ),\r
+               'cfg' => $wdgcfg\r
+       ));\r
+\r
+\r
+       // Est-ce que PortePlume est la ?\r
+       $meta_crayon = isset($GLOBALS['meta']['crayons']) ? unserialize($GLOBALS['meta']['crayons']): array();\r
+       $pp = '';\r
+       if (isset($meta_crayon['barretypo']) && $meta_crayon['barretypo']) {\r
+               if (function_exists('chercher_filtre')\r
+               AND $f = chercher_filtre('info_plugin')\r
+               AND $f('PORTE_PLUME','est_actif')) {\r
+\r
+               $pp = <<<EOF\r
+cQuery(function() {\r
+       if (typeof onAjaxLoad == 'function') {\r
+               function barrebouilles_crayons() {\r
+                       $('.formulaire_crayon textarea.crayon-active')\r
+                       .barre_outils('edition');\r
+               }\r
+               onAjaxLoad(barrebouilles_crayons);\r
+       }\r
+});\r
+EOF;\r
+\r
+               }\r
+       }\r
+\r
+\r
+       $incCSS = "<link rel=\"stylesheet\" href=\"{$cssFile}\" type=\"text/css\" media=\"all\" />";\r
+       $incJS = <<<EOH\r
+<script type="text/javascript">/* <![CDATA[ */\r
+var configCrayons;\r
+function startCrayons() {\r
+       configCrayons = new cQuery.prototype.cfgCrayons({$config});\r
+       cQuery.fn.crayonsstart();\r
+{$pp}\r
+}\r
+var cr = document.createElement('script');\r
+cr.type = 'text/javascript'; cr.async = true;\r
+cr.src = '{$jsFile}\x26callback=startCrayons';\r
+var s = document.getElementsByTagName('script')[0];\r
+s.parentNode.insertBefore(cr, s);\r
+/* ]]> */</script>\r
+\r
+EOH;\r
+\r
+       if ($mode == 'head')\r
+               return $page . $incJS . $incCSS; //js inline avant les css, sinon ca bloque le chargement\r
+\r
+       $pos_head = strpos($page, '</head>');\r
+       if ($pos_head === false)\r
+               return $page;\r
+\r
+       // js inline avant la premiere css, ou sinon avant la fin du head\r
+       $pos_link = strpos($page, '<link ');\r
+       if (!$pos_link)\r
+               $pos_link = $pos_head;\r
+       $page = substr_replace($page, $incJS, $pos_link, 0);\r
+\r
+       // css avant la fin du head\r
+       $pos_head = strpos($page, '</head>');\r
+               $page = substr_replace($page, $incCSS, $pos_head, 0);\r
+       \r
+       return $page;\r
+}\r
+\r
+\r
+/**\r
+ * Balise indiquant un champ SQL crayonnable\r
+ *\r
+ * @note\r
+ *   Si cette fonction est absente, balise_EDIT_dist() déclarée par SPIP\r
+ *   ne retourne rien\r
+ * \r
+ * @example\r
+ *   <div class="#EDIT{texte}">#TEXTE</div>\r
+ *   <div class="#EDIT{ps}">#PS</div>\r
+ *\r
+ * @param Champ $p\r
+ *   Pile au niveau de la balise\r
+ * @return Champ\r
+ *   Pile complétée par le code à générer\r
+**/\r
+function balise_EDIT($p) {\r
+\r
+       // le code compile de ce qui se trouve entre les {} de la balise\r
+       $label = interprete_argument_balise(1,$p);\r
+\r
+       // Verification si l'on est dans le cas d'une meta\r
+       // #EDIT{meta-descriptif_site} ou #EDIT{meta-demo/truc}\r
+       if (preg_match('/meta-(.*)\'/',$label,$meta)) {\r
+               $type = 'meta';\r
+               $label= 'valeur';\r
+               $primary = $meta[1];\r
+               $p->code = "classe_boucle_crayon('"\r
+                       . $type\r
+                       ."',"\r
+                       .sinon($label,"''")\r
+                       .","\r
+                       . "str_replace('/', '__', '$primary')" # chaque / doit être remplacé pour CSS.\r
+                       .").' '";\r
+               $p->interdire_scripts = false;\r
+               return $p;\r
+       }\r
+\r
+       $i_boucle = $p->nom_boucle ? $p->nom_boucle : $p->id_boucle;\r
+       // #EDIT hors boucle? ne rien faire\r
+       if (!$type = ($p->boucles[$i_boucle]->type_requete)) {\r
+               $p->code = "''";\r
+               $p->interdire_scripts = false;\r
+               return $p;\r
+       }\r
+\r
+       // crayon sur une base distante 'nua:article-intro-5'\r
+       if ($distant = $p->boucles[$i_boucle]->sql_serveur)\r
+               $type = $distant.'__'.$type;\r
+\r
+       // le compilateur 1.9.2 ne calcule pas primary pour les tables secondaires\r
+       // il peut aussi arriver une table sans primary (par ex: une vue)\r
+       if(!($primary = $p->boucles[$i_boucle]->primary)){\r
+               include_spip('inc/vieilles_defs'); # 1.9.2 pour trouver_def_table\r
+               list($nom, $desc) = trouver_def_table(\r
+                       $p->boucles[$i_boucle]->type_requete, $p->boucles[$i_boucle]);\r
+               $primary = $desc['key']['PRIMARY KEY'];\r
+       }\r
+\r
+       $primary = explode(',',$primary);\r
+       $id = array();\r
+       foreach($primary as $key) {\r
+               $id[] = champ_sql(trim($key),$p);\r
+       }\r
+       $primary = implode(".'-'.",$id);\r
+\r
+       $p->code = "classe_boucle_crayon('"\r
+               . $type\r
+               ."',"\r
+               .sinon($label,"''")\r
+               .","\r
+               . $primary\r
+               .").' '";\r
+       $p->interdire_scripts = false;\r
+       return $p;\r
+}\r
+\r
+\r
+/**\r
+ * Balise indiquant une configuration crayonnable\r
+ *\r
+ * @example\r
+ *   <div class="#EDIT_CONFIG{descriptif_site}">#DESCRIPTIF_SITE_SPIP</div>\r
+ *   <div class="#EDIT_CONFIG{demo/truc}">#CONFIG{demo/truc}</div>\r
+ *\r
+ * @param Champ $p\r
+ *   Pile au niveau de la balise\r
+ * @return Champ\r
+ *   Pile complétée par le code à générer\r
+**/\r
+function balise_EDIT_CONFIG_dist($p) {\r
+\r
+       // le code compile de ce qui se trouve entre les {} de la balise\r
+       $config = interprete_argument_balise(1,$p);\r
+       if (!$config) return $p;\r
+\r
+       // chaque / du nom de config doit être transformé pour css.\r
+       // nous utiliserons '__' à la place.\r
+\r
+       $type = 'meta';\r
+       $label= 'valeur';\r
+\r
+       $p->code = "classe_boucle_crayon('"\r
+               . $type\r
+               . "','"\r
+               . $label\r
+               . "',"\r
+               . "str_replace('/', '__', $config)" \r
+               . ").' '";\r
+       $p->interdire_scripts = false;\r
+       return $p;\r
+}\r
+\r
+/**\r
+ * Crée le controleur du crayon indiqué par la classe CSS\r
+ *\r
+ * @param string $class\r
+ *   Class CSS de crayon tel que créé par #EDIT\r
+ * @return string\r
+ *   HTML du crayon, sinon texte d'erreur\r
+**/\r
+function creer_le_crayon($class) {\r
+       include_spip('inc/crayons');\r
+       include_spip('action/crayons_html');\r
+       $a = affiche_controleur($class, array('w' => 485, 'h' => 300, 'wh' => 500));\r
+       return $a['$erreur'] ? $a['$erreur'] : $a['$html'];\r
+}\r
+\r
+/**\r
+ * Balise #CRAYON affichant un formulaire de crayon\r
+ * SI ?edit=1;\r
+ *\r
+ * @example\r
+ *   #CRAYON{ps}\r
+ *\r
+ * @param Champ $p\r
+ *   Pile au niveau de la balise\r
+ * @return Champ\r
+ *   Pile complétée par le code à générer\r
+**/\r
+function balise_CRAYON($p) {\r
+       $p = balise_EDIT($p);\r
+       $p->code = 'creer_le_crayon('.$p->code.')';\r
+       return $p;\r
+}\r
+\r
+\r
+/**\r
+ * Donne la classe CSS crayon en fonction\r
+ * - du type de la boucle\r
+ *   (attention aux exceptions pour #EDIT dans les boucles HIERARCHIE et SITES)\r
+ * - du champ demande (vide, + ou se terminant par + : (+)classe type--id)\r
+ * - de l'id courant\r
+ * \r
+ * @param string $type\r
+ *   Type d'objet, ou "meta" pour un champ de configuration\r
+ * @param string $champ\r
+ *   Champ SQL concerné\r
+ * @param int|string $id\r
+ *   Identifiant de la ligne sql\r
+ * @return string\r
+ *   Classes CSS (à ajouter dans le HTML à destination du javascript de Crayons)\r
+**/\r
+function classe_boucle_crayon($type, $champ, $id) {\r
+       // $type = objet_type($type);\r
+       $type = $type[strlen($type) - 1] == 's' ?\r
+               substr($type, 0, -1) :\r
+               str_replace(\r
+                       array('hierarchie', 'syndication'),\r
+                       array('rubrique',   'site'),\r
+               $type);\r
+\r
+       $plus = (substr($champ, -1) == '+' AND $champ = substr($champ, 0, -1))\r
+               ? " $type--$id"\r
+               : '';\r
+       \r
+       // test rapide pour verifier que l'id est valide (a-zA-Z0-9)\r
+       if (false !== strpos($id, ' ')) {\r
+               spip_log("L'identifiant ($id) ne pourra être géré ($type | $champ)", 'crayons');\r
+               return 'crayon_id_ingerable';\r
+       }\r
+       \r
+       return 'crayon ' . $type . '-' . $champ . '-' . $id . $plus;\r
+}\r
+\r
+?>\r
diff --git a/www/plugins/crayons/fonds/cfg_crayons.html b/www/plugins/crayons/fonds/cfg_crayons.html
new file mode 100644 (file)
index 0000000..df6eef9
--- /dev/null
@@ -0,0 +1,11 @@
+<!-- descriptif=
+       <a href="http://www.spip-contrib.net/Les-Crayons" class="spip_out">Cf. documentation</a>
+ -->
+<!-- titre=<:crayons:titre_crayons:> -->
+<!-- icone=images/crayon-24.png -->
+<!-- logo=images/crayon-128.png -->
+
+#CACHE{0}
+<div class="ajax">
+#FORMULAIRE_CONFIGURER_CRAYONS
+</div>
diff --git a/www/plugins/crayons/formulaires/configurer_crayons.html b/www/plugins/crayons/formulaires/configurer_crayons.html
new file mode 100644 (file)
index 0000000..fa8d014
--- /dev/null
@@ -0,0 +1,112 @@
+<!-- autoriser=configurer -->
+<!-- refus=<:cfg:refus_configuration_administrateur:> -->
+<!-- nom=crayons -->
+
+<div class="formulaire_spip formulaire_cfg formulaire_#FORM">
+
+<h3 class='titrem'>[(#CHEMIN{images/crayon-24.png}|image_reduire{24}|inserer_attribut{class,cadre-icone}|inserer_attribut{alt,''})]<:crayons:titre_config_crayons:></h3>
+
+[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
+[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
+
+<form method="post" action="#ENV{action}">
+<div>
+#ACTION_FORMULAIRE{#ENV{action}}
+<ul>
+#SET{erreurs,#ENV**{erreurs}|table_valeur{barretypo}}
+<li class="editer editer_barretypo[ (#GET{erreurs}|oui)erreur]">
+       <label for="barretypo"><:crayons:label_barre_typo:></label>
+       [<span class='erreur_message'>(#GET{erreurs})</span>]
+       <div class="choix">
+               <input type="checkbox" name="barretypo" class="checkbox"  value='on' id='barretypo'[ (#ENV{barretypo}|oui)checked="checked"] />
+               <label for='barretypo'><:crayons:label_activer_barre_typo:></label>
+               [(#PLUGIN{porte_plume,version}|version_compare{'1.5','>='}|oui)[<p class="attention">(#EVAL{PORTE_PLUME_PUBLIC}|non|ou{#CONFIG{barre_outils_public}|=={non}|oui})<:crayons:activation_barre_impossible:></p>]]
+       </div>
+</li>
+
+#SET{erreurs,#ENV**{erreurs}|table_valeur{msgNoChange}}
+<li class="editer editer_messages[ (#GET{erreurs}|oui)erreur]">
+       <label><:crayons:label_message:></label>
+       [<span class='erreur_message'>(#GET{erreurs})</span>]
+       <div class="choix">
+               <input type="checkbox" name="msgNoChange" class="checkbox" value='on' id='msgNoChange'[ (#ENV{msgNoChange}|oui)checked="checked"] />
+               <label for='msgNoChange'><:crayons:label_msg_no_change:></label>
+       </div>
+       <div class="choix">
+               <input type="checkbox" name="msgAbandon" class="checkbox" value='on' id='msgAbandon'[ (#ENV{msgAbandon}|oui)checked="checked"] />
+               <label for='msgAbandon'><:crayons:label_msg_abandon:></label>
+       </div>
+</li>
+
+#SET{erreurs,#ENV**{erreurs}|table_valeur{filet}}
+<li class="editer editer_effets[ (#GET{erreurs}|oui)erreur]">
+       <label><:crayons:label_effets:></label>
+       [<span class='erreur_message'>(#GET{erreurs})</span>]
+       <div class="choix">
+               <input type="checkbox" name="filet" class="checkbox" value='on' id='filet'[ (#ENV{filet}|oui)checked="checked"] />
+               <label for='filet'><:crayons:label_filet:></label>
+       </div>
+       <div class="choix">
+               <input type="checkbox" name="yellow_fade" class="checkbox" value='on' id='yellow_fade'[ (#ENV{yellow_fade}|oui)checked="checked"] />
+               <label for='yellow_fade'><:crayons:label_yellow_fade:></label>
+       </div>
+       <div class="choix">
+               <input type="checkbox" name="clickhide" class="checkbox" value='on' id='clickhide'[ (#ENV{clickhide}|oui)checked="checked"] />
+               <label for='clickhide'><:crayons:label_clickhide:></label>
+       </div>
+</li>
+
+
+#SET{erreurs,#ENV**{erreurs}|table_valeur{reduire_logo}}
+<li class="editer editer_reduire_logo[ (#GET{erreurs}|oui)erreur]">
+       <label><:crayons:label_reduire_logo:></label>
+       [<span class='erreur_message'>(#GET{erreurs})</span>]
+       <p class='explication'><:crayons:explication_reduire_logo:></p>
+       <input type="text" name="reduire_logo" class="text" size="3" id='reduire_logo' value="[(#ENV{reduire_logo}|intval)]" />
+</li>
+
+<li class="fieldset fieldset_crayons_prive">
+       <h3 class="legend"><:crayons:legend_editer_prive:></h3>
+       <ul>
+               #SET{erreurs,#ENV**{erreurs}|table_valeur{espaceprive}}
+               <li class="editer editer_reduire_logo[ (#GET{erreurs}|oui)erreur]">
+                       <label><:crayons:label_espaceprive:></label>
+                       [<span class='erreur_message'>(#GET{erreurs})</span>]
+                       <div class="choix">
+                               <input type="checkbox" name="espaceprive" class="checkbox"  value='on' id='espaceprive'[ (#ENV{espaceprive}|oui)checked="checked"] />
+                               <label for='espaceprive'><:crayons:label_activer_crayons_prive:></label>
+                       </div>
+               </li>
+               #SET{erreurs,#ENV**{erreurs}|table_valeur{exec_autorise}}
+               <li class="editer editer_exec_autorise[ (#GET{erreurs}|oui)erreur]">
+                       <label><:crayons:label_exec_autorise:></label>
+                       [<span class='erreur_message'>(#GET{erreurs})</span>]
+                       <p class='explication'><:crayons:explication_exec_autorise:></p>
+                       <input type="text" name="exec_autorise" class="text"  id='exec_autorise' value="[(#ENV{exec_autorise}|attribut_html)]" />
+               </li>
+       </ul>
+</li>
+
+
+<li class="fieldset fieldset_crayons_upload experimental">
+       <h3 class="legend"><:crayons:legend_documents:></h3>
+       <ul>
+               <li class="editer editer_reduire_logo[ (#GET{erreurs}|oui)erreur]">
+                       <label><:crayons:info_experimental:></label>
+                       [<span class='erreur_message'>(#GET{erreurs})</span>]
+                       <div class="choix">
+                               <input type="checkbox" name="upload" class="checkbox"  value='on' id='upload'[ (#ENV{upload}|oui)checked="checked"] />
+                               <label for='upload'><:crayons:label_upload_document:></label>
+                       </div>
+               </li>
+       </ul>
+</li>
+
+
+</ul>
+<p class="boutons">
+       <input type="submit" name="_cfg_ok" value="<:bouton_enregistrer:>" class="submit" />
+</p>
+</div>
+</form>
+</div>
diff --git a/www/plugins/crayons/images/annuler-16.png b/www/plugins/crayons/images/annuler-16.png
new file mode 100644 (file)
index 0000000..fd4c41a
Binary files /dev/null and b/www/plugins/crayons/images/annuler-16.png differ
diff --git a/www/plugins/crayons/images/changed.png b/www/plugins/crayons/images/changed.png
new file mode 100644 (file)
index 0000000..12829fa
Binary files /dev/null and b/www/plugins/crayons/images/changed.png differ
diff --git a/www/plugins/crayons/images/crayon-128.png b/www/plugins/crayons/images/crayon-128.png
new file mode 100644 (file)
index 0000000..51d52ee
Binary files /dev/null and b/www/plugins/crayons/images/crayon-128.png differ
diff --git a/www/plugins/crayons/images/crayon-24.png b/www/plugins/crayons/images/crayon-24.png
new file mode 100644 (file)
index 0000000..4370da9
Binary files /dev/null and b/www/plugins/crayons/images/crayon-24.png differ
diff --git a/www/plugins/crayons/images/crayon-32.png b/www/plugins/crayons/images/crayon-32.png
new file mode 100644 (file)
index 0000000..ef17876
Binary files /dev/null and b/www/plugins/crayons/images/crayon-32.png differ
diff --git a/www/plugins/crayons/images/crayon.png b/www/plugins/crayons/images/crayon.png
new file mode 100644 (file)
index 0000000..74d9c22
Binary files /dev/null and b/www/plugins/crayons/images/crayon.png differ
diff --git a/www/plugins/crayons/images/crayon20.png b/www/plugins/crayons/images/crayon20.png
new file mode 100644 (file)
index 0000000..c8e3851
Binary files /dev/null and b/www/plugins/crayons/images/crayon20.png differ
diff --git a/www/plugins/crayons/images/edit.png b/www/plugins/crayons/images/edit.png
new file mode 100644 (file)
index 0000000..aa0c5d6
Binary files /dev/null and b/www/plugins/crayons/images/edit.png differ
diff --git a/www/plugins/crayons/images/ok-16.png b/www/plugins/crayons/images/ok-16.png
new file mode 100755 (executable)
index 0000000..c277e6b
Binary files /dev/null and b/www/plugins/crayons/images/ok-16.png differ
diff --git a/www/plugins/crayons/images/pencil.png b/www/plugins/crayons/images/pencil.png
new file mode 100644 (file)
index 0000000..8be4812
Binary files /dev/null and b/www/plugins/crayons/images/pencil.png differ
diff --git a/www/plugins/crayons/images/resizer.png b/www/plugins/crayons/images/resizer.png
new file mode 100644 (file)
index 0000000..5f42c4f
Binary files /dev/null and b/www/plugins/crayons/images/resizer.png differ
diff --git a/www/plugins/crayons/images/searching.gif b/www/plugins/crayons/images/searching.gif
new file mode 100644 (file)
index 0000000..01d48f3
Binary files /dev/null and b/www/plugins/crayons/images/searching.gif differ
diff --git a/www/plugins/crayons/inc/compat_crayons.php b/www/plugins/crayons/inc/compat_crayons.php
new file mode 100644 (file)
index 0000000..2bcdf51
--- /dev/null
@@ -0,0 +1,94 @@
+<?php\r
+\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+## ceci n'est pas l'original mais la copie pour crayons\r
+\r
+// Module de compatibilite pour les plugins qui veulent passer en 1.9.3\r
+// tout en restant compatibles avec 1.9.2 voire 1.9.1 : il permet de faire\r
+// tourner sur ces versions du code prevu pour 1.9.3\r
+\r
+// C'est l'inverse de vieilles_defs (lequel vise a permettre a du code\r
+// fait pour 1.9.2 de tourner sur 1.9.3)\r
+\r
+// Ce module doit etre appele par le plugin ("nouveau code") de la\r
+// maniere suivante :\r
+/*\r
+\r
+// Si SPIP est vieux, charger les fonctions de compat\r
+if ($GLOBALS['spip_version_code'] < '1.93'\r
+AND $f = charger_fonction('compat', 'inc'))\r
+       $f();\r
+\r
+qui charge toutes les defs de compat connues\r
+\r
+ou plus precis :\r
+\r
+// Si SPIP est vieux, charger les fonctions de compat\r
+if ($GLOBALS['spip_version_code'] < '1.93'\r
+AND $f = charger_fonction('compat', 'inc'))\r
+       $f('sql_fetch');\r
+\r
+ou encore :\r
+\r
+// Si SPIP est vieux, charger les fonctions de compat\r
+if ($GLOBALS['spip_version_code'] < '1.93'\r
+AND $f = charger_fonction('compat', 'inc'))\r
+       $f(array('sql_fetch', '_q'));\r
+\r
+\r
+*/\r
+\r
+// En termes de distribution ce fichier PEUT etre recopie dans chaque plugin\r
+// qui desire en avoir une version autonome (voire forkee), A CONDITION DE\r
+// RENOMMER le fichier et ses deux fonctions ; c'est un peu lourd a maintenir\r
+// mais c'est le prix a payer pour l'independance des plugins entre eux :-(\r
+\r
+// la version commune a tous est developpee sur\r
+// svn://zone.spip.org/spip-zone/_dev_/compat/\r
+\r
+\r
+function inc_compat_crayons_dist($quoi = NULL) {\r
+       if (!function_exists($f = 'compat_crayons_defs')) $f .= '_dist';\r
+       $defs = $f();\r
+\r
+       if (is_string($quoi))\r
+               $quoi = array($quoi);\r
+       else if (is_null($quoi))\r
+               $quoi = array_keys($defs);\r
+\r
+       foreach ($quoi as $d) {\r
+               if (!function_exists($d)\r
+               AND isset($defs[$d])) {\r
+                       eval ("function $d".$defs[$d]);\r
+               }\r
+       }\r
+}\r
+\r
+function compat_crayons_defs_dist() {\r
+       $defs = array();\r
+\r
+       // http://trac.rezo.net/trac/spip/changeset/9919\r
+       if ($GLOBALS['spip_version_code'] < '1.9259')\r
+       $defs['sql_fetch'] = '($res, $serveur=\'\') {\r
+               return spip_fetch_array($res);\r
+       }';
+       
+       $defs['table_objet_sql'] = '($type) {
+               global $table_des_tables;
+               $nom = table_objet($type);
+               include_spip(\'public/interfaces\');
+               if (isset($table_des_tables[$nom])) {
+                       $t = $table_des_tables[$nom];
+                       $nom = \'spip_\' . $t;
+               }
+               return $nom ;
+       }';\r
+\r
+       // Contourner un bug du plugin CFG\r
+       include_spip('base/abstract_sql');\r
+\r
+       return $defs;\r
+}\r
+\r
+?>\r
diff --git a/www/plugins/crayons/inc/crayons-json.php b/www/plugins/crayons/inc/crayons-json.php
new file mode 100644 (file)
index 0000000..d9da53e
--- /dev/null
@@ -0,0 +1,99 @@
+<?php
+
+/***************************************************************************\
+ *  SPIP, Systeme de publication pour l'internet                           *
+ *                                                                         *
+ *  Copyright (c) 2001-2010                                                *
+ *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
+ *                                                                         *
+ *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
+ *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
+\***************************************************************************/
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// Les fonctions de toggg pour faire du JSON
+
+/**
+ * Transform a variable into its javascript equivalent (recursive)
+ * @access private
+ * @param mixed the variable
+ * @return string js script | boolean false if error
+ */
+
+// http://doc.spip.org/@var2js
+function crayons_var2js($var) {
+       $asso = false;
+       switch (true) {
+               case is_null($var) :
+                       return 'null';
+               case is_string($var) :
+                       return '"' .addcslashes($var, "\"\\\n\r\t/") . '"';
+               case is_bool($var) :
+                       return $var ? 'true' : 'false';
+               case is_scalar($var) :
+                       return (string)$var;
+               case is_object( $var) :
+                       $var = get_object_vars($var);
+                       $asso = true;
+               case is_array($var) :
+                       $keys = array_keys($var);
+                       $ikey = count($keys);
+                       while (!$asso && $ikey--) {
+                               $asso = $ikey !== $keys[$ikey];
+                       }
+                       $sep = '';
+                       if ($asso) {
+                               $ret = '{';
+                               foreach ($var as $key => $elt) {
+                                       $ret .= $sep . '"' . $key . '":' . crayons_var2js($elt);
+                                       $sep = ',';
+                               }
+                               return $ret ."}";
+                       } else {
+                               $ret = '[';
+                               foreach ($var as $elt) {
+                                       $ret .= $sep . crayons_var2js($elt);
+                                       $sep = ',';
+                               }
+                               return $ret ."]";
+                       }
+       }
+       return false;
+}
+
+// Un json_encode qui marche en iso (la spec JSON exige utf-8)
+function crayons_json_encode($v) {
+       if ($GLOBALS['meta']['charset'] == 'utf-8'
+       AND function_exists('json_encode'))
+               return json_encode($v);
+
+       $v = crayons_var2js($v);
+
+       if ($GLOBALS['meta']['charset'] != 'utf-8') {
+               include_spip('inc/charsets');
+               $v = charset2unicode($v);
+       }
+
+       return $v;
+}
+
+// http://doc.spip.org/@json_export
+function crayons_json_export($var) {
+       return crayons_json_encode($var);
+
+/// Il semble que ce hack n'ait plus lieu d'etre avec jquery 1.5
+/*
+       // flag indiquant qu'on est en iframe et qu'il faut proteger nos
+       // donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop
+       if (defined('FILE_UPLOAD'))
+               return "<textarea>".htmlspecialchars($var)."</textarea>";
+       else
+               return $var;
+*/
+
+}
+
+
+
+?>
diff --git a/www/plugins/crayons/inc/crayons.php b/www/plugins/crayons/inc/crayons.php
new file mode 100644 (file)
index 0000000..6bf5b4b
--- /dev/null
@@ -0,0 +1,599 @@
+<?php\r
+\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+define('_PREG_CRAYON', ',crayon\b[^<>\'"]+?\b((\w+)-(\w+)-(\w+(?:-\w+)*))\b,');\r
+\r
+// Compatibilite pour 1.92 : on a besoin de sql_fetch et table_objet_sql\r
+if ($GLOBALS['spip_version_code'] < '1.93' AND $f = charger_fonction('compat_crayons', 'inc'))\r
+       $f();\r
+\r
+// Autoriser les crayons sur les tables non SPIP ?\r
+// Par defaut : oui (pour les admins complets, si autoriser_defaut_dist()) ;\r
+// mettre a false en cas de mutualisation par prefixe de table,\r
+// sinon on ne peut pas garantir que les sites sont hermetiques\r
+define('_CRAYONS_TABLES_EXTERNES', true);\r
+\r
+// Autorisations non prevues par le core\r
+include_spip('inc/autoriser');\r
+\r
+include_spip('inc/crayons-json');\r
+\r
+\r
+if (!function_exists('autoriser_meta_modifier_dist')) {\r
+/**\r
+ * Autorisation d'éditer les configurations dans spip_meta\r
+ *\r
+ * Les admins complets OK pour certains champs,\r
+ * Sinon, il faut être webmestre\r
+ *\r
+ * @note\r
+ *  Attention sur les SPIP < 11515 (avant 04/2008) inc/autoriser\r
+ *  passe seulement intval($id) alors qu'ici la cle est une chaine...\r
+ *\r
+ * @param  string $faire Action demandée\r
+ * @param  string $type  Type d'objet sur lequel appliquer l'action\r
+ * @param  int    $id    Identifiant de l'objet\r
+ * @param  array  $qui   Description de l'auteur demandant l'autorisation\r
+ * @param  array  $opt   Options de cette autorisation\r
+ * @return bool          true s'il a le droit, false sinon\r
+**/\r
+function autoriser_meta_modifier_dist($faire, $type, $id, $qui, $opt) {\r
+       // Certaines cles de configuration sont echapées ici (cf #EDIT_CONFIG{demo/truc})\r
+       // $id = str_replace('__', '/', $id);\r
+       if (in_array("$id", array(\r
+               'nom_site', 'slogan_site', 'descriptif_site', 'email_webmaster'\r
+       )))\r
+               return autoriser('configurer', null, null, $qui);\r
+       else\r
+               return autoriser('webmestre', null, null, $qui);\r
+}\r
+}\r
+\r
+// table spip_messages, la c'est tout simplement non (peut mieux faire,\r
+// mais c'est a voir dans le core/organiseur ou dans autorite)\r
+if (defined('_DIR_PLUGIN_ORGANISEUR'))\r
+       include_spip('organiseur_autoriser');\r
+if (!function_exists('autoriser_message_modifier_dist')) {\r
+       function autoriser_message_modifier_dist($faire, $type, $id, $qui, $opt) {\r
+               return false;\r
+       }\r
+}\r
+//compat 192 documents\r
+if ($GLOBALS['spip_version_code'] < '1.93'){\r
+       if (!function_exists('get_spip_doc')){\r
+                       function get_spip_doc($fichier) {\r
+                                       // fichier distant\r
+                                       if (preg_match(',^\w+://,', $fichier))\r
+                                                       return $fichier;\r
+\r
+                                       // gestion d'erreurs, fichier=''\r
+                                       if (!strlen($fichier))\r
+                                                       return false;\r
+\r
+                                       // fichier normal\r
+                                       return (strpos($fichier, _DIR_IMG) === false)\r
+                                       ? _DIR_IMG . $fichier\r
+                                       : $fichier;\r
+                  }\r
+       }\r
+}\r
+\r
+// Autoriser l'usage des crayons ?\r
+function autoriser_crayonner_dist($faire, $type, $id, $qui, $opt) {\r
+       // Le type pouvant etre une table, verifier les autoriser('modifier')\r
+       // correspondant ; ils demandent le nom de l'objet: spip_articles => article\r
+       // ex: spip_articles => 'article'\r
+       $type = preg_replace(',^spip_(.*?)s?$,', '\1', $type);\r
+       if (strlen($GLOBALS['table_prefix']))\r
+               $type = preg_replace(',^'.$GLOBALS['table_prefix'].'_(.*?)s?$,', '\1', $type);\r
+\r
+       // Tables non SPIP ? Si elles sont interdites il faut regarder\r
+       // quelle table on appelle, et verifier si elle est "interne"\r
+       if (!_CRAYONS_TABLES_EXTERNES) {\r
+               include_spip('base/serial');\r
+               include_spip('base/auxiliaires');\r
+               include_spip('public/parametrer');\r
+               if (!isset($GLOBALS['tables_principales']['spip_'.table_objet($type)])\r
+               AND !isset($GLOBALS['tables_auxiliaires']['spip_'.table_objet($type)]))\r
+                       return false;\r
+       }\r
+\r
+       // Traduire le modele en liste de champs\r
+       if (isset($opt['modele']))\r
+               $opt['champ'] = $opt['modele'];\r
+\r
+       // Pour un auteur, si le champ est statut ou email, signaler l'option\r
+       // ad hoc (cf. inc/autoriser)\r
+       if ($type == 'auteur'\r
+       AND in_array($opt['champ'], array('statut', 'email')))\r
+               $opt[$opt['champ']] = true;\r
+\r
+       return (\r
+                autoriser('modifier', $type, $id, $qui, $opt)\r
+       );\r
+}\r
+\r
+// Si un logo est demande, on renvoie la date dudit logo (permettra de gerer\r
+// un "modifie par ailleurs" si la date a change, rien de plus)\r
+function valeur_champ_logo($table, $id, $champ) {\r
+       $chercher_logo = charger_fonction('chercher_logo', 'inc');\r
+       $on = $chercher_logo($id, id_table_objet($table), 'on');\r
+       return $on ? filemtime($on[0]) : false;\r
+}\r
+\r
+// Idem : si un doc est demande, on renvoie la date du doc\r
+function valeur_champ_document($table, $id, $champ) {\r
+       $s = spip_query("SELECT date FROM spip_documents WHERE id_document="._q($id));\r
+       if ($t = sql_fetch($s))\r
+               return $t['date'];\r
+}\r
+\r
+function valeur_champ_vignette($table, $id, $champ) {\r
+       $vignette = sql_getfetsel('id_vignette','spip_documents','id_document='.intval($id));\r
+       if(is_numeric($vignette) && ($vignette > 0)){\r
+               $date = sql_getfetsel('date','spip_documents','id_document='.intval($vignette));\r
+       }\r
+       return $date ? $date : false;\r
+}\r
+// cette fonction de revision recoit le fichier upload a passer en logo\r
+// en reference : le nom du widget, pour aller chercher d'autres donnees\r
+// (ex: supprimer)\r
+function logo_revision($id, $file, $type, $ref) {\r
+\r
+       $chercher_logo = charger_fonction('chercher_logo', 'inc');\r
+       $_id_objet = id_table_objet($type);\r
+\r
+       // Chargement d'un nouveau logo ?\r
+       if ($file['logo']) {\r
+               define('FILE_UPLOAD', true); // message pour crayons_json_export :(\r
+\r
+               // supprimer l'ancien logo\r
+               $on = $chercher_logo($id, $_id_objet, 'on');\r
+               if ($on) @unlink($on[0]);\r
+\r
+               // ajouter le nouveau\r
+               include_spip('action/iconifier');\r
+               action_spip_image_ajouter_dist(\r
+                       type_du_logo($_id_objet).'on'.$id, false, false\r
+               ); // beurk\r
+       }\r
+\r
+       else\r
+\r
+       // Suppression du logo ?\r
+       if ($wid = array_pop($ref)\r
+       AND $_POST['content_'.$wid.'_logo_supprimer'] == 'on') {\r
+               if ($on = $chercher_logo($id, $_id_objet, 'on'))\r
+                       @unlink($on[0]);\r
+       }\r
+\r
+\r
+       // Reduire le logo ?\r
+       if (is_array($cfg = @unserialize($GLOBALS['meta']['crayons']))\r
+       AND $max = intval($cfg['reduire_logo'])) {\r
+               $on = $chercher_logo($id, $_id_objet, 'on');\r
+               include_spip('inc/filtres');\r
+               @copy($on[0], $temp = _DIR_VAR.'tmp'.rand(0,999).'.'.$on[3]);\r
+               $img1 = filtrer('image_reduire', $temp, $max);\r
+               $img2 = preg_replace(',[?].*,', '', extraire_attribut($img1, 'src'));\r
+               if (@file_exists($img2)\r
+               AND $img2 !=  $temp) {\r
+                       @unlink($on[0]);\r
+                       $dest = $on[1].$on[2].'.'\r
+                               .preg_replace(',^.*\.(gif|jpg|png)$,', '\1', $img2);\r
+                       @rename($img2,$dest);\r
+               }\r
+               @unlink($temp);\r
+       }\r
+\r
+       return true;\r
+}\r
+\r
+\r
+// cette fonction de revision recoit le fichier upload a passer en document\r
+function document_fichier_revision($id, $data, $type, $ref) {\r
+\r
+       $s = spip_query("SELECT * FROM spip_documents WHERE id_document="._q($id));\r
+       if (!$t = sql_fetch($s))\r
+               return false;\r
+\r
+       /*\r
+       // Envoi d'une URL de document distant ?\r
+       // TODO: verifier l'extension distante, sinon tout explose\r
+       if ($data['fichier']\r
+       AND preg_match(',^(https?|ftp)://.+,', $data['fichier'])) {\r
+               include_spip('inc/modifier');\r
+               modifier_contenu('document', $id,\r
+                       array('champs' => array('fichier', 'distant')),\r
+                       array('fichier' => $data['fichier'], 'distant' => 'oui')\r
+               );\r
+               return true;\r
+       }\r
+       else\r
+       */\r
+\r
+       // Chargement d'un nouveau doc ?\r
+       if ($data['document']) {\r
+\r
+               $ajouter_documents = charger_fonction('ajouter_documents', 'inc');\r
+               $arg = $data['document'];\r
+               check_upload_error($arg['error']);\r
+               $x = $ajouter_documents($arg['tmp_name'], $arg['name'],\r
+                       'article', 0, 'document', null, $actifs);\r
+\r
+               // $actifs contient l'id_document nouvellement cree\r
+               // on recopie les donnees interessantes dans l'ancien\r
+               $extension=", extension ";\r
+               //compat 192\r
+               if ($GLOBALS['spip_version_code'] < '1.93')\r
+                       $extension="";\r
+\r
+               if ($id_new = array_pop($actifs)\r
+               AND $s = spip_query("SELECT fichier, taille, largeur, hauteur $extension, distant FROM spip_documents\r
+                       WHERE id_document="._q($id_new))\r
+               AND $new = sql_fetch($s)) {\r
+                       define('FILE_UPLOAD', true); // message pour crayons_json_export :(\r
+\r
+                       // Une vignette doit rester une image\r
+                       if ($t['mode'] == 'vignette'\r
+                       AND !in_array($new['extension'], array('jpg', 'gif', 'png')))\r
+                               return false;\r
+\r
+                       // Maintenant on est bon, on recopie les nouvelles donnees\r
+                       // dans l'ancienne ligne spip_documents\r
+                       include_spip('inc/modifier');\r
+                       modifier_contenu('document', $id,\r
+                               # 'champs' inutile a partir de SPIP 11348\r
+                               array('champs' => array_keys($new)),\r
+                               $new);\r
+\r
+                       // supprimer l'ancien document (sauf s'il etait distant)\r
+                       if ($t['distant'] != 'oui'\r
+                       AND file_exists(get_spip_doc($t['fichier'])))\r
+                               supprimer_fichier(get_spip_doc($t['fichier']));\r
+\r
+                       // Effacer la ligne temporaire de spip_document\r
+                       spip_query("DELETE FROM spip_documents WHERE id_document="._q($id_new));\r
+\r
+                       // oublier id_document temporaire (ca marche chez moi, sinon bof)\r
+                       spip_query("ALTER TABLE spip_documents AUTO_INCREMENT="._q($id_new));\r
+\r
+                       return true;\r
+               }\r
+       }\r
+\r
+}\r
+\r
+// cette fonction de revision soit supprime la vignette d'un document,\r
+// soit recoit le fichier upload a passer ou remplacer la vignette du document\r
+function vignette_revision($id, $data, $type, $ref) {\r
+       $s = sql_fetsel("*","spip_documents","id_document=".intval($id));\r
+       if (!is_array($s))\r
+               return false;\r
+\r
+       include_spip('inc/modifier');\r
+       include_spip('inc/documents');\r
+       // Chargement d'un nouveau doc ?\r
+       if ($data['vignette']) {\r
+               define('FILE_UPLOAD', true);\r
+               if(is_numeric($s['id_vignette']) && ($s['id_vignette']>0)){\r
+                       spip_log('suppression de la vignette');\r
+                       // Suppression du document\r
+                       $vignette = sql_getfetsel('fichier', 'spip_documents', 'id_document='.intval($s['id_vignette']));\r
+                       if (@file_exists($f = get_spip_doc($vignette))) { \r
+                               spip_log("efface $f"); \r
+                               supprimer_fichier($f); \r
+                       }\r
+                       sql_delete('spip_documents', 'id_document='.intval($s['id_vignette']));\r
+                       sql_delete('spip_documents_liens',  'id_document='.intval($s['id_vignette']));\r
+\r
+                       pipeline('post_edition',\r
+                               array(\r
+                                       'args' => array(\r
+                                               'operation' => 'supprimer_document',\r
+                                               'table' => 'spip_documents',\r
+                                               'id_objet' => $s['id_vignette']\r
+                                       ),\r
+                                       'data' => null\r
+                               )\r
+                       );\r
+                       \r
+                       // On remet l'id_vignette a 0\r
+                       revision_document($s['id_document'], array('id_vignette'=>0));\r
+               }\r
+               // Ajout du document comme vignette\r
+               $ajouter_documents = charger_fonction('ajouter_documents', 'inc');\r
+               $arg = $data['vignette'];\r
+               check_upload_error($arg['error']);\r
+               $x = $ajouter_documents($arg['tmp_name'], $arg['name'],'','', 'vignette', $id, $actifs);\r
+       }else\r
+               // Suppression de la vignette ?\r
+               if ($wid = array_pop($ref)\r
+                       AND $_POST['content_'.$wid.'_vignette_supprimer'] == 'on') {\r
+                       if(is_numeric($s['id_vignette']) && ($s['id_vignette']>0)){\r
+                               // Suppression du document\r
+                               $vignette = sql_getfetsel('fichier', 'spip_documents', 'id_document='.intval($s['id_vignette']));\r
+                               if (@file_exists($f = get_spip_doc($vignette))) { \r
+                                       spip_log("efface $f"); \r
+                                       supprimer_fichier($f); \r
+                               }\r
+                               sql_delete('spip_documents', 'id_document='.intval($s['id_vignette']));\r
+                               sql_delete('spip_documents_liens',  'id_document='.intval($s['id_vignette']));\r
+                               \r
+                               pipeline('post_edition',\r
+                                       array(\r
+                                               'args' => array(\r
+                                                       'operation' => 'supprimer_document',\r
+                                                       'table' => 'spip_documents',\r
+                                                       'id_objet' => $s['id_vignette']\r
+                                               ),\r
+                                               'data' => null\r
+                                       )\r
+                               );\r
+                               \r
+                               // On remet l'id_vignette a 0\r
+                               revision_document($s['id_document'], array('id_vignette'=>0));\r
+                       }\r
+               }\r
+       return true;\r
+}\r
+\r
+function colonne_table($type, $col) {\r
+       list($distant,$table) = distant_table($type);\r
+       $nom_table = '';\r
+       if (!(($tabref = &crayons_get_table($table, $nom_table)) && ($brut = $tabref['field'][$col]))) {\r
+               return false;\r
+       }\r
+       $ana = explode(' ', $brut);\r
+       $sta = 0;\r
+       $sep = '';\r
+       $ret = array('brut' => $brut,\r
+               'type' => '', 'notnull' => false, 'long' => 0, 'def' => '');\r
+       foreach ($ana as $mot) {\r
+               switch ($sta) {\r
+                       case 0: $ret['type'] = ($mot = strtolower($mot));\r
+                       case 1: if ($mot[strlen($mot) - 1] == ')') {\r
+                                       $pos = strpos($mot, '(');\r
+                                       $ret['type'] = strtolower(substr($mot, 0, $pos++));\r
+                                       $vir = explode(',', substr($mot, $pos, -1));\r
+                                       if ($ret['type'] == 'enum') {\r
+                                               $ret['enum'] = $vir;\r
+                                       } elseif (count($vir) > 1) {\r
+                                               $ret['long'] = $vir;\r
+                                       } else {\r
+                                               $ret['long'] = $vir[0];\r
+                                       }\r
+                                       $sta = 1;\r
+                                       continue;\r
+                               }\r
+                               if (!$sta) {\r
+                                       $sta = 1;\r
+                                       continue;\r
+                               }\r
+                       case 2: switch (strtolower($mot)) {\r
+                               case 'not':\r
+                                       $sta = 3;\r
+                                       continue;\r
+                               case 'default':\r
+                                       $sta = 4;\r
+                                       continue;\r
+                               }\r
+                               continue;\r
+                       case 3:         $ret['notnull'] = strtolower($mot) == 'null';\r
+                               $sta = 2;\r
+                               continue;\r
+                       case 4: $df1 = strpos('"\'', $mot[0]) !== false? $mot[0] : '';\r
+                               $sta = 5;\r
+                       case 5: $ret['def'] .= $sep . $mot;\r
+                               if (!$df1) {\r
+                                       $sta = 2;\r
+                                       continue;\r
+                               }\r
+                               if ($df1 == $mot[strlen($mot) - 1]) {\r
+                                       $ret['def'] = substr($ret['def'], 1, -1);\r
+                                       $sta = 2;\r
+                               }\r
+                               $sep = ' ';\r
+                               continue;\r
+               }\r
+       }\r
+       return $ret;\r
+}\r
+//     var_dump(colonne_table('forum', 'id_syndic')); die();\r
+\r
+function table_where($type, $id, $where_en_tableau = false)\r
+{\r
+       list($distant,$table) = distant_table($type);\r
+       $nom_table = '';\r
+       if (!(($tabref = &crayons_get_table($type, $nom_table))\r
+                       && ($tabid = explode(',', $tabref['key']['PRIMARY KEY'])))) {\r
+               spip_log('crayons: table ' . $table . ' inconnue');\r
+               return array(false, false);\r
+       }\r
+       if (is_scalar($id)) {\r
+               $id = explode('-', $id);\r
+       }\r
+       // sortie tableau pour sql_updateq\r
+       if ($where_en_tableau) {\r
+               $where = array();\r
+               foreach ($id as $idcol => $idval) {\r
+                       $where[] = '`' . (is_int($idcol) ? trim($tabid[$idcol]) : $idcol) . '`=' . sql_quote($idval);\r
+               }\r
+       // sinon sortie texte pour sql_query\r
+       } else {\r
+               $where = $and = '';\r
+               foreach ($id as $idcol => $idval) {\r
+                       $where .= $and . '`' . (is_int($idcol) ? trim($tabid[$idcol]) : $idcol) . '`=' . _q($idval);\r
+                       $and = ' AND ';\r
+               }\r
+       }\r
+       return array($nom_table, $where);\r
+}\r
+//     var_dump(colonne_table('forum', 'id_syndic')); die();\r
+\r
+function valeur_colonne_table_dist($type, $col, $id) {\r
+       list($distant,$table) = distant_table($type);\r
+       list($nom_table, $where) = table_where($type, $id);\r
+\r
+       if (!$nom_table)\r
+               return false;\r
+\r
+       $r = array();\r
+\r
+       // valeurs non SQL\r
+       foreach ($col as $champ) {\r
+               if (function_exists($f = 'valeur_champ_'.$table.'_'.$champ) OR function_exists($f = 'valeur_champ_'.$champ)) {\r
+                       $r[$champ] = $f($table, $id, $champ);\r
+                       $col = array_diff($col, array($champ));\r
+               }\r
+       }\r
+\r
+       // valeurs SQL\r
+       if (count($col)\r
+       AND $s = spip_query(\r
+                       'SELECT `' . implode($col, '`, `') .\r
+                       '` FROM ' . $nom_table . ' WHERE ' . $where, $distant)\r
+       AND $t = sql_fetch($s))\r
+               $r = array_merge($r, $t);\r
+\r
+       return $r;\r
+}\r
+\r
+/**\r
+ * Extrait la valeur d'une ou plusieurs colonnes d'une table\r
+ *\r
+ * @param string $table\r
+ *   Type d'objet de la table (article)\r
+ * @param string|array $col\r
+ *   Nom de la ou des colonnes (ps)\r
+ * @param string $id\r
+ *   Identifiant de l'objet\r
+ * @return array\r
+ *   Couples Nom de la colonne => Contenu de la colonne\r
+**/\r
+function valeur_colonne_table($table, $col, $id) {\r
+       if (!is_array($col))\r
+               $col = array($col);\r
+\r
+       if (function_exists($f = $table.'_valeur_colonne_table_dist')\r
+       OR function_exists($f = $table.'_valeur_colonne_table')\r
+       OR $f = 'valeur_colonne_table_dist')\r
+               return $f($table, $col, $id);\r
+}\r
+\r
+/**\r
+ * Extrait la valeur d'une configuration en meta\r
+ *\r
+ * Pour ces données, il n'y a toujours qu'une colonne (valeur),\r
+ * mais on gère l'enregistrement et la lecture via lire_config ou ecrire_config\r
+ * dès que l'on demande des sous parties d'une configuration.\r
+ *\r
+ * On ne retourne alors ici dans 'valeur' que la sous-partie demandée si\r
+ * c'est le cas.\r
+ *\r
+ * @param string $table\r
+ *   Nom de la table (meta)\r
+ * @param array $col\r
+ *   Nom des colonnes (valeur)\r
+ * @param string $id\r
+ *   Nom ou clé de configuration (descriptif_site ou demo__truc pour demo/truc)\r
+ * @return array\r
+ *   Couple valeur => Contenu de la configuration\r
+**/\r
+function meta_valeur_colonne_table_dist($table, $col, $id) {\r
+       // Certaines clés de configuration sont echapées ici (cf #EDIT_CONFIG{demo/truc})\r
+       $id = str_replace('__', '/', $id);\r
+\r
+       // Éviter de planter les vieux SPIP\r
+       if (false === strpos($id, '/')) {\r
+               $config = isset($GLOBALS['meta'][$id]) ? $GLOBALS['meta'][$id] : '';\r
+       // SPIP 3 ou Bonux 2 ou CFG\r
+       } else {\r
+               include_spip('inc/config');\r
+               $config =  lire_config($id, '');\r
+       }\r
+       return array('valeur' => $config);\r
+}\r
+\r
+\r
+function return_log($var) {\r
+       die(crayons_json_export(array('$erreur'=> var_export($var,true))));\r
+}\r
+\r
+function _U($texte, $params=array())\r
+{\r
+    include_spip('inc/charsets');\r
+    return unicode2charset(html2unicode(_T($texte, $params)));\r
+}\r
+\r
+// wdgcfg = widget config :-)\r
+function wdgcfg() {\r
+       $php = function_exists('crayons_config') ? crayons_config() : array();\r
+       include_spip('inc/meta');\r
+       lire_metas();\r
+       global $meta;\r
+       $metacrayons = empty($meta['crayons']) ? array() : unserialize($meta['crayons']);\r
+       $wdgcfg = array();\r
+       foreach (array(\r
+               'msgNoChange' => false,\r
+               'msgAbandon' => false,  /* etait: true */\r
+               'filet' => false,\r
+               'yellow_fade' => false,\r
+               'clickhide' => false /* etait: true */\r
+       )\r
+       as $cfgi => $def) {\r
+               $wdgcfg[$cfgi] = isset($php[$cfgi]) ? $php[$cfgi] :\r
+                       isset($metacrayons[$cfgi]) ? $metacrayons[$cfgi] : $def;\r
+       }\r
+       return $wdgcfg;\r
+}\r
+\r
+function &crayons_get_table($type, &$nom_table) {\r
+       list($distant,$table) = distant_table($type);\r
+       static $return = array();\r
+       static $noms = array();\r
+       if (!isset($return[$table])) {\r
+               $try = array(table_objet_sql($table), 'spip_'.table_objet($table), 'spip_' . $table . 's', $table . 's', 'spip_' . $table, $table);\r
+\r
+               // premiere possibilite (à partir de 1.9.3) : regarder directement la base\r
+               if (function_exists('sql_showtable')) {\r
+                       foreach ($try as $nom) {\r
+                               if ($q = sql_showtable($nom , !$distant , $distant)) {\r
+                                       $noms[$table] = $nom;\r
+                                       $return[$table] = $q;\r
+                                       break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               // seconde, une heuristique 1.9.2\r
+               if (!isset($return[$table])) {\r
+                       include_spip('base/serial');\r
+                       include_spip('base/auxiliaires');\r
+                       include_spip('public/parametrer');\r
+                       foreach(array('tables_principales', 'tables_auxiliaires') as $categ)\r
+                       {\r
+                               foreach ($try as $nom) {\r
+                                       if (isset($GLOBALS[$categ][$nom])) {\r
+                                               $noms[$table] = $nom;\r
+                                               $return[$table] = & $GLOBALS[$categ][$nom];\r
+                                               break 2;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       $nom_table = $noms[$table];\r
+       return $return[$table];\r
+}\r
+\r
+function distant_table($type) {\r
+       //separation $type en $distant $table\r
+       //separateur double underscore "__"\r
+       strstr($type,'__')? list($distant,$table) = explode('__',$type) : list($distant,$table) = array(False,$type);\r
+       return array($distant,$table);\r
+}\r
+?>\r
diff --git a/www/plugins/crayons/js/crayons-fade.js b/www/plugins/crayons/js/crayons-fade.js
new file mode 100644 (file)
index 0000000..47f5b88
--- /dev/null
@@ -0,0 +1,101 @@
+
+// Gestion du Yellow Fade (fonctionnalite optionnelle)
+function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) {
+       var delta = maxValue - minValue;
+       var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
+       return Math.ceil(stepp)
+};
+
+function doBGFade(elem,startRGB,endRGB,finalColor,steps,intervals,powr) {
+       if (elem.bgFadeInt) window.clearInterval(elem.bgFadeInt);
+       var actStep = 0;
+       elem.bgFadeInt = window.setInterval(
+               function() {
+                       elem.style.backgroundColor = "rgb("+
+                               easeInOut(startRGB[0],endRGB[0],steps,actStep,powr)+","+
+                               easeInOut(startRGB[1],endRGB[1],steps,actStep,powr)+","+
+                               easeInOut(startRGB[2],endRGB[2],steps,actStep,powr)+")";
+                       actStep++;
+                       if (actStep > steps) {
+                       elem.style.backgroundColor = finalColor;
+                       window.clearInterval(elem.bgFadeInt);
+                       }
+               }
+               ,intervals)
+};
+
+function findPos(obj) {
+       var curleft = curtop = 0;
+       if (obj.offsetParent) {
+               curleft = obj.offsetLeft;
+               curtop = obj.offsetTop;
+               while (obj = obj.offsetParent) {
+                       curleft += obj.offsetLeft;
+                       curtop += obj.offsetTop;
+               }
+       }
+       return [curleft,curtop];
+};
+
+// demarrage crayons-fade
+jQuery(document).ready(function() {
+       if (configCrayons.cfg.yellow_fade) {
+               // Activer le Yellow Fade pour les elements editables
+               jQuery("div.crayon").hover(function(){doBGFade(this,[255,255,180],[255,255,255],'transparent',40,20,4);}, function(){});
+       }
+
+       if (configCrayons.cfg.filet) {
+               // on rajoute une div supplémentaire qui se cale avec la div courante 
+               // C'est elle qui va s'afficher lors du hover
+               
+               // esthetique
+               jQuery('.crayon-icones img',this).css({
+                       'padding':'2px',
+                       'border':'2px solid #999',
+                       'border-left':'0',
+                       'background-color':'#FFF'
+               });
+                       
+               var test=0;
+               
+               jQuery('.crayon-autorise').each(
+                       function(){
+                               var contenu = jQuery(this).html();
+                               jQuery(this)
+                                       .css('height',this.offsetHeight + 'px')
+                                       .html('<div></div>');
+                               jQuery(this)
+                                       .find('div')
+                                               .html(contenu)
+                                               .css('position','absolute')
+                                               .css('width',this.offsetWidth + 'px');
+                               jQuery(this)
+                                       .prepend('<div class="survol"></div>')
+                                       .find('.survol')
+                                               .css('border','1px solid red')
+                                               .css('display','none')
+                                               .css('position','absolute')
+                                               .css('height',(this.offsetHeight - 2) + 'px')
+                                               .css('width',(this.offsetWidth - 2) + 'px');
+                               if (jQuery.browser.msie) {
+                           jQuery('#survol')
+                                               .css('width',this.offsetWidth + 'px')
+                                               .css('height',this.offsetHeight + 'px');
+                               }
+                       }
+               );
+
+               jQuery('.crayon-autorise').hover(
+                       function(){
+                               if (jQuery.browser.msie) jQuery(this).addClass('crayon-hover');
+                               jQuery('.survol', this).css('display','block');
+                       },
+                       function(){
+                               if (jQuery.browser.msie) jQuery(this).removeClass('crayon-hover');
+                               jQuery('.survol', this).css('display','none');
+                       }
+               );
+               
+       }
+
+});
diff --git a/www/plugins/crayons/js/crayons.js b/www/plugins/crayons/js/crayons.js
new file mode 100644 (file)
index 0000000..c216829
--- /dev/null
@@ -0,0 +1,561 @@
+(function($){
+/*
+ *     crayons.js (c) Fil, toggg, 2006-2013 -- licence GPL
+ */
+
+// le prototype configuration de Crayons
+$.prototype.cfgCrayons = function (options) {
+       this.url_crayons_html = '?action=crayons_html';
+       this.img = {
+               'searching':{'txt':'En attente du serveur ...'},
+               'edit':{'txt':'Editer'},
+               'img-changed':{'txt':'Deja modifie'}
+       };
+       this.txt = {
+       };
+       for (opt in options) {
+               this[opt] = options[opt];
+       }
+};
+
+$.prototype.cfgCrayons.prototype.mkimg = function(what, extra) {
+       var txt = this.img[what] ? this.img[what].txt : this.img['crayon'].txt;
+       return '<em class="crayon-'+what+'" title="'+ txt + (extra ? extra : '') + '"></em>';
+};
+
+$.prototype.cfgCrayons.prototype.iconclick = function(c, type) {
+
+       // le + qui passe en prive pour editer tout si classe type--id
+       var link = c.match(/\b(\w+)--(\d+)\b/);
+       link = link ?
+               '<a href="ecrire/?exec=' + link[1] + 's_edit&id_' + link[1] + '=' + link[2] +
+               '">' + this.mkimg('edit', ' (' + link[1] + ' ' + link[2] + ')') + '</a>' : '';
+
+       // on recherche une class du type type-champ-id
+       // comme article-texte-10 pour le texte de l'article 10
+       // ou meta-valeur-meta
+       var cray =
+                          c.match(/\b\w+-(\w+)-\d(?:-\w+)+\b/)   // numeros_lien-type-2-3-article (table-champ-cles)
+                       || c.match(/\b\w+-(\w+)-\d+\b/)           // article-texte-10 (inclu dans le precedent, mais bon)
+               || c.match(/\b\meta-valeur-(\w+)\b/)      // meta-valeur-xx
+               ;
+
+       var boite = !cray ? '' : this.mkimg(type, ' (' + cray[1] + ')');
+
+       return "<span class='crayon-icones'><span>" + boite +
+                       this.mkimg('img-changed', cray ? ' (' + cray[1] + ')': '') +
+                       link +"</span></span>";
+};
+
+function entity2unicode(txt)
+{
+       var reg = txt.split(/&#(\d+);/i);
+       for (var i = 1; i < reg.length; i+=2) {
+               reg[i] = String.fromCharCode(parseInt(reg[i]));
+       }
+       return reg.join('');
+};
+
+function uniAlert(txt)
+{
+       alert(entity2unicode(txt));
+};
+
+function uniConfirm(txt)
+{
+       return confirm(entity2unicode(txt));
+};
+
+// donne le crayon d'un element
+$.fn.crayon = function(){
+       if (this.length)
+               return $(
+                       $.map(this, function(a){
+                               return '#'+($(a).find('.crayon-icones').attr('rel'));
+                       })
+                       .join(','));
+       else
+               return $([]);
+};
+
+// ouvre un crayon
+$.fn.opencrayon = function(evt, percent) {
+       if (evt && evt.stopPropagation) {
+               evt.stopPropagation();
+       }
+       return this
+       .each(function(){
+               // verifier que je suis un crayon
+               if (!$(this).is('.crayon'))
+                       return;
+
+               // voir si je dispose deja du crayon comme voisin
+               if ($(this).is('.crayon-has')) {
+                       $(this)
+                       .css('visibility','hidden')
+                       .crayon()
+                               .show();
+               }
+               // sinon charger le formulaire
+               else {
+                       // sauf si je suis deja en train de le charger (lock)
+                       if ($(this).find("em.crayon-searching").length) {
+                               return;
+                       }
+                       $(this)
+                       .find('>span.crayon-icones span')
+                       .append(configCrayons.mkimg('searching')); // icone d'attente
+                       var me=this;
+                       var offset = $(this).offset();
+                       var params = {
+                               'top': offset.top,
+                               'left': offset.left,
+                               'w': $(this).width(),
+                               'h': $(this).height(),
+                               'ww': (window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth)),
+                               'wh': (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight)),
+                               'em': $(this).px('fontSize'), // eviter un bug MSIE sur fontSize
+                               'class': me.className,
+                               'color': $(this).css('color'),
+                               'font-size': $(this).px('fontSize'),
+                               'font-family': $(this).css('fontFamily'),
+                               'font-weight': $(this).css('fontWeight'),
+                               'line-height': $(this).css('lineHeight'),
+                               'min-height': $(this).css('lineHeight'),
+                               'text-align': $(this).css('textAlign'),
+                               'background-color': $(this).css('backgroundColor'),
+                               'self': configCrayons.self
+                       };
+                       if (me.type) params.type = me.type;
+                       if (params['background-color'] == 'transparent'
+                       || params['background-color'] == 'rgba(0, 0, 0, 0)') {
+                               $(me).parents()
+                               .each(function(){
+                                       var bg = $(this).css('backgroundColor');
+                                       if (bg != 'transparent'
+                                       && (params['background-color'] == 'transparent'
+                                       || params['background-color'] == 'rgba(0, 0, 0, 0)'))
+                                               params['background-color'] = bg;
+                               });
+                       }
+                       $.post(configCrayons.url_crayons_html,
+                               params,
+                               function (c) {
+                                       try {
+                                               c = $.parseJSON(c);
+                                       } catch(e) {
+                                               c = {'$erreur': 'erreur de communication :' + '  ' + e.message, '$html':''};
+                                       }
+                                       $(me)
+                                       .find("em.crayon-searching")
+                                               .remove();
+                                       if (c.$erreur) {
+                                               uniAlert(c.$erreur);
+                                               return false;
+                                       }
+                                       id_crayon++;
+
+                                       var position = 'absolute';
+                                       $(me).parents().each(function(){
+                                               if($(this).css("position") == "fixed")
+                                                       position = 'fixed';
+                                       });
+
+                                       $(me)
+                                       .css('visibility','hidden')
+                                       .addClass('crayon-has')
+                                       .find('>.crayon-icones')
+                                               .attr('rel','crayon_'+id_crayon);
+                                       if ($.browser.msie) $(me).css({'zoom':1});
+                                       var pos = $(me).offset();
+                                       $('<div class="crayon-html" id="crayon_'+id_crayon+'"></div>')
+                                       .css({
+                                               'position':position,
+                                               'top':pos['top']-1,
+                                               'left':pos['left']-1
+                                       })
+                                       .appendTo('body')
+                                       .html(c.$html);
+                                       $(me)
+                                       .activatecrayon(percent);
+                                       // Si le crayon a une taille mini qui le fait deborder
+                                       // a droite de l'ecran, recadrer vers la gauche
+                                       var diff = $('#crayon_'+id_crayon).offset().left + $('#crayon_'+id_crayon).width() - $(window).width();
+                                       if (diff>0) {
+                                                $('#crayon_'+id_crayon)
+                                                .css({'left': parseInt(pos['left'])-diff});
+                                       }
+                               }
+                       );
+               }
+       });
+};
+
+// annule le crayon ouvert (fonction destructive)
+$.fn.cancelcrayon = function() {
+       this
+               .filter('.crayon-has')
+               .css('visibility','visible')
+               .removeClass('crayon-has')
+               .removeClass('crayon-changed')
+       .crayon()
+               .remove();
+       return this;
+};
+
+// masque le crayon ouvert
+$.fn.hidecrayon = function() {
+       this
+       .filter('.crayon-has')
+       .css('visibility','visible')
+       .crayon()
+               .hide()
+               .removeClass('crayon-hover');
+       return this;
+};
+
+// active un crayon qui vient d'etre charge
+$.fn.activatecrayon = function(percent) {
+       this
+       .crayon()
+       .click(function(e){
+               e.stopPropagation();
+       });
+       this
+       .each(function(){
+               var me = $(this);
+               var crayon = $(this).crayon();
+               crayon
+               .find('form')
+                       .append(
+                               $('<input type="hidden" name="self" />')
+                               .attr('value',configCrayons.self)
+                       )
+                       .ajaxForm({
+                       "dataType":"json",
+                       "error": function(d) {
+                               uniAlert('erreur de communication');
+                               crayon
+                               .empty()
+                               .append(
+                                       $('<div class="error">')
+                                       .html(d.responseText || d.error || 'erreur inconnue')
+                               )
+                               .css({
+                                       background: 'white',
+                                       color: 'black',
+                                       width: '480px',
+                                       border: 'red solid 2px',
+                                       padding: '10px'}
+                               );
+                       },
+                       "success": function(d) {
+                               // parfois le JSON n'est pas renvoye sous forme d'objet
+                               // mais d'une chaine encadree de <pre>...</pre>
+                               if (typeof d == "string") {
+                                       try {
+                                               d = $.parseJSON(d.replace(/^<pre>/,'').replace(/<[/]pre>$/,''));
+                                       } catch(e) {
+                                               d = {'$erreur': 'erreur de communication :' + '  ' + e.message, '$html':''};
+                                       }
+                               }
+                               me
+                               .find("em.crayon-searching")
+                                       .remove();
+
+                               //Remise a zero des warnings invalides (unwrap)
+                               crayon
+                               .find("span.crayon-invalide p")
+                                         .remove();
+                               crayon
+                               .find("span.crayon-invalide")
+                                         .each(function(){
+                                             $(this).replaceWith( this.childNodes );
+                                               }
+                                           );
+
+                               if(d.$invalides) {
+                                       for (invalide in d.$invalides) {
+                                               //Affichage des warnings invalides
+                                               d.$invalides[invalide]['retour']?retour=d.$invalides[invalide]['retour']:retour='';
+                                               d.$invalides[invalide]['msg']?msg=d.$invalides[invalide]['msg']:msg='';
+                                               crayon
+                                                   .find("*[name='content_"+invalide+"']")
+                                                       .wrap("<span class=\"crayon-invalide\"></span>")
+                                                   .parent()
+                                                   .append("<p>"
+                                                               + retour
+                                                               + " "
+                                                               + msg
+                                                               + "</p>"
+                                                       );
+                                               }
+
+                               }
+
+                               if (d.$erreur > '') {
+                                       if (d.$annuler) {
+                                               if (d.$erreur > ' ') {
+                                                       uniAlert(d.$erreur);
+                                               }
+                                               me
+                                               .cancelcrayon();
+                                       } else {
+                                                       uniAlert(d.$erreur+'\n'+configCrayons.txt.error);
+                                       }
+                               }
+
+                               if (d.erreur > '' || d.$invalides) {
+                                       crayon
+                                       .find('form')
+                                               .css('opacity', 1.0)
+                                               .find(".crayon-boutons,.resizehandle")
+                                                       .show()
+                                               .end()
+                                               .find('.crayon-searching')
+                                                       .remove();
+                                               return false;
+                               }
+                               // Desactive celui pour qui on vient de recevoir les nouvelles donnees
+                               $(me)
+                               .cancelcrayon();
+                               // Insere les donnees dans *tous* les elements ayant le meme code
+                               var tous = $(
+                                       '.crayon.crayon-autorise.' +
+                                               me[0].className.match(/crayon ([^ ]+)/)[1]
+                               )
+                               .html(
+                                       d[$('input.crayon-id', crayon).val()]
+                               )
+                               .iconecrayon();
+                               // Declencher le onAjaxLoad normal de SPIP
+                               if (typeof jQuery.spip == 'object' && typeof jQuery.spip.triggerAjaxLoad == 'function') {
+                                       jQuery.spip.triggerAjaxLoad(tous.get());
+                               }
+                               // SPIP 2.x
+                               else if (typeof triggerAjaxLoad == 'function') {
+                                       triggerAjaxLoad(tous.get());
+                               }
+                       }})
+                       .bind('form-submit-validate',function(form,a, e, options, veto){
+                               if(!veto.veto)
+                               crayon
+                               .find('form')
+                                       .css('opacity', 0.5)
+                                       .after(configCrayons.mkimg('searching')) // icone d'attente
+                                       .find(".crayon-boutons,.resizehandle")
+                                               .hide();
+                       })
+                       // keyup pour les input et textarea ...
+                       .keyup(function(e){
+                               crayon
+                               .find(".crayon-boutons")
+                                       .show();
+                               me
+                               .addClass('crayon-changed');
+                               e.cancelBubble = true; // ne pas remonter l'evenement vers la page
+                       })
+                       // ... change pour les select : ici on submit direct, pourquoi pas
+                       .change(function(e){
+                               crayon
+                               .find(".crayon-boutons")
+                                       .show();
+                               me
+                               .addClass('crayon-changed');
+                               e.cancelBubble = true;
+                       })
+                       .keypress(function(e){
+                               e.cancelBubble = true;
+                       })
+                       // focus par defaut (crayons sans textarea/text, mais uniquement menus ou fichiers)
+                       .find('input:visible:first').focus().end()
+                       .find("textarea.crayon-active,input.crayon-active[type=text]")
+                               .each(function(n){
+                                       // focus pour commencer a taper son texte directement dans le champ
+                                       // on essaie de positionner la selection (la saisie) au niveau du clic
+                                       // ne pas le faire sur un input de [type=file]
+                                       if (n==0) {
+                                               this.focus();
+                                               // premiere approximation, en fonction de la hauteur du clic
+                                               var position = parseInt(percent * this.textLength);
+                                               this.selectionStart=position;
+                                               this.selectionEnd=position;
+                                       }
+                               })
+                       .end()
+                       .keydown(function(e){
+                               if(!e.charCode && e.keyCode == 119 /* F8, windows */) {
+                                               crayon
+                                               .find("form.formulaire_crayon")
+                                               .submit();
+                               }
+                               if (e.keyCode == 27) { /* esc */
+                                       me
+                                       .cancelcrayon();
+                               }
+                       })
+                       .keypress(function(e){
+                               // Clavier pour sauver
+                               if (
+                               (e.ctrlKey && (
+                                       /* ctrl-s ou ctrl-maj-S, firefox */
+                                       ((e.charCode||e.keyCode) == 115) || ((e.charCode||e.keyCode) == 83))
+                                       /* ctrl-s, safari */
+                                       || (e.charCode==19 && e.keyCode==19)
+                               ) ||
+                               (
+                                       e.shiftKey && (e.keyCode == 13) /* shift-return */
+                               )
+                               ) {
+                                       crayon
+                                       .find("form.formulaire_crayon")
+                                       .submit();
+                               }
+                               var maxh = this.className.match(/\bmaxheight(\d+)?\b/);
+                               if (maxh) {
+                                       maxh = maxh[1] ? parseInt(maxh[1]) : 200;
+                                       maxh = this.scrollHeight < maxh ? this.scrollHeight : maxh;
+                                       if (maxh > this.clientHeight) {
+                                               $(this).css('height', maxh + 'px');
+                                       }
+                               }
+                       })
+                       .find(".crayon-submit")
+                               .click(function(e){
+                                       e.stopPropagation();
+                                       $(this)
+                                       .parents("form:eq(0)")
+                                       .submit();
+                               })
+                       .end()
+                       .find(".crayon-cancel")
+                               .click(function(e){
+                                       e.stopPropagation();
+                                       me
+                                       .cancelcrayon();
+                               })
+                       .end()
+                       // decaler verticalement si la fenetre d'edition n'est pas visible
+                       .each(function(){
+                               var offset = $(this).offset();
+                               var hauteur = parseInt($(this).css('height'));
+                               var scrolltop = $(window).scrollTop();
+                               var h = $(window).height();
+                               if (offset['top'] - 5 <= scrolltop)
+                                       $(window).scrollTop(offset['top'] - 5);
+                               else if (offset['top'] + hauteur - h + 20 > scrolltop)
+                                       $(window).scrollTop(offset['top'] + hauteur - h + 30);
+                               // Si c'est textarea, on essaie de caler verticalement son contenu
+                               // et on lui ajoute un resizehandle
+                               $("textarea", this)
+                               .each(function(){
+                                       if (percent && this.scrollHeight > hauteur) {
+                                               this.scrollTop = this.scrollHeight * percent - hauteur;
+                                       }
+                               })
+                               .resizehandle()
+                                       // decaler les boutons qui suivent un resizer de 16px vers le haut
+                                       .next('.resizehandle')
+                                               .next('.crayon-boutons')
+                                               .addClass('resizehandle_boutons');
+                       })
+               .end();
+               // Declencher le onAjaxLoad normal de SPIP
+               // (apres donc le chargement de la page de saisie (controleur))
+               if (typeof jQuery.spip == 'object' && typeof jQuery.spip.triggerAjaxLoad == 'function') {
+                       jQuery.spip.triggerAjaxLoad(crayon.get());
+               }
+               // SPIP 2.x
+               else if (typeof triggerAjaxLoad == 'function') {
+                       triggerAjaxLoad(crayon.get());
+               }
+       });
+};
+
+// insere les icones et le type de crayon (optionnel) dans l'element
+$.fn.iconecrayon = function(){
+       return this.each(function() {
+               var ctype = this.className.match(/\b[^-]type_(\w+)\b/);
+               type = (ctype) ? ctype[1] : 'crayon';
+               if (ctype) this.type = type; // Affecte son type a l'objet crayon
+               $(this).prepend(configCrayons.iconclick(this.className, type))
+               .find('.crayon-' + type + ', .crayon-img-changed') // le crayon a clicker lui-meme et sa memoire
+                       .click(function(e){
+                               $(this).parents('.crayon:eq(0)').opencrayon(e);
+                       });
+               });
+};
+
+// initialise les crayons
+$.fn.initcrayon = function(){
+       var editme = function(e){
+               timeme=null;
+               $(this).opencrayon(e,
+                       // calcul du "percent" du click par rapport a la hauteur totale du div
+                       ((e.pageY ? e.pageY : e.clientY) - document.body.scrollTop - this.offsetTop)
+                       / this.clientHeight);
+       };
+       var timeme;
+       this
+       .addClass('crayon-autorise')
+       .dblclick(editme)
+       .bind("touchstart",function(e){var me=this;timeme=setTimeout(function(){editme.apply(me,[e]);},800);})
+       .bind("touchend",function(e){if (timeme) {clearTimeout(timeme);timeme=null;}})
+       .iconecrayon()
+       .hover( // :hover pour MSIE
+               function(){
+                       $(this)
+                       .addClass('crayon-hover')
+                       .find('>span.crayon-icones')
+                               .find('>span>em.crayon-' + (this.type||'crayon') + ',>span>em.crayon-edit')
+                                       .show();//'visibility','visible');
+               },function(){
+                       $(this)
+                       .removeClass('crayon-hover')
+                       .find('>span.crayon-icones')
+                               .find('>span>em.crayon-' + (this.type||'crayon') + ',>span>em.crayon-edit')
+                                       .hide();//('visibility','hidden');
+               }
+       );
+       return this;
+};
+
+// demarrage
+$.fn.crayonsstart = function() {
+       if (!configCrayons.droits) return;
+       id_crayon = 0; // global
+
+       // sortie, demander pour sauvegarde si oubli
+       if (configCrayons.txt.sauvegarder) {
+               $(window).unload(function(e) {
+                       var chg = $(".crayon-changed");
+                       if (chg.length && uniConfirm(configCrayons.txt.sauvegarder)) {
+                               chg.crayon().find('form').submit();
+                       }
+               });
+       }
+
+       // demarrer les crayons
+       if ((typeof crayons_init_dynamique == 'undefined') || (crayons_init_dynamique==false)) {
+               $('.crayon:not(.crayon-init)')
+               .live('mouseover touchstart', function(e) {
+                       $(this)
+                       .addClass('crayon-init')
+                       .filter(configCrayons.droits)
+                       .initcrayon()
+                       .trigger('mouseover');
+                       if (e.type=='touchstart')
+                               $(this).trigger('touchstart');
+               });
+       }
+
+       // un clic en dehors ferme tous les crayons ouverts ?
+       if (configCrayons.cfg.clickhide)
+       $("html")
+       .click(function(){
+               $('.crayon-has')
+               .hidecrayon();
+       });
+};
+
+})(jQuery);
diff --git a/www/plugins/crayons/js/jquery.form.js b/www/plugins/crayons/js/jquery.form.js
new file mode 100644 (file)
index 0000000..c0fba53
--- /dev/null
@@ -0,0 +1,825 @@
+/*!
+ * jQuery Form Plugin
+ * version: 2.73 (03-MAY-2011)
+ * @requires jQuery v1.3.2 or later
+ *
+ * Examples and documentation at: http://malsup.com/jquery/form/
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ */
+;(function($) {
+
+/*
+       Usage Note:
+       -----------
+       Do not use both ajaxSubmit and ajaxForm on the same form.  These
+       functions are intended to be exclusive.  Use ajaxSubmit if you want
+       to bind your own submit handler to the form.  For example,
+
+       $(document).ready(function() {
+               $('#myForm').bind('submit', function(e) {
+                       e.preventDefault(); // <-- important
+                       $(this).ajaxSubmit({
+                               target: '#output'
+                       });
+               });
+       });
+
+       Use ajaxForm when you want the plugin to manage all the event binding
+       for you.  For example,
+
+       $(document).ready(function() {
+               $('#myForm').ajaxForm({
+                       target: '#output'
+               });
+       });
+
+       When using ajaxForm, the ajaxSubmit function will be invoked for you
+       at the appropriate time.
+*/
+
+/**
+ * ajaxSubmit() provides a mechanism for immediately submitting
+ * an HTML form using AJAX.
+ */
+$.fn.ajaxSubmit = function(options) {
+       // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
+       if (!this.length) {
+               log('ajaxSubmit: skipping submit process - no element selected');
+               return this;
+       }
+
+       if (typeof options == 'function') {
+               options = { success: options };
+       }
+
+       var action = this.attr('action');
+       var url = (typeof action === 'string') ? $.trim(action) : '';
+       if (url) {
+               // clean url (don't include hash vaue)
+               url = (url.match(/^([^#]+)/)||[])[1];
+       }
+       url = url || window.location.href || '';
+
+       options = $.extend(true, {
+               url:  url,
+               success: $.ajaxSettings.success,
+               type: this[0].getAttribute('method') || 'GET', // IE7 massage (see issue 57)
+               iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
+       }, options);
+
+       // hook for manipulating the form data before it is extracted;
+       // convenient for use with rich editors like tinyMCE or FCKEditor
+       var veto = {};
+       this.trigger('form-pre-serialize', [this, options, veto]);
+       if (veto.veto) {
+               log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
+               return this;
+       }
+
+       // provide opportunity to alter form data before it is serialized
+       if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
+               log('ajaxSubmit: submit aborted via beforeSerialize callback');
+               return this;
+       }
+
+       var n,v,a = this.formToArray(options.semantic);
+       if (options.data) {
+               options.extraData = options.data;
+               for (n in options.data) {
+                       if(options.data[n] instanceof Array) {
+                               for (var k in options.data[n]) {
+                                       a.push( { name: n, value: options.data[n][k] } );
+                               }
+                       }
+                       else {
+                               v = options.data[n];
+                               v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
+                               a.push( { name: n, value: v } );
+                       }
+               }
+       }
+
+       // give pre-submit callback an opportunity to abort the submit
+       if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
+               log('ajaxSubmit: submit aborted via beforeSubmit callback');
+               return this;
+       }
+
+       // fire vetoable 'validate' event
+       this.trigger('form-submit-validate', [a, this, options, veto]);
+       if (veto.veto) {
+               log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
+               return this;
+       }
+
+       var q = $.param(a);
+
+       if (options.type.toUpperCase() == 'GET') {
+               options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
+               options.data = null;  // data is null for 'get'
+       }
+       else {
+               options.data = q; // data is the query string for 'post'
+       }
+
+       var $form = this, callbacks = [];
+       if (options.resetForm) {
+               callbacks.push(function() { $form.resetForm(); });
+       }
+       if (options.clearForm) {
+               callbacks.push(function() { $form.clearForm(); });
+       }
+
+       // perform a load on the target only if dataType is not provided
+       if (!options.dataType && options.target) {
+               var oldSuccess = options.success || function(){};
+               callbacks.push(function(data) {
+                       var fn = options.replaceTarget ? 'replaceWith' : 'html';
+                       $(options.target)[fn](data).each(oldSuccess, arguments);
+               });
+       }
+       else if (options.success) {
+               callbacks.push(options.success);
+       }
+
+       options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
+               var context = options.context || options;   // jQuery 1.4+ supports scope context 
+               for (var i=0, max=callbacks.length; i < max; i++) {
+                       callbacks[i].apply(context, [data, status, xhr || $form, $form]);
+               }
+       };
+
+       // are there files to upload?
+       var fileInputs = $('input:file', this).length > 0;
+       var mp = 'multipart/form-data';
+       var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
+
+       // options.iframe allows user to force iframe mode
+       // 06-NOV-09: now defaulting to iframe mode if file input is detected
+   if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
+          // hack to fix Safari hang (thanks to Tim Molendijk for this)
+          // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
+          if (options.closeKeepAlive) {
+                  $.get(options.closeKeepAlive, fileUpload);
+               }
+          else {
+                  fileUpload();
+               }
+   }
+   else {
+               $.ajax(options);
+   }
+
+       // fire 'notify' event
+       this.trigger('form-submit-notify', [this, options]);
+       return this;
+
+
+       // private function for handling file uploads (hat tip to YAHOO!)
+       function fileUpload() {
+               var form = $form[0];
+
+               if ($(':input[name=submit],:input[id=submit]', form).length) {
+                       // if there is an input with a name or id of 'submit' then we won't be
+                       // able to invoke the submit fn on the form (at least not x-browser)
+                       alert('Error: Form elements must not have name or id of "submit".');
+                       return;
+               }
+               
+               var s = $.extend(true, {}, $.ajaxSettings, options);
+               s.context = s.context || s;
+               var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
+               var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ s.iframeSrc +'" />');
+               var io = $io[0];
+
+               $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+
+               var xhr = { // mock object
+                       aborted: 0,
+                       responseText: null,
+                       responseXML: null,
+                       status: 0,
+                       statusText: 'n/a',
+                       getAllResponseHeaders: function() {},
+                       getResponseHeader: function() {},
+                       setRequestHeader: function() {},
+                       abort: function(status) {
+                               var e = (status === 'timeout' ? 'timeout' : 'aborted');
+                               log('aborting upload... ' + e);
+                               this.aborted = 1;
+                               $io.attr('src', s.iframeSrc); // abort op in progress
+                               xhr.error = e;
+                               s.error && s.error.call(s.context, xhr, e, e);
+                               g && $.event.trigger("ajaxError", [xhr, s, e]);
+                               s.complete && s.complete.call(s.context, xhr, e);
+                       }
+               };
+
+               var g = s.global;
+               // trigger ajax global events so that activity/block indicators work like normal
+               if (g && ! $.active++) {
+                       $.event.trigger("ajaxStart");
+               }
+               if (g) {
+                       $.event.trigger("ajaxSend", [xhr, s]);
+               }
+
+               if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
+                       if (s.global) { 
+                               $.active--;
+                       }
+                       return;
+               }
+               if (xhr.aborted) {
+                       return;
+               }
+
+               var timedOut = 0, timeoutHandle;
+
+               // add submitting element to data if we know it
+               var sub = form.clk;
+               if (sub) {
+                       var n = sub.name;
+                       if (n && !sub.disabled) {
+                               s.extraData = s.extraData || {};
+                               s.extraData[n] = sub.value;
+                               if (sub.type == "image") {
+                                       s.extraData[n+'.x'] = form.clk_x;
+                                       s.extraData[n+'.y'] = form.clk_y;
+                               }
+                       }
+               }
+
+               // take a breath so that pending repaints get some cpu time before the upload starts
+               function doSubmit() {
+                       // make sure form attrs are set
+                       var t = $form.attr('target'), a = $form.attr('action');
+
+                       // update form attrs in IE friendly way
+                       form.setAttribute('target',id);
+                       if (form.getAttribute('method') != 'POST') {
+                               form.setAttribute('method', 'POST');
+                       }
+                       if (form.getAttribute('action') != s.url) {
+                               form.setAttribute('action', s.url);
+                       }
+
+                       // ie borks in some cases when setting encoding
+                       if (! s.skipEncodingOverride) {
+                               $form.attr({
+                                       encoding: 'multipart/form-data',
+                                       enctype:  'multipart/form-data'
+                               });
+                       }
+
+                       // support timout
+                       if (s.timeout) {
+                               timeoutHandle = setTimeout(function() { timedOut = true; cb(true); }, s.timeout);
+                       }
+
+                       // add "extra" data to form if provided in options
+                       var extraInputs = [];
+                       try {
+                               if (s.extraData) {
+                                       for (var n in s.extraData) {
+                                               extraInputs.push(
+                                                       $('<input type="hidden" name="'+n+'" value="'+s.extraData[n]+'" />')
+                                                               .appendTo(form)[0]);
+                                       }
+                               }
+
+                               // add iframe to doc and submit the form
+                               $io.appendTo('body');
+                io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
+                               form.submit();
+                       }
+                       finally {
+                               // reset attrs and remove "extra" input elements
+                               form.setAttribute('action',a);
+                               if(t) {
+                                       form.setAttribute('target', t);
+                               } else {
+                                       $form.removeAttr('target');
+                               }
+                               $(extraInputs).remove();
+                       }
+               }
+
+               if (s.forceSync) {
+                       doSubmit();
+               }
+               else {
+                       setTimeout(doSubmit, 10); // this lets dom updates render
+               }
+       
+               var data, doc, domCheckCount = 50, callbackProcessed;
+
+               function cb(e) {
+                       if (xhr.aborted || callbackProcessed) {
+                               return;
+                       }
+                       if (e === true && xhr) {
+                               xhr.abort('timeout');
+                               return;
+                       }
+                       
+                       var doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
+                       if (!doc || doc.location.href == s.iframeSrc) {
+                               // response not received yet
+                               if (!timedOut)
+                                       return;
+                       }
+            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
+
+                       var ok = true;
+                       try {
+                               if (timedOut) {
+                                       throw 'timeout';
+                               }
+
+                               var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
+                               log('isXml='+isXml);
+                               if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
+                                       if (--domCheckCount) {
+                                               // in some browsers (Opera) the iframe DOM is not always traversable when
+                                               // the onload callback fires, so we loop a bit to accommodate
+                                               log('requeing onLoad callback, DOM not available');
+                                               setTimeout(cb, 250);
+                                               return;
+                                       }
+                                       // let this fall through because server response could be an empty document
+                                       //log('Could not access iframe DOM after mutiple tries.');
+                                       //throw 'DOMException: not available';
+                               }
+
+                               //log('response detected');
+                               xhr.responseText = doc.body ? doc.body.innerHTML : doc.documentElement ? doc.documentElement.innerHTML : null; 
+                               xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
+                               if (isXml)
+                                       s.dataType = 'xml';
+                               xhr.getResponseHeader = function(header){
+                                       var headers = {'content-type': s.dataType};
+                                       return headers[header];
+                               };
+
+                               var scr = /(json|script|text)/.test(s.dataType);
+                               if (scr || s.textarea) {
+                                       // see if user embedded response in textarea
+                                       var ta = doc.getElementsByTagName('textarea')[0];
+                                       if (ta) {
+                                               xhr.responseText = ta.value;
+                                       }
+                                       else if (scr) {
+                                               // account for browsers injecting pre around json response
+                                               var pre = doc.getElementsByTagName('pre')[0];
+                                               var b = doc.getElementsByTagName('body')[0];
+                                               if (pre) {
+                                                       xhr.responseText = pre.textContent;
+                                               }
+                                               else if (b) {
+                                                       xhr.responseText = b.innerHTML;
+                                               }
+                                       }                         
+                               }
+                               else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
+                                       xhr.responseXML = toXml(xhr.responseText);
+                               }
+                               
+                               data = httpData(xhr, s.dataType, s);
+                       }
+                       catch(e){
+                               log('error caught:',e);
+                               ok = false;
+                               xhr.error = e;
+                               s.error && s.error.call(s.context, xhr, 'error', e);
+                               g && $.event.trigger("ajaxError", [xhr, s, e]);
+                       }
+                       
+                       if (xhr.aborted) {
+                               log('upload aborted');
+                               ok = false;
+                       }
+
+                       // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
+                       if (ok) {
+                               s.success && s.success.call(s.context, data, 'success', xhr);
+                               g && $.event.trigger("ajaxSuccess", [xhr, s]);
+                       }
+                       
+                       g && $.event.trigger("ajaxComplete", [xhr, s]);
+
+                       if (g && ! --$.active) {
+                               $.event.trigger("ajaxStop");
+                       }
+                       
+                       s.complete && s.complete.call(s.context, xhr, ok ? 'success' : 'error');
+
+                       callbackProcessed = true;
+                       if (s.timeout)
+                               clearTimeout(timeoutHandle);
+
+                       // clean up
+                       setTimeout(function() {
+                               $io.removeData('form-plugin-onload');
+                               $io.remove();
+                               xhr.responseXML = null;
+                       }, 100);
+               }
+
+               var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
+                       if (window.ActiveXObject) {
+                               doc = new ActiveXObject('Microsoft.XMLDOM');
+                               doc.async = 'false';
+                               doc.loadXML(s);
+                       }
+                       else {
+                               doc = (new DOMParser()).parseFromString(s, 'text/xml');
+                       }
+                       return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
+               };
+               var parseJSON = $.parseJSON || function(s) {
+                       return window['eval']('(' + s + ')');
+               };
+               
+               var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
+                       var ct = xhr.getResponseHeader('content-type') || '',
+                               xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
+                               data = xml ? xhr.responseXML : xhr.responseText;
+
+                       if (xml && data.documentElement.nodeName === 'parsererror') {
+                               $.error && $.error('parsererror');
+                       }
+                       if (s && s.dataFilter) {
+                               data = s.dataFilter(data, type);
+                       }
+                       if (typeof data === 'string') {
+                               if (type === 'json' || !type && ct.indexOf('json') >= 0) {
+                                       data = parseJSON(data);
+                               } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
+                                       $.globalEval(data);
+                               }
+                       }
+                       return data;
+               };
+       }
+};
+
+/**
+ * ajaxForm() provides a mechanism for fully automating form submission.
+ *
+ * The advantages of using this method instead of ajaxSubmit() are:
+ *
+ * 1: This method will include coordinates for <input type="image" /> elements (if the element
+ *     is used to submit the form).
+ * 2. This method will include the submit element's name/value data (for the element that was
+ *     used to submit the form).
+ * 3. This method binds the submit() method to the form for you.
+ *
+ * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
+ * passes the options argument along after properly binding events for submit elements and
+ * the form itself.
+ */
+$.fn.ajaxForm = function(options) {
+       // in jQuery 1.3+ we can fix mistakes with the ready state
+       if (this.length === 0) {
+               var o = { s: this.selector, c: this.context };
+               if (!$.isReady && o.s) {
+                       log('DOM not ready, queuing ajaxForm');
+                       $(function() {
+                               $(o.s,o.c).ajaxForm(options);
+                       });
+                       return this;
+               }
+               // is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
+               log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
+               return this;
+       }
+       
+       return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
+               if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
+                       e.preventDefault();
+                       $(this).ajaxSubmit(options);
+               }
+       }).bind('click.form-plugin', function(e) {
+               var target = e.target;
+               var $el = $(target);
+               if (!($el.is(":submit,input:image"))) {
+                       // is this a child element of the submit el?  (ex: a span within a button)
+                       var t = $el.closest(':submit');
+                       if (t.length == 0) {
+                               return;
+                       }
+                       target = t[0];
+               }
+               var form = this;
+               form.clk = target;
+               if (target.type == 'image') {
+                       if (e.offsetX != undefined) {
+                               form.clk_x = e.offsetX;
+                               form.clk_y = e.offsetY;
+                       } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
+                               var offset = $el.offset();
+                               form.clk_x = e.pageX - offset.left;
+                               form.clk_y = e.pageY - offset.top;
+                       } else {
+                               form.clk_x = e.pageX - target.offsetLeft;
+                               form.clk_y = e.pageY - target.offsetTop;
+                       }
+               }
+               // clear form vars
+               setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
+       });
+};
+
+// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
+$.fn.ajaxFormUnbind = function() {
+       return this.unbind('submit.form-plugin click.form-plugin');
+};
+
+/**
+ * formToArray() gathers form element data into an array of objects that can
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
+ * Each object in the array has both a 'name' and 'value' property.  An example of
+ * an array for a simple login form might be:
+ *
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
+ *
+ * It is this array that is passed to pre-submit callback functions provided to the
+ * ajaxSubmit() and ajaxForm() methods.
+ */
+$.fn.formToArray = function(semantic) {
+       var a = [];
+       if (this.length === 0) {
+               return a;
+       }
+
+       var form = this[0];
+       var els = semantic ? form.getElementsByTagName('*') : form.elements;
+       if (!els) {
+               return a;
+       }
+       
+       var i,j,n,v,el,max,jmax;
+       for(i=0, max=els.length; i < max; i++) {
+               el = els[i];
+               n = el.name;
+               if (!n) {
+                       continue;
+               }
+
+               if (semantic && form.clk && el.type == "image") {
+                       // handle image inputs on the fly when semantic == true
+                       if(!el.disabled && form.clk == el) {
+                               a.push({name: n, value: $(el).val()});
+                               a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+                       }
+                       continue;
+               }
+
+               v = $.fieldValue(el, true);
+               if (v && v.constructor == Array) {
+                       for(j=0, jmax=v.length; j < jmax; j++) {
+                               a.push({name: n, value: v[j]});
+                       }
+               }
+               else if (v !== null && typeof v != 'undefined') {
+                       a.push({name: n, value: v});
+               }
+       }
+
+       if (!semantic && form.clk) {
+               // input type=='image' are not found in elements array! handle it here
+               var $input = $(form.clk), input = $input[0];
+               n = input.name;
+               if (n && !input.disabled && input.type == 'image') {
+                       a.push({name: n, value: $input.val()});
+                       a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+               }
+       }
+       return a;
+};
+
+/**
+ * Serializes form data into a 'submittable' string. This method will return a string
+ * in the format: name1=value1&amp;name2=value2
+ */
+$.fn.formSerialize = function(semantic) {
+       //hand off to jQuery.param for proper encoding
+       return $.param(this.formToArray(semantic));
+};
+
+/**
+ * Serializes all field elements in the jQuery object into a query string.
+ * This method will return a string in the format: name1=value1&amp;name2=value2
+ */
+$.fn.fieldSerialize = function(successful) {
+       var a = [];
+       this.each(function() {
+               var n = this.name;
+               if (!n) {
+                       return;
+               }
+               var v = $.fieldValue(this, successful);
+               if (v && v.constructor == Array) {
+                       for (var i=0,max=v.length; i < max; i++) {
+                               a.push({name: n, value: v[i]});
+                       }
+               }
+               else if (v !== null && typeof v != 'undefined') {
+                       a.push({name: this.name, value: v});
+               }
+       });
+       //hand off to jQuery.param for proper encoding
+       return $.param(a);
+};
+
+/**
+ * Returns the value(s) of the element in the matched set.  For example, consider the following form:
+ *
+ *  <form><fieldset>
+ *       <input name="A" type="text" />
+ *       <input name="A" type="text" />
+ *       <input name="B" type="checkbox" value="B1" />
+ *       <input name="B" type="checkbox" value="B2"/>
+ *       <input name="C" type="radio" value="C1" />
+ *       <input name="C" type="radio" value="C2" />
+ *  </fieldset></form>
+ *
+ *  var v = $(':text').fieldValue();
+ *  // if no values are entered into the text inputs
+ *  v == ['','']
+ *  // if values entered into the text inputs are 'foo' and 'bar'
+ *  v == ['foo','bar']
+ *
+ *  var v = $(':checkbox').fieldValue();
+ *  // if neither checkbox is checked
+ *  v === undefined
+ *  // if both checkboxes are checked
+ *  v == ['B1', 'B2']
+ *
+ *  var v = $(':radio').fieldValue();
+ *  // if neither radio is checked
+ *  v === undefined
+ *  // if first radio is checked
+ *  v == ['C1']
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.  If this value is false the value(s)
+ * for each element is returned.
+ *
+ * Note: This method *always* returns an array.  If no valid value can be determined the
+ *        array will be empty, otherwise it will contain one or more values.
+ */
+$.fn.fieldValue = function(successful) {
+       for (var val=[], i=0, max=this.length; i < max; i++) {
+               var el = this[i];
+               var v = $.fieldValue(el, successful);
+               if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
+                       continue;
+               }
+               v.constructor == Array ? $.merge(val, v) : val.push(v);
+       }
+       return val;
+};
+
+/**
+ * Returns the value of the field element.
+ */
+$.fieldValue = function(el, successful) {
+       var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
+       if (successful === undefined) {
+               successful = true;
+       }
+
+       if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
+               (t == 'checkbox' || t == 'radio') && !el.checked ||
+               (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
+               tag == 'select' && el.selectedIndex == -1)) {
+                       return null;
+       }
+
+       if (tag == 'select') {
+               var index = el.selectedIndex;
+               if (index < 0) {
+                       return null;
+               }
+               var a = [], ops = el.options;
+               var one = (t == 'select-one');
+               var max = (one ? index+1 : ops.length);
+               for(var i=(one ? index : 0); i < max; i++) {
+                       var op = ops[i];
+                       if (op.selected) {
+                               var v = op.value;
+                               if (!v) { // extra pain for IE...
+                                       v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
+                               }
+                               if (one) {
+                                       return v;
+                               }
+                               a.push(v);
+                       }
+               }
+               return a;
+       }
+       return $(el).val();
+};
+
+/**
+ * Clears the form data.  Takes the following actions on the form's input fields:
+ *  - input text fields will have their 'value' property set to the empty string
+ *  - select elements will have their 'selectedIndex' property set to -1
+ *  - checkbox and radio inputs will have their 'checked' property set to false
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
+ *  - button elements will *not* be effected
+ */
+$.fn.clearForm = function() {
+       return this.each(function() {
+               $('input,select,textarea', this).clearFields();
+       });
+};
+
+/**
+ * Clears the selected form elements.
+ */
+$.fn.clearFields = $.fn.clearInputs = function() {
+       return this.each(function() {
+               var t = this.type, tag = this.tagName.toLowerCase();
+               if (t == 'text' || t == 'password' || tag == 'textarea') {
+                       this.value = '';
+               }
+               else if (t == 'checkbox' || t == 'radio') {
+                       this.checked = false;
+               }
+               else if (tag == 'select') {
+                       this.selectedIndex = -1;
+               }
+       });
+};
+
+/**
+ * Resets the form data.  Causes all form elements to be reset to their original value.
+ */
+$.fn.resetForm = function() {
+       return this.each(function() {
+               // guard against an input with the name of 'reset'
+               // note that IE reports the reset function as an 'object'
+               if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
+                       this.reset();
+               }
+       });
+};
+
+/**
+ * Enables or disables any matching elements.
+ */
+$.fn.enable = function(b) {
+       if (b === undefined) {
+               b = true;
+       }
+       return this.each(function() {
+               this.disabled = !b;
+       });
+};
+
+/**
+ * Checks/unchecks any matching checkboxes or radio buttons and
+ * selects/deselects and matching option elements.
+ */
+$.fn.selected = function(select) {
+       if (select === undefined) {
+               select = true;
+       }
+       return this.each(function() {
+               var t = this.type;
+               if (t == 'checkbox' || t == 'radio') {
+                       this.checked = select;
+               }
+               else if (this.tagName.toLowerCase() == 'option') {
+                       var $sel = $(this).parent('select');
+                       if (select && $sel[0] && $sel[0].type == 'select-one') {
+                               // deselect all other options
+                               $sel.find('option').selected(false);
+                       }
+                       this.selected = select;
+               }
+       });
+};
+
+// helper fn for console logging
+// set $.fn.ajaxSubmit.debug to true to enable debug logging
+function log() {
+       if ($.fn.ajaxSubmit.debug) {
+               var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
+               if (window.console && window.console.log) {
+                       window.console.log(msg);
+               }
+               else if (window.opera && window.opera.postError) {
+                       window.opera.postError(msg);
+               }
+       }
+};
+
+})(jQuery);
diff --git a/www/plugins/crayons/js/jquery.html5uploader.min.js b/www/plugins/crayons/js/jquery.html5uploader.min.js
new file mode 100644 (file)
index 0000000..3e18698
--- /dev/null
@@ -0,0 +1,17 @@
+/*!
+* jQuery HTML5 Uploader 1.0b
+*
+* http://www.igloolab.com/jquery-html5-uploader
+*/
+(function($){$.fn.html5Uploader=function(options){var crlf='\r\n';var boundary="iloveigloo";var dashes="--";var settings={"name":"uploadedFile","postUrl":"Upload.aspx","onClientAbort":null,"onClientError":null,"onClientLoad":null,"onClientLoadEnd":null,"onClientLoadStart":null,"onClientProgress":null,"onServerAbort":null,"onServerError":null,"onServerLoad":null,"onServerLoadStart":null,"onServerProgress":null,"onServerReadyStateChange":null};if(options){$.extend(settings,options);}
+return this.each(function(options){var $this=$(this);if($this.is("[type='file']")){$this
+.bind("change",function(){var files=this.files;for(var i=0;i<files.length;i++){fileHandler(files[i]);}});}else{$this
+.bind("dragenter dragover",function(){return false;})
+.bind("drop",function(e){var files=e.originalEvent.dataTransfer.files;for(var i=0;i<files.length;i++){fileHandler(files[i]);}
+return false;});}});function fileHandler(file){var fileReader=new FileReader();fileReader.onabort=function(e){if(settings.onClientAbort){settings.onClientAbort(e,file);}};fileReader.onerror=function(e){if(settings.onClientError){settings.onClientError(e,file);}};fileReader.onload=function(e){if(settings.onClientLoad){settings.onClientLoad(e,file);}};fileReader.onloadend=function(e){if(settings.onClientLoadEnd){settings.onClientLoadEnd(e,file);}};fileReader.onloadstart=function(e){if(settings.onClientLoadStart){settings.onClientLoadStart(e,file);}};fileReader.onprogress=function(e){if(settings.onClientProgress){settings.onClientProgress(e,file);}};fileReader.readAsDataURL(file);var xmlHttpRequest=new XMLHttpRequest();xmlHttpRequest.upload.onabort=function(e){if(settings.onServerAbort){settings.onServerAbort(e,file);}};xmlHttpRequest.upload.onerror=function(e){if(settings.onServerError){settings.onServerError(e,file);}};xmlHttpRequest.upload.onload=function(e){if(settings.onServerLoad){settings.onServerLoad(e,file);}};xmlHttpRequest.upload.onloadstart=function(e){if(settings.onServerLoadStart){settings.onServerLoadStart(e,file);}};xmlHttpRequest.upload.onprogress=function(e){if(settings.onServerProgress){settings.onServerProgress(e,file);}};xmlHttpRequest.onreadystatechange=function(e){if(settings.onServerReadyStateChange){settings.onServerReadyStateChange(e,file);}};xmlHttpRequest.open("POST",settings.postUrl,true);if(file.getAsBinary){var data=dashes+boundary+crlf+
+"Content-Disposition: form-data;"+
+"name=\""+settings.name+"\";"+
+"filename=\""+unescape(encodeURIComponent(file.name))+"\""+crlf+
+"Content-Type: application/octet-stream"+crlf+crlf+
+file.getAsBinary()+crlf+
+dashes+boundary+dashes;xmlHttpRequest.setRequestHeader("Content-Type","multipart/form-data;boundary="+boundary);xmlHttpRequest.sendAsBinary(data);}else if(window.FormData){var formData=new FormData();formData.append(settings.name,file);xmlHttpRequest.send(formData);}}};})(jQuery);
diff --git a/www/plugins/crayons/js/jquery.js b/www/plugins/crayons/js/jquery.js
new file mode 100644 (file)
index 0000000..9a13ab9
--- /dev/null
@@ -0,0 +1,8865 @@
+/*!
+ * jQuery JavaScript Library v1.6
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon May 2 13:50:00 2011 -0400
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+       navigator = window.navigator,
+       location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+               // The jQuery object is actually just the init constructor 'enhanced'
+               return new jQuery.fn.init( selector, context, rootjQuery );
+       },
+
+       // Map over jQuery in case of overwrite
+       _jQuery = window.jQuery,
+
+       // Map over the $ in case of overwrite
+       _$ = window.$,
+
+       // A central reference to the root jQuery(document)
+       rootjQuery,
+
+       // A simple way to check for HTML strings or ID strings
+       // (both of which we optimize for)
+       quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+       // Check if a string has a non-whitespace character in it
+       rnotwhite = /\S/,
+
+       // Used for trimming whitespace
+       trimLeft = /^\s+/,
+       trimRight = /\s+$/,
+
+       // Check for digits
+       rdigit = /\d/,
+
+       // Match a standalone tag
+       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+       // JSON RegExp
+       rvalidchars = /^[\],:{}\s]*$/,
+       rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+       rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+       rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+       // Useragent RegExp
+       rwebkit = /(webkit)[ \/]([\w.]+)/,
+       ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+       rmsie = /(msie) ([\w.]+)/,
+       rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+       // Keep a UserAgent string for use with jQuery.browser
+       userAgent = navigator.userAgent,
+
+       // For matching the engine and version of the browser
+       browserMatch,
+
+       // The deferred used on DOM ready
+       readyList,
+
+       // The ready event handler
+       DOMContentLoaded,
+
+       // Save a reference to some core methods
+       toString = Object.prototype.toString,
+       hasOwn = Object.prototype.hasOwnProperty,
+       push = Array.prototype.push,
+       slice = Array.prototype.slice,
+       trim = String.prototype.trim,
+       indexOf = Array.prototype.indexOf,
+
+       // [[Class]] -> type pairs
+       class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+       constructor: jQuery,
+       init: function( selector, context, rootjQuery ) {
+               var match, elem, ret, doc;
+
+               // Handle $(""), $(null), or $(undefined)
+               if ( !selector ) {
+                       return this;
+               }
+
+               // Handle $(DOMElement)
+               if ( selector.nodeType ) {
+                       this.context = this[0] = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // The body element only exists once, optimize finding it
+               if ( selector === "body" && !context && document.body ) {
+                       this.context = document;
+                       this[0] = document.body;
+                       this.selector = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // Handle HTML strings
+               if ( typeof selector === "string" ) {
+                       // Are we dealing with HTML string or an ID?
+                       if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+                               // Assume that strings that start and end with <> are HTML and skip the regex check
+                               match = [ null, selector, null ];
+
+                       } else {
+                               match = quickExpr.exec( selector );
+                       }
+
+                       // Verify a match, and that no context was specified for #id
+                       if ( match && (match[1] || !context) ) {
+
+                               // HANDLE: $(html) -> $(array)
+                               if ( match[1] ) {
+                                       context = context instanceof jQuery ? context[0] : context;
+                                       doc = (context ? context.ownerDocument || context : document);
+
+                                       // If a single string is passed in and it's a single tag
+                                       // just do a createElement and skip the rest
+                                       ret = rsingleTag.exec( selector );
+
+                                       if ( ret ) {
+                                               if ( jQuery.isPlainObject( context ) ) {
+                                                       selector = [ document.createElement( ret[1] ) ];
+                                                       jQuery.fn.attr.call( selector, context, true );
+
+                                               } else {
+                                                       selector = [ doc.createElement( ret[1] ) ];
+                                               }
+
+                                       } else {
+                                               ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+                                               selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
+                                       }
+
+                                       return jQuery.merge( this, selector );
+
+                               // HANDLE: $("#id")
+                               } else {
+                                       elem = document.getElementById( match[2] );
+
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
+                                               // Handle the case where IE and Opera return items
+                                               // by name instead of ID
+                                               if ( elem.id !== match[2] ) {
+                                                       return rootjQuery.find( selector );
+                                               }
+
+                                               // Otherwise, we inject the element directly into the jQuery object
+                                               this.length = 1;
+                                               this[0] = elem;
+                                       }
+
+                                       this.context = document;
+                                       this.selector = selector;
+                                       return this;
+                               }
+
+                       // HANDLE: $(expr, $(...))
+                       } else if ( !context || context.jquery ) {
+                               return (context || rootjQuery).find( selector );
+
+                       // HANDLE: $(expr, context)
+                       // (which is just equivalent to: $(context).find(expr)
+                       } else {
+                               return this.constructor( context ).find( selector );
+                       }
+
+               // HANDLE: $(function)
+               // Shortcut for document ready
+               } else if ( jQuery.isFunction( selector ) ) {
+                       return rootjQuery.ready( selector );
+               }
+
+               if (selector.selector !== undefined) {
+                       this.selector = selector.selector;
+                       this.context = selector.context;
+               }
+
+               return jQuery.makeArray( selector, this );
+       },
+
+       // Start with an empty selector
+       selector: "",
+
+       // The current version of jQuery being used
+       jquery: "1.6",
+
+       // The default length of a jQuery object is 0
+       length: 0,
+
+       // The number of elements contained in the matched element set
+       size: function() {
+               return this.length;
+       },
+
+       toArray: function() {
+               return slice.call( this, 0 );
+       },
+
+       // Get the Nth element in the matched element set OR
+       // Get the whole matched element set as a clean array
+       get: function( num ) {
+               return num == null ?
+
+                       // Return a 'clean' array
+                       this.toArray() :
+
+                       // Return just the object
+                       ( num < 0 ? this[ this.length + num ] : this[ num ] );
+       },
+
+       // Take an array of elements and push it onto the stack
+       // (returning the new matched element set)
+       pushStack: function( elems, name, selector ) {
+               // Build a new jQuery matched element set
+               var ret = this.constructor();
+
+               if ( jQuery.isArray( elems ) ) {
+                       push.apply( ret, elems );
+
+               } else {
+                       jQuery.merge( ret, elems );
+               }
+
+               // Add the old object onto the stack (as a reference)
+               ret.prevObject = this;
+
+               ret.context = this.context;
+
+               if ( name === "find" ) {
+                       ret.selector = this.selector + (this.selector ? " " : "") + selector;
+               } else if ( name ) {
+                       ret.selector = this.selector + "." + name + "(" + selector + ")";
+               }
+
+               // Return the newly-formed element set
+               return ret;
+       },
+
+       // Execute a callback for every element in the matched set.
+       // (You can seed the arguments with an array of args, but this is
+       // only used internally.)
+       each: function( callback, args ) {
+               return jQuery.each( this, callback, args );
+       },
+
+       ready: function( fn ) {
+               // Attach the listeners
+               jQuery.bindReady();
+
+               // Add the callback
+               readyList.done( fn );
+
+               return this;
+       },
+
+       eq: function( i ) {
+               return i === -1 ?
+                       this.slice( i ) :
+                       this.slice( i, +i + 1 );
+       },
+
+       first: function() {
+               return this.eq( 0 );
+       },
+
+       last: function() {
+               return this.eq( -1 );
+       },
+
+       slice: function() {
+               return this.pushStack( slice.apply( this, arguments ),
+                       "slice", slice.call(arguments).join(",") );
+       },
+
+       map: function( callback ) {
+               return this.pushStack( jQuery.map(this, function( elem, i ) {
+                       return callback.call( elem, i, elem );
+               }));
+       },
+
+       end: function() {
+               return this.prevObject || this.constructor(null);
+       },
+
+       // For internal use only.
+       // Behaves like an Array's method, not like a jQuery method.
+       push: push,
+       sort: [].sort,
+       splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[0] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+               target = arguments[1] || {};
+               // skip the boolean and the target
+               i = 2;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+               target = {};
+       }
+
+       // extend jQuery itself if only one argument is passed
+       if ( length === i ) {
+               target = this;
+               --i;
+       }
+
+       for ( ; i < length; i++ ) {
+               // Only deal with non-null/undefined values
+               if ( (options = arguments[ i ]) != null ) {
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && jQuery.isArray(src) ? src : [];
+
+                                       } else {
+                                               clone = src && jQuery.isPlainObject(src) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = jQuery.extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+jQuery.extend({
+       noConflict: function( deep ) {
+               if ( window.$ === jQuery ) {
+                       window.$ = _$;
+               }
+
+               if ( deep && window.jQuery === jQuery ) {
+                       window.jQuery = _jQuery;
+               }
+
+               return jQuery;
+       },
+
+       // Is the DOM ready to be used? Set to true once it occurs.
+       isReady: false,
+
+       // A counter to track how many items to wait for before
+       // the ready event fires. See #6781
+       readyWait: 1,
+
+       // Hold (or release) the ready event
+       holdReady: function( hold ) {
+               if ( hold ) {
+                       jQuery.readyWait++;
+               } else {
+                       jQuery.ready( true );
+               }
+       },
+
+       // Handle when the DOM is ready
+       ready: function( wait ) {
+               // Either a released hold or an DOMready/load event and not yet ready
+               if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+                       // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+                       if ( !document.body ) {
+                               return setTimeout( jQuery.ready, 1 );
+                       }
+
+                       // Remember that the DOM is ready
+                       jQuery.isReady = true;
+
+                       // If a normal DOM Ready event fired, decrement, and wait if need be
+                       if ( wait !== true && --jQuery.readyWait > 0 ) {
+                               return;
+                       }
+
+                       // If there are functions bound, to execute
+                       readyList.resolveWith( document, [ jQuery ] );
+
+                       // Trigger any bound ready events
+                       if ( jQuery.fn.trigger ) {
+                               jQuery( document ).trigger( "ready" ).unbind( "ready" );
+                       }
+               }
+       },
+
+       bindReady: function() {
+               if ( readyList ) {
+                       return;
+               }
+
+               readyList = jQuery._Deferred();
+
+               // Catch cases where $(document).ready() is called after the
+               // browser event has already occurred.
+               if ( document.readyState === "complete" ) {
+                       // Handle it asynchronously to allow scripts the opportunity to delay ready
+                       return setTimeout( jQuery.ready, 1 );
+               }
+
+               // Mozilla, Opera and webkit nightlies currently support this event
+               if ( document.addEventListener ) {
+                       // Use the handy event callback
+                       document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+                       // A fallback to window.onload, that will always work
+                       window.addEventListener( "load", jQuery.ready, false );
+
+               // If IE event model is used
+               } else if ( document.attachEvent ) {
+                       // ensure firing before onload,
+                       // maybe late but safe also for iframes
+                       document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+                       // A fallback to window.onload, that will always work
+                       window.attachEvent( "onload", jQuery.ready );
+
+                       // If IE and not a frame
+                       // continually check to see if the document is ready
+                       var toplevel = false;
+
+                       try {
+                               toplevel = window.frameElement == null;
+                       } catch(e) {}
+
+                       if ( document.documentElement.doScroll && toplevel ) {
+                               doScrollCheck();
+                       }
+               }
+       },
+
+       // See test/unit/core.js for details concerning isFunction.
+       // Since version 1.3, DOM methods and functions like alert
+       // aren't supported. They return false on IE (#2968).
+       isFunction: function( obj ) {
+               return jQuery.type(obj) === "function";
+       },
+
+       isArray: Array.isArray || function( obj ) {
+               return jQuery.type(obj) === "array";
+       },
+
+       // A crude way of determining if an object is a window
+       isWindow: function( obj ) {
+               return obj && typeof obj === "object" && "setInterval" in obj;
+       },
+
+       isNaN: function( obj ) {
+               return obj == null || !rdigit.test( obj ) || isNaN( obj );
+       },
+
+       type: function( obj ) {
+               return obj == null ?
+                       String( obj ) :
+                       class2type[ toString.call(obj) ] || "object";
+       },
+
+       isPlainObject: function( obj ) {
+               // Must be an Object.
+               // Because of IE, we also have to check the presence of the constructor property.
+               // Make sure that DOM nodes and window objects don't pass through, as well
+               if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+                       return false;
+               }
+
+               // Not own constructor property must be Object
+               if ( obj.constructor &&
+                       !hasOwn.call(obj, "constructor") &&
+                       !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+                       return false;
+               }
+
+               // Own properties are enumerated firstly, so to speed up,
+               // if last one is own, then all properties are own.
+
+               var key;
+               for ( key in obj ) {}
+
+               return key === undefined || hasOwn.call( obj, key );
+       },
+
+       isEmptyObject: function( obj ) {
+               for ( var name in obj ) {
+                       return false;
+               }
+               return true;
+       },
+
+       error: function( msg ) {
+               throw msg;
+       },
+
+       parseJSON: function( data ) {
+               if ( typeof data !== "string" || !data ) {
+                       return null;
+               }
+
+               // Make sure leading/trailing whitespace is removed (IE can't handle it)
+               data = jQuery.trim( data );
+
+               // Attempt to parse using the native JSON parser first
+               if ( window.JSON && window.JSON.parse ) {
+                       return window.JSON.parse( data );
+               }
+
+               // Make sure the incoming data is actual JSON
+               // Logic borrowed from http://json.org/json2.js
+               if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+                       .replace( rvalidtokens, "]" )
+                       .replace( rvalidbraces, "")) ) {
+
+                       return (new Function( "return " + data ))();
+
+               }
+               jQuery.error( "Invalid JSON: " + data );
+       },
+
+       // Cross-browser xml parsing
+       // (xml & tmp used internally)
+       parseXML: function( data , xml , tmp ) {
+
+               if ( window.DOMParser ) { // Standard
+                       tmp = new DOMParser();
+                       xml = tmp.parseFromString( data , "text/xml" );
+               } else { // IE
+                       xml = new ActiveXObject( "Microsoft.XMLDOM" );
+                       xml.async = "false";
+                       xml.loadXML( data );
+               }
+
+               tmp = xml.documentElement;
+
+               if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
+                       jQuery.error( "Invalid XML: " + data );
+               }
+
+               return xml;
+       },
+
+       noop: function() {},
+
+       // Evaluates a script in a global context
+       // Workarounds based on findings by Jim Driscoll
+       // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+       globalEval: function( data ) {
+               if ( data && rnotwhite.test( data ) ) {
+                       // We use execScript on Internet Explorer
+                       // We use an anonymous function so that context is window
+                       // rather than jQuery in Firefox
+                       ( window.execScript || function( data ) {
+                               window[ "eval" ].call( window, data );
+                       } )( data );
+               }
+       },
+
+       nodeName: function( elem, name ) {
+               return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+       },
+
+       // args is for internal usage only
+       each: function( object, callback, args ) {
+               var name, i = 0,
+                       length = object.length,
+                       isObj = length === undefined || jQuery.isFunction( object );
+
+               if ( args ) {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.apply( object[ name ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.apply( object[ i++ ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+
+               // A special, fast, case for the most common use of each
+               } else {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               return object;
+       },
+
+       // Use native String.trim function wherever possible
+       trim: trim ?
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               trim.call( text );
+               } :
+
+               // Otherwise use our own trimming functionality
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+               },
+
+       // results is for internal usage only
+       makeArray: function( array, results ) {
+               var ret = results || [];
+
+               if ( array != null ) {
+                       // The window, strings (and functions) also have 'length'
+                       // The extra typeof function check is to prevent crashes
+                       // in Safari 2 (See: #3039)
+                       // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                       var type = jQuery.type( array );
+
+                       if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+                               push.call( ret, array );
+                       } else {
+                               jQuery.merge( ret, array );
+                       }
+               }
+
+               return ret;
+       },
+
+       inArray: function( elem, array ) {
+
+               if ( indexOf ) {
+                       return indexOf.call( array, elem );
+               }
+
+               for ( var i = 0, length = array.length; i < length; i++ ) {
+                       if ( array[ i ] === elem ) {
+                               return i;
+                       }
+               }
+
+               return -1;
+       },
+
+       merge: function( first, second ) {
+               var i = first.length,
+                       j = 0;
+
+               if ( typeof second.length === "number" ) {
+                       for ( var l = second.length; j < l; j++ ) {
+                               first[ i++ ] = second[ j ];
+                       }
+
+               } else {
+                       while ( second[j] !== undefined ) {
+                               first[ i++ ] = second[ j++ ];
+                       }
+               }
+
+               first.length = i;
+
+               return first;
+       },
+
+       grep: function( elems, callback, inv ) {
+               var ret = [], retVal;
+               inv = !!inv;
+
+               // Go through the array, only saving the items
+               // that pass the validator function
+               for ( var i = 0, length = elems.length; i < length; i++ ) {
+                       retVal = !!callback( elems[ i ], i );
+                       if ( inv !== retVal ) {
+                               ret.push( elems[ i ] );
+                       }
+               }
+
+               return ret;
+       },
+
+       // arg is for internal usage only
+       map: function( elems, callback, arg ) {
+               var value, key, ret = [],
+                       i = 0,
+                       length = elems.length,
+                       // jquery objects are treated as arrays
+                       isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+               // Go through the array, translating each of the items to their
+               if ( isArray ) {
+                       for ( ; i < length; i++ ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+
+               // Go through every key on the object,
+               } else {
+                       for ( key in elems ) {
+                               value = callback( elems[ key ], key, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+               }
+
+               // Flatten any nested arrays
+               return ret.concat.apply( [], ret );
+       },
+
+       // A global GUID counter for objects
+       guid: 1,
+
+       // Bind a function to a context, optionally partially applying any
+       // arguments.
+       proxy: function( fn, context ) {
+               if ( typeof context === "string" ) {
+                       var tmp = fn[ context ];
+                       context = fn;
+                       fn = tmp;
+               }
+
+               // Quick check to determine if target is callable, in the spec
+               // this throws a TypeError, but we will just return undefined.
+               if ( !jQuery.isFunction( fn ) ) {
+                       return undefined;
+               }
+
+               // Simulated bind
+               var args = slice.call( arguments, 2 ),
+                       proxy = function() {
+                               return fn.apply( context, args.concat( slice.call( arguments ) ) );
+                       };
+
+               // Set the guid of unique handler to the same of original handler, so it can be removed
+               proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+               return proxy;
+       },
+
+       // Mutifunctional method to get and set values to a collection
+       // The value/s can be optionally by executed if its a function
+       access: function( elems, key, value, exec, fn, pass ) {
+               var length = elems.length;
+
+               // Setting many attributes
+               if ( typeof key === "object" ) {
+                       for ( var k in key ) {
+                               jQuery.access( elems, k, key[k], exec, fn, value );
+                       }
+                       return elems;
+               }
+
+               // Setting one attribute
+               if ( value !== undefined ) {
+                       // Optionally, function values get executed if exec is true
+                       exec = !pass && exec && jQuery.isFunction(value);
+
+                       for ( var i = 0; i < length; i++ ) {
+                               fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+                       }
+
+                       return elems;
+               }
+
+               // Getting an attribute
+               return length ? fn( elems[0], key ) : undefined;
+       },
+
+       now: function() {
+               return (new Date()).getTime();
+       },
+
+       // Use of jQuery.browser is frowned upon.
+       // More details: http://docs.jquery.com/Utilities/jQuery.browser
+       uaMatch: function( ua ) {
+               ua = ua.toLowerCase();
+
+               var match = rwebkit.exec( ua ) ||
+                       ropera.exec( ua ) ||
+                       rmsie.exec( ua ) ||
+                       ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+                       [];
+
+               return { browser: match[1] || "", version: match[2] || "0" };
+       },
+
+       sub: function() {
+               function jQuerySub( selector, context ) {
+                       return new jQuerySub.fn.init( selector, context );
+               }
+               jQuery.extend( true, jQuerySub, this );
+               jQuerySub.superclass = this;
+               jQuerySub.fn = jQuerySub.prototype = this();
+               jQuerySub.fn.constructor = jQuerySub;
+               jQuerySub.sub = this.sub;
+               jQuerySub.fn.init = function init( selector, context ) {
+                       if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+                               context = jQuerySub( context );
+                       }
+
+                       return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+               };
+               jQuerySub.fn.init.prototype = jQuerySub.fn;
+               var rootjQuerySub = jQuerySub(document);
+               return jQuerySub;
+       },
+
+       browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+       class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+       jQuery.browser[ browserMatch.browser ] = true;
+       jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+       jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+       trimLeft = /^[\s\xA0]+/;
+       trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+       DOMContentLoaded = function() {
+               document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+               jQuery.ready();
+       };
+
+} else if ( document.attachEvent ) {
+       DOMContentLoaded = function() {
+               // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+               if ( document.readyState === "complete" ) {
+                       document.detachEvent( "onreadystatechange", DOMContentLoaded );
+                       jQuery.ready();
+               }
+       };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+       if ( jQuery.isReady ) {
+               return;
+       }
+
+       try {
+               // If IE is used, use the trick by Diego Perini
+               // http://javascript.nwbox.com/IEContentLoaded/
+               document.documentElement.doScroll("left");
+       } catch(e) {
+               setTimeout( doScrollCheck, 1 );
+               return;
+       }
+
+       // and execute any waiting functions
+       jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return jQuery;
+
+})();
+
+
+var // Promise methods
+       promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
+       // Static reference to slice
+       sliceDeferred = [].slice;
+
+jQuery.extend({
+       // Create a simple deferred (one callbacks list)
+       _Deferred: function() {
+               var // callbacks list
+                       callbacks = [],
+                       // stored [ context , args ]
+                       fired,
+                       // to avoid firing when already doing so
+                       firing,
+                       // flag to know if the deferred has been cancelled
+                       cancelled,
+                       // the deferred itself
+                       deferred  = {
+
+                               // done( f1, f2, ...)
+                               done: function() {
+                                       if ( !cancelled ) {
+                                               var args = arguments,
+                                                       i,
+                                                       length,
+                                                       elem,
+                                                       type,
+                                                       _fired;
+                                               if ( fired ) {
+                                                       _fired = fired;
+                                                       fired = 0;
+                                               }
+                                               for ( i = 0, length = args.length; i < length; i++ ) {
+                                                       elem = args[ i ];
+                                                       type = jQuery.type( elem );
+                                                       if ( type === "array" ) {
+                                                               deferred.done.apply( deferred, elem );
+                                                       } else if ( type === "function" ) {
+                                                               callbacks.push( elem );
+                                                       }
+                                               }
+                                               if ( _fired ) {
+                                                       deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
+                                               }
+                                       }
+                                       return this;
+                               },
+
+                               // resolve with given context and args
+                               resolveWith: function( context, args ) {
+                                       if ( !cancelled && !fired && !firing ) {
+                                               // make sure args are available (#8421)
+                                               args = args || [];
+                                               firing = 1;
+                                               try {
+                                                       while( callbacks[ 0 ] ) {
+                                                               callbacks.shift().apply( context, args );
+                                                       }
+                                               }
+                                               finally {
+                                                       fired = [ context, args ];
+                                                       firing = 0;
+                                               }
+                                       }
+                                       return this;
+                               },
+
+                               // resolve with this as context and given arguments
+                               resolve: function() {
+                                       deferred.resolveWith( this, arguments );
+                                       return this;
+                               },
+
+                               // Has this deferred been resolved?
+                               isResolved: function() {
+                                       return !!( firing || fired );
+                               },
+
+                               // Cancel
+                               cancel: function() {
+                                       cancelled = 1;
+                                       callbacks = [];
+                                       return this;
+                               }
+                       };
+
+               return deferred;
+       },
+
+       // Full fledged deferred (two callbacks list)
+       Deferred: function( func ) {
+               var deferred = jQuery._Deferred(),
+                       failDeferred = jQuery._Deferred(),
+                       promise;
+               // Add errorDeferred methods, then and promise
+               jQuery.extend( deferred, {
+                       then: function( doneCallbacks, failCallbacks ) {
+                               deferred.done( doneCallbacks ).fail( failCallbacks );
+                               return this;
+                       },
+                       always: function() {
+                               return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
+                       },
+                       fail: failDeferred.done,
+                       rejectWith: failDeferred.resolveWith,
+                       reject: failDeferred.resolve,
+                       isRejected: failDeferred.isResolved,
+                       pipe: function( fnDone, fnFail ) {
+                               return jQuery.Deferred(function( newDefer ) {
+                                       jQuery.each( {
+                                               done: [ fnDone, "resolve" ],
+                                               fail: [ fnFail, "reject" ]
+                                       }, function( handler, data ) {
+                                               var fn = data[ 0 ],
+                                                       action = data[ 1 ],
+                                                       returned;
+                                               if ( jQuery.isFunction( fn ) ) {
+                                                       deferred[ handler ](function() {
+                                                               returned = fn.apply( this, arguments );
+                                                               if ( jQuery.isFunction( returned.promise ) ) {
+                                                                       returned.promise().then( newDefer.resolve, newDefer.reject );
+                                                               } else {
+                                                                       newDefer[ action ]( returned );
+                                                               }
+                                                       });
+                                               } else {
+                                                       deferred[ handler ]( newDefer[ action ] );
+                                               }
+                                       });
+                               }).promise();
+                       },
+                       // Get a promise for this deferred
+                       // If obj is provided, the promise aspect is added to the object
+                       promise: function( obj ) {
+                               if ( obj == null ) {
+                                       if ( promise ) {
+                                               return promise;
+                                       }
+                                       promise = obj = {};
+                               }
+                               var i = promiseMethods.length;
+                               while( i-- ) {
+                                       obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
+                               }
+                               return obj;
+                       }
+               });
+               // Make sure only one callback list will be used
+               deferred.done( failDeferred.cancel ).fail( deferred.cancel );
+               // Unexpose cancel
+               delete deferred.cancel;
+               // Call given func if any
+               if ( func ) {
+                       func.call( deferred, deferred );
+               }
+               return deferred;
+       },
+
+       // Deferred helper
+       when: function( firstParam ) {
+               var args = arguments,
+                       i = 0,
+                       length = args.length,
+                       count = length,
+                       deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+                               firstParam :
+                               jQuery.Deferred();
+               function resolveFunc( i ) {
+                       return function( value ) {
+                               args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+                               if ( !( --count ) ) {
+                                       // Strange bug in FF4:
+                                       // Values changed onto the arguments object sometimes end up as undefined values
+                                       // outside the $.when method. Cloning the object into a fresh array solves the issue
+                                       deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
+                               }
+                       };
+               }
+               if ( length > 1 ) {
+                       for( ; i < length; i++ ) {
+                               if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
+                                       args[ i ].promise().then( resolveFunc(i), deferred.reject );
+                               } else {
+                                       --count;
+                               }
+                       }
+                       if ( !count ) {
+                               deferred.resolveWith( deferred, args );
+                       }
+               } else if ( deferred !== firstParam ) {
+                       deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+               }
+               return deferred.promise();
+       }
+});
+
+
+
+jQuery.support = (function() {
+
+       var div = document.createElement( "div" ),
+               all,
+               a,
+               select,
+               opt,
+               input,
+               marginDiv,
+               support,
+               fragment,
+               body,
+               bodyStyle,
+               tds,
+               events,
+               eventName,
+               i,
+               isSupported;
+
+       // Preliminary tests
+       div.setAttribute("className", "t");
+       div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+       all = div.getElementsByTagName( "*" );
+       a = div.getElementsByTagName( "a" )[ 0 ];
+
+       // Can't get basic test support
+       if ( !all || !all.length || !a ) {
+               return {};
+       }
+
+       // First batch of supports tests
+       select = document.createElement( "select" );
+       opt = select.appendChild( document.createElement("option") );
+       input = div.getElementsByTagName( "input" )[ 0 ];
+
+       support = {
+               // IE strips leading whitespace when .innerHTML is used
+               leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+               // Make sure that tbody elements aren't automatically inserted
+               // IE will insert them into empty tables
+               tbody: !div.getElementsByTagName( "tbody" ).length,
+
+               // Make sure that link elements get serialized correctly by innerHTML
+               // This requires a wrapper element in IE
+               htmlSerialize: !!div.getElementsByTagName( "link" ).length,
+
+               // Get the style information from getAttribute
+               // (IE uses .cssText instead)
+               style: /top/.test( a.getAttribute("style") ),
+
+               // Make sure that URLs aren't manipulated
+               // (IE normalizes it by default)
+               hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
+
+               // Make sure that element opacity exists
+               // (IE uses filter instead)
+               // Use a regex to work around a WebKit issue. See #5145
+               opacity: /^0.55$/.test( a.style.opacity ),
+
+               // Verify style float existence
+               // (IE uses styleFloat instead of cssFloat)
+               cssFloat: !!a.style.cssFloat,
+
+               // Make sure that if no value is specified for a checkbox
+               // that it defaults to "on".
+               // (WebKit defaults to "" instead)
+               checkOn: ( input.value === "on" ),
+
+               // Make sure that a selected-by-default option has a working selected property.
+               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+               optSelected: opt.selected,
+
+               // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+               getSetAttribute: div.className !== "t",
+
+               // Will be defined later
+               submitBubbles: true,
+               changeBubbles: true,
+               focusinBubbles: false,
+               deleteExpando: true,
+               noCloneEvent: true,
+               inlineBlockNeedsLayout: false,
+               shrinkWrapBlocks: false,
+               reliableMarginRight: true
+       };
+
+       // Make sure checked status is properly cloned
+       input.checked = true;
+       support.noCloneChecked = input.cloneNode( true ).checked;
+
+       // Make sure that the options inside disabled selects aren't marked as disabled
+       // (WebKit marks them as disabled)
+       select.disabled = true;
+       support.optDisabled = !opt.disabled;
+
+       // Test to see if it's possible to delete an expando from an element
+       // Fails in Internet Explorer
+       try {
+               delete div.test;
+       } catch( e ) {
+               support.deleteExpando = false;
+       }
+
+       if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+               div.attachEvent( "onclick", function click() {
+                       // Cloning a node shouldn't copy over any
+                       // bound event handlers (IE does this)
+                       support.noCloneEvent = false;
+                       div.detachEvent( "onclick", click );
+               });
+               div.cloneNode( true ).fireEvent( "onclick" );
+       }
+
+       // Check if a radio maintains it's value
+       // after being appended to the DOM
+       input = document.createElement("input");
+       input.value = "t";
+       input.setAttribute("type", "radio");
+       support.radioValue = input.value === "t";
+
+       input.setAttribute("checked", "checked");
+       div.appendChild( input );
+       fragment = document.createDocumentFragment();
+       fragment.appendChild( div.firstChild );
+
+       // WebKit doesn't clone checked state correctly in fragments
+       support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+       div.innerHTML = "";
+
+       // Figure out if the W3C box model works as expected
+       div.style.width = div.style.paddingLeft = "1px";
+
+       // We use our own, invisible, body
+       body = document.createElement( "body" );
+       bodyStyle = {
+               visibility: "hidden",
+               width: 0,
+               height: 0,
+               border: 0,
+               margin: 0,
+               // Set background to avoid IE crashes when removing (#9028)
+               background: "none"
+       };
+       for ( i in bodyStyle ) {
+               body.style[ i ] = bodyStyle[ i ];
+       }
+       body.appendChild( div );
+       document.documentElement.appendChild( body );
+
+       // Check if a disconnected checkbox will retain its checked
+       // value of true after appended to the DOM (IE6/7)
+       support.appendChecked = input.checked;
+
+       support.boxModel = div.offsetWidth === 2;
+
+       if ( "zoom" in div.style ) {
+               // Check if natively block-level elements act like inline-block
+               // elements when setting their display to 'inline' and giving
+               // them layout
+               // (IE < 8 does this)
+               div.style.display = "inline";
+               div.style.zoom = 1;
+               support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
+
+               // Check if elements with layout shrink-wrap their children
+               // (IE 6 does this)
+               div.style.display = "";
+               div.innerHTML = "<div style='width:4px;'></div>";
+               support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+       }
+
+       div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+       tds = div.getElementsByTagName( "td" );
+
+       // Check if table cells still have offsetWidth/Height when they are set
+       // to display:none and there are still other visible table cells in a
+       // table row; if so, offsetWidth/Height are not reliable for use when
+       // determining if an element has been hidden directly using
+       // display:none (it is still safe to use offsets if a parent element is
+       // hidden; don safety goggles and see bug #4512 for more information).
+       // (only IE 8 fails this test)
+       isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+       tds[ 0 ].style.display = "";
+       tds[ 1 ].style.display = "none";
+
+       // Check if empty table cells still have offsetWidth/Height
+       // (IE < 8 fail this test)
+       support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+       div.innerHTML = "";
+
+       // Check if div with explicit width and no margin-right incorrectly
+       // gets computed margin-right based on width of container. For more
+       // info see bug #3333
+       // Fails in WebKit before Feb 2011 nightlies
+       // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+       if ( document.defaultView && document.defaultView.getComputedStyle ) {
+               marginDiv = document.createElement( "div" );
+               marginDiv.style.width = "0";
+               marginDiv.style.marginRight = "0";
+               div.appendChild( marginDiv );
+               support.reliableMarginRight =
+                       ( parseInt( document.defaultView.getComputedStyle( marginDiv, null ).marginRight, 10 ) || 0 ) === 0;
+       }
+
+       // Remove the body element we added
+       body.innerHTML = "";
+       document.documentElement.removeChild( body );
+
+       // Technique from Juriy Zaytsev
+       // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+       // We only care about the case where non-standard event systems
+       // are used, namely in IE. Short-circuiting here helps us to
+       // avoid an eval call (in setAttribute) which can cause CSP
+       // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+       if ( div.attachEvent ) {
+               for( i in {
+                       submit: 1,
+                       change: 1,
+                       focusin: 1
+               } ) {
+                       eventName = "on" + i;
+                       isSupported = ( eventName in div );
+                       if ( !isSupported ) {
+                               div.setAttribute( eventName, "return;" );
+                               isSupported = ( typeof div[ eventName ] === "function" );
+                       }
+                       support[ i + "Bubbles" ] = isSupported;
+               }
+       }
+
+       return support;
+})();
+
+// Keep track of boxModel
+jQuery.boxModel = jQuery.support.boxModel;
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+       rmultiDash = /([a-z])([A-Z])/g;
+
+jQuery.extend({
+       cache: {},
+
+       // Please use with caution
+       uuid: 0,
+
+       // Unique for each copy of jQuery on the page
+       // Non-digits removed to match rinlinejQuery
+       expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+       // The following elements throw uncatchable exceptions if you
+       // attempt to add expando properties to them.
+       noData: {
+               "embed": true,
+               // Ban all objects except for Flash (which handle expandos)
+               "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+               "applet": true
+       },
+
+       hasData: function( elem ) {
+               elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+
+               return !!elem && !isEmptyDataObject( elem );
+       },
+
+       data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
+
+                       // We have to handle DOM nodes and JS objects differently because IE6-7
+                       // can't GC object references properly across the DOM-JS boundary
+                       isNode = elem.nodeType,
+
+                       // Only DOM nodes need the global jQuery cache; JS object data is
+                       // attached directly to the object so GC can occur automatically
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // Only defining an ID for JS objects if its cache already exists allows
+                       // the code to shortcut on the same path as a DOM node with no cache
+                       id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
+
+               // Avoid doing any more work than we need to when trying to get data on an
+               // object that has no data at all
+               if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
+                       return;
+               }
+
+               if ( !id ) {
+                       // Only DOM nodes need a new unique ID for each element since their data
+                       // ends up in the global cache
+                       if ( isNode ) {
+                               elem[ jQuery.expando ] = id = ++jQuery.uuid;
+                       } else {
+                               id = jQuery.expando;
+                       }
+               }
+
+               if ( !cache[ id ] ) {
+                       cache[ id ] = {};
+
+                       // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+                       // metadata on plain JS objects when the object is serialized using
+                       // JSON.stringify
+                       if ( !isNode ) {
+                               cache[ id ].toJSON = jQuery.noop;
+                       }
+               }
+
+               // An object can be passed to jQuery.data instead of a key/value pair; this gets
+               // shallow copied over onto the existing cache
+               if ( typeof name === "object" || typeof name === "function" ) {
+                       if ( pvt ) {
+                               cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
+                       } else {
+                               cache[ id ] = jQuery.extend(cache[ id ], name);
+                       }
+               }
+
+               thisCache = cache[ id ];
+
+               // Internal jQuery data is stored in a separate object inside the object's data
+               // cache in order to avoid key collisions between internal data and user-defined
+               // data
+               if ( pvt ) {
+                       if ( !thisCache[ internalKey ] ) {
+                               thisCache[ internalKey ] = {};
+                       }
+
+                       thisCache = thisCache[ internalKey ];
+               }
+
+               if ( data !== undefined ) {
+                       thisCache[ name ] = data;
+               }
+
+               // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
+               // not attempt to inspect the internal events object using jQuery.data, as this
+               // internal data object is undocumented and subject to change.
+               if ( name === "events" && !thisCache[name] ) {
+                       return thisCache[ internalKey ] && thisCache[ internalKey ].events;
+               }
+
+               return getByName ? thisCache[ name ] : thisCache;
+       },
+
+       removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var internalKey = jQuery.expando, isNode = elem.nodeType,
+
+                       // See jQuery.data for more information
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // See jQuery.data for more information
+                       id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+               // If there is already no cache entry for this object, there is no
+               // purpose in continuing
+               if ( !cache[ id ] ) {
+                       return;
+               }
+
+               if ( name ) {
+                       var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
+
+                       if ( thisCache ) {
+                               delete thisCache[ name ];
+
+                               // If there is no data left in the cache, we want to continue
+                               // and let the cache object itself get destroyed
+                               if ( !isEmptyDataObject(thisCache) ) {
+                                       return;
+                               }
+                       }
+               }
+
+               // See jQuery.data for more information
+               if ( pvt ) {
+                       delete cache[ id ][ internalKey ];
+
+                       // Don't destroy the parent cache unless the internal data object
+                       // had been the only thing left in it
+                       if ( !isEmptyDataObject(cache[ id ]) ) {
+                               return;
+                       }
+               }
+
+               var internalCache = cache[ id ][ internalKey ];
+
+               // Browsers that fail expando deletion also refuse to delete expandos on
+               // the window, but it will allow it on all other JS objects; other browsers
+               // don't care
+               if ( jQuery.support.deleteExpando || cache != window ) {
+                       delete cache[ id ];
+               } else {
+                       cache[ id ] = null;
+               }
+
+               // We destroyed the entire user cache at once because it's faster than
+               // iterating through each key, but we need to continue to persist internal
+               // data if it existed
+               if ( internalCache ) {
+                       cache[ id ] = {};
+                       // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+                       // metadata on plain JS objects when the object is serialized using
+                       // JSON.stringify
+                       if ( !isNode ) {
+                               cache[ id ].toJSON = jQuery.noop;
+                       }
+
+                       cache[ id ][ internalKey ] = internalCache;
+
+               // Otherwise, we need to eliminate the expando on the node to avoid
+               // false lookups in the cache for entries that no longer exist
+               } else if ( isNode ) {
+                       // IE does not allow us to delete expando properties from nodes,
+                       // nor does it have a removeAttribute function on Document nodes;
+                       // we must handle all of these cases
+                       if ( jQuery.support.deleteExpando ) {
+                               delete elem[ jQuery.expando ];
+                       } else if ( elem.removeAttribute ) {
+                               elem.removeAttribute( jQuery.expando );
+                       } else {
+                               elem[ jQuery.expando ] = null;
+                       }
+               }
+       },
+
+       // For internal use only.
+       _data: function( elem, name, data ) {
+               return jQuery.data( elem, name, data, true );
+       },
+
+       // A method for determining if a DOM node can handle the data expando
+       acceptData: function( elem ) {
+               if ( elem.nodeName ) {
+                       var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+                       if ( match ) {
+                               return !(match === true || elem.getAttribute("classid") !== match);
+                       }
+               }
+
+               return true;
+       }
+});
+
+jQuery.fn.extend({
+       data: function( key, value ) {
+               var data = null;
+
+               if ( typeof key === "undefined" ) {
+                       if ( this.length ) {
+                               data = jQuery.data( this[0] );
+
+                               if ( this[0].nodeType === 1 ) {
+                           var attr = this[0].attributes, name;
+                                       for ( var i = 0, l = attr.length; i < l; i++ ) {
+                                               name = attr[i].name;
+
+                                               if ( name.indexOf( "data-" ) === 0 ) {
+                                                       name = jQuery.camelCase( name.substring(5) );
+
+                                                       dataAttr( this[0], name, data[ name ] );
+                                               }
+                                       }
+                               }
+                       }
+
+                       return data;
+
+               } else if ( typeof key === "object" ) {
+                       return this.each(function() {
+                               jQuery.data( this, key );
+                       });
+               }
+
+               var parts = key.split(".");
+               parts[1] = parts[1] ? "." + parts[1] : "";
+
+               if ( value === undefined ) {
+                       data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+                       // Try to fetch any internally stored data first
+                       if ( data === undefined && this.length ) {
+                               data = jQuery.data( this[0], key );
+                               data = dataAttr( this[0], key, data );
+                       }
+
+                       return data === undefined && parts[1] ?
+                               this.data( parts[0] ) :
+                               data;
+
+               } else {
+                       return this.each(function() {
+                               var $this = jQuery( this ),
+                                       args = [ parts[0], value ];
+
+                               $this.triggerHandler( "setData" + parts[1] + "!", args );
+                               jQuery.data( this, key, value );
+                               $this.triggerHandler( "changeData" + parts[1] + "!", args );
+                       });
+               }
+       },
+
+       removeData: function( key ) {
+               return this.each(function() {
+                       jQuery.removeData( this, key );
+               });
+       }
+});
+
+function dataAttr( elem, key, data ) {
+       // If nothing was found internally, try to fetch any
+       // data from the HTML5 data-* attribute
+       if ( data === undefined && elem.nodeType === 1 ) {
+               name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
+
+               data = elem.getAttribute( name );
+
+               if ( typeof data === "string" ) {
+                       try {
+                               data = data === "true" ? true :
+                               data === "false" ? false :
+                               data === "null" ? null :
+                               !jQuery.isNaN( data ) ? parseFloat( data ) :
+                                       rbrace.test( data ) ? jQuery.parseJSON( data ) :
+                                       data;
+                       } catch( e ) {}
+
+                       // Make sure we set the data so it isn't changed later
+                       jQuery.data( elem, key, data );
+
+               } else {
+                       data = undefined;
+               }
+       }
+
+       return data;
+}
+
+// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
+// property to be considered empty objects; this property always exists in
+// order to make sure JSON.stringify does not expose internal metadata
+function isEmptyDataObject( obj ) {
+       for ( var name in obj ) {
+               if ( name !== "toJSON" ) {
+                       return false;
+               }
+       }
+
+       return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+       var deferDataKey = type + "defer",
+               queueDataKey = type + "queue",
+               markDataKey = type + "mark",
+               defer = jQuery.data( elem, deferDataKey, undefined, true );
+       if ( defer &&
+               ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
+               ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
+               // Give room for hard-coded callbacks to fire first
+               // and eventually mark/queue something else on the element
+               setTimeout( function() {
+                       if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
+                               !jQuery.data( elem, markDataKey, undefined, true ) ) {
+                               jQuery.removeData( elem, deferDataKey, true );
+                               defer.resolve();
+                       }
+               }, 0 );
+       }
+}
+
+jQuery.extend({
+
+       _mark: function( elem, type ) {
+               if ( elem ) {
+                       type = (type || "fx") + "mark";
+                       jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
+               }
+       },
+
+       _unmark: function( force, elem, type ) {
+               if ( force !== true ) {
+                       type = elem;
+                       elem = force;
+                       force = false;
+               }
+               if ( elem ) {
+                       type = type || "fx";
+                       var key = type + "mark",
+                               count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
+                       if ( count ) {
+                               jQuery.data( elem, key, count, true );
+                       } else {
+                               jQuery.removeData( elem, key, true );
+                               handleQueueMarkDefer( elem, type, "mark" );
+                       }
+               }
+       },
+
+       queue: function( elem, type, data ) {
+               if ( elem ) {
+                       type = (type || "fx") + "queue";
+                       var q = jQuery.data( elem, type, undefined, true );
+                       // Speed up dequeue by getting out quickly if this is just a lookup
+                       if ( data ) {
+                               if ( !q || jQuery.isArray(data) ) {
+                                       q = jQuery.data( elem, type, jQuery.makeArray(data), true );
+                               } else {
+                                       q.push( data );
+                               }
+                       }
+                       return q || [];
+               }
+       },
+
+       dequeue: function( elem, type ) {
+               type = type || "fx";
+
+               var queue = jQuery.queue( elem, type ),
+                       fn = queue.shift(),
+                       defer;
+
+               // If the fx queue is dequeued, always remove the progress sentinel
+               if ( fn === "inprogress" ) {
+                       fn = queue.shift();
+               }
+
+               if ( fn ) {
+                       // Add a progress sentinel to prevent the fx queue from being
+                       // automatically dequeued
+                       if ( type === "fx" ) {
+                               queue.unshift("inprogress");
+                       }
+
+                       fn.call(elem, function() {
+                               jQuery.dequeue(elem, type);
+                       });
+               }
+
+               if ( !queue.length ) {
+                       jQuery.removeData( elem, type + "queue", true );
+                       handleQueueMarkDefer( elem, type, "queue" );
+               }
+       }
+});
+
+jQuery.fn.extend({
+       queue: function( type, data ) {
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+               }
+
+               if ( data === undefined ) {
+                       return jQuery.queue( this[0], type );
+               }
+               return this.each(function() {
+                       var queue = jQuery.queue( this, type, data );
+
+                       if ( type === "fx" && queue[0] !== "inprogress" ) {
+                               jQuery.dequeue( this, type );
+                       }
+               });
+       },
+       dequeue: function( type ) {
+               return this.each(function() {
+                       jQuery.dequeue( this, type );
+               });
+       },
+       // Based off of the plugin by Clint Helfers, with permission.
+       // http://blindsignals.com/index.php/2009/07/jquery-delay/
+       delay: function( time, type ) {
+               time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+               type = type || "fx";
+
+               return this.queue( type, function() {
+                       var elem = this;
+                       setTimeout(function() {
+                               jQuery.dequeue( elem, type );
+                       }, time );
+               });
+       },
+       clearQueue: function( type ) {
+               return this.queue( type || "fx", [] );
+       },
+       // Get a promise resolved when queues of a certain type
+       // are emptied (fx is the type by default)
+       promise: function( type, object ) {
+               if ( typeof type !== "string" ) {
+                       object = type;
+                       type = undefined;
+               }
+               type = type || "fx";
+               var defer = jQuery.Deferred(),
+                       elements = this,
+                       i = elements.length,
+                       count = 1,
+                       deferDataKey = type + "defer",
+                       queueDataKey = type + "queue",
+                       markDataKey = type + "mark";
+               function resolve() {
+                       if ( !( --count ) ) {
+                               defer.resolveWith( elements, [ elements ] );
+                       }
+               }
+               while( i-- ) {
+                       if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+                                       ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+                                               jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+                                       jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
+                               count++;
+                               tmp.done( resolve );
+                       }
+               }
+               resolve();
+               return defer.promise();
+       }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+       rspace = /\s+/,
+       rreturn = /\r/g,
+       rtype = /^(?:button|input)$/i,
+       rfocusable = /^(?:button|input|object|select|textarea)$/i,
+       rclickable = /^a(?:rea)?$/i,
+       rspecial = /^(?:data-|aria-)/,
+       rinvalidChar = /\:/,
+       formHook;
+
+jQuery.fn.extend({
+       attr: function( name, value ) {
+               return jQuery.access( this, name, value, true, jQuery.attr );
+       },
+
+       removeAttr: function( name ) {
+               return this.each(function() {
+                       jQuery.removeAttr( this, name );
+               });
+       },
+       
+       prop: function( name, value ) {
+               return jQuery.access( this, name, value, true, jQuery.prop );
+       },
+       
+       removeProp: function( name ) {
+               return this.each(function() {
+                       // try/catch handles cases where IE balks (such as removing a property on window)
+                       try {
+                               this[ name ] = undefined;
+                               delete this[ name ];
+                       } catch( e ) {}
+               });
+       },
+
+       addClass: function( value ) {
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               self.addClass( value.call(this, i, self.attr("class") || "") );
+                       });
+               }
+
+               if ( value && typeof value === "string" ) {
+                       var classNames = (value || "").split( rspace );
+
+                       for ( var i = 0, l = this.length; i < l; i++ ) {
+                               var elem = this[i];
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !elem.className ) {
+                                               elem.className = value;
+
+                                       } else {
+                                               var className = " " + elem.className + " ",
+                                                       setClass = elem.className;
+
+                                               for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+                                                               setClass += " " + classNames[c];
+                                                       }
+                                               }
+                                               elem.className = jQuery.trim( setClass );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       removeClass: function( value ) {
+               if ( jQuery.isFunction(value) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               self.removeClass( value.call(this, i, self.attr("class")) );
+                       });
+               }
+
+               if ( (value && typeof value === "string") || value === undefined ) {
+                       var classNames = (value || "").split( rspace );
+
+                       for ( var i = 0, l = this.length; i < l; i++ ) {
+                               var elem = this[i];
+
+                               if ( elem.nodeType === 1 && elem.className ) {
+                                       if ( value ) {
+                                               var className = (" " + elem.className + " ").replace(rclass, " ");
+                                               for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       className = className.replace(" " + classNames[c] + " ", " ");
+                                               }
+                                               elem.className = jQuery.trim( className );
+
+                                       } else {
+                                               elem.className = "";
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       toggleClass: function( value, stateVal ) {
+               var type = typeof value,
+                       isBool = typeof stateVal === "boolean";
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+                       });
+               }
+
+               return this.each(function() {
+                       if ( type === "string" ) {
+                               // toggle individual class names
+                               var className,
+                                       i = 0,
+                                       self = jQuery( this ),
+                                       state = stateVal,
+                                       classNames = value.split( rspace );
+
+                               while ( (className = classNames[ i++ ]) ) {
+                                       // check each className given, space seperated list
+                                       state = isBool ? state : !self.hasClass( className );
+                                       self[ state ? "addClass" : "removeClass" ]( className );
+                               }
+
+                       } else if ( type === "undefined" || type === "boolean" ) {
+                               if ( this.className ) {
+                                       // store className if set
+                                       jQuery._data( this, "__className__", this.className );
+                               }
+
+                               // toggle whole className
+                               this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+                       }
+               });
+       },
+
+       hasClass: function( selector ) {
+               var className = " " + selector + " ";
+               for ( var i = 0, l = this.length; i < l; i++ ) {
+                       if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       },
+
+       val: function( value ) {
+               var hooks, ret,
+                       elem = this[0];
+               
+               if ( !arguments.length ) {
+                       if ( elem ) {
+                               hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
+
+                               if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+                                       return ret;
+                               }
+
+                               return (elem.value || "").replace(rreturn, "");
+                       }
+
+                       return undefined;
+               }
+
+               var isFunction = jQuery.isFunction( value );
+
+               return this.each(function( i ) {
+                       var self = jQuery(this), val;
+
+                       if ( this.nodeType !== 1 ) {
+                               return;
+                       }
+
+                       if ( isFunction ) {
+                               val = value.call( this, i, self.val() );
+                       } else {
+                               val = value;
+                       }
+
+                       // Treat null/undefined as ""; convert numbers to string
+                       if ( val == null ) {
+                               val = "";
+                       } else if ( typeof val === "number" ) {
+                               val += "";
+                       } else if ( jQuery.isArray( val ) ) {
+                               val = jQuery.map(val, function ( value ) {
+                                       return value == null ? "" : value + "";
+                               });
+                       }
+
+                       hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
+
+                       // If set returns undefined, fall back to normal setting
+                       if ( !hooks || ("set" in hooks && hooks.set( this, val, "value" ) === undefined) ) {
+                               this.value = val;
+                       }
+               });
+       }
+});
+
+jQuery.extend({
+       valHooks: {
+               option: {
+                       get: function( elem ) {
+                               // attributes.value is undefined in Blackberry 4.7 but
+                               // uses .value. See #6932
+                               var val = elem.attributes.value;
+                               return !val || val.specified ? elem.value : elem.text;
+                       }
+               },
+               select: {
+                       get: function( elem ) {
+                               var index = elem.selectedIndex,
+                                       values = [],
+                                       options = elem.options,
+                                       one = elem.type === "select-one";
+
+                               // Nothing was selected
+                               if ( index < 0 ) {
+                                       return null;
+                               }
+
+                               // Loop through all the selected options
+                               for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+                                       var option = options[ i ];
+
+                                       // Don't return options that are disabled or in a disabled optgroup
+                                       if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+                                                       (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+                                               // Get the specific value for the option
+                                               value = jQuery( option ).val();
+
+                                               // We don't need an array for one selects
+                                               if ( one ) {
+                                                       return value;
+                                               }
+
+                                               // Multi-Selects return an array
+                                               values.push( value );
+                                       }
+                               }
+
+                               // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+                               if ( one && !values.length && options.length ) {
+                                       return jQuery( options[ index ] ).val();
+                               }
+
+                               return values;
+                       },
+
+                       set: function( elem, value ) {
+                               var values = jQuery.makeArray( value );
+
+                               jQuery(elem).find("option").each(function() {
+                                       this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+                               });
+
+                               if ( !values.length ) {
+                                       elem.selectedIndex = -1;
+                               }
+                               return values;
+                       }
+               }
+       },
+
+       attrFn: {
+               val: true,
+               css: true,
+               html: true,
+               text: true,
+               data: true,
+               width: true,
+               height: true,
+               offset: true
+       },
+       
+       attrFix: {
+               // Always normalize to ensure hook usage
+               tabindex: "tabIndex",
+               readonly: "readOnly"
+       },
+       
+       attr: function( elem, name, value, pass ) {
+               var nType = elem.nodeType;
+               
+               // don't get/set attributes on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return undefined;
+               }
+
+               if ( pass && name in jQuery.attrFn ) {
+                       return jQuery( elem )[ name ]( value );
+               }
+               
+               var ret, hooks,
+                       notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+               
+               // Normalize the name if needed
+               name = notxml && jQuery.attrFix[ name ] || name;
+
+               // Get the appropriate hook, or the formHook
+               // if getSetAttribute is not supported and we have form objects in IE6/7
+               hooks = jQuery.attrHooks[ name ] ||
+                       ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ?
+                               formHook :
+                               undefined );
+
+               if ( value !== undefined ) {
+
+                       if ( value === null || (value === false && !rspecial.test( name )) ) {
+                               jQuery.removeAttr( elem, name );
+                               return undefined;
+
+                       } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+
+                               // Set boolean attributes to the same name
+                               if ( value === true && !rspecial.test( name ) ) {
+                                       value = name;
+                               }
+
+                               elem.setAttribute( name, "" + value );
+                               return value;
+                       }
+
+               } else {
+
+                       if ( hooks && "get" in hooks && notxml ) {
+                               return hooks.get( elem, name );
+
+                       } else {
+
+                               ret = elem.getAttribute( name );
+
+                               // Non-existent attributes return null, we normalize to undefined
+                               return ret === null ?
+                                       undefined :
+                                       ret;
+                       }
+               }
+       },
+       
+       removeAttr: function( elem, name ) {
+               if ( elem.nodeType === 1 ) {
+                       name = jQuery.attrFix[ name ] || name;
+               
+                       if ( jQuery.support.getSetAttribute ) {
+                               // Use removeAttribute in browsers that support it
+                               elem.removeAttribute( name );
+                       } else {
+                               jQuery.attr( elem, name, "" );
+                               elem.removeAttributeNode( elem.getAttributeNode( name ) );
+                       }
+               }
+       },
+
+       attrHooks: {
+               type: {
+                       set: function( elem, value ) {
+                               // We can't allow the type property to be changed (since it causes problems in IE)
+                               if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+                                       jQuery.error( "type property can't be changed" );
+                               } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+                                       // Setting the type on a radio button after the value resets the value in IE6-9
+                                       // Reset value to it's default in case type is set after value
+                                       // This is for element creation
+                                       var val = elem.getAttribute("value");
+                                       elem.setAttribute( "type", value );
+                                       if ( val ) {
+                                               elem.value = val;
+                                       }
+                                       return value;
+                               }
+                       }
+               },
+               tabIndex: {
+                       get: function( elem ) {
+                               // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+                               // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                               var attributeNode = elem.getAttributeNode("tabIndex");
+
+                               return attributeNode && attributeNode.specified ?
+                                       parseInt( attributeNode.value, 10 ) :
+                                       rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+                                               0 :
+                                               undefined;
+                       }
+               }
+       },
+       
+       propFix: {},
+       
+       prop: function( elem, name, value ) {
+               var nType = elem.nodeType;
+               
+               // don't get/set properties on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return undefined;
+               }
+               
+               var ret, hooks,
+                       notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+               
+               // Try to normalize/fix the name
+               name = notxml && jQuery.propFix[ name ] || name;
+               
+               hooks = jQuery.propHooks[ name ];
+               
+               if ( value !== undefined ) {
+                       if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+                       
+                       } else {
+                               return (elem[ name ] = value);
+                       }
+               
+               } else {
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
+                               return ret;
+                               
+                       } else {
+                               return elem[ name ];
+                       }
+               }
+       },
+       
+       propHooks: {}
+});
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !jQuery.support.getSetAttribute ) {
+       jQuery.attrFix = jQuery.extend( jQuery.attrFix, {
+               "for": "htmlFor",
+               "class": "className",
+               maxlength: "maxLength",
+               cellspacing: "cellSpacing",
+               cellpadding: "cellPadding",
+               rowspan: "rowSpan",
+               colspan: "colSpan",
+               usemap: "useMap",
+               frameborder: "frameBorder"
+       });
+       
+       // Use this for any attribute on a form in IE6/7
+       formHook = jQuery.attrHooks.name = jQuery.attrHooks.value = jQuery.valHooks.button = {
+               get: function( elem, name ) {
+                       var ret;
+                       if ( name === "value" && !jQuery.nodeName( elem, "button" ) ) {
+                               return elem.getAttribute( name );
+                       }
+                       ret = elem.getAttributeNode( name );
+                       // Return undefined if not specified instead of empty string
+                       return ret && ret.specified ?
+                               ret.nodeValue :
+                               undefined;
+               },
+               set: function( elem, value, name ) {
+                       // Check form objects in IE (multiple bugs related)
+                       // Only use nodeValue if the attribute node exists on the form
+                       var ret = elem.getAttributeNode( name );
+                       if ( ret ) {
+                               ret.nodeValue = value;
+                               return value;
+                       }
+               }
+       };
+
+       // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+       // This is for removals
+       jQuery.each([ "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       set: function( elem, value ) {
+                               if ( value === "" ) {
+                                       elem.setAttribute( name, "auto" );
+                                       return value;
+                               }
+                       }
+               });
+       });
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+       jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       get: function( elem ) {
+                               var ret = elem.getAttribute( name, 2 );
+                               return ret === null ? undefined : ret;
+                       }
+               });
+       });
+}
+
+if ( !jQuery.support.style ) {
+       jQuery.attrHooks.style = {
+               get: function( elem ) {
+                       // Return undefined in the case of empty string
+                       // Normalize to lowercase since IE uppercases css property names
+                       return elem.style.cssText.toLowerCase() || undefined;
+               },
+               set: function( elem, value ) {
+                       return (elem.style.cssText = "" + value);
+               }
+       };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+       jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+               get: function( elem ) {
+                       var parent = elem.parentNode;
+
+                       if ( parent ) {
+                               parent.selectedIndex;
+
+                               // Make sure that it also works with optgroups, see #5701
+                               if ( parent.parentNode ) {
+                                       parent.parentNode.selectedIndex;
+                               }
+                       }
+               }
+       });
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+       jQuery.each([ "radio", "checkbox" ], function() {
+               jQuery.valHooks[ this ] = {
+                       get: function( elem ) {
+                               // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+                               return elem.getAttribute("value") === null ? "on" : elem.value;
+                       }
+               };
+       });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+       jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+               set: function( elem, value ) {
+                       if ( jQuery.isArray( value ) ) {
+                               return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
+                       }
+               }
+       });
+});
+
+
+
+
+var hasOwn = Object.prototype.hasOwnProperty,
+       rnamespaces = /\.(.*)$/,
+       rformElems = /^(?:textarea|input|select)$/i,
+       rperiod = /\./g,
+       rspaces = / /g,
+       rescape = /[^\w\s.|`]/g,
+       fcleanup = function( nm ) {
+               return nm.replace(rescape, "\\$&");
+       };
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+       // Bind an event to an element
+       // Original by Dean Edwards
+       add: function( elem, types, handler, data ) {
+               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+                       return;
+               }
+
+               if ( handler === false ) {
+                       handler = returnFalse;
+               } else if ( !handler ) {
+                       // Fixes bug #7229. Fix recommended by jdalton
+                       return;
+               }
+
+               var handleObjIn, handleObj;
+
+               if ( handler.handler ) {
+                       handleObjIn = handler;
+                       handler = handleObjIn.handler;
+               }
+
+               // Make sure that the function being executed has a unique ID
+               if ( !handler.guid ) {
+                       handler.guid = jQuery.guid++;
+               }
+
+               // Init the element's event structure
+               var elemData = jQuery._data( elem );
+
+               // If no elemData is found then we must be trying to bind to one of the
+               // banned noData elements
+               if ( !elemData ) {
+                       return;
+               }
+
+               var events = elemData.events,
+                       eventHandle = elemData.handle;
+
+               if ( !events ) {
+                       elemData.events = events = {};
+               }
+
+               if ( !eventHandle ) {
+                       elemData.handle = eventHandle = function( e ) {
+                               // Discard the second event of a jQuery.event.trigger() and
+                               // when an event is called after a page has unloaded
+                               return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+                                       jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+                                       undefined;
+                       };
+               }
+
+               // Add elem as a property of the handle function
+               // This is to prevent a memory leak with non-native events in IE.
+               eventHandle.elem = elem;
+
+               // Handle multiple events separated by a space
+               // jQuery(...).bind("mouseover mouseout", fn);
+               types = types.split(" ");
+
+               var type, i = 0, namespaces;
+
+               while ( (type = types[ i++ ]) ) {
+                       handleObj = handleObjIn ?
+                               jQuery.extend({}, handleObjIn) :
+                               { handler: handler, data: data };
+
+                       // Namespaced event handlers
+                       if ( type.indexOf(".") > -1 ) {
+                               namespaces = type.split(".");
+                               type = namespaces.shift();
+                               handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+                       } else {
+                               namespaces = [];
+                               handleObj.namespace = "";
+                       }
+
+                       handleObj.type = type;
+                       if ( !handleObj.guid ) {
+                               handleObj.guid = handler.guid;
+                       }
+
+                       // Get the current list of functions bound to this event
+                       var handlers = events[ type ],
+                               special = jQuery.event.special[ type ] || {};
+
+                       // Init the event handler queue
+                       if ( !handlers ) {
+                               handlers = events[ type ] = [];
+
+                               // Check for a special event handler
+                               // Only use addEventListener/attachEvent if the special
+                               // events handler returns false
+                               if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                                       // Bind the global event handler to the element
+                                       if ( elem.addEventListener ) {
+                                               elem.addEventListener( type, eventHandle, false );
+
+                                       } else if ( elem.attachEvent ) {
+                                               elem.attachEvent( "on" + type, eventHandle );
+                                       }
+                               }
+                       }
+
+                       if ( special.add ) {
+                               special.add.call( elem, handleObj );
+
+                               if ( !handleObj.handler.guid ) {
+                                       handleObj.handler.guid = handler.guid;
+                               }
+                       }
+
+                       // Add the function to the element's handler list
+                       handlers.push( handleObj );
+
+                       // Keep track of which events have been used, for event optimization
+                       jQuery.event.global[ type ] = true;
+               }
+
+               // Nullify elem to prevent memory leaks in IE
+               elem = null;
+       },
+
+       global: {},
+
+       // Detach an event or set of events from an element
+       remove: function( elem, types, handler, pos ) {
+               // don't do events on text and comment nodes
+               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+                       return;
+               }
+
+               if ( handler === false ) {
+                       handler = returnFalse;
+               }
+
+               var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+                       elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+                       events = elemData && elemData.events;
+
+               if ( !elemData || !events ) {
+                       return;
+               }
+
+               // types is actually an event object here
+               if ( types && types.type ) {
+                       handler = types.handler;
+                       types = types.type;
+               }
+
+               // Unbind all events for the element
+               if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+                       types = types || "";
+
+                       for ( type in events ) {
+                               jQuery.event.remove( elem, type + types );
+                       }
+
+                       return;
+               }
+
+               // Handle multiple events separated by a space
+               // jQuery(...).unbind("mouseover mouseout", fn);
+               types = types.split(" ");
+
+               while ( (type = types[ i++ ]) ) {
+                       origType = type;
+                       handleObj = null;
+                       all = type.indexOf(".") < 0;
+                       namespaces = [];
+
+                       if ( !all ) {
+                               // Namespaced event handlers
+                               namespaces = type.split(".");
+                               type = namespaces.shift();
+
+                               namespace = new RegExp("(^|\\.)" +
+                                       jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+                       }
+
+                       eventType = events[ type ];
+
+                       if ( !eventType ) {
+                               continue;
+                       }
+
+                       if ( !handler ) {
+                               for ( j = 0; j < eventType.length; j++ ) {
+                                       handleObj = eventType[ j ];
+
+                                       if ( all || namespace.test( handleObj.namespace ) ) {
+                                               jQuery.event.remove( elem, origType, handleObj.handler, j );
+                                               eventType.splice( j--, 1 );
+                                       }
+                               }
+
+                               continue;
+                       }
+
+                       special = jQuery.event.special[ type ] || {};
+
+                       for ( j = pos || 0; j < eventType.length; j++ ) {
+                               handleObj = eventType[ j ];
+
+                               if ( handler.guid === handleObj.guid ) {
+                                       // remove the given handler for the given type
+                                       if ( all || namespace.test( handleObj.namespace ) ) {
+                                               if ( pos == null ) {
+                                                       eventType.splice( j--, 1 );
+                                               }
+
+                                               if ( special.remove ) {
+                                                       special.remove.call( elem, handleObj );
+                                               }
+                                       }
+
+                                       if ( pos != null ) {
+                                               break;
+                                       }
+                               }
+                       }
+
+                       // remove generic event handler if no more handlers exist
+                       if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+                               if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+                                       jQuery.removeEvent( elem, type, elemData.handle );
+                               }
+
+                               ret = null;
+                               delete events[ type ];
+                       }
+               }
+
+               // Remove the expando if it's no longer used
+               if ( jQuery.isEmptyObject( events ) ) {
+                       var handle = elemData.handle;
+                       if ( handle ) {
+                               handle.elem = null;
+                       }
+
+                       delete elemData.events;
+                       delete elemData.handle;
+
+                       if ( jQuery.isEmptyObject( elemData ) ) {
+                               jQuery.removeData( elem, undefined, true );
+                       }
+               }
+       },
+       
+       // Events that are safe to short-circuit if no handlers are attached.
+       // Native DOM events should not be added, they may have inline handlers.
+       customEvent: {
+               "getData": true,
+               "setData": true,
+               "changeData": true
+       },
+
+       trigger: function( event, data, elem, onlyHandlers ) {
+               // Event object or event type
+               var type = event.type || event,
+                       namespaces = [],
+                       exclusive;
+
+               if ( type.indexOf("!") >= 0 ) {
+                       // Exclusive events trigger only for the exact event (no namespaces)
+                       type = type.slice(0, -1);
+                       exclusive = true;
+               }
+
+               if ( type.indexOf(".") >= 0 ) {
+                       // Namespaced trigger; create a regexp to match event type in handle()
+                       namespaces = type.split(".");
+                       type = namespaces.shift();
+                       namespaces.sort();
+               }
+
+               if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+                       // No jQuery handlers for this event type, and it can't have inline handlers
+                       return;
+               }
+
+               // Caller can pass in an Event, Object, or just an event type string
+               event = typeof event === "object" ?
+                       // jQuery.Event object
+                       event[ jQuery.expando ] ? event :
+                       // Object literal
+                       new jQuery.Event( type, event ) :
+                       // Just the event type (string)
+                       new jQuery.Event( type );
+
+               event.type = type;
+               event.exclusive = exclusive;
+               event.namespace = namespaces.join(".");
+               event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
+               
+               // triggerHandler() and global events don't bubble or run the default action
+               if ( onlyHandlers || !elem ) {
+                       event.preventDefault();
+                       event.stopPropagation();
+               }
+
+               // Handle a global trigger
+               if ( !elem ) {
+                       // TODO: Stop taunting the data cache; remove global events and always attach to document
+                       jQuery.each( jQuery.cache, function() {
+                               // internalKey variable is just used to make it easier to find
+                               // and potentially change this stuff later; currently it just
+                               // points to jQuery.expando
+                               var internalKey = jQuery.expando,
+                                       internalCache = this[ internalKey ];
+                               if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
+                                       jQuery.event.trigger( event, data, internalCache.handle.elem );
+                               }
+                       });
+                       return;
+               }
+
+               // Don't do events on text and comment nodes
+               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+                       return;
+               }
+
+               // Clean up the event in case it is being reused
+               event.result = undefined;
+               event.target = elem;
+
+               // Clone any incoming data and prepend the event, creating the handler arg list
+               data = data ? jQuery.makeArray( data ) : [];
+               data.unshift( event );
+
+               var cur = elem,
+                       // IE doesn't like method names with a colon (#3533, #8272)
+                       ontype = type.indexOf(":") < 0 ? "on" + type : "";
+
+               // Fire event on the current element, then bubble up the DOM tree
+               do {
+                       var handle = jQuery._data( cur, "handle" );
+
+                       event.currentTarget = cur;
+                       if ( handle ) {
+                               handle.apply( cur, data );
+                       }
+
+                       // Trigger an inline bound script
+                       if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
+                               event.result = false;
+                               event.preventDefault();
+                       }
+
+                       // Bubble up to document, then to window
+                       cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
+               } while ( cur && !event.isPropagationStopped() );
+
+               // If nobody prevented the default action, do it now
+               if ( !event.isDefaultPrevented() ) {
+                       var old,
+                               special = jQuery.event.special[ type ] || {};
+
+                       if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
+                               !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+                               // Call a native DOM method on the target with the same name name as the event.
+                               // Can't use an .isFunction)() check here because IE6/7 fails that test.
+                               // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
+                               try {
+                                       if ( ontype && elem[ type ] ) {
+                                               // Don't re-trigger an onFOO event when we call its FOO() method
+                                               old = elem[ ontype ];
+
+                                               if ( old ) {
+                                                       elem[ ontype ] = null;
+                                               }
+
+                                               jQuery.event.triggered = type;
+                                               elem[ type ]();
+                                       }
+                               } catch ( ieError ) {}
+
+                               if ( old ) {
+                                       elem[ ontype ] = old;
+                               }
+
+                               jQuery.event.triggered = undefined;
+                       }
+               }
+               
+               return event.result;
+       },
+
+       handle: function( event ) {
+               event = jQuery.event.fix( event || window.event );
+               // Snapshot the handlers list since a called handler may add/remove events.
+               var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
+                       run_all = !event.exclusive && !event.namespace,
+                       args = Array.prototype.slice.call( arguments, 0 );
+
+               // Use the fix-ed Event rather than the (read-only) native event
+               args[0] = event;
+               event.currentTarget = this;
+
+               for ( var j = 0, l = handlers.length; j < l; j++ ) {
+                       var handleObj = handlers[ j ];
+
+                       // Triggered event must 1) be non-exclusive and have no namespace, or
+                       // 2) have namespace(s) a subset or equal to those in the bound event.
+                       if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
+                               // Pass in a reference to the handler function itself
+                               // So that we can later remove it
+                               event.handler = handleObj.handler;
+                               event.data = handleObj.data;
+                               event.handleObj = handleObj;
+
+                               var ret = handleObj.handler.apply( this, args );
+
+                               if ( ret !== undefined ) {
+                                       event.result = ret;
+                                       if ( ret === false ) {
+                                               event.preventDefault();
+                                               event.stopPropagation();
+                                       }
+                               }
+
+                               if ( event.isImmediatePropagationStopped() ) {
+                                       break;
+                               }
+                       }
+               }
+               return event.result;
+       },
+
+       props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+       fix: function( event ) {
+               if ( event[ jQuery.expando ] ) {
+                       return event;
+               }
+
+               // store a copy of the original event object
+               // and "clone" to set read-only properties
+               var originalEvent = event;
+               event = jQuery.Event( originalEvent );
+
+               for ( var i = this.props.length, prop; i; ) {
+                       prop = this.props[ --i ];
+                       event[ prop ] = originalEvent[ prop ];
+               }
+
+               // Fix target property, if necessary
+               if ( !event.target ) {
+                       // Fixes #1925 where srcElement might not be defined either
+                       event.target = event.srcElement || document;
+               }
+
+               // check if target is a textnode (safari)
+               if ( event.target.nodeType === 3 ) {
+                       event.target = event.target.parentNode;
+               }
+
+               // Add relatedTarget, if necessary
+               if ( !event.relatedTarget && event.fromElement ) {
+                       event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+               }
+
+               // Calculate pageX/Y if missing and clientX/Y available
+               if ( event.pageX == null && event.clientX != null ) {
+                       var eventDocument = event.target.ownerDocument || document,
+                               doc = eventDocument.documentElement,
+                               body = eventDocument.body;
+
+                       event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+                       event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
+               }
+
+               // Add which for key events
+               if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+                       event.which = event.charCode != null ? event.charCode : event.keyCode;
+               }
+
+               // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+               if ( !event.metaKey && event.ctrlKey ) {
+                       event.metaKey = event.ctrlKey;
+               }
+
+               // Add which for click: 1 === left; 2 === middle; 3 === right
+               // Note: button is not normalized, so don't use it
+               if ( !event.which && event.button !== undefined ) {
+                       event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+               }
+
+               return event;
+       },
+
+       // Deprecated, use jQuery.guid instead
+       guid: 1E8,
+
+       // Deprecated, use jQuery.proxy instead
+       proxy: jQuery.proxy,
+
+       special: {
+               ready: {
+                       // Make sure the ready event is setup
+                       setup: jQuery.bindReady,
+                       teardown: jQuery.noop
+               },
+
+               live: {
+                       add: function( handleObj ) {
+                               jQuery.event.add( this,
+                                       liveConvert( handleObj.origType, handleObj.selector ),
+                                       jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+                       },
+
+                       remove: function( handleObj ) {
+                               jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+                       }
+               },
+
+               beforeunload: {
+                       setup: function( data, namespaces, eventHandle ) {
+                               // We only want to do this special case on windows
+                               if ( jQuery.isWindow( this ) ) {
+                                       this.onbeforeunload = eventHandle;
+                               }
+                       },
+
+                       teardown: function( namespaces, eventHandle ) {
+                               if ( this.onbeforeunload === eventHandle ) {
+                                       this.onbeforeunload = null;
+                               }
+                       }
+               }
+       }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+       function( elem, type, handle ) {
+               if ( elem.removeEventListener ) {
+                       elem.removeEventListener( type, handle, false );
+               }
+       } :
+       function( elem, type, handle ) {
+               if ( elem.detachEvent ) {
+                       elem.detachEvent( "on" + type, handle );
+               }
+       };
+
+jQuery.Event = function( src, props ) {
+       // Allow instantiation without the 'new' keyword
+       if ( !this.preventDefault ) {
+               return new jQuery.Event( src, props );
+       }
+
+       // Event object
+       if ( src && src.type ) {
+               this.originalEvent = src;
+               this.type = src.type;
+
+               // Events bubbling up the document may have been marked as prevented
+               // by a handler lower down the tree; reflect the correct value.
+               this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+                       src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
+
+       // Event type
+       } else {
+               this.type = src;
+       }
+
+       // Put explicitly provided properties onto the event object
+       if ( props ) {
+               jQuery.extend( this, props );
+       }
+
+       // timeStamp is buggy for some events on Firefox(#3843)
+       // So we won't rely on the native value
+       this.timeStamp = jQuery.now();
+
+       // Mark it as fixed
+       this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+       return false;
+}
+function returnTrue() {
+       return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+       preventDefault: function() {
+               this.isDefaultPrevented = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+
+               // if preventDefault exists run it on the original event
+               if ( e.preventDefault ) {
+                       e.preventDefault();
+
+               // otherwise set the returnValue property of the original event to false (IE)
+               } else {
+                       e.returnValue = false;
+               }
+       },
+       stopPropagation: function() {
+               this.isPropagationStopped = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+               // if stopPropagation exists run it on the original event
+               if ( e.stopPropagation ) {
+                       e.stopPropagation();
+               }
+               // otherwise set the cancelBubble property of the original event to true (IE)
+               e.cancelBubble = true;
+       },
+       stopImmediatePropagation: function() {
+               this.isImmediatePropagationStopped = returnTrue;
+               this.stopPropagation();
+       },
+       isDefaultPrevented: returnFalse,
+       isPropagationStopped: returnFalse,
+       isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+       // Check if mouse(over|out) are still within the same parent element
+       var parent = event.relatedTarget;
+
+       // Firefox sometimes assigns relatedTarget a XUL element
+       // which we cannot access the parentNode property of
+       try {
+
+               // Chrome does something similar, the parentNode property
+               // can be accessed but is null.
+               if ( parent && parent !== document && !parent.parentNode ) {
+                       return;
+               }
+               // Traverse up the tree
+               while ( parent && parent !== this ) {
+                       parent = parent.parentNode;
+               }
+
+               if ( parent !== this ) {
+                       // set the correct event type
+                       event.type = event.data;
+
+                       // handle event if we actually just moused on to a non sub-element
+                       jQuery.event.handle.apply( this, arguments );
+               }
+
+       // assuming we've left the element since we most likely mousedover a xul element
+       } catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+       event.type = event.data;
+       jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
+}, function( orig, fix ) {
+       jQuery.event.special[ orig ] = {
+               setup: function( data ) {
+                       jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+               },
+               teardown: function( data ) {
+                       jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+               }
+       };
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+       jQuery.event.special.submit = {
+               setup: function( data, namespaces ) {
+                       if ( !jQuery.nodeName( this, "form" ) ) {
+                               jQuery.event.add(this, "click.specialSubmit", function( e ) {
+                                       var elem = e.target,
+                                               type = elem.type;
+
+                                       if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+                                               trigger( "submit", this, arguments );
+                                       }
+                               });
+
+                               jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+                                       var elem = e.target,
+                                               type = elem.type;
+
+                                       if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+                                               trigger( "submit", this, arguments );
+                                       }
+                               });
+
+                       } else {
+                               return false;
+                       }
+               },
+
+               teardown: function( namespaces ) {
+                       jQuery.event.remove( this, ".specialSubmit" );
+               }
+       };
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+       var changeFilters,
+
+       getVal = function( elem ) {
+               var type = elem.type, val = elem.value;
+
+               if ( type === "radio" || type === "checkbox" ) {
+                       val = elem.checked;
+
+               } else if ( type === "select-multiple" ) {
+                       val = elem.selectedIndex > -1 ?
+                               jQuery.map( elem.options, function( elem ) {
+                                       return elem.selected;
+                               }).join("-") :
+                               "";
+
+               } else if ( jQuery.nodeName( elem, "select" ) ) {
+                       val = elem.selectedIndex;
+               }
+
+               return val;
+       },
+
+       testChange = function testChange( e ) {
+               var elem = e.target, data, val;
+
+               if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+                       return;
+               }
+
+               data = jQuery._data( elem, "_change_data" );
+               val = getVal(elem);
+
+               // the current data will be also retrieved by beforeactivate
+               if ( e.type !== "focusout" || elem.type !== "radio" ) {
+                       jQuery._data( elem, "_change_data", val );
+               }
+
+               if ( data === undefined || val === data ) {
+                       return;
+               }
+
+               if ( data != null || val ) {
+                       e.type = "change";
+                       e.liveFired = undefined;
+                       jQuery.event.trigger( e, arguments[1], elem );
+               }
+       };
+
+       jQuery.event.special.change = {
+               filters: {
+                       focusout: testChange,
+
+                       beforedeactivate: testChange,
+
+                       click: function( e ) {
+                               var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+                               if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
+                                       testChange.call( this, e );
+                               }
+                       },
+
+                       // Change has to be called before submit
+                       // Keydown will be called before keypress, which is used in submit-event delegation
+                       keydown: function( e ) {
+                               var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+                               if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
+                                       (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+                                       type === "select-multiple" ) {
+                                       testChange.call( this, e );
+                               }
+                       },
+
+                       // Beforeactivate happens also before the previous element is blurred
+                       // with this event you can't trigger a change event, but you can store
+                       // information
+                       beforeactivate: function( e ) {
+                               var elem = e.target;
+                               jQuery._data( elem, "_change_data", getVal(elem) );
+                       }
+               },
+
+               setup: function( data, namespaces ) {
+                       if ( this.type === "file" ) {
+                               return false;
+                       }
+
+                       for ( var type in changeFilters ) {
+                               jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+                       }
+
+                       return rformElems.test( this.nodeName );
+               },
+
+               teardown: function( namespaces ) {
+                       jQuery.event.remove( this, ".specialChange" );
+
+                       return rformElems.test( this.nodeName );
+               }
+       };
+
+       changeFilters = jQuery.event.special.change.filters;
+
+       // Handle when the input is .focus()'d
+       changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+       // Piggyback on a donor event to simulate a different one.
+       // Fake originalEvent to avoid donor's stopPropagation, but if the
+       // simulated event prevents default then we do the same on the donor.
+       // Don't pass args or remember liveFired; they apply to the donor event.
+       var event = jQuery.extend( {}, args[ 0 ] );
+       event.type = type;
+       event.originalEvent = {};
+       event.liveFired = undefined;
+       jQuery.event.handle.call( elem, event );
+       if ( event.isDefaultPrevented() ) {
+               args[ 0 ].preventDefault();
+       }
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+       jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+               // Attach a single capturing handler while someone wants focusin/focusout
+               var attaches = 0;
+
+               jQuery.event.special[ fix ] = {
+                       setup: function() {
+                               if ( attaches++ === 0 ) {
+                                       document.addEventListener( orig, handler, true );
+                               }
+                       },
+                       teardown: function() {
+                               if ( --attaches === 0 ) {
+                                       document.removeEventListener( orig, handler, true );
+                               }
+                       }
+               };
+
+               function handler( donor ) {
+                       // Donor event is always a native one; fix it and switch its type.
+                       // Let focusin/out handler cancel the donor focus/blur event.
+                       var e = jQuery.event.fix( donor );
+                       e.type = fix;
+                       e.originalEvent = {};
+                       jQuery.event.trigger( e, null, e.target );
+                       if ( e.isDefaultPrevented() ) {
+                               donor.preventDefault();
+                       }
+               }
+       });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+       jQuery.fn[ name ] = function( type, data, fn ) {
+               var handler;
+
+               // Handle object literals
+               if ( typeof type === "object" ) {
+                       for ( var key in type ) {
+                               this[ name ](key, data, type[key], fn);
+                       }
+                       return this;
+               }
+
+               if ( arguments.length === 2 || data === false ) {
+                       fn = data;
+                       data = undefined;
+               }
+
+               if ( name === "one" ) {
+                       handler = function( event ) {
+                               jQuery( this ).unbind( event, handler );
+                               return fn.apply( this, arguments );
+                       };
+                       handler.guid = fn.guid || jQuery.guid++;
+               } else {
+                       handler = fn;
+               }
+
+               if ( type === "unload" && name !== "one" ) {
+                       this.one( type, data, fn );
+
+               } else {
+                       for ( var i = 0, l = this.length; i < l; i++ ) {
+                               jQuery.event.add( this[i], type, handler, data );
+                       }
+               }
+
+               return this;
+       };
+});
+
+jQuery.fn.extend({
+       unbind: function( type, fn ) {
+               // Handle object literals
+               if ( typeof type === "object" && !type.preventDefault ) {
+                       for ( var key in type ) {
+                               this.unbind(key, type[key]);
+                       }
+
+               } else {
+                       for ( var i = 0, l = this.length; i < l; i++ ) {
+                               jQuery.event.remove( this[i], type, fn );
+                       }
+               }
+
+               return this;
+       },
+
+       delegate: function( selector, types, data, fn ) {
+               return this.live( types, data, fn, selector );
+       },
+
+       undelegate: function( selector, types, fn ) {
+               if ( arguments.length === 0 ) {
+                       return this.unbind( "live" );
+
+               } else {
+                       return this.die( types, null, fn, selector );
+               }
+       },
+
+       trigger: function( type, data ) {
+               return this.each(function() {
+                       jQuery.event.trigger( type, data, this );
+               });
+       },
+
+       triggerHandler: function( type, data ) {
+               if ( this[0] ) {
+                       return jQuery.event.trigger( type, data, this[0], true );
+               }
+       },
+
+       toggle: function( fn ) {
+               // Save reference to arguments for access in closure
+               var args = arguments,
+                       guid = fn.guid || jQuery.guid++,
+                       i = 0,
+                       toggler = function( event ) {
+                               // Figure out which function to execute
+                               var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+                               jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+                               // Make sure that clicks stop
+                               event.preventDefault();
+
+                               // and execute the function
+                               return args[ lastToggle ].apply( this, arguments ) || false;
+                       };
+
+               // link all the functions, so any of them can unbind this click handler
+               toggler.guid = guid;
+               while ( i < args.length ) {
+                       args[ i++ ].guid = guid;
+               }
+
+               return this.click( toggler );
+       },
+
+       hover: function( fnOver, fnOut ) {
+               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+       }
+});
+
+var liveMap = {
+       focus: "focusin",
+       blur: "focusout",
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+       jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+               var type, i = 0, match, namespaces, preType,
+                       selector = origSelector || this.selector,
+                       context = origSelector ? this : jQuery( this.context );
+
+               if ( typeof types === "object" && !types.preventDefault ) {
+                       for ( var key in types ) {
+                               context[ name ]( key, data, types[key], selector );
+                       }
+
+                       return this;
+               }
+
+               if ( name === "die" && !types &&
+                                       origSelector && origSelector.charAt(0) === "." ) {
+
+                       context.unbind( origSelector );
+
+                       return this;
+               }
+
+               if ( data === false || jQuery.isFunction( data ) ) {
+                       fn = data || returnFalse;
+                       data = undefined;
+               }
+
+               types = (types || "").split(" ");
+
+               while ( (type = types[ i++ ]) != null ) {
+                       match = rnamespaces.exec( type );
+                       namespaces = "";
+
+                       if ( match )  {
+                               namespaces = match[0];
+                               type = type.replace( rnamespaces, "" );
+                       }
+
+                       if ( type === "hover" ) {
+                               types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+                               continue;
+                       }
+
+                       preType = type;
+
+                       if ( liveMap[ type ] ) {
+                               types.push( liveMap[ type ] + namespaces );
+                               type = type + namespaces;
+
+                       } else {
+                               type = (liveMap[ type ] || type) + namespaces;
+                       }
+
+                       if ( name === "live" ) {
+                               // bind live handler
+                               for ( var j = 0, l = context.length; j < l; j++ ) {
+                                       jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+                                               { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+                               }
+
+                       } else {
+                               // unbind live handler
+                               context.unbind( "live." + liveConvert( type, selector ), fn );
+                       }
+               }
+
+               return this;
+       };
+});
+
+function liveHandler( event ) {
+       var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+               elems = [],
+               selectors = [],
+               events = jQuery._data( this, "events" );
+
+       // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
+       if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
+               return;
+       }
+
+       if ( event.namespace ) {
+               namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+       }
+
+       event.liveFired = this;
+
+       var live = events.live.slice(0);
+
+       for ( j = 0; j < live.length; j++ ) {
+               handleObj = live[j];
+
+               if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+                       selectors.push( handleObj.selector );
+
+               } else {
+                       live.splice( j--, 1 );
+               }
+       }
+
+       match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+       for ( i = 0, l = match.length; i < l; i++ ) {
+               close = match[i];
+
+               for ( j = 0; j < live.length; j++ ) {
+                       handleObj = live[j];
+
+                       if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
+                               elem = close.elem;
+                               related = null;
+
+                               // Those two events require additional checking
+                               if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+                                       event.type = handleObj.preType;
+                                       related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+
+                                       // Make sure not to accidentally match a child element with the same selector
+                                       if ( related && jQuery.contains( elem, related ) ) {
+                                               related = elem;
+                                       }
+                               }
+
+                               if ( !related || related !== elem ) {
+                                       elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+                               }
+                       }
+               }
+       }
+
+       for ( i = 0, l = elems.length; i < l; i++ ) {
+               match = elems[i];
+
+               if ( maxLevel && match.level > maxLevel ) {
+                       break;
+               }
+
+               event.currentTarget = match.elem;
+               event.data = match.handleObj.data;
+               event.handleObj = match.handleObj;
+
+               ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+               if ( ret === false || event.isPropagationStopped() ) {
+                       maxLevel = match.level;
+
+                       if ( ret === false ) {
+                               stop = false;
+                       }
+                       if ( event.isImmediatePropagationStopped() ) {
+                               break;
+                       }
+               }
+       }
+
+       return stop;
+}
+
+function liveConvert( type, selector ) {
+       return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+       "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+       "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+       // Handle event binding
+       jQuery.fn[ name ] = function( data, fn ) {
+               if ( fn == null ) {
+                       fn = data;
+                       data = null;
+               }
+
+               return arguments.length > 0 ?
+                       this.bind( name, data, fn ) :
+                       this.trigger( name );
+       };
+
+       if ( jQuery.attrFn ) {
+               jQuery.attrFn[ name ] = true;
+       }
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+       done = 0,
+       toString = Object.prototype.toString,
+       hasDuplicate = false,
+       baseHasDuplicate = true,
+       rBackslash = /\\/g,
+       rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+       baseHasDuplicate = false;
+       return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+       results = results || [];
+       context = context || document;
+
+       var origContext = context;
+
+       if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+               return [];
+       }
+       
+       if ( !selector || typeof selector !== "string" ) {
+               return results;
+       }
+
+       var m, set, checkSet, extra, ret, cur, pop, i,
+               prune = true,
+               contextXML = Sizzle.isXML( context ),
+               parts = [],
+               soFar = selector;
+       
+       // Reset the position of the chunker regexp (start from head)
+       do {
+               chunker.exec( "" );
+               m = chunker.exec( soFar );
+
+               if ( m ) {
+                       soFar = m[3];
+               
+                       parts.push( m[1] );
+               
+                       if ( m[2] ) {
+                               extra = m[3];
+                               break;
+                       }
+               }
+       } while ( m );
+
+       if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+               if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+                       set = posProcess( parts[0] + parts[1], context );
+
+               } else {
+                       set = Expr.relative[ parts[0] ] ?
+                               [ context ] :
+                               Sizzle( parts.shift(), context );
+
+                       while ( parts.length ) {
+                               selector = parts.shift();
+
+                               if ( Expr.relative[ selector ] ) {
+                                       selector += parts.shift();
+                               }
+                               
+                               set = posProcess( selector, set );
+                       }
+               }
+
+       } else {
+               // Take a shortcut and set the context if the root selector is an ID
+               // (but not if it'll be faster if the inner selector is an ID)
+               if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+                               Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+                       ret = Sizzle.find( parts.shift(), context, contextXML );
+                       context = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set )[0] :
+                               ret.set[0];
+               }
+
+               if ( context ) {
+                       ret = seed ?
+                               { expr: parts.pop(), set: makeArray(seed) } :
+                               Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+                       set = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set ) :
+                               ret.set;
+
+                       if ( parts.length > 0 ) {
+                               checkSet = makeArray( set );
+
+                       } else {
+                               prune = false;
+                       }
+
+                       while ( parts.length ) {
+                               cur = parts.pop();
+                               pop = cur;
+
+                               if ( !Expr.relative[ cur ] ) {
+                                       cur = "";
+                               } else {
+                                       pop = parts.pop();
+                               }
+
+                               if ( pop == null ) {
+                                       pop = context;
+                               }
+
+                               Expr.relative[ cur ]( checkSet, pop, contextXML );
+                       }
+
+               } else {
+                       checkSet = parts = [];
+               }
+       }
+
+       if ( !checkSet ) {
+               checkSet = set;
+       }
+
+       if ( !checkSet ) {
+               Sizzle.error( cur || selector );
+       }
+
+       if ( toString.call(checkSet) === "[object Array]" ) {
+               if ( !prune ) {
+                       results.push.apply( results, checkSet );
+
+               } else if ( context && context.nodeType === 1 ) {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+                                       results.push( set[i] );
+                               }
+                       }
+
+               } else {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+                                       results.push( set[i] );
+                               }
+                       }
+               }
+
+       } else {
+               makeArray( checkSet, results );
+       }
+
+       if ( extra ) {
+               Sizzle( extra, origContext, results, seed );
+               Sizzle.uniqueSort( results );
+       }
+
+       return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+       if ( sortOrder ) {
+               hasDuplicate = baseHasDuplicate;
+               results.sort( sortOrder );
+
+               if ( hasDuplicate ) {
+                       for ( var i = 1; i < results.length; i++ ) {
+                               if ( results[i] === results[ i - 1 ] ) {
+                                       results.splice( i--, 1 );
+                               }
+                       }
+               }
+       }
+
+       return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+       return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+       return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+       var set;
+
+       if ( !expr ) {
+               return [];
+       }
+
+       for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+               var match,
+                       type = Expr.order[i];
+               
+               if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+                       var left = match[1];
+                       match.splice( 1, 1 );
+
+                       if ( left.substr( left.length - 1 ) !== "\\" ) {
+                               match[1] = (match[1] || "").replace( rBackslash, "" );
+                               set = Expr.find[ type ]( match, context, isXML );
+
+                               if ( set != null ) {
+                                       expr = expr.replace( Expr.match[ type ], "" );
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       if ( !set ) {
+               set = typeof context.getElementsByTagName !== "undefined" ?
+                       context.getElementsByTagName( "*" ) :
+                       [];
+       }
+
+       return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+       var match, anyFound,
+               old = expr,
+               result = [],
+               curLoop = set,
+               isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+       while ( expr && set.length ) {
+               for ( var type in Expr.filter ) {
+                       if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+                               var found, item,
+                                       filter = Expr.filter[ type ],
+                                       left = match[1];
+
+                               anyFound = false;
+
+                               match.splice(1,1);
+
+                               if ( left.substr( left.length - 1 ) === "\\" ) {
+                                       continue;
+                               }
+
+                               if ( curLoop === result ) {
+                                       result = [];
+                               }
+
+                               if ( Expr.preFilter[ type ] ) {
+                                       match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+                                       if ( !match ) {
+                                               anyFound = found = true;
+
+                                       } else if ( match === true ) {
+                                               continue;
+                                       }
+                               }
+
+                               if ( match ) {
+                                       for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+                                               if ( item ) {
+                                                       found = filter( item, match, i, curLoop );
+                                                       var pass = not ^ !!found;
+
+                                                       if ( inplace && found != null ) {
+                                                               if ( pass ) {
+                                                                       anyFound = true;
+
+                                                               } else {
+                                                                       curLoop[i] = false;
+                                                               }
+
+                                                       } else if ( pass ) {
+                                                               result.push( item );
+                                                               anyFound = true;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               if ( found !== undefined ) {
+                                       if ( !inplace ) {
+                                               curLoop = result;
+                                       }
+
+                                       expr = expr.replace( Expr.match[ type ], "" );
+
+                                       if ( !anyFound ) {
+                                               return [];
+                                       }
+
+                                       break;
+                               }
+                       }
+               }
+
+               // Improper expression
+               if ( expr === old ) {
+                       if ( anyFound == null ) {
+                               Sizzle.error( expr );
+
+                       } else {
+                               break;
+                       }
+               }
+
+               old = expr;
+       }
+
+       return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+       throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+       order: [ "ID", "NAME", "TAG" ],
+
+       match: {
+               ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+               ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+               TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+               CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+               POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+               PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+       },
+
+       leftMatch: {},
+
+       attrMap: {
+               "class": "className",
+               "for": "htmlFor"
+       },
+
+       attrHandle: {
+               href: function( elem ) {
+                       return elem.getAttribute( "href" );
+               },
+               type: function( elem ) {
+                       return elem.getAttribute( "type" );
+               }
+       },
+
+       relative: {
+               "+": function(checkSet, part){
+                       var isPartStr = typeof part === "string",
+                               isTag = isPartStr && !rNonWord.test( part ),
+                               isPartStrNotTag = isPartStr && !isTag;
+
+                       if ( isTag ) {
+                               part = part.toLowerCase();
+                       }
+
+                       for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+                               if ( (elem = checkSet[i]) ) {
+                                       while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+                                       checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+                                               elem || false :
+                                               elem === part;
+                               }
+                       }
+
+                       if ( isPartStrNotTag ) {
+                               Sizzle.filter( part, checkSet, true );
+                       }
+               },
+
+               ">": function( checkSet, part ) {
+                       var elem,
+                               isPartStr = typeof part === "string",
+                               i = 0,
+                               l = checkSet.length;
+
+                       if ( isPartStr && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               var parent = elem.parentNode;
+                                               checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+                                       }
+                               }
+
+                       } else {
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               checkSet[i] = isPartStr ?
+                                                       elem.parentNode :
+                                                       elem.parentNode === part;
+                                       }
+                               }
+
+                               if ( isPartStr ) {
+                                       Sizzle.filter( part, checkSet, true );
+                               }
+                       }
+               },
+
+               "": function(checkSet, part, isXML){
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+               },
+
+               "~": function( checkSet, part, isXML ) {
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+               }
+       },
+
+       find: {
+               ID: function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+                               // Check parentNode to catch when Blackberry 4.6 returns
+                               // nodes that are no longer in the document #6963
+                               return m && m.parentNode ? [m] : [];
+                       }
+               },
+
+               NAME: function( match, context ) {
+                       if ( typeof context.getElementsByName !== "undefined" ) {
+                               var ret = [],
+                                       results = context.getElementsByName( match[1] );
+
+                               for ( var i = 0, l = results.length; i < l; i++ ) {
+                                       if ( results[i].getAttribute("name") === match[1] ) {
+                                               ret.push( results[i] );
+                                       }
+                               }
+
+                               return ret.length === 0 ? null : ret;
+                       }
+               },
+
+               TAG: function( match, context ) {
+                       if ( typeof context.getElementsByTagName !== "undefined" ) {
+                               return context.getElementsByTagName( match[1] );
+                       }
+               }
+       },
+       preFilter: {
+               CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+                       match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+                       if ( isXML ) {
+                               return match;
+                       }
+
+                       for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+                               if ( elem ) {
+                                       if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+                                               if ( !inplace ) {
+                                                       result.push( elem );
+                                               }
+
+                                       } else if ( inplace ) {
+                                               curLoop[i] = false;
+                                       }
+                               }
+                       }
+
+                       return false;
+               },
+
+               ID: function( match ) {
+                       return match[1].replace( rBackslash, "" );
+               },
+
+               TAG: function( match, curLoop ) {
+                       return match[1].replace( rBackslash, "" ).toLowerCase();
+               },
+
+               CHILD: function( match ) {
+                       if ( match[1] === "nth" ) {
+                               if ( !match[2] ) {
+                                       Sizzle.error( match[0] );
+                               }
+
+                               match[2] = match[2].replace(/^\+|\s*/g, '');
+
+                               // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+                               var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+                                       match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+                                       !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+                               // calculate the numbers (first)n+(last) including if they are negative
+                               match[2] = (test[1] + (test[2] || 1)) - 0;
+                               match[3] = test[3] - 0;
+                       }
+                       else if ( match[2] ) {
+                               Sizzle.error( match[0] );
+                       }
+
+                       // TODO: Move to normal caching system
+                       match[0] = done++;
+
+                       return match;
+               },
+
+               ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+                       var name = match[1] = match[1].replace( rBackslash, "" );
+                       
+                       if ( !isXML && Expr.attrMap[name] ) {
+                               match[1] = Expr.attrMap[name];
+                       }
+
+                       // Handle if an un-quoted value was used
+                       match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+                       if ( match[2] === "~=" ) {
+                               match[4] = " " + match[4] + " ";
+                       }
+
+                       return match;
+               },
+
+               PSEUDO: function( match, curLoop, inplace, result, not ) {
+                       if ( match[1] === "not" ) {
+                               // If we're dealing with a complex expression, or a simple one
+                               if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+                                       match[3] = Sizzle(match[3], null, null, curLoop);
+
+                               } else {
+                                       var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+                                       if ( !inplace ) {
+                                               result.push.apply( result, ret );
+                                       }
+
+                                       return false;
+                               }
+
+                       } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+                               return true;
+                       }
+                       
+                       return match;
+               },
+
+               POS: function( match ) {
+                       match.unshift( true );
+
+                       return match;
+               }
+       },
+       
+       filters: {
+               enabled: function( elem ) {
+                       return elem.disabled === false && elem.type !== "hidden";
+               },
+
+               disabled: function( elem ) {
+                       return elem.disabled === true;
+               },
+
+               checked: function( elem ) {
+                       return elem.checked === true;
+               },
+               
+               selected: function( elem ) {
+                       // Accessing this property makes selected-by-default
+                       // options in Safari work properly
+                       if ( elem.parentNode ) {
+                               elem.parentNode.selectedIndex;
+                       }
+                       
+                       return elem.selected === true;
+               },
+
+               parent: function( elem ) {
+                       return !!elem.firstChild;
+               },
+
+               empty: function( elem ) {
+                       return !elem.firstChild;
+               },
+
+               has: function( elem, i, match ) {
+                       return !!Sizzle( match[3], elem ).length;
+               },
+
+               header: function( elem ) {
+                       return (/h\d/i).test( elem.nodeName );
+               },
+
+               text: function( elem ) {
+                       var attr = elem.getAttribute( "type" ), type = elem.type;
+                       // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 
+                       // use getAttribute instead to test this case
+                       return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+               },
+
+               radio: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+               },
+
+               checkbox: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+               },
+
+               file: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+               },
+
+               password: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+               },
+
+               submit: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return (name === "input" || name === "button") && "submit" === elem.type;
+               },
+
+               image: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+               },
+
+               reset: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "reset" === elem.type;
+               },
+
+               button: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return name === "input" && "button" === elem.type || name === "button";
+               },
+
+               input: function( elem ) {
+                       return (/input|select|textarea|button/i).test( elem.nodeName );
+               },
+
+               focus: function( elem ) {
+                       return elem === elem.ownerDocument.activeElement;
+               }
+       },
+       setFilters: {
+               first: function( elem, i ) {
+                       return i === 0;
+               },
+
+               last: function( elem, i, match, array ) {
+                       return i === array.length - 1;
+               },
+
+               even: function( elem, i ) {
+                       return i % 2 === 0;
+               },
+
+               odd: function( elem, i ) {
+                       return i % 2 === 1;
+               },
+
+               lt: function( elem, i, match ) {
+                       return i < match[3] - 0;
+               },
+
+               gt: function( elem, i, match ) {
+                       return i > match[3] - 0;
+               },
+
+               nth: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               },
+
+               eq: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               }
+       },
+       filter: {
+               PSEUDO: function( elem, match, i, array ) {
+                       var name = match[1],
+                               filter = Expr.filters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+
+                       } else if ( name === "contains" ) {
+                               return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+                       } else if ( name === "not" ) {
+                               var not = match[3];
+
+                               for ( var j = 0, l = not.length; j < l; j++ ) {
+                                       if ( not[j] === elem ) {
+                                               return false;
+                                       }
+                               }
+
+                               return true;
+
+                       } else {
+                               Sizzle.error( name );
+                       }
+               },
+
+               CHILD: function( elem, match ) {
+                       var type = match[1],
+                               node = elem;
+
+                       switch ( type ) {
+                               case "only":
+                               case "first":
+                                       while ( (node = node.previousSibling) )  {
+                                               if ( node.nodeType === 1 ) { 
+                                                       return false; 
+                                               }
+                                       }
+
+                                       if ( type === "first" ) { 
+                                               return true; 
+                                       }
+
+                                       node = elem;
+
+                               case "last":
+                                       while ( (node = node.nextSibling) )      {
+                                               if ( node.nodeType === 1 ) { 
+                                                       return false; 
+                                               }
+                                       }
+
+                                       return true;
+
+                               case "nth":
+                                       var first = match[2],
+                                               last = match[3];
+
+                                       if ( first === 1 && last === 0 ) {
+                                               return true;
+                                       }
+                                       
+                                       var doneName = match[0],
+                                               parent = elem.parentNode;
+       
+                                       if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+                                               var count = 0;
+                                               
+                                               for ( node = parent.firstChild; node; node = node.nextSibling ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               node.nodeIndex = ++count;
+                                                       }
+                                               } 
+
+                                               parent.sizcache = doneName;
+                                       }
+                                       
+                                       var diff = elem.nodeIndex - last;
+
+                                       if ( first === 0 ) {
+                                               return diff === 0;
+
+                                       } else {
+                                               return ( diff % first === 0 && diff / first >= 0 );
+                                       }
+                       }
+               },
+
+               ID: function( elem, match ) {
+                       return elem.nodeType === 1 && elem.getAttribute("id") === match;
+               },
+
+               TAG: function( elem, match ) {
+                       return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+               },
+               
+               CLASS: function( elem, match ) {
+                       return (" " + (elem.className || elem.getAttribute("class")) + " ")
+                               .indexOf( match ) > -1;
+               },
+
+               ATTR: function( elem, match ) {
+                       var name = match[1],
+                               result = Expr.attrHandle[ name ] ?
+                                       Expr.attrHandle[ name ]( elem ) :
+                                       elem[ name ] != null ?
+                                               elem[ name ] :
+                                               elem.getAttribute( name ),
+                               value = result + "",
+                               type = match[2],
+                               check = match[4];
+
+                       return result == null ?
+                               type === "!=" :
+                               type === "=" ?
+                               value === check :
+                               type === "*=" ?
+                               value.indexOf(check) >= 0 :
+                               type === "~=" ?
+                               (" " + value + " ").indexOf(check) >= 0 :
+                               !check ?
+                               value && result !== false :
+                               type === "!=" ?
+                               value !== check :
+                               type === "^=" ?
+                               value.indexOf(check) === 0 :
+                               type === "$=" ?
+                               value.substr(value.length - check.length) === check :
+                               type === "|=" ?
+                               value === check || value.substr(0, check.length + 1) === check + "-" :
+                               false;
+               },
+
+               POS: function( elem, match, i, array ) {
+                       var name = match[2],
+                               filter = Expr.setFilters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+                       }
+               }
+       }
+};
+
+var origPOS = Expr.match.POS,
+       fescape = function(all, num){
+               return "\\" + (num - 0 + 1);
+       };
+
+for ( var type in Expr.match ) {
+       Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+       Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+       array = Array.prototype.slice.call( array, 0 );
+
+       if ( results ) {
+               results.push.apply( results, array );
+               return results;
+       }
+       
+       return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+       Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+       makeArray = function( array, results ) {
+               var i = 0,
+                       ret = results || [];
+
+               if ( toString.call(array) === "[object Array]" ) {
+                       Array.prototype.push.apply( ret, array );
+
+               } else {
+                       if ( typeof array.length === "number" ) {
+                               for ( var l = array.length; i < l; i++ ) {
+                                       ret.push( array[i] );
+                               }
+
+                       } else {
+                               for ( ; array[i]; i++ ) {
+                                       ret.push( array[i] );
+                               }
+                       }
+               }
+
+               return ret;
+       };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+       sortOrder = function( a, b ) {
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+                       return a.compareDocumentPosition ? -1 : 1;
+               }
+
+               return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+       };
+
+} else {
+       sortOrder = function( a, b ) {
+               var al, bl,
+                       ap = [],
+                       bp = [],
+                       aup = a.parentNode,
+                       bup = b.parentNode,
+                       cur = aup;
+
+               // The nodes are identical, we can exit early
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+
+               // If the nodes are siblings (or identical) we can do a quick check
+               } else if ( aup === bup ) {
+                       return siblingCheck( a, b );
+
+               // If no parents were found then the nodes are disconnected
+               } else if ( !aup ) {
+                       return -1;
+
+               } else if ( !bup ) {
+                       return 1;
+               }
+
+               // Otherwise they're somewhere else in the tree so we need
+               // to build up a full list of the parentNodes for comparison
+               while ( cur ) {
+                       ap.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               cur = bup;
+
+               while ( cur ) {
+                       bp.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               al = ap.length;
+               bl = bp.length;
+
+               // Start walking down the tree looking for a discrepancy
+               for ( var i = 0; i < al && i < bl; i++ ) {
+                       if ( ap[i] !== bp[i] ) {
+                               return siblingCheck( ap[i], bp[i] );
+                       }
+               }
+
+               // We ended someplace up the tree so do a sibling check
+               return i === al ?
+                       siblingCheck( a, bp[i], -1 ) :
+                       siblingCheck( ap[i], b, 1 );
+       };
+
+       siblingCheck = function( a, b, ret ) {
+               if ( a === b ) {
+                       return ret;
+               }
+
+               var cur = a.nextSibling;
+
+               while ( cur ) {
+                       if ( cur === b ) {
+                               return -1;
+                       }
+
+                       cur = cur.nextSibling;
+               }
+
+               return 1;
+       };
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+       var ret = "", elem;
+
+       for ( var i = 0; elems[i]; i++ ) {
+               elem = elems[i];
+
+               // Get the text from text nodes and CDATA nodes
+               if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+                       ret += elem.nodeValue;
+
+               // Traverse everything else, except comment nodes
+               } else if ( elem.nodeType !== 8 ) {
+                       ret += Sizzle.getText( elem.childNodes );
+               }
+       }
+
+       return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+       // We're going to inject a fake input element with a specified name
+       var form = document.createElement("div"),
+               id = "script" + (new Date()).getTime(),
+               root = document.documentElement;
+
+       form.innerHTML = "<a name='" + id + "'/>";
+
+       // Inject it into the root element, check its status, and remove it quickly
+       root.insertBefore( form, root.firstChild );
+
+       // The workaround has to do additional checks after a getElementById
+       // Which slows things down for other browsers (hence the branching)
+       if ( document.getElementById( id ) ) {
+               Expr.find.ID = function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+
+                               return m ?
+                                       m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+                                               [m] :
+                                               undefined :
+                                       [];
+                       }
+               };
+
+               Expr.filter.ID = function( elem, match ) {
+                       var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+                       return elem.nodeType === 1 && node && node.nodeValue === match;
+               };
+       }
+
+       root.removeChild( form );
+
+       // release memory in IE
+       root = form = null;
+})();
+
+(function(){
+       // Check to see if the browser returns only elements
+       // when doing getElementsByTagName("*")
+
+       // Create a fake element
+       var div = document.createElement("div");
+       div.appendChild( document.createComment("") );
+
+       // Make sure no comments are found
+       if ( div.getElementsByTagName("*").length > 0 ) {
+               Expr.find.TAG = function( match, context ) {
+                       var results = context.getElementsByTagName( match[1] );
+
+                       // Filter out possible comments
+                       if ( match[1] === "*" ) {
+                               var tmp = [];
+
+                               for ( var i = 0; results[i]; i++ ) {
+                                       if ( results[i].nodeType === 1 ) {
+                                               tmp.push( results[i] );
+                                       }
+                               }
+
+                               results = tmp;
+                       }
+
+                       return results;
+               };
+       }
+
+       // Check to see if an attribute returns normalized href attributes
+       div.innerHTML = "<a href='#'></a>";
+
+       if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+                       div.firstChild.getAttribute("href") !== "#" ) {
+
+               Expr.attrHandle.href = function( elem ) {
+                       return elem.getAttribute( "href", 2 );
+               };
+       }
+
+       // release memory in IE
+       div = null;
+})();
+
+if ( document.querySelectorAll ) {
+       (function(){
+               var oldSizzle = Sizzle,
+                       div = document.createElement("div"),
+                       id = "__sizzle__";
+
+               div.innerHTML = "<p class='TEST'></p>";
+
+               // Safari can't handle uppercase or unicode characters when
+               // in quirks mode.
+               if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+                       return;
+               }
+       
+               Sizzle = function( query, context, extra, seed ) {
+                       context = context || document;
+
+                       // Only use querySelectorAll on non-XML documents
+                       // (ID selectors don't work in non-HTML documents)
+                       if ( !seed && !Sizzle.isXML(context) ) {
+                               // See if we find a selector to speed up
+                               var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+                               
+                               if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+                                       // Speed-up: Sizzle("TAG")
+                                       if ( match[1] ) {
+                                               return makeArray( context.getElementsByTagName( query ), extra );
+                                       
+                                       // Speed-up: Sizzle(".CLASS")
+                                       } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+                                               return makeArray( context.getElementsByClassName( match[2] ), extra );
+                                       }
+                               }
+                               
+                               if ( context.nodeType === 9 ) {
+                                       // Speed-up: Sizzle("body")
+                                       // The body element only exists once, optimize finding it
+                                       if ( query === "body" && context.body ) {
+                                               return makeArray( [ context.body ], extra );
+                                               
+                                       // Speed-up: Sizzle("#ID")
+                                       } else if ( match && match[3] ) {
+                                               var elem = context.getElementById( match[3] );
+
+                                               // Check parentNode to catch when Blackberry 4.6 returns
+                                               // nodes that are no longer in the document #6963
+                                               if ( elem && elem.parentNode ) {
+                                                       // Handle the case where IE and Opera return items
+                                                       // by name instead of ID
+                                                       if ( elem.id === match[3] ) {
+                                                               return makeArray( [ elem ], extra );
+                                                       }
+                                                       
+                                               } else {
+                                                       return makeArray( [], extra );
+                                               }
+                                       }
+                                       
+                                       try {
+                                               return makeArray( context.querySelectorAll(query), extra );
+                                       } catch(qsaError) {}
+
+                               // qSA works strangely on Element-rooted queries
+                               // We can work around this by specifying an extra ID on the root
+                               // and working up from there (Thanks to Andrew Dupont for the technique)
+                               // IE 8 doesn't work on object elements
+                               } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+                                       var oldContext = context,
+                                               old = context.getAttribute( "id" ),
+                                               nid = old || id,
+                                               hasParent = context.parentNode,
+                                               relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+                                       if ( !old ) {
+                                               context.setAttribute( "id", nid );
+                                       } else {
+                                               nid = nid.replace( /'/g, "\\$&" );
+                                       }
+                                       if ( relativeHierarchySelector && hasParent ) {
+                                               context = context.parentNode;
+                                       }
+
+                                       try {
+                                               if ( !relativeHierarchySelector || hasParent ) {
+                                                       return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+                                               }
+
+                                       } catch(pseudoError) {
+                                       } finally {
+                                               if ( !old ) {
+                                                       oldContext.removeAttribute( "id" );
+                                               }
+                                       }
+                               }
+                       }
+               
+                       return oldSizzle(query, context, extra, seed);
+               };
+
+               for ( var prop in oldSizzle ) {
+                       Sizzle[ prop ] = oldSizzle[ prop ];
+               }
+
+               // release memory in IE
+               div = null;
+       })();
+}
+
+(function(){
+       var html = document.documentElement,
+               matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+       if ( matches ) {
+               // Check to see if it's possible to do matchesSelector
+               // on a disconnected node (IE 9 fails this)
+               var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+                       pseudoWorks = false;
+
+               try {
+                       // This should fail with an exception
+                       // Gecko does not error, returns false instead
+                       matches.call( document.documentElement, "[test!='']:sizzle" );
+       
+               } catch( pseudoError ) {
+                       pseudoWorks = true;
+               }
+
+               Sizzle.matchesSelector = function( node, expr ) {
+                       // Make sure that attribute selectors are quoted
+                       expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+                       if ( !Sizzle.isXML( node ) ) {
+                               try { 
+                                       if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+                                               var ret = matches.call( node, expr );
+
+                                               // IE 9's matchesSelector returns false on disconnected nodes
+                                               if ( ret || !disconnectedMatch ||
+                                                               // As well, disconnected nodes are said to be in a document
+                                                               // fragment in IE 9, so check for that
+                                                               node.document && node.document.nodeType !== 11 ) {
+                                                       return ret;
+                                               }
+                                       }
+                               } catch(e) {}
+                       }
+
+                       return Sizzle(expr, null, null, [node]).length > 0;
+               };
+       }
+})();
+
+(function(){
+       var div = document.createElement("div");
+
+       div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+       // Opera can't find a second classname (in 9.6)
+       // Also, make sure that getElementsByClassName actually exists
+       if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+               return;
+       }
+
+       // Safari caches class attributes, doesn't catch changes (in 3.2)
+       div.lastChild.className = "e";
+
+       if ( div.getElementsByClassName("e").length === 1 ) {
+               return;
+       }
+       
+       Expr.order.splice(1, 0, "CLASS");
+       Expr.find.CLASS = function( match, context, isXML ) {
+               if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+                       return context.getElementsByClassName(match[1]);
+               }
+       };
+
+       // release memory in IE
+       div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem.sizcache === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 && !isXML ){
+                                       elem.sizcache = doneName;
+                                       elem.sizset = i;
+                               }
+
+                               if ( elem.nodeName.toLowerCase() === cur ) {
+                                       match = elem;
+                                       break;
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+                       
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem.sizcache === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !isXML ) {
+                                               elem.sizcache = doneName;
+                                               elem.sizset = i;
+                                       }
+
+                                       if ( typeof cur !== "string" ) {
+                                               if ( elem === cur ) {
+                                                       match = true;
+                                                       break;
+                                               }
+
+                                       } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+                                               match = elem;
+                                               break;
+                                       }
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+if ( document.documentElement.contains ) {
+       Sizzle.contains = function( a, b ) {
+               return a !== b && (a.contains ? a.contains(b) : true);
+       };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+       Sizzle.contains = function( a, b ) {
+               return !!(a.compareDocumentPosition(b) & 16);
+       };
+
+} else {
+       Sizzle.contains = function() {
+               return false;
+       };
+}
+
+Sizzle.isXML = function( elem ) {
+       // documentElement is verified for cases where it doesn't yet exist
+       // (such as loading iframes in IE - #4833) 
+       var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+       return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context ) {
+       var match,
+               tmpSet = [],
+               later = "",
+               root = context.nodeType ? [context] : context;
+
+       // Position selectors must be done after the filter
+       // And so must :not(positional) so we move all PSEUDOs to the end
+       while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+               later += match[0];
+               selector = selector.replace( Expr.match.PSEUDO, "" );
+       }
+
+       selector = Expr.relative[selector] ? selector + "*" : selector;
+
+       for ( var i = 0, l = root.length; i < l; i++ ) {
+               Sizzle( selector, root[i], tmpSet );
+       }
+
+       return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+       rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+       // Note: This RegExp should be improved, or likely pulled from Sizzle
+       rmultiselector = /,/,
+       isSimple = /^.[^:#\[\.,]*$/,
+       slice = Array.prototype.slice,
+       POS = jQuery.expr.match.POS,
+       // methods guaranteed to produce a unique set when starting from a unique set
+       guaranteedUnique = {
+               children: true,
+               contents: true,
+               next: true,
+               prev: true
+       };
+
+jQuery.fn.extend({
+       find: function( selector ) {
+               var self = this,
+                       i, l;
+
+               if ( typeof selector !== "string" ) {
+                       return jQuery( selector ).filter(function() {
+                               for ( i = 0, l = self.length; i < l; i++ ) {
+                                       if ( jQuery.contains( self[ i ], this ) ) {
+                                               return true;
+                                       }
+                               }
+                       });
+               }
+
+               var ret = this.pushStack( "", "find", selector ),
+                       length, n, r;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       length = ret.length;
+                       jQuery.find( selector, this[i], ret );
+
+                       if ( i > 0 ) {
+                               // Make sure that the results are unique
+                               for ( n = length; n < ret.length; n++ ) {
+                                       for ( r = 0; r < length; r++ ) {
+                                               if ( ret[r] === ret[n] ) {
+                                                       ret.splice(n--, 1);
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       has: function( target ) {
+               var targets = jQuery( target );
+               return this.filter(function() {
+                       for ( var i = 0, l = targets.length; i < l; i++ ) {
+                               if ( jQuery.contains( this, targets[i] ) ) {
+                                       return true;
+                               }
+                       }
+               });
+       },
+
+       not: function( selector ) {
+               return this.pushStack( winnow(this, selector, false), "not", selector);
+       },
+
+       filter: function( selector ) {
+               return this.pushStack( winnow(this, selector, true), "filter", selector );
+       },
+
+       is: function( selector ) {
+               return !!selector && ( typeof selector === "string" ?
+                       jQuery.filter( selector, this ).length > 0 :
+                       this.filter( selector ).length > 0 );
+       },
+
+       closest: function( selectors, context ) {
+               var ret = [], i, l, cur = this[0];
+               
+               // Array
+               if ( jQuery.isArray( selectors ) ) {
+                       var match, selector,
+                               matches = {},
+                               level = 1;
+
+                       if ( cur && selectors.length ) {
+                               for ( i = 0, l = selectors.length; i < l; i++ ) {
+                                       selector = selectors[i];
+
+                                       if ( !matches[ selector ] ) {
+                                               matches[ selector ] = POS.test( selector ) ?
+                                                       jQuery( selector, context || this.context ) :
+                                                       selector;
+                                       }
+                               }
+
+                               while ( cur && cur.ownerDocument && cur !== context ) {
+                                       for ( selector in matches ) {
+                                               match = matches[ selector ];
+
+                                               if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
+                                                       ret.push({ selector: selector, elem: cur, level: level });
+                                               }
+                                       }
+
+                                       cur = cur.parentNode;
+                                       level++;
+                               }
+                       }
+
+                       return ret;
+               }
+
+               // String
+               var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+                               jQuery( selectors, context || this.context ) :
+                               0;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       cur = this[i];
+
+                       while ( cur ) {
+                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                                       ret.push( cur );
+                                       break;
+
+                               } else {
+                                       cur = cur.parentNode;
+                                       if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+               return this.pushStack( ret, "closest", selectors );
+       },
+
+       // Determine the position of an element within
+       // the matched set of elements
+       index: function( elem ) {
+               if ( !elem || typeof elem === "string" ) {
+                       return jQuery.inArray( this[0],
+                               // If it receives a string, the selector is used
+                               // If it receives nothing, the siblings are used
+                               elem ? jQuery( elem ) : this.parent().children() );
+               }
+               // Locate the position of the desired element
+               return jQuery.inArray(
+                       // If it receives a jQuery object, the first element is used
+                       elem.jquery ? elem[0] : elem, this );
+       },
+
+       add: function( selector, context ) {
+               var set = typeof selector === "string" ?
+                               jQuery( selector, context ) :
+                               jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+                       all = jQuery.merge( this.get(), set );
+
+               return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+                       all :
+                       jQuery.unique( all ) );
+       },
+
+       andSelf: function() {
+               return this.add( this.prevObject );
+       }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+       return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+       parent: function( elem ) {
+               var parent = elem.parentNode;
+               return parent && parent.nodeType !== 11 ? parent : null;
+       },
+       parents: function( elem ) {
+               return jQuery.dir( elem, "parentNode" );
+       },
+       parentsUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "parentNode", until );
+       },
+       next: function( elem ) {
+               return jQuery.nth( elem, 2, "nextSibling" );
+       },
+       prev: function( elem ) {
+               return jQuery.nth( elem, 2, "previousSibling" );
+       },
+       nextAll: function( elem ) {
+               return jQuery.dir( elem, "nextSibling" );
+       },
+       prevAll: function( elem ) {
+               return jQuery.dir( elem, "previousSibling" );
+       },
+       nextUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "nextSibling", until );
+       },
+       prevUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "previousSibling", until );
+       },
+       siblings: function( elem ) {
+               return jQuery.sibling( elem.parentNode.firstChild, elem );
+       },
+       children: function( elem ) {
+               return jQuery.sibling( elem.firstChild );
+       },
+       contents: function( elem ) {
+               return jQuery.nodeName( elem, "iframe" ) ?
+                       elem.contentDocument || elem.contentWindow.document :
+                       jQuery.makeArray( elem.childNodes );
+       }
+}, function( name, fn ) {
+       jQuery.fn[ name ] = function( until, selector ) {
+               var ret = jQuery.map( this, fn, until ),
+                       // The variable 'args' was introduced in
+                       // https://github.com/jquery/jquery/commit/52a0238
+                       // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
+                       // http://code.google.com/p/v8/issues/detail?id=1050
+                       args = slice.call(arguments);
+
+               if ( !runtil.test( name ) ) {
+                       selector = until;
+               }
+
+               if ( selector && typeof selector === "string" ) {
+                       ret = jQuery.filter( selector, ret );
+               }
+
+               ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+               if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+                       ret = ret.reverse();
+               }
+
+               return this.pushStack( ret, name, args.join(",") );
+       };
+});
+
+jQuery.extend({
+       filter: function( expr, elems, not ) {
+               if ( not ) {
+                       expr = ":not(" + expr + ")";
+               }
+
+               return elems.length === 1 ?
+                       jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+                       jQuery.find.matches(expr, elems);
+       },
+
+       dir: function( elem, dir, until ) {
+               var matched = [],
+                       cur = elem[ dir ];
+
+               while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+                       if ( cur.nodeType === 1 ) {
+                               matched.push( cur );
+                       }
+                       cur = cur[dir];
+               }
+               return matched;
+       },
+
+       nth: function( cur, result, dir, elem ) {
+               result = result || 1;
+               var num = 0;
+
+               for ( ; cur; cur = cur[dir] ) {
+                       if ( cur.nodeType === 1 && ++num === result ) {
+                               break;
+                       }
+               }
+
+               return cur;
+       },
+
+       sibling: function( n, elem ) {
+               var r = [];
+
+               for ( ; n; n = n.nextSibling ) {
+                       if ( n.nodeType === 1 && n !== elem ) {
+                               r.push( n );
+                       }
+               }
+
+               return r;
+       }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+       // Can't pass null or undefined to indexOf in Firefox 4
+       // Set to 0 to skip string check
+       qualifier = qualifier || 0;
+
+       if ( jQuery.isFunction( qualifier ) ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       var retVal = !!qualifier.call( elem, i, elem );
+                       return retVal === keep;
+               });
+
+       } else if ( qualifier.nodeType ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       return (elem === qualifier) === keep;
+               });
+
+       } else if ( typeof qualifier === "string" ) {
+               var filtered = jQuery.grep(elements, function( elem ) {
+                       return elem.nodeType === 1;
+               });
+
+               if ( isSimple.test( qualifier ) ) {
+                       return jQuery.filter(qualifier, filtered, !keep);
+               } else {
+                       qualifier = jQuery.filter( qualifier, filtered );
+               }
+       }
+
+       return jQuery.grep(elements, function( elem, i ) {
+               return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+       });
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+       rleadingWhitespace = /^\s+/,
+       rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+       rtagName = /<([\w:]+)/,
+       rtbody = /<tbody/i,
+       rhtml = /<|&#?\w+;/,
+       rnocache = /<(?:script|object|embed|option|style)/i,
+       // checked="checked" or checked
+       rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+       rscriptType = /\/(java|ecma)script/i,
+       wrapMap = {
+               option: [ 1, "<select multiple='multiple'>", "</select>" ],
+               legend: [ 1, "<fieldset>", "</fieldset>" ],
+               thead: [ 1, "<table>", "</table>" ],
+               tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+               td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+               col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+               area: [ 1, "<map>", "</map>" ],
+               _default: [ 0, "", "" ]
+       };
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+       wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+       text: function( text ) {
+               if ( jQuery.isFunction(text) ) {
+                       return this.each(function(i) {
+                               var self = jQuery( this );
+
+                               self.text( text.call(this, i, self.text()) );
+                       });
+               }
+
+               if ( typeof text !== "object" && text !== undefined ) {
+                       return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+               }
+
+               return jQuery.text( this );
+       },
+
+       wrapAll: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapAll( html.call(this, i) );
+                       });
+               }
+
+               if ( this[0] ) {
+                       // The elements to wrap the target around
+                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+                       if ( this[0].parentNode ) {
+                               wrap.insertBefore( this[0] );
+                       }
+
+                       wrap.map(function() {
+                               var elem = this;
+
+                               while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+                                       elem = elem.firstChild;
+                               }
+
+                               return elem;
+                       }).append( this );
+               }
+
+               return this;
+       },
+
+       wrapInner: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapInner( html.call(this, i) );
+                       });
+               }
+
+               return this.each(function() {
+                       var self = jQuery( this ),
+                               contents = self.contents();
+
+                       if ( contents.length ) {
+                               contents.wrapAll( html );
+
+                       } else {
+                               self.append( html );
+                       }
+               });
+       },
+
+       wrap: function( html ) {
+               return this.each(function() {
+                       jQuery( this ).wrapAll( html );
+               });
+       },
+
+       unwrap: function() {
+               return this.parent().each(function() {
+                       if ( !jQuery.nodeName( this, "body" ) ) {
+                               jQuery( this ).replaceWith( this.childNodes );
+                       }
+               }).end();
+       },
+
+       append: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.appendChild( elem );
+                       }
+               });
+       },
+
+       prepend: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.insertBefore( elem, this.firstChild );
+                       }
+               });
+       },
+
+       before: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this );
+                       });
+               } else if ( arguments.length ) {
+                       var set = jQuery(arguments[0]);
+                       set.push.apply( set, this.toArray() );
+                       return this.pushStack( set, "before", arguments );
+               }
+       },
+
+       after: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this.nextSibling );
+                       });
+               } else if ( arguments.length ) {
+                       var set = this.pushStack( this, "after", arguments );
+                       set.push.apply( set, jQuery(arguments[0]).toArray() );
+                       return set;
+               }
+       },
+
+       // keepData is for internal use only--do not document
+       remove: function( selector, keepData ) {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+                               if ( !keepData && elem.nodeType === 1 ) {
+                                       jQuery.cleanData( elem.getElementsByTagName("*") );
+                                       jQuery.cleanData( [ elem ] );
+                               }
+
+                               if ( elem.parentNode ) {
+                                       elem.parentNode.removeChild( elem );
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       empty: function() {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       // Remove element nodes and prevent memory leaks
+                       if ( elem.nodeType === 1 ) {
+                               jQuery.cleanData( elem.getElementsByTagName("*") );
+                       }
+
+                       // Remove any remaining nodes
+                       while ( elem.firstChild ) {
+                               elem.removeChild( elem.firstChild );
+                       }
+               }
+
+               return this;
+       },
+
+       clone: function( dataAndEvents, deepDataAndEvents ) {
+               dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+               deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+               return this.map( function () {
+                       return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+               });
+       },
+
+       html: function( value ) {
+               if ( value === undefined ) {
+                       return this[0] && this[0].nodeType === 1 ?
+                               this[0].innerHTML.replace(rinlinejQuery, "") :
+                               null;
+
+               // See if we can take a shortcut and just use innerHTML
+               } else if ( typeof value === "string" && !rnocache.test( value ) &&
+                       (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+                       !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+                       value = value.replace(rxhtmlTag, "<$1></$2>");
+
+                       try {
+                               for ( var i = 0, l = this.length; i < l; i++ ) {
+                                       // Remove element nodes and prevent memory leaks
+                                       if ( this[i].nodeType === 1 ) {
+                                               jQuery.cleanData( this[i].getElementsByTagName("*") );
+                                               this[i].innerHTML = value;
+                                       }
+                               }
+
+                       // If using innerHTML throws an exception, use the fallback method
+                       } catch(e) {
+                               this.empty().append( value );
+                       }
+
+               } else if ( jQuery.isFunction( value ) ) {
+                       this.each(function(i){
+                               var self = jQuery( this );
+
+                               self.html( value.call(this, i, self.html()) );
+                       });
+
+               } else {
+                       this.empty().append( value );
+               }
+
+               return this;
+       },
+
+       replaceWith: function( value ) {
+               if ( this[0] && this[0].parentNode ) {
+                       // Make sure that the elements are removed from the DOM before they are inserted
+                       // this can help fix replacing a parent with child elements
+                       if ( jQuery.isFunction( value ) ) {
+                               return this.each(function(i) {
+                                       var self = jQuery(this), old = self.html();
+                                       self.replaceWith( value.call( this, i, old ) );
+                               });
+                       }
+
+                       if ( typeof value !== "string" ) {
+                               value = jQuery( value ).detach();
+                       }
+
+                       return this.each(function() {
+                               var next = this.nextSibling,
+                                       parent = this.parentNode;
+
+                               jQuery( this ).remove();
+
+                               if ( next ) {
+                                       jQuery(next).before( value );
+                               } else {
+                                       jQuery(parent).append( value );
+                               }
+                       });
+               } else {
+                       return this.length ?
+                               this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+                               this;
+               }
+       },
+
+       detach: function( selector ) {
+               return this.remove( selector, true );
+       },
+
+       domManip: function( args, table, callback ) {
+               var results, first, fragment, parent,
+                       value = args[0],
+                       scripts = [];
+
+               // We can't cloneNode fragments that contain checked, in WebKit
+               if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+                       return this.each(function() {
+                               jQuery(this).domManip( args, table, callback, true );
+                       });
+               }
+
+               if ( jQuery.isFunction(value) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               args[0] = value.call(this, i, table ? self.html() : undefined);
+                               self.domManip( args, table, callback );
+                       });
+               }
+
+               if ( this[0] ) {
+                       parent = value && value.parentNode;
+
+                       // If we're in a fragment, just use that instead of building a new one
+                       if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+                               results = { fragment: parent };
+
+                       } else {
+                               results = jQuery.buildFragment( args, this, scripts );
+                       }
+
+                       fragment = results.fragment;
+
+                       if ( fragment.childNodes.length === 1 ) {
+                               first = fragment = fragment.firstChild;
+                       } else {
+                               first = fragment.firstChild;
+                       }
+
+                       if ( first ) {
+                               table = table && jQuery.nodeName( first, "tr" );
+
+                               for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+                                       callback.call(
+                                               table ?
+                                                       root(this[i], first) :
+                                                       this[i],
+                                               // Make sure that we do not leak memory by inadvertently discarding
+                                               // the original fragment (which might have attached data) instead of
+                                               // using it; in addition, use the original fragment object for the last
+                                               // item instead of first because it can end up being emptied incorrectly
+                                               // in certain situations (Bug #8070).
+                                               // Fragments from the fragment cache must always be cloned and never used
+                                               // in place.
+                                               results.cacheable || (l > 1 && i < lastIndex) ?
+                                                       jQuery.clone( fragment, true, true ) :
+                                                       fragment
+                                       );
+                               }
+                       }
+
+                       if ( scripts.length ) {
+                               jQuery.each( scripts, evalScript );
+                       }
+               }
+
+               return this;
+       }
+});
+
+function root( elem, cur ) {
+       return jQuery.nodeName(elem, "table") ?
+               (elem.getElementsByTagName("tbody")[0] ||
+               elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+               elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+       if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+               return;
+       }
+
+       var internalKey = jQuery.expando,
+               oldData = jQuery.data( src ),
+               curData = jQuery.data( dest, oldData );
+
+       // Switch to use the internal data object, if it exists, for the next
+       // stage of data copying
+       if ( (oldData = oldData[ internalKey ]) ) {
+               var events = oldData.events;
+                               curData = curData[ internalKey ] = jQuery.extend({}, oldData);
+
+               if ( events ) {
+                       delete curData.handle;
+                       curData.events = {};
+
+                       for ( var type in events ) {
+                               for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
+                                       jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
+                               }
+                       }
+               }
+       }
+}
+
+function cloneFixAttributes( src, dest ) {
+       var nodeName;
+
+       // We do not need to do anything for non-Elements
+       if ( dest.nodeType !== 1 ) {
+               return;
+       }
+
+       // clearAttributes removes the attributes, which we don't want,
+       // but also removes the attachEvent events, which we *do* want
+       if ( dest.clearAttributes ) {
+               dest.clearAttributes();
+       }
+
+       // mergeAttributes, in contrast, only merges back on the
+       // original attributes, not the events
+       if ( dest.mergeAttributes ) {
+               dest.mergeAttributes( src );
+       }
+
+       nodeName = dest.nodeName.toLowerCase();
+
+       // IE6-8 fail to clone children inside object elements that use
+       // the proprietary classid attribute value (rather than the type
+       // attribute) to identify the type of content to display
+       if ( nodeName === "object" ) {
+               dest.outerHTML = src.outerHTML;
+
+       } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+               // IE6-8 fails to persist the checked state of a cloned checkbox
+               // or radio button. Worse, IE6-7 fail to give the cloned element
+               // a checked appearance if the defaultChecked value isn't also set
+               if ( src.checked ) {
+                       dest.defaultChecked = dest.checked = src.checked;
+               }
+
+               // IE6-7 get confused and end up setting the value of a cloned
+               // checkbox/radio button to an empty string instead of "on"
+               if ( dest.value !== src.value ) {
+                       dest.value = src.value;
+               }
+
+       // IE6-8 fails to return the selected option to the default selected
+       // state when cloning options
+       } else if ( nodeName === "option" ) {
+               dest.selected = src.defaultSelected;
+
+       // IE6-8 fails to set the defaultValue to the correct value when
+       // cloning other types of input fields
+       } else if ( nodeName === "input" || nodeName === "textarea" ) {
+               dest.defaultValue = src.defaultValue;
+       }
+
+       // Event data gets referenced instead of copied if the expando
+       // gets copied too
+       dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+       var fragment, cacheable, cacheresults,
+               doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+
+       // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+       // Cloning options loses the selected state, so don't cache them
+       // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+       // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+       if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+               args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+               cacheable = true;
+
+               cacheresults = jQuery.fragments[ args[0] ];
+               if ( cacheresults && cacheresults !== 1 ) {
+                       fragment = cacheresults;
+               }
+       }
+
+       if ( !fragment ) {
+               fragment = doc.createDocumentFragment();
+               jQuery.clean( args, doc, fragment, scripts );
+       }
+
+       if ( cacheable ) {
+               jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+       }
+
+       return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+       appendTo: "append",
+       prependTo: "prepend",
+       insertBefore: "before",
+       insertAfter: "after",
+       replaceAll: "replaceWith"
+}, function( name, original ) {
+       jQuery.fn[ name ] = function( selector ) {
+               var ret = [],
+                       insert = jQuery( selector ),
+                       parent = this.length === 1 && this[0].parentNode;
+
+               if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+                       insert[ original ]( this[0] );
+                       return this;
+
+               } else {
+                       for ( var i = 0, l = insert.length; i < l; i++ ) {
+                               var elems = (i > 0 ? this.clone(true) : this).get();
+                               jQuery( insert[i] )[ original ]( elems );
+                               ret = ret.concat( elems );
+                       }
+
+                       return this.pushStack( ret, name, insert.selector );
+               }
+       };
+});
+
+function getAll( elem ) {
+       if ( "getElementsByTagName" in elem ) {
+               return elem.getElementsByTagName( "*" );
+       
+       } else if ( "querySelectorAll" in elem ) {
+               return elem.querySelectorAll( "*" );
+
+       } else {
+               return [];
+       }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+       if ( elem.type === "checkbox" || elem.type === "radio" ) {
+               elem.defaultChecked = elem.checked;
+       }
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+       if ( jQuery.nodeName( elem, "input" ) ) {
+               fixDefaultChecked( elem );
+       } else if ( elem.getElementsByTagName ) {
+               jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+       }
+}
+
+jQuery.extend({
+       clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+               var clone = elem.cloneNode(true),
+                               srcElements,
+                               destElements,
+                               i;
+
+               if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+                               (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+                       // IE copies events bound via attachEvent when using cloneNode.
+                       // Calling detachEvent on the clone will also remove the events
+                       // from the original. In order to get around this, we use some
+                       // proprietary methods to clear the events. Thanks to MooTools
+                       // guys for this hotness.
+
+                       cloneFixAttributes( elem, clone );
+
+                       // Using Sizzle here is crazy slow, so we use getElementsByTagName
+                       // instead
+                       srcElements = getAll( elem );
+                       destElements = getAll( clone );
+
+                       // Weird iteration because IE will replace the length property
+                       // with an element if you are cloning the body and one of the
+                       // elements on the page has a name or id of "length"
+                       for ( i = 0; srcElements[i]; ++i ) {
+                               cloneFixAttributes( srcElements[i], destElements[i] );
+                       }
+               }
+
+               // Copy the events from the original to the clone
+               if ( dataAndEvents ) {
+                       cloneCopyEvent( elem, clone );
+
+                       if ( deepDataAndEvents ) {
+                               srcElements = getAll( elem );
+                               destElements = getAll( clone );
+
+                               for ( i = 0; srcElements[i]; ++i ) {
+                                       cloneCopyEvent( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               // Return the cloned set
+               return clone;
+       },
+
+       clean: function( elems, context, fragment, scripts ) {
+               var checkScriptType;
+
+               context = context || document;
+
+               // !context.createElement fails in IE with an error but returns typeof 'object'
+               if ( typeof context.createElement === "undefined" ) {
+                       context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+               }
+
+               var ret = [];
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( typeof elem === "number" ) {
+                               elem += "";
+                       }
+
+                       if ( !elem ) {
+                               continue;
+                       }
+
+                       // Convert html string into DOM nodes
+                       if ( typeof elem === "string" ) {
+                               if ( !rhtml.test( elem ) ) {
+                                       elem = context.createTextNode( elem );
+                               } else {
+                                       // Fix "XHTML"-style tags in all browsers
+                                       elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+                                       // Trim whitespace, otherwise indexOf won't work as expected
+                                       var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+                                               wrap = wrapMap[ tag ] || wrapMap._default,
+                                               depth = wrap[0],
+                                               div = context.createElement("div");
+
+                                       // Go to html and back, then peel off extra wrappers
+                                       div.innerHTML = wrap[1] + elem + wrap[2];
+
+                                       // Move to the right depth
+                                       while ( depth-- ) {
+                                               div = div.lastChild;
+                                       }
+
+                                       // Remove IE's autoinserted <tbody> from table fragments
+                                       if ( !jQuery.support.tbody ) {
+
+                                               // String was a <table>, *may* have spurious <tbody>
+                                               var hasBody = rtbody.test(elem),
+                                                       tbody = tag === "table" && !hasBody ?
+                                                               div.firstChild && div.firstChild.childNodes :
+
+                                                               // String was a bare <thead> or <tfoot>
+                                                               wrap[1] === "<table>" && !hasBody ?
+                                                                       div.childNodes :
+                                                                       [];
+
+                                               for ( var j = tbody.length - 1; j >= 0 ; --j ) {
+                                                       if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+                                                               tbody[ j ].parentNode.removeChild( tbody[ j ] );
+                                                       }
+                                               }
+                                       }
+
+                                       // IE completely kills leading whitespace when innerHTML is used
+                                       if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+                                               div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+                                       }
+
+                                       elem = div.childNodes;
+                               }
+                       }
+
+                       // Resets defaultChecked for any radios and checkboxes
+                       // about to be appended to the DOM in IE 6/7 (#8060)
+                       var len;
+                       if ( !jQuery.support.appendChecked ) {
+                               if ( elem[0] && typeof (len = elem.length) === "number" ) {
+                                       for ( i = 0; i < len; i++ ) {
+                                               findInputs( elem[i] );
+                                       }
+                               } else {
+                                       findInputs( elem );
+                               }
+                       }
+
+                       if ( elem.nodeType ) {
+                               ret.push( elem );
+                       } else {
+                               ret = jQuery.merge( ret, elem );
+                       }
+               }
+
+               if ( fragment ) {
+                       checkScriptType = function( elem ) {
+                               return !elem.type || rscriptType.test( elem.type );
+                       };
+                       for ( i = 0; ret[i]; i++ ) {
+                               if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+                                       scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
+                               } else {
+                                       if ( ret[i].nodeType === 1 ) {
+                                               var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
+
+                                               ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                       }
+                                       fragment.appendChild( ret[i] );
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       cleanData: function( elems ) {
+               var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
+                       deleteExpando = jQuery.support.deleteExpando;
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+                               continue;
+                       }
+
+                       id = elem[ jQuery.expando ];
+
+                       if ( id ) {
+                               data = cache[ id ] && cache[ id ][ internalKey ];
+
+                               if ( data && data.events ) {
+                                       for ( var type in data.events ) {
+                                               if ( special[ type ] ) {
+                                                       jQuery.event.remove( elem, type );
+
+                                               // This is a shortcut to avoid jQuery.event.remove's overhead
+                                               } else {
+                                                       jQuery.removeEvent( elem, type, data.handle );
+                                               }
+                                       }
+
+                                       // Null the DOM reference to avoid IE6/7/8 leak (#7054)
+                                       if ( data.handle ) {
+                                               data.handle.elem = null;
+                                       }
+                               }
+
+                               if ( deleteExpando ) {
+                                       delete elem[ jQuery.expando ];
+
+                               } else if ( elem.removeAttribute ) {
+                                       elem.removeAttribute( jQuery.expando );
+                               }
+
+                               delete cache[ id ];
+                       }
+               }
+       }
+});
+
+function evalScript( i, elem ) {
+       if ( elem.src ) {
+               jQuery.ajax({
+                       url: elem.src,
+                       async: false,
+                       dataType: "script"
+               });
+       } else {
+               jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+       }
+
+       if ( elem.parentNode ) {
+               elem.parentNode.removeChild( elem );
+       }
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+       ropacity = /opacity=([^)]*)/,
+       rdashAlpha = /-([a-z])/ig,
+       // fixed for IE9, see #8346
+       rupper = /([A-Z]|^ms)/g,
+       rnumpx = /^-?\d+(?:px)?$/i,
+       rnum = /^-?\d/,
+       rrelNum = /^[+\-]=/,
+       rrelNumFilter = /[^+\-\.\de]+/g,
+
+       cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+       cssWidth = [ "Left", "Right" ],
+       cssHeight = [ "Top", "Bottom" ],
+       curCSS,
+
+       getComputedStyle,
+       currentStyle,
+
+       fcamelCase = function( all, letter ) {
+               return letter.toUpperCase();
+       };
+
+jQuery.fn.css = function( name, value ) {
+       // Setting 'undefined' is a no-op
+       if ( arguments.length === 2 && value === undefined ) {
+               return this;
+       }
+
+       return jQuery.access( this, name, value, true, function( elem, name, value ) {
+               return value !== undefined ?
+                       jQuery.style( elem, name, value ) :
+                       jQuery.css( elem, name );
+       });
+};
+
+jQuery.extend({
+       // Add in style property hooks for overriding the default
+       // behavior of getting and setting a style property
+       cssHooks: {
+               opacity: {
+                       get: function( elem, computed ) {
+                               if ( computed ) {
+                                       // We should always get a number back from opacity
+                                       var ret = curCSS( elem, "opacity", "opacity" );
+                                       return ret === "" ? "1" : ret;
+
+                               } else {
+                                       return elem.style.opacity;
+                               }
+                       }
+               }
+       },
+
+       // Exclude the following css properties to add px
+       cssNumber: {
+               "zIndex": true,
+               "fontWeight": true,
+               "opacity": true,
+               "zoom": true,
+               "lineHeight": true,
+               "widows": true,
+               "orphans": true
+       },
+
+       // Add in properties whose names you wish to fix before
+       // setting or getting the value
+       cssProps: {
+               // normalize float css property
+               "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+       },
+
+       // Get and set the style property on a DOM Node
+       style: function( elem, name, value, extra ) {
+               // Don't set styles on text and comment nodes
+               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                       return;
+               }
+
+               // Make sure that we're working with the right name
+               var ret, type, origName = jQuery.camelCase( name ),
+                       style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+               name = jQuery.cssProps[ origName ] || origName;
+
+               // Check if we're setting a value
+               if ( value !== undefined ) {
+                       type = typeof value;
+
+                       // Make sure that NaN and null values aren't set. See: #7116
+                       if ( type === "number" && isNaN( value ) || value == null ) {
+                               return;
+                       }
+
+                       // convert relative number strings (+= or -=) to relative numbers. #7345
+                       if ( type === "string" && rrelNum.test( value ) ) {
+                               value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
+                       }
+
+                       // If a number was passed in, add 'px' to the (except for certain CSS properties)
+                       if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+                               value += "px";
+                       }
+
+                       // If a hook was provided, use that value, otherwise just set the specified value
+                       if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+                               // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+                               // Fixes bug #5509
+                               try {
+                                       style[ name ] = value;
+                               } catch(e) {}
+                       }
+
+               } else {
+                       // If a hook was provided get the non-computed value from there
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                               return ret;
+                       }
+
+                       // Otherwise just get the value from the style object
+                       return style[ name ];
+               }
+       },
+
+       css: function( elem, name, extra ) {
+               var ret, hooks;
+
+               // Make sure that we're working with the right name
+               name = jQuery.camelCase( name );
+               hooks = jQuery.cssHooks[ name ];
+               name = jQuery.cssProps[ name ] || name;
+
+               // cssFloat needs a special treatment
+               if ( name === "cssFloat" ) {
+                       name = "float";
+               }
+
+               // If a hook was provided get the computed value from there
+               if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+                       return ret;
+
+               // Otherwise, if a way to get the computed value exists, use that
+               } else if ( curCSS ) {
+                       return curCSS( elem, name );
+               }
+       },
+
+       // A method for quickly swapping in/out CSS properties to get correct calculations
+       swap: function( elem, options, callback ) {
+               var old = {};
+
+               // Remember the old values, and insert the new ones
+               for ( var name in options ) {
+                       old[ name ] = elem.style[ name ];
+                       elem.style[ name ] = options[ name ];
+               }
+
+               callback.call( elem );
+
+               // Revert the old values
+               for ( name in options ) {
+                       elem.style[ name ] = old[ name ];
+               }
+       },
+
+       camelCase: function( string ) {
+               return string.replace( rdashAlpha, fcamelCase );
+       }
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+       jQuery.cssHooks[ name ] = {
+               get: function( elem, computed, extra ) {
+                       var val;
+
+                       if ( computed ) {
+                               if ( elem.offsetWidth !== 0 ) {
+                                       val = getWH( elem, name, extra );
+
+                               } else {
+                                       jQuery.swap( elem, cssShow, function() {
+                                               val = getWH( elem, name, extra );
+                                       });
+                               }
+
+                               if ( val <= 0 ) {
+                                       val = curCSS( elem, name, name );
+
+                                       if ( val === "0px" && currentStyle ) {
+                                               val = currentStyle( elem, name, name );
+                                       }
+
+                                       if ( val != null ) {
+                                               // Should return "auto" instead of 0, use 0 for
+                                               // temporary backwards-compat
+                                               return val === "" || val === "auto" ? "0px" : val;
+                                       }
+                               }
+
+                               if ( val < 0 || val == null ) {
+                                       val = elem.style[ name ];
+
+                                       // Should return "auto" instead of 0, use 0 for
+                                       // temporary backwards-compat
+                                       return val === "" || val === "auto" ? "0px" : val;
+                               }
+
+                               return typeof val === "string" ? val : val + "px";
+                       }
+               },
+
+               set: function( elem, value ) {
+                       if ( rnumpx.test( value ) ) {
+                               // ignore negative width and height values #1599
+                               value = parseFloat(value);
+
+                               if ( value >= 0 ) {
+                                       return value + "px";
+                               }
+
+                       } else {
+                               return value;
+                       }
+               }
+       };
+});
+
+if ( !jQuery.support.opacity ) {
+       jQuery.cssHooks.opacity = {
+               get: function( elem, computed ) {
+                       // IE uses filters for opacity
+                       return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+                               ( parseFloat( RegExp.$1 ) / 100 ) + "" :
+                               computed ? "1" : "";
+               },
+
+               set: function( elem, value ) {
+                       var style = elem.style,
+                               currentStyle = elem.currentStyle;
+
+                       // IE has trouble with opacity if it does not have layout
+                       // Force it by setting the zoom level
+                       style.zoom = 1;
+
+                       // Set the alpha filter to set the opacity
+                       var opacity = jQuery.isNaN( value ) ?
+                               "" :
+                               "alpha(opacity=" + value * 100 + ")",
+                               filter = currentStyle && currentStyle.filter || style.filter || "";
+
+                       style.filter = ralpha.test( filter ) ?
+                               filter.replace( ralpha, opacity ) :
+                               filter + " " + opacity;
+               }
+       };
+}
+
+jQuery(function() {
+       // This hook cannot be added until DOM ready because the support test
+       // for it is not run until after DOM ready
+       if ( !jQuery.support.reliableMarginRight ) {
+               jQuery.cssHooks.marginRight = {
+                       get: function( elem, computed ) {
+                               // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                               // Work around by temporarily setting element display to inline-block
+                               var ret;
+                               jQuery.swap( elem, { "display": "inline-block" }, function() {
+                                       if ( computed ) {
+                                               ret = curCSS( elem, "margin-right", "marginRight" );
+                                       } else {
+                                               ret = elem.style.marginRight;
+                                       }
+                               });
+                               return ret;
+                       }
+               };
+       }
+});
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+       getComputedStyle = function( elem, name ) {
+               var ret, defaultView, computedStyle;
+
+               name = name.replace( rupper, "-$1" ).toLowerCase();
+
+               if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+                       return undefined;
+               }
+
+               if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+                       ret = computedStyle.getPropertyValue( name );
+                       if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+                               ret = jQuery.style( elem, name );
+                       }
+               }
+
+               return ret;
+       };
+}
+
+if ( document.documentElement.currentStyle ) {
+       currentStyle = function( elem, name ) {
+               var left,
+                       ret = elem.currentStyle && elem.currentStyle[ name ],
+                       rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
+                       style = elem.style;
+
+               // From the awesome hack by Dean Edwards
+               // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+               // If we're not dealing with a regular pixel number
+               // but a number that has a weird ending, we need to convert it to pixels
+               if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+                       // Remember the original values
+                       left = style.left;
+
+                       // Put in the new values to get a computed value out
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = elem.currentStyle.left;
+                       }
+                       style.left = name === "fontSize" ? "1em" : (ret || 0);
+                       ret = style.pixelLeft + "px";
+
+                       // Revert the changed values
+                       style.left = left;
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = rsLeft;
+                       }
+               }
+
+               return ret === "" ? "auto" : ret;
+       };
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+       var which = name === "width" ? cssWidth : cssHeight,
+               val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+       if ( extra === "border" ) {
+               return val;
+       }
+
+       jQuery.each( which, function() {
+               if ( !extra ) {
+                       val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
+               }
+
+               if ( extra === "margin" ) {
+                       val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
+
+               } else {
+                       val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
+               }
+       });
+
+       return val;
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.hidden = function( elem ) {
+               var width = elem.offsetWidth,
+                       height = elem.offsetHeight;
+
+               return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+       };
+
+       jQuery.expr.filters.visible = function( elem ) {
+               return !jQuery.expr.filters.hidden( elem );
+       };
+}
+
+
+
+
+var r20 = /%20/g,
+       rbracket = /\[\]$/,
+       rCRLF = /\r?\n/g,
+       rhash = /#.*$/,
+       rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+       rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+       // #7653, #8125, #8152: local protocol detection
+       rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
+       rnoContent = /^(?:GET|HEAD)$/,
+       rprotocol = /^\/\//,
+       rquery = /\?/,
+       rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+       rselectTextarea = /^(?:select|textarea)/i,
+       rspacesAjax = /\s+/,
+       rts = /([?&])_=[^&]*/,
+       rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+       // Keep a copy of the old load method
+       _load = jQuery.fn.load,
+
+       /* Prefilters
+        * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+        * 2) These are called:
+        *    - BEFORE asking for a transport
+        *    - AFTER param serialization (s.data is a string if s.processData is true)
+        * 3) key is the dataType
+        * 4) the catchall symbol "*" can be used
+        * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+        */
+       prefilters = {},
+
+       /* Transports bindings
+        * 1) key is the dataType
+        * 2) the catchall symbol "*" can be used
+        * 3) selection will start with transport dataType and THEN go to "*" if needed
+        */
+       transports = {},
+
+       // Document location
+       ajaxLocation,
+
+       // Document location segments
+       ajaxLocParts;
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+       ajaxLocation = location.href;
+} catch( e ) {
+       // Use the href attribute of an A element
+       // since IE will modify it given document.location
+       ajaxLocation = document.createElement( "a" );
+       ajaxLocation.href = "";
+       ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+       // dataTypeExpression is optional and defaults to "*"
+       return function( dataTypeExpression, func ) {
+
+               if ( typeof dataTypeExpression !== "string" ) {
+                       func = dataTypeExpression;
+                       dataTypeExpression = "*";
+               }
+
+               if ( jQuery.isFunction( func ) ) {
+                       var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+                               i = 0,
+                               length = dataTypes.length,
+                               dataType,
+                               list,
+                               placeBefore;
+
+                       // For each dataType in the dataTypeExpression
+                       for(; i < length; i++ ) {
+                               dataType = dataTypes[ i ];
+                               // We control if we're asked to add before
+                               // any existing element
+                               placeBefore = /^\+/.test( dataType );
+                               if ( placeBefore ) {
+                                       dataType = dataType.substr( 1 ) || "*";
+                               }
+                               list = structure[ dataType ] = structure[ dataType ] || [];
+                               // then we add to the structure accordingly
+                               list[ placeBefore ? "unshift" : "push" ]( func );
+                       }
+               }
+       };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+               dataType /* internal */, inspected /* internal */ ) {
+
+       dataType = dataType || options.dataTypes[ 0 ];
+       inspected = inspected || {};
+
+       inspected[ dataType ] = true;
+
+       var list = structure[ dataType ],
+               i = 0,
+               length = list ? list.length : 0,
+               executeOnly = ( structure === prefilters ),
+               selection;
+
+       for(; i < length && ( executeOnly || !selection ); i++ ) {
+               selection = list[ i ]( options, originalOptions, jqXHR );
+               // If we got redirected to another dataType
+               // we try there if executing only and not done already
+               if ( typeof selection === "string" ) {
+                       if ( !executeOnly || inspected[ selection ] ) {
+                               selection = undefined;
+                       } else {
+                               options.dataTypes.unshift( selection );
+                               selection = inspectPrefiltersOrTransports(
+                                               structure, options, originalOptions, jqXHR, selection, inspected );
+                       }
+               }
+       }
+       // If we're only executing or nothing was selected
+       // we try the catchall dataType if not done already
+       if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+               selection = inspectPrefiltersOrTransports(
+                               structure, options, originalOptions, jqXHR, "*", inspected );
+       }
+       // unnecessary when only executing (prefilters)
+       // but it'll be ignored by the caller in that case
+       return selection;
+}
+
+jQuery.fn.extend({
+       load: function( url, params, callback ) {
+               if ( typeof url !== "string" && _load ) {
+                       return _load.apply( this, arguments );
+
+               // Don't do a request if no elements are being requested
+               } else if ( !this.length ) {
+                       return this;
+               }
+
+               var off = url.indexOf( " " );
+               if ( off >= 0 ) {
+                       var selector = url.slice( off, url.length );
+                       url = url.slice( 0, off );
+               }
+
+               // Default to a GET request
+               var type = "GET";
+
+               // If the second parameter was provided
+               if ( params ) {
+                       // If it's a function
+                       if ( jQuery.isFunction( params ) ) {
+                               // We assume that it's the callback
+                               callback = params;
+                               params = undefined;
+
+                       // Otherwise, build a param string
+                       } else if ( typeof params === "object" ) {
+                               params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+                               type = "POST";
+                       }
+               }
+
+               var self = this;
+
+               // Request the remote document
+               jQuery.ajax({
+                       url: url,
+                       type: type,
+                       dataType: "html",
+                       data: params,
+                       // Complete callback (responseText is used internally)
+                       complete: function( jqXHR, status, responseText ) {
+                               // Store the response as specified by the jqXHR object
+                               responseText = jqXHR.responseText;
+                               // If successful, inject the HTML into all the matched elements
+                               if ( jqXHR.isResolved() ) {
+                                       // #4825: Get the actual response in case
+                                       // a dataFilter is present in ajaxSettings
+                                       jqXHR.done(function( r ) {
+                                               responseText = r;
+                                       });
+                                       // See if a selector was specified
+                                       self.html( selector ?
+                                               // Create a dummy div to hold the results
+                                               jQuery("<div>")
+                                                       // inject the contents of the document in, removing the scripts
+                                                       // to avoid any 'Permission Denied' errors in IE
+                                                       .append(responseText.replace(rscript, ""))
+
+                                                       // Locate the specified elements
+                                                       .find(selector) :
+
+                                               // If not, just inject the full result
+                                               responseText );
+                               }
+
+                               if ( callback ) {
+                                       self.each( callback, [ responseText, status, jqXHR ] );
+                               }
+                       }
+               });
+
+               return this;
+       },
+
+       serialize: function() {
+               return jQuery.param( this.serializeArray() );
+       },
+
+       serializeArray: function() {
+               return this.map(function(){
+                       return this.elements ? jQuery.makeArray( this.elements ) : this;
+               })
+               .filter(function(){
+                       return this.name && !this.disabled &&
+                               ( this.checked || rselectTextarea.test( this.nodeName ) ||
+                                       rinput.test( this.type ) );
+               })
+               .map(function( i, elem ){
+                       var val = jQuery( this ).val();
+
+                       return val == null ?
+                               null :
+                               jQuery.isArray( val ) ?
+                                       jQuery.map( val, function( val, i ){
+                                               return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+                                       }) :
+                                       { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+               }).get();
+       }
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+       jQuery.fn[ o ] = function( f ){
+               return this.bind( o, f );
+       };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+       jQuery[ method ] = function( url, data, callback, type ) {
+               // shift arguments if data argument was omitted
+               if ( jQuery.isFunction( data ) ) {
+                       type = type || callback;
+                       callback = data;
+                       data = undefined;
+               }
+
+               return jQuery.ajax({
+                       type: method,
+                       url: url,
+                       data: data,
+                       success: callback,
+                       dataType: type
+               });
+       };
+});
+
+jQuery.extend({
+
+       getScript: function( url, callback ) {
+               return jQuery.get( url, undefined, callback, "script" );
+       },
+
+       getJSON: function( url, data, callback ) {
+               return jQuery.get( url, data, callback, "json" );
+       },
+
+       // Creates a full fledged settings object into target
+       // with both ajaxSettings and settings fields.
+       // If target is omitted, writes into ajaxSettings.
+       ajaxSetup: function ( target, settings ) {
+               if ( !settings ) {
+                       // Only one parameter, we extend ajaxSettings
+                       settings = target;
+                       target = jQuery.extend( true, jQuery.ajaxSettings, settings );
+               } else {
+                       // target was provided, we extend into it
+                       jQuery.extend( true, target, jQuery.ajaxSettings, settings );
+               }
+               // Flatten fields we don't want deep extended
+               for( var field in { context: 1, url: 1 } ) {
+                       if ( field in settings ) {
+                               target[ field ] = settings[ field ];
+                       } else if( field in jQuery.ajaxSettings ) {
+                               target[ field ] = jQuery.ajaxSettings[ field ];
+                       }
+               }
+               return target;
+       },
+
+       ajaxSettings: {
+               url: ajaxLocation,
+               isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+               global: true,
+               type: "GET",
+               contentType: "application/x-www-form-urlencoded",
+               processData: true,
+               async: true,
+               /*
+               timeout: 0,
+               data: null,
+               dataType: null,
+               username: null,
+               password: null,
+               cache: null,
+               traditional: false,
+               headers: {},
+               */
+
+               accepts: {
+                       xml: "application/xml, text/xml",
+                       html: "text/html",
+                       text: "text/plain",
+                       json: "application/json, text/javascript",
+                       "*": "*/*"
+               },
+
+               contents: {
+                       xml: /xml/,
+                       html: /html/,
+                       json: /json/
+               },
+
+               responseFields: {
+                       xml: "responseXML",
+                       text: "responseText"
+               },
+
+               // List of data converters
+               // 1) key format is "source_type destination_type" (a single space in-between)
+               // 2) the catchall symbol "*" can be used for source_type
+               converters: {
+
+                       // Convert anything to text
+                       "* text": window.String,
+
+                       // Text to html (true = no transformation)
+                       "text html": true,
+
+                       // Evaluate text as a json expression
+                       "text json": jQuery.parseJSON,
+
+                       // Parse text as xml
+                       "text xml": jQuery.parseXML
+               }
+       },
+
+       ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+       ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+       // Main method
+       ajax: function( url, options ) {
+
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
+                       options = url;
+                       url = undefined;
+               }
+
+               // Force options to be an object
+               options = options || {};
+
+               var // Create the final options object
+                       s = jQuery.ajaxSetup( {}, options ),
+                       // Callbacks context
+                       callbackContext = s.context || s,
+                       // Context for global events
+                       // It's the callbackContext if one was provided in the options
+                       // and if it's a DOM node or a jQuery collection
+                       globalEventContext = callbackContext !== s &&
+                               ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+                                               jQuery( callbackContext ) : jQuery.event,
+                       // Deferreds
+                       deferred = jQuery.Deferred(),
+                       completeDeferred = jQuery._Deferred(),
+                       // Status-dependent callbacks
+                       statusCode = s.statusCode || {},
+                       // ifModified key
+                       ifModifiedKey,
+                       // Headers (they are sent all at once)
+                       requestHeaders = {},
+                       requestHeadersNames = {},
+                       // Response headers
+                       responseHeadersString,
+                       responseHeaders,
+                       // transport
+                       transport,
+                       // timeout handle
+                       timeoutTimer,
+                       // Cross-domain detection vars
+                       parts,
+                       // The jqXHR state
+                       state = 0,
+                       // To know if global events are to be dispatched
+                       fireGlobals,
+                       // Loop variable
+                       i,
+                       // Fake xhr
+                       jqXHR = {
+
+                               readyState: 0,
+
+                               // Caches the header
+                               setRequestHeader: function( name, value ) {
+                                       if ( !state ) {
+                                               var lname = name.toLowerCase();
+                                               name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+                                               requestHeaders[ name ] = value;
+                                       }
+                                       return this;
+                               },
+
+                               // Raw string
+                               getAllResponseHeaders: function() {
+                                       return state === 2 ? responseHeadersString : null;
+                               },
+
+                               // Builds headers hashtable if needed
+                               getResponseHeader: function( key ) {
+                                       var match;
+                                       if ( state === 2 ) {
+                                               if ( !responseHeaders ) {
+                                                       responseHeaders = {};
+                                                       while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                               responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+                                                       }
+                                               }
+                                               match = responseHeaders[ key.toLowerCase() ];
+                                       }
+                                       return match === undefined ? null : match;
+                               },
+
+                               // Overrides response content-type header
+                               overrideMimeType: function( type ) {
+                                       if ( !state ) {
+                                               s.mimeType = type;
+                                       }
+                                       return this;
+                               },
+
+                               // Cancel the request
+                               abort: function( statusText ) {
+                                       statusText = statusText || "abort";
+                                       if ( transport ) {
+                                               transport.abort( statusText );
+                                       }
+                                       done( 0, statusText );
+                                       return this;
+                               }
+                       };
+
+               // Callback for when everything is done
+               // It is defined here because jslint complains if it is declared
+               // at the end of the function (which would be more logical and readable)
+               function done( status, statusText, responses, headers ) {
+
+                       // Called once
+                       if ( state === 2 ) {
+                               return;
+                       }
+
+                       // State is "done" now
+                       state = 2;
+
+                       // Clear timeout if it exists
+                       if ( timeoutTimer ) {
+                               clearTimeout( timeoutTimer );
+                       }
+
+                       // Dereference transport for early garbage collection
+                       // (no matter how long the jqXHR object will be used)
+                       transport = undefined;
+
+                       // Cache response headers
+                       responseHeadersString = headers || "";
+
+                       // Set readyState
+                       jqXHR.readyState = status ? 4 : 0;
+
+                       var isSuccess,
+                               success,
+                               error,
+                               response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+                               lastModified,
+                               etag;
+
+                       // If successful, handle type chaining
+                       if ( status >= 200 && status < 300 || status === 304 ) {
+
+                               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                               if ( s.ifModified ) {
+
+                                       if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+                                               jQuery.lastModified[ ifModifiedKey ] = lastModified;
+                                       }
+                                       if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+                                               jQuery.etag[ ifModifiedKey ] = etag;
+                                       }
+                               }
+
+                               // If not modified
+                               if ( status === 304 ) {
+
+                                       statusText = "notmodified";
+                                       isSuccess = true;
+
+                               // If we have data
+                               } else {
+
+                                       try {
+                                               success = ajaxConvert( s, response );
+                                               statusText = "success";
+                                               isSuccess = true;
+                                       } catch(e) {
+                                               // We have a parsererror
+                                               statusText = "parsererror";
+                                               error = e;
+                                       }
+                               }
+                       } else {
+                               // We extract error from statusText
+                               // then normalize statusText and status for non-aborts
+                               error = statusText;
+                               if( !statusText || status ) {
+                                       statusText = "error";
+                                       if ( status < 0 ) {
+                                               status = 0;
+                                       }
+                               }
+                       }
+
+                       // Set data for the fake xhr object
+                       jqXHR.status = status;
+                       jqXHR.statusText = statusText;
+
+                       // Success/Error
+                       if ( isSuccess ) {
+                               deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                       } else {
+                               deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                       }
+
+                       // Status-dependent callbacks
+                       jqXHR.statusCode( statusCode );
+                       statusCode = undefined;
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+                                               [ jqXHR, s, isSuccess ? success : error ] );
+                       }
+
+                       // Complete
+                       completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxComplete", [ jqXHR, s] );
+                               // Handle the global AJAX counter
+                               if ( !( --jQuery.active ) ) {
+                                       jQuery.event.trigger( "ajaxStop" );
+                               }
+                       }
+               }
+
+               // Attach deferreds
+               deferred.promise( jqXHR );
+               jqXHR.success = jqXHR.done;
+               jqXHR.error = jqXHR.fail;
+               jqXHR.complete = completeDeferred.done;
+
+               // Status-dependent callbacks
+               jqXHR.statusCode = function( map ) {
+                       if ( map ) {
+                               var tmp;
+                               if ( state < 2 ) {
+                                       for( tmp in map ) {
+                                               statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+                                       }
+                               } else {
+                                       tmp = map[ jqXHR.status ];
+                                       jqXHR.then( tmp, tmp );
+                               }
+                       }
+                       return this;
+               };
+
+               // Remove hash character (#7531: and string promotion)
+               // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+               // We also use the url parameter if available
+               s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+               // Extract dataTypes list
+               s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+               // Determine if a cross-domain request is in order
+               if ( s.crossDomain == null ) {
+                       parts = rurl.exec( s.url.toLowerCase() );
+                       s.crossDomain = !!( parts &&
+                               ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+                                       ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+                                               ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+                       );
+               }
+
+               // Convert data if not already a string
+               if ( s.data && s.processData && typeof s.data !== "string" ) {
+                       s.data = jQuery.param( s.data, s.traditional );
+               }
+
+               // Apply prefilters
+               inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+               // If request was aborted inside a prefiler, stop there
+               if ( state === 2 ) {
+                       return false;
+               }
+
+               // We can fire global events as of now if asked to
+               fireGlobals = s.global;
+
+               // Uppercase the type
+               s.type = s.type.toUpperCase();
+
+               // Determine if request has content
+               s.hasContent = !rnoContent.test( s.type );
+
+               // Watch for a new set of requests
+               if ( fireGlobals && jQuery.active++ === 0 ) {
+                       jQuery.event.trigger( "ajaxStart" );
+               }
+
+               // More options handling for requests with no content
+               if ( !s.hasContent ) {
+
+                       // If data is available, append data to url
+                       if ( s.data ) {
+                               s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+                       }
+
+                       // Get ifModifiedKey before adding the anti-cache parameter
+                       ifModifiedKey = s.url;
+
+                       // Add anti-cache in url if needed
+                       if ( s.cache === false ) {
+
+                               var ts = jQuery.now(),
+                                       // try replacing _= if it is there
+                                       ret = s.url.replace( rts, "$1_=" + ts );
+
+                               // if nothing was replaced, add timestamp to the end
+                               s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+                       }
+               }
+
+               // Set the correct header, if data is being sent
+               if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+                       jqXHR.setRequestHeader( "Content-Type", s.contentType );
+               }
+
+               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+               if ( s.ifModified ) {
+                       ifModifiedKey = ifModifiedKey || s.url;
+                       if ( jQuery.lastModified[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+                       }
+                       if ( jQuery.etag[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+                       }
+               }
+
+               // Set the Accepts header for the server, depending on the dataType
+               jqXHR.setRequestHeader(
+                       "Accept",
+                       s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+                               s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
+                               s.accepts[ "*" ]
+               );
+
+               // Check for headers option
+               for ( i in s.headers ) {
+                       jqXHR.setRequestHeader( i, s.headers[ i ] );
+               }
+
+               // Allow custom headers/mimetypes and early abort
+               if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+                               // Abort if not done already
+                               jqXHR.abort();
+                               return false;
+
+               }
+
+               // Install callbacks on deferreds
+               for ( i in { success: 1, error: 1, complete: 1 } ) {
+                       jqXHR[ i ]( s[ i ] );
+               }
+
+               // Get transport
+               transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+               // If no transport, we auto-abort
+               if ( !transport ) {
+                       done( -1, "No Transport" );
+               } else {
+                       jqXHR.readyState = 1;
+                       // Send global event
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+                       }
+                       // Timeout
+                       if ( s.async && s.timeout > 0 ) {
+                               timeoutTimer = setTimeout( function(){
+                                       jqXHR.abort( "timeout" );
+                               }, s.timeout );
+                       }
+
+                       try {
+                               state = 1;
+                               transport.send( requestHeaders, done );
+                       } catch (e) {
+                               // Propagate exception as error if not done
+                               if ( status < 2 ) {
+                                       done( -1, e );
+                               // Simply rethrow otherwise
+                               } else {
+                                       jQuery.error( e );
+                               }
+                       }
+               }
+
+               return jqXHR;
+       },
+
+       // Serialize an array of form elements or a set of
+       // key/values into a query string
+       param: function( a, traditional ) {
+               var s = [],
+                       add = function( key, value ) {
+                               // If value is a function, invoke it and return its value
+                               value = jQuery.isFunction( value ) ? value() : value;
+                               s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+                       };
+
+               // Set traditional to true for jQuery <= 1.3.2 behavior.
+               if ( traditional === undefined ) {
+                       traditional = jQuery.ajaxSettings.traditional;
+               }
+
+               // If an array was passed in, assume that it is an array of form elements.
+               if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+                       // Serialize the form elements
+                       jQuery.each( a, function() {
+                               add( this.name, this.value );
+                       });
+
+               } else {
+                       // If traditional, encode the "old" way (the way 1.3.2 or older
+                       // did it), otherwise encode params recursively.
+                       for ( var prefix in a ) {
+                               buildParams( prefix, a[ prefix ], traditional, add );
+                       }
+               }
+
+               // Return the resulting serialization
+               return s.join( "&" ).replace( r20, "+" );
+       }
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+       if ( jQuery.isArray( obj ) ) {
+               // Serialize array item.
+               jQuery.each( obj, function( i, v ) {
+                       if ( traditional || rbracket.test( prefix ) ) {
+                               // Treat each array item as a scalar.
+                               add( prefix, v );
+
+                       } else {
+                               // If array item is non-scalar (array or object), encode its
+                               // numeric index to resolve deserialization ambiguity issues.
+                               // Note that rack (as of 1.0.0) can't currently deserialize
+                               // nested arrays properly, and attempting to do so may cause
+                               // a server error. Possible fixes are to modify rack's
+                               // deserialization algorithm or to provide an option or flag
+                               // to force array serialization to be shallow.
+                               buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+                       }
+               });
+
+       } else if ( !traditional && obj != null && typeof obj === "object" ) {
+               // Serialize object item.
+               for ( var name in obj ) {
+                       buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+               }
+
+       } else {
+               // Serialize scalar item.
+               add( prefix, obj );
+       }
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+       // Counter for holding the number of active queries
+       active: 0,
+
+       // Last-Modified header cache for next request
+       lastModified: {},
+       etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+       var contents = s.contents,
+               dataTypes = s.dataTypes,
+               responseFields = s.responseFields,
+               ct,
+               type,
+               finalDataType,
+               firstDataType;
+
+       // Fill responseXXX fields
+       for( type in responseFields ) {
+               if ( type in responses ) {
+                       jqXHR[ responseFields[type] ] = responses[ type ];
+               }
+       }
+
+       // Remove auto dataType and get content-type in the process
+       while( dataTypes[ 0 ] === "*" ) {
+               dataTypes.shift();
+               if ( ct === undefined ) {
+                       ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+               }
+       }
+
+       // Check if we're dealing with a known content-type
+       if ( ct ) {
+               for ( type in contents ) {
+                       if ( contents[ type ] && contents[ type ].test( ct ) ) {
+                               dataTypes.unshift( type );
+                               break;
+                       }
+               }
+       }
+
+       // Check to see if we have a response for the expected dataType
+       if ( dataTypes[ 0 ] in responses ) {
+               finalDataType = dataTypes[ 0 ];
+       } else {
+               // Try convertible dataTypes
+               for ( type in responses ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+                               finalDataType = type;
+                               break;
+                       }
+                       if ( !firstDataType ) {
+                               firstDataType = type;
+                       }
+               }
+               // Or just use first one
+               finalDataType = finalDataType || firstDataType;
+       }
+
+       // If we found a dataType
+       // We add the dataType to the list if needed
+       // and return the corresponding response
+       if ( finalDataType ) {
+               if ( finalDataType !== dataTypes[ 0 ] ) {
+                       dataTypes.unshift( finalDataType );
+               }
+               return responses[ finalDataType ];
+       }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+       // Apply the dataFilter if provided
+       if ( s.dataFilter ) {
+               response = s.dataFilter( response, s.dataType );
+       }
+
+       var dataTypes = s.dataTypes,
+               converters = {},
+               i,
+               key,
+               length = dataTypes.length,
+               tmp,
+               // Current and previous dataTypes
+               current = dataTypes[ 0 ],
+               prev,
+               // Conversion expression
+               conversion,
+               // Conversion function
+               conv,
+               // Conversion functions (transitive conversion)
+               conv1,
+               conv2;
+
+       // For each dataType in the chain
+       for( i = 1; i < length; i++ ) {
+
+               // Create converters map
+               // with lowercased keys
+               if ( i === 1 ) {
+                       for( key in s.converters ) {
+                               if( typeof key === "string" ) {
+                                       converters[ key.toLowerCase() ] = s.converters[ key ];
+                               }
+                       }
+               }
+
+               // Get the dataTypes
+               prev = current;
+               current = dataTypes[ i ];
+
+               // If current is auto dataType, update it to prev
+               if( current === "*" ) {
+                       current = prev;
+               // If no auto and dataTypes are actually different
+               } else if ( prev !== "*" && prev !== current ) {
+
+                       // Get the converter
+                       conversion = prev + " " + current;
+                       conv = converters[ conversion ] || converters[ "* " + current ];
+
+                       // If there is no direct converter, search transitively
+                       if ( !conv ) {
+                               conv2 = undefined;
+                               for( conv1 in converters ) {
+                                       tmp = conv1.split( " " );
+                                       if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+                                               conv2 = converters[ tmp[1] + " " + current ];
+                                               if ( conv2 ) {
+                                                       conv1 = converters[ conv1 ];
+                                                       if ( conv1 === true ) {
+                                                               conv = conv2;
+                                                       } else if ( conv2 === true ) {
+                                                               conv = conv1;
+                                                       }
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+                       // If we found no converter, dispatch an error
+                       if ( !( conv || conv2 ) ) {
+                               jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+                       }
+                       // If found converter is not an equivalence
+                       if ( conv !== true ) {
+                               // Convert with 1 or 2 converters accordingly
+                               response = conv ? conv( response ) : conv2( conv1(response) );
+                       }
+               }
+       }
+       return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+       jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+       jsonp: "callback",
+       jsonpCallback: function() {
+               return jQuery.expando + "_" + ( jsc++ );
+       }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+       var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
+               ( typeof s.data === "string" );
+
+       if ( s.dataTypes[ 0 ] === "jsonp" ||
+               s.jsonp !== false && ( jsre.test( s.url ) ||
+                               inspectData && jsre.test( s.data ) ) ) {
+
+               var responseContainer,
+                       jsonpCallback = s.jsonpCallback =
+                               jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+                       previous = window[ jsonpCallback ],
+                       url = s.url,
+                       data = s.data,
+                       replace = "$1" + jsonpCallback + "$2";
+
+               if ( s.jsonp !== false ) {
+                       url = url.replace( jsre, replace );
+                       if ( s.url === url ) {
+                               if ( inspectData ) {
+                                       data = data.replace( jsre, replace );
+                               }
+                               if ( s.data === data ) {
+                                       // Add callback manually
+                                       url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+                               }
+                       }
+               }
+
+               s.url = url;
+               s.data = data;
+
+               // Install callback
+               window[ jsonpCallback ] = function( response ) {
+                       responseContainer = [ response ];
+               };
+
+               // Clean-up function
+               jqXHR.always(function() {
+                       // Set callback back to previous value
+                       window[ jsonpCallback ] = previous;
+                       // Call if it was a function and we have a response
+                       if ( responseContainer && jQuery.isFunction( previous ) ) {
+                               window[ jsonpCallback ]( responseContainer[ 0 ] );
+                       }
+               });
+
+               // Use data converter to retrieve json after script execution
+               s.converters["script json"] = function() {
+                       if ( !responseContainer ) {
+                               jQuery.error( jsonpCallback + " was not called" );
+                       }
+                       return responseContainer[ 0 ];
+               };
+
+               // force json dataType
+               s.dataTypes[ 0 ] = "json";
+
+               // Delegate to script
+               return "script";
+       }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+       accepts: {
+               script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+       },
+       contents: {
+               script: /javascript|ecmascript/
+       },
+       converters: {
+               "text script": function( text ) {
+                       jQuery.globalEval( text );
+                       return text;
+               }
+       }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+       if ( s.cache === undefined ) {
+               s.cache = false;
+       }
+       if ( s.crossDomain ) {
+               s.type = "GET";
+               s.global = false;
+       }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+       // This transport only deals with cross domain requests
+       if ( s.crossDomain ) {
+
+               var script,
+                       head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+               return {
+
+                       send: function( _, callback ) {
+
+                               script = document.createElement( "script" );
+
+                               script.async = "async";
+
+                               if ( s.scriptCharset ) {
+                                       script.charset = s.scriptCharset;
+                               }
+
+                               script.src = s.url;
+
+                               // Attach handlers for all browsers
+                               script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+                                       if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+                                               // Handle memory leak in IE
+                                               script.onload = script.onreadystatechange = null;
+
+                                               // Remove the script
+                                               if ( head && script.parentNode ) {
+                                                       head.removeChild( script );
+                                               }
+
+                                               // Dereference the script
+                                               script = undefined;
+
+                                               // Callback if not abort
+                                               if ( !isAbort ) {
+                                                       callback( 200, "success" );
+                                               }
+                                       }
+                               };
+                               // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                               // This arises when a base node is used (#2709 and #4378).
+                               head.insertBefore( script, head.firstChild );
+                       },
+
+                       abort: function() {
+                               if ( script ) {
+                                       script.onload( 0, 1 );
+                               }
+                       }
+               };
+       }
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+       xhrOnUnloadAbort = window.ActiveXObject ? function() {
+               // Abort all pending requests
+               for ( var key in xhrCallbacks ) {
+                       xhrCallbacks[ key ]( 0, 1 );
+               }
+       } : false,
+       xhrId = 0,
+       xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+       try {
+               return new window.XMLHttpRequest();
+       } catch( e ) {}
+}
+
+function createActiveXHR() {
+       try {
+               return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+       } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+       /* Microsoft failed to properly
+        * implement the XMLHttpRequest in IE7 (can't request local files),
+        * so we use the ActiveXObject when it is available
+        * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+        * we need a fallback.
+        */
+       function() {
+               return !this.isLocal && createStandardXHR() || createActiveXHR();
+       } :
+       // For all other browsers, use the standard XMLHttpRequest object
+       createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+       jQuery.extend( jQuery.support, {
+               ajax: !!xhr,
+               cors: !!xhr && ( "withCredentials" in xhr )
+       });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+       jQuery.ajaxTransport(function( s ) {
+               // Cross domain only allowed if supported through XMLHttpRequest
+               if ( !s.crossDomain || jQuery.support.cors ) {
+
+                       var callback;
+
+                       return {
+                               send: function( headers, complete ) {
+
+                                       // Get a new xhr
+                                       var xhr = s.xhr(),
+                                               handle,
+                                               i;
+
+                                       // Open the socket
+                                       // Passing null username, generates a login popup on Opera (#2865)
+                                       if ( s.username ) {
+                                               xhr.open( s.type, s.url, s.async, s.username, s.password );
+                                       } else {
+                                               xhr.open( s.type, s.url, s.async );
+                                       }
+
+                                       // Apply custom fields if provided
+                                       if ( s.xhrFields ) {
+                                               for ( i in s.xhrFields ) {
+                                                       xhr[ i ] = s.xhrFields[ i ];
+                                               }
+                                       }
+
+                                       // Override mime type if needed
+                                       if ( s.mimeType && xhr.overrideMimeType ) {
+                                               xhr.overrideMimeType( s.mimeType );
+                                       }
+
+                                       // X-Requested-With header
+                                       // For cross-domain requests, seeing as conditions for a preflight are
+                                       // akin to a jigsaw puzzle, we simply never set it to be sure.
+                                       // (it can always be set on a per-request basis or even using ajaxSetup)
+                                       // For same-domain requests, won't change header if already provided.
+                                       if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+                                               headers[ "X-Requested-With" ] = "XMLHttpRequest";
+                                       }
+
+                                       // Need an extra try/catch for cross domain requests in Firefox 3
+                                       try {
+                                               for ( i in headers ) {
+                                                       xhr.setRequestHeader( i, headers[ i ] );
+                                               }
+                                       } catch( _ ) {}
+
+                                       // Do send the request
+                                       // This may raise an exception which is actually
+                                       // handled in jQuery.ajax (so no try/catch here)
+                                       xhr.send( ( s.hasContent && s.data ) || null );
+
+                                       // Listener
+                                       callback = function( _, isAbort ) {
+
+                                               var status,
+                                                       statusText,
+                                                       responseHeaders,
+                                                       responses,
+                                                       xml;
+
+                                               // Firefox throws exceptions when accessing properties
+                                               // of an xhr when a network error occured
+                                               // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+                                               try {
+
+                                                       // Was never called and is aborted or complete
+                                                       if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+                                                               // Only called once
+                                                               callback = undefined;
+
+                                                               // Do not keep as active anymore
+                                                               if ( handle ) {
+                                                                       xhr.onreadystatechange = jQuery.noop;
+                                                                       if ( xhrOnUnloadAbort ) {
+                                                                               delete xhrCallbacks[ handle ];
+                                                                       }
+                                                               }
+
+                                                               // If it's an abort
+                                                               if ( isAbort ) {
+                                                                       // Abort it manually if needed
+                                                                       if ( xhr.readyState !== 4 ) {
+                                                                               xhr.abort();
+                                                                       }
+                                                               } else {
+                                                                       status = xhr.status;
+                                                                       responseHeaders = xhr.getAllResponseHeaders();
+                                                                       responses = {};
+                                                                       xml = xhr.responseXML;
+
+                                                                       // Construct response list
+                                                                       if ( xml && xml.documentElement /* #4958 */ ) {
+                                                                               responses.xml = xml;
+                                                                       }
+                                                                       responses.text = xhr.responseText;
+
+                                                                       // Firefox throws an exception when accessing
+                                                                       // statusText for faulty cross-domain requests
+                                                                       try {
+                                                                               statusText = xhr.statusText;
+                                                                       } catch( e ) {
+                                                                               // We normalize with Webkit giving an empty statusText
+                                                                               statusText = "";
+                                                                       }
+
+                                                                       // Filter status for non standard behaviors
+
+                                                                       // If the request is local and we have data: assume a success
+                                                                       // (success with no data won't get notified, that's the best we
+                                                                       // can do given current implementations)
+                                                                       if ( !status && s.isLocal && !s.crossDomain ) {
+                                                                               status = responses.text ? 200 : 404;
+                                                                       // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                       } else if ( status === 1223 ) {
+                                                                               status = 204;
+                                                                       }
+                                                               }
+                                                       }
+                                               } catch( firefoxAccessException ) {
+                                                       if ( !isAbort ) {
+                                                               complete( -1, firefoxAccessException );
+                                                       }
+                                               }
+
+                                               // Call complete if needed
+                                               if ( responses ) {
+                                                       complete( status, statusText, responses, responseHeaders );
+                                               }
+                                       };
+
+                                       // if we're in sync mode or it's in cache
+                                       // and has been retrieved directly (IE6 & IE7)
+                                       // we need to manually fire the callback
+                                       if ( !s.async || xhr.readyState === 4 ) {
+                                               callback();
+                                       } else {
+                                               handle = ++xhrId;
+                                               if ( xhrOnUnloadAbort ) {
+                                                       // Create the active xhrs callbacks list if needed
+                                                       // and attach the unload handler
+                                                       if ( !xhrCallbacks ) {
+                                                               xhrCallbacks = {};
+                                                               jQuery( window ).unload( xhrOnUnloadAbort );
+                                                       }
+                                                       // Add to list of active xhrs callbacks
+                                                       xhrCallbacks[ handle ] = callback;
+                                               }
+                                               xhr.onreadystatechange = callback;
+                                       }
+                               },
+
+                               abort: function() {
+                                       if ( callback ) {
+                                               callback(0,1);
+                                       }
+                               }
+                       };
+               }
+       });
+}
+
+
+
+
+var elemdisplay = {},
+       iframe, iframeDoc,
+       rfxtypes = /^(?:toggle|show|hide)$/,
+       rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+       timerId,
+       fxAttrs = [
+               // height animations
+               [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+               // width animations
+               [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+               // opacity animations
+               [ "opacity" ]
+       ],
+       fxNow,
+       requestAnimationFrame = window.webkitRequestAnimationFrame ||
+           window.mozRequestAnimationFrame ||
+           window.oRequestAnimationFrame;
+
+jQuery.fn.extend({
+       show: function( speed, easing, callback ) {
+               var elem, display;
+
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("show", 3), speed, easing, callback);
+
+               } else {
+                       for ( var i = 0, j = this.length; i < j; i++ ) {
+                               elem = this[i];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       // Reset the inline display of this element to learn if it is
+                                       // being hidden by cascaded rules or not
+                                       if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+                                               display = elem.style.display = "";
+                                       }
+
+                                       // Set elements which have been overridden with display: none
+                                       // in a stylesheet to whatever the default browser style is
+                                       // for such an element
+                                       if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+                                               jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+                                       }
+                               }
+                       }
+
+                       // Set the display of most of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               elem = this[i];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       if ( display === "" || display === "none" ) {
+                                               elem.style.display = jQuery._data(elem, "olddisplay") || "";
+                                       }
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       hide: function( speed, easing, callback ) {
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("hide", 3), speed, easing, callback);
+
+               } else {
+                       for ( var i = 0, j = this.length; i < j; i++ ) {
+                               if ( this[i].style ) {
+                                       var display = jQuery.css( this[i], "display" );
+
+                                       if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
+                                               jQuery._data( this[i], "olddisplay", display );
+                                       }
+                               }
+                       }
+
+                       // Set the display of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               if ( this[i].style ) {
+                                       this[i].style.display = "none";
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       // Save the old toggle function
+       _toggle: jQuery.fn.toggle,
+
+       toggle: function( fn, fn2, callback ) {
+               var bool = typeof fn === "boolean";
+
+               if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+                       this._toggle.apply( this, arguments );
+
+               } else if ( fn == null || bool ) {
+                       this.each(function() {
+                               var state = bool ? fn : jQuery(this).is(":hidden");
+                               jQuery(this)[ state ? "show" : "hide" ]();
+                       });
+
+               } else {
+                       this.animate(genFx("toggle", 3), fn, fn2, callback);
+               }
+
+               return this;
+       },
+
+       fadeTo: function( speed, to, easing, callback ) {
+               return this.filter(":hidden").css("opacity", 0).show().end()
+                                       .animate({opacity: to}, speed, easing, callback);
+       },
+
+       animate: function( prop, speed, easing, callback ) {
+               var optall = jQuery.speed(speed, easing, callback);
+
+               if ( jQuery.isEmptyObject( prop ) ) {
+                       return this.each( optall.complete, [ false ] );
+               }
+
+               return this[ optall.queue === false ? "each" : "queue" ](function() {
+                       // XXX 'this' does not always have a nodeName when running the
+                       // test suite
+
+                       if ( optall.queue === false ) {
+                               jQuery._mark( this );
+                       }
+
+                       var opt = jQuery.extend({}, optall),
+                               isElement = this.nodeType === 1,
+                               hidden = isElement && jQuery(this).is(":hidden"),
+                               name, val, p,
+                               display, e,
+                               parts, start, end, unit;
+
+                       // will store per property easing and be used to determine when an animation is complete
+                       opt.animatedProperties = {};
+
+                       for ( p in prop ) {
+
+                               // property name normalization
+                               name = jQuery.camelCase( p );
+                               if ( p !== name ) {
+                                       prop[ name ] = prop[ p ];
+                                       delete prop[ p ];
+                               }
+
+                               val = prop[name];
+
+                               if ( val === "hide" && hidden || val === "show" && !hidden ) {
+                                       return opt.complete.call(this);
+                               }
+
+                               if ( isElement && ( name === "height" || name === "width" ) ) {
+                                       // Make sure that nothing sneaks out
+                                       // Record all 3 overflow attributes because IE does not
+                                       // change the overflow attribute when overflowX and
+                                       // overflowY are set to the same value
+                                       opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+                                       // Set display property to inline-block for height/width
+                                       // animations on inline elements that are having width/height
+                                       // animated
+                                       if ( jQuery.css( this, "display" ) === "inline" &&
+                                                       jQuery.css( this, "float" ) === "none" ) {
+                                               if ( !jQuery.support.inlineBlockNeedsLayout ) {
+                                                       this.style.display = "inline-block";
+
+                                               } else {
+                                                       display = defaultDisplay(this.nodeName);
+
+                                                       // inline-level elements accept inline-block;
+                                                       // block-level elements need to be inline with layout
+                                                       if ( display === "inline" ) {
+                                                               this.style.display = "inline-block";
+
+                                                       } else {
+                                                               this.style.display = "inline";
+                                                               this.style.zoom = 1;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+                               opt.animatedProperties[name] = jQuery.isArray( val ) ?
+                                       val[1]:
+                                       opt.specialEasing && opt.specialEasing[name] || opt.easing || 'swing';
+                       }
+
+                       if ( opt.overflow != null ) {
+                               this.style.overflow = "hidden";
+                       }
+
+                       for ( p in prop ) {
+                               e = new jQuery.fx( this, opt, p );
+
+                               val = prop[p];
+
+                               if ( rfxtypes.test(val) ) {
+                                       e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
+
+                               } else {
+                                       parts = rfxnum.exec(val);
+                                       start = e.cur();
+
+                                       if ( parts ) {
+                                               end = parseFloat( parts[2] );
+                                               unit = parts[3] || ( jQuery.cssNumber[ name ] ? "" : "px" );
+
+                                               // We need to compute starting value
+                                               if ( unit !== "px" ) {
+                                                       jQuery.style( this, p, (end || 1) + unit);
+                                                       start = ((end || 1) / e.cur()) * start;
+                                                       jQuery.style( this, p, start + unit);
+                                               }
+
+                                               // If a +=/-= token was provided, we're doing a relative animation
+                                               if ( parts[1] ) {
+                                                       end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
+                                               }
+
+                                               e.custom( start, end, unit );
+
+                                       } else {
+                                               e.custom( start, val, "" );
+                                       }
+                               }
+                       }
+
+                       // For JS strict compliance
+                       return true;
+               });
+       },
+
+       stop: function( clearQueue, gotoEnd ) {
+               if ( clearQueue ) {
+                       this.queue([]);
+               }
+
+               this.each(function() {
+                       var timers = jQuery.timers,
+                               i = timers.length;
+                       // clear marker counters if we know they won't be
+                       if ( !gotoEnd ) {
+                               jQuery._unmark( true, this );
+                       }
+                       // go in reverse order so anything added to the queue during the loop is ignored
+                       while ( i-- ) {
+                               if ( timers[i].elem === this ) {
+                                       if (gotoEnd) {
+                                               // force the next step to be the last
+                                               timers[i](true);
+                                       }
+
+                                       timers.splice(i, 1);
+                               }
+                       }
+               });
+
+               // start the next in the queue if the last step wasn't forced
+               if ( !gotoEnd ) {
+                       this.dequeue();
+               }
+
+               return this;
+       }
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+       setTimeout( clearFxNow, 0 );
+       return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+       fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+       var obj = {};
+
+       jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+               obj[ this ] = type;
+       });
+
+       return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+       slideDown: genFx("show", 1),
+       slideUp: genFx("hide", 1),
+       slideToggle: genFx("toggle", 1),
+       fadeIn: { opacity: "show" },
+       fadeOut: { opacity: "hide" },
+       fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return this.animate( props, speed, easing, callback );
+       };
+});
+
+jQuery.extend({
+       speed: function( speed, easing, fn ) {
+               var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
+                       complete: fn || !fn && easing ||
+                               jQuery.isFunction( speed ) && speed,
+                       duration: speed,
+                       easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+               };
+
+               opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+                       opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+               // Queueing
+               opt.old = opt.complete;
+               opt.complete = function( noUnmark ) {
+                       if ( opt.queue !== false ) {
+                               jQuery.dequeue( this );
+                       } else if ( noUnmark !== false ) {
+                               jQuery._unmark( this );
+                       }
+
+                       if ( jQuery.isFunction( opt.old ) ) {
+                               opt.old.call( this );
+                       }
+               };
+
+               return opt;
+       },
+
+       easing: {
+               linear: function( p, n, firstNum, diff ) {
+                       return firstNum + diff * p;
+               },
+               swing: function( p, n, firstNum, diff ) {
+                       return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
+               }
+       },
+
+       timers: [],
+
+       fx: function( elem, options, prop ) {
+               this.options = options;
+               this.elem = elem;
+               this.prop = prop;
+
+               options.orig = options.orig || {};
+       }
+
+});
+
+jQuery.fx.prototype = {
+       // Simple function for setting a style value
+       update: function() {
+               if ( this.options.step ) {
+                       this.options.step.call( this.elem, this.now, this );
+               }
+
+               (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
+       },
+
+       // Get the current size
+       cur: function() {
+               if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+                       return this.elem[ this.prop ];
+               }
+
+               var parsed,
+                       r = jQuery.css( this.elem, this.prop );
+               // Empty strings, null, undefined and "auto" are converted to 0,
+               // complex values such as "rotate(1rad)" are returned as is,
+               // simple values such as "10px" are parsed to Float.
+               return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+       },
+
+       // Start an animation from one number to another
+       custom: function( from, to, unit ) {
+               var self = this,
+                       fx = jQuery.fx,
+                       raf;
+
+               this.startTime = fxNow || createFxNow();
+               this.start = from;
+               this.end = to;
+               this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+               this.now = this.start;
+               this.pos = this.state = 0;
+
+               function t( gotoEnd ) {
+                       return self.step(gotoEnd);
+               }
+
+               t.elem = this.elem;
+
+               if ( t() && jQuery.timers.push(t) && !timerId ) {
+                       // Use requestAnimationFrame instead of setInterval if available
+                       if ( requestAnimationFrame ) {
+                               timerId = 1;
+                               raf = function() {
+                                       // When timerId gets set to null at any point, this stops
+                                       if ( timerId ) {
+                                               requestAnimationFrame( raf );
+                                               fx.tick();
+                                       }
+                               };
+                               requestAnimationFrame( raf );
+                       } else {
+                               timerId = setInterval( fx.tick, fx.interval );
+                       }
+               }
+       },
+
+       // Simple 'show' function
+       show: function() {
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+               this.options.show = true;
+
+               // Begin the animation
+               // Make sure that we start at a small width/height to avoid any
+               // flash of content
+               this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
+
+               // Start by showing the element
+               jQuery( this.elem ).show();
+       },
+
+       // Simple 'hide' function
+       hide: function() {
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+               this.options.hide = true;
+
+               // Begin the animation
+               this.custom(this.cur(), 0);
+       },
+
+       // Each step of an animation
+       step: function( gotoEnd ) {
+               var t = fxNow || createFxNow(),
+                       done = true,
+                       elem = this.elem,
+                       options = this.options,
+                       i, n;
+
+               if ( gotoEnd || t >= options.duration + this.startTime ) {
+                       this.now = this.end;
+                       this.pos = this.state = 1;
+                       this.update();
+
+                       options.animatedProperties[ this.prop ] = true;
+
+                       for ( i in options.animatedProperties ) {
+                               if ( options.animatedProperties[i] !== true ) {
+                                       done = false;
+                               }
+                       }
+
+                       if ( done ) {
+                               // Reset the overflow
+                               if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+                                       jQuery.each( [ "", "X", "Y" ], function (index, value) {
+                                               elem.style[ "overflow" + value ] = options.overflow[index];
+                                       });
+                               }
+
+                               // Hide the element if the "hide" operation was done
+                               if ( options.hide ) {
+                                       jQuery(elem).hide();
+                               }
+
+                               // Reset the properties, if the item has been hidden or shown
+                               if ( options.hide || options.show ) {
+                                       for ( var p in options.animatedProperties ) {
+                                               jQuery.style( elem, p, options.orig[p] );
+                                       }
+                               }
+
+                               // Execute the complete function
+                               options.complete.call( elem );
+                       }
+
+                       return false;
+
+               } else {
+                       // classical easing cannot be used with an Infinity duration
+                       if ( options.duration == Infinity ) {
+                               this.now = t;
+                       } else {
+                               n = t - this.startTime;
+
+                               this.state = n / options.duration;
+                               // Perform the easing function, defaults to swing
+                               this.pos = jQuery.easing[options.animatedProperties[this.prop]](this.state, n, 0, 1, options.duration);
+                               this.now = this.start + ((this.end - this.start) * this.pos);
+                       }
+                       // Perform the next step of the animation
+                       this.update();
+               }
+
+               return true;
+       }
+};
+
+jQuery.extend( jQuery.fx, {
+       tick: function() {
+               var timers = jQuery.timers,
+                       i = timers.length;
+               while ( i-- ) {
+                       if ( !timers[i]() ) {
+                               timers.splice(i, 1);
+                       }
+               }
+
+               if ( !timers.length ) {
+                       jQuery.fx.stop();
+               }
+       },
+
+       interval: 13,
+
+       stop: function() {
+               clearInterval( timerId );
+               timerId = null;
+       },
+
+       speeds: {
+               slow: 600,
+               fast: 200,
+               // Default speed
+               _default: 400
+       },
+
+       step: {
+               opacity: function( fx ) {
+                       jQuery.style( fx.elem, "opacity", fx.now );
+               },
+
+               _default: function( fx ) {
+                       if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+                               fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+                       } else {
+                               fx.elem[ fx.prop ] = fx.now;
+                       }
+               }
+       }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.animated = function( elem ) {
+               return jQuery.grep(jQuery.timers, function( fn ) {
+                       return elem === fn.elem;
+               }).length;
+       };
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+       if ( !elemdisplay[ nodeName ] ) {
+
+               var elem = jQuery( "<" + nodeName + ">" ).appendTo( "body" ),
+                       display = elem.css( "display" );
+
+               elem.remove();
+
+               // If the simple way fails,
+               // get element's real default display by attaching it to a temp iframe
+               if ( display === "none" || display === "" ) {
+                       // No iframe to use yet, so create it
+                       if ( !iframe ) {
+                               iframe = document.createElement( "iframe" );
+                               iframe.frameBorder = iframe.width = iframe.height = 0;
+                       }
+
+                       document.body.appendChild( iframe );
+
+                       // Create a cacheable copy of the iframe document on first call.
+                       // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake html
+                       // document to it, Webkit & Firefox won't allow reusing the iframe document
+                       if ( !iframeDoc || !iframe.createElement ) {
+                               iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+                               iframeDoc.write( "<!doctype><html><body></body></html>" );
+                       }
+
+                       elem = iframeDoc.createElement( nodeName );
+
+                       iframeDoc.body.appendChild( elem );
+
+                       display = jQuery.css( elem, "display" );
+
+                       document.body.removeChild( iframe );
+               }
+
+               // Store the correct default display
+               elemdisplay[ nodeName ] = display;
+       }
+
+       return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+       rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+       jQuery.fn.offset = function( options ) {
+               var elem = this[0], box;
+
+               if ( options ) {
+                       return this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+               }
+
+               if ( !elem || !elem.ownerDocument ) {
+                       return null;
+               }
+
+               if ( elem === elem.ownerDocument.body ) {
+                       return jQuery.offset.bodyOffset( elem );
+               }
+
+               try {
+                       box = elem.getBoundingClientRect();
+               } catch(e) {}
+
+               var doc = elem.ownerDocument,
+                       docElem = doc.documentElement;
+
+               // Make sure we're not dealing with a disconnected DOM node
+               if ( !box || !jQuery.contains( docElem, elem ) ) {
+                       return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+               }
+
+               var body = doc.body,
+                       win = getWindow(doc),
+                       clientTop  = docElem.clientTop  || body.clientTop  || 0,
+                       clientLeft = docElem.clientLeft || body.clientLeft || 0,
+                       scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+                       scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+                       top  = box.top  + scrollTop  - clientTop,
+                       left = box.left + scrollLeft - clientLeft;
+
+               return { top: top, left: left };
+       };
+
+} else {
+       jQuery.fn.offset = function( options ) {
+               var elem = this[0];
+
+               if ( options ) {
+                       return this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+               }
+
+               if ( !elem || !elem.ownerDocument ) {
+                       return null;
+               }
+
+               if ( elem === elem.ownerDocument.body ) {
+                       return jQuery.offset.bodyOffset( elem );
+               }
+
+               jQuery.offset.initialize();
+
+               var computedStyle,
+                       offsetParent = elem.offsetParent,
+                       prevOffsetParent = elem,
+                       doc = elem.ownerDocument,
+                       docElem = doc.documentElement,
+                       body = doc.body,
+                       defaultView = doc.defaultView,
+                       prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+                       top = elem.offsetTop,
+                       left = elem.offsetLeft;
+
+               while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+                       if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+                               break;
+                       }
+
+                       computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+                       top  -= elem.scrollTop;
+                       left -= elem.scrollLeft;
+
+                       if ( elem === offsetParent ) {
+                               top  += elem.offsetTop;
+                               left += elem.offsetLeft;
+
+                               if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+                                       top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                                       left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                               }
+
+                               prevOffsetParent = offsetParent;
+                               offsetParent = elem.offsetParent;
+                       }
+
+                       if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+                               top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                               left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                       }
+
+                       prevComputedStyle = computedStyle;
+               }
+
+               if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+                       top  += body.offsetTop;
+                       left += body.offsetLeft;
+               }
+
+               if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+                       top  += Math.max( docElem.scrollTop, body.scrollTop );
+                       left += Math.max( docElem.scrollLeft, body.scrollLeft );
+               }
+
+               return { top: top, left: left };
+       };
+}
+
+jQuery.offset = {
+       initialize: function() {
+               var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
+                       html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+
+               jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+               container.innerHTML = html;
+               body.insertBefore( container, body.firstChild );
+               innerDiv = container.firstChild;
+               checkDiv = innerDiv.firstChild;
+               td = innerDiv.nextSibling.firstChild.firstChild;
+
+               this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+               this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+               checkDiv.style.position = "fixed";
+               checkDiv.style.top = "20px";
+
+               // safari subtracts parent border width here which is 5px
+               this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+               checkDiv.style.position = checkDiv.style.top = "";
+
+               innerDiv.style.overflow = "hidden";
+               innerDiv.style.position = "relative";
+
+               this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+               this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+               body.removeChild( container );
+               jQuery.offset.initialize = jQuery.noop;
+       },
+
+       bodyOffset: function( body ) {
+               var top = body.offsetTop,
+                       left = body.offsetLeft;
+
+               jQuery.offset.initialize();
+
+               if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+                       top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+                       left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+               }
+
+               return { top: top, left: left };
+       },
+
+       setOffset: function( elem, options, i ) {
+               var position = jQuery.css( elem, "position" );
+
+               // set position first, in-case top/left are set even on static elem
+               if ( position === "static" ) {
+                       elem.style.position = "relative";
+               }
+
+               var curElem = jQuery( elem ),
+                       curOffset = curElem.offset(),
+                       curCSSTop = jQuery.css( elem, "top" ),
+                       curCSSLeft = jQuery.css( elem, "left" ),
+                       calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+                       props = {}, curPosition = {}, curTop, curLeft;
+
+               // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+               if ( calculatePosition ) {
+                       curPosition = curElem.position();
+                       curTop = curPosition.top;
+                       curLeft = curPosition.left;
+               } else {
+                       curTop = parseFloat( curCSSTop ) || 0;
+                       curLeft = parseFloat( curCSSLeft ) || 0;
+               }
+
+               if ( jQuery.isFunction( options ) ) {
+                       options = options.call( elem, i, curOffset );
+               }
+
+               if (options.top != null) {
+                       props.top = (options.top - curOffset.top) + curTop;
+               }
+               if (options.left != null) {
+                       props.left = (options.left - curOffset.left) + curLeft;
+               }
+
+               if ( "using" in options ) {
+                       options.using.call( elem, props );
+               } else {
+                       curElem.css( props );
+               }
+       }
+};
+
+
+jQuery.fn.extend({
+       position: function() {
+               if ( !this[0] ) {
+                       return null;
+               }
+
+               var elem = this[0],
+
+               // Get *real* offsetParent
+               offsetParent = this.offsetParent(),
+
+               // Get correct offsets
+               offset       = this.offset(),
+               parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+               // Subtract element margins
+               // note: when an element has margin: auto the offsetLeft and marginLeft
+               // are the same in Safari causing offset.left to incorrectly be 0
+               offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+               offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+               // Add offsetParent borders
+               parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+               parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+               // Subtract the two offsets
+               return {
+                       top:  offset.top  - parentOffset.top,
+                       left: offset.left - parentOffset.left
+               };
+       },
+
+       offsetParent: function() {
+               return this.map(function() {
+                       var offsetParent = this.offsetParent || document.body;
+                       while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+                               offsetParent = offsetParent.offsetParent;
+                       }
+                       return offsetParent;
+               });
+       }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+       var method = "scroll" + name;
+
+       jQuery.fn[ method ] = function( val ) {
+               var elem, win;
+
+               if ( val === undefined ) {
+                       elem = this[ 0 ];
+
+                       if ( !elem ) {
+                               return null;
+                       }
+
+                       win = getWindow( elem );
+
+                       // Return the scroll offset
+                       return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+                               jQuery.support.boxModel && win.document.documentElement[ method ] ||
+                                       win.document.body[ method ] :
+                               elem[ method ];
+               }
+
+               // Set the scroll offset
+               return this.each(function() {
+                       win = getWindow( this );
+
+                       if ( win ) {
+                               win.scrollTo(
+                                       !i ? val : jQuery( win ).scrollLeft(),
+                                        i ? val : jQuery( win ).scrollTop()
+                               );
+
+                       } else {
+                               this[ method ] = val;
+                       }
+               });
+       };
+});
+
+function getWindow( elem ) {
+       return jQuery.isWindow( elem ) ?
+               elem :
+               elem.nodeType === 9 ?
+                       elem.defaultView || elem.parentWindow :
+                       false;
+}
+
+
+
+
+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+       var type = name.toLowerCase();
+
+       // innerHeight and innerWidth
+       jQuery.fn["inner" + name] = function() {
+               return this[0] ?
+                       parseFloat( jQuery.css( this[0], type, "padding" ) ) :
+                       null;
+       };
+
+       // outerHeight and outerWidth
+       jQuery.fn["outer" + name] = function( margin ) {
+               return this[0] ?
+                       parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
+                       null;
+       };
+
+       jQuery.fn[ type ] = function( size ) {
+               // Get window width or height
+               var elem = this[0];
+               if ( !elem ) {
+                       return size == null ? null : this;
+               }
+
+               if ( jQuery.isFunction( size ) ) {
+                       return this.each(function( i ) {
+                               var self = jQuery( this );
+                               self[ type ]( size.call( this, i, self[ type ]() ) );
+                       });
+               }
+
+               if ( jQuery.isWindow( elem ) ) {
+                       // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+                       // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+                       var docElemProp = elem.document.documentElement[ "client" + name ];
+                       return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+                               elem.document.body[ "client" + name ] || docElemProp;
+
+               // Get document width or height
+               } else if ( elem.nodeType === 9 ) {
+                       // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+                       return Math.max(
+                               elem.documentElement["client" + name],
+                               elem.body["scroll" + name], elem.documentElement["scroll" + name],
+                               elem.body["offset" + name], elem.documentElement["offset" + name]
+                       );
+
+               // Get or set width or height on the element
+               } else if ( size === undefined ) {
+                       var orig = jQuery.css( elem, type ),
+                               ret = parseFloat( orig );
+
+                       return jQuery.isNaN( ret ) ? orig : ret;
+
+               // Set the width or height on the element (default to pixels if value is unitless)
+               } else {
+                       return this.css( type, typeof size === "string" ? size : size + "px" );
+               }
+       };
+
+});
+
+
+window.jQuery = window.$ = jQuery;
+})(window);
diff --git a/www/plugins/crayons/js/jquery.px.js b/www/plugins/crayons/js/jquery.px.js
new file mode 100644 (file)
index 0000000..e6c195d
--- /dev/null
@@ -0,0 +1,18 @@
+// Ce plugin permet de recuperer css(fontSize) en px meme sous MSIE
+(function($){
+       $.fn.px = function(prop) {
+               var val;
+               if($.browser.msie) {
+                       $('<span><\/span>')
+                       .css({display: 'block', width: '1em'})
+                       .appendTo(this[0])
+                       .each(function(){
+                               val = parseInt($(this).width()) + 'px';
+                       })
+                       .remove();
+               } else {
+                       val = this.css(prop);
+               }
+               return val;
+       };
+})(jQuery);
diff --git a/www/plugins/crayons/js/resizehandle.js b/www/plugins/crayons/js/resizehandle.js
new file mode 100644 (file)
index 0000000..686647f
--- /dev/null
@@ -0,0 +1,32 @@
+(function($){
+/*
+ * resizehandle.js (c) Fil 2007-2011, plugin pour jQuery
+ * @ http://www.jquery.info/spip.php?article44
+ * Distribue sous licence GNU/LGPL et MIT
+ */
+$.fn.resizehandle = function() {
+  return this.each(function() {
+    var me = $(this);
+    me.after(
+      $('<div class="resizehandle"></div>')
+      .css({height:'16px',width:Math.max(me.width()-4,10)}) // bug MSIE si 100%
+      .bind('mousedown', function(e) {
+        var h = me.height();
+        var y = e.clientY;
+        var moveHandler = function(e) {
+          me
+          .height(Math.max(20, e.clientY + h - y));
+        };
+        var upHandler = function(e) {
+          $('html')
+          .unbind('mousemove',moveHandler)
+          .unbind('mouseup',upHandler);
+        };
+        $('html')
+        .bind('mousemove', moveHandler)
+        .bind('mouseup', upHandler);
+      })
+    );
+  });
+};
+})(jQuery);
diff --git a/www/plugins/crayons/js/uploader.js.html b/www/plugins/crayons/js/uploader.js.html
new file mode 100644 (file)
index 0000000..5bcca93
--- /dev/null
@@ -0,0 +1,70 @@
+<script>\r
+// activer l'uploader\r
+(function($) {\r
+       var url = '[(#VAL{crayons_upload}|generer_url_action{id=#ENV{id_article}&type=article, true, true})]';\r
+\r
+       $('textarea.crayon-active,#uploader#ENV{id_article}')\r
+       .html5Uploader({\r
+               name: 'upss',\r
+               postUrl: url,\r
+               onClientLoadStart: function(e, file) {\r
+                       file.mark = 'up'+Math.ceil(10000000*Math.random());\r
+                       $('<li>lecture de '+file.name+'...</li>')\r
+                       .addClass('loading')\r
+                       .attr('id', file.mark)\r
+                       .prependTo('#uploader_liste')\r
+                       ;\r
+               },\r
+               onClientLoad: function(e, file) {\r
+                       $('#uploader#ENV{id_article}')\r
+                       .removeClass('hover');\r
+               },\r
+               onServerProgress: function(e,file) {\r
+                       var percent = '';\r
+                       if(e.lengthComputable)\r
+                               percent = ''+Math.ceil(100*e.loaded/e.total)+'%';\r
+                       $('#'+file.mark)\r
+                       .html('envoi de '+file.name+' vers le serveur... '+percent);\r
+               },\r
+               onServerReadyStateChange: function(e,file) {\r
+                       if (e.target.responseText) {\r
+                               // traiter la reponse du serveur\r
+                               // todo: la passer en JSON si on veut\r
+                               $('#'+file.mark)\r
+                               .html(e.target.responseText);\r
+                       }\r
+               },\r
+               onServerLoad: function(e,file) {\r
+                       $('#'+file.mark)\r
+                       .removeClass('loading')\r
+                       .addClass('ok');\r
+               },\r
+       })\r
+       .bind("dragenter dragover", function() {\r
+               $(this).addClass('hover');\r
+               $('#uploader#ENV{id_article}')\r
+               .removeClass('ferme');\r
+       })\r
+       .bind("dragleave", function() {\r
+               $(this).removeClass('hover');\r
+               $('#uploader#ENV{id_article}')\r
+               .addClass('ferme');\r
+       })\r
+       .bind("drop", function(e) {\r
+               $(this)\r
+               .removeClass('hover');\r
+               $('#uploader#ENV{id_article}')\r
+               .removeClass('ferme');\r
+       })\r
+       .addClass('uploader')\r
+       ;\r
+       $('#uploader#ENV{id_article}')\r
+       .hover(function() {\r
+               $(this).removeClass('ferme');\r
+       }, function() {\r
+               $(this).addClass('ferme');\r
+       });\r
+\r
+})(cQuery);\r
+\r
+</script>
\ No newline at end of file
diff --git a/www/plugins/crayons/lang/crayons.xml b/www/plugins/crayons/lang/crayons.xml
new file mode 100644 (file)
index 0000000..c3e0647
--- /dev/null
@@ -0,0 +1,38 @@
+<traduction module="crayons" gestionnaire="salvatore" url="http://trad.spip.net" source="svn://zone.spip.org/spip-zone/_plugins_/crayons/lang/" reference="fr">
+       <langue code="ast" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=ast">
+               <traducteur nom="Xuacu" lien="http://trad.spip.net/auteur/xuacu" />
+       </langue>
+       <langue code="ca" />
+       <langue code="de" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=de">
+               <traducteur nom="klaus++" lien="http://trad.spip.net/auteur/klaus" />
+       </langue>
+       <langue code="en" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=en">
+               <traducteur nom="kent1" lien="http://trad.spip.net/auteur/kent1" />
+               <traducteur nom="Paolo" lien="http://trad.spip.net/auteur/paolo" />
+       </langue>
+       <langue code="es" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=es">
+               <traducteur nom="dani" lien="http://trad.spip.net/auteur/dani" />
+               <traducteur nom="severo" lien="http://trad.spip.net/auteur/severo" />
+       </langue>
+       <langue code="fa" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=fa">
+               <traducteur nom="Davood Hossein" lien="http://trad.spip.net/auteur/davood-hossein" />
+       </langue>
+       <langue code="fr" />
+       <langue code="fr_tu" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=fr_tu">
+               <traducteur nom="beatnick" lien="http://trad.spip.net/auteur/beatnick" />
+       </langue>
+       <langue code="it" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=it">
+               <traducteur nom="Fil" lien="http://trad.spip.net/auteur/fil" />
+       </langue>
+       <langue code="nl" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=nl">
+               <traducteur nom="mpossoz" lien="http://trad.spip.net/auteur/mpossoz" />
+               <traducteur nom="Suske" lien="http://trad.spip.net/auteur/suske" />
+       </langue>
+       <langue code="ru" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=ru">
+               <traducteur nom="Serge Markitanenko" lien="http://trad.spip.net/auteur/serge-markitanenko" />
+       </langue>
+       <langue code="sk" url="http://trad.spip.net/tradlang_module/crayons?lang_cible=sk">
+               <traducteur nom="jaro" lien="http://trad.spip.net/auteur/jaro" />
+       </langue>
+       <langue code="zh" />
+</traduction>
diff --git a/www/plugins/crayons/lang/crayons_ar.php b/www/plugins/crayons/lang/crayons_ar.php
new file mode 100644 (file)
index 0000000..59b37dc
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'إلغاء',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'عدّل سابقاً',
+       'donnees_mal_formatees' => 'تنسيق بيانات غير سليم',
+
+       // E
+       'editer' => 'تحرير',
+       'editer_@type@_@id@' => 'تحرير @type@ @id@ بالكامل',
+       'editer_tout' => 'تحرير الكل',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'عدّل في مكان آخر',
+
+       // N
+       'non_autorise' => 'غير مسموح',
+       'non_implemente' => 'غير مدعوم',
+
+       // P
+       'pas_de_modification' => 'لم تدخل اي تعديلات',
+       'pas_de_valeur' => 'لا توجد قيمة',
+
+       // S
+       'sauvegarder' => 'حفظ التعديلات؟',
+       'svp_copier_coller' => 'عذراً، قم بنسخ التعديلات ولصقها وإعادة المحاولة',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'الرجاء الانتظار...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_ast.php b/www/plugins/crayons/lang/crayons_ast.php
new file mode 100644 (file)
index 0000000..ce512a9
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=ast
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Hai otru complementu que torga l\'usu del portaplumes nel espaciu públicu.',
+       'annuler' => 'Anular',
+
+       // B
+       'bouton_supprimer' => 'Desaniciar',
+
+       // D
+       'deja_modifie' => 'Ya ta modificao',
+       'donnees_mal_formatees' => 'Datos mal formateaos',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ dafechu',
+       'editer_tout' => 'Editalo ensembre',
+       'effets' => 'Efeutos',
+       'explication_exec_autorise' => 'Páxines que se permite camudar
+  (?exec=...) : (, pa xebrar los exec).', # MODIF
+       'explication_introduction_article' => 'La introducción d\'un artículu amuesa la descripción del artículu, sinón amuesa los sos primeros 600 caráuteres (la entrada siguía pol testu).',
+       'explication_reduire_logo' => 'Amenorgar el logo si pasa del
+  tamañu máximu indicáu en pixels. Exemplu: 100. (0 = enxamás)', # MODIF
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => '¿Activar la barra tipográfica nos llápices?',
+       'label_activer_crayons_prive' => 'Activar los llápices pa la parte privada.',
+       'label_barre_typo' => 'Barra tipográfica',
+       'label_clickhide' => 'Calcar una vegada per fuera anubre los llápices',
+       'label_effets' => 'Esbilla de los efeutos',
+       'label_espaceprive' => '¿Llápices nel espaciu priváu?',
+       'label_exec_autorise' => 'Páxines autorizaes',
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Escoyer un mensaxe',
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si nun hai cambeos',
+       'label_reduire_logo' => 'Amenorgar los logos',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'Dilir',
+       'legend_controleur_hyperlien' => 'Hiperenllaz',
+       'legend_controleur_logo' => 'Escoyer un logo:',
+       'legend_controleur_logo_remplacer' => 'Trocar esti logo',
+       'legend_controleur_qui' => '¿Quién?',
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'Editar l\'espaciu priváu (esperimental)',
+       'legend_introduction_article' => 'Testu introductoriu del artículu',
+
+       // M
+       'message_image_obligatoire' => 'Hai qu\'escoyer una imaxe',
+       'messages' => 'Mensaxes',
+       'modifie_par_ailleurs' => 'Modificao n\'otru llau',
+
+       // N
+       'non_autorise' => 'Non autorizao',
+       'non_implemente' => 'Ensin implementar',
+
+       // P
+       'pas_de_modification' => 'Ensin modificación',
+       'pas_de_valeur' => 'Ensin valor',
+
+       // S
+       'sauvegarder' => '¿Guardar les modificaciones?',
+       'svp_copier_coller' => 'Sentimoslo, copia/pega los cambéos y torna a entamar',
+
+       // T
+       'titre_config_crayons' => 'Configurar los llápices',
+       'titre_crayons' => 'Llápices',
+
+       // U
+       'update_impossible' => 'Falló l\'anovación.',
+
+       // V
+       'veuillez_patienter' => 'Un momentu...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_br.php b/www/plugins/crayons/lang/crayons_br.php
new file mode 100644 (file)
index 0000000..1d5b6b7
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Nullañ',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Bet kemmet c\'hoazh',
+       'donnees_mal_formatees' => 'Stumm fall gant an titouroù',
+
+       // E
+       'editer' => 'Embann',
+       'editer_@type@_@id@' => 'Embann @type@ @id@ a-bezh',
+       'editer_tout' => 'Embann pep tra',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Kemmet e mod all',
+
+       // N
+       'non_autorise' => 'Ket aotreet',
+       'non_implemente' => 'Ket lakaet e-barzh',
+
+       // P
+       'pas_de_modification' => 'Kemm ebet',
+       'pas_de_valeur' => 'Talvoud ebet',
+
+       // S
+       'sauvegarder' => 'Saveteiñ ar c\'hemmoù ?',
+       'svp_copier_coller' => 'Digarez, eilit/pegit ho kemmoù, ha klaskit en-dro',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Gortozit...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_ca.php b/www/plugins/crayons/lang/crayons_ca.php
new file mode 100644 (file)
index 0000000..85abbe3
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=ca
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un altre connector impedeix l\'ús del portaplomes a l\'espai públic. ',
+       'annuler' => 'Anul·lar',
+
+       // B
+       'bouton_supprimer' => 'Suprimir',
+
+       // D
+       'deja_modifie' => 'Ja modificat',
+       'donnees_mal_formatees' => 'Dades mal formatades',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ de cap a peus',
+       'editer_tout' => 'Editar tot',
+       'effets' => 'Efectes',
+       'explication_exec_autorise' => 'Pàgines autoritzades a ser modificades
+  (?exec=...) : (, per separar les exec).', # MODIF
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Reduir el logotip si sobrepassa la mida màxima indicada en píxels. Exemple: 100. (0 = mai)', # MODIF
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activar la barra tipogràfica a els llapis?',
+       'label_activer_crayons_prive' => 'Activar llapis a la part privada.',
+       'label_barre_typo' => 'Barra tipogràfica',
+       'label_clickhide' => 'Fent un clic a l\'exterior s\'amaga els llapis',
+       'label_effets' => 'Tria dels efectes',
+       'label_espaceprive' => 'Els llapis a la part privada?',
+       'label_exec_autorise' => 'Pàgines autoritzades',
+       'label_filet' => 'Filet',
+       'label_message' => 'Obtenir un missatge',
+       'label_msg_abandon' => 'Sobre l\'abandonament',
+       'label_msg_no_change' => 'Si no hi ha canvi',
+       'label_reduire_logo' => 'Reduir els logotips',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'Sense interès',
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Escollir un logotip:',
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Escollir una vinyeta:',
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'Editar l\'espai privat (experimental)',
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Cal escollir una imatge',
+       'messages' => 'Missatges',
+       'modifie_par_ailleurs' => 'Modificat per altres raons',
+
+       // N
+       'non_autorise' => 'No autoritzat',
+       'non_implemente' => 'No implementat',
+
+       // P
+       'pas_de_modification' => 'Cap modificació',
+       'pas_de_valeur' => 'Cap valor',
+
+       // S
+       'sauvegarder' => 'Salvaguardar les modificacions?',
+       'svp_copier_coller' => 'Em sap greu, copieu/enganxeu els vostres canvis i torneu a començar',
+
+       // T
+       'titre_config_crayons' => 'Configurar els llapis',
+       'titre_crayons' => 'Llapis',
+
+       // U
+       'update_impossible' => 'L\'actualització ha fracassat',
+
+       // V
+       'veuillez_patienter' => 'Si us plau, espereu un moment...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_de.php b/www/plugins/crayons/lang/crayons_de.php
new file mode 100644 (file)
index 0000000..af1c1d9
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=de
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Ein anderes Plugin verhindert den Einsatz des Federhalters im öffentlichen Bereich.',
+       'annuler' => 'Abbrechen',
+
+       // B
+       'bouton_supprimer' => 'Löschen',
+
+       // D
+       'deja_modifie' => 'Bereits geändert',
+       'donnees_mal_formatees' => 'Datenformat unrichtig',
+
+       // E
+       'editer' => 'Bearbeiten',
+       'editer_@type@_@id@' => '@type@ @id@ als Ganzes bearbeiten',
+       'editer_tout' => 'Alles bearbeiten',
+       'effets' => 'Effekte',
+       'explication_exec_autorise' => 'Zur Bearbeitung zugelassene Seiten
+  (?exec=...) : (exec-Skripte mit Komma trennen).',
+       'explication_introduction_article' => 'Die Einleitung eines Artikels zeigt das Feld "Beschreibung" an. Sollte es leer sein, werden die ersten  600 Zeichen des Artikels aus den Feldern "Kopf" und "Text" angezeigt.',
+       'explication_reduire_logo' => 'Logo verkleinern wenn es größer als x Pixel ist.
+Beispiel: 100. (0 = niemals)',
+
+       // I
+       'info_experimental' => 'Expérimentell',
+
+       // L
+       'label_activer_barre_typo' => 'Funktionsleisten f&uuml;r die Stifte aktivieren?',
+       'label_activer_crayons_prive' => 'Stifte im Redaktionssystem aktivieren',
+       'label_barre_typo' => 'Funktonsleiste',
+       'label_clickhide' => 'Ein Klick au&szlig;erhalb versteckt den Stift',
+       'label_effets' => 'Effekte w&auml;hlen',
+       'label_espaceprive' => 'Stifte im Redaktionssystem verwenden?',
+       'label_exec_autorise' => 'Erlaubte Seiten',
+       'label_filet' => 'Netz',
+       'label_message' => 'Nachricht erhalten',
+       'label_msg_abandon' => 'bei Abbruch',
+       'label_msg_no_change' => 'wenn keine &Auml;nderung',
+       'label_reduire_logo' => 'Logos verkleinern',
+       'label_upload_document' => 'Hinzufügen von Dokumenten durch Ziehen/Ablegen auf den Stift article.texte erlauben.',
+       'label_yellow_fade' => 'Ausblenden',
+       'legend_controleur_hyperlien' => 'Hyperlink',
+       'legend_controleur_logo' => 'Logoe wählen:',
+       'legend_controleur_logo_remplacer' => 'Dieses Logo ersetzen',
+       'legend_controleur_qui' => 'Wer?',
+       'legend_controleur_vignette' => 'Thumbnail wählen:',
+       'legend_controleur_vignette_remplacer' => 'Dieses Miniaturbild ersetzen',
+       'legend_documents' => 'Dokumente hochladen',
+       'legend_editer_prive' => 'Stifte im Redaktionssystem (experimentell)',
+       'legend_introduction_article' => 'Einleitender Text des Artikels',
+
+       // M
+       'message_image_obligatoire' => 'Es muß ein Bild gewählt werden.',
+       'messages' => 'Nachrichten',
+       'modifie_par_ailleurs' => 'Auf anderem Weg geändert',
+
+       // N
+       'non_autorise' => 'Nicht erlaubt',
+       'non_implemente' => 'Funktion nicht vorhanden',
+
+       // P
+       'pas_de_modification' => 'Keine Änderung',
+       'pas_de_valeur' => 'Kein Wert',
+
+       // S
+       'sauvegarder' => 'Änderungen speichern?',
+       'svp_copier_coller' => 'Pardon, bitte sichern Sie ihre Änderungen mit kopieren/einfügen und beginnen Sie von vorne.',
+
+       // T
+       'titre_config_crayons' => 'Stifte: Konfiguration ',
+       'titre_crayons' => 'Stifte',
+
+       // U
+       'update_impossible' => 'Das Update ist fehlgeschlagen.',
+
+       // V
+       'veuillez_patienter' => 'Bitte etwas Geduld...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_en.php b/www/plugins/crayons/lang/crayons_en.php
new file mode 100644 (file)
index 0000000..e5de44f
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=en
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Another plugin is preventing the use of  porte-plume on the public site.',
+       'annuler' => 'Cancel',
+
+       // B
+       'bouton_supprimer' => 'Delete',
+
+       // D
+       'deja_modifie' => 'Already modified',
+       'donnees_mal_formatees' => 'Invalid request format',
+
+       // E
+       'editer' => 'Edit',
+       'editer_@type@_@id@' => 'Edit the whole @type@ @id@',
+       'editer_tout' => 'Edit as a whole',
+       'effets' => 'Effects',
+       'explication_exec_autorise' => 'Pages which are authorised fro changes
+  (?exec=...) : (, to separate several pages- * for all).',
+       'explication_introduction_article' => 'The introduction for an article displays the description of the article if there is one, otherwise it displays the first 600 characters (of the standfirst and text).',
+       'explication_reduire_logo' => 'Reduce the logo size if it exceeds
+  the maximum size (in pixels). Example: 100 (0 = never).',
+
+       // I
+       'info_experimental' => 'Experimental',
+
+       // L
+       'label_activer_barre_typo' => 'Activate the typographical bar for "Pencils"?',
+       'label_activer_crayons_prive' => 'Activate "Pencils" for the editing area.',
+       'label_barre_typo' => 'Typographical bar',
+       'label_clickhide' => 'A click outside the area closes the pencils',
+       'label_effets' => 'Choice of effects',
+       'label_espaceprive' => 'Use "Pencils" in the editing area?',
+       'label_exec_autorise' => 'Pages authorised',
+       'label_filet' => 'Line',
+       'label_message' => 'Show a message',
+       'label_msg_abandon' => 'On cancelling',
+       'label_msg_no_change' => 'If no change made',
+       'label_reduire_logo' => 'Reduce logos',
+       'label_upload_document' => 'Allow adding documents by drag and drop on the pencil article.texte',
+       'label_yellow_fade' => 'Fade',
+       'legend_controleur_hyperlien' => 'Hyperlink',
+       'legend_controleur_logo' => 'Choose a logo:',
+       'legend_controleur_logo_remplacer' => 'Replace this logo',
+       'legend_controleur_qui' => 'Who?',
+       'legend_controleur_vignette' => 'Choose a thumbnail:',
+       'legend_controleur_vignette_remplacer' => 'Replace this thumbnail',
+       'legend_documents' => 'Upload documents',
+       'legend_editer_prive' => 'Use in editing area (experimental)',
+       'legend_introduction_article' => 'Introductory text for the article',
+
+       // M
+       'message_image_obligatoire' => 'You need to choose an image',
+       'messages' => 'Messages',
+       'modifie_par_ailleurs' => 'Was modified elsewhere in the meantime',
+
+       // N
+       'non_autorise' => 'Not allowed',
+       'non_implemente' => 'Not implemented',
+
+       // P
+       'pas_de_modification' => 'No change',
+       'pas_de_valeur' => 'No value for this id',
+
+       // S
+       'sauvegarder' => 'Save changes?',
+       'svp_copier_coller' => 'Sorry, copy/paste your changes and retry',
+
+       // T
+       'titre_config_crayons' => 'Configure "Pencils"',
+       'titre_crayons' => 'Pencils',
+
+       // U
+       'update_impossible' => 'The update did not succeed.',
+
+       // V
+       'veuillez_patienter' => 'Searching ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_eo.php b/www/plugins/crayons/lang/crayons_eo.php
new file mode 100644 (file)
index 0000000..9c16428
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Nuligi',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Jam modifita',
+       'donnees_mal_formatees' => 'Datenoj malbone formatitaj',
+
+       // E
+       'editer' => 'Redakti',
+       'editer_@type@_@id@' => 'Tute redakti @type@ @id@ ',
+       'editer_tout' => 'Ĉion redakti',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Modifita dumtempe',
+
+       // N
+       'non_autorise' => 'Ne permesate',
+       'non_implemente' => 'Ne prirealigita',
+
+       // P
+       'pas_de_modification' => 'Neniu modifo',
+       'pas_de_valeur' => 'Neniu valoro',
+
+       // S
+       'sauvegarder' => 'Ĉu konservi modifojn?',
+       'svp_copier_coller' => 'Ni pardonpetas, kopigluu viajn ŝanĝojn kaj rekomencu',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Bonvolu atendi...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_es.php b/www/plugins/crayons/lang/crayons_es.php
new file mode 100644 (file)
index 0000000..43a7da2
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=es
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Otro plugin impide el uso del porta-plumas en el espacio público.',
+       'annuler' => 'Cancelar',
+
+       // B
+       'bouton_supprimer' => 'Suprimir',
+
+       // D
+       'deja_modifie' => 'Ya modificado',
+       'donnees_mal_formatees' => 'Datos mal formateados',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ entero',
+       'editer_tout' => 'Editar todo',
+       'effets' => 'Efectos',
+       'explication_exec_autorise' => 'Páginas cuya modificación es permitida
+  (?exec=...): (, para separar los exec - * para todas).',
+       'explication_introduction_article' => 'La introducción de un artículo enseña la descripción del artículo, o los primeros 600 carácteres (epígrafe y luego texto).',
+       'explication_reduire_logo' => 'Reducir el logotipo si va mas allá
+  del tamaño indicado en píxeles. Ejemplo: 100. (0 = nunca)',
+
+       // I
+       'info_experimental' => 'Experimental',
+
+       // L
+       'label_activer_barre_typo' => '¿Activar la barra tipográfica en los lápices?',
+       'label_activer_crayons_prive' => 'Activar los lápices en el espacio privado.',
+       'label_barre_typo' => 'Barra tipográfica',
+       'label_clickhide' => 'Un clic afuera esconde los lápices',
+       'label_effets' => 'Elegir los efectos',
+       'label_espaceprive' => '¿Lápices en el espacio privado?',
+       'label_exec_autorise' => 'Páginas permitidas',
+       'label_filet' => 'Filete',
+       'label_message' => 'Obtener un mensaje',
+       'label_msg_abandon' => 'Cuando se abandona',
+       'label_msg_no_change' => 'Si no hay cambios',
+       'label_reduire_logo' => 'Reducir el tamaño de los logotipos',
+       'label_upload_document' => 'Autorizar que se agreguen documentos por arrastrar/depositar ("drag & drop") sobre el lápiz artículo.texto (article.texte)',
+       'label_yellow_fade' => 'Fundido',
+       'legend_controleur_hyperlien' => 'Enlace hipertexto',
+       'legend_controleur_logo' => 'Elegir un logotipo:',
+       'legend_controleur_logo_remplacer' => 'Reemplazar este logotipo',
+       'legend_controleur_qui' => '¿Quién?',
+       'legend_controleur_vignette' => 'Escoger una viñeta:',
+       'legend_controleur_vignette_remplacer' => 'Reemplazar esta viñeta',
+       'legend_documents' => 'Subir documentos',
+       'legend_editer_prive' => 'Edición en el espacio privado (experimental)',
+       'legend_introduction_article' => 'Texto introductivo del artículo',
+
+       // M
+       'message_image_obligatoire' => 'Hay que escoger una imagen',
+       'messages' => 'Mensajes',
+       'modifie_par_ailleurs' => 'Modificado por otro lado',
+
+       // N
+       'non_autorise' => 'No autorizado',
+       'non_implemente' => 'No implementado',
+
+       // P
+       'pas_de_modification' => 'No hay modificaciones',
+       'pas_de_valeur' => 'No hay valor',
+
+       // S
+       'sauvegarder' => '¿Guardar las modificaciones?',
+       'svp_copier_coller' => 'Perdon, copia/pega tus cambios y vuelve a empezar',
+
+       // T
+       'titre_config_crayons' => 'Configuración de los lápices',
+       'titre_crayons' => 'Lápices',
+
+       // U
+       'update_impossible' => 'La actualización fracasó.',
+
+       // V
+       'veuillez_patienter' => 'Favor esperar...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_eu.php b/www/plugins/crayons/lang/crayons_eu.php
new file mode 100644 (file)
index 0000000..00a131a
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Ezeztatu',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Jadanik aldatua',
+       'donnees_mal_formatees' => 'Gaizki formatutako datuak',
+
+       // E
+       'editer' => 'Editatu',
+       'editer_@type@_@id@' => '@type@ @id@ osoki editatu',
+       'editer_tout' => 'Dena editatu',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Bestalde aldatua',
+
+       // N
+       'non_autorise' => 'Ez baimendua',
+       'non_implemente' => 'Ez inpliment atua',
+
+       // P
+       'pas_de_modification' => 'Aldaketarik ez',
+       'pas_de_valeur' => 'Balorerik ez',
+
+       // S
+       'sauvegarder' => 'Aldaketak grabatu ?',
+       'svp_copier_coller' => 'Désolé, copiez/collez vos changements et recommencez', # NEW
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Veuillez patienter...' # NEW
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_fa.php b/www/plugins/crayons/lang/crayons_fa.php
new file mode 100644 (file)
index 0000000..78c5e17
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=fa
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'يك پلاگين ديگر مانع استفاده از چوب قلم در سايت همگاني است.',
+       'annuler' => 'ابطال',
+
+       // B
+       'bouton_supprimer' => 'حذف',
+
+       // D
+       'deja_modifie' => 'پيش‌‌ تر اصلاح شده',
+       'donnees_mal_formatees' => 'فرمت درخواست نامعتبر',
+
+       // E
+       'editer' => 'ويرايش ',
+       'editer_@type@_@id@' => 'تمام @type@ @id@ را ويرايش کنید',
+       'editer_tout' => 'ويرايش همه',
+       'effets' => 'افكت‌ها',
+       'explication_exec_autorise' => 'صفحه‌هاي مجاز براي اصلاح
+(?exec=...) : (, جداسازي چند صفحه- *براي همه).',
+       'explication_introduction_article' => 'پيشگفتار يك مقاله توصيف يك مقاله را اگر باشد، نشان مي‌دهد، و اگر نباشد 600 كاراكتر اول (ليد و متن)را نشان خواهد داد.',
+       'explication_reduire_logo' => 'اندازه‌ي لوگ را اگر از بيشترين حد بالا زده باشد كم مي‌كند (به پيكسل). نمونه : 100. ( 0 = هرگز)',
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'فعال‌سازي ميل حروف‌نگاري در پلاگين «مدادها»؟',
+       'label_activer_crayons_prive' => 'فعال سازي «مدادها» راي قسمت خصوصي.',
+       'label_barre_typo' => 'ميل حروف نگاري ',
+       'label_clickhide' => 'يك كليك بيرون محوطه مدادها را مبي بندد',
+       'label_effets' => 'گزينش افكت‌ها',
+       'label_espaceprive' => 'مدادها در محوطه‌ي خصوصي؟',
+       'label_exec_autorise' => 'صفحه‌هاي مجاز',
+       'label_filet' => 'خط',
+       'label_message' => 'كسب پيام',
+       'label_msg_abandon' => 'در جريان ابطال',
+       'label_msg_no_change' => 'در صورت عدم تغيير ',
+       'label_reduire_logo' => 'كاهش لوگوها',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'محو',
+       'legend_controleur_hyperlien' => 'ابرپيوند',
+       'legend_controleur_logo' => 'گزينش يك لوگو :',
+       'legend_controleur_logo_remplacer' => 'جايگزيني اين لوگو',
+       'legend_controleur_qui' => 'كي؟',
+       'legend_controleur_vignette' => 'گزيش يك صورتك  :',
+       'legend_controleur_vignette_remplacer' => 'جايگزيني اين صورت',
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'استفاده در محوطه‌ي خصوصي (تجربي)',
+       'legend_introduction_article' => 'متن مقدماتي مقاله',
+
+       // M
+       'message_image_obligatoire' => 'بايد يك تصوير انتخاب كنيد',
+       'messages' => 'پيام‌ها',
+       'modifie_par_ailleurs' => 'جاي ديگر اصلاح شده',
+
+       // N
+       'non_autorise' => 'بي ‌مجوز',
+       'non_implemente' => 'انجام نیافته',
+
+       // P
+       'pas_de_modification' => 'بدون تغییر',
+       'pas_de_valeur' => 'بی ارزش',
+
+       // S
+       'sauvegarder' => ' ضبط تغییرات؟',
+       'svp_copier_coller' => 'متاسفیم. تغییرات را دوباره کپی سپس بچسبانید',
+
+       // T
+       'titre_config_crayons' => 'پيكربندي «مدادها» ',
+       'titre_crayons' => 'مدادها',
+
+       // U
+       'update_impossible' => 'روزآمد نشد.',
+
+       // V
+       'veuillez_patienter' => 'لطفأ صبر کنید ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_fr.php b/www/plugins/crayons/lang/crayons_fr.php
new file mode 100644 (file)
index 0000000..df390e1
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// Fichier source, a modifier dans svn://zone.spip.org/spip-zone/_plugins_/crayons/lang/
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.',
+       'annuler' => 'Annuler',
+
+       // B
+       'bouton_supprimer' => 'Supprimer',
+
+       // D
+       'deja_modifie' => 'Déjà modifié',
+       'donnees_mal_formatees' => 'Données mal formatées',
+
+       // E
+       'editer' => 'Éditer',
+       'editer_@type@_@id@' => 'Éditer @type@ @id@ en entier',
+       'editer_tout' => 'Éditer tout',
+       'effets' => 'Effets',
+       'explication_exec_autorise' => 'Pages autorisées à la modification
+               (?exec=...) : (, pour séparer les exec - * pour toutes).',
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).',
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)',
+
+       // I
+       'info_experimental' => 'Expérimental',
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?',
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.',
+       'label_barre_typo' => 'Barre typographique',
+       'label_clickhide' => 'Un clic en-dehors masque les crayons',
+       'label_effets' => 'Choix des effets',
+       'label_espaceprive' => 'Crayons dans le privé ?',
+       'label_exec_autorise' => 'Pages autorisées',
+       'label_filet' => 'Filet',
+       'label_message' => 'Obtenir un message',
+       'label_msg_abandon' => 'Sur abandon',
+       'label_msg_no_change' => 'Si pas de changement',
+       'label_reduire_logo' => 'Réduire les logos',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte',
+       'label_yellow_fade' => 'Fade',
+       'legend_controleur_hyperlien' => 'Hyperlien',
+       'legend_controleur_logo' => 'Choisir un logo :',
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo',
+       'legend_controleur_qui' => 'Qui ?',
+       'legend_controleur_vignette' => 'Choisir une vignette :',
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette',
+       'legend_documents' => 'Upload de documents',
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)',
+       'legend_introduction_article' => 'Texte introductif de l\'article',
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image',
+       'messages' => 'Messages',
+       'modifie_par_ailleurs' => 'Modifié par ailleurs',
+
+       // N
+       'non_autorise' => 'Non autorisé',
+       'non_implemente' => 'Non implémenté',
+
+       // P
+       'pas_de_modification' => 'Pas de modification',
+       'pas_de_valeur' => 'Pas de valeur',
+
+       // S
+       'sauvegarder' => 'Sauvegarder les modifications ?',
+       'svp_copier_coller' => 'Désolé, copiez/collez vos changements et recommencez',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons',
+       'titre_crayons' => 'Crayons',
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.',
+
+       // V
+       'veuillez_patienter' => 'Veuillez patienter...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_fr_tu.php b/www/plugins/crayons/lang/crayons_fr_tu.php
new file mode 100644 (file)
index 0000000..e8eca5b
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=fr_tu
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.',
+       'annuler' => 'Annuler',
+
+       // B
+       'bouton_supprimer' => 'Supprimer',
+
+       // D
+       'deja_modifie' => 'Déjà modifié',
+       'donnees_mal_formatees' => 'Données mal formatées',
+
+       // E
+       'editer' => 'Éditer',
+       'editer_@type@_@id@' => 'Éditer @type@ @id@ en entier',
+       'editer_tout' => 'Éditer tout',
+       'effets' => 'Effets',
+       'explication_exec_autorise' => 'Pages autorisées à la modification
+  (?exec=...) : (, pour séparer les exec - * pour toutes).',
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).',
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse
+  la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # MODIF
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?',
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.',
+       'label_barre_typo' => 'Barre typographique',
+       'label_clickhide' => 'Un clic en-dehors masque les crayons',
+       'label_effets' => 'Choix des effets',
+       'label_espaceprive' => 'Crayons dans le privé ?',
+       'label_exec_autorise' => 'Pages autorisées',
+       'label_filet' => 'Filet',
+       'label_message' => 'Obtenir un message',
+       'label_msg_abandon' => 'Sur abandon',
+       'label_msg_no_change' => 'Si pas de changement',
+       'label_reduire_logo' => 'Réduire les logos',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'Fade',
+       'legend_controleur_hyperlien' => 'Hyperlien',
+       'legend_controleur_logo' => 'Choisir un logo :',
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo',
+       'legend_controleur_qui' => 'Qui ?',
+       'legend_controleur_vignette' => 'Choisir une vignette :',
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette',
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)',
+       'legend_introduction_article' => 'Texte introductif de l\'article',
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image',
+       'messages' => 'Messages',
+       'modifie_par_ailleurs' => 'Modifié par ailleurs',
+
+       // N
+       'non_autorise' => 'Non autorisé',
+       'non_implemente' => 'Non implémenté',
+
+       // P
+       'pas_de_modification' => 'Pas de modification',
+       'pas_de_valeur' => 'Pas de valeur',
+
+       // S
+       'sauvegarder' => 'Sauvegarder les modifications ?',
+       'svp_copier_coller' => 'Désolé, copie/colle tes changements et recommence',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons',
+       'titre_crayons' => 'Crayons',
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.',
+
+       // V
+       'veuillez_patienter' => 'Patiente stp...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_gl.php b/www/plugins/crayons/lang/crayons_gl.php
new file mode 100644 (file)
index 0000000..2cdfca3
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Anular',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Xa modificado',
+       'donnees_mal_formatees' => 'Datos mal formatados',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ por completo',
+       'editer_tout' => 'Editar todo',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Modificado por outros',
+
+       // N
+       'non_autorise' => 'Non autorizado',
+       'non_implemente' => 'Non implementado',
+
+       // P
+       'pas_de_modification' => 'Non hai modificacións',
+       'pas_de_valeur' => 'Ningún valor',
+
+       // S
+       'sauvegarder' => 'Gardar as modificacións ?',
+       'svp_copier_coller' => 'Desculpe, copie/pegue os seus cambios e volva comezar',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'Fallou a actualización',
+
+       // V
+       'veuillez_patienter' => 'Teña paciencia ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_it.php b/www/plugins/crayons/lang/crayons_it.php
new file mode 100644 (file)
index 0000000..8b998e6
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=it
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un altro plugin impedisce l\'utilizzo di porte-plume nella spazio pubblico.',
+       'annuler' => 'Annulla',
+
+       // B
+       'bouton_supprimer' => 'Elimina',
+
+       // D
+       'deja_modifie' => 'Già modificato',
+       'donnees_mal_formatees' => 'Dati mal formattati',
+
+       // E
+       'editer' => 'Modifica',
+       'editer_@type@_@id@' => 'Modifica @type@ @id@ in intero',
+       'editer_tout' => 'Modifica tutto',
+       'effets' => 'Effetti',
+       'explication_exec_autorise' => 'Pagine autorizzate per la modifica
+  (?exec=...) : (, per separare gli exec - * per tutti).',
+       'explication_introduction_article' => 'L\'introduzione di un articolo mostra la descrizione di un articolo, altrimenti mostra i suoi primi 600 caratteri (cappello più testo)',
+       'explication_reduire_logo' => 'Riduci il logo se supera
+  la dimensione massima indicata in pixel. Esempio: 100. (0 = mai)', # MODIF
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Attivare la barra tipografica per i pennarelli?',
+       'label_activer_crayons_prive' => 'Attivare i pennarelli per la parte redazionale.',
+       'label_barre_typo' => 'Barra tipografica',
+       'label_clickhide' => 'Un click fuori nasconde i pennarelli',
+       'label_effets' => 'Scelta degli effetti',
+       'label_espaceprive' => 'Pennarelli in redazione?',
+       'label_exec_autorise' => 'Pagine autorizzate',
+       'label_filet' => 'Bordo',
+       'label_message' => 'Ottieni un messaggio',
+       'label_msg_abandon' => 'Sull\'abbandono',
+       'label_msg_no_change' => 'Se non c\'è nessuna modifica',
+       'label_reduire_logo' => 'Riduci i logo',
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'Fade',
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Scegli un logo:',
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Scegli una miniatura:',
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'Modifica lo spazio redazionale (sperimentale)',
+       'legend_introduction_article' => 'Testo introduttivo dell\'articolo',
+
+       // M
+       'message_image_obligatoire' => 'Devi scegliere un\'immagine',
+       'messages' => 'Messaggi',
+       'modifie_par_ailleurs' => 'Modificato altrove',
+
+       // N
+       'non_autorise' => 'Non autorizzato',
+       'non_implemente' => 'Non implementato',
+
+       // P
+       'pas_de_modification' => 'Nessuna modifica',
+       'pas_de_valeur' => 'Nessun valore',
+
+       // S
+       'sauvegarder' => 'Registrare le modifiche?',
+       'svp_copier_coller' => 'Spiacente, copia/incolla le modifiche e comincia di nuovo',
+
+       // T
+       'titre_config_crayons' => 'Configura i pennarelli',
+       'titre_crayons' => 'Pennarelli',
+
+       // U
+       'update_impossible' => 'L\'aggiornamento è fallito.',
+
+       // V
+       'veuillez_patienter' => 'Attendere...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_it_fem.php b/www/plugins/crayons/lang/crayons_it_fem.php
new file mode 100644 (file)
index 0000000..937699b
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Annulla',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Già modificato',
+       'donnees_mal_formatees' => 'Dati mal formattati',
+
+       // E
+       'editer' => 'Modifica',
+       'editer_@type@_@id@' => 'Modifica @type@ @id@ in intero',
+       'editer_tout' => 'Modifica tutto',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Modificato altrove',
+
+       // N
+       'non_autorise' => 'Non autorizzato',
+       'non_implemente' => 'Non implementato',
+
+       // P
+       'pas_de_modification' => 'Nessuna modifica',
+       'pas_de_valeur' => 'Nessun valore',
+
+       // S
+       'sauvegarder' => 'Registrare le modifiche?',
+       'svp_copier_coller' => 'Spiacente, copia/incolla le modifiche e comincia di nuovo',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Attendere...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_km.php b/www/plugins/crayons/lang/crayons_km.php
new file mode 100644 (file)
index 0000000..3f9edc4
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'បោះបង់',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Already modified', # NEW
+       'donnees_mal_formatees' => 'Invalid request format', # NEW
+
+       // E
+       'editer' => 'កែប្រែ',
+       'editer_@type@_@id@' => 'Edit the whole @type@ @id@', # NEW
+       'editer_tout' => 'កែប្រែ ទាំងអស់',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Was modified elsewhere in the meantime', # NEW
+
+       // N
+       'non_autorise' => '<NEW>គ្មានអនុញ្ញាត',
+       'non_implemente' => 'Not implemented', # NEW
+
+       // P
+       'pas_de_modification' => '<NEW>គ្មានបំលាស់ប្តូរ',
+       'pas_de_valeur' => '<NEW>គ្មានតំលៃ សំរាប់អត្តសញ្ញា (ID) នេះ',
+
+       // S
+       'sauvegarder' => '<NEW>រក្សាទុក បំលាស់ប្តូរ?',
+       'svp_copier_coller' => 'Sorry, copy/paste your changes and retry', # NEW
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'ការបន្ទាន់សម័យ បានបរាជ័យ។',
+
+       // V
+       'veuillez_patienter' => 'កំពុងស្វែងរក ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_lb.php b/www/plugins/crayons/lang/crayons_lb.php
new file mode 100644 (file)
index 0000000..0e0835b
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Annuléieren',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Schons geännert',
+       'donnees_mal_formatees' => 'Daten schlecht formatéiert',
+
+       // E
+       'editer' => 'Änneren',
+       'editer_@type@_@id@' => '@type@ @id@ ganz änneren',
+       'editer_tout' => 'Alles änneren',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Anerwärts geännert',
+
+       // N
+       'non_autorise' => 'Nët erlabt',
+       'non_implemente' => 'Nët agericht',
+
+       // P
+       'pas_de_modification' => 'Kéng Ännerung',
+       'pas_de_valeur' => 'Kéng Valeur',
+
+       // S
+       'sauvegarder' => 'Ännerunge späicheren?',
+       'svp_copier_coller' => 'Deet ons leet, kopéiert/pächt är Ännerungen a fänkt nei un',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Waart weg...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_nl.php b/www/plugins/crayons/lang/crayons_nl.php
new file mode 100644 (file)
index 0000000..f7315cb
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=nl
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Een andere plugin verbiedt het gebruik van pen in de openbare ruimte.',
+       'annuler' => 'Annuleren',
+
+       // B
+       'bouton_supprimer' => 'Verwijderen',
+
+       // D
+       'deja_modifie' => 'Reeds gewijzigd',
+       'donnees_mal_formatees' => 'Slecht geformatteerde gegevens',
+
+       // E
+       'editer' => 'Uitgeven',
+       'editer_@type@_@id@' => '@type@ @id@ in geheel uitgeven',
+       'editer_tout' => 'Alles uitgeven',
+       'effets' => 'Gevolgen',
+       'explication_exec_autorise' => 'Toegestaan ​​om pagina\'s te wijzigen
+  (?exec=...) : (, te scheiden exec - * voor allen).',
+       'explication_introduction_article' => 'De introductie van een functie geeft de beschrijving van het item, anders geeft de eerste 600 karakters (hoed en tekst).',
+       'explication_reduire_logo' => 'Verminder het logo als het hoger is dan 
+   de maximale grootte in pixels. Voorbeeld: 100. (0 = nooit)',
+
+       // I
+       'info_experimental' => 'Experimenteel',
+
+       // L
+       'label_activer_barre_typo' => 'Draai het typografie roer in de potloden ?',
+       'label_activer_crayons_prive' => 'Schakel potloden voor de private partij.',
+       'label_barre_typo' => 'Typografische bar',
+       'label_clickhide' => 'Te klikken buiten het masker potloden',
+       'label_effets' => 'Selectie-effecten',
+       'label_espaceprive' => 'Potloden in de prive-sector ?',
+       'label_exec_autorise' => 'pagina\'s geautoriseerde',
+       'label_filet' => 'Net',
+       'label_message' => 'Het krijgen van een bericht',
+       'label_msg_abandon' => 'Abandon zuid',
+       'label_msg_no_change' => 'Als er geen verandering',
+       'label_reduire_logo' => 'Verminderen logos',
+       'label_upload_document' => 'Bijvoegen van documenten door drag en drop op het article.texte potlood toelaten',
+       'label_yellow_fade' => 'Fade',
+       'legend_controleur_hyperlien' => 'Hyperlien',
+       'legend_controleur_logo' => 'Kies een logo :',
+       'legend_controleur_logo_remplacer' => 'Vervang deze logo',
+       'legend_controleur_qui' => 'Dat ?',
+       'legend_controleur_vignette' => 'Selecteer een miniatuur :',
+       'legend_controleur_vignette_remplacer' => 'Vervang deze tag',
+       'legend_documents' => 'Upload van documenten',
+       'legend_editer_prive' => 'Bewerk de private deel (experimentele)',
+       'legend_introduction_article' => 'Aanhef van artikel',
+
+       // M
+       'message_image_obligatoire' => 'U moet kiezen voor een foto',
+       'messages' => 'Berichten',
+       'modifie_par_ailleurs' => 'Voorts gewijzigd',
+
+       // N
+       'non_autorise' => 'Niet - toegelaten',
+       'non_implemente' => 'Niet geïmplementeerds',
+
+       // P
+       'pas_de_modification' => 'Geen wijziging',
+       'pas_de_valeur' => 'Geen waarde',
+
+       // S
+       'sauvegarder' => 'De wijzigingen beschermen?',
+       'svp_copier_coller' => 'Désolé, copiez/collez vos changements et recommencez',
+
+       // T
+       'titre_config_crayons' => 'Configureren potloden',
+       'titre_crayons' => 'Podloden',
+
+       // U
+       'update_impossible' => 'De update is niet geslaagd.',
+
+       // V
+       'veuillez_patienter' => 'Gelieve geduld te oefenen…'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_oc_lnc.php b/www/plugins/crayons/lang/crayons_oc_lnc.php
new file mode 100644 (file)
index 0000000..b9f466b
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Anullar',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Ja modificat',
+       'donnees_mal_formatees' => 'Donadas mal formatadas',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ en entièr',
+       'editer_tout' => 'Tot editar',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Modificat endacòm mai',
+
+       // N
+       'non_autorise' => 'Non autorizat',
+       'non_implemente' => 'Non implementat',
+
+       // P
+       'pas_de_modification' => 'Pas de modificacion',
+       'pas_de_valeur' => 'Pas de valor',
+
+       // S
+       'sauvegarder' => 'Registrar las modificacions ?',
+       'svp_copier_coller' => 'Desolats, copiatz/empegatz vòstres cambiaments e tornatz començar',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Mercés d\'esperar...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_pt_br.php b/www/plugins/crayons/lang/crayons_pt_br.php
new file mode 100644 (file)
index 0000000..2518073
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Cancelar',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'J&aacute; alterado',
+       'donnees_mal_formatees' => 'Dados mal formatados',
+
+       // E
+       'editer' => 'Editar',
+       'editer_@type@_@id@' => 'Editar @type@ @id@ completamente',
+       'editer_tout' => 'Editar tudo',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autoris&eacute;es &agrave; la modification
+               (?exec=...) : (, pour s&eacute;parer les exec).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caract&egrave;res (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'R&#233;duire le logo s\'il d&#233;passe
+               la taille maximale indiquee en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie priv&eacute;e.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le priv&eacute; ?', # NEW
+       'label_exec_autorise' => 'Pages autoris&eacute;es', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'R&eacute;duire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo&nbsp;:', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette&nbsp;:', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => '&Eacute;diter l\'espace priv&eacute; (exp&eacute;rimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Alterado em outro lugar',
+
+       // N
+       'non_autorise' => 'N&atilde;o autorizado',
+       'non_implemente' => 'N&atilde;o implementado',
+
+       // P
+       'pas_de_modification' => 'Sem modifica&ccedil;&atilde;o',
+       'pas_de_valeur' => 'Sem valor',
+
+       // S
+       'sauvegarder' => 'Fazer c&oacute;pia de seguran&ccedil;a das altera&ccedil;&otilde;es?',
+       'svp_copier_coller' => 'Desculpe, copie/cole as suas altera&ccedil;&otilde;es e recomece',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise &agrave; jour a &eacute;chou&eacute;.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Aguarde, por favor...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_ro.php b/www/plugins/crayons/lang/crayons_ro.php
new file mode 100644 (file)
index 0000000..857c8e6
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Anulati',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Deja modificat',
+       'donnees_mal_formatees' => 'Date rau formatate',
+
+       // E
+       'editer' => 'Editati',
+       'editer_@type@_@id@' => 'Editati @type@ @id@ in intregime',
+       'editer_tout' => 'Editati totul',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Modificat de altfel',
+
+       // N
+       'non_autorise' => 'Neautorizat',
+       'non_implemente' => 'Neimplementat',
+
+       // P
+       'pas_de_modification' => 'Fara modificari',
+       'pas_de_valeur' => 'Fara valoare',
+
+       // S
+       'sauvegarder' => 'Salvati modificarile ?',
+       'svp_copier_coller' => 'Ne pare rau, copiati/lipiti schimbarile dvs. si reincepeti',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Va rugam sa asteptati'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_ru.php b/www/plugins/crayons/lang/crayons_ru.php
new file mode 100644 (file)
index 0000000..e710dcf
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=ru
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Другой плагин не дайет использовать porte-plume на сайте.',
+       'annuler' => 'Отмена',
+
+       // B
+       'bouton_supprimer' => 'Удалить',
+
+       // D
+       'deja_modifie' => 'Уже изменен',
+       'donnees_mal_formatees' => 'Неправильный формат запроса',
+
+       // E
+       'editer' => 'Редактировать',
+       'editer_@type@_@id@' => 'Редактировать @type@ @id@ полностью',
+       'editer_tout' => 'Редактировать полностью',
+       'effets' => 'Эффекты',
+       'explication_exec_autorise' => 'Страницы, на которых можно редактировать информацию   (?exec=...) : (, разделитель между страницами. * для всех страниц).',
+       'explication_introduction_article' => 'Вводная статьи выводит информацию из поля "введение". Если оно пустое, товыводится первые 600 символов текста статьи.',
+       'explication_reduire_logo' => 'Уменьшать логотипы если их размер превышает 
+  максимальный размер (в пикселях) Например: 100. (0 = никогда)',
+
+       // I
+       'info_experimental' => 'Экспериментальная опция',
+
+       // L
+       'label_activer_barre_typo' => 'Включить панель инструментов для плагина?',
+       'label_activer_crayons_prive' => 'Включить "Карандаш" в админке сайта',
+       'label_barre_typo' => 'Панель инструментов',
+       'label_clickhide' => 'Нажмите вне области редактирования чтобы закрыть экран',
+       'label_effets' => 'Выбрать эффект',
+       'label_espaceprive' => 'Использовать "Карандаш" в админке сайта?',
+       'label_exec_autorise' => 'Использовать на страницах',
+       'label_filet' => 'Линия',
+       'label_message' => 'Показать сообщение',
+       'label_msg_abandon' => 'При отмене',
+       'label_msg_no_change' => 'Если не были сделаны изменения',
+       'label_reduire_logo' => 'Уменьшать логотипы',
+       'label_upload_document' => 'Разрешить добавлять документы перетаскиванием их поле "текст" статьи (article.texte)',
+       'label_yellow_fade' => 'Тень',
+       'legend_controleur_hyperlien' => 'Ссылка',
+       'legend_controleur_logo' => 'Выбрать логотип:',
+       'legend_controleur_logo_remplacer' => 'Заменить логотип',
+       'legend_controleur_qui' => 'Кто?',
+       'legend_controleur_vignette' => 'Выбрать миниатюру:',
+       'legend_controleur_vignette_remplacer' => 'Заменить миниатюру',
+       'legend_documents' => 'Загрузить документ',
+       'legend_editer_prive' => 'Использовать в админке сайта',
+       'legend_introduction_article' => 'Вводный текст для статьи',
+
+       // M
+       'message_image_obligatoire' => 'Вам необходимо выбрать сообщение',
+       'messages' => 'Сообщения',
+       'modifie_par_ailleurs' => 'Был изменен в другом месте в то же время',
+
+       // N
+       'non_autorise' => 'Нет доступа',
+       'non_implemente' => 'Не выполнено',
+
+       // P
+       'pas_de_modification' => 'Без изменений',
+       'pas_de_valeur' => 'Не указано значение для этого id',
+
+       // S
+       'sauvegarder' => 'Сохранить изменения?',
+       'svp_copier_coller' => 'Сохраните сделанные изменения в другом месте и попробуйте заново',
+
+       // T
+       'titre_config_crayons' => 'Настроить "Карандаш"',
+       'titre_crayons' => 'Карандаш',
+
+       // U
+       'update_impossible' => 'Не удалось обновить.',
+
+       // V
+       'veuillez_patienter' => 'Идет поиск ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_sk.php b/www/plugins/crayons/lang/crayons_sk.php
new file mode 100644 (file)
index 0000000..62d801d
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=sk
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Iný zásuvný modul bráni použitiu porte-plume na verejne prístupnej stránke.',
+       'annuler' => 'Zrušiť',
+
+       // B
+       'bouton_supprimer' => 'Odstrániť',
+
+       // D
+       'deja_modifie' => 'Už upravený',
+       'donnees_mal_formatees' => 'Neplatný formát požiadavky',
+
+       // E
+       'editer' => 'Upraviť',
+       'editer_@type@_@id@' => 'Upraviť celý @type@ @id@',
+       'editer_tout' => 'Upravovať ako celok',
+       'effets' => 'Efekty',
+       'explication_exec_autorise' => 'Stránky, na ktorých je povolené vykonávať zmeny
+  (?exec=...): (, na oddelenie viacerých stránok, * pre všetky).',
+       'explication_introduction_article' => 'Ako úvod článku sa zobrazí popis článku, ak nejaký existuje, v opačnom prípade sa zobrazí prvých 600 znakov (úvodného odseku a textu).',
+       'explication_reduire_logo' => 'Zmenšiť veľkosť loga, ak presahuje
+  maximálnu veľkosť (v pixeloch). Príklad: 100 (0 = nikdy).',
+
+       // I
+       'info_experimental' => 'Experimentálny',
+
+       // L
+       'label_activer_barre_typo' => 'Aktivovať klávesový panel pre "Farbičky"?',
+       'label_activer_crayons_prive' => 'Aktivovať "Farbičky" pre súkromnú zónu.',
+       'label_barre_typo' => 'Klávesový panel',
+       'label_clickhide' => 'Klikom mimo oblasti farbičky zatvoríte',
+       'label_effets' => 'Výber efektov',
+       'label_espaceprive' => 'Používať "farbičky" v súkromnej zóne?',
+       'label_exec_autorise' => 'Stránky povolené',
+       'label_filet' => 'Čiara',
+       'label_message' => 'Zobraziť správu',
+       'label_msg_abandon' => 'Pri zrušení',
+       'label_msg_no_change' => 'Ak sa neurobí žiadna zmena',
+       'label_reduire_logo' => 'Zmenšiť logá',
+       'label_upload_document' => 'Povoliť pridávanie súborov pomocou farbičky article.texte',
+       'label_yellow_fade' => 'Tieň',
+       'legend_controleur_hyperlien' => 'Hypertextový odkaz',
+       'legend_controleur_logo' => 'Vyberte logo:',
+       'legend_controleur_logo_remplacer' => 'Nahradiť toto logo',
+       'legend_controleur_qui' => 'Kto?',
+       'legend_controleur_vignette' => 'Vyberte miniatúru:',
+       'legend_controleur_vignette_remplacer' => 'Nahradiť túto miniatúru',
+       'legend_documents' => 'Nahrávanie súborov',
+       'legend_editer_prive' => 'Použiť v súkromnej zóne (experimentálne)',
+       'legend_introduction_article' => 'Úvodný text článku',
+
+       // M
+       'message_image_obligatoire' => 'Musíte si vybrať obrázok',
+       'messages' => 'Správy',
+       'modifie_par_ailleurs' => 'Medzitým bol zmenený inde',
+
+       // N
+       'non_autorise' => 'Nepovolené',
+       'non_implemente' => 'Nezavedené',
+
+       // P
+       'pas_de_modification' => 'Žiadna zmena',
+       'pas_de_valeur' => 'Toto ID nemá žiadnu hodnotu',
+
+       // S
+       'sauvegarder' => 'Uložiť zmeny?',
+       'svp_copier_coller' => 'Prepáčte, skopírujte/prilepte svoje zmeny a skúste znova',
+
+       // T
+       'titre_config_crayons' => 'Nastaviť "Farbičky"',
+       'titre_crayons' => 'Farbičky',
+
+       // U
+       'update_impossible' => 'Aktualizácia neprebehla úspešne.',
+
+       // V
+       'veuillez_patienter' => 'Vyhľadáva sa...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_sv.php b/www/plugins/crayons/lang/crayons_sv.php
new file mode 100644 (file)
index 0000000..b2cb909
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'Ångra',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Redan ändrat',
+       'donnees_mal_formatees' => 'Felaktigt format på data',
+
+       // E
+       'editer' => 'Editera',
+       'editer_@type@_@id@' => 'Editera hela @type@ @id@',
+       'editer_tout' => 'Editera allt',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Någon annan har förändrat artikeln sedan du öppnade den',
+
+       // N
+       'non_autorise' => 'Ej tillåtet',
+       'non_implemente' => 'Funktionen saknas',
+
+       // P
+       'pas_de_modification' => 'Ingen förändring',
+       'pas_de_valeur' => 'Inget värde',
+
+       // S
+       'sauvegarder' => 'Spara förändringarna?',
+       'svp_copier_coller' => 'Ledsen, kopiera/klistra in dina förändringar och försök igen',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Söker ...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_tr.php b/www/plugins/crayons/lang/crayons_tr.php
new file mode 100644 (file)
index 0000000..ec8270f
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => 'İptal et',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => 'Zaten değiştirilmiş',
+       'donnees_mal_formatees' => 'Kötü formatlanmış veriler',
+
+       // E
+       'editer' => 'Düzenle',
+       'editer_@type@_@id@' => '@type@ @id@ tümünü düzenle',
+       'editer_tout' => 'Hepsini düzenle',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => 'Başkaları tarafından değiştirilmiş',
+
+       // N
+       'non_autorise' => 'Yetkisiz',
+       'non_implemente' => 'Geliştirilmemiş',
+
+       // P
+       'pas_de_modification' => 'Değişiklik yok',
+       'pas_de_valeur' => 'Değersiz',
+
+       // S
+       'sauvegarder' => 'Değişiklikler kaydedilsin mi ?',
+       'svp_copier_coller' => 'Üzgünüm, değişikliklerinizi kesin/yapıştırın ve tekrar başlayın',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => 'Lütfen sabrediniz...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_tw.php b/www/plugins/crayons/lang/crayons_tw.php
new file mode 100644 (file)
index 0000000..d9e3100
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => '取消',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => '已經修改過',
+       'donnees_mal_formatees' => '資料格式不正確',
+
+       // E
+       'editer' => '編輯',
+       'editer_@type@_@id@' => '完整編輯 @type@ @id@',
+       'editer_tout' => '編輯全部',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => '已經被修改過',
+
+       // N
+       'non_autorise' => '不被允許',
+       'non_implemente' => '尚未支援',
+
+       // P
+       'pas_de_modification' => '沒有修改過',
+       'pas_de_valeur' => '無指定值',
+
+       // S
+       'sauvegarder' => '儲存修改過的資料 ?',
+       'svp_copier_coller' => '對不起,我們建議您複製/貼上您的修改',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => '請稍後...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_zh.php b/www/plugins/crayons/lang/crayons_zh.php
new file mode 100644 (file)
index 0000000..8659fa7
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/crayons?lang_cible=zh
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => '取消', # MODIF
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => '已经修改', # MODIF
+       'donnees_mal_formatees' => '数据格式化错误', # MODIF
+
+       // E
+       'editer' => '编辑', # MODIF
+       'editer_@type@_@id@' => '编辑@type@@id@所有内容', # MODIF
+       'editer_tout' => '编辑所有内容', # MODIF
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification
+               (?exec=...) : (, pour séparer les exec).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse
+               la taille maximale indiquee en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // I
+       'info_experimental' => 'Expérimental', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_upload_document' => 'Autoriser l\'ajout de documents par glisser/déposer sur le crayon article.texte', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_documents' => 'Upload de documents', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)',
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => '被别人修改', # MODIF
+
+       // N
+       'non_autorise' => '没有授权', # MODIF
+       'non_implemente' => '为调试交机', # MODIF
+
+       // P
+       'pas_de_modification' => '无修改内容', # MODIF
+       'pas_de_valeur' => '没有值', # MODIF
+
+       // S
+       'sauvegarder' => '保存已修改的内容吗?', # MODIF
+       'svp_copier_coller' => '对不起,复制/粘贴已经改变的内容,并重新开始', # MODIF
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => '请稍后...' # MODIF
+);
+
+?>
diff --git a/www/plugins/crayons/lang/crayons_zh_tw.php b/www/plugins/crayons/lang/crayons_zh_tw.php
new file mode 100644 (file)
index 0000000..d9e3100
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://www.spip.net/trad-lang/
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // A
+       'activation_barre_impossible' => 'Un autre plugin interdit l\'usage du porte-plume dans l\'espace public.', # NEW
+       'annuler' => '取消',
+
+       // B
+       'bouton_supprimer' => 'Supprimer', # NEW
+
+       // D
+       'deja_modifie' => '已經修改過',
+       'donnees_mal_formatees' => '資料格式不正確',
+
+       // E
+       'editer' => '編輯',
+       'editer_@type@_@id@' => '完整編輯 @type@ @id@',
+       'editer_tout' => '編輯全部',
+       'effets' => 'Effets', # NEW
+       'explication_exec_autorise' => 'Pages autorisées à la modification\r
+               (?exec=...) : (, pour séparer les exec - * pour toutes).', # NEW
+       'explication_introduction_article' => 'L\'introduction d\'un article affiche le descriptif de l\'article, sinon affiche ses 600 premiers caractères (chapeau puis texte).', # NEW
+       'explication_reduire_logo' => 'Réduire le logo s\'il dépasse\r
+               la taille maximale indiquée en pixels. Exemple : 100. (0 = jamais)', # NEW
+
+       // L
+       'label_activer_barre_typo' => 'Activer la barre typographique dans les crayons ?', # NEW
+       'label_activer_crayons_prive' => 'Activer crayons pour la partie privée.', # NEW
+       'label_barre_typo' => 'Barre typographique', # NEW
+       'label_clickhide' => 'Un clic en-dehors masque les crayons', # NEW
+       'label_effets' => 'Choix des effets', # NEW
+       'label_espaceprive' => 'Crayons dans le privé ?', # NEW
+       'label_exec_autorise' => 'Pages autorisées', # NEW
+       'label_filet' => 'Filet', # NEW
+       'label_message' => 'Obtenir un message', # NEW
+       'label_msg_abandon' => 'Sur abandon', # NEW
+       'label_msg_no_change' => 'Si pas de changement', # NEW
+       'label_reduire_logo' => 'Réduire les logos', # NEW
+       'label_yellow_fade' => 'Fade', # NEW
+       'legend_controleur_hyperlien' => 'Hyperlien', # NEW
+       'legend_controleur_logo' => 'Choisir un logo :', # NEW
+       'legend_controleur_logo_remplacer' => 'Remplacer ce logo', # NEW
+       'legend_controleur_qui' => 'Qui ?', # NEW
+       'legend_controleur_vignette' => 'Choisir une vignette :', # NEW
+       'legend_controleur_vignette_remplacer' => 'Remplacer cette vignette', # NEW
+       'legend_editer_prive' => 'Éditer l\'espace privé (expérimental)', # NEW
+       'legend_introduction_article' => 'Texte introductif de l\'article', # NEW
+
+       // M
+       'message_image_obligatoire' => 'Il faut choisir une image', # NEW
+       'messages' => 'Messages', # NEW
+       'modifie_par_ailleurs' => '已經被修改過',
+
+       // N
+       'non_autorise' => '不被允許',
+       'non_implemente' => '尚未支援',
+
+       // P
+       'pas_de_modification' => '沒有修改過',
+       'pas_de_valeur' => '無指定值',
+
+       // S
+       'sauvegarder' => '儲存修改過的資料 ?',
+       'svp_copier_coller' => '對不起,我們建議您複製/貼上您的修改',
+
+       // T
+       'titre_config_crayons' => 'Configurer les crayons', # NEW
+       'titre_crayons' => 'Crayons', # NEW
+
+       // U
+       'update_impossible' => 'La mise à jour a échoué.', # NEW
+
+       // V
+       'veuillez_patienter' => '請稍後...'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons.xml b/www/plugins/crayons/lang/paquet-crayons.xml
new file mode 100644 (file)
index 0000000..4398114
--- /dev/null
@@ -0,0 +1,19 @@
+<traduction module="paquet-crayons" gestionnaire="salvatore" url="http://trad.spip.net" source="svn://zone.spip.org/spip-zone/_plugins_/crayons/lang/" reference="fr">
+       <langue code="ar" />
+       <langue code="de" />
+       <langue code="en" />
+       <langue code="es" url="http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=es">
+               <traducteur nom="dani" lien="http://trad.spip.net/auteur/dani" />
+       </langue>
+       <langue code="fr" />
+       <langue code="it" />
+       <langue code="nl" url="http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=nl">
+               <traducteur nom="Suske" lien="http://trad.spip.net/auteur/suske" />
+       </langue>
+       <langue code="ru" url="http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=ru">
+               <traducteur nom="Serge Markitanenko" lien="http://trad.spip.net/auteur/serge-markitanenko" />
+       </langue>
+       <langue code="sk" url="http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=sk">
+               <traducteur nom="jaro" lien="http://trad.spip.net/auteur/jaro" />
+       </langue>
+</traduction>
diff --git a/www/plugins/crayons/lang/paquet-crayons_ar.php b/www/plugins/crayons/lang/paquet-crayons_ar.php
new file mode 100644 (file)
index 0000000..bda2a8a
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=ar
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'هذا الملحق، {{المتوافر للاصدار ١.٩.٢ فقط}} يقدم وظائف تحرير سريعة من في صفحات الموقع العمومي. للاستفادة منه يجب انشاء صفحات نموذجية متوافقة معه.
+
+كما في صفحات الاصدار 1.9.2 النموذجية يكفي ادخال علامة {#EDIT} في كل مكان نريد تحريره. مثلاً، ليصبح العنوان قابل للتحرير:
+_ <code><h1 class="#EDIT{titre} علامات اخرى">#TITRE</h1></code>.',
+       'crayons_nom' => 'القلم',
+       'crayons_slogan' => 'هذا الملحق، {{المتوافر للاصدار ١'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_de.php b/www/plugins/crayons/lang/paquet-crayons_de.php
new file mode 100644 (file)
index 0000000..c65267d
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=de
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Änderungen in öffentlichen Seiten direkt erledigen, Vorausetzung für Wikis mit SPIP',
+       'crayons_nom' => 'Der Stift',
+       'crayons_slogan' => 'Änderungen in öffentlichen Seiten direkt erledigen, Vorausetzung für Wikis mit SPIP'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_en.php b/www/plugins/crayons/lang/paquet-crayons_en.php
new file mode 100644 (file)
index 0000000..6c6c838
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=en
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Quick editing from the public pages of the site.',
+       'crayons_nom' => 'Pencils',
+       'crayons_slogan' => 'Quick editing from the public pages of the site'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_es.php b/www/plugins/crayons/lang/paquet-crayons_es.php
new file mode 100644 (file)
index 0000000..2033181
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=es
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Modificación rápida desde las páginas públicas del sitio.',
+       'crayons_nom' => 'Lápices',
+       'crayons_slogan' => 'Edición rápida desde las páginas publicas del sitio'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_fr.php b/www/plugins/crayons/lang/paquet-crayons_fr.php
new file mode 100644 (file)
index 0000000..c6d29e6
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// Fichier source, a modifier dans svn://zone.spip.org/spip-zone/_plugins_/crayons/lang/
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Édition rapide depuis les pages publiques du site.',
+       'crayons_nom' => 'Crayons',
+       'crayons_slogan' => 'Édition rapide depuis les pages publiques du site'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_it.php b/www/plugins/crayons/lang/paquet-crayons_it.php
new file mode 100644 (file)
index 0000000..4c0bccd
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=it
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Modifica rapida dalle pagine pubbliche del sito.',
+       'crayons_nom' => 'Pennarelli',
+       'crayons_slogan' => 'Modifica rapida dalle pagine pubbliche del sito'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_nl.php b/www/plugins/crayons/lang/paquet-crayons_nl.php
new file mode 100644 (file)
index 0000000..52bac09
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=nl
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Snel bewerken van de publieke pagina\'s van de site.',
+       'crayons_nom' => 'Potloden',
+       'crayons_slogan' => 'Snel bewerken van de publieke pagina\'s van de site.'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_ru.php b/www/plugins/crayons/lang/paquet-crayons_ru.php
new file mode 100644 (file)
index 0000000..8ad6491
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=ru
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Позволяет редактировать информацию прямо на сайте, не заходя в административную часть.',
+       'crayons_nom' => 'Карандаш (Crayons)',
+       'crayons_slogan' => 'Позволяет редактировать информацию прямо на сайте, не заходя в административную часть'
+);
+
+?>
diff --git a/www/plugins/crayons/lang/paquet-crayons_sk.php b/www/plugins/crayons/lang/paquet-crayons_sk.php
new file mode 100644 (file)
index 0000000..887f14c
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
+// extrait automatiquement de http://trad.spip.net/tradlang_module/paquet-crayons?lang_cible=sk
+// ** ne pas modifier le fichier **
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+       // C
+       'crayons_description' => 'Rýchle úpravy z verejne prístupnej stránky.',
+       'crayons_nom' => 'Farbičky',
+       'crayons_slogan' => 'Rýchle úpravy z verejne prístupnej stránky.'
+);
+
+?>
diff --git a/www/plugins/crayons/lib/JavaScriptPacker/class.JavaScriptPacker.php b/www/plugins/crayons/lib/JavaScriptPacker/class.JavaScriptPacker.php
new file mode 100644 (file)
index 0000000..ac82490
--- /dev/null
@@ -0,0 +1,773 @@
+<?php
+/* 7 December 2006. version 1.0
+ * 
+ * This is the php version of the Dean Edwards JavaScript 's Packer,
+ * Based on :
+ * 
+ * ParseMaster, version 1.0.2 (2005-08-19) Copyright 2005, Dean Edwards
+ * a multi-pattern parser.
+ * KNOWN BUG: erroneous behavior when using escapeChar with a replacement
+ * value that is a function
+ * 
+ * packer, version 2.0.2 (2005-08-19) Copyright 2004-2005, Dean Edwards
+ * 
+ * License: http://creativecommons.org/licenses/LGPL/2.1/
+ * 
+ * Ported to PHP by Nicolas Martin.
+ * modified by Mark Fabrizio Jr. to work with php 4 
+ * 
+ * ----------------------------------------------------------------------
+ * 
+ * examples of usage :
+ * $myPacker = new JavaScriptPacker($script, 62, true, false);
+ * $packed = $myPacker->pack();
+ * 
+ * or
+ * 
+ * $myPacker = new JavaScriptPacker($script, 'Normal', true, false);
+ * $packed = $myPacker->pack();
+ * 
+ * or (default values)
+ * 
+ * $myPacker = new JavaScriptPacker($script);
+ * $packed = $myPacker->pack();
+ * 
+ * 
+ * params of the constructor :
+ * $script:       the JavaScript to pack, string.
+ * $encoding:     level of encoding, int or string :
+ *                0,10,62,95 or 'None', 'Numeric', 'Normal', 'High ASCII'.
+ *                default: 62.
+ * $fastDecode:   include the fast decoder in the packed result, boolean.
+ *                default : true.
+ * $specialChars: if you are flagged your private and local variables
+ *                in the script, boolean.
+ *                default: false.
+ * 
+ * The pack() method return the compressed JavasScript, as a string.
+ * 
+ * see http://dean.edwards.name/packer/usage/ for more information.
+ * 
+ * Notes :
+ * # [del]need PHP 5 . Tested with PHP 5.1.2[/del]
+ *   this is a modified version for PHP 4
+ * 
+ * # The packed result may be different than with the Dean Edwards
+ *   version, but with the same length. The reason is that the PHP
+ *   function usort to sort array don't necessarily preserve the
+ *   original order of two equal member. The Javascript sort function
+ *   in fact preserve this order (but that's not require by the
+ *   ECMAScript standard). So the encoded keywords order can be
+ *   different in the two results.
+ * 
+ * # Be careful with the 'High ASCII' Level encoding if you use
+ *   UTF-8 in your files... 
+ */
+ /*
+ * modified by Mark Fabrizio Jr. to work with php 4
+ */
+
+
+class JavaScriptPacker {
+       var $IGNORE = '$1';
+
+       // validate parameters
+       var $_script = '';
+       var $_encoding = 62;
+       var $_fastDecode = true;
+       var $_specialChars = false;
+       
+       var $LITERAL_ENCODING = array(
+               'None' => 0,
+               'Numeric' => 10,
+               'Normal' => 62,
+               'High ASCII' => 95
+       );
+       
+// http://doc.spip.org/@JavaScriptPacker
+       function JavaScriptPacker($_script, $_encoding = 62, $_fastDecode = true, $_specialChars = false)
+       {
+               $this->_script = $_script . "\n";
+               if (array_key_exists($_encoding, $this->LITERAL_ENCODING))
+                       $_encoding = $this->LITERAL_ENCODING[$_encoding];
+               $this->_encoding = min((int)$_encoding, 95);
+               $this->_fastDecode = $_fastDecode;      
+               $this->_specialChars = $_specialChars;
+       }
+       
+// http://doc.spip.org/@pack
+       function pack() {
+               $this->_addParser('_basicCompression');
+               if ($this->_specialChars)
+                       $this->_addParser('_encodeSpecialChars');
+               if ($this->_encoding)
+                       $this->_addParser('_encodeKeywords');
+               
+               // go!
+               return $this->_pack($this->_script);
+       }
+       
+       // apply all parsing routines
+// http://doc.spip.org/@_pack
+       function _pack($script) {
+               for ($i = 0; isset($this->_parsers[$i]); $i++) {
+                       $script = call_user_func(array(&$this,$this->_parsers[$i]), $script);
+               }
+               return $script;
+       }
+       
+       // keep a list of parsing functions, they'll be executed all at once
+       var $_parsers = array();
+// http://doc.spip.org/@_addParser
+       function _addParser($parser) {
+               $this->_parsers[] = $parser;
+       }
+       
+       // zero encoding - just removal of white space and comments
+// http://doc.spip.org/@_basicCompression
+       function _basicCompression($script) {
+               $parser = new ParseMaster();
+               // make safe
+               $parser->escapeChar = '\\';
+               // protect strings
+               $parser->add('/\'[^\'\\n\\r]*\'/',$this->IGNORE);
+               $parser->add('/"[^"\\n\\r]*"/', $this->IGNORE);
+               // remove comments
+               $parser->add('/\\/\\/[^\\n\\r]*[\\n\\r]/', ' ');
+               $parser->add('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//', ' ');
+               // protect regular expressions
+               $parser->add('/\\s+(\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?)/', '$2'); // IGNORE
+               $parser->add('/[^\\w\\x24\\/\'"*)\\?:]\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?/', $this->IGNORE);
+               // remove: ;;; doSomething();
+               if ($this->_specialChars) $parser->add('/;;;[^\\n\\r]+[\\n\\r]/');
+               // remove redundant semi-colons
+               $parser->add('/\\(;;\\)/', $this->IGNORE); // protect for (;;) loops
+               $parser->add('/;+\\s*([};])/', '$2');
+               // apply the above
+               $script = $parser->exec($script);
+
+               // remove white-space
+#              $parser->add('/(\\b|\\x24)\\s+(\\b|\\x24)/', '$2 $3');
+#              $parser->add('/([+\\-])\\s+([+\\-])/', '$2 $3');
+#              $parser->add('/\\s+/', '');
+# Modif fil@rezo.net pour conserver les \n
+               $parser->add('/(\\b|\\x24)[\\t ]+(\\b|\\x24)/', '$2 $3');
+               $parser->add('/([+\\-])[\\t ]+([+\\-])/', '$2 $3');
+               $parser->add('/[\\t ]+/', '');
+               $parser->add('/\\s+/', "\n");
+               // done
+               return $parser->exec($script);
+       }
+       
+// http://doc.spip.org/@_encodeSpecialChars
+       function _encodeSpecialChars($script) {
+               $parser = new ParseMaster();
+               // replace: $name -> n, $$name -> na
+               $parser->add('/((\\x24+)([a-zA-Z$_]+))(\\d*)/',
+                                        array('fn' => '_replace_name')
+               );
+               // replace: _name -> _0, double-underscore (__name) is ignored
+               $regexp = '/\\b_[A-Za-z\\d]\\w*/';
+               // build the word list
+               $keywords = $this->_analyze($script, $regexp, '_encodePrivate');
+               // quick ref
+               $encoded = $keywords['encoded'];
+               
+               $parser->add($regexp,
+                       array(
+                               'fn' => '_replace_encoded',
+                               'data' => $encoded
+                       )
+               );
+               return $parser->exec($script);
+       }
+       
+// http://doc.spip.org/@_encodeKeywords
+       function _encodeKeywords($script) {
+               // escape high-ascii values already in the script (i.e. in strings)
+               if ($this->_encoding > 62)
+                       $script = $this->_escape95($script);
+               // create the parser
+               $parser = new ParseMaster();
+               $encode = $this->_getEncoder($this->_encoding);
+               // for high-ascii, don't encode single character low-ascii
+               $regexp = ($this->_encoding > 62) ? '/\\w\\w+/' : '/\\w+/';
+               // build the word list
+               $keywords = $this->_analyze($script, $regexp, $encode);
+               $encoded = $keywords['encoded'];
+               
+               // encode
+               $parser->add($regexp,
+                       array(
+                               'fn' => '_replace_encoded',
+                               'data' => $encoded
+                       )
+               );
+               if (empty($script)) return $script;
+               else {
+                       //$res = $parser->exec($script);
+                       //$res = $this->_bootStrap($res, $keywords);
+                       //return $res;
+                       return $this->_bootStrap($parser->exec($script), $keywords);
+               }
+       }
+       
+// http://doc.spip.org/@_analyze
+       function _analyze($script, $regexp, $encode) {
+               // analyse
+               // retreive all words in the script
+               $all = array();
+               preg_match_all($regexp, $script, $all);
+               $_sorted = array(); // list of words sorted by frequency
+               $_encoded = array(); // dictionary of word->encoding
+               $_protected = array(); // instances of "protected" words
+               $all = $all[0]; // simulate the javascript comportement of global match
+               if (!empty($all)) {
+                       $unsorted = array(); // same list, not sorted
+                       $protected = array(); // "protected" words (dictionary of word->"word")
+                       $value = array(); // dictionary of charCode->encoding (eg. 256->ff)
+                       $this->_count = array(); // word->count
+                       $i = count($all); $j = 0; //$word = null;
+                       // count the occurrences - used for sorting later
+                       do {
+                               --$i;
+                               $word = '$' . $all[$i];
+                               if (!isset($this->_count[$word])) {
+                                       $this->_count[$word] = 0;
+                                       $unsorted[$j] = $word;
+                                       // make a dictionary of all of the protected words in this script
+                                       //  these are words that might be mistaken for encoding
+                                       //if (is_string($encode) && method_exists($this, $encode))
+                                       $values[$j] = call_user_func(array(&$this, $encode), $j);
+                                       $protected['$' . $values[$j]] = $j++;
+                               }
+                               // increment the word counter
+                               $this->_count[$word]++;
+                       } while ($i > 0);
+                       // prepare to sort the word list, first we must protect
+                       //  words that are also used as codes. we assign them a code
+                       //  equivalent to the word itself.
+                       // e.g. if "do" falls within our encoding range
+                       //      then we store keywords["do"] = "do";
+                       // this avoids problems when decoding
+                       $i = count($unsorted);
+                       do {
+                               $word = $unsorted[--$i];
+                               if (isset($protected[$word]) /*!= null*/) {
+                                       $_sorted[$protected[$word]] = substr($word, 1);
+                                       $_protected[$protected[$word]] = true;
+                                       $this->_count[$word] = 0;
+                               }
+                       } while ($i);
+                       
+                       // sort the words by frequency
+                       // Note: the javascript and php version of sort can be different :
+                       // in php manual, usort :
+                       // " If two members compare as equal,
+                       // their order in the sorted array is undefined."
+                       // so the final packed script is different of the Dean's javascript version
+                       // but equivalent.
+                       // the ECMAscript standard does not guarantee this behaviour,
+                       // and thus not all browsers (e.g. Mozilla versions dating back to at
+                       // least 2003) respect this. 
+                       usort($unsorted, array(&$this, '_sortWords'));
+                       $j = 0;
+                       // because there are "protected" words in the list
+                       //  we must add the sorted words around them
+                       do {
+                               if (!isset($_sorted[$i]))
+                                       $_sorted[$i] = substr($unsorted[$j++], 1);
+                               $_encoded[$_sorted[$i]] = $values[$i];
+                       } while (++$i < count($unsorted));
+               }
+               return array(
+                       'sorted'  => $_sorted,
+                       'encoded' => $_encoded,
+                       'protected' => $_protected);
+       }
+       
+       var $_count = array();
+// http://doc.spip.org/@_sortWords
+       function _sortWords($match1, $match2) {
+               return $this->_count[$match2] - $this->_count[$match1];
+       }
+       
+       // build the boot function used for loading and decoding
+// http://doc.spip.org/@_bootStrap
+       function _bootStrap($packed, $keywords) {
+               $ENCODE = $this->_safeRegExp('$encode\\($count\\)');
+
+               // $packed: the packed script
+               $packed = "'" . $this->_escape($packed) . "'";
+
+               // $ascii: base for encoding
+               $ascii = min(count($keywords['sorted']), $this->_encoding);
+               if ($ascii == 0) $ascii = 1;
+
+               // $count: number of words contained in the script
+               $count = count($keywords['sorted']);
+
+               // $keywords: list of words contained in the script
+               foreach ($keywords['protected'] as $i=>$value) {
+                       $keywords['sorted'][$i] = '';
+               }
+               // convert from a string to an array
+               ksort($keywords['sorted']);
+               $keywords = "'" . implode('|',$keywords['sorted']) . "'.split('|')";
+
+               $encode = ($this->_encoding > 62) ? '_encode95' : $this->_getEncoder($ascii);
+               $encode = $this->_getJSFunction($encode);
+               $encode = preg_replace('/_encoding/','$ascii', $encode);
+               $encode = preg_replace('/arguments\\.callee/','$encode', $encode);
+               $inline = '\\$count' . ($ascii > 10 ? '.toString(\\$ascii)' : '');
+
+               // $decode: code snippet to speed up decoding
+               if ($this->_fastDecode) {
+                       // create the decoder
+                       $decode = $this->_getJSFunction('_decodeBody');
+                       if ($this->_encoding > 62)
+                               $decode = preg_replace('/\\\\w/', '[\\xa1-\\xff]', $decode);
+                       // perform the encoding inline for lower ascii values
+                       elseif ($ascii < 36)
+                               $decode = preg_replace($ENCODE, $inline, $decode);
+                       // special case: when $count==0 there are no keywords. I want to keep
+                       //  the basic shape of the unpacking funcion so i'll frig the code...
+                       if ($count == 0)
+                               $decode = preg_replace($this->_safeRegExp('($count)\\s*=\\s*1'), '$1=0', $decode, 1);
+               }
+
+               // boot function
+               $unpack = $this->_getJSFunction('_unpack');
+               if ($this->_fastDecode) {
+                       // insert the decoder
+                       $this->buffer = $decode;
+                       $unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastDecode'), $unpack, 1);
+               }
+               $unpack = preg_replace('/"/', "'", $unpack);
+               if ($this->_encoding > 62) { // high-ascii
+                       // get rid of the word-boundaries for regexp matches
+                       $unpack = preg_replace('/\'\\\\\\\\b\'\s*\\+|\\+\s*\'\\\\\\\\b\'/', '', $unpack);
+               }
+               if ($ascii > 36 || $this->_encoding > 62 || $this->_fastDecode) {
+                       // insert the encode function
+                       $this->buffer = $encode;
+                       $unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastEncode'), $unpack, 1);
+               } else {
+                       // perform the encoding inline
+                       $unpack = preg_replace($ENCODE, $inline, $unpack);
+               }
+               // pack the boot function too
+               $unpackPacker = new JavaScriptPacker($unpack, 0, false, true);
+               $unpack = $unpackPacker->pack();
+               
+               // arguments
+               $params = array($packed, $ascii, $count, $keywords);
+               if ($this->_fastDecode) {
+                       $params[] = 0;
+                       $params[] = '{}';
+               }
+               $params = implode(',', $params);
+               
+               // the whole thing
+               return 'eval(' . $unpack . '(' . $params . "))\n";
+       }
+       
+       var $buffer;
+// http://doc.spip.org/@_insertFastDecode
+       function _insertFastDecode($match) {
+               return '{' . $this->buffer . ';';
+       }
+// http://doc.spip.org/@_insertFastEncode
+       function _insertFastEncode($match) {
+               return '{$encode=' . $this->buffer . ';';
+       }
+       
+       // mmm.. ..which one do i need ??
+// http://doc.spip.org/@_getEncoder
+       function _getEncoder($ascii) {
+               return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ?
+                      '_encode95' : '_encode62' : '_encode36' : '_encode10';
+       }
+       
+       // zero encoding
+       // characters: 0123456789
+// http://doc.spip.org/@_encode10
+       function _encode10($charCode) {
+               return $charCode;
+       }
+       
+       // inherent base36 support
+       // characters: 0123456789abcdefghijklmnopqrstuvwxyz
+// http://doc.spip.org/@_encode36
+       function _encode36($charCode) {
+               return base_convert($charCode, 10, 36);
+       }
+       
+       // hitch a ride on base36 and add the upper case alpha characters
+       // characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+// http://doc.spip.org/@_encode62
+       function _encode62($charCode) {
+               $res = '';
+               if ($charCode >= $this->_encoding) {
+                       $res = $this->_encode62((int)($charCode / $this->_encoding));
+               }
+               $charCode = $charCode % $this->_encoding;
+               
+               if ($charCode > 35)
+                       return $res . chr($charCode + 29);
+               else
+                       return $res . base_convert($charCode, 10, 36);
+       }
+       
+       // use high-ascii values
+       // characters: Â¡Â¢Â£Â¤Â¥Â¦Â§Â¨Â©ÂªÂ«Â¬Â­Â®Â¯Â°Â±Â²Â³Â´ÂµÂ¶Â·Â¸Â¹ÂºÂ»Â¼Â½Â¾Â¿Ã\80Ã?Ã\82Ã\83Ã\84Ã\85Ã\86Ã\87Ã\88Ã\89Ã\8aÃ\8bÃ\8cÃ?Ã\8eÃ?Ã?Ã\91Ã\92Ã\93Ã\94Ã\95Ã\96Ã\97Ã\98Ã\99Ã\9aÃ\9bÃ\9cÃ?Ã\9eÃ\9fàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ
+// http://doc.spip.org/@_encode95
+       function _encode95($charCode) {
+               $res = '';
+               if ($charCode >= $this->_encoding)
+                       $res = $this->_encode95($charCode / $this->_encoding);
+               
+               return $res . chr(($charCode % $this->_encoding) + 161);
+       }
+       
+// http://doc.spip.org/@_safeRegExp
+       function _safeRegExp($string) {
+               return '/'.preg_replace('/\$/', '\\\$', $string).'/';
+       }
+       
+// http://doc.spip.org/@_encodePrivate
+       function _encodePrivate($charCode) {
+               return "_" . $charCode;
+       }
+       
+       // protect characters used by the parser
+// http://doc.spip.org/@_escape
+       function _escape($script) {
+               return preg_replace('/([\\\\\'])/', '\\\$1', $script);
+       }
+       
+       // protect high-ascii characters already in the script
+// http://doc.spip.org/@_escape95
+       function _escape95($script) {
+               return preg_replace_callback(
+                       '/[\\xa1-\\xff]/',
+                       array(&$this, '_escape95Bis'),
+                       $script
+               );
+       }
+// http://doc.spip.org/@_escape95Bis
+       function _escape95Bis($match) {
+               return '\x'.((string)dechex(ord($match)));
+       }
+       
+       
+// http://doc.spip.org/@_getJSFunction
+       function _getJSFunction($aName) {
+               $func = 'JSFUNCTION'.$aName;
+               if (isset($this->$func)){
+                       return $this->$func;
+               }
+               else 
+                       return '';
+       }
+       
+       // JavaScript Functions used.
+       // Note : In Dean's version, these functions are converted
+       // with 'String(aFunctionName);'.
+       // This internal conversion complete the original code, ex :
+       // 'while (aBool) anAction();' is converted to
+       // 'while (aBool) { anAction(); }'.
+       // The JavaScript functions below are corrected.
+       
+       // unpacking function - this is the boot strap function
+       //  data extracted from this packing routine is passed to
+       //  this function when decoded in the target
+       // NOTE ! : without the ';' final.
+       var $JSFUNCTION_unpack = 'function($packed, $ascii, $count, $keywords, $encode, $decode) {
+    while ($count--) {
+        if ($keywords[$count]) {
+            $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]);
+        }
+    }
+    return $packed;
+}';
+/*
+'function($packed, $ascii, $count, $keywords, $encode, $decode) {
+    while ($count--)
+        if ($keywords[$count])
+            $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]);
+    return $packed;
+}';
+*/
+       
+       // code-snippet inserted into the unpacker to speed up decoding
+       var $JSFUNCTION_decodeBody = '    if (!\'\'.replace(/^/, String)) {
+        // decode all the values we need
+        while ($count--) {
+            $decode[$encode($count)] = $keywords[$count] || $encode($count);
+        }
+        // global replacement function
+        $keywords = [function ($encoded) {return $decode[$encoded]}];
+        // generic match
+        $encode = function () {return \'\\\\w+\'};
+        // reset the loop counter -  we are now doing a global replace
+        $count = 1;
+    }
+';
+//};
+/*
+'      if (!\'\'.replace(/^/, String)) {
+        // decode all the values we need
+        while ($count--) $decode[$encode($count)] = $keywords[$count] || $encode($count);
+        // global replacement function
+        $keywords = [function ($encoded) {return $decode[$encoded]}];
+        // generic match
+        $encode = function () {return\'\\\\w+\'};
+        // reset the loop counter -  we are now doing a global replace
+        $count = 1;
+    }';
+*/
+       
+        // zero encoding
+        // characters: 0123456789
+        var $JSFUNCTION_encode10 = 'function($charCode) {
+    return $charCode;
+}';//;';
+       
+        // inherent base36 support
+        // characters: 0123456789abcdefghijklmnopqrstuvwxyz
+        var $JSFUNCTION_encode36 = 'function($charCode) {
+    return $charCode.toString(36);
+}';//;';
+       
+       // hitch a ride on base36 and add the upper case alpha characters
+       // characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+       var $JSFUNCTION_encode62 = 'function($charCode) {
+    return ($charCode < _encoding ? \'\' : arguments.callee(parseInt($charCode / _encoding))) +
+    (($charCode = $charCode % _encoding) > 35 ? String.fromCharCode($charCode + 29) : $charCode.toString(36));
+}';
+       
+       // use high-ascii values
+       // characters: Â¡Â¢Â£Â¤Â¥Â¦Â§Â¨Â©ÂªÂ«Â¬Â­Â®Â¯Â°Â±Â²Â³Â´ÂµÂ¶Â·Â¸Â¹ÂºÂ»Â¼Â½Â¾Â¿Ã\80Ã?Ã\82Ã\83Ã\84Ã\85Ã\86Ã\87Ã\88Ã\89Ã\8aÃ\8bÃ\8cÃ?Ã\8eÃ?Ã?Ã\91Ã\92Ã\93Ã\94Ã\95Ã\96Ã\97Ã\98Ã\99Ã\9aÃ\9bÃ\9cÃ?Ã\9eÃ\9fàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ
+       var $JSFUNCTION_encode95 = 'function($charCode) {
+    return ($charCode < _encoding ? \'\' : arguments.callee($charCode / _encoding)) +
+        String.fromCharCode($charCode % _encoding + 161);
+}'; 
+       
+}
+
+
+class ParseMaster {
+       var $ignoreCase = false;
+       var $escapeChar = '';
+       
+       // constants
+       var $EXPRESSION = 0;
+       var $REPLACEMENT = 1;
+       var $LENGTH = 2;
+       
+       // used to determine nesting levels
+       var $GROUPS = '/\\(/';//g
+       var $SUB_REPLACE = '/\\$\\d/';
+       var $INDEXED = '/^\\$\\d+$/';
+       var $TRIM = '/([\'"])\\1\\.(.*)\\.\\1\\1$/';
+       var $ESCAPE = '/\\\./';//g
+       var $QUOTE = '/\'/';
+       var $DELETED = '/\\x01[^\\x01]*\\x01/';//g
+       
+// http://doc.spip.org/@add
+       function add($expression, $replacement = '') {
+               // count the number of sub-expressions
+               //  - add one because each pattern is itself a sub-expression
+               $length = 1 + preg_match_all($this->GROUPS, $this->_internalEscape((string)$expression), $out);
+               
+               // treat only strings $replacement
+               if (is_string($replacement)) {
+                       // does the pattern deal with sub-expressions?
+                       if (preg_match($this->SUB_REPLACE, $replacement)) {
+                               // a simple lookup? (e.g. "$2")
+                               if (preg_match($this->INDEXED, $replacement)) {
+                                       // store the index (used for fast retrieval of matched strings)
+                                       $replacement = (int)(substr($replacement, 1)) - 1;
+                               } else { // a complicated lookup (e.g. "Hello $2 $1")
+                                       // build a function to do the lookup
+                                       $quote = preg_match($this->QUOTE, $this->_internalEscape($replacement))
+                                                ? '"' : "'";
+                                       $replacement = array(
+                                               'fn' => '_backReferences',
+                                               'data' => array(
+                                                       'replacement' => $replacement,
+                                                       'length' => $length,
+                                                       'quote' => $quote
+                                               )
+                                       );
+                               }
+                       }
+               }
+               // pass the modified arguments
+               if (!empty($expression)) $this->_add($expression, $replacement, $length);
+               else $this->_add('/^$/', $replacement, $length);
+       }
+       
+// http://doc.spip.org/@exec
+       function exec($string) {
+               // execute the global replacement
+               $this->_escaped = array();
+               
+               // simulate the _patterns.toSTring of Dean
+               $regexp = '/';
+               foreach ($this->_patterns as $reg) {
+                       $regexp .= '(' . substr($reg[$this->EXPRESSION], 1, -1) . ')|';
+               }
+               $regexp = substr($regexp, 0, -1) . '/';
+               $regexp .= ($this->ignoreCase) ? 'i' : '';
+               
+               $string = $this->_escape($string, $this->escapeChar);
+               $string = preg_replace_callback(
+                       $regexp,
+                       array(
+                               &$this,
+                               '_replacement'
+                       ),
+                       $string
+               );
+               $string = $this->_unescape($string, $this->escapeChar);
+               
+               return preg_replace($this->DELETED, '', $string);
+       }
+               
+// http://doc.spip.org/@reset
+       function reset() {
+               // clear the patterns collection so that this object may be re-used
+               $this->_patterns = array();
+       }
+
+       // private
+       var $_escaped = array();  // escaped characters
+       var $_patterns = array(); // patterns stored by index
+       
+       // create and add a new pattern to the patterns collection
+// http://doc.spip.org/@_add
+       function _add() {
+               $arguments = func_get_args();
+               $this->_patterns[] = $arguments;
+       }
+       
+       // this is the global replace function (it's quite complicated)
+// http://doc.spip.org/@_replacement
+       function _replacement($arguments) {
+               if (empty($arguments)) return '';
+               
+               $i = 1; $j = 0;
+               // loop through the patterns
+               while (isset($this->_patterns[$j])) {
+                       $pattern = $this->_patterns[$j++];
+                       // do we have a result?
+                       if (isset($arguments[$i]) && ($arguments[$i] != '')) {
+                               $replacement = $pattern[$this->REPLACEMENT];
+                               
+                               if (is_array($replacement) && isset($replacement['fn'])) {
+                                       
+                                       if (isset($replacement['data'])) $this->buffer = $replacement['data'];
+                                       return call_user_func(array(&$this, $replacement['fn']), $arguments, $i);
+                                       
+                               } elseif (is_int($replacement)) {
+                                       return $arguments[$replacement + $i];
+                               
+                               }
+                               $delete = ($this->escapeChar == '' ||
+                                          strpos($arguments[$i], $this->escapeChar) === false)
+                                       ? '' : "\x01" . $arguments[$i] . "\x01";
+                               return $delete . $replacement;
+                       
+                       // skip over references to sub-expressions
+                       } else {
+                               $i += $pattern[$this->LENGTH];
+                       }
+               }
+       }
+       
+// http://doc.spip.org/@_backReferences
+       function _backReferences($match, $offset) {
+               $replacement = $this->buffer['replacement'];
+               $quote = $this->buffer['quote'];
+               $i = $this->buffer['length'];
+               while ($i) {
+                       $replacement = str_replace('$'.$i--, $match[$offset + $i], $replacement);
+               }
+               return $replacement;
+       }
+       
+// http://doc.spip.org/@_replace_name
+       function _replace_name($match, $offset){
+               $length = strlen($match[$offset + 2]);
+               $start = $length - max($length - strlen($match[$offset + 3]), 0);
+               return substr($match[$offset + 1], $start, $length) . $match[$offset + 4];
+       }
+       
+// http://doc.spip.org/@_replace_encoded
+       function _replace_encoded($match, $offset) {
+               return $this->buffer[$match[$offset]];
+       }
+       
+       
+       // php : we cannot pass additional data to preg_replace_callback,
+       // and we cannot use &$this in create_function, so let's go to lower level
+       var $buffer;
+       
+       // encode escaped characters
+// http://doc.spip.org/@_escape
+       function _escape($string, $escapeChar) {
+               if ($escapeChar) {
+                       $this->buffer = $escapeChar;
+                       return preg_replace_callback(
+                               '/\\' . $escapeChar . '(.)' .'/',
+                               array(&$this, '_escapeBis'),
+                               $string
+                       );
+                       
+               } else {
+                       return $string;
+               }
+       }
+// http://doc.spip.org/@_escapeBis
+       function _escapeBis($match) {
+               $this->_escaped[] = $match[1];
+               return $this->buffer;
+       }
+       
+       // decode escaped characters
+// http://doc.spip.org/@_unescape
+       function _unescape($string, $escapeChar) {
+               if ($escapeChar) {
+                       $regexp = '/'.'\\'.$escapeChar.'/';
+                       $this->buffer = array('escapeChar'=> $escapeChar, 'i' => 0);
+                       return preg_replace_callback
+                       (
+                               $regexp,
+                               array(&$this, '_unescapeBis'),
+                               $string
+                       );
+                       
+               } else {
+                       return $string;
+               }
+       }
+// http://doc.spip.org/@_unescapeBis
+       function _unescapeBis() {
+               if (!empty($this->_escaped[$this->buffer['i']])) {
+                        $temp = $this->_escaped[$this->buffer['i']];
+               } else {
+                       $temp = '';
+               }
+               $this->buffer['i']++;
+               return $this->buffer['escapeChar'] . $temp;
+       }
+       
+// http://doc.spip.org/@_internalEscape
+       function _internalEscape($string) {
+               return preg_replace($this->ESCAPE, '', $string);
+       }
+}
+?>
diff --git a/www/plugins/crayons/modeles/uploader_item.html b/www/plugins/crayons/modeles/uploader_item.html
new file mode 100644 (file)
index 0000000..2130b72
--- /dev/null
@@ -0,0 +1,4 @@
+#ENV{erreur}
+<BOUCLE_d(DOCUMENTS){tous}{id_document}>
+&lt;doc#ID_DOCUMENT&gt; #TITRE - [(#LOGO_DOCUMENT|liens_absolus)]
+</BOUCLE_d>
diff --git a/www/plugins/crayons/modeles/uploader_liste.html b/www/plugins/crayons/modeles/uploader_liste.html
new file mode 100644 (file)
index 0000000..4a11ae5
--- /dev/null
@@ -0,0 +1,112 @@
+<style>
+.uploader {border:solid red 1px;}
+.uploader.hover {border:dotted red 1px;}
+.uploader li {border solid transparent 3px; padding-left:10px}
+.uploader li.loading {border:dotted red 3px;}
+.uploader li.ok {border:solid green 3px;}
+
+#uploader#ID_ARTICLE {
+       position: absolute;
+       top: 10px;
+       right: -180px;
+       width: 170px;
+       height: 100%;
+       max-height: 600px;
+       overflow: auto;
+       overflow-x: hidden;
+       background: #eee;
+       border: solid #ccc 1px;
+}
+
+#uploader#ID_ARTICLE.ferme {
+       width: 30px; height: 15px; overflow-x:hide;overflow-y:hide;overflow:hide;
+}
+</style>
+
+
+<div id="uploader#ID_ARTICLE" class="ferme">
+<i>Glissez un document ou une image dans cette zone pour l'ajouter à l'article.</i>
+
+<ul id="uploader_liste" >
+<BOUCLE_d(DOCUMENTS){tous}{id_article}{!par id_document}{0,10}>
+<li>#MODELE{uploader_item,id_document}</li>
+</BOUCLE_d>
+[<li class="pagination">(#PAGINATION)</li>]
+</B_d>
+</ul>
+
+
+</div>
+
+<!--
+/*
+
+$(function(){
+       var fileTemplate="<div id=\"{{id}}\">";
+       fileTemplate+="<div class=\"progressbar\"></div>";
+       fileTemplate+="<div class=\"preview\"></div>";
+       fileTemplate+="<div class=\"filename\">{{filename}}</div>";
+       fileTemplate+="</div>";
+       function slugify(text){
+               text=text.replace(/[^-a-zA-Z0-9,&\s]+/ig,'');
+               text=text.replace(/-/gi,"_");
+               text=text.replace(/\s/gi,"-");
+               return text;
+       }
+
+       $("#dropbox")
+       .html5Uploader({
+               onClientLoadStart:function(e,file){
+                       var upload=$("#upload");
+                       if(upload.is(":hidden")){
+                               upload.show();
+                       }
+                       upload.append(
+                               fileTemplate
+                                       .replace(/{{id}}/g, slugify(file.name))
+                                       .replace(/{{filename}}/g,file.name)
+                       );
+               },
+               onClientLoad:function(e,file){
+                       $("#"+slugify(file.name))
+                       .find(".preview")
+                       .append("<img src=\""+e.target.result+"\" alt=\"\">");
+               },
+               onServerLoadStart:function(e,file){
+                       $("#"+slugify(file.name))
+                       .find(".progressbar")
+                       .progressbar({value:0});
+               },
+               onServerProgress:function(e,file){
+                       if(e.lengthComputable){
+                               var percentComplete=(e.loaded/e.total)*100;
+                               $("#"+slugify(file.name))
+                               .find(".progressbar")
+                                       .progressbar({value:percentComplete});
+                       }
+               },
+               onServerLoad:function(e,file){
+                       $("#"+slugify(file.name))
+                       .find(".progressbar")
+                               .progressbar({value:100});
+               }
+       });
+
+       $(".download")
+       .mousedown(function(){
+               $(this).css({
+                       "background-image":"url('images/download-clicked.png')"
+               });
+       })
+       .mouseup(function(){
+               $(this).css({
+                       "background-image":"url('images/download.png')"
+               });
+       });
+
+
+});
+
+
+*/
+-->
\ No newline at end of file
diff --git a/www/plugins/crayons/paquet.xml b/www/plugins/crayons/paquet.xml
new file mode 100644 (file)
index 0000000..df6437f
--- /dev/null
@@ -0,0 +1,21 @@
+<paquet\r
+       prefix="crayons"\r
+       categorie="edition"\r
+       version="1.16.1"\r
+       etat="stable"\r
+       compatibilite="[1.9.0;*]"\r
+       logo="images/crayon-32.png"\r
+       documentation="http://www.spip-contrib.net/Les-Crayons"\r
+>\r
+       <nom>Crayons</nom>\r
+       \r
+       <auteur>Fil</auteur>\r
+       <auteur>toggg</auteur>\r
+       \r
+       <licence>GNU/GPL</licence>\r
+\r
+       <traduire gestionnaire="salvatore" module="crayons" reference="fr" />\r
+       \r
+       <pipeline nom="affichage_final" inclure="crayons_fonctions.php" />\r
+       <pipeline nom="header_prive" inclure="crayons_fonctions.php" action="insert_head" />\r
+</paquet>\r
diff --git a/www/plugins/crayons/plugin.xml b/www/plugins/crayons/plugin.xml
new file mode 100644 (file)
index 0000000..33c1c67
--- /dev/null
@@ -0,0 +1,59 @@
+<plugin>\r
+       <nom>\r
+       <multi>\r
+       Crayons\r
+       [ar]&#1575;&#1604;&#1602;&#1604;&#1605;\r
+       [it]Pennarelli\r
+       [de]Der Stift\r
+       [en]Pencils\r
+       [ru]Карандаш\r
+       </multi>\r
+       </nom>\r
+       <auteur>\r
+       Fil, toggg\r
+       </auteur>\r
+       <licence>\r
+               &#169; 2006-2013 - GNU/GPL\r
+       </licence>\r
+       <version>\r
+       1.16.1\r
+       </version>\r
+       <etat>\r
+       stable\r
+       </etat>\r
+       <description>\r
+       <multi>\r
+       &#201;dition rapide depuis les pages publiques du site.\r
+       [it] Modifica rapida dalle pagine pubbliche del sito.\r
+       [ar]&#1607;&#1584;&#1575; &#1575;&#1604;&#1605;&#1604;&#1581;&#1602;&#1548; {{&#1575;&#1604;&#1605;&#1578;&#1608;&#1575;&#1601;&#1585; &#1604;&#1604;&#1575;&#1589;&#1583;&#1575;&#1585; &#1633;.&#1641;.&#1634; &#1601;&#1602;&#1591;}} &#1610;&#1602;&#1583;&#1605; &#1608;&#1592;&#1575;&#1574;&#1601; &#1578;&#1581;&#1585;&#1610;&#1585; &#1587;&#1585;&#1610;&#1593;&#1577; &#1605;&#1606; &#1601;&#1610; &#1589;&#1601;&#1581;&#1575;&#1578; &#1575;&#1604;&#1605;&#1608;&#1602;&#1593; &#1575;&#1604;&#1593;&#1605;&#1608;&#1605;&#1610;. &#1604;&#1604;&#1575;&#1587;&#1578;&#1601;&#1575;&#1583;&#1577; &#1605;&#1606;&#1607; &#1610;&#1580;&#1576; &#1575;&#1606;&#1588;&#1575;&#1569; &#1589;&#1601;&#1581;&#1575;&#1578; &#1606;&#1605;&#1608;&#1584;&#1580;&#1610;&#1577; &#1605;&#1578;&#1608;&#1575;&#1601;&#1602;&#1577; &#1605;&#1593;&#1607;.\r
+\r
+&#1603;&#1605;&#1575; &#1601;&#1610; &#1589;&#1601;&#1581;&#1575;&#1578; &#1575;&#1604;&#1575;&#1589;&#1583;&#1575;&#1585; 1.9.2 &#1575;&#1604;&#1606;&#1605;&#1608;&#1584;&#1580;&#1610;&#1577; &#1610;&#1603;&#1601;&#1610; &#1575;&#1583;&#1582;&#1575;&#1604; &#1593;&#1604;&#1575;&#1605;&#1577; {#EDIT} &#1601;&#1610; &#1603;&#1604; &#1605;&#1603;&#1575;&#1606; &#1606;&#1585;&#1610;&#1583; &#1578;&#1581;&#1585;&#1610;&#1585;&#1607;. &#1605;&#1579;&#1604;&#1575;&#1611;&#1548; &#1604;&#1610;&#1589;&#1576;&#1581; &#1575;&#1604;&#1593;&#1606;&#1608;&#1575;&#1606; &#1602;&#1575;&#1576;&#1604; &#1604;&#1604;&#1578;&#1581;&#1585;&#1610;&#1585;:\r
+_ <code><h1 class="#EDIT{titre} &#1593;&#1604;&#1575;&#1605;&#1575;&#1578; &#1575;&#1582;&#1585;&#1609;">#TITRE</h1></code>.\r
+       [de]&#196;nderungen in &#246;ffentlichen Seiten direkt erledigen, Vorausetzung f&#252;r Wikis mit SPIP\r
+       [en]Quick editing from the public pages of the site.\r
+       [ru]Позволяет редактировать информацию прямо на сайте, не заходя в административную часть.\r
+       </multi>\r
+       </description>\r
+       <lien>http://www.spip-contrib.net/Les-Crayons</lien>\r
+       <prefix>\r
+       Crayons\r
+       </prefix>\r
+       <icon>\r
+       images/crayon-128.png\r
+       </icon>\r
+       <fonctions>crayons_fonctions.php</fonctions>\r
+       <pipeline>\r
+               <nom>affichage_final</nom>\r
+               <inclure>crayons_fonctions.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>header_prive</nom>\r
+               <action>insert_head</action>\r
+               <inclure>crayons_fonctions.php</inclure>\r
+       </pipeline>\r
+       <chemin dir='' />\r
+       <categorie>edition</categorie>\r
+       <necessite id="SPIP" version="[1.9.0;3.0.0]" />\r
+       <!-- utilise id="cfg" version="[1.14.1;]" / -->\r
+       <traduire gestionnaire="salvatore" module="crayons" reference="fr" />\r
+</plugin>\r
diff --git a/www/plugins/crayons/prive/squelettes/contenu/configurer_crayons.html b/www/plugins/crayons/prive/squelettes/contenu/configurer_crayons.html
new file mode 100644 (file)
index 0000000..14a7388
--- /dev/null
@@ -0,0 +1,5 @@
+#CACHE{0}\r
+[(#AUTORISER{configurer}|sinon_interdire_acces)]\r
+<div class="ajax">\r
+#FORMULAIRE_CONFIGURER_CRAYONS\r
+</div>\r
diff --git a/www/plugins/crayons/svn.revision b/www/plugins/crayons/svn.revision
new file mode 100644 (file)
index 0000000..7ffcffa
--- /dev/null
@@ -0,0 +1,10 @@
+<svn_revision>
+<text_version>
+Origine: file:///home/svn/repository/spip-zone/_plugins_/crayons
+Revision: 73111
+Dernier commit: 2013-05-31 10:42:21 +0200 
+</text_version>
+<origine>file:///home/svn/repository/spip-zone/_plugins_/crayons</origine>
+<revision>73111</revision>
+<commit>2013-05-31 10:42:21 +0200 </commit>
+</svn_revision>
\ No newline at end of file
diff --git a/www/plugins/crayons/tetecrayons.php b/www/plugins/crayons/tetecrayons.php
new file mode 100644 (file)
index 0000000..ffa6c8a
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+// Compatibilite eventuelle pour les plugins.
+// Ce fichier est normallement inutile.
+
+include_spip('crayons_fonctions');
+
+?>
diff --git a/www/plugins/crayons/vues/article_intro.html b/www/plugins/crayons/vues/article_intro.html
new file mode 100644 (file)
index 0000000..f9fcdbf
--- /dev/null
@@ -0,0 +1,9 @@
+[(#REM)
+
+       Vue pour le crayon 'article_intro'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#INTRODUCTION
+</BOUCLE_a>
diff --git a/www/plugins/crayons/vues/article_intro2.html b/www/plugins/crayons/vues/article_intro2.html
new file mode 100644 (file)
index 0000000..9e62a1f
--- /dev/null
@@ -0,0 +1,9 @@
+[(#REM)
+
+       Vue pour le crayon 'article_intro3'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#INTRODUCTION
+</BOUCLE_a>
diff --git a/www/plugins/crayons/vues/article_intro3.html b/www/plugins/crayons/vues/article_intro3.html
new file mode 100644 (file)
index 0000000..9e62a1f
--- /dev/null
@@ -0,0 +1,9 @@
+[(#REM)
+
+       Vue pour le crayon 'article_intro3'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#INTRODUCTION
+</BOUCLE_a>
diff --git a/www/plugins/crayons/vues/article_introduction.html b/www/plugins/crayons/vues/article_introduction.html
new file mode 100644 (file)
index 0000000..d5ae81e
--- /dev/null
@@ -0,0 +1,9 @@
+[(#REM)
+
+       Vue pour le crayon 'article_introduction'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+#INTRODUCTION
+</BOUCLE_a>
diff --git a/www/plugins/crayons/vues/article_texte.html b/www/plugins/crayons/vues/article_texte.html
new file mode 100644 (file)
index 0000000..5262113
--- /dev/null
@@ -0,0 +1,23 @@
+[(#REM)
+
+       Vue pour le crayon 'article_texte'
+
+       Juste pour le bonheur de tester les limites : la classe
+       imagereduire.NNN associee a #EDIT{texte} provoque l'application
+       du filtre |image_reduire{NNN,0}
+
+]
+#CACHE{0}
+
+[(#REM) met dans la variable r la valeur de la class ]
+[(#SET{r,[(#ENV{class}|match{\bimagereduire\.\d+\b}|match{\b\d+\b})]})]
+
+<BOUCLE_a(ARTICLES){id_article}{statut==.}>
+[(#GET{r}|?{
+       [(#TEXTE|image_reduire{#GET{r},0})]
+,
+       [(#TEXTE|image_reduire{500,0})]
+})]
+</BOUCLE_a>
+
+[<small>(#NOTES)</small>]
diff --git a/www/plugins/crayons/vues/document_fichier.html b/www/plugins/crayons/vues/document_fichier.html
new file mode 100644 (file)
index 0000000..163d7f3
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Vue pour le controleur de document
+
+]
+
+<BOUCLE_d(DOCUMENTS){id_document}>
+
+[(#VAL{<img}|concat{#ID_DOCUMENT}|concat{>}|propre)]
+
+</BOUCLE_d>
\ No newline at end of file
diff --git a/www/plugins/crayons/vues/extra.html b/www/plugins/crayons/vues/extra.html
new file mode 100644 (file)
index 0000000..4e80b8f
--- /dev/null
@@ -0,0 +1,31 @@
+[(#REM)
+
+       Vue pour le crayon 'extra'
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+[(#EXTRA**|extra_affichage{auteurs})]
+</BOUCLE_a>
+
+<BOUCLE_b(ARTICLES){id_article}{statut==.}>
+[(#EXTRA**|extra_affichage{articles})]
+</BOUCLE_b>
+
+<BOUCLE_c(BREVES){id_breve}{statut==.}>
+[(#EXTRA**|extra_affichage{breves})]
+</BOUCLE_c>
+
+<BOUCLE_d(RUBRIQUES){id_rubrique}{statut==.}>
+[(#EXTRA**|extra_affichage{rubriques})]
+</BOUCLE_d>
+
+<BOUCLE_e(SITES){id_syndic=#ENV{id_site}}{statut==.}>
+[(#EXTRA**|extra_affichage{sites})]
+</BOUCLE_e>
+
+<//B_d>
+<//B_c>
+<//B_b>
+<//B_a>
diff --git a/www/plugins/crayons/vues/extra_fonctions.php b/www/plugins/crayons/vues/extra_fonctions.php
new file mode 100644 (file)
index 0000000..9dacf6e
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+       include_spip('inc/extra');
+       include_spip('inc/presentation');
+
+?>
\ No newline at end of file
diff --git a/www/plugins/crayons/vues/hyperlien.html b/www/plugins/crayons/vues/hyperlien.html
new file mode 100644 (file)
index 0000000..2c1d352
--- /dev/null
@@ -0,0 +1,30 @@
+[(#REM)
+
+       Vue pour le crayon 'hyperlien'
+
+]
+#CACHE{0}
+
+[(#REM) Cas general ]
+#SET{titre,#ENV*{nom_site}}
+#SET{url,#ENV*{url_site}}
+
+[(#REM) syndic-article ]
+[(#ENV{id_syndic_article}|?{
+       [(#SET{titre,#ENV*{titre}})]
+       [(#SET{url,#ENV*{url}})]
+})]
+
+[(#REM) breve ]
+[(#ENV{id_breve}|?{
+       [(#SET{titre,#ENV*{lien_titre}})]
+       [(#SET{url,#ENV*{lien_url}})]
+})]
+
+[(#ENV{id_article}|?{' '})<:voir_en_ligne:>&nbsp;:]
+
+[(#GET{url}|?{
+       <a href="[(#GET{url})]" class="spip_out">[(#GET{titre}|typo|sinon{[(#GET{url}|couper{80})]})]</a>
+,
+       [(#GET{titre}|typo|sinon{<:info_sans_titre:>})]
+})]
\ No newline at end of file
diff --git a/www/plugins/crayons/vues/id_parent.html b/www/plugins/crayons/vues/id_parent.html
new file mode 100644 (file)
index 0000000..046d205
--- /dev/null
@@ -0,0 +1,11 @@
+[(#REM)
+
+       Vue pour le crayon id_parent
+       Cf. controleurs/id_parent.html
+
+       nb: teste sur les articles uniquement
+]
+
+<BOUCLE_r(RUBRIQUES){id_rubrique=#ENV{id_rubrique}}>
+#TITRE
+</BOUCLE_r>
diff --git a/www/plugins/crayons/vues/logo.html b/www/plugins/crayons/vues/logo.html
new file mode 100644 (file)
index 0000000..57183f2
--- /dev/null
@@ -0,0 +1,37 @@
+[(#REM)
+
+       Vue du logo qu'on vient d'uploader
+
+       On doit hacker l'url du logo avec sa date pour eviter le cache du navigateur
+
+]
+
+[(#REM) En fonction de du contexte, choisir un logo ]
+
+[(#SET{image,[(#ID_ARTICLE|?{#LOGO_ARTICLE_NORMAL}
+       |sinon{[(#ID_AUTEUR|?{#LOGO_AUTEUR_NORMAL})]}
+       |sinon{[(#ID_BREVE|?{#LOGO_BREVE_NORMAL})]}
+       |sinon{[(#ID_RUBRIQUE|?{#LOGO_RUBRIQUE_NORMAL})]}
+       |sinon{[(#ID_SYNDIC_ARTICLE|?{#LOGO_SYNDIC_ARTICLE_NORMAL})]}
+       |sinon{[(#ID_SYNDIC|?{#LOGO_SITE_NORMAL})]}
+       |sinon{[(#ID_MOT|?{#LOGO_MOT_NORMAL})]})]})]
+
+
+[(#REM) Si la class contient resize-XXX, on appliquera ce filtre au logo ]
+
+[(#SET{resize,[(#ENV{class}|match{\bresize-\d+\b}|replace{resize-})]})]
+
+
+[(#GET{image}|?{
+
+       [(#SET{logo,[(#GET{image}
+               |image_reduire{#GET{resize,0},#GET{resize,120}})]})]
+       [(#SET{url,[(#GET{logo}|extraire_attribut{src}|replace{\?.*$})]})]
+       [(#SET{url,[(#GET{url}|parametre_url{s,#EVAL{time()}})]})]
+       [(#SET{width,[(#GET{logo}|extraire_attribut{width})]})]
+
+       [(#GET{logo}|inserer_attribut{src,#GET{url}})]
+
+,
+       '<small><abbr title="logo">?</abbr></small>'
+})]
diff --git a/www/plugins/crayons/vues/mots_article_brut.html b/www/plugins/crayons/vues/mots_article_brut.html
new file mode 100644 (file)
index 0000000..4b0d461
--- /dev/null
@@ -0,0 +1,17 @@
+[(#REM)
+
+       Vue pour le crayon 'mots_article_brut'
+
+]
+#CACHE{0}
+<BOUCLE_a(ARTICLES){id_article}{lang}{statut==.}>
+<B_moex>
+<ul class="mots_article"><p>Mots-clé pour #TITRE (#ID_ARTICLE)</p>
+<BOUCLE_moex(MOTS){id_article}{doublons}>
+       <li class="#EDIT{id_mot} mots_article">#ID_GROUPE:#ID_MOT : [(#TITRE|entites_html)] </li>
+</BOUCLE_moex>
+</ul>
+</B_moex>
+<p>Pas de mot-clé existant</p>
+<//B_moex>
+</BOUCLE_a>
diff --git a/www/plugins/crayons/vues/qui.html b/www/plugins/crayons/vues/qui.html
new file mode 100644 (file)
index 0000000..a9b0b62
--- /dev/null
@@ -0,0 +1,21 @@
+[(#REM)
+
+       Vue pour le crayon 'qui'
+
+]
+#CACHE{0}
+
+<BOUCLE_a(AUTEURS){id_auteur}{tous}>
+[<a title="(#EMAIL|texte_backend)">][(#NOM|sinon{#EMAIL})][(#EMAIL|?{</a>})]
+</BOUCLE_a>
+
+<BOUCLE_c(SIGNATURES){id_signature}{statut==.}>
+[<a title="(#EMAIL|texte_backend)">][(#NOM|sinon{#EMAIL})][(#EMAIL|?{</a>})]
+</BOUCLE_c>
+
+<BOUCLE_d(FORUMS){id_forum}{statut==.}>
+[<a title="(#EMAIL|texte_backend)">][(#NOM|sinon{#EMAIL})][(#EMAIL|?{</a>})]
+</BOUCLE_d>
+
+<//B_c>
+<//B_a>
diff --git a/www/plugins/crayons/vues/rubrique_id_parent.html b/www/plugins/crayons/vues/rubrique_id_parent.html
new file mode 100644 (file)
index 0000000..bc18685
--- /dev/null
@@ -0,0 +1,5 @@
+
+<BOUCLE_parent(RUBRIQUES){id_rubrique=#ID_PARENT}>
+#TITRE
+</BOUCLE_parent>
+
diff --git a/www/plugins/crayons/vues/vignette.html b/www/plugins/crayons/vues/vignette.html
new file mode 100644 (file)
index 0000000..8d2225f
--- /dev/null
@@ -0,0 +1,18 @@
+[(#REM)
+
+       Vue pour le crayon 'vignette',
+       Ce crayons ne s'applique qu'aux documents
+
+]
+[(#SET{resize,[(#ENV{class}|match{\bresize-\d+\b}|replace{resize-})]})]
+
+[(#SET{image,[(#LOGO_DOCUMENT||image_reduire{#GET{resize,0},#GET{resize,120}})]})]
+
+[(#GET{image}|?{
+
+       [(#SET{url,[(#GET{image}|extraire_attribut{src}|replace{\?.*$})]})]
+       [(#SET{url,[(#GET{url}|parametre_url{s,#EVAL{time()}})]})]
+       [(#SET{width,[(#GET{image}|extraire_attribut{width})]})]
+
+       [(#GET{image}|inserer_attribut{src,#GET{url}})]
+})]
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/css/enluminurestypo.css b/www/plugins/enluminures_typographiques_v3/css/enluminurestypo.css
new file mode 100644 (file)
index 0000000..876c5b3
--- /dev/null
@@ -0,0 +1,50 @@
+.texteencadre-spip {\r
+       color: #000033;\r
+       background: #EEF;\r
+       border-bottom: 2px solid #0066CC;\r
+       border-left: 1px solid #3399FF;\r
+       border-right: 2px solid #0066CC;\r
+       border-top: 1px solid #3399FF;\r
+       margin: 1em 0;  \r
+       padding: .25em; \r
+       position: relative;\r
+}\r
+\r
+.caractencadre-spip {\r
+       color: #F60;\r
+       font-weight: bold;\r
+}\r
+\r
+.caractencadre2-spip {\r
+       color: #009;\r
+       font-weight: bold;\r
+}\r
+\r
+acronym.spip_acronym {\r
+       cursor: help;\r
+       border-bottom: 1px dotted;\r
+}\r
+\r
+/* ne marche pas sur MSIE, a refaire en jQuery */\r
+a[hreflang]:after {\r
+content: "\0000a0[" attr(hreflang) "]";\r
+color: #999;\r
+background: transparent;\r
+font-size:x-small;\r
+}\r
+\r
+sup, sup.typo_exposants {\r
+       font-size: 78%;\r
+       font-variant: normal;\r
+       vertical-align: 24%;\r
+}\r
+\r
+sub {\r
+       font-size: 60%;\r
+       font-variant: normal;\r
+       vertical-align: -20%;\r
+}\r
+\r
+.caps {\r
+       font-variant: small-caps;\r
+}
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/css/enluminurestypo_prive.css b/www/plugins/enluminures_typographiques_v3/css/enluminurestypo_prive.css
new file mode 100644 (file)
index 0000000..0bce269
--- /dev/null
@@ -0,0 +1,25 @@
+h2.spip, h3.spip, h4.spip, h5.spip, h6.spip {\r
+       border-left: 1px solid #ccd;\r
+    color: #666;\r
+       padding-left: 1em;\r
+       text-align: left;\r
+       margin-left: 15px;\r
+}\r
+h2.spip {\r
+    border-left-width: 16px;\r
+       margin-left: 0;\r
+}\r
+h3.spip {\r
+    border-left-width: 10px;\r
+       margin-left: 6px;\r
+}\r
+h4.spip {\r
+    border-left-width: 6px;\r
+       margin-left: 10px;\r
+}\r
+h5.spip {\r
+    border-left-width: 2px;\r
+       margin-left: 14px;\r
+}\r
+\r
+acronym, abbr { border-bottom: .1em dotted; cursor: help; }\r
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/inserer_colonne.gif b/www/plugins/enluminures_typographiques_v3/editeur/inserer_colonne.gif
new file mode 100644 (file)
index 0000000..b669d4f
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/editeur/inserer_colonne.gif differ
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/inserer_ligne.gif b/www/plugins/enluminures_typographiques_v3/editeur/inserer_ligne.gif
new file mode 100644 (file)
index 0000000..157d373
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/editeur/inserer_ligne.gif differ
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/supprimer_ligne.png b/www/plugins/enluminures_typographiques_v3/editeur/supprimer_ligne.png
new file mode 100644 (file)
index 0000000..1514d51
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/editeur/supprimer_ligne.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/table.css b/www/plugins/enluminures_typographiques_v3/editeur/table.css
new file mode 100644 (file)
index 0000000..de52e21
--- /dev/null
@@ -0,0 +1,33 @@
+body{\r
+       padding: 1em 2em 1em 1em;\r
+       text-align:center;\r
+       font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif;\r
+}\r
+a img{border:none}\r
+#enregistrer{\r
+       display:block;\r
+       width:10em;\r
+       margin:1em auto;\r
+       padding:0.5em;\r
+       font-size:14px;\r
+       text-align:center;\r
+       text-decoration:none;\r
+       background:#eee;\r
+       border:1px outset #aaa;\r
+}\r
+div{text-align:left;margin-bottom:0.5em;}\r
+div span{float:left;width:10em}\r
+input{width:60%}\r
+#ihm{\r
+       border-collapse:collapse;\r
+       border:3px ridge gray;\r
+       width:85%;\r
+}\r
+#ihm td{border:3px ridge gray;text-align:center}\r
+#ihm td td{border:none}\r
+#ihm img{margin:4px}\r
+textarea{ width:100%}\r
+.first_c a img {display:block}\r
+.last_l, .last_c {background:#eee}\r
+.first_l, .first_c {background: #F0E68C}\r
+.first_c, .last_c {width:24px;}\r
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/table.js b/www/plugins/enluminures_typographiques_v3/editeur/table.js
new file mode 100644 (file)
index 0000000..c673451
--- /dev/null
@@ -0,0 +1,482 @@
+/* ce code s'inspire du travail de http://www.spip-contrib.net/_courcy_ \r
+  * il a été en grande partie ré-écrit pour : \r
+  * - générer une syntaxe de tableau SPIP et non HTML (l'éditeur de couleur de cellules disparaît donc aussi)\r
+  * - pour permettre non seulement de créer un tableau mais aussi de modifier un tableau existant\r
+  * - pour intégrer les éléments HTML titre et résumé de tableau \r
+  */\r
+/******************************************\r
+   * FONCTIONNEMENT Général \r
+ *********************BUT****************************************\r
+  * Le but de ce script est de permettre à l'utilisateur de créer son propre \r
+   * tableau sans s'encombrer de la syntaxe SPIP. Si un tableau à syntaxe SPIP est \r
+   * sélectionné avant l'appel de l'assistant, les données  sont récupérées par l'assistant.\r
+   * Si rien n'est sélectionné l'appel de l'assistant, un nouveau tableau est créé au point\r
+   * d'insertion.   \r
+   ************Structure de donnees ***********************************\r
+   *  \r
+   * Classe ihm qui gère l'interface homme-machine de l'assistant et sa construction\r
+   * On trouve en autres les méthodes permettant d'insérer et de supprimer lignes et colonnes\r
+   * \r
+   * Classe Cellule qui contient les informations relatives à une cellule\r
+   * Ses attributs sont des informations relatives a une cellule  (contenu)\r
+   * chaque objet cellule est contenu dans le tableau lc qui est un tableau bidimensionnel de cellules\r
+   * ce tableau a autant d'éléments que de ligne * colonne dans le tableau \r
+   *\r
+   * \r
+   *******************ALGORITHME*************************************\r
+   * Le tableau est sauvé en mémoire dans la variable lc\r
+   * La fonction construit_tableau( ) de la classe ihm construit l'interface pour manipuler les données du tableau\r
+   * qui (re)initialisera la valeur innerHTML de <div id=tableau></div>\r
+   * toute modification des valeurs dans l'assistant modifie lc\r
+   * toute modification de l'interface (ajout/suppression de ligne/colonne)   modifie lc puis appelle la fonction construit_tableau \r
+   * simple mais efficace+\r
+   *\r
+   * La validation des modifications déclenche construit_code_tableau qui construit le code SPIP du tableau\r
+   */\r
+   \r
+   \r
+   /********INITIALISATION**************/ \r
+    //classe ihm : classe générique de gestion de tableau \r
+    function ihm() {\r
+               this.titre_t = "";\r
+               this.resume_t = "";\r
+               /* méthodes */\r
+               this.construit_tableau = construit_tableau;\r
+               this.bouton_insere_ligne = bouton_insere_ligne;\r
+               this.bouton_supprime_ligne = bouton_supprime_ligne;\r
+               this.bouton_insere_colonne = bouton_insere_colonne;\r
+               this.bouton_supprime_colonne = bouton_supprime_colonne;\r
+               this.insere_commande_ligne = insere_commande_ligne;\r
+               this.insere_commande_colonne = insere_commande_colonne;\r
+               this.insere_ligne = insere_ligne;\r
+               this.supprime_ligne = supprime_ligne;\r
+               this.insere_colonne = insere_colonne;\r
+               this.supprime_colonne = supprime_colonne;               \r
+\r
+           /*******CONStrUIT tableAU**********/\r
+               function construit_tableau(){\r
+                       var texte = "";\r
+                       texte+="<table id='ihm' cellspacing='"+cellspacing+"'>\n";\r
+                       for (i=0;i<nl+2;i++){//on rajoute deux lignes en plus pour l'interface\r
+                               texte+="<tr>\n";\r
+                               for (j=0;j<nc+2;j++){//on rajoute deux lignes  en plus pour l'interface\r
+                                       var position = "" ;\r
+                                       if (i==0 && j==0)       position = "coin"; //on est dans le coin on met le menu\r
+                                       if (i==0 && j>0)        position = "1st_l"; //on est sur la premiere ligne on insere des colonnes\r
+                                       if (i>0 && j==0)        position = "1st_c"; //on est sur la premiere colonne on insere des lignes\r
+                                       if (i==nl+1 && j>0) position = "last_l"; //on est dans la zone non éditée de la derniere ligne\r
+                                       if (i>0 && j==nc+1) position = "last_c"; //on est dans la zone non éditée la derniere colonne\r
+                                       switch (position) {\r
+                                               case "coin" :   texte+="<td></td>\n"; break;\r
+                                               case "1st_l" :  texte+="<td class='first_l'>"+this.insere_commande_colonne(j-1)+"</td>\n"; break;\r
+                                               case "1st_c" :  texte+="<td class='first_c'>"+this.insere_commande_ligne(i-1)+"</td>\n"; break;\r
+                                               case "last_l" : texte+="<td class='last_l'></td>\n"; break;\r
+                                               case "last_c" : texte+="<td class='last_c'></td>\n"; break;\r
+                                               default: //on est dans la partie éditable du tableau\r
+                                                       texte+="<td>"+ lc[i-1][j-1].insere() +"</td>\n";\r
+                                       }\r
+                               }//fin du for j\r
+                               texte+="</tr>";\r
+                       }//fin du for i\r
+                       texte+="</table>";\r
+                       //win=window.open('');\r
+                       //win.document.write("<textarea cols='100' rows='50'>"+texte+"</textarea>");\r
+                       table.innerHTML=texte;//on modifie le texte de ce noeud\r
+               }\r
+               /**\r
+               *cette fonction crée  un bouton  pour l'insertion d'une ligne\r
+               */\r
+               function bouton_insere_ligne(ligne){\r
+                       var texte = "<a href='javascript:ihm_tableau.insere_ligne("+ligne+")'><img ";\r
+                       texte += " title='Insérer une ligne au-dessus' ";\r
+                       texte += " alt='Insérer une ligne au-dessus' ";\r
+                       texte += "src='"+tableau_edit_images_path+"inserer_ligne.gif' value=''></a>\n";\r
+                       return texte;\r
+               }\r
+\r
+               /**\r
+               *cette fonction crée un bouton  pour la supression d'une ligne\r
+               */\r
+               function bouton_supprime_ligne(ligne){\r
+                       if (nl == 1) return "";\r
+                       var texte="<a href='javascript:ihm_tableau.supprime_ligne("+ligne+")'><img  ";\r
+                       texte += " title='Supprimer cette ligne' ";\r
+                       texte += " alt='Supprimer cette ligne' ";\r
+                       texte += "src='"+tableau_edit_images_path+"supprimer_ligne.png' value='ligne' /></a>\n";\r
+                       return texte;\r
+               }\r
+\r
+               /**\r
+                *cette fonction crée un bouton  pour l'insertion d'une colonne\r
+                */\r
+               function bouton_insere_colonne(colonne){        \r
+                       var texte="<a href='javascript:ihm_tableau.insere_colonne("+colonne+")'> <img ";\r
+                       texte+=" title='Insérer une colonne avant' ";\r
+                       texte+=" alt='Insérer une colonne avant' ";\r
+                       texte+="src='"+tableau_edit_images_path+"inserer_colonne.gif' value='colonne'></a>\n";  \r
+                       return texte;\r
+               }\r
+               /**\r
+                *cette fonction crée un bouton  pour la supression d'une colonne \r
+                */\r
+               function bouton_supprime_colonne(colonne){\r
+                       if (nc == 1) return "";\r
+                       var texte="<a href='javascript:ihm_tableau.supprime_colonne("+colonne+")'><img";\r
+                       texte+=" title='Supprimer cette colonne'";\r
+                       texte+=" alt='Supprimer cette colonne'";\r
+                       texte+=" src='"+tableau_edit_images_path+"supprimer_ligne.png' value='colonne' /></a>\n";\r
+                       return texte;\r
+               }\r
+               /**\r
+               *cette fonction met en forme les commandes pour une ligne\r
+               */\r
+               function insere_commande_ligne(ligne){  \r
+                       var texte;\r
+\r
+                       texte = this.bouton_insere_ligne(ligne);\r
+                       if (ligne<nl){\r
+                                texte += this.bouton_supprime_ligne(ligne);\r
+                       }\r
+                       return texte;\r
+               }\r
+\r
+               /**\r
+                *cette fonction met en forme les commandes pour une colonne\r
+                */\r
+               function insere_commande_colonne(colonne){\r
+                       var texte="";\r
+\r
+                       texte+= this.bouton_insere_colonne(colonne);\r
+                       if (colonne<nc){\r
+                               texte += this.bouton_supprime_colonne(colonne);\r
+                       }\r
+                       return texte;\r
+               }\r
+       \r
+               /*********LES CALLBACKS depuis les boutons de l'IHM ****************************************/\r
+               function insere_ligne(num_ligne){\r
+                       //création d'un tableau temporaire bidimensionnel de cellules\r
+                   var lctemp = new tableau_cellules(nl+1, nc);\r
+                       \r
+                       lctemp.insL(num_ligne);         //insertion d'une ligne dans le tableau lc\r
+                       lc=lctemp.getT();                       //on a une ligne en plus\r
+\r
+                       nl++;\r
+                       this.construit_tableau();\r
+               }\r
+       \r
+               function supprime_ligne(num_ligne){\r
+                       //création d'un tableau temporaire bidimensionnel de cellule\r
+                   var lctemp = new tableau_cellules(nl-1, nc);\r
+\r
+                       lctemp.supL(num_ligne);         //supression d'une ligne dans le tableau lc\r
+                       lc=lctemp.getT();                       //on a une ligne en moins\r
+\r
+                       nl--;\r
+                       this.construit_tableau();\r
+               }\r
+               function insere_colonne(num_colonne){\r
+                       //création d'un tableau temporaire bidimensionnel de cellule\r
+                   var lctemp = new tableau_cellules(nl, nc+1);\r
+\r
+                       lctemp.insC(num_colonne);       //insertion d'une colonne dans le tableau lc\r
+                       lc=lctemp.getT();\r
+\r
+                       nc++;                                           //on a une ligne en plus\r
+                       this.construit_tableau();\r
+               }\r
+               function supprime_colonne(num_colonne){\r
+                       //création d'un tableau temporaire bidimensionnel de cellules\r
+                   var lctemp = new tableau_cellules(nl, nc-1);\r
+                                       \r
+                       lctemp.supC(num_colonne);       //supression d'une colonne dans le tableau lc\r
+                       lc=lctemp.getT();                       //on remplace le tableau lc par le tableau temp\r
+                       \r
+                       nc--;                                           //on a une colonne en moins\r
+                       this.construit_tableau();\r
+               }\r
+    }\r
+\r
+    //classe cellule\r
+    function cellule(i,j){\r
+               this.l=i;\r
+               this.c=j;\r
+       this.content='';\r
+\r
+               /* les méthodes getters et setters */\r
+               this.setC = function(c){this.c = c}\r
+               this.getC = function(){return this.c}\r
+               this.setL = function(l){this.l = l}\r
+               this.getL = function(){return this.l}\r
+\r
+               /* les méthodes  de la classe cellule */\r
+               this.insere = insere;\r
+\r
+               /* cette fonction insere une zone de texte dans la cellule */\r
+               function insere(){\r
+\r
+                       var texte ="<textarea cols='10' rows='2'";      \r
+                       // on sauve le contenu\r
+                       texte+=" onchange='lc[" + this.l + "][" + this.c + "].content=this.value;'>";                   \r
+                       texte+=this.content;                    \r
+                       texte+="</textarea> \n";        \r
+                       return texte;\r
+               }\r
+    } //fin de la classe "cellule"\r
+       \r
+       function tableau_cellules(nb_l,nb_c){\r
+               this.t = new Array();\r
+               for (var i=0; i<nb_l; i++){\r
+               this.t[i]=new Array(); \r
+               for (var j=0; j<nb_c; j++){\r
+                       this.t[i][j]=new cellule(i,j);\r
+               }                       \r
+               }\r
+\r
+               this.getT = function(){return this.t}\r
+\r
+               this.insL = function(num_ligne) {\r
+                       //insertion d'une ligne dans le tableau lc\r
+                       for (var i=0;i<nl+1;i++){\r
+                               for (var j=0;j<nc;j++){\r
+                                       if (i<num_ligne){\r
+                                               //recopiage simple\r
+                                               this.t[i][j]=lc[i][j];\r
+                                       }\r
+                                       if (i>num_ligne){\r
+                                               //on incrémente de 1\r
+                                               this.t[i][j]=lc[i-1][j];\r
+                                               this.t[i][j].setL(i); \r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               this.supL = function(num_ligne){\r
+                       for (i=0;i<nl-1;i++){\r
+                               for (j=0;j<nc;j++){\r
+                                       if (i<num_ligne){\r
+                                               //recopiage simple\r
+                                               this.t[i][j]=lc[i][j];\r
+                                       }else{\r
+                                               this.t[i][j]=lc[i+1][j];\r
+                                               this.t[i][j].setL(i); \r
+                                       }\r
+                               }\r
+                       }\r
+               \r
+               }\r
+               \r
+               this.insC = function(num_colonne){\r
+                       for (i=0;i<nl;i++){\r
+                               for (j=0;j<nc+1;j++){\r
+                                       if (j<num_colonne){\r
+                                               //recopiage simple\r
+                                               this.t[i][j]=lc[i][j];\r
+                                       }\r
+                                       if (j>num_colonne){\r
+                                               //on incrémente de 1\r
+                                               this.t[i][j]=lc[i][j-1];\r
+                                               this.t[i][j].setC(j);\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               this.supC = function(num_colonne){\r
+                       for (i=0;i<nl;i++){\r
+                               for (j=0;j<nc-1;j++){\r
+                                       if (j<num_colonne){\r
+                                               //recopiage simple\r
+                                               this.t[i][j]=lc[i][j];\r
+                                       }else{\r
+                                               this.t[i][j]=lc[i][j+1];\r
+                                               this.t[i][j].setC(j);                                           \r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+       }\r
+       \r
+       function selection(zone){\r
+               this.s1 = "";\r
+               this.s2 = "";\r
+               this.s3 = "";\r
+               this.t_SPIP = new Array(); // les lignes du tableau SPIP\r
+               this.t = new Array(); // le tableau des valeurs à modifier\r
+               this.premiere_ligne = "";\r
+\r
+               this.avec_entete = avec_entete;\r
+               this.recup_caption = recup_caption;\r
+               this.recup_summary = recup_summary;\r
+               this.compte_lignes = compte_lignes;\r
+               this.recup_ligne = recup_ligne;\r
+               this.recup_cellule = recup_cellule;\r
+               this.contenu = contenu;\r
+               this.existe = existe;\r
+               \r
+               var lignes = new Array(); // les lignes brutes de la zone d'édition SPIP\r
+               var ligne_cour = ""; // la ligne brute en cours de traitement lors de la reconstitution du tableau SPIP\r
+               var j=0;\r
+               var init_i; // début du contenu du tableau de données (1 si tableau avec entête, 0 sinon)\r
+               \r
+               if ((clientVer >= 4) && is_ie && is_win)\r
+               {\r
+                       var theSelection = false;\r
+\r
+                       theSelection = top.opener.document.selection.createRange().text; // Get text selection\r
+                       if (theSelection) {\r
+                               this.s2 = theSelection;\r
+                       } else {\r
+                               this.s1 = top.opener.document.getElementById("text_area").value;\r
+                       }\r
+               }\r
+               else {\r
+                       var selLength = zone.textLength;\r
+                       var selStart = zone.selectionStart;\r
+                       var selEnd = zone.selectionEnd;\r
+\r
+                       if (selEnd == 1 || selEnd == 2) selEnd = selLength;\r
+       \r
+                       // Raccourcir la selection par double-clic si dernier caractere est espace      \r
+                       if (selEnd - selStart > 0 && (zone.value).substring(selEnd-1,selEnd) == ' ') selEnd = selEnd-1;\r
+                       this.s1 = (zone.value).substring(0,selStart);\r
+                       this.s2 = (zone.value).substring(selStart, selEnd)\r
+                       this.s3 = (zone.value).substring(selEnd, selLength);\r
+               }\r
+\r
+               lignes = this.s2.split("\n");\r
+                       \r
+               if (this.avec_entete()) init_i = 1;     \r
+               for (i=init_i;i<lignes.length;i++) {\r
+                       ligne_cour += lignes[i] + "\n";\r
+                       if (lignes[i].match(/\|.?$/)) {\r
+                               ligne_cour = ligne_cour.replace(/\|(left|right|center)/g, "££$1"); //pour distinguer les barres verticales des codes d'inclusion d'image et de document\r
+                               this.t_SPIP[j++] = ligne_cour;\r
+                               ligne_cour = "";\r
+                       }\r
+               }\r
+               this.premiere_ligne = this.t_SPIP[0];\r
+\r
+               this.contenu();\r
+\r
+\r
+               function avec_entete(){\r
+                       return (lignes[0].search(/^\|\|/) != -1); // si double pipe en tête de la première ligne(resumé)\r
+               }\r
+               function recup_caption(){\r
+                       return lignes[0].match(/^\|\|([^\|]*)/)[1];\r
+               }\r
+               function recup_summary(){\r
+                       return lignes[0].match(/^\|\|([^\|])*\|([^\|]*)/)[2];\r
+               }\r
+               function compte_lignes(){\r
+                       return (this.t_SPIP.length);\r
+               }\r
+               function recup_ligne(num_ligne){\r
+                       var ligne_encodee = this.t_SPIP[num_ligne].split("|");\r
+                       var ligne_decodee = new Array();\r
+                       \r
+                       for (var i=0; i<ligne_encodee.length; i++){\r
+                               ligne_decodee[i] = ligne_encodee[i].replace(/££/g,"|");\r
+                       }\r
+                       return (ligne_decodee);\r
+               }\r
+               function contenu(){\r
+                       for (var i=0; i<this.t_SPIP.length; i++){\r
+                               this.t[i] = this.recup_ligne(i); //t est un tableau bidimensionnel avec les valeurs à modifier\r
+                       }\r
+               }\r
+               function recup_cellule(i,j){\r
+                       return (this.t[i][j+1] ? this.t[i][j+1] : "");\r
+               }\r
+               function existe() {return (this.s2!="")} //indique si un tableau SPIP a été sélectionné\r
+       }\r
+       var ancien_tableau;\r
+\r
+    //nombre de lignes et nombre de colonnes\r
+    var nl;\r
+    var nc;\r
+\r
+    //création d'un tableau bidimensionnel de cellules\r
+    var lc=new Array();\r
+\r
+    var cellspacing=0;\r
+\r
+    //noeud ou l'on va ecrire le tableau\r
+    var table;\r
+    var debug;\r
+       \r
+       var ihm_tableau = new ihm();\r
+       \r
+       function init(){\r
+               ancien_tableau = new selection(top.opener.zone_selection);\r
+       \r
+               if (ancien_tableau.existe() & ancien_tableau.avec_entete()) {\r
+                       document.getElementById("titre_t").value = ancien_tableau.recup_caption() ;     //récupération du titre du tableau\r
+                       document.getElementById("resume_t").value = ancien_tableau.recup_summary() ;//récupération du résumé du tableau\r
+               }\r
+\r
+               nl= (ancien_tableau.existe()) ? ancien_tableau.compte_lignes() : 3;\r
+               nc= (ancien_tableau.existe()) ? ancien_tableau.t[0].length - 2 : 3;\r
+\r
+               for (i=0;i<nl;i++){\r
+         lc[i]=new Array(); //2 lignes au depart\r
+          for (j=0;j<nc;j++){\r
+                lc[i][j]=new cellule(i,j);\r
+                if (ancien_tableau.existe()) lc[i][j].content = ancien_tableau.recup_cellule(i,j);\r
+           }                   \r
+        }\r
+               \r
+               table=document.getElementById("table");\r
+               debug=document.getElementById("debug");\r
+\r
+               /*********CONStrUCTION DE L'INTERFACE UTILISATEUR**********************/\r
+               ihm_tableau.construit_tableau();\r
+       }\r
+    function d(s){debug.innerHTML+=s;}\r
+    \r
+    /****génération du code SPIP du tableau ******/\r
+    \r
+    function construit_code_tableau(){\r
+       var le_titre = document.getElementById("titre_t").value;\r
+               var le_resume = document.getElementById("resume_t").value;\r
+       var texte="";\r
+       var la_ligne="";\r
+\r
+               texte += "||" + le_titre + "|" + le_resume + "||\n";\r
+               for (var j=0;j<nc;j++){\r
+                       //on supprime les accolades éventuelles avant de placer les accolades d'entete de tableau\r
+                       var cont_cell = lc[0][j].content.replace(/(\{)*([^\}]*)(\})*/,"$2");\r
+                       la_ligne += "|{{" + (cont_cell=="" ? " " : cont_cell) + "}}";\r
+               }\r
+               texte += la_ligne + "|\n";\r
+\r
+               for (i=1;i<nl;i++){\r
+                       for (j=0;j<nc;j++) {texte += "|" + lc[i][j].content;}\r
+                       texte += "|\n";\r
+               }//fin du for i\r
+               return texte;   \r
+    }\r
+       \r
+    /**********LES FONCTIONS DE CREATION DE L'INTERFACE**********/\r
+\r
+       function enregistre(){\r
+               if (ancien_tableau.existe()) {\r
+                       if ((clientVer >= 4) && is_ie && is_win) {\r
+                               top.opener.document.selection.createRange().text = construit_code_tableau();\r
+                       } else {\r
+                               top.opener.zone_selection.value = ancien_tableau.s1 + construit_code_tableau() + ancien_tableau.s3;\r
+                       }\r
+               } else { //insertion d'un nouveau tableau\r
+                       if (top.opener.zone_selection.createTextRange && top.opener.zone_selection.caretPos) { //IE\r
+                               var caretPos = top.opener.zone_selection.caretPos;\r
+                               caretPos.text = caretPos.text + construit_code_tableau();\r
+                               top.opener.zone_selection.focus();\r
+                       } else {\r
+                               top.opener.zone_selection.value = ancien_tableau.s1 + construit_code_tableau() + ancien_tableau.s3;\r
+                       }\r
+               }\r
+               window.close();         \r
+       }
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/table_rtl.css b/www/plugins/enluminures_typographiques_v3/editeur/table_rtl.css
new file mode 100644 (file)
index 0000000..650455c
--- /dev/null
@@ -0,0 +1,33 @@
+body{
+       padding: 1em 1em 1em 2em;
+       text-align: center;
+       font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
+}
+a img{border:none}
+#enregistrer{
+       display:block;
+       width:10em;
+       margin:1em auto;
+       padding:0.5em;
+       font-size:14px;
+       text-align:center;
+       text-decoration:none;
+       background:#eee;
+       border:1px outset #aaa;
+}
+div{text-align:right;margin-bottom:0.5em;}
+div span{float:right;width:10em}
+input{width:60%}
+#ihm{
+       border-collapse:collapse;
+       border:3px ridge gray;
+       width:85%;
+}
+#ihm td{border:3px ridge gray;text-align:center}
+#ihm td td{border:none}
+#ihm img{margin:4px}
+textarea{ width:100%}
+.first_c a img {display:block}
+.last_l, .last_c {background:#eee}
+.first_l, .first_c {background: #F0E68C}
+.first_c, .last_c {width:24px;}
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/table_rtl.js b/www/plugins/enluminures_typographiques_v3/editeur/table_rtl.js
new file mode 100644 (file)
index 0000000..7810439
--- /dev/null
@@ -0,0 +1,482 @@
+/* ce code s'inspire du travail de http://www.spip-contrib.net/_courcy_ 
+  * il a été en grande partie ré-écrit pour : 
+  * - générer une syntaxe de tableau SPIP et non HTML (l'éditeur de couleur de cellules disparaît donc aussi)
+  * - pour permettre non seulement de créer un tableau mais aussi de modifier un tableau existant
+  * - pour intégrer les éléments HTML titre et résumé de tableau 
+  */
+/******************************************
+   * FONCTIONNEMENT Général 
+ *********************BUT****************************************
+  * Le but de ce script est de permettre à l'utilisateur de créer son propre 
+   * tableau sans s'encombrer de la syntaxe SPIP. Si un tableau à syntaxe SPIP est 
+   * sélectionné avant l'appel de l'assistant, les données  sont récupérées par l'assistant.
+   * Si rien n'est sélectionné l'appel de l'assistant, un nouveau tableau est créé au point
+   * d'insertion.   
+   ************Structure de donnees ***********************************
+   *  
+   * Classe ihm qui gère l'interface homme-machine de l'assistant et sa construction
+   * On trouve en autres les méthodes permettant d'insérer et de supprimer lignes et colonnes
+   * 
+   * Classe Cellule qui contient les informations relatives à une cellule
+   * Ses attributs sont des informations relatives a une cellule  (contenu)
+   * chaque objet cellule est contenu dans le tableau lc qui est un tableau bidimensionnel de cellules
+   * ce tableau a autant d'éléments que de ligne * colonne dans le tableau 
+   *
+   * 
+   *******************ALGORITHME*************************************
+   * Le tableau est sauvé en mémoire dans la variable lc
+   * La fonction construit_tableau( ) de la classe ihm construit l'interface pour manipuler les données du tableau
+   * qui (re)initialisera la valeur innerHTML de <div id=tableau></div>
+   * toute modification des valeurs dans l'assistant modifie lc
+   * toute modification de l'interface (ajout/suppression de ligne/colonne)   modifie lc puis appelle la fonction construit_tableau 
+   * simple mais efficace+
+   *
+   * La validation des modifications déclenche construit_code_tableau qui construit le code SPIP du tableau
+   */
+   
+   
+   /********INITIALISATION**************/ 
+    //classe ihm : classe générique de gestion de tableau 
+    function ihm() {
+               this.titre_t = "";
+               this.resume_t = "";
+               /* méthodes */
+               this.construit_tableau = construit_tableau;
+               this.bouton_insere_ligne = bouton_insere_ligne;
+               this.bouton_supprime_ligne = bouton_supprime_ligne;
+               this.bouton_insere_colonne = bouton_insere_colonne;
+               this.bouton_supprime_colonne = bouton_supprime_colonne;
+               this.insere_commande_ligne = insere_commande_ligne;
+               this.insere_commande_colonne = insere_commande_colonne;
+               this.insere_ligne = insere_ligne;
+               this.supprime_ligne = supprime_ligne;
+               this.insere_colonne = insere_colonne;
+               this.supprime_colonne = supprime_colonne;               
+
+           /*******CONStrUIT tableAU**********/
+               function construit_tableau(){
+                       var texte = "";
+                       texte+="<table id='ihm' cellspacing='"+cellspacing+"'>\n";
+                       for (i=0;i<nl+2;i++){//on rajoute deux lignes en plus pour l'interface
+                               texte+="<tr>\n";
+                               for (j=0;j<nc+2;j++){//on rajoute deux lignes  en plus pour l'interface
+                                       var position = "" ;
+                                       if (i==0 && j==0)       position = "coin"; //on est dans le coin on met le menu
+                                       if (i==0 && j>0)        position = "1st_l"; //on est sur la premiere ligne on insere des colonnes
+                                       if (i>0 && j==0)        position = "1st_c"; //on est sur la premiere colonne on insere des lignes
+                                       if (i==nl+1 && j>0) position = "last_l"; //on est dans la zone non éditée de la derniere ligne
+                                       if (i>0 && j==nc+1) position = "last_c"; //on est dans la zone non éditée la derniere colonne
+                                       switch (position) {
+                                               case "coin" :   texte+="<td></td>\n"; break;
+                                               case "1st_l" :  texte+="<td class='first_l'>"+this.insere_commande_colonne(j-1)+"</td>\n"; break;
+                                               case "1st_c" :  texte+="<td class='first_c'>"+this.insere_commande_ligne(i-1)+"</td>\n"; break;
+                                               case "last_l" : texte+="<td class='last_l'></td>\n"; break;
+                                               case "last_c" : texte+="<td class='last_c'></td>\n"; break;
+                                               default: //on est dans la partie éditable du tableau
+                                                       texte+="<td>"+ lc[i-1][j-1].insere() +"</td>\n";
+                                       }
+                               }//fin du for j
+                               texte+="</tr>";
+                       }//fin du for i
+                       texte+="</table>";
+                       //win=window.open('');
+                       //win.document.write("<textarea cols='100' rows='50'>"+texte+"</textarea>");
+                       table.innerHTML=texte;//on modifie le texte de ce noeud
+               }
+               /**
+               *cette fonction crée  un bouton  pour l'insertion d'une ligne
+               */
+               function bouton_insere_ligne(ligne){
+                       var texte = "<a href='javascript:ihm_tableau.insere_ligne("+ligne+")'><img ";
+                       texte += " title='&#1573;&#1583;&#1585;&#1575;&#1580; &#1587;&#1591;&#1585; &#1601;&#1608;&#1602;' ";
+                       texte += " alt='&#1573;&#1583;&#1585;&#1575;&#1580; &#1587;&#1591;&#1585; &#1601;&#1608;&#1602;' ";
+                       texte += "src='"+tableau_edit_images_path+"inserer_ligne.gif' value=''></a>\n";
+                       return texte;
+               }
+
+               /**
+               *cette fonction crée un bouton  pour la supression d'une ligne
+               */
+               function bouton_supprime_ligne(ligne){
+                       if (nl == 1) return "";
+                       var texte="<a href='javascript:ihm_tableau.supprime_ligne("+ligne+")'><img  ";
+                       texte += " title='&#1581;&#1584;&#1601; &#1607;&#1584;&#1575; &#1575;&#1604;&#1587;&#1591;&#1585;' ";
+                       texte += " alt='&#1581;&#1584;&#1601; &#1607;&#1584;&#1575; &#1575;&#1604;&#1587;&#1591;&#1585;' ";
+                       texte += "src='"+tableau_edit_images_path+"supprimer_ligne.png' value='ligne' /></a>\n";
+                       return texte;
+               }
+
+               /**
+                *cette fonction crée un bouton  pour l'insertion d'une colonne
+                */
+               function bouton_insere_colonne(colonne){        
+                       var texte="<a href='javascript:ihm_tableau.insere_colonne("+colonne+")'> <img ";
+                       texte+=" title='&#1573;&#1583;&#1585;&#1575;&#1580; &#1593;&#1605;&#1608;&#1583; &#1602;&#1576;&#1604;' ";
+                       texte+=" alt='&#1573;&#1583;&#1585;&#1575;&#1580; &#1593;&#1605;&#1608;&#1583; &#1602;&#1576;&#1604;' ";
+                       texte+="src='"+tableau_edit_images_path+"inserer_colonne.gif' value='colonne'></a>\n";  
+                       return texte;
+               }
+               /**
+                *cette fonction crée un bouton  pour la supression d'une colonne 
+                */
+               function bouton_supprime_colonne(colonne){
+                       if (nc == 1) return "";
+                       var texte="<a href='javascript:ihm_tableau.supprime_colonne("+colonne+")'><img";
+                       texte+=" title='&#1581;&#1584;&#1601; &#1607;&#1584;&#1575; &#1575;&#1604;&#1593;&#1605;&#1608;&#1583;'";
+                       texte+=" alt='&#1581;&#1584;&#1601; &#1607;&#1584;&#1575; &#1575;&#1604;&#1593;&#1605;&#1608;&#1583;'";
+                       texte+=" src='"+tableau_edit_images_path+"supprimer_ligne.png' value='colonne' /></a>\n";
+                       return texte;
+               }
+               /**
+               *cette fonction met en forme les commandes pour une ligne
+               */
+               function insere_commande_ligne(ligne){  
+                       var texte;
+
+                       texte = this.bouton_insere_ligne(ligne);
+                       if (ligne<nl){
+                                texte += this.bouton_supprime_ligne(ligne);
+                       }
+                       return texte;
+               }
+
+               /**
+                *cette fonction met en forme les commandes pour une colonne
+                */
+               function insere_commande_colonne(colonne){
+                       var texte="";
+
+                       texte+= this.bouton_insere_colonne(colonne);
+                       if (colonne<nc){
+                               texte += this.bouton_supprime_colonne(colonne);
+                       }
+                       return texte;
+               }
+       
+               /*********LES CALLBACKS depuis les boutons de l'IHM ****************************************/
+               function insere_ligne(num_ligne){
+                       //création d'un tableau temporaire bidimensionnel de cellules
+                   var lctemp = new tableau_cellules(nl+1, nc);
+                       
+                       lctemp.insL(num_ligne);         //insertion d'une ligne dans le tableau lc
+                       lc=lctemp.getT();                       //on a une ligne en plus
+
+                       nl++;
+                       this.construit_tableau();
+               }
+       
+               function supprime_ligne(num_ligne){
+                       //création d'un tableau temporaire bidimensionnel de cellule
+                   var lctemp = new tableau_cellules(nl-1, nc);
+
+                       lctemp.supL(num_ligne);         //supression d'une ligne dans le tableau lc
+                       lc=lctemp.getT();                       //on a une ligne en moins
+
+                       nl--;
+                       this.construit_tableau();
+               }
+               function insere_colonne(num_colonne){
+                       //création d'un tableau temporaire bidimensionnel de cellule
+                   var lctemp = new tableau_cellules(nl, nc+1);
+
+                       lctemp.insC(num_colonne);       //insertion d'une colonne dans le tableau lc
+                       lc=lctemp.getT();
+
+                       nc++;                                           //on a une ligne en plus
+                       this.construit_tableau();
+               }
+               function supprime_colonne(num_colonne){
+                       //création d'un tableau temporaire bidimensionnel de cellules
+                   var lctemp = new tableau_cellules(nl, nc-1);
+                                       
+                       lctemp.supC(num_colonne);       //supression d'une colonne dans le tableau lc
+                       lc=lctemp.getT();                       //on remplace le tableau lc par le tableau temp
+                       
+                       nc--;                                           //on a une colonne en moins
+                       this.construit_tableau();
+               }
+    }
+
+    //classe cellule
+    function cellule(i,j){
+               this.l=i;
+               this.c=j;
+       this.content='';
+
+               /* les méthodes getters et setters */
+               this.setC = function(c){this.c = c}
+               this.getC = function(){return this.c}
+               this.setL = function(l){this.l = l}
+               this.getL = function(){return this.l}
+
+               /* les méthodes  de la classe cellule */
+               this.insere = insere;
+
+               /* cette fonction insere une zone de texte dans la cellule */
+               function insere(){
+
+                       var texte ="<textarea cols='10' rows='2'";      
+                       // on sauve le contenu
+                       texte+=" onchange='lc[" + this.l + "][" + this.c + "].content=this.value;'>";                   
+                       texte+=this.content;                    
+                       texte+="</textarea> \n";        
+                       return texte;
+               }
+    } //fin de la classe "cellule"
+       
+       function tableau_cellules(nb_l,nb_c){
+               this.t = new Array();
+               for (var i=0; i<nb_l; i++){
+               this.t[i]=new Array(); 
+               for (var j=0; j<nb_c; j++){
+                       this.t[i][j]=new cellule(i,j);
+               }                       
+               }
+
+               this.getT = function(){return this.t}
+
+               this.insL = function(num_ligne) {
+                       //insertion d'une ligne dans le tableau lc
+                       for (var i=0;i<nl+1;i++){
+                               for (var j=0;j<nc;j++){
+                                       if (i<num_ligne){
+                                               //recopiage simple
+                                               this.t[i][j]=lc[i][j];
+                                       }
+                                       if (i>num_ligne){
+                                               //on incrémente de 1
+                                               this.t[i][j]=lc[i-1][j];
+                                               this.t[i][j].setL(i); 
+                                       }
+                               }
+                       }
+               }
+               
+               this.supL = function(num_ligne){
+                       for (i=0;i<nl-1;i++){
+                               for (j=0;j<nc;j++){
+                                       if (i<num_ligne){
+                                               //recopiage simple
+                                               this.t[i][j]=lc[i][j];
+                                       }else{
+                                               this.t[i][j]=lc[i+1][j];
+                                               this.t[i][j].setL(i); 
+                                       }
+                               }
+                       }
+               
+               }
+               
+               this.insC = function(num_colonne){
+                       for (i=0;i<nl;i++){
+                               for (j=0;j<nc+1;j++){
+                                       if (j<num_colonne){
+                                               //recopiage simple
+                                               this.t[i][j]=lc[i][j];
+                                       }
+                                       if (j>num_colonne){
+                                               //on incrémente de 1
+                                               this.t[i][j]=lc[i][j-1];
+                                               this.t[i][j].setC(j);
+                                       }
+                               }
+                       }
+               }
+
+               this.supC = function(num_colonne){
+                       for (i=0;i<nl;i++){
+                               for (j=0;j<nc-1;j++){
+                                       if (j<num_colonne){
+                                               //recopiage simple
+                                               this.t[i][j]=lc[i][j];
+                                       }else{
+                                               this.t[i][j]=lc[i][j+1];
+                                               this.t[i][j].setC(j);                                           
+                                       }
+                               }
+                       }
+               }
+
+       }
+       
+       function selection(zone){
+               this.s1 = "";
+               this.s2 = "";
+               this.s3 = "";
+               this.t_SPIP = new Array(); // les lignes du tableau SPIP
+               this.t = new Array(); // le tableau des valeurs à modifier
+               this.premiere_ligne = "";
+
+               this.avec_entete = avec_entete;
+               this.recup_caption = recup_caption;
+               this.recup_summary = recup_summary;
+               this.compte_lignes = compte_lignes;
+               this.recup_ligne = recup_ligne;
+               this.recup_cellule = recup_cellule;
+               this.contenu = contenu;
+               this.existe = existe;
+               
+               var lignes = new Array(); // les lignes brutes de la zone d'édition SPIP
+               var ligne_cour = ""; // la ligne brute en cours de traitement lors de la reconstitution du tableau SPIP
+               var j=0;
+               var init_i; // début du contenu du tableau de données (1 si tableau avec entête, 0 sinon)
+               
+               if ((clientVer >= 4) && is_ie && is_win)
+               {
+                       var theSelection = false;
+
+                       theSelection = top.opener.document.selection.createRange().text; // Get text selection
+                       if (theSelection) {
+                               this.s2 = theSelection;
+                       } else {
+                               this.s1 = top.opener.document.getElementById("text_area").value;
+                       }
+               }
+               else {
+                       var selLength = zone.textLength;
+                       var selStart = zone.selectionStart;
+                       var selEnd = zone.selectionEnd;
+
+                       if (selEnd == 1 || selEnd == 2) selEnd = selLength;
+       
+                       // Raccourcir la selection par double-clic si dernier caractere est espace      
+                       if (selEnd - selStart > 0 && (zone.value).substring(selEnd-1,selEnd) == ' ') selEnd = selEnd-1;
+                       this.s1 = (zone.value).substring(0,selStart);
+                       this.s2 = (zone.value).substring(selStart, selEnd)
+                       this.s3 = (zone.value).substring(selEnd, selLength);
+               }
+
+               lignes = this.s2.split("\n");
+                       
+               if (this.avec_entete()) init_i = 1;     
+               for (i=init_i;i<lignes.length;i++) {
+                       ligne_cour += lignes[i] + "\n";
+                       if (lignes[i].match(/\|.?$/)) {
+                               ligne_cour = ligne_cour.replace(/\|(left|right|center)/g, "££$1"); //pour distinguer les barres verticales des codes d'inclusion d'image et de document
+                               this.t_SPIP[j++] = ligne_cour;
+                               ligne_cour = "";
+                       }
+               }
+               this.premiere_ligne = this.t_SPIP[0];
+
+               this.contenu();
+
+
+               function avec_entete(){
+                       return (lignes[0].search(/^\|\|/) != -1); // si double pipe en tête de la première ligne(resumé)
+               }
+               function recup_caption(){
+                       return lignes[0].match(/^\|\|([^\|]*)/)[1];
+               }
+               function recup_summary(){
+                       return lignes[0].match(/^\|\|([^\|])*\|([^\|]*)/)[2];
+               }
+               function compte_lignes(){
+                       return (this.t_SPIP.length);
+               }
+               function recup_ligne(num_ligne){
+                       var ligne_encodee = this.t_SPIP[num_ligne].split("|");
+                       var ligne_decodee = new Array();
+                       
+                       for (var i=0; i<ligne_encodee.length; i++){
+                               ligne_decodee[i] = ligne_encodee[i].replace(/££/g,"|");
+                       }
+                       return (ligne_decodee);
+               }
+               function contenu(){
+                       for (var i=0; i<this.t_SPIP.length; i++){
+                               this.t[i] = this.recup_ligne(i); //t est un tableau bidimensionnel avec les valeurs à modifier
+                       }
+               }
+               function recup_cellule(i,j){
+                       return (this.t[i][j+1] ? this.t[i][j+1] : "");
+               }
+               function existe() {return (this.s2!="")} //indique si un tableau SPIP a été sélectionné
+       }
+       var ancien_tableau;
+
+    //nombre de lignes et nombre de colonnes
+    var nl;
+    var nc;
+
+    //création d'un tableau bidimensionnel de cellules
+    var lc=new Array();
+
+    var cellspacing=0;
+
+    //noeud ou l'on va ecrire le tableau
+    var table;
+    var debug;
+       
+       var ihm_tableau = new ihm();
+       
+       function init(){
+               ancien_tableau = new selection(top.opener.zone_selection);
+       
+               if (ancien_tableau.existe() & ancien_tableau.avec_entete()) {
+                       document.getElementById("titre_t").value = ancien_tableau.recup_caption() ;     //récupération du titre du tableau
+                       document.getElementById("resume_t").value = ancien_tableau.recup_summary() ;//récupération du résumé du tableau
+               }
+
+               nl= (ancien_tableau.existe()) ? ancien_tableau.compte_lignes() : 3;
+               nc= (ancien_tableau.existe()) ? ancien_tableau.t[0].length - 2 : 3;
+
+               for (i=0;i<nl;i++){
+         lc[i]=new Array(); //2 lignes au depart
+          for (j=0;j<nc;j++){
+                lc[i][j]=new cellule(i,j);
+                if (ancien_tableau.existe()) lc[i][j].content = ancien_tableau.recup_cellule(i,j);
+           }                   
+        }
+               
+               table=document.getElementById("table");
+               debug=document.getElementById("debug");
+
+               /*********CONStrUCTION DE L'INTERFACE UTILISATEUR**********************/
+               ihm_tableau.construit_tableau();
+       }
+    function d(s){debug.innerHTML+=s;}
+    
+    /****génération du code SPIP du tableau ******/
+    
+    function construit_code_tableau(){
+       var le_titre = document.getElementById("titre_t").value;
+               var le_resume = document.getElementById("resume_t").value;
+       var texte="";
+       var la_ligne="";
+
+               texte += "||" + le_titre + "|" + le_resume + "||\n";
+               for (var j=0;j<nc;j++){
+                       //on supprime les accolades éventuelles avant de placer les accolades d'entete de tableau
+                       var cont_cell = lc[0][j].content.replace(/(\{)*([^\}]*)(\})*/,"$2");
+                       la_ligne += "|{{" + (cont_cell=="" ? " " : cont_cell) + "}}";
+               }
+               texte += la_ligne + "|\n";
+
+               for (i=1;i<nl;i++){
+                       for (j=0;j<nc;j++) {texte += "|" + lc[i][j].content;}
+                       texte += "|\n";
+               }//fin du for i
+               return texte;   
+    }
+       
+    /**********LES FONCTIONS DE CREATION DE L'INTERFACE**********/
+
+       function enregistre(){
+               if (ancien_tableau.existe()) {
+                       if ((clientVer >= 4) && is_ie && is_win) {
+                               top.opener.document.selection.createRange().text = construit_code_tableau();
+                       } else {
+                               top.opener.zone_selection.value = ancien_tableau.s1 + construit_code_tableau() + ancien_tableau.s3;
+                       }
+               } else { //insertion d'un nouveau tableau
+                       if (top.opener.zone_selection.createTextRange && top.opener.zone_selection.caretPos) { //IE
+                               var caretPos = top.opener.zone_selection.caretPos;
+                               caretPos.text = caretPos.text + construit_code_tableau();
+                               top.opener.zone_selection.focus();
+                       } else {
+                               top.opener.zone_selection.value = ancien_tableau.s1 + construit_code_tableau() + ancien_tableau.s3;
+                       }
+               }
+               window.close();         
+       }
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/editeur/tableau_edit.html b/www/plugins/enluminures_typographiques_v3/editeur/tableau_edit.html
new file mode 100644 (file)
index 0000000..a278b92
--- /dev/null
@@ -0,0 +1,24 @@
+#CACHE{24*3600}
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html lang='#LANG' dir='#LANG_DIR'>
+  <head>
+    <title>Editeur de table</title>
+       <meta http-equiv="Content-Type" content="text/html; charset=#CHARSET" />
+       <link rel="stylesheet" href="[(#CHEMIN{editeur/table.css}|direction_css)]" type="text/css" media="screen" />
+       <script type="text/javascript">
+               tableau_edit_images_path = "[(#CHEMIN{editeur/table.css}|dirname)/]";
+       </script>
+    <script src="#CHEMIN{javascript/spip_barre.js}" type="text/javascript"></script>
+    <script src="#CHEMIN{editeur/table(#LANG_DIR|=={rtl}|?{'_rtl',''}).js}" type="text/javascript"></script>
+  </head>
+  <body onload="init();">
+
+  <form action="table.html" method="post">
+  <div><label><span><:enlumtypo:tableau_titre:></span><input id='titre_t' value='' onchange='ihm_tableau.titre_t=this.value;' /></label></div>
+  <div><label><span><:enlumtypo:tableau_resume:></span><input id='resume_t' value='' onchange='ihm_tableau.resume_t=this.value;' /></label></div>
+  </form>
+  <div id='table'></div>
+  <div id='debug'></div>
+  <a id="enregistrer" href="javascript:enregistre()"><:enlumtypo:tableau_enregistrer:></a>
+  </body>
+</html>
diff --git a/www/plugins/enluminures_typographiques_v3/enluminures_typo_pipelines.php b/www/plugins/enluminures_typographiques_v3/enluminures_typo_pipelines.php
new file mode 100644 (file)
index 0000000..6a9587a
--- /dev/null
@@ -0,0 +1,213 @@
+<?php\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+function typoenluminee_porte_plume_barre_pre_charger($barres){\r
+       $barre = &$barres['edition'];\r
+       \r
+       $barre->cacher('stroke_through');\r
+\r
+       $module_barre = "barre_outils";\r
+       if (intval($GLOBALS['spip_version_branche'])>2)\r
+               $module_barre = "barreoutils";\r
+       \r
+       $barre->set('header1', array(\r
+               // groupe formatage paragraphe\r
+               "dropMenu"    => array(\r
+                       // bouton <cadre>\r
+                       array(\r
+                               "id"          => 'intertitre',\r
+                               "name"        => _T('barre_intertitre'),\r
+                               "className"   => 'outil_intertitre1', \r
+                               "openWith" => "\n{{{",\r
+                               "closeWith" => "}}}\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       array(\r
+                               "id"          => 'intertitre2',\r
+                               "name"        => _T('enlumtypo:barre_intertitre2'),\r
+                               "className"   => 'outil_intertitre2', \r
+                               "openWith" => "\n{{{**",\r
+                               "closeWith" => "}}}\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       array(\r
+                               "id"          => 'intertitre3',\r
+                               "name"        => _T('enlumtypo:barre_intertitre3'),\r
+                               "className"   => 'outil_intertitre3', \r
+                               "openWith" => "\n{{{***",\r
+                               "closeWith" => "}}}\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       array(\r
+                               "id"          => 'alignerdroite',\r
+                               "name"        => _T('enlumtypo:barre_alignerdroite'),\r
+                               "className"   => 'outil_alignerdroite', \r
+                               "openWith" => "\n[/",\r
+                               "closeWith" => "/]\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       array(\r
+                               "id"          => 'alignergauche',\r
+                               "name"        => _T('enlumtypo:barre_alignergauche'),\r
+                               "className"   => 'outil_alignergauche', \r
+                               "openWith" => "\n[!",\r
+                               "closeWith" => "!]\n",\r
+                               "display"     => true,\r
+                               "lang"        => array('ar','fa'),\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       array(\r
+                               "id"          => 'cadretexte',\r
+                               "name"        => _T('enlumtypo:barre_encadrer'),\r
+                               "className"   => 'outil_cadretexte', \r
+                               "openWith" => "\n[(",\r
+                               "closeWith" => ")]\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+                       // code spip\r
+                       array(\r
+                               "id"          => 'barre_cadre',\r
+                               "name"        => _T($module_barre.':barre_cadre'),\r
+                               "className"   => "outil_barre_cadre", \r
+                               "openWith"    => "\n&lt;cadre&gt;", \r
+                               "closeWith"   => "&lt;/cadre&gt;\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+               ),\r
+       ));\r
+       \r
+       $barre->set('bold', array(\r
+               // groupe formatage texte\r
+               "dropMenu"    => array(\r
+                       // Mise en évidence (gras + couleur)\r
+                       array(\r
+                               "id"          => 'miseenevidence',\r
+                               "name"        => _T('enlumtypo:barre_miseenevidence'),\r
+                               "className"   => "outil_miseenevidence",\r
+                               "openWith"    => "[*", \r
+                               "closeWith"   => "*]",\r
+                               "display"     => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+                       // Mise en évidence2 (gras + autre couleur)\r
+                       array(\r
+                               "id"          => 'miseenevidence2',\r
+                               "name"        => _T('enlumtypo:barre_miseenevidence2'),\r
+                               "className"   => "outil_miseenevidence2",\r
+                               "openWith"    => "[**", \r
+                               "closeWith"   => "*]",\r
+                               "display"     => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+                       // montrer une suppression\r
+                       array(\r
+                               "id"        => 'stroke_through_et',\r
+                               "name"      => _T('enlumtypo:barre_barre'), // :-)\r
+                               "className" => "outil_stroke_through_et", \r
+                               "openWith" => "<del>", \r
+                               "closeWith" => "</del>",\r
+                               "display"   => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+                       // Mise en exposant\r
+                       array(\r
+                               "id"          => 'exposant',\r
+                               "name"        => _T('enlumtypo:barre_exposant'),\r
+                               "className"   => "outil_exposant",\r
+                               "openWith"    => "<sup>", \r
+                               "closeWith"   => "</sup>",\r
+                               "display"     => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+                       // Mise en indice\r
+                       array(\r
+                               "id"          => 'indice',\r
+                               "name"        => _T('enlumtypo:barre_indice'),\r
+                               "className"   => "outil_indice",\r
+                               "openWith"    => "<sub>", \r
+                               "closeWith"   => "</sub>",\r
+                               "display"     => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+                       // cadre spip\r
+                       array(\r
+                               "id"          => 'barre_code',\r
+                               "name"        => _T($module_barre.':barre_code'),\r
+                               "className"   => "outil_barre_code", \r
+                               "openWith"    => "&lt;code&gt;", \r
+                               "closeWith"   => "&lt;/code&gt;",\r
+                               "display"     => true,\r
+                               "selectionType" => "word",\r
+                       ),\r
+               ),\r
+       ));\r
+       \r
+       // Appel Tableau\r
+       $barre->ajouterApres('notes', array(\r
+               "id"          => 'barre_tableau',\r
+               "name"        => _T('enlumtypo:barre_tableau'),\r
+               "className"   => "outil_barre_tableau",\r
+               "replaceWith" => 'function(markitup) { zone_selection = markitup.textarea; window.open("?exec=tableau_edit", "","scrollbars=yes,resizable=yes,width=700,height=600") }',\r
+               "display"     => true,\r
+               "selectionType" => "line",\r
+       ));\r
+       \r
+       $barre->set('quote', array(\r
+               "dropMenu"    => array(\r
+                       // poesie spip\r
+                       array(\r
+                               "id"          => 'barre_poesie',\r
+                               "name"        => _T($module_barre.':barre_poesie'),\r
+                               "className"   => "outil_barre_poesie", \r
+                               "openWith"    => "\n&lt;poesie&gt;", \r
+                               "closeWith"   => "&lt;/poesie&gt;\n",\r
+                               "display"     => true,\r
+                               "selectionType" => "line",\r
+                       ),\r
+               ),\r
+       ));     \r
+       \r
+       // Petites capitales\r
+       $barre->ajouterApres('italic', array(\r
+               "id"          => 'petitescapitales',\r
+               "name"        => _T('enlumtypo:barre_petitescapitales'),\r
+               "className"   => "outil_petitescapitales",\r
+               "openWith"    => "<sc>", \r
+               "closeWith"   => "</sc>",\r
+               "display"     => true,\r
+               "selectionType" => "word",\r
+       ));\r
+       \r
+       return $barres;\r
+}\r
+\r
+function typoenluminee_porte_plume_lien_classe_vers_icone($flux){\r
+       return array_merge($flux, array(\r
+               'outil_intertitre1' => array('spt-v1.png','-10px -226px'), //'intertitre.png'\r
+               'outil_intertitre2' => array('intertitre2.png','0'),\r
+               'outil_intertitre3' => array('intertitre3.png','0'),\r
+               'outil_alignerdroite' => array('right.png','0'),\r
+               'outil_alignergauche' => array('left.png','0'),\r
+               'outil_stroke_through_et' => array('spt-v1.png','-10px -946px'), //'text_strikethrough.png'\r
+               'outil_cadretexte' => array('cadretexte.png','0'),\r
+               'outil_speciaux' => array('tag.png','0'),\r
+               'outil_barre_code' => array('page_white_code_red.png','0'),\r
+               'outil_barre_cadre' => array('page_white_code.png','0'),\r
+\r
+               'outil_miseenevidence' => array('miseenevidence.png','0'),\r
+               'outil_miseenevidence2' => array('miseenevidence2.png','0'),\r
+               'outil_exposant' => array('exposant.png','0'),\r
+               'outil_indice' => array('indice.png','0'),\r
+               'outil_petitescapitales' => array('petitescapitales.png','0'),\r
+               'outil_barre_poesie' => array('poesie.png','0'),\r
+               \r
+               'outil_barre_tableau' => array('barre-tableau.png','0'),\r
+       ));\r
+}\r
+\r
+?>\r
diff --git a/www/plugins/enluminures_typographiques_v3/exec/tableau_edit.php b/www/plugins/enluminures_typographiques_v3/exec/tableau_edit.php
new file mode 100644 (file)
index 0000000..a99aa00
--- /dev/null
@@ -0,0 +1,8 @@
+<?php\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+function exec_tableau_edit_dist() {\r
+       include_spip("public/assembler"); // Pour pouvoir utiliser recuperer_fond\r
+       echo recuperer_fond('editeur/tableau_edit');\r
+}\r
+?>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/fonds/cfg_bte.html b/www/plugins/enluminures_typographiques_v3/fonds/cfg_bte.html
new file mode 100644 (file)
index 0000000..213a301
--- /dev/null
@@ -0,0 +1,14 @@
+<!-- titre=Enluminures Typo V3-->\r
+<!-- icone=img_pack/e.gif-->\r
+[(#SET{logo,\r
+<img src='#DOSSIER_SQUELETTE/../img_pack/moinecopiste.gif' width='59' height='85' alt='Logo Enluminures Typographiques' style="float:#LANG_RIGHT;" />\r
+})]\r
+<!-- descriptif=\r
+#GET{logo}\r
+<h4>Configuration des Enluminures Typographique V3</h4>\r
+-->\r
+#CACHE{0}\r
+\r
+<div class="ajax">\r
+       #FORMULAIRE_CONFIGURER_TYPOENLUMINEE\r
+</div>\r
diff --git a/www/plugins/enluminures_typographiques_v3/formulaires/configurer_typoenluminee.html b/www/plugins/enluminures_typographiques_v3/formulaires/configurer_typoenluminee.html
new file mode 100644 (file)
index 0000000..aaebf34
--- /dev/null
@@ -0,0 +1,106 @@
+<div class="formulaire_spip formulaire_configurer formulaire_#FORM">\r
+[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]\r
+[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]\r
+       \r
+<form method="post" action="#ENV{action}"><div>[(#ENV{_cfg_}|form_hidden)]<input type="hidden" name="_meta_casier" value="bte" /></div>\r
+       #ACTION_FORMULAIRE{#ENV{action}}\r
+\r
+<ul><li class="fieldset"><fieldset><legend><:enlumtypo:cfg_puces:></legend></li>\r
+       <?php if (isset($GLOBALS['barre_typo_pas_de_fausses_puces'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'barre_typo_pas_de_fausses_puces'&nbsp;:<br /><?php if ($GLOBALS['barre_typo_pas_de_fausses_puces'] === true) { ?>Remplacement<?php } else { ?>Conserver le traitement par défaut de SPIP<?php } ?></p></li>\r
+       <?php } else { ?>\r
+       <li><label for="sc_puces">Puces</label>\r
+       <p class="explication">Remplacement des fausses puces de SPIP (- en début de ligne) par de vraies listes à puces (-* en début de ligne)</p>\r
+       <select name="puces" id="sc_puces" class="forml">\r
+               <option value="Oui"[ selected="(#ENV{puces,Non}|=={Oui}|?{selected})"]>Remplacement</option>\r
+               <option value="Non"[ selected="(#ENV{puces,Non}|=={Non}|?{selected})"]>Conserver le traitement par défaut de SPIP</option>\r
+       </select></li>\r
+       <?php } ?>\r
+</fieldset></ul>\r
+<fieldset><legend><:enlumtypo:cfg_titraille:></legend>\r
+       <p>Les valeurs par défaut sont basées sur la valeur historique de SPIP pour {{{}}} <=> H3. En HTML, il n'y a pas de H7 ce qui explique la balise choisie pour le niveau 5.</p>\r
+       <p>N'oubliez pas que la titraille sert à donner un sens dans la hiérarchisation des idées d'un texte, et <strong>surtout pas</strong> à obtenir un effet de taille de texte !</p>\r
+       <ul><li><p class="explication">Titraille de premier niveau&nbsp;: {{{}}} ou {{{* }}}</p></li>\r
+       <?php if (isset($GLOBALS['config_intertitre'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'debut_intertitre' et 'fin_intertitre'</p></li>\r
+       <?php } else { ?>\r
+       <li>\r
+       <label for="sc_titraille1open">Balise <strong>ouvrante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille1open" id="sc_titraille1open" value="[(#ENV{titraille1open,'<h3 class="spip">'})]" size="30" class="fondl" /><br />\r
+       <label for="sc_titraille1open">Balise <strong>fermante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille1close" id="sc_titraille1close" value="[(#ENV{titraille1close,'</h3>'})]" size="30" class="fondl" />\r
+       <?php } ?>\r
+       </li>\r
+       <li><p class="explication">Titraille de deuxième niveau&nbsp;: {{{** }}}</p></li>\r
+       <?php if (isset($GLOBALS['config_intertitre'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'debut_intertitre_2' et 'fin_intertitre_2'</p></li>\r
+       <?php } else { ?>\r
+       <li>\r
+       <label for="sc_titraille2open">Balise <strong>ouvrante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille2open" id="sc_titraille2open" value="[(#ENV{titraille2open,'<h4 class="spip">'})]" size="30" class="fondl" /><br />\r
+       <label for="sc_titraille2open">Balise <strong>fermante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille2close" id="sc_titraille2close" value="[(#ENV{titraille2close,'</h4>'})]" size="30" class="fondl" />\r
+       <?php } ?>\r
+       </li>\r
+       <li><p class="explication">Titraille de troisième niveau&nbsp;: {{{*** }}}</p></li>\r
+       <?php if (isset($GLOBALS['config_intertitre'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'debut_intertitre_3' et 'fin_intertitre_3'</p></li>\r
+       <?php } else { ?>\r
+       <li>\r
+       <label for="sc_titraille3open">Balise <strong>ouvrante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille3open" id="sc_titraille3open" value="[(#ENV{titraille3open,'<h5 class="spip">'})]" size="30" class="fondl" /><br />\r
+       <label for="sc_titraille3open">Balise <strong>fermante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille3close" id="sc_titraille3close" value="[(#ENV{titraille3close,'</h5>'})]" size="30" class="fondl" />\r
+       <?php } ?>\r
+       </li>\r
+       <li><p class="explication">Titraille de quatrième niveau&nbsp;: {{{**** }}}</p></li>\r
+       <?php if (isset($GLOBALS['config_intertitre'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'debut_intertitre_4' et 'fin_intertitre_4'</p></li>\r
+       <?php } else { ?>\r
+       <li>\r
+       <label for="sc_titraille4open">Balise <strong>ouvrante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille4open" id="sc_titraille4open" value="[(#ENV{titraille4open,'<h6 class="spip">'})]" size="30" class="fondl" /><br />\r
+       <label for="sc_titraille4open">Balise <strong>fermante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille4close" id="sc_titraille4close" value="[(#ENV{titraille4close,'</h6>'})]" size="30" class="fondl" />\r
+       <?php } ?>\r
+       </li>\r
+       <li><p class="explication">Titraille de cinquième niveau&nbsp;: {{{***** }}}</p></li>\r
+       <?php if (isset($GLOBALS['config_intertitre'])) { ?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'debut_intertitre_5' et 'fin_intertitre_5'</p></li>\r
+       <?php } else { ?>\r
+       <li>\r
+       <label for="sc_titraille5open">Balise <strong>ouvrante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille5open" id="sc_titraille5open" value="[(#ENV{titraille5open,'<strong class="spip titraille5">'})]" size="30" class="fondl" /><br />\r
+       <label for="sc_titraille5open">Balise <strong>fermante</strong>&nbsp;:</label>\r
+       <input type="text" name="titraille5close" id="sc_titraille5close" value="[(#ENV{titraille5close,'</strong>'})]" size="30" class="fondl" />\r
+       <?php } ?>\r
+       </li>\r
+       </ul>\r
+</fieldset>\r
+<ul><li class="fieldset"><fieldset><legend><:enlumtypo:cfg_insertcss:></legend></li>\r
+       <?php if (isset($GLOBALS['BarreTypoEnrichie_Preserve_Header'])) { \r
+?>\r
+       <li><p class="explication">Configuré dans le mes_options par 'BarreTypoEnrichie_Preserve_Header'\r
+       <?php \r
+       echo ($GLOBALS['BarreTypoEnrichie_Preserve_Header']=='Oui')?"Ne pas faire l'insertion automatique":"Insertion automatique";\r
+       ?>\r
+       </p></li>\r
+       <?php\r
+       } else { ?>\r
+       <li><label for="sc_insertcss">&#35;INSERT_HEAD</label>\r
+       <p class="explication">Insertion automatique des CSS spécifiques à la BTE dans l'espace public (via &#35;INSERT_HEAD dans les squelettes)</p>\r
+       <select name="insertcss" id="sc_insertcss" class="forml">\r
+               <option value="Oui"[ selected="(#ENV{insertcss,Oui}|=={Oui}|?{selected})"]>Insertion automatique</option>\r
+               <option value="Non"[ selected="(#ENV{insertcss,Oui}|=={Non}|?{selected})"]>Ne pas faire l'insertion automatique</option>\r
+       </select></li>\r
+       <?php } ?>\r
+</fieldset></ul>\r
+\r
+\r
+       <p class="boutons">\r
+               <input type="submit" name="reinit" class="submit" value="<:mediabox:bouton_reinitialiser:>" />\r
+               <input type="submit" name="enregistrer" class="submit" value="<:bouton_valider:>" />\r
+       </p>\r
+\r
+</form>\r
+</div>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/avances.png b/www/plugins/enluminures_typographiques_v3/icones_barre/avances.png
new file mode 100644 (file)
index 0000000..628cf2d
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/avances.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/barre-tableau.png b/www/plugins/enluminures_typographiques_v3/icones_barre/barre-tableau.png
new file mode 100644 (file)
index 0000000..c895a1f
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/barre-tableau.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/barre-wiki.png b/www/plugins/enluminures_typographiques_v3/icones_barre/barre-wiki.png
new file mode 100644 (file)
index 0000000..8d1a035
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/barre-wiki.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/cadretexte.png b/www/plugins/enluminures_typographiques_v3/icones_barre/cadretexte.png
new file mode 100644 (file)
index 0000000..29c4ec9
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/cadretexte.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/center.png b/www/plugins/enluminures_typographiques_v3/icones_barre/center.png
new file mode 100644 (file)
index 0000000..38a0659
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/center.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/eacute-maj.png b/www/plugins/enluminures_typographiques_v3/icones_barre/eacute-maj.png
new file mode 100644 (file)
index 0000000..4deee16
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/eacute-maj.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/exposant.png b/www/plugins/enluminures_typographiques_v3/icones_barre/exposant.png
new file mode 100644 (file)
index 0000000..4cb2cfe
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/exposant.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/indice.png b/www/plugins/enluminures_typographiques_v3/icones_barre/indice.png
new file mode 100644 (file)
index 0000000..357b7fe
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/indice.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre2.png b/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre2.png
new file mode 100644 (file)
index 0000000..da86b80
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre2.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre3.png b/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre3.png
new file mode 100644 (file)
index 0000000..34f3a6a
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/intertitre3.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/left.png b/www/plugins/enluminures_typographiques_v3/icones_barre/left.png
new file mode 100644 (file)
index 0000000..21bfe4c
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/left.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/listenum.png b/www/plugins/enluminures_typographiques_v3/icones_barre/listenum.png
new file mode 100644 (file)
index 0000000..0492387
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/listenum.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/listepuces.png b/www/plugins/enluminures_typographiques_v3/icones_barre/listepuces.png
new file mode 100644 (file)
index 0000000..fc1d35a
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/listepuces.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence.png b/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence.png
new file mode 100644 (file)
index 0000000..1dfa7dd
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence2.png b/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence2.png
new file mode 100644 (file)
index 0000000..87a3c72
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/miseenevidence2.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/oelig-maj.png b/www/plugins/enluminures_typographiques_v3/icones_barre/oelig-maj.png
new file mode 100644 (file)
index 0000000..c335cf1
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/oelig-maj.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/oelig.png b/www/plugins/enluminures_typographiques_v3/icones_barre/oelig.png
new file mode 100644 (file)
index 0000000..89bdb5a
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/oelig.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code.png b/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code.png
new file mode 100644 (file)
index 0000000..0c76bd1
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code_red.png b/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code_red.png
new file mode 100644 (file)
index 0000000..87a6914
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/page_white_code_red.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/petitescapitales.png b/www/plugins/enluminures_typographiques_v3/icones_barre/petitescapitales.png
new file mode 100644 (file)
index 0000000..9122ea2
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/petitescapitales.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/poesie.png b/www/plugins/enluminures_typographiques_v3/icones_barre/poesie.png
new file mode 100644 (file)
index 0000000..3c5bbfe
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/poesie.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/right.png b/www/plugins/enluminures_typographiques_v3/icones_barre/right.png
new file mode 100644 (file)
index 0000000..79d3b19
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/right.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/tag.png b/www/plugins/enluminures_typographiques_v3/icones_barre/tag.png
new file mode 100644 (file)
index 0000000..e093032
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/tag.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/icones_barre/text_strikethrough.png b/www/plugins/enluminures_typographiques_v3/icones_barre/text_strikethrough.png
new file mode 100644 (file)
index 0000000..612058a
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/icones_barre/text_strikethrough.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/img_pack/e.gif b/www/plugins/enluminures_typographiques_v3/img_pack/e.gif
new file mode 100644 (file)
index 0000000..8a27a20
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/img_pack/e.gif differ
diff --git a/www/plugins/enluminures_typographiques_v3/img_pack/moinecopiste.gif b/www/plugins/enluminures_typographiques_v3/img_pack/moinecopiste.gif
new file mode 100644 (file)
index 0000000..c16f858
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/img_pack/moinecopiste.gif differ
diff --git a/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_ar.php b/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_ar.php
new file mode 100644 (file)
index 0000000..a54972a
--- /dev/null
@@ -0,0 +1,46 @@
+<?php\r
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+$GLOBALS[$GLOBALS['idx_lang']] = array(\r
+\r
+// Aide des boutons supplémentaires de la barre typo\r
+'barre_intertitre2' => '{2{&#1593;&#1606;&#1608;&#1575;&#1606; &#1601;&#1602;&#1585;&#1577; &#1605;&#1587;&#1578;&#1608;&#1609; 2}2}',\r
+'barre_intertitre3' => '{3{&#1593;&#1606;&#1608;&#1575;&#1606; &#1601;&#1602;&#1585;&#1577; &#1605;&#1587;&#1578;&#1608;&#1609; 3}3}',\r
+'barre_miseenevidence' => '[*&#1573;&#1576;&#1585;&#1575;&#1586;*]',\r
+'barre_miseenevidence2' => '[**&#1573;&#1576;&#1585;&#1575;&#1586;*] &#1575;&#1604;&#1606;&#1589; (&#1604;&#1608;&#1606; &#1570;&#1582;&#1585;)',\r
+\r
+'barre_exposant' => '&#1578;&#1581;&#1608;&#1610;&#1604; &#1575;&#1604;&#1609;\r
+ &lt;sup&gt;&#1606;&#1589; &#1601;&#1608;&#1602;&#1610;&lt;/sup&gt;',\r
\r
+ 'barre_indice' => '&#1578;&#1581;&#1608;&#1610;&#1604; &#1575;&#1604;&#1609;\r
+&lt;sub&gt;&#1606;&#1589; &#1587;&#1601;&#1604;&#1610;&lt;/sub&gt;',\r
\r
+'barre_petitescapitales' => '&#1578;&#1581;&#1608;&#1610;&#1604; &#1575;&#1604;&#1609; &lt;sc&gt;&#1581;&#1585;&#1608;&#1601; &#1603;&#1576;&#1610;&#1585;&#1577; &#1605;&#1589;&#1594;&#1585;&#1577;&lt;/sc&gt;',\r
+'barre_centrer' => '[|&#1578;&#1608;&#1587;&#1610;&#1591;|] &#1575;&#1604;&#1601;&#1602;&#1585;&#1577;',\r
+'barre_alignerdroite' => '&#1605;&#1581;&#1575;&#1584;&#1575;&#1577; &#1575;&#1604;&#1609; [/&#1575;&#1604;&#1610;&#1605;&#1610;&#1606;/]',\r
+'barre_alignergauche' => '&#1605;&#1581;&#1575;&#1584;&#1575;&#1577; &#1575;&#1604;&#1609; [!&#1575;&#1604;&#1610;&#1587;&#1575;&#1585;!]',\r
+'barre_encadrer' => '&#1608;&#1590;&#1593; &#1601;&#1610; [(&#1573;&#1591;&#1575;&#1585;)]',\r
+\r
+'barre_barre' => '&lt;del&gt;&#1588;&#1591;&#1576;&lt;/del&gt; &#1575;&#1604;&#1606;&#1589;',\r
+\r
+'barre_avances' => '&#1575;&#1604;&#1575;&#1578;&#1580;&#1575;&#1607;&#1548; &#1575;&#1604;&#1575;&#1578;&#1580;&#1575;&#1607;!',\r
+'barre_boutonsavances' => '&#1573;&#1583;&#1575;&#1585;&#1577; &#1573;&#1590;&#1575;&#1601;&#1610;&#1577; &#1604;&#1604;&#1605;&#1581;&#1575;&#1584;&#1575;&#1577; &#1604;&#1604;&#1575;&#1587;&#1578;&#1582;&#1583;&#1575;&#1605; &#1576;&#1578;&#1593;&#1602;&#1604;',\r
+'barre_tableau' => '&#1573;&#1583;&#1585;&#1575;&#1580; &#1580;&#1583;&#1608;&#1604; &#1571;&#1608; &#1578;&#1593;&#1583;&#1610;&#1604; &#1580;&#1583;&#1608;&#1604; (&#1578;&#1581;&#1583;&#1610;&#1583;&#1607; &#1571;&#1608;&#1604;&#1575;&#1611;)',\r
+\r
+'barre_formatages_speciaux' => '&#1578;&#1606;&#1587;&#1610;&#1602;&#1575;&#1578; &#1582;&#1575;&#1589;&#1577;',\r
+'barre_code' => '&#1578;&#1606;&#1587;&#1610;&#1602; &lt;code&gt;&#1603;&#1585;&#1605;&#1608;&#1586; &#1576;&#1585;&#1605;&#1580;&#1610;&#1577;&lt;/code&gt;',\r
+'barre_cadre' => '&#1608;&#1590;&#1593; &#1601;&#1610; &lt;cadre&gt;&#1573;&#1591;&#1575;&#1585;&lt;/cadre&gt;',\r
+'barre_poesie' => '&lt;poesie&gt;&#1588;&#1593;&#1585;&lt;/poesie&gt;',\r
+\r
+'cfg_puces' => '&#1605;&#1593;&#1575;&#1604;&#1580;&#1577; &#1575;&#1604;&#1604;&#1608;&#1575;&#1574;&#1581;',\r
+'cfg_titraille' => '&#1593;&#1606;&#1575;&#1608;&#1610;&#1606;',\r
+'cfg_insertcss' => '&#1575;&#1583;&#1585;&#1575;&#1580; &#1608;&#1585;&#1602;&#1577; &#1575;&#1606;&#1605;&#1575;&#1591;',\r
+\r
+'tableau_enregistrer' => '&#1581;&#1601;&#1592;',\r
+'tableau_prem_ligne' => '&#1575;&#1604;&#1587;&#1591;&#1585; &#1575;&#1604;&#1571;&#1608;&#1604;',\r
+'tableau_resume' => '&#1575;&#1604;&#1582;&#1604;&#1575;&#1589;&#1577;',\r
+'tableau_titre' => '&#1575;&#1604;&#1593;&#1606;&#1608;&#1575;&#1606;'\r
+\r
+);\r
+?>\r
diff --git a/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_en.php b/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_en.php
new file mode 100644 (file)
index 0000000..5c1d65f
--- /dev/null
@@ -0,0 +1,44 @@
+<?php\r
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+$GLOBALS[$GLOBALS['idx_lang']] = array(\r
+\r
+// Aide des boutons supplémentaires de la barre typo\r
+'barre_intertitre2' => 'Turn into a {2{2nd-level subtitle}2}',\r
+'barre_intertitre3' => 'Turn into a {3{3rd-level subtitle}3}',\r
+'barre_miseenevidence' => '[*Emphasize*] the text',\r
+'barre_miseenevidence2' => '[**Emphasize*] the text(2nd colour)',\r
+\r
+'barre_exposant' => 'Superscript',\r
+\r
+'barre_indice' => 'Subscript',\r
+\r
+'barre_petitescapitales' => 'Small caps',\r
+'barre_centrer' => '[|Centre|] the paragraph',\r
+'barre_alignerdroite' => '[/Right-align/] the paragraph',\r
+'barre_alignergauche' => '[!left-align!] the paragraph',\r
+'barre_encadrer' => '[(Place a border)] round the paragraph',\r
+\r
+'barre_barre' => '&lt;del&gt;Strikethrough&lt;/del&gt;',\r
+\r
+'barre_avances' => 'Meaning, not apparence!',\r
+'barre_boutonsavances' => 'Extra justifications, use with caution!',\r
+'barre_tableau' => 'Insert/modify (select it first) a table',\r
+\r
+'barre_formatages_speciaux' => 'Special formats',\r
+'barre_code' => 'Turn into &lt;code&gt;programming code&lt;/code&gt;',\r
+'barre_cadre' => 'Put in a &lt;cadre&gt;text box&lt;/cadre&gt;',\r
+'barre_poesie' => 'display as &lt;poesie&gt;poetry&lt;/poesie&gt;',\r
+\r
+'cfg_puces' => 'Bullets',\r
+'cfg_titraille' => 'Headings',\r
+'cfg_insertcss' => 'Insert CSS',\r
+\r
+'tableau_enregistrer' => 'Save',\r
+'tableau_prem_ligne' => 'First row',\r
+'tableau_resume' => 'Summary',\r
+'tableau_titre' => 'Title'\r
+\r
+);\r
+?>\r
diff --git a/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_es.php b/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_es.php
new file mode 100644 (file)
index 0000000..e3dafac
--- /dev/null
@@ -0,0 +1,27 @@
+<?php\r
+// This is a SPIP language file  --  Esto es un archivo de idioma SPIP\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+$GLOBALS[$GLOBALS['idx_lang']] = array(\r
+\r
+// Aide des boutons supplémentaires de la barre typo\r
+'barre_intertitre2' => 'Transformar en {2{intert&iacute;tulos nivel dos}2}',\r
+'barre_intertitre3' => 'Transformar en {3{intert&iacute;tulos nivel tres}3}',\r
+'barre_miseenevidence' => 'Poner el texto en [*evidencia*]',\r
+'barre_exposant' => 'Poner el texto en &lt;sup&gt;potencia&lt;/sup&gt;',\r
+'barre_petitescapitales' => 'Poner el texto en &lt;sc&gt;may&uacute;sculas peque&ntilde;as&lt;/sc&gt;',\r
+'barre_centrer' => '[|Centrar|] el p&aacute;rrafo',\r
+'barre_alignerdroite' => '[/Al&iacute;nea a la derecha/] el p&aacute;rrafo',\r
+'barre_encadrer' => '[(Encuadrar)] el p&aacute;rrafo',\r
+\r
+'barre_poesie' => 'Mettre en forme comme une &lt;poesie&gt;po&eacute;sie&lt;/poesie&gt;',\r
+\r
+'barre_avances' => 'Du sens, du sens&nbsp;!',\r
+'barre_boutonsavances' => 'Mises en sens suppl&eacute;mentaires, &agrave; utiliser avec mod&eacute;ration et discernement&nbsp;!',\r
+\r
+'cfg_puces' => 'Traitement des puces',\r
+'cfg_titraille' => 'Titraille',\r
+'cfg_insertcss' => 'Insertion CSS'\r
+\r
+);\r
+?>\r
diff --git a/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_fr.php b/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_fr.php
new file mode 100644 (file)
index 0000000..669838e
--- /dev/null
@@ -0,0 +1,45 @@
+<?php\r
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+$GLOBALS[$GLOBALS['idx_lang']] = array(\r
+\r
+// Aide des boutons supplémentaires de la barre typo\r
+'barre_intertitre2' => 'Transformer en {{{**intertitre niveau deux}}}',\r
+'barre_intertitre3' => 'Transformer en {{{***intertitre niveau trois}}}',\r
+'barre_miseenevidence' => 'Mettre le texte en [*&eacute;vidence*]',\r
+'barre_miseenevidence2' => 'Mettre le texte en [**&eacute;vidence*] (2e couleur)',\r
+\r
+'barre_exposant' => 'Mettre le texte en &lt;sup&gt;exposant&lt;/sup&gt;',\r
+\r
+'barre_indice' => 'Mettre le texte en &lt;sub&gt;indice&lt;/sub&gt;',\r
+\r
+'barre_petitescapitales' => 'Mettre le texte en &lt;sc&gt;petites capitales&lt;/sc&gt;',\r
+'barre_centrer' => '[|Centrer|] le paragraphe',\r
+'barre_alignerdroite' => '[/Aligne &agrave; droite/] le paragraphe',\r
+'barre_alignergauche' => '[!Aligne &agrave; gauche!] le paragraphe',\r
+'barre_encadrer' => '[(Encadrer)] le paragraphe',\r
+\r
+'barre_barre' => '&lt;del&gt;Barrer&lt;/del&gt; le texte',\r
+\r
+'barre_avances' => 'Du sens, du sens&nbsp;!',\r
+'barre_boutonsavances' => 'Mises en sens suppl&eacute;mentaires, &agrave; utiliser avec mod&eacute;ration et discernement&nbsp;!',\r
+'barre_tableau' => 'Ins&eacute;rer/modifier (le s&eacute;lectionner avant) un tableau',\r
+\r
+'barre_formatages_speciaux' => 'Formatage sp&eacute;ciaux',\r
+'barre_code' => 'Mettre en forme un &lt;code&gt;code informatique&lt;/code&gt;',\r
+'barre_cadre' => 'Placer dans une &lt;cadre&gt;zone de saisie de texte&lt;/cadre&gt;',\r
+'barre_poesie' => 'Mettre en forme comme une &lt;poesie&gt;po&eacute;sie&lt;/poesie&gt;',\r
+\r
+'cfg_puces' => 'Traitement des puces',\r
+'cfg_titraille' => 'Titraille',\r
+'cfg_insertcss' => 'Insertion CSS',\r
+'configuration_typoenluminee' => 'Enluminures Typographiques',\r
+\r
+'tableau_enregistrer' => 'Enregistrer',\r
+'tableau_prem_ligne' => 'Premi&egrave;re ligne',\r
+'tableau_resume' => 'R&eacute;sum&eacute;',\r
+'tableau_titre' => 'Titre'\r
+\r
+);\r
+?>\r
diff --git a/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_it.php b/www/plugins/enluminures_typographiques_v3/lang/enlumtypo_it.php
new file mode 100644 (file)
index 0000000..39a60a8
--- /dev/null
@@ -0,0 +1,27 @@
+<?php\r
+// This is a SPIP language file  --  Ceci est un fichier langue de SPIP\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+$GLOBALS[$GLOBALS['idx_lang']] = array(\r
+\r
+// Aide des boutons supplémentaires de la barre typo\r
+'barre_intertitre2' => 'Converti in {2{sottotitolo 2o-livello}2}',\r
+'barre_intertitre3' => 'Converti in {3{sottotitolo 3o-livello}3}',\r
+'barre_miseenevidence' => '[*Evidenziare*] il testo',\r
+'barre_exposant' => 'Sovrimpressione',\r
+'barre_petitescapitales' => 'Maiuscoletto',\r
+'barre_centrer' => '[|Centrare|] il paragrafo',\r
+'barre_alignerdroite' => '[/allinea a destra/] il paragrafo',\r
+'barre_encadrer' => '[(Riquadro)] attorno al paragrafo',\r
+\r
+'barre_poesie' => 'stile poetico',\r
+\r
+'barre_avances' => 'Allineamento&nbsp;!',\r
+'barre_boutonsavances' => 'Formattazione supplementare, utilizzare con moderazione e discernimento&nbsp;!',\r
+\r
+'cfg_puces' => 'Traitement des puces',\r
+'cfg_titraille' => 'Titraille',\r
+'cfg_insertcss' => 'Insertion CSS'\r
+\r
+);\r
+?>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/lang/paquet-typoenluminee_fr.php b/www/plugins/enluminures_typographiques_v3/lang/paquet-typoenluminee_fr.php
new file mode 100644 (file)
index 0000000..bfe2583
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+// Ceci est un fichier langue de SPIP -- This is a SPIP language file
+
+///  Fichier produit par PlugOnet
+// Module: paquet-typoenluminee
+// Langue: fr
+// Date: 08-01-2012 17:02:08
+// Items: 2
+
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+$GLOBALS[$GLOBALS['idx_lang']] = array(
+
+// T
+       'typoenluminee_description' => 'Ce plugin ajoute des raccourcis typographiques et des boutons au porte plume. Par exemple :\r
+-* Paragraphes :\r
+-** {{Sous-titres}} <code>{{{**</code>Texte du titre<code>}}}</code>, le nombre d\'étoiles (*) variant de 2 à 5, la barre de raccourcis ne proposant que 2 et 3\r
+-** {{Centrer}} <code>[|</code>Paragraphe centré<code>|]</code>\r
+-** {{Aligner à droite}} <code>[/</code>Paragraphe aligné à droite<code>/]</code>\r
+-** {{Encadrer}} <code>[(</code>Paragraphe à encadrer<code>)]</code>\r
+-* Caractères :\r
+-** {{Mise en évidence}} <code>[*</code>texte en évidence<code>*]</code>\r
+-** {{Mise en évidence variante}} <code>[**</code>texte en évidence (autre couleur)<code>*]</code>\r
+-** {{Mise en exposant}} {&lt;sup&gt;}texte en exposant{&lt;/sup&gt;}\r
+-** {{Petites capitales}} {&lt;sc&gt;}texte en petite capitales{&lt;/sc&gt;}\r
+-** {{Biffé}} {&lt;del&gt;}texte biffé{&lt;/del&gt;}
+
+',
+       'typoenluminee_slogan' => 'Plein de raccourcis pour la mise en forme !',
+);
+?>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/paquet.xml b/www/plugins/enluminures_typographiques_v3/paquet.xml
new file mode 100644 (file)
index 0000000..047b319
--- /dev/null
@@ -0,0 +1,35 @@
+<paquet
+       prefix="typoenluminee"
+       categorie="edition"
+       version="3.3.2"
+       etat="stable"
+       compatibilite="[2.0.3;3.0.99]"
+       logo="prive/themes/spip/images/typoenluminee-32.png"
+       documentation="http://www.spip-contrib.net/Enluminures-typographiques-V3-pour-SPIP-2-avec"
+>      
+
+       <nom>Enluminures typographiques</nom>
+       <!-- Plein de raccourcis pour la mise en forme ! -->
+
+       <auteur lien="http://www.spip-contrib.net/_Jacques-PYRAT_">Jacques</auteur>
+       <auteur lien="http://www.spip-contrib.net/_Francois-Schreuer_">François</auteur>
+
+       <copyright>2007</copyright>
+
+       <licence lien="http://www.gnu.org/licenses/gpl-3.0.html">GPL 3</licence>
+
+       <pipeline nom="pre_propre" inclure="typoenluminee.php" />
+       <pipeline nom="post_propre" inclure="typoenluminee.php" />
+       <pipeline nom="pre_typo" inclure="typoenluminee.php" />
+       <pipeline nom="post_typo" inclure="typoenluminee.php" />
+       <pipeline nom="nettoyer_raccourcis_typo" inclure="typoenluminee.php" />
+       <pipeline nom="insert_head_css" inclure="typoenluminee_pipelines.php" />
+       <pipeline nom="insert_head" inclure="typoenluminee_pipelines.php" />
+       <pipeline nom="header_prive" inclure="typoenluminee_pipelines.php" />
+       <pipeline nom="porte_plume_barre_pre_charger" inclure="enluminures_typo_pipelines.php" />
+       <pipeline nom="porte_plume_lien_classe_vers_icone" inclure="enluminures_typo_pipelines.php" />
+       
+       <menu nom="configurer_typoenluminee" titre="enlumtypo:configuration_typoenluminee" parent="menu_squelette" icone="images/typoenluminee-16.png" />
+
+       <necessite nom="porte_plume" compatibilite="[1.2.2;[" />
+</paquet>
diff --git a/www/plugins/enluminures_typographiques_v3/plugin.xml b/www/plugins/enluminures_typographiques_v3/plugin.xml
new file mode 100644 (file)
index 0000000..aba71e0
--- /dev/null
@@ -0,0 +1,70 @@
+<plugin>\r
+       <nom>Enluminures typographiques</nom>\r
+       <slogan>Plein de raccourcis pour la mise en forme !</slogan>\r
+       <auteur>[Jacques->http://www.spip-contrib.net/_Jacques-PYRAT_], &#224; partir des raccourcis mis en place par [Fran&#231;ois->http://www.spip-contrib.net/_Francois-Schreuer_]</auteur>\r
+       <licence>&#169; 2007 GNU/GPL</licence>\r
+       <lien>http://www.spip-contrib.net/Enluminures-typographiques-V3-pour-SPIP-2-avec</lien>\r
+       <version>3.3.2</version>\r
+       <etat>stable</etat>\r
+       <description>Ce plugin ajoute des raccourcis typographiques et des boutons au porte plume. Par exemple :\r
+-* Paragraphes :\r
+-** {{Sous-titres}} <code>{{{**</code>Texte du titre<code>}}}</code>, le nombre d'&#233;toiles (*) variant de 2 &#224; 5, la barre de raccourcis ne proposant que 2 et 3\r
+-** {{Centrer}} <code>[|</code>Paragraphe centr&#233;<code>|]</code>\r
+-** {{Aligner &#224; droite}} <code>[/</code>Paragraphe align&#233; &#224; droite<code>/]</code>\r
+-** {{Encadrer}} <code>[(</code>Paragraphe &#224; encadrer<code>)]</code>\r
+-* Caract&#232;res :\r
+-** {{Mise en &#233;vidence}} <code>[*</code>texte en &#233;vidence<code>*]</code>\r
+-** {{Mise en &#233;vidence variante}} <code>[**</code>texte en &#233;vidence (autre couleur)<code>*]</code>\r
+-** {{Mise en exposant}} {&lt;sup&gt;}texte en exposant{&lt;/sup&gt;}\r
+-** {{Petites capitales}} {&lt;sc&gt;}texte en petite capitales{&lt;/sc&gt;}\r
+-** {{Biff&#233;}} {&lt;del&gt;}texte biff&#233;{&lt;/del&gt;}\r
+\r
+{{Param&#233;trage}} : vous pouvez modifier le fonctionnement du plugin par votre fichier ecrire/mes_options.php ou en installant le plugin cfg (les options de cfg sont priortitaires par rapport &#224; celles de mes_options.php !)\r
+       </description>\r
+       <prefix>typoenluminee</prefix>\r
+       <icon>img_pack/moinecopiste.gif</icon>\r
+\r
+       <pipeline>\r
+               <nom>pre_propre</nom>\r
+               <inclure>typoenluminee.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>post_propre</nom>\r
+               <inclure>typoenluminee.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>pre_typo</nom>\r
+               <inclure>typoenluminee.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>post_typo</nom>\r
+               <inclure>typoenluminee.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>nettoyer_raccourcis_typo</nom>\r
+               <inclure>typoenluminee.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>insert_head_css</nom>\r
+               <inclure>typoenluminee_pipelines.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>insert_head</nom>\r
+               <inclure>typoenluminee_pipelines.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>header_prive</nom>\r
+               <inclure>typoenluminee_pipelines.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>porte_plume_barre_pre_charger</nom>\r
+               <inclure>enluminures_typo_pipelines.php</inclure>\r
+       </pipeline>\r
+       <pipeline>\r
+               <nom>porte_plume_lien_classe_vers_icone</nom>\r
+               <inclure>enluminures_typo_pipelines.php</inclure>\r
+       </pipeline>\r
+       <categorie>edition</categorie>\r
+       <necessite id="SPIP" version="[2.0.3;3.0.99]" />\r
+       <necessite id="porte_plume" version="[1.2.2;]" />\r
+</plugin>\r
diff --git a/www/plugins/enluminures_typographiques_v3/prive/squelettes/contenu/configurer_typoenluminee.html b/www/plugins/enluminures_typographiques_v3/prive/squelettes/contenu/configurer_typoenluminee.html
new file mode 100644 (file)
index 0000000..7926bbf
--- /dev/null
@@ -0,0 +1,5 @@
+[(#AUTORISER{configurer,typoenluminee}|sinon_interdire_acces)]\r
+<h1 class="grostitre"><:enlumtypo:configuration_typoenluminee:></h1>\r
+<div class="ajax">\r
+       #FORMULAIRE_CONFIGURER_TYPOENLUMINEE\r
+</div>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-16.png b/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-16.png
new file mode 100644 (file)
index 0000000..edb0d98
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-16.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-32.png b/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-32.png
new file mode 100644 (file)
index 0000000..76fbc36
Binary files /dev/null and b/www/plugins/enluminures_typographiques_v3/prive/themes/spip/images/typoenluminee-32.png differ
diff --git a/www/plugins/enluminures_typographiques_v3/svn.revision b/www/plugins/enluminures_typographiques_v3/svn.revision
new file mode 100644 (file)
index 0000000..9924c51
--- /dev/null
@@ -0,0 +1,10 @@
+<svn_revision>
+<text_version>
+Origine: file:///home/svn/repository/spip-zone/_plugins_/porte_plume_extras/enluminures_typographiques_v3
+Revision: 66428
+Dernier commit: 2012-10-02 11:00:02 +0200 
+</text_version>
+<origine>file:///home/svn/repository/spip-zone/_plugins_/porte_plume_extras/enluminures_typographiques_v3</origine>
+<revision>66428</revision>
+<commit>2012-10-02 11:00:02 +0200 </commit>
+</svn_revision>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/typoenluminee.php b/www/plugins/enluminures_typographiques_v3/typoenluminee.php
new file mode 100644 (file)
index 0000000..82bcfc9
--- /dev/null
@@ -0,0 +1,258 @@
+<?php\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+/*\r
+  * Ce plugin rajoute des raccourcis typographique et ameliore les possibilites de la barre typographique pour les redacteurs\r
+*/\r
+\r
+       /*\r
+        *    Fonctions de ces filtres :\r
+        *     Ils rajoutent quelques racourcis typo a SPIP\r
+        *\r
+        *     Syntaxe des raccourcis :\r
+        *           [/texte/] : aligner le texte a droite\r
+        *           [!texte!] : aligner le texte a gauche\r
+        *           [|texte|] : centrer le texte\r
+        *           [(texte)] : encadrer le texte (occupe toute la largeur de la page, a mettre autour d'un paragraphe)\r
+        *           [*texte*] : encadrer/surligner le texte (une partie a l'interieur d'un paragraphe)\r
+        *           [**texte*] : variante encadrer/surligner le texte (une partie a l'interieur d'un paragraphe)\r
+        *           <sup>texte</sup> : mettre en exposant le texte selectionne\r
+        *           <sub>texte</sub> : mettre en indice le texte selectionne\r
+        *\r
+        *     Styles pour les encadrements a rajouter dans votre feuille de style :\r
+        *            .texteencadre-spip {\r
+        *              background: #FFE;\r
+        *              border-bottom: 2px solid #999999;\r
+        *              border-left: 1px solid #EEEEEE;\r
+        *              border-right: 2px solid #999999;\r
+        *              border-top: 1px solid #EEEEEE;\r
+        *              padding: .25em;\r
+        *           }\r
+        *           .caractencadre-spip {\r
+        *              border: 1px solid #666;\r
+        *              padding: 0px .5em 0px .5em;\r
+        *           }\r
+        *\r
+       */\r
+\r
+// Gerer les variables de personnalisation, fonction depreciee sous SPIP 2.0\r
+// A suivre sur la methode...\r
+if(!function_exists('tester_variable')) {\r
+       function tester_variable($var, $val){\r
+               if (!isset($GLOBALS[$var]))     $GLOBALS[$var] = $val;\r
+       }\r
+}\r
+\r
+function typoenluminee_pre_propre($texte) {\r
+       if(!$texte) return $texte;\r
+\r
+       static $chercher_raccourcis=NULL;\r
+       static $remplacer_raccourcis=NULL;\r
+       \r
+       if ($chercher_raccourcis===NULL) {\r
+       \r
+               // tous les elements block doivent etre introduits ici\r
+               // pour etre pris en charge par paragrapher\r
+       \r
+               // Definition des differents intertitres possibles, si pas deja definies\r
+               if ((!function_exists('lire_config')) OR (isset($GLOBALS['config_intertitre']))) {\r
+                       tester_variable('debut_intertitre', '<h3 class="spip">');\r
+                       tester_variable('fin_intertitre', '</h3>');\r
+                       tester_variable('debut_intertitre_2', '<h4 class="spip">');\r
+                       tester_variable('fin_intertitre_2', '</h4>');\r
+                       tester_variable('debut_intertitre_3', '<h5 class="spip">');\r
+                       tester_variable('fin_intertitre_3', '</h5>');\r
+                       tester_variable('debut_intertitre_4', '<h6 class="spip">');\r
+                       tester_variable('fin_intertitre_4', '</h6>');\r
+                       tester_variable('debut_intertitre_5', '<strong class="spip titraille5">');\r
+                       tester_variable('fin_intertitre_5', '</strong>');\r
+               } else {\r
+                       $GLOBALS['debut_intertitre'] = lire_config('bte/titraille1open','<h3 class="spip">');\r
+                       $GLOBALS['fin_intertitre'] = lire_config('bte/titraille1close','</h3>');\r
+                       $GLOBALS['debut_intertitre_2'] = lire_config('bte/titraille2open','<h4 class="spip">');\r
+                       $GLOBALS['fin_intertitre_2'] = lire_config('bte/titraille2close','</h4>');\r
+                       $GLOBALS['debut_intertitre_3'] = lire_config('bte/titraille3open','<h5 class="spip">');\r
+                       $GLOBALS['fin_intertitre_3'] = lire_config('bte/titraille3close','</h5>');\r
+                       $GLOBALS['debut_intertitre_4'] = lire_config('bte/titraille4open','<h6 class="spip">');\r
+                       $GLOBALS['fin_intertitre_4'] = lire_config('bte/titraille4close','</h6>');\r
+                       $GLOBALS['debut_intertitre_5'] = lire_config('bte/titraille5open','<strong class="spip titraille5">');\r
+                       $GLOBALS['fin_intertitre_5'] = lire_config('bte/titraille5close','</strong>');\r
+               }\r
+       \r
+               tester_variable('toujours_paragrapher', false);\r
+       \r
+               global $debut_intertitre, $fin_intertitre;\r
+               global $debut_intertitre_2, $fin_intertitre_2;\r
+               global $debut_intertitre_3, $fin_intertitre_3;\r
+               global $debut_intertitre_4, $fin_intertitre_4;\r
+               global $debut_intertitre_5, $fin_intertitre_5;\r
+       \r
+               $chercher_raccourcis=array();\r
+               $remplacer_raccourcis=array();\r
+       \r
+               /* 9b */        $chercher_raccourcis[]="/(^|[^{])[{][{][{]\*\*\*\*\*(.*)[}][}][}]($|[^}])/SUms";\r
+               /* 9 */         $chercher_raccourcis[]="/(^|[^{])[{][{][{]\*\*\*\*(.*)[}][}][}]($|[^}])/SUms";\r
+               /* 7 */         $chercher_raccourcis[]="/(^|[^{])[{][{][{]\*\*\*(.*)[}][}][}]($|[^}])/SUms";\r
+               /* 5 */         $chercher_raccourcis[]="/(^|[^{])[{][{][{]\*\*(.*)[}][}][}]($|[^}])/SUms";\r
+               /* 3 */         $chercher_raccourcis[]="/(^|[^{])[{][{][{]\*(.*)[}][}][}]($|[^}])/SUms";\r
+               /* 1 */         $chercher_raccourcis[]="/(^|[^{])[{][{][{](.*)[}][}][}]($|[^}])/SUms";\r
+               /* 11 */        $chercher_raccourcis[]="/\{(§|§)\{/S"; # Â§ Pour gerer l'unicode aussi !\r
+               /* 12 */        $chercher_raccourcis[]="/\}(§|§)\}/S"; # ne pas sauvergarder ce fichier en utf8 !\r
+\r
+               /* 9b */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre_5\$2$fin_intertitre_5\n\n\$3";\r
+               /*  9 */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre_4\$2$fin_intertitre_4\n\n\$3";\r
+               /*  7 */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre_3\$2$fin_intertitre_3\n\n\$3";\r
+               /*  5 */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre_2\$2$fin_intertitre_2\n\n\$3";\r
+               /*  3 */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre\$2$fin_intertitre\n\n\$3";\r
+               /*  1 */        $remplacer_raccourcis[]="\$1\n\n$debut_intertitre\$2$fin_intertitre\n\n\$3";\r
+               /* 11 */        $remplacer_raccourcis[]="<sc>";\r
+               /* 12 */        $remplacer_raccourcis[]="</sc>";\r
+       }\r
+\r
+       // Conversion des intertitres d'enluminures type {n{titre}n}\r
+       // ou n est un nombre en intertitres avec des etoiles type {{{* (avec n etoiles)\r
+       // {1{ sera converti en {{{* ; {2{ sera converti en {{{** ; etc.\r
+       // Ne faire la recherche que s'il y a au moins un titre ancienne mode a convertir\r
+       if (strpos($texte, '{2{')!==false\r
+               OR strpos($texte, '{3{')!==false\r
+               OR strpos($texte, '{4{')!==false\r
+               OR strpos($texte, '{5{')!==false) {\r
+                       $texte=preg_replace_callback ("/\{(\d)\{(.*)\}(\\1)\}/Ums",\r
+                                                       create_function (\r
+                                                               '$matches',\r
+                                                               'return "{{{".str_repeat("*",$matches[1]).trim($matches[2])."}}}";'\r
+                                                       ),\r
+                                                       $texte);\r
+       }\r
+       $texte = preg_replace($chercher_raccourcis, $remplacer_raccourcis, $texte);\r
+\r
+       return $texte;\r
+}\r
+\r
+function typoenluminee_post_propre($texte) {\r
+       if(!$texte) return $texte;\r
+       static $cherche1 = NULL;\r
+       static $remplace1 = NULL;\r
+       if ($cherche1===NULL) {\r
+               # Le remplacement des intertitres de premier niveau a deja ete effectue dans inc/texte.php\r
+               $cherche1 = array();\r
+               $remplace1 = array();\r
+               $cherche1[] = /* 15 */  ",\[/(.*)/\],Ums";\r
+               $cherche1[] = /* 16 */  ",\[!(.*)!\],Ums";\r
+               $cherche1[] = /* 17 */  ",\[\|(.*)\|\],Ums";\r
+               $cherche1[] = /* 19 */  ",\[\((.*)\)\],Ums";\r
+               $cherche1[] = /* 21 */  "/\[\*\*/S";\r
+               $cherche1[] = /* 21b */         "/\[\*/S";\r
+               $cherche1[] = /* 22 */  "/\*\]/S";\r
+       \r
+               $remplace1[] = /* 15 */         "<div class=\"spip\" style=\"text-align:right;\">$1</div>";\r
+               $remplace1[] = /* 16 */         "<div class=\"spip\" style=\"text-align:left;\">$1</div>";\r
+               $remplace1[] = /* 17 */         "<div class=\"spip\" style=\"text-align:center;\">$1</div>";\r
+               $remplace1[] = /* 19 */         "<div class=\"texteencadre-spip spip\">$1</div>";\r
+               $remplace1[] = /* 21 */         "<strong class=\"caractencadre2-spip spip\">";\r
+               $remplace1[] = /* 21b */        "<strong class=\"caractencadre-spip spip\">";\r
+               $remplace1[] = /* 22 */ "</strong>";\r
+       }\r
+       $texte = preg_replace($cherche1, $remplace1, $texte);\r
+       $texte = paragrapher($texte,$GLOBALS['toujours_paragrapher']); // il faut reparagrapher a cause des raccourcis typo que l'on a ajoute (block div)\r
+       return $texte;\r
+}\r
+\r
+\r
+function typoenluminee_pre_typo($texte) {\r
+       if(!$texte) return $texte;\r
+       static $local_barre_typo_pas_de_fausses_puces = null;\r
+       static $chercher_raccourcis;\r
+       static $remplacer_raccourcis;\r
+       global $debut_italique, $fin_italique;\r
+       if (!isset($GLOBALS['barre_typo_pas_de_fork_typo']) OR $GLOBALS['barre_typo_pas_de_fork_typo'] === true)\r
+               return $texte;\r
+\r
+       if ($local_barre_typo_pas_de_fausses_puces===null){\r
+               // remplace les fausses listes a puce par de vraies ?\r
+               // (recherche en debut de lignes - suivi d'un ou plusieurs caracteres blancs, en mode multiligne)\r
+               // Mettre $GLOBALS['barre_typo_pas_de_fausses_puces'] = true; dans mes_options.php pour avoir ce comportement\r
+               if (isset($GLOBALS['barre_typo_pas_de_fausses_puces'])) {\r
+                       $local_barre_typo_pas_de_fausses_puces = $GLOBALS['barre_typo_pas_de_fausses_puces'];\r
+               } else {\r
+                       if (function_exists('lire_config')) {\r
+                               $local_barre_typo_pas_de_fausses_puces = (lire_config('bte/puces','Non') == 'Oui')?true:false;\r
+                       }\r
+               }\r
+               global $class_spip;\r
+               tester_variable('debut_italique', "<i$class_spip>");\r
+               tester_variable('fin_italique', '</i>');\r
+               \r
+               $chercher_raccourcis = array(\r
+                       /* 9 */         "/(?<![{\d])[{](?![{\d])/S", // Expressions complexes car on n'a pas encore traite les titres ici\r
+                       /* 10 */        "/(?<![}\d])[}](?![}\d])/S", // puisque italique utilisent les memes caracteres en nombre inferieur\r
+               );\r
+       \r
+               $remplacer_raccourcis = array(\r
+                       /* 9 */         $debut_italique,\r
+                       /* 10 */        $fin_italique,\r
+               );\r
+       }\r
+       if ($local_barre_typo_pas_de_fausses_puces === true) {\r
+               $texte =  preg_replace('/^-\s+/m','-* ',$texte);\r
+       }\r
+\r
+       $texte = str_replace('<-->','&harr;',$texte);\r
+       $texte = str_replace('-->','&rarr;',$texte);\r
+       $texte = str_replace('<--','&larr;',$texte);\r
+       $texte = str_replace('<==>','&hArr;',$texte);\r
+       $texte = str_replace('==>','&rArr;',$texte);\r
+       $texte = str_replace('<==','&lArr;',$texte);\r
+       $texte = str_ireplace('(c)','&copy;',$texte);\r
+       $texte = str_ireplace('(r)','&reg;',$texte);\r
+       $texte = str_ireplace('(tm)','&trade;',$texte);\r
+       $texte = str_replace('...','&hellip;',$texte);\r
+       $texte = preg_replace($chercher_raccourcis, $remplacer_raccourcis, $texte);\r
+       \r
+       /*\r
+               Cas particulier pour le gras\r
+               Il ne faut pas traiter la mise en gras ici si le texte contient un tableau\r
+       */\r
+       if (!preg_match(',.(\|([[:space:]]*{{[^}]+}}[[:space:]]*|<))+.,sS', $texte)) {\r
+               $chercher_raccourcisg = array(\r
+                       /* 7 */         "/(?<![{])[{][{](?![{])/S", // Expressions complexes car on n'a pas encore traite les titres ici\r
+                       /* 8 */         "/(?<![}])[}][}](?![}])/S" // En gros, verification qu'on n'est pas a l'interieur d'un titre\r
+               );\r
+               $remplacer_raccourcisg = array(\r
+                       /* 7 */         "<strong class=\"spip\">",\r
+                       /* 8 */         "</strong>"\r
+               );\r
+               $texte = preg_replace($chercher_raccourcisg, $remplacer_raccourcisg, $texte);\r
+       }\r
+       return $texte;\r
+}\r
+\r
+function typoenluminee_post_typo($texte) {\r
+       if(!$texte) return $texte;\r
+       if (!isset($GLOBALS['barre_typo_pas_de_fork_typo']) OR $GLOBALS['barre_typo_pas_de_fork_typo'] === true)\r
+               return $texte;\r
+       $texte = str_replace('[^','<sup>',$texte);\r
+       $texte = str_replace('^]','</sup>',$texte);\r
+       $texte = str_replace('[**','<strong class="caractencadre2-spip spip">',$texte);\r
+       $texte = str_replace('[*','<strong class="caractencadre-spip spip">',$texte);\r
+       $texte = str_replace('*]','</strong>',$texte);\r
+       \r
+       // Correction des & en &amp;\r
+       $texte = preg_replace('/&([A-Za-z#0-9]*);/','@@@amp:\1:amp@@@',$texte); // echapement des entites html deja presentes\r
+       $texte = str_replace('&','&amp;',$texte);\r
+       $texte = preg_replace('/@@@amp:([A-Za-z#0-9]*):amp@@@/','&\1;',$texte);\r
+       // Raccourci typographique <sc></sc>\r
+       $texte = str_replace('<sc>', '<span class="caps">', $texte);\r
+       $texte = str_replace('</sc>', '</span>', $texte);\r
+       return $texte;\r
+}\r
+\r
+function typoenluminee_nettoyer_raccourcis_typo($texte){\r
+       $texte = preg_replace(',\{[1-5]\{,','',$texte);\r
+       $texte = preg_replace(',\}[1-5]\},','',$texte);\r
+       $texte = preg_replace(',\{\{\{\*+,','{{{',$texte);\r
+       $texte = str_replace('&hellip;','...',$texte);\r
+       return $texte;\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/www/plugins/enluminures_typographiques_v3/typoenluminee_pipelines.php b/www/plugins/enluminures_typographiques_v3/typoenluminee_pipelines.php
new file mode 100644 (file)
index 0000000..cac292e
--- /dev/null
@@ -0,0 +1,30 @@
+<?php\r
+if (!defined("_ECRIRE_INC_VERSION")) return;\r
+\r
+// insert le css pour les styles supplementaires de la BTE dans le <head> du document (#INSERT_HEAD)\r
+function TypoEnluminee_insert_head_css($flux) {\r
+       static $done = false;\r
+       if (!$done) {\r
+               $done = true;\r
+               if (isset($GLOBALS['BarreTypoEnrichie_Preserve_Header']) OR !function_exists('lire_config'))\r
+                       global $BarreTypoEnrichie_Preserve_Header;\r
+               else\r
+                       $BarreTypoEnrichie_Preserve_Header = lire_config('bte/insertcss','Oui');\r
+               if ($BarreTypoEnrichie_Preserve_Header == 'Oui')\r
+                       $flux .= "\n".'<link rel="stylesheet" href="'.find_in_path('css/enluminurestypo.css').'" type="text/css" media="all" />';\r
+       }\r
+       return $flux;\r
+}\r
+\r
+// insert le css pour les styles supplementaires de la BTE dans le <head> du document (#INSERT_HEAD)\r
+function TypoEnluminee_insert_head($flux) {\r
+       $flux = TypoEnluminee_insert_head_css($flux);\r
+       return $flux;\r
+}\r
+function TypoEnluminee_header_prive($texte) {\r
+       $texte.= '<link rel="stylesheet" type="text/css" href="' . _DIR_PLUGIN_TYPOENLUMINEE . 'css/enluminurestypo.css" />' . "\n";\r
+       $texte.= '<link rel="stylesheet" type="text/css" href="' . _DIR_PLUGIN_TYPOENLUMINEE . 'css/enluminurestypo_prive.css" />' . "\n";\r
+       return $texte;\r
+}\r
+\r
+?>
\ No newline at end of file
index 3f2f515..9a64833 100644 (file)
@@ -14,6 +14,6 @@
     <necessite nom="beespip" compatibilite="[3.1.0;3.1.99]" />
     <necessite nom="agenda" compatibilite="[3.6;[" />
     <necessite nom="menus" compatibilite="[0.9;[" />
-    <utilise nom="Crayons" compatibilite= "[1.9.7;]" />
-    <utilise nom="typoenluminee" compatibilite= "[3.3.0;]" />
+    <necessite nom="crayons" compatibilite= "[1.16.1;]" />
+    <necessite nom="typoenluminee" compatibilite= "[3.3.2;]" />
 </paquet>