Index: branches/2.5/prototype/modules/calendar/schedules.php
===================================================================
--- branches/2.5/prototype/modules/calendar/schedules.php	(revision 7990)
+++ branches/2.5/prototype/modules/calendar/schedules.php	(revision 8006)
@@ -113,9 +113,12 @@
     function normalizeEvents( &$result, $timezones ){
 
-        $myCalendarsT =  Controller::service('PostgreSQL')->execResultSql('SELECT calendar_id FROM calendar_signature WHERE user_uidnumber = \''.Config::me('uidNumber').'\' AND is_owner = \'1\' AND type = \'0\''); 
-        $myCalendars = array(); 
-        foreach($myCalendarsT as $v) 
-            $myCalendars[] = $v['calendar_id']; 
- 
+        $mySig = Controller::find(array('concept' => 'calendarSignature') , array('calendar') , array('filter' => array( 'AND' , array('=' , 'type' , '0' ) , array( '=' , 'user' ,Config::me('uidNumber') ) , array('=' , 'isOwner' , '0' )))); 
+ 
+        $signedCalendars = array(); 
+        foreach($mySig as $v) 
+        { 
+            $tmp = Controller::find(array('concept' => 'calendarToPermission') , array('acl' ,'owner') , array('filter' => array( 'AND' ,array( '=' , 'calendar' , $v['calendar'] ) , array( '=' , 'user' , Config::me('uidNumber')  ) ))); 
+            $signedCalendars[$v['calendar']] = $tmp[0]; 
+        } 
  
         $date = new DateTime('now', new DateTimeZone('UTC'));
@@ -162,16 +165,21 @@
             }
 
-            $attend = Controller::read(array('concept' => 'participant'), null, array('filter' => array('AND', array('=','schedulable',$v['id']), array('=','user', Config::me('uidNumber'))  )));
-
-            $result[$i]['unanswered'] = 0; 
+            $attend = (isset($signedCalendars[$result[$i]['calendar']])) ? 
+                Controller::read(array('concept' => 'participant'), null, array('filter' => array('AND', array('=','schedulable',$v['id']), array('=','user', $signedCalendars[$result[$i]['calendar']]['owner'] )  ))): 
+                Controller::read(array('concept' => 'participant'), null, array('filter' => array('AND', array('=','schedulable',$v['id']), array('=','user', Config::me('uidNumber'))  ))); 
+ 
+                $result[$i]['unanswered'] = 0; 
  
             if(count($attend) > 0 && !empty($attend)){
-                if(array_key_exists(0, $attend))
-                    $attend = $attend[0];
-
-                $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0;
- 
-                if($attend['status'] == STATUS_UNANSWERED && in_array($result[$i]['calendar'] , $myCalendars) ) 
-                    $result[$i]['unanswered'] = 1; 
+               if(array_key_exists(0, $attend)) 
+                  $attend = $attend[0]; 
+ 
+                if(isset($signedCalendars[$result[$i]['calendar']])) //Caso agenda compartilhada verificar tmb se tem compartilhamento de escrita 
+                    $result[$i]['editable'] = (strpos($signedCalendars[$result[$i]['calendar']]['acl'],"w") >=0  &&  (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ) ? 1 : 0; 
+                else 
+                   $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 
+ 
+                if($attend['status'] == STATUS_UNANSWERED && !isset($signedCalendars[$result[$i]['calendar']]) ) 
+                   $result[$i]['unanswered'] = 1; 
 
             }else{
Index: branches/2.5/prototype/modules/calendar/js/calendar.codecs.js
===================================================================
--- branches/2.5/prototype/modules/calendar/js/calendar.codecs.js	(revision 8004)
+++ branches/2.5/prototype/modules/calendar/js/calendar.codecs.js	(revision 8006)
@@ -1815,6 +1815,6 @@
 				
 				return DataLayer.merge({
-					editable: aclSignature.acl['write'] && !isRecurrence,
-					disableResizing : (((aclSignature.acl['busy'] && !aclSignature.acl['write']) || (!aclSignature.acl['write'] && aclSignature.acl['read'])) ? true : false),
+					editable: evt.editable,
+                        disableResizing : (((aclSignature.acl['busy'] && !aclSignature.acl['write']) || (!aclSignature.acl['write'] && aclSignature.acl['read'])) ? true : false),
 					disableDragging  : (((aclSignature.acl['busy'] && !aclSignature.acl['write']) || (!aclSignature.acl['write'] && aclSignature.acl['read'])) ? true: false),
 					className: mountClass(aclSignature.acl)
Index: branches/2.5/prototype/modules/calendar/js/init.js
===================================================================
--- branches/2.5/prototype/modules/calendar/js/init.js	(revision 8003)
+++ branches/2.5/prototype/modules/calendar/js/init.js	(revision 8006)
@@ -473,5 +473,5 @@
                 case 1:
                     if(evt.selectable){
-                        if(evt.isRepeat){
+                        if(evt.isRepeat && evt.editable ){
                             $.Zebra_Dialog(evt.title + ' é um evento com repetição.', {
                                 'type':     'question',
