19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.cal.php,v 1.14 2007-03-14 18:14:42 jp_milcent Exp $ |
// CVS : $Id: bazar.fonct.cal.php,v 1.15 2007-03-16 12:40:25 jp_milcent Exp $ |
/** |
* |
* Fonctions calendrier du module bazar |
29,7 → 29,7 |
*@author David Delon <david.delon@clapas.net> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.14 $ $Date: 2007-03-14 18:14:42 $ |
*@version $Revision: 1.15 $ $Date: 2007-03-16 12:40:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
100,6 → 100,31 |
$url->addQueryString('m', date('n',$curStamp)); |
$url->addQueryString('d', date('j',$curStamp)); |
$cur = $url->getUrl(); |
|
// Gestion de l'affichage des titres des évènements |
if (isset($_GET['ctt']) && $_GET['ctt'] == '1') { |
$url->addQueryString('tt', '0'); |
if ($_GET['tt'] == '0') { |
$url->addQueryString('tt', '1'); |
} |
$tc_lien = $url->getUrl(); |
} else { |
$url->addQueryString('tt', '0'); |
if ($_GET['tt'] == '0') { |
$url->addQueryString('tt', '1'); |
} |
$url->addQueryString('ctt', '1'); |
$tc_lien = $url->getUrl(); |
} |
$url->removeQueryString('ctt'); |
$url->removeQueryString('tt'); |
$tc_txt = 'Afficher les titres complets des évènements'; |
if (isset($_GET['tt'])) { |
if ($_GET['tt'] == '0') { |
$tc_txt = 'Tronquer les titres des évènements'; |
$url->addQueryString('tt', $_GET['tt']); |
} |
} |
|
// Navigation |
$prevStamp = $month->prevMonth(true); |
114,6 → 139,9 |
$url->addQueryString('d', date('j',$nextStamp)); |
$next = $url->getUrl(); |
|
// Suppression du paramêtre de troncage des titres |
$url->removeQueryString('tt'); |
|
$fr_month = array( "1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN, |
"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE); |
|
122,6 → 150,20 |
// Ajout des styles du bazar |
if (defined('PAP_VERSION')) { //si on est dans Papyrus |
GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css'); |
GEN_stockerFichierScript('domLib', '/api/js/domtooltip/domLib.js'); |
GEN_stockerFichierScript('domTT', '/api/js/domtooltip/domTT.js'); |
// DomToolTip |
$script = 'var domTT_styleClass = "niceTitle";'."\n"; |
$script .= 'function nicetitleDecorator(el) {'."\n"; |
$script .= ' var result = el.title;'."\n"; |
$script .= ' result = result.replace(new RegExp("\n", "g"), "<br />");'."\n"; |
$script .= ' if (el.href) {'."\n"; |
$script .= ' result += "<p>" + el.href + "</p>";'."\n"; |
$script .= ' }'."\n"; |
$script .= ' return result;'."\n"; |
$script .= '}'."\n"; |
$script .= 'domTT_replaceTitles(nicetitleDecorator);'."\n"; |
GEN_stockerCodeScript('var domTT_styleClass = "niceTitle";'."\n"); |
} |
$retour .= '<div id="cal_entete">'; |
$retour .= '<span class="cal_navigation">'; |
137,6 → 179,8 |
$retour .= '</span>'; |
$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="client/bazar/images/cal_titre.png" alt="Calendrier"/></h1>'; |
$retour .= '</div>'; |
|
$retour .= '<p>'.'<a href="'.$tc_lien.'">'.$tc_txt.'</a>'.'</p>'; |
} else { |
$retour.= "<div class=\"navi\">"; |
$retour.= "<a href=\"".$prev."\"> << </a>"; |
245,6 → 289,15 |
$month->build($selection); |
if ($type == 'calendrier') { |
$retour.= '<table class="calendrier">'. |
'<colgroup>'. |
'<col class="cal_lundi"/>'. |
'<col class="cal_mardi"/>'. |
'<col class="cal_mercredi"/>'. |
'<col class="cal_jeudi"/>'. |
'<col class="cal_vendredi"/>'. |
'<col class="cal_samedi"/>'. |
'<col class="cal_dimanche"/>'. |
'</colgroup>'. |
'<thead>'. |
"<tr> |
|
256,12 → 309,21 |
<th> ". BAZ_SAMEDI ."</th> |
<th> ". BAZ_DIMANCHE ."</th> |
</tr> |
".'</thead>'; |
".'</thead>'.'<tbody>'; |
} |
else { |
$retour.= '<table class="calendrier_applette">'. |
'<thead>'." |
<tr> |
'<colgroup>'. |
'<col class="cal_lundi"/>'. |
'<col class="cal_mardi"/>'. |
'<col class="cal_mercredi"/>'. |
'<col class="cal_jeudi"/>'. |
'<col class="cal_vendredi"/>'. |
'<col class="cal_samedi"/>'. |
'<col class="cal_dimanche"/>'. |
'</colgroup>'. |
'<thead>'. |
"<tr> |
|
<th> ". BAZ_LUNDI_COURT ."</th> |
<th> ". BAZ_MARDI_COURT ."</th> |
324,7 → 386,14 |
$id_fiches[] = $ligne_evenement->bf_id_fiche; |
$url->addQueryString ('id_fiches',$id_fiches); |
$link = $url->getUrl(); |
$evenemt_xhtml .= '<li><a class="cal_evenemt" href="'.$link.'" title="'.$ligne_evenement->bf_titre.'">'.substr($ligne_evenement->bf_titre, 0, 20).'...</a></li>'."\n"; |
|
if (!isset($_GET['tt']) || (isset($_GET['tt']) && $_GET['tt'] == '1')) { |
$titre_taille = strlen($ligne_evenement->bf_titre); |
$titre = ($titre_taille > 20)?substr($ligne_evenement->bf_titre, 0, 20).'...':$ligne_evenement->bf_titre; |
} else { |
$titre = $ligne_evenement->bf_titre; |
} |
$evenemt_xhtml .= '<li class="tooltip" title="'.$ligne_evenement->bf_titre.'"><a class="cal_evenemt" href="'.$link.'">'.$titre.'</a></li>'."\n"; |
$url->removeQueryString ('id_fiches'); |
} |
if ($evenements_nbre > 0) { |
360,7 → 429,7 |
|
|
} |
|
$retour.= '<script type="text/javascript">//<![CDATA['."\n".$script.'//]]></script>'."\n"; |
// Vue detail |
|
if ((isset($_GET['id_fiches']))) { |