Changeset 5577


Ignore:
Timestamp:
02/28/12 14:41:58 (12 years ago)
Author:
adriano
Message:

Ticket #2486 - implementado o salvamento de novos tipos de sinalizadores na interface de sinalizacao de mensagens

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/mail/js/followupflag.js

    r5576 r5577  
    134134                if (followupflagId == 'custom') { 
    135135                        DataLayer.put('followupflag', {name:winElement.find('[name="name"] option:selected').text(), uid:User.me.id}); 
    136                         DataLayer.commit(false, false, function(data){ 
    137                                 followupflags = DataLayer.get('followupflag',{criteria:{order: 'id'}}, true);            
    138                                 followupflagId = followupflags[followupflags.length - 1].id; 
    139                                 winElement.find('[name="name"] option[value="custom"]').val(followupflagId); 
    140                         }); 
     136                        DataLayer.commit(); 
     137                         
     138                        followupflags = DataLayer.get('followupflag',{criteria:{order: 'id'}}, true);            
     139                        followupflagId = followupflags[followupflags.length - 1].id; 
     140                        winElement.find('[name="name"] option[value="custom"]').val(followupflagId); 
    141141                } 
    142142                 
     
    207207                        winElement.find('[name="followupflagId"]').val(id); 
    208208                        winElement.find('.menu-configure-followupflag .save').button("option", "disabled", true); 
     209                        winElement.find('.menu-configure-followupflag .delete').button("option", "disabled", false); 
    209210                }); 
    210211                 
     
    259260                winElement.dialog("close"); 
    260261        }); 
    261  
    262                                  
    263         if(!winElement.find('[name="followupflagId"]').val()) 
    264                 winElement.find('.menu-configure-followupflag .delete').button("option", "disabled", true); 
    265                                  
     262         
    266263        /** 
    267264         * Se houver mudança, habilita o botão "Save" 
     
    269266        winElement.find(':input').change(function(event){ 
    270267                if (event.keyCode != '27' && event.keyCode != '13') 
    271                         $(this).button("option", "disabled", true); 
     268                        winElement.find('.menu-configure-followupflag .save').button("option", "disabled", false); 
    272269        }).keydown(function(event){ 
    273270                if (event.keyCode != '27' && event.keyCode != '13') 
    274                         $(this).button("option", "disabled", true); 
     271                        winElement.find('.menu-configure-followupflag .save').button("option", "disabled", false); 
    275272        });      
    276273         
Note: See TracChangeset for help on using the changeset viewer.