Index: /trunk/calendar_new/xsl/detailsDialog.xsl
===================================================================
--- /trunk/calendar_new/xsl/detailsDialog.xsl	(revision 457)
+++ /trunk/calendar_new/xsl/detailsDialog.xsl	(revision 457)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:template match="/retorno">
+<table style="position: absolute; width: 350px; height: 350px;" border="0" cellpadding="0" cellspacing="0">
+<tbody>
+<tr style="height: 24px;">
+	<td background="templates/default/images/iw_nw.png">
+	</td>
+	<td background="templates/default/images/iw_lu.png">
+	</td>
+	<td background="templates/default/images/iw_ne.png">
+		<img id="closeDialog" onclick="calendar.dialog()" src="templates/default/images/close.gif" style="position: absolute; z-index: 184; cursor: pointer;"/>
+	</td>
+</tr>
+<tr>
+	<td style="width: 24px;" background="templates/default/images/iw_ll.png">
+	</td>
+	<td>
+		<div style="background: #FFF; height: 100%">
+			<xsl:variable name="title" select="title" />
+			<xsl:variable name="description" select="description" />
+			<xsl:variable name="location" select="location" />
+			Titulo:<br/>
+			<input type="text" value="{title}" size="30"></input><br/>
+			Descricao:<br/>
+			<input type="text" value="{description}" size="50"></input><br/>
+			Local:<br/>
+			<input type="text" value="{location}" size="30"></input><br/>
+
+		</div>
+	</td>
+	<td style="width: 24px;" background="templates/default/images/iw_lr.png"></td>
+</tr>
+<tr style="height: 24px;">
+	<td background="templates/default/images/iw_sw.png">
+	</td>
+	<td background="templates/default/images/iw_ld.png">
+	</td>
+	<td background="templates/default/images/iw_se.png">
+	</td>
+</tr>
+</tbody>
+</table>
+</xsl:template>
+</xsl:stylesheet>
Index: /trunk/calendar_new/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/calendar_new/inc/class.uicalendar.inc.php	(revision 437)
+++ /trunk/calendar_new/inc/class.uicalendar.inc.php	(revision 457)
@@ -23,8 +23,8 @@
 		$start = isset ($_REQUEST["start"]) ? $_REQUEST["start"] : NULL;
 		$end = isset ($_REQUEST["end"]) ? $_REQUEST["end"] : NULL;
-		$description = isset ($_REQUEST["desc"]) ? $_REQUEST["desc"] : NULL;
-		if ($start == NULL || $end == NULL || $description == NULL)
+		$title = isset ($_REQUEST["title"]) ? $_REQUEST["title"] : NULL;
+		if ($start == NULL || $end == NULL || $title == NULL)
 			return "false;Empty field";
-		if (!eregi("^[a-zA-Z_.0-9-]*",$description))
+		if (!eregi("^[a-zA-Z_.0-9-]*",$title))
 			return "false;Invalid char in description";
 		if (!eregi("^[0-9]*",$start))
@@ -33,5 +33,5 @@
 			return "false;Wrong formed text";
 
-		return $this->db_obj->insertEvent($start, $end, $description, $description);
+		return $this->db_obj->insertEvent($start, $end, $title);
 	}
 
@@ -66,8 +66,6 @@
 
 		$retorno = "<today>".date('Ydm',$dayViewTime)."</today>";
-		include_once("class.bocalendar.inc.php");
-		$obj = new bocalendar();
 
-		$fromBo = $obj->requestDayCal($dayViewTime);
+		$fromBo = $this->db_obj->requestDayCal($dayViewTime);
 
 
@@ -128,4 +126,15 @@
 		return $retorno;
 	}
+
+	function getDetails (){
+		$eventId = isset ($_REQUEST["id"]) ? $_REQUEST["id"] : NULL;
+		$fromBo = $this->db_obj->requestDetailsEvent($eventId);
+		$_SESSION['debug'] = $fromBo;
+		foreach ($fromBo[0] as $field => $line) {
+			$buff .= "<".$field.">".$line."</".$field.">";
+		}
+		return $buff;
+	}
+
 	function getViewMonth () {
 		$monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time()));
Index: /trunk/calendar_new/inc/class.bocalendar.inc.php
===================================================================
--- /trunk/calendar_new/inc/class.bocalendar.inc.php	(revision 420)
+++ /trunk/calendar_new/inc/class.bocalendar.inc.php	(revision 457)
@@ -53,4 +53,16 @@
 		// Performing SQL query
 		$query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".$dayTime." and datetime < ".($dayTime+604800).") or (edatetime > ".$dayTime." and edatetime < ".($dayTime+604800)."))";
