Changeset 7719 for trunk/prototype/modules/filters
- Timestamp:
- 01/09/13 08:04:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/filters/filters.js
r7717 r7719 198 198 199 199 date2Time = function (timestamp) { 200 201 202 203 204 205 206 207 208 209 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 } 211 211 }; 212 212 … … 515 515 516 516 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 } 517 520 518 521 DataLayer.register( 'criterias', 'message:jqGrid', function( crit ){ … … 564 567 height:200, 565 568 loadComplete: function(data) { 566 //// aplica o contador567 //jQuery('.timable').each(function (i) {568 //jQuery(this).countdown({569 //since: new Date(parseInt(this.title)),570 //significant: 1,571 //layout: 'há {d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}',572 //description: ' atrá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á {d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}', 575 description: ' atrás' 576 }); 577 }); 575 578 }, 576 579 onSelectRow: function (id, selected) {
Note: See TracChangeset
for help on using the changeset viewer.