
@ -0,0 +1,63 @@
|
||||
* text=auto !eol |
||||
/ajax_item_pick.html -text |
||||
connect/condition.php -text |
||||
connect/pour.php -text |
||||
formulaires/dateur/datePicker.css -text |
||||
formulaires/dateur/dates.js -text |
||||
formulaires/dateur/inc-dateur.html -text |
||||
formulaires/dateur/jquery.datePicker.js -text |
||||
formulaires/dateur/jquery.timePicker.js -text |
||||
formulaires/dateur/picker-16.gif -text |
||||
formulaires/dateur/timePicker.css -text |
||||
formulaires/recherche_ecrire.html -text |
||||
formulaires/recherche_ecrire.php -text |
||||
formulaires/selecteur/articles.html -text |
||||
formulaires/selecteur/inc-nav-articles.html -text |
||||
formulaires/selecteur/inc-nav-rubriques.html -text |
||||
formulaires/selecteur/inc-sel-articles.html -text |
||||
formulaires/selecteur/inc-sel-rubriques.html -text |
||||
formulaires/selecteur/jquery-ui-1.6.custom.js -text |
||||
formulaires/selecteur/jquery.picker.js -text |
||||
formulaires/selecteur/navigateur.html -text |
||||
formulaires/selecteur/picker-ajax.html -text |
||||
formulaires/selecteur/picker.css -text |
||||
formulaires/selecteur/rubriques.html -text |
||||
img_pack/annuler-recherche.png -text |
||||
img_pack/article-12.png -text |
||||
img_pack/deplier-droite.gif -text |
||||
img_pack/deplier-droite.png -text |
||||
img_pack/frame-close.png -text |
||||
img_pack/item-add.gif -text |
||||
img_pack/item-add.png -text |
||||
img_pack/item-remove.png -text |
||||
img_pack/logo-bonux.gif -text |
||||
img_pack/spip-bonux.png -text |
||||
img_pack/tri_asc-12.png -text |
||||
img_pack/tri_asc-16.png -text |
||||
img_pack/tri_asc-24.png -text |
||||
img_pack/tri_asc.png -text |
||||
img_pack/tri_desc-12.png -text |
||||
img_pack/tri_desc-16.png -text |
||||
img_pack/tri_desc-24.png -text |
||||
inc/core21_filtres.php -text |
||||
inc/couleurs.php -text |
||||
inc/importer_csv.php -text |
||||
lang/spip_bonux_fr.php -text |
||||
modeles/pagination.html -text |
||||
modeles/pagination_page.html -text |
||||
/plugin.xml -text |
||||
prive/style_prive_plugin_bonux.html -text |
||||
public/spip_bonux_balises.php -text |
||||
public/spip_bonux_criteres.php -text |
||||
req/array.php -text |
||||
/spip_bonux_fonctions.php -text |
||||
/style_prive.html -text |
||||
/style_prive_formulaires.html -text |
||||
/style_prive_plugins.html -text |
||||
/style_prive_plugins_fonctions.php -text |
||||
/test_boucles_iterations.html -text |
||||
/test_boucles_si.html -text |
||||
/test_boucles_tableaux.html -text |
||||
/testnoeud.html -text |
||||
tests/balises/set_merge.html -text |
||||
tests/balises/set_push.html -text |
@ -0,0 +1,8 @@
|
||||
[(#REM) |
||||
|
||||
Squelette |
||||
(c) xxx |
||||
Distribue sous licence GPL |
||||
|
||||
][(#HTTP_HEADER{Content-type: text/javascript[; charset=(#CHARSET)]}) |
||||
]#CACHE{3600}[(#ENV{ref}|picker_identifie_id_rapide{#ENV{rubriques,0},#ENV{articles,0}})] |
@ -0,0 +1,12 @@
|
||||
<?php |
||||
/** |
||||
* Plugin Spip 2.0 Reloaded |
||||
* Ce que vous ne trouverez pas dans Spip 2.0 |
||||
* (c) 2008 Cedric Morin |
||||
* Licence GPL |
||||
* |
||||
*/ |
||||
if (!defined("_ECRIRE_INC_VERSION")) return; |
||||
$GLOBALS['spip_connect_version'] = 0.1; |
||||
spip_connect_db('host','port','login','pass','base','array', '',''); |
||||
?> |
@ -0,0 +1,12 @@
|
||||
<?php |
||||
/** |
||||
* Plugin Spip 2.0 Reloaded |
||||
* Ce que vous ne trouverez pas dans Spip 2.0 |
||||
* (c) 2008 Cedric Morin |
||||
* Licence GPL |
||||
* |
||||
*/ |
||||
if (!defined("_ECRIRE_INC_VERSION")) return; |
||||
$GLOBALS['spip_connect_version'] = 0.1; |
||||
spip_connect_db('host','port','login','pass','base','array', '',''); |
||||
?> |
@ -0,0 +1,34 @@
|
||||
table.jCalendar { background: #c0cad4; border-collapse: separate; border-spacing: 2px; } |
||||
table.jCalendar th { background: #c0cad4; color: #333; font-weight: bold; padding: 3px 5px; text-transform: uppercase; } |
||||
table.jCalendar td { background: #fff; color: #000; padding: 3px 5px; text-align: center; } |
||||
table.jCalendar td.other-month { color: #aaa; } |
||||
table.jCalendar td.today { background: #666; color: #fff; } |
||||
table.jCalendar td.selected { background: #f66; color: #fff; } |
||||
table.jCalendar td.selected:hover { background: #f33; color: #fff; } |
||||
table.jCalendar td:hover, |
||||
table.jCalendar td.dp-hover { background: #eee; color: #000; } |
||||
table.jCalendar td.disabled, |
||||
table.jCalendar td.disabled:hover { background: #e0e5ea; color: #888; } |
||||
|
||||
/* For the popup */ |
||||
|
||||
/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */ |
||||
|
||||
div.dp-popup { position: relative; background: #e0e5ea; border: 1px solid #85909a; font-size: 10px; font-family: arial, sans-serif; padding: 2px; line-height: 1.2em; } |
||||
div#dp-popup { position: absolute; z-index: 199; } |
||||
div.dp-popup h2 { font-size: 12px; text-align: center; margin: 2px 0; padding: 0; color: #555; } |
||||
a#dp-close { font-size: 11px; padding: 4px 0; text-align: center; display: block; } |
||||
a#dp-close:hover { text-decoration: underline; } |
||||
div.dp-popup a { color: #000; text-decoration: none; padding: 3px 2px 0; } |
||||
div.dp-popup div.dp-nav-prev { position: absolute; top: 2px; left: 4px; width: 100px; } |
||||
div.dp-popup div.dp-nav-prev a { float: left; } |
||||
/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */ |
||||
div.dp-popup div.dp-nav-prev a, |
||||
div.dp-popup div.dp-nav-next a { cursor: pointer; } |
||||
div.dp-popup div.dp-nav-prev a.disabled, |
||||
div.dp-popup div.dp-nav-next a.disabled { cursor: default; } |
||||
div.dp-popup div.dp-nav-next { position: absolute; top: 2px; right: 4px; width: 100px; } |
||||
div.dp-popup div.dp-nav-next a { float: right; } |
||||
div.dp-popup a.disabled { cursor: default; color: #aaa; } |
||||
div.dp-popup td { cursor: pointer; } |
||||
div.dp-popup td.disabled { cursor: default; } |
@ -0,0 +1,34 @@
|
||||
<script type='text/javascript' src='#CHEMIN{formulaires/dateur/dates.js}'></script> |
||||
<script type='text/javascript' src='#CHEMIN{formulaires/dateur/jquery.datePicker.js}'></script> |
||||
<script type='text/javascript' src='#CHEMIN{formulaires/dateur/jquery.timePicker.js}'></script> |
||||
<script type='text/javascript'> |
||||
|
||||
Date.dayNames = ['<:date_jour_1:>', '<:date_jour_2:>', '<:date_jour_3:>', '<:date_jour_4:>', '<:date_jour_5:>', '<:date_jour_6:>', '<:date_jour_7:>']; |
||||
Date.abbrDayNames = ['<:date_jour_1_abbr:>', '<:date_jour_2_abbr:>', '<:date_jour_3_abbr:>', '<:date_jour_4_abbr:>', '<:date_jour_5_abbr:>', '<:date_jour_6_abbr:>', '<:date_jour_7_abbr:>']; |
||||
Date.monthNames = ['<:date_mois_1:>', '<:date_mois_2:>', '<:date_mois_3:>', '<:date_mois_4:>', '<:date_mois_5:>', '<:date_mois_6:>', '<:date_mois_7:>', '<:date_mois_8:>', '<:date_mois_9:>', '<:date_mois_10:>', '<:date_mois_11:>', '<:date_mois_12:>']; |
||||
Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; |
||||
Date.firstDayOfWeek = 1; |
||||
Date.format = 'dd/mm/yyyy'; |
||||
jQuery.dpText = { |
||||
TEXT_PREV_YEAR : '<:spip_bonux:annee_precedente|texte_script:>', |
||||
TEXT_PREV_MONTH : '<:spip_bonux:mois_precedent|texte_script:>', |
||||
TEXT_NEXT_YEAR : '<:spip_bonux:annee_suivante|texte_script:>', |
||||
TEXT_NEXT_MONTH : '<:spip_bonux:mois_suivant|texte_script:>', |
||||
TEXT_CLOSE : '<:spip_bonux:bouton_fermer|texte_script:>', |
||||
TEXT_CHOOSE_DATE : '<img src=\'#CHEMIN{formulaires/dateur/picker-16.gif}\' alt=\'<:spip_bonux:afficher_calendrier|attribut_html:>\' />', |
||||
TITLE_CHOOSE_DATE : '<:spip_bonux:afficher_calendrier|texte_script:>' |
||||
} |
||||
jQuery(function() |
||||
{ |
||||
jQuery('input.date').datePicker({startDate:'01/01/1900'}).dpSetPosition(jQuery.dpConst.POS_TOP, jQuery.dpConst.POS_RIGHT); |
||||
jQuery("input.heure").timePicker(); |
||||
}); |
||||
</script> |
||||
<style> |
||||
@import url(#CHEMIN{formulaires/dateur/datePicker.css}); |
||||
@import url(#CHEMIN{formulaires/dateur/timePicker.css}); |
||||
a.dp-choose-date { display: inline-block; padding: 0; margin: 3px 0 0 -19px; vertical-align: bottom; } |
||||
div.time-picker {font-size:11px; width:5em; /* needed for IE */} |
||||
.formulaire_spip input.date {width:8em;padding-right:25px;} |
||||
.formulaire_spip input.heure {width:7em;} |
||||
</style> |
@ -0,0 +1,208 @@
|
||||
/* |
||||
* Copyright (c) 2006 Sam Collett (http://www.texotela.co.uk)
|
||||
* Licensed under the MIT License: |
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/ |
||||
|
||||
/* |
||||
* A time picker for jQuery |
||||
* Based on original timePicker by Sam Collet (http://www.texotela.co.uk)
|
||||
* @name timePicker |
||||
* @version 0.1
|
||||
* @author Anders Fajerson (http://perifer.se)
|
||||
* @example $("#mytime").timePicker(); |
||||
* @example $("#mytime").timePicker({step:30, startTime:"15:00", endTime:"18:00"});
|
||||
*/ |
||||
|
||||
(function($){ |
||||
|
||||
$.fn.timePicker = function(options) { |
||||
// Build main options before element iteration
|
||||
var settings = $.extend({}, $.fn.timePicker.defaults, options);
|
||||
|
||||
return this.each(function() { |
||||
$.timePicker(this, settings); |
||||
}); |
||||
}; |
||||
|
||||
$.timePicker = function (elm, settings) { |
||||
var elm = $(elm)[0];
|
||||
return elm.timePicker || (elm.timePicker = new jQuery._timePicker(elm, settings)); |
||||
}; |
||||
|
||||
$._timePicker = function(elm, settings) { |
||||
|
||||
var tpOver = false; |
||||
var startTime = normaliseTime(settings.startTime); |
||||
var endTime = normaliseTime(settings.endTime); |
||||
|
||||
$(elm).attr('autocomplete', 'OFF'); // Disable browser autocomplete
|
||||
|
||||
var times = []; |
||||
var time = new Date(startTime); // Create a new date object.
|
||||
while(time <= endTime) { |
||||
times[times.length] = formatTime(time, settings); |
||||
time = new Date(time.setMinutes(time.getMinutes() + settings.step)); |
||||
} |
||||
|
||||
var $tpDiv = $('<div class="time-picker'+ (settings.show24Hours ? '' : ' time-picker-12hours') +'"></div>'); |
||||
var $tpList = $('<ul></ul>'); |
||||
|
||||
// Build the list.
|
||||
for(var i = 0; i < times.length; i++) { |
||||
$tpList.append("<li>" + times[i] + "</li>"); |
||||
} |
||||
$tpDiv.append($tpList); |
||||
// Store element offset.
|
||||
var elmOffset = $(elm).offset(); |
||||
// Append the timPicker to the body and position it.
|
||||
$tpDiv.appendTo('body').css({'top':elmOffset.top, 'left':elmOffset.left}).hide(); |
||||
|
||||
$("li", $tpList).unbind().mouseover(function() { |
||||
$("li.selected", $tpDiv).removeClass("selected"); // TODO: only needs to run once.
|
||||
$(this).addClass("selected"); |
||||
}).mousedown(function() { |
||||
tpOver = true; |
||||
}).click(function() { |
||||
setTimeVal(elm, this, $tpDiv, settings); |
||||
tpOver = false; |
||||
}); |
||||
|
||||
// Store ananymous function in variable since it's used twice.
|
||||
var showPicker = function() { |
||||
$tpDiv.show(); // Show picker.
|
||||
$tpDiv.mouseover(function() { // Have to use mouseover instead of mousedown because of Opera
|
||||
tpOver = true; |
||||
}).mouseout(function() { |
||||
tpOver = false; |
||||
}); |
||||
$("li", $tpDiv).removeClass("selected"); |
||||
|
||||
// Try to find a time in the list that matches the entered time.
|
||||
var time = this.value ? timeStringToDate(this.value, settings) : startTime; |
||||
var startMin = startTime.getHours() * 60 + startTime.getMinutes(); |
||||
var min = (time.getHours() * 60 + time.getMinutes()) - startMin; |
||||
var steps = Math.round(min / settings.step); |
||||
var roundTime = normaliseTime(new Date(2001, 0, 0, 0, (steps * settings.step + (startMin)), 0)); |
||||
roundTime = (startTime < roundTime && roundTime < endTime) ? roundTime : startTime; |
||||
|
||||
var $matchedTime = $("li:contains(" + formatTime(roundTime, settings) + ")", $tpDiv); |
||||
|
||||
if ($matchedTime.length) { |
||||
$matchedTime.addClass("selected"); |
||||
// Scroll to matched time.
|
||||
$tpDiv[0].scrollTop = $matchedTime[0].offsetTop; |
||||
} |
||||
}; |
||||
|
||||
$(elm).unbind().focus(showPicker).click(showPicker) |
||||
// Hide timepicker on blur
|
||||
.blur(function() { |
||||
if (!tpOver && $tpDiv[0].parentNode) { // Don't remove when timePicker is clicked or when already removed
|
||||
$tpDiv.hide(); |
||||
} |
||||
}) |
||||
|
||||
// Key support
|
||||
.keypress(function(e) { |
||||
switch (e.keyCode) { |
||||
case 38: // Up arrow.
|
||||
case 63232: // Safari up arrow.
|
||||
var $selected = $("li.selected", $tpList); |
||||
var prev = $selected.prev().addClass("selected")[0]; |
||||
if (prev) { |
||||
$selected.removeClass("selected"); |
||||
$tpDiv[0].scrollTop = prev.offsetTop; |
||||
} |
||||
return false; |
||||
break; |
||||
case 40: // Down arrow.
|
||||
case 63233: // Safari down arrow.
|
||||
var $selected = $("li.selected", $tpList); |
||||
var next = $selected.length ? $selected.next().addClass("selected")[0] : $("li:first").addClass("selected")[0]; |
||||
if (next) { |
||||
$selected.removeClass("selected"); |
||||
$tpDiv[0].scrollTop = next.offsetTop; |
||||
} |
||||
return false; |
||||
break; |
||||
case 13: // Enter
|
||||
if (!$tpDiv.is(":hidden")) { |
||||
var sel = $("li.selected", $tpList)[0]; |
||||
setTimeVal(elm, sel, $tpDiv, settings); |
||||
return false; |
||||
} |
||||
break; |
||||
} |
||||
}); |
||||
|
||||
// Helper function to get an inputs current time as Date object.
|
||||
// Returns a Date object.
|
||||
this.getTime = function() { |
||||
return timeStringToDate(elm.value, settings); |
||||
}; |
||||
// Helper function to set a time input.
|
||||
// Takes a Date object.
|
||||
this.setTime = function(time) { |
||||
elm.value = formatTime(normaliseTime(time), settings); |
||||
// Trigger element's change events.
|
||||
$(elm).change(); |
||||
}; |
||||
|
||||
}; // End fn;
|
||||
|
||||
// Plugin defaults.
|
||||
$.fn.timePicker.defaults = { |
||||
step:30, |
||||
startTime: new Date(0, 0, 0, 0, 0, 0), |
||||
endTime: new Date(0, 0, 0, 23, 30, 0), |
||||
separator: ':', |
||||
show24Hours: true |
||||
}; |
||||
|
||||
// Private functions.
|
||||
|
||||
function setTimeVal(elm, sel, $tpDiv, settings) { |
||||
// Update input field
|
||||
elm.value = $(sel).text(); |
||||
// Trigger element's change events.
|
||||
$(elm).change(); |
||||
// Keep focus for all but IE (which doesn't like it)
|
||||
if (!$.browser.msie) { |
||||
elm.focus(); |
||||
} |
||||
// Hide picker
|
||||
$tpDiv.hide(); |
||||
} |
||||
|
||||
function formatTime(time, settings) { |
||||
var h = time.getHours(); |
||||
var hours = settings.show24Hours ? h : (((h + 11) % 12) + 1); |
||||
var minutes = time.getMinutes(); |
||||
return formatNumber(hours) + settings.separator + formatNumber(minutes) + (settings.show24Hours ? '' : ((h < 12) ? ' AM' : ' PM')); |
||||
} |
||||
|
||||
function formatNumber(value) { |
||||
return (value < 10 ? '0' : '') + value; |
||||
} |
||||
|
||||
function timeStringToDate(input, settings) { |
||||
if (input) { |
||||
var array = input.split(settings.separator); |
||||
var hours = parseFloat(array[0]); |
||||
var minutes = parseFloat(array[1]); |
||||
var time = new Date(0, 0, 0, hours, minutes, 0); |
||||
return normaliseTime(time); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/* Normalise time object to a common date. */ |
||||
function normaliseTime(time) { |
||||
time.setFullYear(2001); |
||||
time.setMonth(0); |
||||
time.setDate(0); |
||||
return time; |
||||
} |
||||
|
||||
})(jQuery); |
After Width: | Height: | Size: 89 B |
@ -0,0 +1,26 @@
|
||||
div.time-picker { |
||||
position: absolute; |
||||
height: 200px; |
||||
width:4em; /* needed for IE */ |
||||
overflow: auto; |
||||
background: #fff; |
||||
border: 1px solid #000; |
||||
z-index: 99; |
||||
} |
||||
div.time-picker-12hours { |
||||
width:6em; /* needed for IE */ |
||||
} |
||||
|
||||
div.time-picker ul { |
||||
list-style-type: none; |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
div.time-picker li { |
||||
padding: 1px; |
||||
cursor: pointer; |
||||
} |
||||
div.time-picker li.selected { |
||||
background: #316AC5; |
||||
color: #fff; |
||||
} |
@ -0,0 +1,10 @@
|
||||
<div class="formulaire_spip formulaire_recherche" id="formulaire_recherche"> |
||||
<form action="[(#ENV{action})]" method="get"><div> |
||||
[(#ENV{action}|form_hidden)] |
||||
[<input type="hidden" name="lang" value="(#ENV{lang})" />] |
||||
<label for="recherche"><:info_rechercher_02:></label> |
||||
<input type="text" class="text" size="10" name="recherche" id="recherche"[ value="(#ENV{recherche})"] accesskey="4" /> |
||||
<input type='image' src='[(#EVAL{_DIR_IMG_PACK}|concat{loupe.png})]' name='submit' class="image" alt='<:info_rechercher|attribut_html:>' /> |
||||
[(#ENV{recherche}|oui)<a href='#ENV{action}' title='<:spip_bonux:annuler_recherche|attribut_html:>'>[(#CHEMIN{img_pack/annuler-recherche.png}|tag_img|inserer_attribut{alt,<:spip_bonux:annuler_recherche:>})]</a>] |
||||
</div></form> |
||||
</div> |
@ -0,0 +1,31 @@
|
||||
<?php |
||||
|
||||
/***************************************************************************\ |
||||
* SPIP, Systeme de publication pour l'internet * |
||||
* * |
||||
* Copyright (c) 2001-2009 * |
||||
* 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; |
||||
|
||||
// chargement des valeurs par defaut des champs du formulaire |
||||
function formulaires_recherche_ecrire_charger_dist($lien_filtre = NULL,$lien_arg = NULL){ |
||||
$lien = $lien_filtre ? $lien_filtre : $lien_arg; |
||||
if ($GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site']) |
||||
$lang = $GLOBALS['spip_lang']; |
||||
else |
||||
$lang=''; |
||||
|
||||
return |
||||
array( |
||||
'action' => ($lien ? $lien : generer_url_ecrire('recherche')), # action specifique, ne passe pas par Verifier, ni Traiter |
||||
'recherche' => _request('recherche'), |
||||
'lang' => $lang |
||||
); |
||||
} |
||||
|
||||
?> |
@ -0,0 +1,17 @@
|
||||
<script type='text/javascript'>var img_unpick='#CHEMIN{img_pack/item-remove.png}';</script> |
||||
<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery.picker.js}'></script> |
||||
|
||||
[(#REM) afficher la selection dans un ul class item_picked ---------------------------------------- |
||||
select=1 => le selecteur se comporte comme un select, avec un seul choix possible |
||||
]<ul class='item_picked[ (#ENV{select,''}|?{select})]'> |
||||
[(#ENV{rubriques,0}|oui)<INCLURE{fond=formulaires/selecteur/inc-sel-rubriques}{name}{selected}{select}{img_unpick=#CHEMIN{img_pack/item-remove.png}}>] |
||||
<INCLURE{fond=formulaires/selecteur/inc-sel-articles}{name}{selected}{select}{img_unpick=#CHEMIN{img_pack/item-remove.png}}> |
||||
</ul> |
||||
|
||||
#SET{id_rubrique,#ENV{id_rubrique}} |
||||
<BOUCLE_art(ARTICLES){statut?}{tout}{id_article}>#SET{id_rubrique,#ID_RUBRIQUE}</BOUCLE_art> |
||||
|
||||
[(#REM) le container item_picker est ici pour etre voisin de item_picked ------] |
||||
<div class='item_picker'> |
||||
<INCLURE{fond=formulaires/selecteur/picker-ajax}{id_rubrique=#GET{id_rubrique}}{id_article}{articles=1}{ajax}{env}> |
||||
</div> |
@ -0,0 +1,9 @@
|
||||
#SET{p,pa_#ID_RUBRIQUE}<B_articles> |
||||
[<p class='pagination'>(#PAGINATION)</p>] |
||||
<ul> |
||||
<BOUCLE_articles(ARTICLES){id_rubrique}{statut?}{pagination 10 #GET{p}}> |
||||
<li class='article[ (#EXPOSE)]'><a href='#' onclick="jQuery(this).item_pick('article|#ID_ARTICLE','#ENV{name,id_item}','[(#TITRE*|texte_script|attribut_html)]','article');return false;" |
||||
><img class='add' src='#CHEMIN{img_pack/item-add.png}' />#TITRE</a></li> |
||||
</BOUCLE_articles> |
||||
</ul> |
||||
</B_articles> |
@ -0,0 +1,9 @@
|
||||
#SET{p,pr_#ID_RUBRIQUE}<B_enfants> |
||||
[<p class='pagination'>(#PAGINATION)</p>] |
||||
<ul class='items'> |
||||
<BOUCLE_enfants(RUBRIQUES){id_parent=#ID_RUBRIQUE}{statut?}{pagination 10 #GET{p}}> |
||||
<li class='rubrique'>[(#ENV{rubriques,0}|oui)<a href='#' onclick="jQuery(this).item_pick('rubrique|#ID_RUBRIQUE','#ENV{name,id_item}','[(#TITRE*|extraire_multi|texte_script|attribut_html)]','rubrique');return false;" |
||||
><img class='add' src='#CHEMIN{img_pack/item-add.png}' /></a>#TITRE]<a class='ajax' href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]'>[#TITRE(#ENV{rubriques,0}|non)]<img class='ouvrir' src='#CHEMIN{img_pack/deplier-droite.png}' /></a></li> |
||||
</BOUCLE_enfants> |
||||
</ul> |
||||
</B_enfants> |
@ -0,0 +1,3 @@
|
||||
<BOUCLE_sel(ARTICLES){id_article IN #ENV{selected}|picker_selected{article}}{statut?}{tout}> |
||||
<li class='article'><input type="hidden" name="[(#ENV{name,id_item})][]" value="article|#ID_ARTICLE" />#TITRE[(#ENV{select,''}|non) |
||||
<a href='#' onclick='jQuery(this).item_unpick();return false;'><img src='#ENV{img_unpick}' /></a>]<span class="sep">, </span></li></BOUCLE_sel> |
@ -0,0 +1,8 @@
|
||||
<BOUCLE_pour(POUR){tableau #ENV{selected}|picker_selected{rubrique}}> |
||||
<BOUCLE_sel(RUBRIQUES){id_rubrique=#VALEUR}{statut?}{tout}> |
||||
<li class='rubrique'><input type="hidden" name="[(#ENV{name,id_item})][]" value="rubrique|#ID_RUBRIQUE" />#TITRE[(#ENV{select,''}|non) |
||||
<a href='#' onclick='jQuery(this).item_unpick();return false;'><img src='#ENV{img_unpick}' /></a>]<span class="sep">, </span></li></BOUCLE_sel>[ |
||||
(#VALEUR|=={0}|oui) |
||||
<li class='rubrique'><input type="hidden" name="[(#ENV{name,id_item})][(#VAL{91}|chr)][(#VAL{93}|chr)]" value="rubrique|[(#VALEUR)]" /><:info_racine_site:>[(#ENV{select,''}|non) |
||||
<a href='#' onclick='jQuery(this).item_unpick();return false;'><img src='[(#ENV{img_unpick})]' /></a>]<span class="sep">, </span></li> |
||||
]<//B_sel></BOUCLE_pour> |
@ -0,0 +1,84 @@
|
||||
/** |
||||
item_picked et picker doivent seulement etre voisins |
||||
|
||||
<ul class='item_picked'>..</ul> |
||||
...
|
||||
... |
||||
<xx class='item_picker'> |
||||
<div class='picker_bouton'>..</div> |
||||
</xx> |
||||
... |
||||
**/ |
||||
jQuery(document).ready(function(){ |
||||
var picked = jQuery('ul.item_picked'); |
||||
if (picked.length) { |
||||
picked.find('>li').removeClass('last').find('li:last').addClass('last'); |
||||
} |
||||
}); |
||||
|
||||
jQuery.fn.picker_toggle = function(){ |
||||
var browser = jQuery(this).parents('.item_picker').find('.browser'); |
||||
if (browser.is(':visible')){ |
||||
if (jQuery.browser.msie) |
||||
browser.hide(); |
||||
else |
||||
browser.slideUp(); |
||||
jQuery('a.close',this).hide(); |
||||
jQuery('a.edit',this).show(); |
||||
} |
||||
else { |
||||
browser.show(); |
||||
jQuery('a.close',this).show(); |
||||
jQuery('a.edit',this).hide(); |
||||
} |
||||
} |
||||
|
||||
// stop animation du bloc cible pour faire patienter
|
||||
jQuery.fn.stopAnimeajax = function(end) { |
||||
this.children().css('opacity', 1.0); |
||||
this.find('.image_loading').html(''); |
||||
return this; // don't break the chain
|
||||
} |
||||
|
||||
jQuery.fn.item_pick = function(id_item,name,title,type){ |
||||
var picker = this.parents('.item_picker'); |
||||
var picked = picker.siblings('ul.item_picked'); |
||||
if (!picked.length) { |
||||
picker.before("<ul class='item_picked'></ul>"); |
||||
picked = picker.siblings('ul.item_picked'); |
||||
} |
||||
var select = picked.is('.select'); |
||||
if (select) |
||||
picked.html(''); |
||||
else |
||||
jQuery('li.on',picked).removeClass('on'); |
||||
var sel=jQuery('input[value='+id_item+']',picked); |
||||
if (sel.length==0){ |
||||
picked.addClass('changing').animeajax(); |
||||
// simulons de la latence pour l'oeil de l'utilisateur
|
||||
setTimeout(function(){ |
||||
jQuery('li:last',picked).removeClass('last'); |
||||
picked.append('<li class="last on '+type+'">' |
||||
+'<input type="hidden" name="'+name+'[]" value="'+id_item+'"/>' |
||||
+ title |
||||
+(select?"":" <a href='#' onclick='jQuery(this).item_unpick();return false;'>" |
||||
+"<img src='"+img_unpick+"' /></a>" |
||||
) |
||||
+'<span class="sep">, </span></li>').removeClass('changing').stopAnimeajax(); |
||||
// masquer le selecteur apres un pick
|
||||
picker.find('.picker_bouton').picker_toggle(); |
||||
},300); |
||||
} |
||||
else |
||||
sel.parent().addClass('on'); |
||||
return this; // don't break the chain
|
||||
} |
||||
jQuery.fn.item_unpick = function(){ |
||||
var picked = this.parents('ul.item_picked'); |
||||
var me = this.parent(); |
||||
jQuery(me).fadeOut('fast'); |
||||
setTimeout(function(){ |
||||
me.remove(); |
||||
picked.find('>li').removeClass('last').find('li:last').addClass('last'); |
||||
},400); |
||||
} |
@ -0,0 +1,24 @@
|
||||
<BOUCLE_rub(RUBRIQUES){id_rubrique=#ENV{id_r,#ENV{id_rubrique}}}{statut?}> |
||||
<div class='chemin'> |
||||
<a href='[(#SELF|parametre_url{id_r,0})]' class='ajax'><:info_racine_site:></a> |
||||
<BOUCLE_chemin(HIERARCHIE){id_rubrique}> > <a href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]' class='ajax'>#TITRE</a></BOUCLE_chemin> > <strong class='on'>#TITRE</strong> |
||||
</div>#SET{n,0} |
||||
<B_contenu> |
||||
[(#REM) afficher la racine si la profondeur le permer] |
||||
[(#GRAND_TOTAL|<{#TOTAL_BOUCLE}|oui) |
||||
<div class='frame[ total_(#GRAND_TOTAL|max{#TOTAL_BOUCLE|moins{1}})]frame_0'><h2>[<a(#ENV{rubriques,0}|oui) href='#' onclick="jQuery(this).item_pick('rubrique|0','#ENV{name,id_item}','<:info_racine_site|texte_script|attribut_html:>','rubrique');return false;" |
||||
><img class='add' src='#CHEMIN{img_pack/item-add.png}' /></a>]<:info_racine_site:></h2> |
||||
[(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div>] |
||||
<BOUCLE_contenu(HIERARCHIE){id_rubrique}{tout}{n-4,4}>#SET{n,0} |
||||
<div class='frame[ total_(#GRAND_TOTAL|min{#TOTAL_BOUCLE|moins{1}})][ frame_(#COMPTEUR_BOUCLE|moins{#GRAND_TOTAL|plus{1}|max{#TOTAL_BOUCLE}}|plus{#TOTAL_BOUCLE})]'><a |
||||
href='[(#SELF|parametre_url{id_r,#_rub:ID_PARENT|?{#_rub:ID_PARENT,racine}})]' class='frame_close ajax'><img src='#CHEMIN{img_pack/frame-close.png}' /></a> |
||||
<h2><a class='ajax' href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]'>#TITRE</a></h2> |
||||
[(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique}{env})] |
||||
[(#ENV{articles,0}|oui) [(#INCLURE{fond=formulaires/selecteur/inc-nav-articles}{id_rubrique}{id_article}{env})] ] |
||||
</div> |
||||
</BOUCLE_contenu> |
||||
|
||||
</BOUCLE_rub> |
||||
<div class='chemin'><strong class='on'><:info_racine_site:></strong></div> |
||||
<div class='frame total_0 frame_0'><h2><:info_racine_site:></h2>[(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div> |
||||
<//B_rub> |
@ -0,0 +1,34 @@
|
||||
#SET{bouton_modif,#ENV{select,''}|?{bouton_modifier,bouton_ajouter}|_T} |
||||
[(#REM) Afficher un bouton ajax Modifier a la premiere fois ---------------------------------------- |
||||
][(#ENV{picker,''}|non) |
||||
<div class='picker_bouton'>[<a href='[(#SELF|parametre_url{picker,1})]' class='ajax'>#GET{bouton_modif}</a>]</div> |
||||
] |
||||
[(#REM) Afficher un bouton Fermer/Modifier ensuite ---------------------------------------- |
||||
][(#ENV{picker,''}|oui) |
||||
<div class='picker_bouton'>[<a class='close' |
||||
href='[(#SELF|parametre_url{picker,0})]' |
||||
onclick="jQuery(this).parent().picker_toggle();return false;" |
||||
><:spip_bonux:bouton_fermer:></a><a class='edit' |
||||
href='[(#SELF|parametre_url{picker,1})]' |
||||
onclick="jQuery(this).parent().picker_toggle();return false;" |
||||
style='display:none;'>#GET{bouton_modif}</a>]</div> |
||||
|
||||
[(#REM) et enfin le navigateur ------] |
||||
<div class='browser'> |
||||
<div class="choix choix_rapide"> |
||||
<label for="picker_id"><:spip_bonux:id_rapide:></label> |
||||
<input type="text" value="" id="picker_id" size="10" /> |
||||
<a href="#" |
||||
onclick="jQuery.ajax({'url':'[(#URL_PAGE{ajax_item_pick,rubriques=[(#ENV{rubriques})]&articles=[(#ENV{articles})]&ref=})]'+jQuery('#picker_id').attr('value'), |
||||
'success':function(r){ |
||||
eval('r = '+r); // JSON envoye par ajax_item_pick.html |
||||
if (r){ |
||||
jQuery('#picker_id').item_pick(r.id,'#ENV{name,id_item}',r.titre,r.type); |
||||
} |
||||
jQuery('#picker_id').attr('value',''); |
||||
} |
||||
});return false;">#GET{bouton_modif}</a> |
||||
</div> |
||||
<INCLURE{fond=formulaires/selecteur/navigateur}{ajax}{env}> |
||||
</div> |
||||
] |
@ -0,0 +1,13 @@
|
||||
.item_picker .chemin {border-bottom:1px sold #eee;margin:0.5em 0 0.25em;} |
||||
|
||||
.item_picker .frame {border:1px solid #999;width:180px;height:400px;float:left;overflow:auto;} |
||||
.item_picker .frame h2 {margin:0;padding:5px;background:#999;} |
||||
.item_picker .frame ul {list-style:none;margin:0;padding:0;} |
||||
.item_picker .frame ul li {list-style:none;margin:0;padding:2px;padding-left:26px;} |
||||
.item_picker .frame ul li.rubrique {background:url(prive/images/rubrique-24.gif) no-repeat top left;} |
||||
.item_picker .frame ul li.article {background:url(prive/images/article-24.gif) no-repeat top left;} |
||||
|
||||
.item_picker .frame ul li:hover {background-color:#999;} |
||||
|
||||
.browser .choix_rapide {font-size:0.9em;} |
||||
.browser #picker_id {padding:0;margin:0 5px;border:1px solid;} |
@ -0,0 +1,24 @@
|
||||
<script type='text/javascript'>var img_unpick='#CHEMIN{img_pack/item-remove.png}';</script> |
||||
<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery.picker.js}'></script> |
||||
|
||||
[(#REM) afficher la selection dans un ul class item_picked ---------------------------------------- |
||||
select=1 => le selecteur se comporte comme un select, avec un seul choix possible |
||||
]<ul class='item_picked[ (#ENV{select,''}|?{select})]'> |
||||
<INCLURE{fond=formulaires/selecteur/inc-sel-rubriques}{name}{selected}{select}{img_unpick=#CHEMIN{img_pack/item-remove.png}}> |
||||
</ul> |
||||
|
||||
#SET{id_rubrique,#ENV{id_rubrique}} |
||||
<BOUCLE_art(ARTICLES){statut?}{tout}{id_article}>#SET{id_rubrique,#ID_RUBRIQUE}</BOUCLE_art> |
||||
|
||||
[(#REM) le container item_picker est ici pour etre voisin de item_picked ------] |
||||
<div class='item_picker'> |
||||
<INCLURE{fond=formulaires/selecteur/picker-ajax}{id_rubrique=#GET{id_rubrique}}{id_article}{rubriques=1}{articles=0}{ajax}{env}> |
||||
</div> |
||||
[(#ENV{sortable,'non'}|=={oui}|oui) |
||||
<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery-ui-1.6.custom.js}'></script> |
||||
<script type='text/javascript'> |
||||
jQuery(function() { |
||||
jQuery("ul.item_picked").sortable(); |
||||
}); |
||||
</script> |
||||
] |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 571 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 456 B |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 786 B |
After Width: | Height: | Size: 477 B |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 772 B |
@ -0,0 +1,184 @@
|
||||
<?php |
||||
/** |
||||
* Plugin Spip-Bonux |
||||
* Le plugin qui lave plus SPIP que SPIP |
||||
* (c) 2008 Mathieu Marcillaud, Cedric Morin, Romy Tetue |
||||
* Licence GPL |
||||
* |
||||
* Fonctions integrees au core en branche 2.1 que l'on rend disponible en branche 2.0.x |
||||
* |
||||
*/ |
||||
|
||||
// s'assurer que les filtres du core sont deja charges |
||||
// pour eviter tout risque de conflit |
||||
include_spip('inc/filtres'); |
||||
|
||||
if (!function_exists('lien_ou_expose')){ |
||||
/** |
||||
* une fonction pour generer des menus avec liens |
||||
* ou un <strong class='on'> non clicable lorsque l'item est selectionne |
||||
* |
||||
* @param string $url |
||||
* @param string $libelle |
||||
* @param bool $on |
||||
* @param string $class |
||||
* @param string $title |
||||
* @return string |
||||
*/ |
||||
function lien_ou_expose($url,$libelle,$on=false,$class="",$title="",$rel=""){ |
||||
return |
||||
($on ?"<strong class='on'>": |
||||
"<a href='$url'" |
||||
.($title?" title='".attribut_html($title)."'":'') |
||||
.($class?" class='".attribut_html($class)."'":'') |
||||
.($rel?" rel='".attribut_html($rel)."'":'') |
||||
.">" |
||||