Index: /trunk/prototype/services/iCal.php
===================================================================
--- /trunk/prototype/services/iCal.php	(revision 5835)
+++ /trunk/prototype/services/iCal.php	(revision 5863)
@@ -718,5 +718,5 @@
             /* Data de Inicio*/
                 $startTime = $component->getProperty( 'dtstart', false , true );
-         			
+
             /* Tiem zone do evento*/    
                if(isset($startTime['params']['TZID']))
@@ -734,7 +734,7 @@
                 elseif(isset($startTime['params']['TZID']) && !isset($startTime['value']['tz'])){/* Caso não tenha um tz na data mais exista um parametro TZID deve ser aplicado o timezone do TZID a data */
                     $schedulable['startTime'] = self::date2timestamp($startTime['value']) - self::_getTzOffset('UTC',$startTime['params']['TZID'],'@'.self::date2timestamp($startTime['value'])) . '000';      
-					$schedulable['allDay'] = 0;
-				}
-				else
+		    $schedulable['allDay'] = 0;
+		}
+		else
                 {
                     $schedulable['startTime'] = self::date2timestamp($startTime['value']) . '000';
Index: /trunk/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5850)
+++ /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5863)
@@ -108,12 +108,4 @@
     public function findSchedulable( &$uri , &$params , &$criteria , $original )
    {
-	
-	ob_start();
-	print_r($criteria);
-	
-	$output = ob_get_clean();
-	file_put_contents( "/tmp/acoutinho.log",  $output , FILE_APPEND);
-	
-	
        if(isset($criteria['filter'][3][1]) && $criteria['filter'][3][1] == 'calendar')
        {
@@ -787,5 +779,5 @@
 	$permission = Controller::read($uri, array('user','calendar'));
 
-	$calendarSignature = Controller::find( array( 'concept' => 'calendarSignature' ) , array('id') ,array( 'filter' => array('AND', array('=','calendar', $permission['calendar']), array('=','user',$permission['user'])))); 
+	$calendarSignature = Controller::find( array( 'concept' => 'calendarSignature' ) , array('id') ,array( 'filter' => array('AND', array('=','calendar', $permission['calendar']), array('=','user',$permission['user']), array('=','isOwner','0')))); 
 
 	if($calendarSignature)
@@ -820,10 +812,20 @@
 
     public function createDefaultSignature( &$uri , &$result , &$criteria , $original ){
-    		     
-    //Caso uma busca não retorne nenhum resultado e foi buscado pelas assinaturas do usuario logado apenas
-    if(count($result) <= 0 && 
-            ( $original['criteria']['filter'][0] == '=' &&
-              $original['criteria']['filter'][1] == 'user' &&
-              $original['criteria']['filter'][2] == $_SESSION['phpgw_session']['account_id']
+
+	//Caso uma busca não retorne nenhum resultado e foi buscado pelas assinaturas do usuario logado apenas
+	$isValidSignature = false;
+		
+	//Veirifica pois o usuário pode ter varias assinaturas mas não ser dona de nenhuma
+	if(count($result) > 0){
+	    foreach($result as $key){	
+		if($key['isOwner'] != 0)
+		    $isValidSignature = true;
+	    }
+	}
+
+    if(!$isValidSignature && 
+            ( $original['criteria']['filter'][1][0] == '=' &&
+              $original['criteria']['filter'][1][1] == 'user' &&
+              $original['criteria']['filter'][1][2] == $_SESSION['phpgw_session']['account_id']
             ))
     {        
Index: /trunk/prototype/modules/calendar/export.php
===================================================================
--- /trunk/prototype/modules/calendar/export.php	(revision 5715)
+++ /trunk/prototype/modules/calendar/export.php	(revision 5863)
@@ -27,9 +27,10 @@
     $eventLinks = Controller::find(array('concept' => 'calendarToSchedulable') , array('schedulable') , array('filter' => array( '=' , 'calendar' , $params['calendar'])));
     $calendar = Controller::read(array('concept' => 'calendar' , 'id' => $params['calendar']));
+
     $eventsIds = array();
     foreach ($eventLinks as &$eventLink)
        $eventsIds[] = $eventLink['schedulable'];
 
-    $events = Controller::find(array('concept' => 'schedulable') , false , array('filter' => array('IN','id',$eventsIds) , 'deepness' => '2' ));	
+    $events = Controller::find(array('concept' => 'schedulable') , false , array('filter' => array('IN','id',$eventsIds) , 'deepness' => '2', 'timezones' => array($calendar['id'] => $calendar['timezone']) ));	
     $ics = Controller::format( array( 'service' => 'iCal' ) , $events , array('defaultTZI' => $calendar['timezone']) );
 
Index: /trunk/prototype/modules/calendar/css/layout.css
===================================================================
--- /trunk/prototype/modules/calendar/css/layout.css	(revision 5835)
+++ /trunk/prototype/modules/calendar/css/layout.css	(revision 5863)
@@ -449,10 +449,22 @@
 }
 
+.shared-calendar .user-list li.user-list{
+	height: 17px;
+	overflow: hidden;
+}
+
+.shared-calendar dd.user-list{ overflow: auto;}
+
 .user-list .hover-user { background-color: #DFEFFC;}
+
+.shared-calendar ul.search-result-list{
+    overflow-x: hidden !important;
+    overflow-y: auto !important; 
+}
 
 .user-acls-shared-calendar{
 	width: 130px;
 	float: right;
-	margin-right: 20px;
+	margin-right: 2px;
 }
 
Index: /trunk/prototype/modules/calendar/js/calendar.contentMenu.js
===================================================================
--- /trunk/prototype/modules/calendar/js/calendar.contentMenu.js	(revision 5746)
+++ /trunk/prototype/modules/calendar/js/calendar.contentMenu.js	(revision 5863)
@@ -24,8 +24,10 @@
                 var schedulable = DataLayer.get('schedulable', idEvent);
                 
+		var isRecurrence = DataLayer.get('repeat', schedulable.repeat).frequency;
+		
 		var template = DataLayer.render( 'templates/menu_context_event.ejs', {event: schedulable.id ,
                     top: (event.clientY - 135), left: (event.clientX - 445), 
                     signature: Calendar.signatureOf[schedulable.calendar],
-                    calendars: Calendar.calendars, isRecurrence: (!!parseInt(schedulable.repeat)),
+                    calendars: Calendar.calendars, isRecurrence: isRecurrence == 'none' ? false : true,
                     idRecurrence: idRecurrence
                 });
Index: /trunk/prototype/modules/calendar/js/calendar.shared.js
===================================================================
--- /trunk/prototype/modules/calendar/js/calendar.shared.js	(revision 5812)
+++ /trunk/prototype/modules/calendar/js/calendar.shared.js	(revision 5863)
@@ -73,5 +73,8 @@
 				}else{
 					//TODO - remover quando for implementado remove com criteria
-					var permission = DataLayer.get('calendarPermission', {filter: [AND, ['=', 'calendar', calendarId], ['=', 'user', '0']]}, true);
+					var permission = DataLayer.get('calendarToPermission', {filter: ['AND', ['=', 'calendar', calendarId], ['=', 'user', '0']]}, true);
+					if($.isArray(permission))
+						permission = permission[0];
+
 					DataLayer.remove('calendarToPermission', permission.id);
 				}
Index: /trunk/prototype/modules/calendar/js/helpers.js
===================================================================
--- /trunk/prototype/modules/calendar/js/helpers.js	(revision 5835)
+++ /trunk/prototype/modules/calendar/js/helpers.js	(revision 5863)
@@ -1927,10 +1927,9 @@
 function mountTitleList(page_index ,view){
 	switch (view){
-		case 'day':
+		case 'agendaDay':
 		case 'basicDay':
 			var date = new Date().add({days: page_index});
 			return (dateCalendar.dayNames[date.getDay()])+", "+(date.toString('dd MMM yyyy'));
 		case 'agendaWeek':
-		case 'week':
 			var dateStart = new Date().moveToDayOfWeek(dateCalendar.dayOfWeek[User.preferences.weekStart]);
 			dateStart.add({days: (7 * page_index)});
@@ -1953,7 +1952,7 @@
 		$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button').removeClass('fc-state-active')
 		if(view == 'basicDay')
-			$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button-agendaday').addClass('fc-state-active');
+			$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button-agendaDay').addClass('fc-state-active');
 		else
-			$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button-'+((view == 'day' || view == 'week') ? 'agenda'+view : view )).addClass('fc-state-active');
+			$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button-'+view).addClass('fc-state-active');
 		$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right').addClass('list-right');
 		
@@ -1970,5 +1969,5 @@
 				var goView = $(this).attr('class');
 				if(goView.indexOf('agendaDay') > 0)
-					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'day');
+					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'agendaDay');
 				else if(goView.indexOf('month') > 0)
 					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'month');
@@ -1976,5 +1975,5 @@
 					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'year');
 				else if(goView.indexOf('agendaWeek') > 0)
-					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'week');
+					pageselectCallback($(currentView+' [name = keyword]').val(), 0, '', 'agendaWeek');
 
 			});
