Author: jmorliaguet
Date: Wed Feb 15 23:20:14 2006
New Revision: 2388

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- a queue size can be specified



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Wed Feb 15 
23:20:14 2006
@@ -884,13 +884,19 @@
   writeTransaction: function(data) {
     var access = this.model.def.storage.access;
     if (access) {
+      var size = access.size;
       switch (access.type) {
         case 'queue': {
-          this._queue.push(data[access.signature]);
+          if (this._queue.length < size || size == null) {
+            this._queue.push(data[access.signature]);
+          }
           break;
         }
         case 'stack': {
           this._queue.unshift(data[access.signature]);
+          if (size && size > 0) {
+            this._queue = this._queue.slice(0, size);
+          }
           break;
         }
       }
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to