+		if (!$this->db->query($query))
+			return false;
+
+		while($this->db->next_record())
+			$result[] = $this->db->row();
+
+		return $result;
+	}
+
+	function requestDetailsEvent($id) {
+		// Performing SQL query
+		$query = "SELECT title, description, datetime, edatetime, groups, location FROM phpgw_cal where (owner = '".$this->user_id."') and (cal_id = ".$id.")";
 		if (!$this->db->query($query))
 			return false;
Index: /trunk/calendar_new/js/xtools.js
===================================================================
--- /trunk/calendar_new/js/xtools.js	(revision 457)
+++ /trunk/calendar_new/js/xtools.js	(revision 457)
@@ -0,0 +1,151 @@
+(function()
+{
+	var _FILES = [];
+
+	function _convert(pString)
+	{
+		if ( typeof pString != 'string' )
+			return false;
+
+		if ( window.ActiveXObject )
+		{
+			var _xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
+			_xmlDoc.async = "false";
+			_xmlDoc.loadXML(pString);
+		}
+		else
+		{
+			var parser = new DOMParser();
+			var _xmlDoc = parser.parseFromString(pString, "text/xml");
+		}
+
+		return _xmlDoc;
+	}
+
+	function _load(pFile)
+	{
+		pFile = this._PATH + 'xsl/' + pFile;
+		if ( !(_FILES[pFile]) )
+		{
+			var _data = null;
+			if ( document.implementation.createDocument )
+				_data = document.implementation.createDocument("", "", null);
+			else
+				_data = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
+
+			_data.async = false;
+			_data.load(pFile + '?' + Date.parse(new Date));
+			_FILES[pFile] = _data;
+		}
+		return _FILES[pFile];
+	}
+
+	function _parse()
+	{
+		if ( arguments.length == 1 )
+		{
+			pXML = _xml('root');
+			pXSL = arguments[0];
+		}
+		else
+		{
+			pXML = arguments[0];
+			pXSL = arguments[1];
+		}
+		switch ( typeof pXML )
+		{
+			case 'object' :
+			break;
+			case 'string' :
+				if ( pXML.indexOf('<') == 0 )
+					pXML = _convert(pXML);
+				else
+					pXML = _load.call(this, pXML);
+			break;
+			default :
+				return {'error':'invalid xml'}
+		}
+		switch ( typeof pXSL )
+		{
+			case 'object' :
+			break;
+			case 'string' :
+				pXSL = _load.call(this, pXSL);
+			break;
+			default :
+				return {'error':'invalid xsl'}
+		}
+
+		var fragment = null;
+		if ( window.XSLTProcessor )
+		{
+			var xslProc = new XSLTProcessor();
+			xslProc.importStylesheet(pXSL);
+
+			if ( (arguments.length == 3) && (typeof arguments[2] == 'object') )
+			{
+				var params = arguments[2];
+				for (var i in params )
+					 xslProc.setParameter(null, i, params[i]);
+			}
+
+			fragment = xslProc.transformToFragment(pXML, document);
+
+			// para retornar valor igual ao ie.
+			var aux = document.createElement("div");
+			aux.appendChild(fragment);
+			fragment = aux.innerHTML;
+		}
+		else
+		{
+			var xslTemplate = new ActiveXObject("MSXML2.XSLTemplate");
+			xslTemplate.stylesheet = pXSL;
+
+			var xslProc = xslTemplate.createProcessor();
+			xslProc.input = pXML;
+
+			if ( (arguments.length == 3) && (typeof arguments[2] == 'object') )
+			{
+				var params = arguments[2];
+				for (var i in params )
+					 xslProc.addParameter(i, params[i], '');
+			}
+
+			xslProc.transform();
+			fragment = xslProc.output;
+		}
+		return fragment;
+	}
+
+	function _xml()
+	{
+		var a = false;
+		if ( document.implementation.createDocument )
+			a = document.implementation.createDocument("", "", null);
+		else if ( ActiveXObject )
+			a = new ActiveXObject("Msxml2.DOMDocument");
+
+		if ( arguments.length == 1 && typeof arguments[0] == 'string' )
+			a.appendChild(a.createElement(arguments[0]));
+		//with ( a )
+		//	appendChild(createProcessingInstruction("xml", "version='1.0'"));
+
+		return a;
+	}
+
+	function XTools()
+	{
+		var _argv = arguments;
+		this._PATH = ( _argv.length > 0 ) ?
+			_argv[0] : '';
+		if ( this._PATH != '' && this._PATH.lastIndexOf('/') != (this._PATH.length - 1) )
+			this._PATH += '/';
+	}
+
+	XTools.prototype.convert = _convert;
+	XTools.prototype.load = _load;
+	XTools.prototype.parse = _parse;
+	XTools.prototype.xml = _xml;
+	window.XTools = XTools;
+}
+)();
Index: /trunk/calendar_new/js/common_functions.js
===================================================================
--- /trunk/calendar_new/js/common_functions.js	(revision 437)
+++ /trunk/calendar_new/js/common_functions.js	(revision 457)
@@ -112,5 +112,5 @@
 		var showDetailLink = document.createElement('a');
 		showDetailLink.id = "details_" + eventDiv.id;
-		showDetailLink.href = "javascript:alert('show details');";
+		showDetailLink.href = "javascript:showDetails("+eventDiv.id+");";
 		showDetailLink.innerHTML = '<img onmouseover="this.setAttribute(\'width\', \'15\');"'+
 			'onmouseout="this.setAttribute(\'width\', \'10\');"'+
@@ -128,4 +128,26 @@
 		lnk2.style.visibility="visible";
 	}
