Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/interceptors/DBMapping.php	(revision 6797)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/interceptors/DBMapping.php	(revision 6832)
@@ -925,5 +925,50 @@
     }
 
+
+     public function createDefaultGroup(&$uri, &$result, &$criteria, $original) {
+        $existDefaultGroup = false;
+
+        foreach($result as $v){
+            if($v['type'] == 1 && $v['calendar']['type'] == 1)
+                $existDefaultGroup = true;
+        }
+
+        if(!$existDefaultGroup){
+
+            $cal = array('name' => 'Sem grupo',
+                'description' => 'Sem grupo',
+                'timezone' => (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
+                'dtstamp' => time() . '000',
+                'type' => '1'
+            );
+
+            $calCreated = Controller::create(array('concept' => 'calendar'), $cal);
+
+            $sig = array('user' => $_SESSION['wallet']['user']['uidNumber'],
+                'calendar' => $calCreated['id'],
+                'isOwner' => '1',
+                'dtstamp' => time() . '000',
+                'fontColor' => 'FFFFFF',
+                'backgroundColor' => '3366CC',
+                'borderColor' => '3366CC',
+                'type' => '1'
+            );
+
+            $sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig);
+            $sigCreated = Controller::read(array('concept' => 'calendarSignature', 'id' => $sigCreated['id']), false, array('deepness' => 2 ));
+
+            array_push($result, $sigCreated);
+
+
+        }
+
+     }
+
     public function createDefaultSignature(&$uri, &$result, &$criteria, $original) {
+
+    if(count($result) == 0 && isset($criteria['filter'][3]) && isset($criteria['filter'][3]['isRecursion'])){
+        throw new Exception('It was not possible to find to calendar!');
+        return false;
+    }
 
 	//Caso uma busca não retorne nenhum resultado e foi buscado pelas assinaturas do usuario logado apenas
@@ -933,6 +978,7 @@
 	if (count($result) > 0) {
 	    foreach ($result as $value) {
-		if (isset($value['isOwner']) && $value['isOwner'] != 0)
-		    $isValidSignature = true;
+    		if (isset($value['isOwner']) && $value['isOwner'] != 0)
+    		    $isValidSignature = true;
+
 	    }
 	}
@@ -945,64 +991,71 @@
 
 	    if (Config::module('useCaldav', 'expressoCalendar')) {
-		require_once ROOTPATH . '/modules/calendar/interceptors/DAViCalAdapter.php';
-
-		$calendario = DAViCalAdapter::findCalendars();
+    		require_once ROOTPATH . '/modules/calendar/interceptors/DAViCalAdapter.php';
+    		$calendario = DAViCalAdapter::findCalendars();
 	    }
 
 	    if (Config::module('useCaldav', 'expressoCalendar') && is_array($calendario) && count($calendario) > 0) {
-		foreach ($calendario as $i => $v) {
-
-		    $urlA = explode('/', $v->url);
-		    $name = isset($v->displayname) ? $v->displayname : $urlA[(count($urlA) - 2)];
-		    $cal = array('name' => $name,
-			'description' => isset($v->description) ? $v->description : $name,
-			'timezone' => isset($v->timezone) ? $v->timezone : (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
-			'dtstamp' => time() . '000',
-			'location' => $urlA[(count($urlA) - 3)] . '/' . $urlA[(count($urlA) - 2)]
-		    );
-
-		    $calCreated = Controller::create(array('concept' => 'calendar'), $cal);
-
-
-
-		    $sig = array('user' => $_SESSION['wallet']['user']['uidNumber'],
-			'calendar' => $calCreated['id'],
-			'isOwner' => '1',
-			'dtstamp' => time() . '000',
-			'fontColor' => 'FFFFFF',
-			'backgroundColor' => '3366CC',
-			'borderColor' => '3366CC',
-		    );
-
-		    $sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig);
-
-
-		    DAViCalAdapter::importCollection($v->url, $calCreated['id']);
-		}
+    		foreach ($calendario as $i => $v) {
+
+    		    $urlA = explode('/', $v->url);
+    		    $name = isset($v->displayname) ? $v->displayname : $urlA[(count($urlA) - 2)];
+    		    $cal = array('name' => $name,
+    			'description' => isset($v->description) ? $v->description : $name,
+    			'timezone' => isset($v->timezone) ? $v->timezone : (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
+    			'dtstamp' => time() . '000',
+    			'location' => $urlA[(count($urlA) - 3)] . '/' . $urlA[(count($urlA) - 2)]
+    		    );
+
+    		    $calCreated = Controller::create(array('concept' => 'calendar'), $cal);
+
+                if(!$calCreated){
+                    throw new Exception('Error to create calendar');
+                    return false;
+                }
+
+    		    $sig = array('user' => $_SESSION['wallet']['user']['uidNumber'],
+    			'calendar' => $calCreated['id'],
+    			'isOwner' => '1',
+    			'dtstamp' => time() . '000',
+    			'fontColor' => 'FFFFFF',
+    			'backgroundColor' => '3366CC',
+    			'borderColor' => '3366CC',
+    		    );
+
+    		    $sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig);
+
+                if(!$sigCreated){
+                    throw new Exception('Error to create signature');
+                    return false;
+                }
+
+    		    DAViCalAdapter::importCollection($v->url, $calCreated['id']);
+    		}
 	    } else {
-		//Criaremos uma agenda padrão
-		$cal = array('name' => 'Calendario',
-		    'description' => 'Calendario Padrão',
-		    'timezone' => (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
-		    'dtstamp' => time() . '000'
-		);
-
-		$calCreated = Controller::create(array('concept' => 'calendar'), $cal);
-
-		$sig = array('user' => $_SESSION['wallet']['user']['uidNumber'],
-		    'calendar' => $calCreated['id'],
-		    'isOwner' => '1',
-		    'dtstamp' => time() . '000',
-		    'fontColor' => 'FFFFFF',
-		    'backgroundColor' => '3366CC',
-		    'borderColor' => '3366CC',
-		);
-
-		$sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig);
-	    }
-
-	    $result = Controller::find($original['URI'], $original['properties'] ? $original['properties'] : null, $original['criteria']);
+    		//Criaremos uma agenda padrão
+    		$cal = array('name' => 'Calendario',
+    		    'description' => 'Calendario Padrão',
+    		    'timezone' => (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
+    		    'dtstamp' => time() . '000'
+    		);
+
+    		$calCreated = Controller::create(array('concept' => 'calendar'), $cal);
+
+    		$sig = array('user' => $_SESSION['wallet']['user']['uidNumber'],
+    		    'calendar' => $calCreated['id'],
+    		    'isOwner' => '1',
+    		    'dtstamp' => time() . '000',
+    		    'fontColor' => 'FFFFFF',
+    		    'backgroundColor' => '3366CC',
+    		    'borderColor' => '3366CC',
+    		);
+
+    		$sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig);
+        }
+    
+        $original['criteria']['filter'][] = array('isRecursion' => true);
+        $result = Controller::find($original['URI'], $original['properties'] ? $original['properties'] : null, $original['criteria']);
 	    return false;
-	}
+    	}
     }
 
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js	(revision 6820)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js	(revision 6832)
@@ -241,5 +241,6 @@
     		    			allDay: '1'
     		    		});
-    			    	//DataLayer.commit();
+    			    	
+                        $(componente).qtip('destroy');
 
                     });
@@ -267,5 +268,5 @@
     			    });
     							
-    			    $('.button').button();
+    			    $('.qtip-active .button').button();
     			
     			$('div.qtip.qtip-blue.qtip-active').addClass('new-task');