@@ -2029,10 +2028,9 @@
 	switch (view){
 		case 'basicDay':
-		case 'day':
+		case 'agendaDay':
                         rangeStart = new Date().add({days: page_index}).getTime();
                         rangeEnd = rangeStart;
                          break;
 		case 'agendaWeek':
-		case 'week':
 			var dateStart = new Date().moveToDayOfWeek(dateCalendar.dayOfWeek[User.preferences.weekStart]); 
 			var dateEnd = new Date().moveToDayOfWeek(dateCalendar.dayOfWeek[User.preferences.weekStart]); 
@@ -2166,4 +2164,9 @@
         UI.dialogs.importCalendar.find(".menu-import-event")        
 	    .children(".import").click(function(data){
+			$('.import-event-form fieldset.import-calendar', UI.dialogs.importCalendar).append(
+			    '<input type="hidden" name="params[calendar_timezone]" value="'+  
+			    Calendar.signatureOf[$('.import-event-form option:selected').val()].calendar.timezone
+			    +'"/>')
+
 			$('.import-event-form', UI.dialogs.importCalendar).submit();			
 			UI.dialogs.importCalendar.dialog("close");
Index: /trunk/prototype/modules/calendar/js/init.js
===================================================================
--- /trunk/prototype/modules/calendar/js/init.js	(revision 5752)
+++ /trunk/prototype/modules/calendar/js/init.js	(revision 5863)
@@ -1,3 +1,6 @@
 $(document).ready(function() {
+	//Remove o icone de configuraçõe padrão antigo do expresso
+	$('#sideboxdragarea').addClass('hidden');
+
 	refresh_calendars();
 	$tabs = $('#tabs').tabs({
Index: /trunk/prototype/modules/calendar/templates/shared_calendar.ejs
===================================================================
--- /trunk/prototype/modules/calendar/templates/shared_calendar.ejs	(revision 5592)
+++ /trunk/prototype/modules/calendar/templates/shared_calendar.ejs	(revision 5863)
@@ -58,7 +58,5 @@
 						
 					</fieldset>
-					<ul class="search-result-list ui-corner-all">
-
-					</ul>
+					<ul class="search-result-list"></ul>
 				</fieldset>
 			</dd>
Index: /trunk/prototype/modules/calendar/templates/event_list.ejs
===================================================================
--- /trunk/prototype/modules/calendar/templates/event_list.ejs	(revision 5835)
+++ /trunk/prototype/modules/calendar/templates/event_list.ejs	(revision 5863)
@@ -132,8 +132,8 @@
 									<span class="large" ><%= _event.description %></span>
 								</p>
-								<p class="input-group">
+								<!--<p class="input-group">
 									<label>Privacidade</label>
 									<span><%= _event.privacy %></span>
-								</p>
+								</p>-->
 								<p class="input-group">
 									<label>Organizador</label>
Index: /trunk/prototype/modules/calendar/templates/user_shared_add_itemlist.ejs
===================================================================
--- /trunk/prototype/modules/calendar/templates/user_shared_add_itemlist.ejs	(revision 5812)
+++ /trunk/prototype/modules/calendar/templates/user_shared_add_itemlist.ejs	(revision 5863)
@@ -6,5 +6,5 @@
 			</div>
 			
-			<input type="checkbox" name="idPermission" value="<%=data[0].idPermission%>">
+			<input type="checkbox" class="hidden" name="idPermission" value="<%=data[0].idPermission%>">
 			<input type="hidden" name="calendar[]" value="<%=data[0].id%>">
 			<input type="hidden" name="type[]" value="<%=data[0].type%>">
@@ -19,7 +19,6 @@
 					<a class="button close new">Remover</a>
 			</div>
-		
+
 		<input type="checkbox" value="<%=data[0].current ? data[0].idPermission : data[0].id%>">
-		
 		<input type="hidden" name="user[]" value="<%=data[0].id%>">
 		<input type="hidden" name="attendeeAcl[]" value="<%=data[0].aclValue%>">
