From: Ludovic CHEVALIER Date: Wed, 19 Jun 2013 06:34:02 +0000 (+0200) Subject: [PLUGINS] +Menu_Lang_lien X-Git-Tag: 3.0.0~39 X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=commitdiff_plain;h=9711570ebac7ed1d6c0335102027680bf6ae036f [PLUGINS] +Menu_Lang_lien --- diff --git a/www/plugins/Menu_langue_lien/balise/menu_lang.php b/www/plugins/Menu_langue_lien/balise/menu_lang.php new file mode 100644 index 0000000..7816784 --- /dev/null +++ b/www/plugins/Menu_langue_lien/balise/menu_lang.php @@ -0,0 +1,70 @@ +nom_boucle ? $p->nom_boucle : ($p->id_boucle ? $p->id_boucle :''); + if($i_boucle){ + $_id_objet = $p->boucles[$i_boucle]->primary; + } + + return calculer_balise_dynamique( + $p, + 'MENU_LANG', + array( + 'LANG_TYPE_BOUCLE', // demande du type d'objet + $_id_objet + ) + ); +} + +// s'il n'y a qu'une langue eviter definitivement la balise ?php +// http://doc.spip.org/@balise_MENU_LANG_stat +function balise_MENU_LANG_stat ($args, $context_compil) { + if (strpos($GLOBALS['meta']['langues_multilingue'],',') === false) return ''; + $objet = $args[0]; + $id_objet = $args[1]; + if ($objet == 'balise_hors_boucle') { + $objet = ''; + $id_objet = ''; + $id_table_objet =''; + }else{ + $objet = table_objet($objet); + $id_table_objet = id_table_objet($objet); + } + return array($objet, $id_objet,$id_table_objet); +} + +// normalement $opt sera toujours non vide suite au test ci-dessus +// http://doc.spip.org/@balise_MENU_LANG_dyn +function balise_MENU_LANG_dyn($objet,$id_objet,$id_table_objet) { + include_spip('inc/lang'); + # lien a partir de / + $cible = parametre_url(self(), 'lang' , '', '&'); + $post = generer_url_action('converser', 'redirect='. rawurlencode($cible), '&'); + + return array('formulaires/menu_lang', + 3600, + array( + //'nom' => $nom, + 'lang' => $GLOBALS['spip_lang'], + 'url' => $post, + $id_table_objet => $id_objet + ) + ); +} + +// balise type_boucle de Rastapopoulos dans le plugin etiquettes +// present aussi dans plugin ajaxforms... +// bref, a integrer dans le core ? :p +function balise_LANG_TYPE_BOUCLE($p) { + $type = $p->boucles[$p->id_boucle]->id_table; + $p->code = $type ? $type : "balise_hors_boucle"; + return $p; +} +?> \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/fonds/cfg_menu_lang_liens.html b/www/plugins/Menu_langue_lien/fonds/cfg_menu_lang_liens.html new file mode 100644 index 0000000..c4f5082 --- /dev/null +++ b/www/plugins/Menu_langue_lien/fonds/cfg_menu_lang_liens.html @@ -0,0 +1,9 @@ + + + + + +#CACHE{0} +
+#FORMULAIRE_CONFIGURER_MENU_LANG_LIENS +
diff --git a/www/plugins/Menu_langue_lien/formulaires/configurer_menu_lang_liens.html b/www/plugins/Menu_langue_lien/formulaires/configurer_menu_lang_liens.html new file mode 100644 index 0000000..dc8600a --- /dev/null +++ b/www/plugins/Menu_langue_lien/formulaires/configurer_menu_lang_liens.html @@ -0,0 +1,47 @@ + + + + +
+[

(#ENV*{message_ok})

] +[

(#ENV*{message_erreur})

] +
+ #ACTION_FORMULAIRE{#ENV{action}} +
    +
  • + +

    <:mll:explication_langues_invisibles:>

    + +
  • +
  • + +
    + + +
    +
    + + +
    +
  • +
  • + +
    + + +
    +
    + + +
    +
  • +
+

+ +

+
+
\ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/formulaires/menu_lang.html b/www/plugins/Menu_langue_lien/formulaires/menu_lang.html new file mode 100644 index 0000000..648967c --- /dev/null +++ b/www/plugins/Menu_langue_lien/formulaires/menu_lang.html @@ -0,0 +1,70 @@ +[(#REM) +Stocker les traductions eventuelles de l'article en cours +] + +#SET{ListeTraductions, #ARRAY{}} + + #SET_MERGE{ListeTraductions,#GET{ListeTraductions},#ARRAY{#LANG,#URL_ARTICLE}} + + + +[(#REM) +Stocker les traductions eventuelles de la rubrique en cours si le plugin Tradrub est installe (permet l'utilisation du +critere traduction sur les rubriques) +] + + + #SET{ListeTraductions, #ARRAY{}} + + #SET_MERGE{ListeTraductions,#GET{ListeTraductions},#ARRAY{#LANG,#URL_RUBRIQUE}} + + + + +[(#REM) +Y-a-t'il plus d'une langue reellement utilisee dans le site (moins les langues "invisibles") ? +Si oui, on affiche le menu de langue +Si non, rien + +Les langues "invisibles" sont les langues que le webmestre peut choisir de ne pas afficher dans le menu, +a partir du formulaire de configuration du plugin. + +Note : 'explode' est une fonction PHP : http://php.net/manual/fr/function.explode.php, utilisee ici pour renvoyer un tableau contenant +les langues utilisees, a partir de la variable meta 'langues_utilisees'. Ce tableau est compare avec le tableau des langues invisibles +avec la fonction PHP 'array_diff' http://www.php.net/manual/fr/function.array-diff.php qui renvoie elle-meme un tableau. + +] + +[(#SET{langues_a_afficher,[(#CONFIG{langues_utilisees}|explode{","}|array_diff{#CONFIG{menu_lang_liens/langues_invisibles, #ARRAY}})]})] + + +<[(#CONFIG{menu_lang_liens/formatliste,bloc}|=={'bloc'}|?{div,ul})] id="menu_lang"> +[(#REM) +On liste les langues utilisees dans le site +] + + [(#CONFIG{menu_lang_liens/formatliste,bloc}|=={'liste'}|oui)
  • ] + [(#REM) + Si la langue n'est pas celle en cours, on fait un lien qui fait 2 actions : + - fixer le cookie de langue sur la langue demandee + - rediriger sur l'article dans la langue demandee si opportun + sinon, revenir sur la page en cours + ] + [(#CONFIG{menu_lang_liens/format,abrege}|=={'complet'}|oui)[(#SET{nom_langue,[(#VALEUR|traduire_nom_langue)]})]] + [(#CONFIG{menu_lang_liens/format,abrege}|=={'abrege'}|oui)[(#SET{nom_langue,[(#VALEUR)]})]] + [(#VALEUR|=={#ENV{lang}}|non) + [(#REM) + url_absolue pour éviter des problèmes en urls arbo + ] + [(#GET{nom_langue}|ucfirst)] + ] + [(#REM) + Si la langue est celle en cours, afficher celle-ci en gras, sans lien + ] + [(#VALEUR|=={#ENV{lang}}|oui) + [(#GET{nom_langue}|ucfirst)] + ] + [(#CONFIG{menu_lang_liens/formatliste,bloc}|=={'liste'}|oui)
  • ] + + + \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/img_pack/world_link-16.png b/www/plugins/Menu_langue_lien/img_pack/world_link-16.png new file mode 100755 index 0000000..e737026 Binary files /dev/null and b/www/plugins/Menu_langue_lien/img_pack/world_link-16.png differ diff --git a/www/plugins/Menu_langue_lien/img_pack/world_link-24.png b/www/plugins/Menu_langue_lien/img_pack/world_link-24.png new file mode 100644 index 0000000..fcd0d5f Binary files /dev/null and b/www/plugins/Menu_langue_lien/img_pack/world_link-24.png differ diff --git a/www/plugins/Menu_langue_lien/img_pack/world_link-32.png b/www/plugins/Menu_langue_lien/img_pack/world_link-32.png new file mode 100755 index 0000000..5c1384a Binary files /dev/null and b/www/plugins/Menu_langue_lien/img_pack/world_link-32.png differ diff --git a/www/plugins/Menu_langue_lien/lang/mll.xml b/www/plugins/Menu_langue_lien/lang/mll.xml new file mode 100644 index 0000000..aecfbcb --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/mll.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/www/plugins/Menu_langue_lien/lang/mll_en.php b/www/plugins/Menu_langue_lien/lang/mll_en.php new file mode 100755 index 0000000..6e08135 --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/mll_en.php @@ -0,0 +1,26 @@ + 'Language menu as links', + + // E + 'explication_langues_invisibles' => 'Allows to remove some languages ​​from the menu', + + // L + 'label_format' => 'Languages display format', + 'label_format_abrege' => 'Shortened (for instance, Fr)', + 'label_format_complet' => 'Complete (for instance, Français)', + 'label_format_liste' => 'Languages list display format', + 'label_format_liste_bloc' => 'A block divided by spaces', + 'label_format_liste_liste' => 'A bulleted list', + 'label_langues_invisibles' => 'Invisible languages in the​​ menu' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/mll_es.php b/www/plugins/Menu_langue_lien/lang/mll_es.php new file mode 100644 index 0000000..7264cf4 --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/mll_es.php @@ -0,0 +1,26 @@ + 'Menú de idiomas en forma de enlaces', + + // E + 'explication_langues_invisibles' => 'Permite quitar algunos idiomas del menú', + + // L + 'label_format' => 'Formato de visualización de los idiomas', + 'label_format_abrege' => 'Abreviado (por ejemplo, Es)', + 'label_format_complet' => 'Completo (por ejemplo, Español)', + 'label_format_liste' => 'Formato de la lista de idiomas', + 'label_format_liste_bloc' => 'Bloque separado por espacios', + 'label_format_liste_liste' => 'Lista por viñetas', + 'label_langues_invisibles' => 'Idiomas invisibles del menú' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/mll_fr.php b/www/plugins/Menu_langue_lien/lang/mll_fr.php new file mode 100755 index 0000000..e981ffe --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/mll_fr.php @@ -0,0 +1,24 @@ + 'Menu de langues sous forme de liens', + + // E + 'explication_langues_invisibles' => 'Permet d\'enlever certaines langues du menu', + + // L + 'label_format' => 'Format d\'affichage des langues', + 'label_format_abrege' => 'Abrégé (par exemple, Fr)', + 'label_format_complet' => 'Complet (par exemple, Français)', + 'label_format_liste' => 'Format de la liste des langues', + 'label_format_liste_bloc' => 'Un bloc séparé par des espaces', + 'label_format_liste_liste' => 'Une liste à puces', + 'label_langues_invisibles' => 'Langues invisibles du menu' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/mll_sk.php b/www/plugins/Menu_langue_lien/lang/mll_sk.php new file mode 100644 index 0000000..59b56c4 --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/mll_sk.php @@ -0,0 +1,26 @@ + 'Jazykové menu vo forme odkazov', + + // E + 'explication_langues_invisibles' => 'Umožňuje odstrániÅ¥ z menu niektoré jazyky', + + // L + 'label_format' => 'Formát zobrazenia jazykov', + 'label_format_abrege' => 'Skrátený (napríklad Sk)', + 'label_format_complet' => 'Úplný (napríklad Slovenčina)', + 'label_format_liste' => 'Formát zoznamu jazykov', + 'label_format_liste_bloc' => 'Blok oddelený medzerami', + 'label_format_liste_liste' => 'Zoznam s odrážkami', + 'label_langues_invisibles' => 'Jazyky, ktoré nebudú zobrazené v menu' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/paquet-mll.xml b/www/plugins/Menu_langue_lien/lang/paquet-mll.xml new file mode 100644 index 0000000..4bd03eb --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/paquet-mll.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/www/plugins/Menu_langue_lien/lang/paquet-mll_en.php b/www/plugins/Menu_langue_lien/lang/paquet-mll_en.php new file mode 100644 index 0000000..b31b6df --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/paquet-mll_en.php @@ -0,0 +1,16 @@ + 'Replace the original language menu by a clickable menu. This menu is displayed only if at least two languages are ​​actually used on the site.', + 'mll_nom' => 'Language menu as links', + 'mll_slogan' => 'View languages ​​as clickable links' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/paquet-mll_es.php b/www/plugins/Menu_langue_lien/lang/paquet-mll_es.php new file mode 100644 index 0000000..15d889a --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/paquet-mll_es.php @@ -0,0 +1,16 @@ + 'Remplaza al menú desplegable de idiomas por un menú en el que hacer click. Este menú no se muestra salvo si hay al menos 2 idiomas verdaderamente utilizados en el sitio.', + 'mll_nom' => 'Menú de idiomas con enlaces', + 'mll_slogan' => 'Mostrar los idiomas bajo la forma de enlaces en los que hacer click' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/paquet-mll_fr.php b/www/plugins/Menu_langue_lien/lang/paquet-mll_fr.php new file mode 100644 index 0000000..ad4808f --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/paquet-mll_fr.php @@ -0,0 +1,14 @@ + 'Remplace le menu déroulant de langues par un menu cliquable. Ce menu n\'est affiché que s\'il y a au moins 2 langues vraiment utilisées dans le site.', + 'mll_nom' => 'Menu de langues avec liens', + 'mll_slogan' => 'Afficher les langues sous forme de liens cliquables' +); + +?> diff --git a/www/plugins/Menu_langue_lien/lang/paquet-mll_sk.php b/www/plugins/Menu_langue_lien/lang/paquet-mll_sk.php new file mode 100644 index 0000000..f7117e7 --- /dev/null +++ b/www/plugins/Menu_langue_lien/lang/paquet-mll_sk.php @@ -0,0 +1,16 @@ + 'Rozbaľovacie menu s jazykmi nahradí klikateľným. Toto menu sa nezobrazí, ak sa na stránke naozaj nepoužívajú aspoň 2 jazyky.', + 'mll_nom' => 'Jazykové menu s odkazmi', + 'mll_slogan' => 'ZobraziÅ¥ jazyky vo forme klikateľných odkazov' +); + +?> diff --git a/www/plugins/Menu_langue_lien/mll_options.php b/www/plugins/Menu_langue_lien/mll_options.php new file mode 100644 index 0000000..a5a023a --- /dev/null +++ b/www/plugins/Menu_langue_lien/mll_options.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/mll_pipelines.php b/www/plugins/Menu_langue_lien/mll_pipelines.php new file mode 100755 index 0000000..7e88b7b --- /dev/null +++ b/www/plugins/Menu_langue_lien/mll_pipelines.php @@ -0,0 +1,12 @@ +'; + + return $flux; +} + +?> \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/mll_styles.css b/www/plugins/Menu_langue_lien/mll_styles.css new file mode 100755 index 0000000..66e9f0c --- /dev/null +++ b/www/plugins/Menu_langue_lien/mll_styles.css @@ -0,0 +1,28 @@ +#menu_lang { + list-style: none outside none; +} + +#menu_lang li { + float: left; +} + +#menu_lang li a, #menu_lang li span, #menu_lang li strong { + border-left: 1px solid; +} + +#menu_lang li a, #menu_lang li span, #menu_lang li strong { + padding: 0 5px; + font-size: 11px; +} + +#menu_lang li.first a, #menu_lang li.first span, #menu_lang li.first strong { + border: none; +} + +#menu_lang li.last a, #menu_lang li.last span, #menu_lang li.last strong { + padding-right: 0; +} + +#menu_lang li a:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/paquet.xml b/www/plugins/Menu_langue_lien/paquet.xml new file mode 100644 index 0000000..19a5c6b --- /dev/null +++ b/www/plugins/Menu_langue_lien/paquet.xml @@ -0,0 +1,23 @@ + + Menu de langues avec liens + + Jacques + Jean-Baptiste Pressac + kent1 + Cédric Morin + icône par FatCow + 2009-2012 + GPL 3 + + + + + \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/plugin.xml b/www/plugins/Menu_langue_lien/plugin.xml new file mode 100644 index 0000000..46eb697 --- /dev/null +++ b/www/plugins/Menu_langue_lien/plugin.xml @@ -0,0 +1,53 @@ + + + + [fr]Menu de langues avec liens + [en]Language menu as links + + + + + [fr]Afficher les langues sous forme de liens cliquables + [en]View languages ​​as clickable links + + + [Jacques->http://www.spip-contrib.net/_Jacques-PYRAT_] - Jean-Baptiste Pressac - Quentin Drouet - Cedric Morin + © 2009-2012 GNU/GPL + http://www.spip-contrib.net/Menu-de-langues-sous-forme-de-liens + 1.1.9 + test + + +[fr]Remplace le menu déroulant de langues par un menu cliquable. Ce menu n'est affiché que s'il y a au moins 2 langues vraiment utilisées dans le site. + +Icone par [FatCow->http://www.fatcow.com/free-icons] +[en]Replace the original language menu by a clickable menu. This menu is displayed only if at least two languages are ​​actually used on the site. + +Icon by [FatCow->http://www.fatcow.com/free-icons] + + + mll + img_pack/world_link-32.png + mll_options.php + + insert_head_css + mll_pipelines.php + + + + + + navigation + + img_pack/world_link-24.png + mll:cfg_titre_mll + cfg + cfg=menu_lang_liens + + + img_pack/world_link-16.png + mll:cfg_titre_mll + cfg + cfg=menu_lang_liens + + \ No newline at end of file diff --git a/www/plugins/Menu_langue_lien/prive/squelettes/contenu/configurer_mll.html b/www/plugins/Menu_langue_lien/prive/squelettes/contenu/configurer_mll.html new file mode 100644 index 0000000..4cf4e9f --- /dev/null +++ b/www/plugins/Menu_langue_lien/prive/squelettes/contenu/configurer_mll.html @@ -0,0 +1,5 @@ +[(#AUTORISER{webmestre}|sinon_interdire_acces)] +

    <:mll:cfg_titre_mll:>

    +
    + #FORMULAIRE_CONFIGURER_MENU_LANG_LIENS +
    diff --git a/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-16.png b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-16.png new file mode 100755 index 0000000..e737026 Binary files /dev/null and b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-16.png differ diff --git a/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-24.png b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-24.png new file mode 100644 index 0000000..fcd0d5f Binary files /dev/null and b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-24.png differ diff --git a/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-32.png b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-32.png new file mode 100755 index 0000000..5c1384a Binary files /dev/null and b/www/plugins/Menu_langue_lien/prive/themes/spip/images/world_link-32.png differ diff --git a/www/plugins/Menu_langue_lien/svn.revision b/www/plugins/Menu_langue_lien/svn.revision new file mode 100644 index 0000000..3d836e7 --- /dev/null +++ b/www/plugins/Menu_langue_lien/svn.revision @@ -0,0 +1,10 @@ + + +Origine: file:///home/svn/repository/spip-zone/_plugins_/menu_langues_liens +Revision: 71303 +Dernier commit: 2013-03-30 04:01:43 +0100 + +file:///home/svn/repository/spip-zone/_plugins_/menu_langues_liens +71303 +2013-03-30 04:01:43 +0100 + \ No newline at end of file diff --git a/www/plugins/spip-bonux-3/demo/boucle_et_saut.html b/www/plugins/spip-bonux-3/demo/boucle_et_saut.html new file mode 100644 index 0000000..c43b737 --- /dev/null +++ b/www/plugins/spip-bonux-3/demo/boucle_et_saut.html @@ -0,0 +1,15 @@ +[(#REM) + + Squelette + (c) 2009 xxx + Distribue sous licence GPL + +] + +#TOTAL_BOUCLE:#COMPTEUR_BOUCLE:#ID_ARTICLE + +
    + +#TOTAL_BOUCLE:#COMPTEUR_BOUCLE:#ID_ARTICLE +[(#SAUTER{1})] + diff --git a/www/plugins/spip-bonux-3/demo/boucles_iterations.html b/www/plugins/spip-bonux-3/demo/boucles_iterations.html new file mode 100644 index 0000000..004663d --- /dev/null +++ b/www/plugins/spip-bonux-3/demo/boucles_iterations.html @@ -0,0 +1,37 @@ + +#CLE/#VALEUR
    + +#TOTAL_BOUCLE + + +
    + +#CLE/#VALEUR
    + +#TOTAL_BOUCLE + + +
    + + +#CLE/#VALEUR
    + +#TOTAL_BOUCLE + + + +

    #PAGINATION

    + +#CLE/#VALEUR
    + +[#TOTAL_BOUCLE/#GRAND_TOTAL] +
    + +
    + + + + #VALEUR + +
    + diff --git a/www/plugins/spip-bonux-3/demo/noeud.html b/www/plugins/spip-bonux-3/demo/noeud.html new file mode 100644 index 0000000..8444005 --- /dev/null +++ b/www/plugins/spip-bonux-3/demo/noeud.html @@ -0,0 +1,16 @@ +[(#REM) + + Squelette + (c) xxx + Distribue sous licence GPL + +] +#CACHE{0} + + +
  • #ID_RUBRIQUE
  • + +
    + +
  • #ID_RUBRIQUE
  • + \ No newline at end of file diff --git a/www/plugins/spip-bonux-3/img_pack/annuler-recherche.png b/www/plugins/spip-bonux-3/img_pack/annuler-recherche.png new file mode 100644 index 0000000..8252930 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/annuler-recherche.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/article-12.png b/www/plugins/spip-bonux-3/img_pack/article-12.png new file mode 100644 index 0000000..35d3d3d Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/article-12.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/deplier-droite.gif b/www/plugins/spip-bonux-3/img_pack/deplier-droite.gif new file mode 100644 index 0000000..b6a570d Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/deplier-droite.gif differ diff --git a/www/plugins/spip-bonux-3/img_pack/deplier-droite.png b/www/plugins/spip-bonux-3/img_pack/deplier-droite.png new file mode 100644 index 0000000..2865fd0 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/deplier-droite.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/frame-close.png b/www/plugins/spip-bonux-3/img_pack/frame-close.png new file mode 100644 index 0000000..5dab592 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/frame-close.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/item-add.gif b/www/plugins/spip-bonux-3/img_pack/item-add.gif new file mode 100644 index 0000000..33faedb Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/item-add.gif differ diff --git a/www/plugins/spip-bonux-3/img_pack/item-add.png b/www/plugins/spip-bonux-3/img_pack/item-add.png new file mode 100644 index 0000000..c180e0f Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/item-add.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/item-remove.png b/www/plugins/spip-bonux-3/img_pack/item-remove.png new file mode 100644 index 0000000..566f4f6 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/item-remove.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/logo-bonux.gif b/www/plugins/spip-bonux-3/img_pack/logo-bonux.gif new file mode 100644 index 0000000..b3a220b Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/logo-bonux.gif differ diff --git a/www/plugins/spip-bonux-3/img_pack/message_erreur-24.png b/www/plugins/spip-bonux-3/img_pack/message_erreur-24.png new file mode 100644 index 0000000..f483cef Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/message_erreur-24.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/message_notice-24.png b/www/plugins/spip-bonux-3/img_pack/message_notice-24.png new file mode 100644 index 0000000..27d3247 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/message_notice-24.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/message_ok-24.png b/www/plugins/spip-bonux-3/img_pack/message_ok-24.png new file mode 100644 index 0000000..dfcdb41 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/message_ok-24.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/spip-bonux.png b/www/plugins/spip-bonux-3/img_pack/spip-bonux.png new file mode 100644 index 0000000..fffbb43 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/spip-bonux.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_asc-12.png b/www/plugins/spip-bonux-3/img_pack/tri_asc-12.png new file mode 100644 index 0000000..5f21f7b Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_asc-12.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_asc-16.png b/www/plugins/spip-bonux-3/img_pack/tri_asc-16.png new file mode 100644 index 0000000..89cfd50 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_asc-16.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_asc-24.png b/www/plugins/spip-bonux-3/img_pack/tri_asc-24.png new file mode 100644 index 0000000..cf55fbf Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_asc-24.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_asc.png b/www/plugins/spip-bonux-3/img_pack/tri_asc.png new file mode 100644 index 0000000..a8a2918 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_asc.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_desc-12.png b/www/plugins/spip-bonux-3/img_pack/tri_desc-12.png new file mode 100644 index 0000000..c853769 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_desc-12.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_desc-16.png b/www/plugins/spip-bonux-3/img_pack/tri_desc-16.png new file mode 100644 index 0000000..6d9d043 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_desc-16.png differ diff --git a/www/plugins/spip-bonux-3/img_pack/tri_desc-24.png b/www/plugins/spip-bonux-3/img_pack/tri_desc-24.png new file mode 100644 index 0000000..f34ae54 Binary files /dev/null and b/www/plugins/spip-bonux-3/img_pack/tri_desc-24.png differ diff --git a/www/plugins/spip-bonux-3/inc/date_gestion.php b/www/plugins/spip-bonux-3/inc/date_gestion.php new file mode 100644 index 0000000..5fd2c99 --- /dev/null +++ b/www/plugins/spip-bonux-3/inc/date_gestion.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/www/plugins/spip-bonux-3/inc/exporter_csv.php b/www/plugins/spip-bonux-3/inc/exporter_csv.php new file mode 100644 index 0000000..bad0aed --- /dev/null +++ b/www/plugins/spip-bonux-3/inc/exporter_csv.php @@ -0,0 +1,98 @@ + \ No newline at end of file diff --git a/www/plugins/spip-bonux-3/inc/importer_csv.php b/www/plugins/spip-bonux-3/inc/importer_csv.php new file mode 100644 index 0000000..f09d392 --- /dev/null +++ b/www/plugins/spip-bonux-3/inc/importer_csv.php @@ -0,0 +1,108 @@ +$heading) { + if ($header_type[$heading]=="array"){ + if (!isset($row[$heading])) + $row[$heading] = array(); + if (isset($data[$key]) AND strlen($data[$key])) + $row[$heading][]= $data[$key]; + } + else + $row[$heading]=(isset($data[$key])) ? $data[$key] : ''; + } + $return[]=$row; + } else { + $return[]=$data; + } + } + } + return $return; +} + diff --git a/www/plugins/spip-bonux-3/javascript/jquery.qtip-1.0.0-rc3.js b/www/plugins/spip-bonux-3/javascript/jquery.qtip-1.0.0-rc3.js new file mode 100644 index 0000000..b71c021 --- /dev/null +++ b/www/plugins/spip-bonux-3/javascript/jquery.qtip-1.0.0-rc3.js @@ -0,0 +1,2040 @@ +/*! +* jquery.qtip. The jQuery tooltip plugin +* +* Copyright (c) 2009 Craig Thompson +* http://craigsworks.com +* +* Licensed under MIT +* http://www.opensource.org/licenses/mit-license.php +* +* Launch : February 2009 +* Version : 1.0.0-rc3 +* Released: Tuesday 12th May, 2009 - 00:00 +* Debug: jquery.qtip.debug.js +*/ + +"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ +/*jslint browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true */ + +/*global window: false, jQuery: false */ +(function ($) { + // Assign cache and event initialisation on document load + $(document).ready(function () { + // Adjust positions of the tooltips on window resize or scroll if enabled + var i; + $(window).bind('resize scroll', function (event) { + for (i = 0; i < $.fn.qtip.interfaces.length; i++) { + // Access current elements API + var api = $.fn.qtip.interfaces[i]; + + // Update position if resize or scroll adjustments are enabled + if(api && api.status && api.status.rendered && api.options.position.type !== 'static' && api.elements.tooltip.is(':visible') && + (api.options.position.adjust.scroll && event.type === 'scroll' || api.options.position.adjust.resize && event.type === 'resize')) { + // Queue the animation so positions are updated correctly + api.updatePosition(event, true); + } + } + }); + + // Hide unfocus toolipts on document mousedown + $(document).bind('mouseenter.qtip', function (event) { + if($(event.target).parents('div.qtip').length === 0) { + var tooltip = $('.qtipSelector'), + api = tooltip.qtip('api'); + + // Only hide if its visible and not the tooltips target + if(tooltip.is(':visible') && api && api.status && !api.status.disabled && $(event.target).add(api.elements.target).length > 1) { api.hide(event); } + } + }); + }); + + // Corner object parser + function Corner(corner) { + if(!corner){ return false; } + + this.x = String(corner).replace(/middle/i, 'center').match(/left|right|center/i)[0].toLowerCase(); + this.y = String(corner).replace(/middle/i, 'center').match(/top|bottom|center/i)[0].toLowerCase(); + this.offset = { left: 0, top: 0 }; + this.precedance = (corner.charAt(0).search(/^(t|b)/) > -1) ? 'y' : 'x'; + this.string = function(){ return (this.precedance === 'y') ? this.y+this.x : this.x+this.y; }; + } + + // Tip coordinates calculator + function calculateTip(corner, width, height) { + // Define tip coordinates in terms of height and width values + var tips = { + bottomright: [[0, 0], [width, height], [width, 0]], + bottomleft: [[0, 0], [width, 0], [0, height]], + topright: [[0, height], [width, 0], [width, height]], + topleft: [[0, 0], [0, height], [width, height]], + topcenter: [[0, height], [width / 2, 0], [width, height]], + bottomcenter: [[0, 0], [width, 0], [width / 2, height]], + rightcenter: [[0, 0], [width, height / 2], [0, height]], + leftcenter: [[width, 0], [width, height], [0, height / 2]] + }; + tips.lefttop = tips.bottomright; + tips.righttop = tips.bottomleft; + tips.leftbottom = tips.topright; + tips.rightbottom = tips.topleft; + + return tips[corner]; + } + + // Border coordinates calculator + function calculateBorders(radius) { + var borders; + + // Use canvas element if supported + if($('').get(0).getContext) { + borders = { + topLeft: [radius, radius], + topRight: [0, radius], + bottomLeft: [radius, 0], + bottomRight: [0, 0] + }; + } + + // Canvas not supported - Use VML (IE) + else if($.browser.msie) { + borders = { + topLeft: [-90, 90, 0], + topRight: [-90, 90, -radius], + bottomLeft: [90, 270, 0], + bottomRight: [90, 270, -radius] + }; + } + + return borders; + } + + + // Build a jQuery style object from supplied style object + function jQueryStyle(style, sub) { + var styleObj, i; + + styleObj = $.extend(true, {}, style); + for (i in styleObj) { + if(sub === true && (/(tip|classes)/i).test(i)) { delete styleObj[i]; } + else if(!sub && (/(width|border|tip|title|classes|user)/i).test(i)) { delete styleObj[i]; } + } + + return styleObj; + } + + // Sanitize styles + function sanitizeStyle(style) { + if(typeof style.tip !== 'object') { + style.tip = { corner: style.tip }; + } + if(typeof style.tip.size !== 'object') { + style.tip.size = { + width: style.tip.size, + height: style.tip.size + }; + } + if(typeof style.border !== 'object') { + style.border = { + width: style.border + }; + } + if(typeof style.width !== 'object') { + style.width = { + value: style.width + }; + } + if(typeof style.width.max === 'string') { style.width.max = parseInt(style.width.max.replace(/([0-9]+)/i, "$1"), 10); } + if(typeof style.width.min === 'string') { style.width.min = parseInt(style.width.min.replace(/([0-9]+)/i, "$1"), 10); } + + // Convert deprecated x and y tip values to width/height + if(typeof style.tip.size.x === 'number') { + style.tip.size.width = style.tip.size.x; + delete style.tip.size.x; + } + if(typeof style.tip.size.y === 'number') { + style.tip.size.height = style.tip.size.y; + delete style.tip.size.y; + } + + return style; + } + + // Build styles recursively with inheritance + function buildStyle() { + var self, i, styleArray, styleExtend, finalStyle, ieAdjust; + self = this; + + // Build style options from supplied arguments + styleArray = [true, {}]; + for(i = 0; i < arguments.length; i++){ styleArray.push(arguments[i]); } + styleExtend = [$.extend.apply($, styleArray)]; + + // Loop through each named style inheritance + while(typeof styleExtend[0].name === 'string') { + // Sanitize style data and append to extend array + styleExtend.unshift(sanitizeStyle($.fn.qtip.styles[styleExtend[0].name])); + } + + // Make sure resulting tooltip className represents final style + styleExtend.unshift(true, { + classes: { + tooltip: 'qtip-' + (arguments[0].name || 'defaults') + } + }, $.fn.qtip.styles.defaults); + + // Extend into a single style object + finalStyle = $.extend.apply($, styleExtend); + + // Adjust tip size if needed (IE 1px adjustment bug fix) + ieAdjust = ($.browser.msie) ? 1 : 0; + finalStyle.tip.size.width += ieAdjust; + finalStyle.tip.size.height += ieAdjust; + + // Force even numbers for pixel precision + if(finalStyle.tip.size.width % 2 > 0) { finalStyle.tip.size.width += 1; } + if(finalStyle.tip.size.height % 2 > 0) { finalStyle.tip.size.height += 1; } + + // Sanitize final styles tip corner value + if(finalStyle.tip.corner === true) { + if(self.options.position.corner.tooltip === 'center' && self.options.position.corner.target === 'center') { + finalStyle.tip.corner = false; + } + else { + finalStyle.tip.corner = self.options.position.corner.tooltip; + } + } + + return finalStyle; + } + + // Border canvas draw method + function drawBorder(canvas, coordinates, radius, color) { + // Create corner + var context = canvas.get(0).getContext('2d'); + context.fillStyle = color; + context.beginPath(); + context.arc(coordinates[0], coordinates[1], radius, 0, Math.PI * 2, false); + context.fill(); + } + + // Create borders using canvas and VML + function createBorder() { + var self, i, width, radius, color, coordinates, containers, size, betweenWidth, betweenCorners, borderTop, borderBottom, borderCoord, sideWidth, vertWidth; + self = this; + + // Destroy previous border elements, if present + self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove(); + + // Setup local variables + width = self.options.style.border.width; + radius = self.options.style.border.radius; + color = self.options.style.border.color || self.options.style.tip.color; + + // Calculate border coordinates + coordinates = calculateBorders(radius); + + // Create containers for the border shapes + containers = {}; + for (i in coordinates) { + // Create shape container + containers[i] = '
    '; + + // Canvas is supported + if($('').get(0).getContext) { containers[i] += ''; } + + // No canvas, but if it's IE use VML + else if($.browser.msie) { + size = radius * 2 + 3; + containers[i] += ''; + + } + + containers[i] += '
    '; + } + + // Create between corners elements + betweenWidth = self.getDimensions().width - (Math.max(width, radius) * 2); + betweenCorners = '
    '; + + // Create top border container + borderTop = '
    ' + containers.topLeft + containers.topRight + betweenCorners; + self.elements.wrapper.prepend(borderTop); + + // Create bottom border container + borderBottom = '
    ' + containers.bottomLeft + containers.bottomRight + betweenCorners; + self.elements.wrapper.append(borderBottom); + + // Draw the borders if canvas were used (Delayed til after DOM creation) + if($('').get(0).getContext) { + self.elements.wrapper.find('canvas').each(function () { + borderCoord = coordinates[$(this).parent('[rel]:first').attr('rel')]; + drawBorder.call(self, $(this), borderCoord, radius, color); + }); + } + + // Create a phantom VML element (IE won't show the last created VML element otherwise) + else if($.browser.msie) { self.elements.tooltip.append(''); } + + // Setup contentWrapper border + sideWidth = Math.max(radius, (radius + (width - radius))); + vertWidth = Math.max(width - radius, 0); + self.elements.contentWrapper.css({ + border: '0px solid ' + color, + borderWidth: vertWidth + 'px ' + sideWidth + 'px' + }); + } + + // Canvas tip drawing method + function drawTip(canvas, coordinates, color) { + // Setup properties + var context = canvas.get(0).getContext('2d'); + context.fillStyle = color; + + // Create tip + context.beginPath(); + context.moveTo(coordinates[0][0], coordinates[0][1]); + context.lineTo(coordinates[1][0], coordinates[1][1]); + context.lineTo(coordinates[2][0], coordinates[2][1]); + context.fill(); + } + + function positionTip(corner) { + var self, ieAdjust, positionAdjust, paddingCorner, paddingSize, newMargin; + self = this; + + // Return if tips are disabled or tip is not yet rendered + if(self.options.style.tip.corner === false || !self.elements.tip) { return; } + if(!corner) { corner = new Corner(self.elements.tip.attr('rel')); } + + // Setup adjustment variables + ieAdjust = positionAdjust = ($.browser.msie) ? 1 : 0; + + // Set initial position + self.elements.tip.css(corner[corner.precedance], 0); + + // Set position of tip to correct side + if(corner.precedance === 'y') { + // Adjustments for IE6 - 0.5px border gap bug + if($.browser.msie) { + if(parseInt($.browser.version.charAt(0), 10) === 6) { positionAdjust = corner.y === 'top' ? -3 : 1; } + else { positionAdjust = corner.y === 'top' ? 1 : 2; } + } + + if(corner.x === 'center') { + self.elements.tip.css({ + left: '50%', + marginLeft: -(self.options.style.tip.size.width / 2) + }); + } + else if(corner.x === 'left') { + self.elements.tip.css({ + left: self.options.style.border.radius - ieAdjust + }); + } + else { + self.elements.tip.css({ + right: self.options.style.border.radius + ieAdjust + }); + } + + if(corner.y === 'top') { + self.elements.tip.css({ + top: -positionAdjust + }); + } + else { + self.elements.tip.css({ + bottom: positionAdjust + }); + } + + } + else { + // Adjustments for IE6 - 0.5px border gap bug + if($.browser.msie) { + positionAdjust = (parseInt($.browser.version.charAt(0), 10) === 6) ? 1 : (corner.x === 'left' ? 1 : 2); + } + + if(corner.y === 'center') { + self.elements.tip.css({ + top: '50%', + marginTop: -(self.options.style.tip.size.height / 2) + }); + } + else if(corner.y === 'top') { + self.elements.tip.css({ + top: self.options.style.border.radius - ieAdjust + }); + } + else { + self.elements.tip.css({ + bottom: self.options.style.border.radius + ieAdjust + }); + } + + if(corner.x === 'left') { + self.elements.tip.css({ + left: -positionAdjust + }); + } + else { + self.elements.tip.css({ + right: positionAdjust + }); + } + } + + // Adjust tooltip padding to compensate for tip + paddingCorner = 'padding-' + corner[corner.precedance]; + paddingSize = self.options.style.tip.size[corner.precedance === 'x' ? 'width' : 'height']; + self.elements.tooltip.css('padding', 0).css(paddingCorner, paddingSize); + + // Match content margin to prevent gap bug in IE6 ONLY + if($.browser.msie && parseInt($.browser.version.charAt(0), 6) === 6) { + newMargin = parseInt(self.elements.tip.css('margin-top'), 10) || 0; + newMargin += parseInt(self.elements.content.css('margin-top'), 10) || 0; + + self.elements.tip.css({ marginTop: newMargin }); + } + } + + // Create tip using canvas and VML + function createTip(corner) { + var self, color, coordinates, coordsize, path, tip; + self = this; + + // Destroy previous tip, if there is one + if(self.elements.tip !== null) { self.elements.tip.remove(); } + + // Setup color and corner values + color = self.options.style.tip.color || self.options.style.border.color; + if(self.options.style.tip.corner === false) { return; } + else if(!corner) { corner = new Corner(self.options.style.tip.corner); } + + // Calculate tip coordinates + coordinates = calculateTip(corner.string(), self.options.style.tip.size.width, self.options.style.tip.size.height); + + // Create tip element + self.elements.tip = '
    '; + + // Attach new tip to tooltip element + self.elements.tooltip.prepend(self.elements.tip); + + // Use canvas element if supported + if($('').get(0).getContext) { tip = ''; } + + // Canvas not supported - Use VML (IE) + else if($.browser.msie) { + // Create coordize and tip path using tip coordinates + coordsize = self.options.style.tip.size.width + ',' + self.options.style.tip.size.height; + path = 'm' + coordinates[0][0] + ',' + coordinates[0][1]; + path += ' l' + coordinates[1][0] + ',' + coordinates[1][1]; + path += ' ' + coordinates[2][0] + ',' + coordinates[2][1]; + path += ' xe'; + + // Create VML element + tip = ''; + + // Create a phantom VML element (IE won't show the last created VML element otherwise) + tip += ''; + + // Prevent tooltip appearing above the content (IE z-index bug) + self.elements.contentWrapper.css('position', 'relative'); + } + + // Create element reference and append vml/canvas + self.elements.tip = self.elements.tooltip.find('.' + self.options.style.classes.tip).eq(0); + self.elements.tip.html(tip); + + // Draw the canvas tip (Delayed til after DOM creation) + if($('').get(0).getContext) { drawTip.call(self, self.elements.tip.find('canvas:first'), coordinates, color); } + + // Fix IE small tip bug + if(corner.y === 'top' && $.browser.msie && parseInt($.browser.version.charAt(0), 10) === 6) { + self.elements.tip.css({ + marginTop: -4 + }); + } + + // Set the tip position + positionTip.call(self, corner); + } + + // Create title bar for content + function createTitle() { + var self = this; + + // Destroy previous title element, if present + if(self.elements.title !== null) { self.elements.title.remove(); } + + // Append new ARIA attribute to tooltip + self.elements.tooltip.attr('aria-labelledby', 'qtip-' + self.id + '-title'); + + // Create title element + self.elements.title = $('
    ').css(jQueryStyle(self.options.style.title, true)).css({ + zoom: ($.browser.msie) ? 1 : 0 + }).prependTo(self.elements.contentWrapper); + + // Update title with contents if enabled + if(self.options.content.title.text) { self.updateTitle.call(self, self.options.content.title.text); } + + // Create title close buttons if enabled + if(self.options.content.title.button !== false && typeof self.options.content.title.button === 'string') { + self.elements.button = $('').css(jQueryStyle(self.options.style.button, true)).html(self.options.content.title.button).prependTo(self.elements.title).click(function (event) { + if(!self.status.disabled) { self.hide(event); } + }); + } + } + + // Assign hide and show events + function assignEvents() { + var self, showTarget, hideTarget, inactiveEvents; + self = this; + + // Setup event target variables + showTarget = self.options.show.when.target; + hideTarget = self.options.hide.when.target; + + // Add tooltip as a hideTarget is its fixed + if(self.options.hide.fixed) { hideTarget = hideTarget.add(self.elements.tooltip); } + + // Define events which reset the 'inactive' event handler + inactiveEvents = ['click', 'dblclick', 'mousedown', 'mouseup', 'mousemove', + 'mouseout', 'mouseenter', 'mouseleave', 'mouseover']; + + // Define 'inactive' event timer method + function inactiveMethod(event) { + if(self.status.disabled === true) { return; } + + //Clear and reset the timer + clearTimeout(self.timers.inactive); + self.timers.inactive = setTimeout(function () { + // Unassign 'inactive' events + $(inactiveEvents).each(function () { + hideTarget.unbind(this + '.qtip-inactive'); + self.elements.content.unbind(this + '.qtip-inactive'); + }); + + // Hide the tooltip + self.hide(event); + }, self.options.hide.delay); + } + + // Check if the tooltip is 'fixed' + if(self.options.hide.fixed === true) { + self.elements.tooltip.bind('mouseover.qtip', function () { + if(self.status.disabled === true) { return; } + + // Reset the hide timer + clearTimeout(self.timers.hide); + }); + } + + // Define show event method + function showMethod(event) { + if(self.status.disabled === true) { return; } + + // If set, hide tooltip when inactive for delay period + if(self.options.hide.when.event === 'inactive') { + // Assign each reset event + $(inactiveEvents).each(function () { + hideTarget.bind(this + '.qtip-inactive', inactiveMethod); + self.elements.content.bind(this + '.qtip-inactive', inactiveMethod); + }); + + // Start the inactive timer + inactiveMethod(); + } + + // Clear hide timers + clearTimeout(self.timers.show); + clearTimeout(self.timers.hide); + + // Start show timer + if(self.options.show.delay > 0) { + self.timers.show = setTimeout(function () { + self.show(event); + }, self.options.show.delay); + } + else { + self.show(event); + } + } + + // Define hide event method + function hideMethod(event) { + if(self.status.disabled === true) { return; } + + // Prevent hiding if tooltip is fixed and event target is the tooltip + if(self.options.hide.fixed === true && (/mouse(out|leave)/i).test(self.options.hide.when.event) && $(event.relatedTarget).parents('div.qtip[id^="qtip"]').length > 0) { + // Prevent default and popagation + event.stopPropagation(); + event.preventDefault(); + + // Reset the hide timer + clearTimeout(self.timers.hide); + return false; + } + + // Clear timers and stop animation queue + clearTimeout(self.timers.show); + clearTimeout(self.timers.hide); + self.elements.tooltip.stop(true, true); + + // If tooltip has displayed, start hide timer + self.timers.hide = setTimeout(function () { + self.hide(event); + }, self.options.hide.delay); + } + + // If mouse is the target, update tooltip position on mousemove + if(self.options.position.target === 'mouse' && self.options.position.type !== 'static') { + showTarget.bind('mousemove.qtip', function (event) { + // Set the new mouse positions if adjustment is enabled + self.cache.mouse = { + left: event.pageX, + top: event.pageY + }; + + // Update the tooltip position only if the tooltip is visible and adjustment is enabled + if(self.status.disabled === false && self.options.position.adjust.mouse === true && self.options.position.type !== 'static' && self.elements.tooltip.css('display') !== 'none') { + self.updatePosition(event); + } + }); + } + + // Both events and targets are identical, apply events using a toggle + if((self.options.show.when.target.add(self.options.hide.when.target).length === 1 && + self.options.show.when.event === self.options.hide.when.event && self.options.hide.when.event !== 'inactive') || + self.options.hide.when.event === 'unfocus') { + self.cache.toggle = 0; + // Use a toggle to prevent hide/show conflicts + showTarget.bind(self.options.show.when.event + '.qtip', function (event) { + if(self.cache.toggle === 0) { showMethod(event); } + else { hideMethod(event); } + }); + } + + // Events are not identical, bind normally + else { + showTarget.bind(self.options.show.when.event + '.qtip', showMethod); + + // If the hide event is not 'inactive', bind the hide method + if(self.options.hide.when.event !== 'inactive') { hideTarget.bind(self.options.hide.when.event + '.qtip', hideMethod); } + } + + // Focus the tooltip on mouseover + if((/(fixed|absolute)/).test(self.options.position.type)) { self.elements.tooltip.bind('mouseover.qtip', self.focus); } + } + + // BGIFRAME JQUERY PLUGIN ADAPTION + // Special thanks to Brandon Aaron for this plugin + // http://plugins.jquery.com/project/bgiframe + function bgiframe() { + var self, html, dimensions; + self = this; + dimensions = self.getDimensions(); + + // Setup iframe HTML string + html = '