Ignore:
Timestamp:
09/21/12 10:11:36 (12 years ago)
Author:
gustavo
Message:

Ticket #0000 - Criado novo modulo para o desenvolvimento do novo ExpressoMail?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/newExpressoMail/prototype/modules/newMail/js/formatters.js

    r7210 r7265  
    4343        } else { 
    4444                date = new Date(timestamp); 
    45                 var b = date.toString().split("T")[0].split("-"); 
    46                 var c = b[2] + "/" + b[1] + "/" + b[0]; 
    47                 return '<span class="datable">' + c + '</span>'; 
     45                var b = date.toString("dd/MM/yyyy"); 
     46                return '<span class="datable">' + b + '</span>'; 
    4847        } 
    4948} 
     49 
     50subjectFormatter = function(subject){ 
     51    var formatted = subject ? 
     52        (subject.length > 40 ? subject.substring(0, 37)+"..." : subject) : 
     53        "(Rascunho)"; 
     54    return '<span>' + formatted + '</span>'; 
     55} 
     56 
     57flags2Class = function(cellvalue, options, rowObject) { 
     58    var classes = ''; 
     59    cellvalue = cellvalue.split(','); 
     60    cell = { 
     61        Unseen: parseInt(cellvalue[0])  ? 'Unseen' : 'Seen', 
     62        Answered: parseInt(cellvalue[1]) ? 'Answered' : (parseInt(cellvalue[2]) ? 'Forwarded' : ''), 
     63        Flagged: parseInt(cellvalue[3]) ? 'Flagged' : '', 
     64        Recent: parseInt(cellvalue[4])  ? 'Recent' : '', 
     65        Draft: parseInt(cellvalue[5]) ? 'Draft' : '' 
     66    }; 
     67    for(var flag in cell){ 
     68        classes += '<span class="flags '+ (cell[flag]).toLowerCase() + '"' + (cell[flag] != "" ? 'title="'+ cell[flag]+'"' : '')+'> </span>'; 
     69    } 
     70 
     71    // REFAZER LABELS E ACOMPANHAMENTO 
     72    /*if(rowObject.labels){ 
     73        var titles = []; 
     74        var count = 0; 
     75        for(i in rowObject.labels){ 
     76            titles[count] = " "+rowObject.labels[i].name; 
     77            count++; 
     78        } 
     79        titles = titles.join(); 
     80        classes += '<span class="flags labeled" title="'+titles+'"> </span>'; 
     81    }else{ 
     82        classes += '<span class="flags"> </span>'; 
     83    } 
     84 
     85    if(rowObject.followupflagged){ 
     86        if(rowObject.followupflagged.followupflag.id < 7){ 
     87            var nameFollowupflag = get_lang(rowObject.followupflagged.followupflag.name); 
     88        }else{ 
     89            var nameFollowupflag = rowObject.followupflagged.followupflag.name; 
     90        } 
     91        if(rowObject.followupflagged.isDone == 1){ 
     92            classes += '<span class="flags followupflagged" title="'+nameFollowupflag+'" style="background:'+rowObject.followupflagged.backgroundColor+';"><img style=" margin-left:-3px;" src="../prototype/modules/mail/img/flagChecked.png"></span>'; 
     93        }else{ 
     94            classes += '<span class="flags followupflagged" title="'+nameFollowupflag+'" style="background:'+rowObject.followupflagged.backgroundColor+';"><img src="../prototype/modules/mail/img/flagEditor.png"></span>'; 
     95        } 
     96 
     97    }*/ 
     98 
     99    return classes; 
     100} 
Note: See TracChangeset for help on using the changeset viewer.