Index: unk/expressoCalendar/inc/class.adapter.inc.php
===================================================================
--- /trunk/expressoCalendar/inc/class.adapter.inc.php	(revision 5341)
+++ 	(revision )
@@ -1,52 +1,0 @@
-<?php
-class adapter 
-{
-    function import_new_calendar($params)
-    {
-                include_once( $_SESSION['rootPath'].'/expressoMail1_2/inc/class.imap_functions.inc.php');
-                $objImap = new imap_functions();
-                $msg_number = $params['msg_number'];
-                $idx_file = $params['idx_file'];
-                $msg_part = $params['msg_part'];
-                $msg_folder = $params['msg_folder'];
-                $from_ajax = $params['from_ajax'];
-                $encoding = strtolower($params['encoding']);
-                $fileContent = "";
-                $cirus_delimiter = $params['cirus_delimiter'];
-                $expFolder = explode($cirus_delimiter, $msg_folder);
-
-  
-                require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php';
-                $attachmentObj = new attachment();
-                $attachmentObj->setStructureFromMail($msg_folder,$msg_number);
-                $fileContent = $attachmentObj->getAttachment($msg_part);
-                $info = $attachmentObj->getAttachmentInfo($msg_part);
-             
-    }
-     
-    function get_signatures($params)
-    {
-        require_once $_SESSION['rootPath'].'/prototype/app/controller.php';
-        
-        //$sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar'), array('filter' => array( '=' , 'user' , $_SESSION['phpgw_session']['account_id'])));
-        
-       $sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar'), array('filter' => array( '=' , 'user' , '1005')));
-       
-        ob_start();
-		print "\n";
-		print $name . ": ";
-                var_dump( $sig );
-                $output = ob_get_clean();
-                file_put_contents( "/tmp/prototype.log", $output , FILE_APPEND );
-	
-        foreach ($sig as $i => $v)
-        {
-          $cal =  Controller::read(array('concept' => 'calendar' , 'id' => $v['calendar'] ), array('name'));
-          $sig[$i]['cal_name'] = $cal['name'];
-        }
-        
-       return $sig;
-    }
-    
-}
-?>
Index: /trunk/prototype/modules/calendar/js/helpers.js
===================================================================
--- /trunk/prototype/modules/calendar/js/helpers.js	(revision 5341)
+++ /trunk/prototype/modules/calendar/js/helpers.js	(revision 5345)
@@ -1229,6 +1229,8 @@
 	switch (view){
 		case 'day':
+		case 'basicDay':
 			var date = new Date().add({days: page_index});
 			return (weekOfDay(date.getDay()))+", "+(date.toString('dd MMM yyyy'));
+		case 'agendaWeek':
 		case 'week':
 			var dateStart = new Date().moveToDayOfWeek(dayOfWeek(User.preferences.weekDefault));
@@ -1251,5 +1253,8 @@
 		$(currentView+' .events-list.events-list-win.active .list-events-paginator .fc-header-title').html('<h2>'+mountTitleList( parseInt($('[name = page_index]').val()),view)+'</h2>');
 		$(currentView+' .events-list.events-list-win.active .header-paginator .fc-header-right .fc-button').removeClass('fc-state-active')
-		$(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');
+		if(view == 'basicDay')
+			$(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').addClass('list-right');
 		$(currentView+' .header-paginator .fc-header-right .fc-button-agendaday').hover(
@@ -1362,6 +1367,8 @@
 function mountCriteriaList(view, page_index, calerdars_selecteds){
 	switch (view){
+		case 'basicDay':
 		case 'day':
 			return {filter: ['AND', ['IN', 'calendar',  calerdars_selecteds], ['=', 'rangeEnd', new Date().add({days: page_index}).toString("yyyy-MM-dd")]], criteria: {order: 'startTime'}}; 
+		case 'agendaWeek':
 		case 'week':
 			var dateStart = new Date().moveToDayOfWeek(dayOfWeek(User.preferences.weekDefault)); 
Index: /trunk/prototype/modules/calendar/index.php
===================================================================
--- /trunk/prototype/modules/calendar/index.php	(revision 5341)
+++ /trunk/prototype/modules/calendar/index.php	(revision 5345)
@@ -153,4 +153,7 @@
 			$tabs.tabs('select', '#' + ui.panel.id);
 		},
+		remove: function( event, ui ) {
+			$tabs.tabs('select', User.lastView);
+		},
 		show: function( event, ui ){
 			delete Calendar.currentViewKey;
@@ -165,11 +168,16 @@
 	$tabs.find( "span.ui-icon-close" ).live( "click", function() {
 		var index = $( "li", $tabs ).index( $( this ).parent() );
+		if($tabs.tabs('option' ,'selected') == index){
+			if($tabs.tabs("length") == 2 && User.lastView != 1)
+				$tabs.tabs( "select", 0);
+			$tabs.tabs( "select", User.lastView);
+		}
+		if($tabs.tabs('option' ,'selected') == 0 || $tabs.tabs('option' ,'selected') == 1)
+			User.lastView = $tabs.tabs('option' ,'selected');
 		if(index != -1)
-		  $tabs.tabs( "remove", index );
-		if($tabs.tabs("length") == 2 && User.lastView != 1)
-			$tabs.tabs( "select", 0);
-		$tabs.tabs( "select", User.lastView);
-		
-	});	
+		  $tabs.tabs( "remove", index );	
+			
+		
+		});	
 	$('.button.config-menu').button({
 	    icons: {
Index: /trunk/prototype/modules/calendar/templates/event_add.ejs
===================================================================
--- /trunk/prototype/modules/calendar/templates/event_add.ejs	(revision 5341)
+++ /trunk/prototype/modules/calendar/templates/event_add.ejs	(revision 5345)
@@ -60,5 +60,5 @@
 		<p class="input-group">
 			<label for="calendar_addevent_details_txtarea_description" class="for-textarea" >Descrição</label>
-			<textarea name="description" <%= (data.event.isOrganizer == 0) ? 'disabled="disabled"' : '' %> > <%= (data.event) ? data.event.description : '' %></textarea>
+			<textarea name="description" <%= (data.event.isOrganizer == 0) ? 'disabled="disabled"' : '' %> ><%=(data.event) ? data.event.description : '' %></textarea>
 		</p>
 
