Changeset 6412 for trunk/prototype/api/datalayer.js
- Timestamp:
- 06/04/12 16:56:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/api/datalayer.js
r6286 r6412 625 625 rollback: function( concept, ids ){ 626 626 627 var queue = this.prepareQ( 'current', concept, ids ); 628 629 ids = []; 630 631 for( var id in queue ) 632 { 633 this.put( concept, id, queue[id], false ); 634 635 ids[ ids.length ] = id; 627 if(concept){ 628 if(ids){ 629 ids = !$.isArray(ids) ? [ids] : ids; 630 for (var i in ids) 631 delete DataLayer.storage.cache[':diff'][concept][ids[i]]; 632 }else 633 delete DataLayer.storage.cache[':diff'][concept]; 634 }else{ 635 636 var queue = this.prepareQ( 'current', concept, ids ); 637 638 ids = []; 639 640 for( var id in queue ) 641 { 642 this.put( concept, id, queue[id], false ); 643 644 ids[ ids.length ] = id; 645 } 646 647 for(var link in ids) 648 delete DataLayer.storage.cache[':diff'][ids[link]]; 649 636 650 } 637 638 this.clearQ( concept, ( ids.length ? ids : false ) );639 640 this.broadcast( concept, 'revert' );641 642 651 }, 643 652
Note: See TracChangeset
for help on using the changeset viewer.