+}
+function showDetails(eventId){
+	var handler_getDetails = function (data) 
+	{
+		var xtools = new XTools;
+		var divAddDialog = document.getElementById("divAddDialog");
+		var xsl = XMLTools.load('xsl/detailsDialog.xsl?'+ Date.parse(new Date));
+		if(!divAddDialog) {
+			divAddDialog = document.createElement("DIV");
+			divAddDialog.id = 'divAddDialog';
+			divAddDialog.style.zIndex = "10";
+			divAddDialog.style.position = "absolute";
+			divAddDialog.style.display = "none";
+			document.body.appendChild(divAddDialog);
+		}
+		divAddDialog.style.left = "300px";
+		divAddDialog.style.top  = "200px";
+		divAddDialog.innerHTML = xtools.parse(data, xsl);
+		divAddDialog.style.display = "block";
+	}
+	XMLTools.__RETURN_MODE__ = 'XML';
+	XMLTools.request('$this.uicalendar.getDetails&id='+eventId.id.substr(6), 'GET', handler_getDetails);
 }
 function removeButtons(eventDiv){
@@ -161,5 +183,5 @@
 }
 
-function quickAddEvent (description, startTime, endTime)
+function quickAddEvent (title, startTime, endTime)
 {
 	var endDate = new Date();
@@ -178,5 +200,5 @@
 			var eventDiv = document.createElement('DIV');
 			eventDiv.id = "event_" + serverRet.substr(6,serverRet.length);
-			eventDiv.innerHTML = description;
+			eventDiv.innerHTML = title;
 			var endDateDiv = document.createElement('DIV');
 			var startDateDiv = document.createElement('DIV');
@@ -191,5 +213,5 @@
 
 	}
-	XMLTools.request('$this.uicalendar.quickAdd&start='+parseInt(id2timeStamp(startTime)/1000)+'&end='+parseInt(endDate.getTime()/1000)+'&desc='+description, 'GET', handler_quickAdd);
+	XMLTools.request('$this.uicalendar.quickAdd&start='+parseInt(id2timeStamp(startTime)/1000)+'&end='+parseInt(endDate.getTime()/1000)+'&title='+title, 'GET', handler_quickAdd);
 }
 
Index: /trunk/calendar_new/index.php
===================================================================
--- /trunk/calendar_new/index.php	(revision 420)
+++ /trunk/calendar_new/index.php	(revision 457)
@@ -46,4 +46,5 @@
 echo "<link rel='stylesheet' href='templates/default/main.css' />"
 ."<script language='JavaScript' type='text/javascript' src='js/globals.js'></script>"
+."<script language='JavaScript' type='text/javascript' src='js/xtools.js'></script>"
 ."<script src='inc/load_lang.php?".$GLOBALS['phpgw_info']['flags']['update_version']."' type='text/javascript'></script>"
 ."<script language='JavaScript' type='text/javascript' src='js/connector.js'></script>"
