Index: trunk/prototype/modules/calendar/js/helpers.js
===================================================================
--- trunk/prototype/modules/calendar/js/helpers.js	(revision 5387)
+++ trunk/prototype/modules/calendar/js/helpers.js	(revision 5389)
@@ -162,6 +162,9 @@
 }
 */
-function eventDetails( objEvent, decoded )
+function eventDetails( objEvent, decoded, path)
 {
+	if(path == undefined)
+		path = "";
+		
 	if( !decoded )
 	    objEvent = DataLayer.decode( "schedulable:calendar", objEvent );
@@ -184,5 +187,5 @@
 	zebraDiscardEventDialog = false;
 	
-	DataLayer.render( 'templates/event_add.ejs', {event:objEvent}, function( html ){	
+	var html = DataLayer.render( path+'templates/event_add.ejs', {event:objEvent});	
 		
 		if (!UI.dialogs.addEvent) {
@@ -280,5 +283,5 @@
 				calendarSelected.useAlarmDefault = 1;
 				if(calendarSelected.defaultAlarms != ""){
-					var li_attach = DataLayer.render('templates/alarms_add_itemlist.ejs', {alarm:calendarSelected});
+					var li_attach = DataLayer.render(path+'templates/alarms_add_itemlist.ejs', {alarm:calendarSelected});
 						jQuery('.event-alarms-list').append(li_attach).find('.button.remove').button({text:false, icons:{primary:'ui-icon-close'}}).click(function(el) {
 							if( $(this).parent().remove().find('li').is(':empty') )	{
@@ -300,5 +303,5 @@
 				calendarSelected.useAlarmDefault = 1;
 				if(calendarSelected.defaultAlarms != ""){
-					var li_attach = DataLayer.render('templates/alarms_add_itemlist.ejs', {alarm:calendarSelected});
+					var li_attach = DataLayer.render(path+'templates/alarms_add_itemlist.ejs', {alarm:calendarSelected});
 						jQuery('.event-alarms-list').append(li_attach).find('.button.remove').button({text:false, icons:{primary:'ui-icon-close'}}).click(function(el) {
 							var id;
@@ -407,5 +410,5 @@
 
 	    UI.dialogs.addEvent.find('.button-add-alarms').click(function(){
-			var li_attach = DataLayer.render('templates/alarms_add_itemlist.ejs', {});
+			var li_attach = DataLayer.render(path+'templates/alarms_add_itemlist.ejs', {});
 
 			jQuery('.event-alarms-list').append(li_attach).find('.button.remove').button({text:false, icons:{primary:'ui-icon-close'}}).click(function(el) {
@@ -428,5 +431,5 @@
 //	    });
 	    
-	    DataLayer.render( 'templates/attendee_add.ejs', {event:objEvent}, function( attendeeHtml ){
+		var attendeeHtml = DataLayer.render( path+'templates/attendee_add.ejs', {event:objEvent});
 	
 			// load template of attendees
@@ -573,5 +576,5 @@
 								hide: false,
 								content: {
-									text: $('<div></div>').html( DataLayer.render( 'templates/attendee_quick_edit.ejs', {attendee:{name:newAttendeeName, mail:newAttendeeEmail}} ) ), 
+									text: $('<div></div>').html( DataLayer.render( path+'templates/attendee_quick_edit.ejs', {attendee:{name:newAttendeeName, mail:newAttendeeEmail}} ) ), 
 									title: {
 										text:'Detalhes do participante', 
@@ -612,5 +615,5 @@
 							user[0].id =  DataLayer.put('participant', {user: user[0].id, isExternal: isExternal});
 							blkAddAtendee.find('dd.attendee-list ul.attendee-list').append(
-								DataLayer.render('templates/participants_add_itemlist.ejs', user)
+								DataLayer.render(path+'templates/participants_add_itemlist.ejs', user)
 							)
 							.find('.button.close').addClass('small').button({text:false, icons:{primary:'ui-icon-close'}}).click(function() {
@@ -634,5 +637,5 @@
 						 
 						blkAddAtendee.find('dd.attendee-list ul.attendee-list').append(
-							DataLayer.render('templates/participants_add_itemlist.ejs', [{id:newAttendeeId, name: newAttendeeName, mail: newAttendeeEmail, isExternal: 1}])
+							DataLayer.render(path+'templates/participants_add_itemlist.ejs', [{id:newAttendeeId, name: newAttendeeName, mail: newAttendeeEmail, isExternal: 1}])
 						).find('.button.close').addClass('small').button({text:false, icons:{primary:'ui-icon-close'}}).click(function() {
 							DataLayer.remove('participant', $(this).parent().find('[type=checkbox]').val());
@@ -651,5 +654,5 @@
 							hide: false,
 							content: {
-								text: $('<div></div>').html( DataLayer.render( 'templates/attendee_quick_edit.ejs', {attendee:{name:newAttendeeName, mail:newAttendeeEmail}} ) ), 
+								text: $('<div></div>').html( DataLayer.render( path+'templates/attendee_quick_edit.ejs', {attendee:{name:newAttendeeName, mail:newAttendeeEmail}} ) ), 
 								title: {
 									text:'Detalhes do participante', 
@@ -700,5 +703,5 @@
 						result[i].enabled = (blkAddAtendee.find('dd.attendee-list ul.attendee-list label.mail[title="' +  result[i].mail + '"]').length) ? false : true;
 											
-					blkAddAtendee.find('ul.search-result-list').append(DataLayer.render( 'templates/participants_search_itemlist.ejs', result));
+					blkAddAtendee.find('ul.search-result-list').append(DataLayer.render( path+'templates/participants_search_itemlist.ejs', result));
 
 					blkAddAtendee.find('ul.search-result-list li').click(function(event, ui){
@@ -707,5 +710,5 @@
 							newAttendeeId = DataLayer.put('participant', {user: old_item.find('.id').html(), isExternal: 0});
 							blkAddAtendee.find('dd.attendee-list ul.attendee-list')
-							.append(DataLayer.render('templates/participants_add_itemlist.ejs', [{id: newAttendeeId, name: old_item.find('.name').html(), mail: old_item.find('.mail').html(), isExternal: 0}]))
+							.append(DataLayer.render(path+'templates/participants_add_itemlist.ejs', [{id: newAttendeeId, name: old_item.find('.name').html(), mail: old_item.find('.mail').html(), isExternal: 0}]))
 							.find('.button').addClass('small').button({text:false, icons: {primary:'ui-icon-close'}}).click(function () {
 								$(this).parent().remove();
@@ -765,5 +768,4 @@
 				}
 			});
-		});
 		UI.dialogs.addEvent.find(':input').change(function(event){
 			if (event.keyCode != '27' && event.keyCode != '13')
@@ -775,7 +777,4 @@
 		
 		UI.dialogs.addEvent.dialog('open');
-	});
-	
-	
 }
 
