Changeset 7719


Ignore:
Timestamp:
01/09/13 08:04:22 (11 years ago)
Author:
gustavo
Message:

Ticket #3275 - Erro apos utilizar o recurso Buscar na caixa de entrada

Location:
trunk/prototype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/filters/filters.js

    r7717 r7719  
    198198 
    199199date2Time = function (timestamp) { 
    200         var date = new Date(); 
    201         if( typeof timestamp === "string" ) 
    202             timestamp = parseInt( timestamp, 10 ); 
    203         if ((date.getTime() - timestamp) < (24*60*60*1000)) { 
    204                 return '<span class="timable" title="'+timestamp+'"> </span>'; 
    205         } else { 
    206                 date = new Date(timestamp); 
    207                 var b = date.toISOString().split("T")[0].split("-"); 
    208                 var c = b[2] + "/" + b[1] + "/" + b[0]; 
    209                 return '<span class="datable">' + c + '</span>'; 
    210         } 
     200    var date = new Date(); 
     201    if( typeof timestamp === "string" ) 
     202        timestamp = parseInt( timestamp, 10 ); 
     203    if ((date.getTime() - timestamp) < (24*60*60*1000)) { 
     204        return '<span class="timable" title="'+timestamp+'"> </span>'; 
     205    } else { 
     206        date = new Date(timestamp); 
     207        var b = date.toISOString().split("T")[0].split("-"); 
     208        var c = b[2] + "/" + b[1] + "/" + b[0]; 
     209        return '<span class="datable">' + c + '</span>'; 
     210    } 
    211211}; 
    212212 
     
    515515 
    516516        var data = DataLayer.get( 'message', { filter: criterias_, criteria: { properties: { context: { folder: 'INBOX' } } } }, true ); 
     517        if(DataLayer.criterias['message:jqGrid']){ 
     518                delete DataLayer.criterias['message:jqGrid'];    
     519        } 
    517520 
    518521        DataLayer.register( 'criterias', 'message:jqGrid', function( crit ){ 
     
    564567                height:200, 
    565568                loadComplete: function(data) { 
    566           //                            // aplica o contador 
    567           //                            jQuery('.timable').each(function (i) { 
    568           //                                    jQuery(this).countdown({ 
    569           //                                            since: new Date(parseInt(this.title)), 
    570           //                                            significant: 1, 
    571           //                                            layout: 'h&aacute; {d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}', 
    572           //                                            description: ' atr&aacute;s' 
    573           //                                    }); 
    574           //                            }); 
     569                        // aplica o contador 
     570                        jQuery('.timable').each(function (i) { 
     571                                jQuery(this).countdown({ 
     572                                        since: new Date(parseInt(this.title)), 
     573                                        significant: 1, 
     574                                        layout: 'h&aacute; {d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}', 
     575                                        description: ' atr&aacute;s' 
     576                                }); 
     577                        }); 
    575578                }, 
    576579                onSelectRow: function (id, selected) { 
  • trunk/prototype/services/ImapServiceAdapter.php

    r7712 r7719  
    212212                                //return var_export($result); 
    213213 
    214                                 $response = array( "page" => $page, "total" => $total_pages, "records" => $count ); 
     214                                if($filter){ 
     215                                        $total_pages = count($filter[2]) > 0 ? ceil( count($filter[2])/$limit ) : 0; 
     216                                        $response = array( "page" => $page, "total" => $total_pages, "records" =>  count($filter[2]) );  
     217                                }else{ 
     218                                        $response = array( "page" => $page, "total" =>  $total_pages, "records" =>  $count );    
     219                                } 
    215220 
    216221                                for ($i=0; $i<count($result); ++$i) 
Note: See TracChangeset for help on using the changeset viewer.