Closed (won't fix)
Project:
Event
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2007 at 08:23 UTC
Updated:
19 Oct 2010 at 14:54 UTC
I am trying to add a "mouseover" feature events: when you put the mouse over a day with some events, they got listes in a layer, when you remove the mouse, the layer disappears.
I managed to load the data in events.theme
function theme_event_calendar_month($op, $header, $rows) {
$output = "\n";
foreach($rows as $setmana) {
array_shift($setmana); //borrem el primer element que la capçalera
foreach($setmana as $dia) {
if (strlen($dia['data'])>2) { //en cas que hi hagi dades
$data=explode("/",$dia['data']);
$llista=event_calendar_data($data[count($data)-5], $data[count($data)-4], $data[count($data)-3]);
$output.="<div id=\"capa_".$dia['id']."\" style=\"position:absolute;width:100;height:100;top:100;left:200;background-color:red;visibility:hidden\">\n";
foreach($llista as $node) $aaa++; //$output.=" ".$node->title."\n";
$output.="</div>";
}
}
}
$output .= theme("table", $header, $rows);
return '<div class="event-calendar"><div class="month-view">'. $output ."</div></div>\n";
}
but now I should change the $output .= theme("table", $header, $rows); so it add "onMouseOver" to every link. Where is the code of this function?
thanks
PS: I also add a couple of functions to event.js
Comments
Comment #1
enboig commentedI managed to add the "attributes" at
my problem right now is that the attribute appears a:
the quote is translated to html and it shouldn't. How could I avoid this?
Comment #2
enboig commentedI changed the way of doing this. Right now using CSS I make hidden all the layers, and then moving the mouse over the day a javascript function should be called.
I have written the function (called mostra4()) with no parameters in event.js; but when I move the mouse over the day it says:
"mostra4 is not defined"
Is javascript loaded? do I have to activate it?
Comment #3
kkaefer commentedFor adding effects and interactivity to Drupal web pages, the JavaScript library jQuery is used. Also read the article about unobtrusive JavaScript to learn a better and cleaner way to include JavaScript in your pages.
Comment #4
enboig commentedforget about it.