From 2b2a203a04092dcce53c677b734c712c421af1d6 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 16 Apr 2012 19:07:21 +0200 Subject: [PATCH] [imp] completely removed store class bzr revid: nicolas.vanhoren@openerp.com-20120416170721-swgsf8pyeg7y8uf8 --- addons/point_of_sale/static/src/js/pos.js | 26 +---------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 1c60b69b59c..4e1747878d6 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -34,30 +34,6 @@ openerp.point_of_sale = function(db) { }; }; var _t = db.web._t; - - /* - Local store access. Read once from localStorage upon construction and persist on every change. - There should only be one store active at any given time to ensure data consistency. - */ - var Store = db.web.Class.extend({ - init: function() { - this.data = {}; - }, - get: function(key, _default) { - if (this.data[key] === undefined) { - var stored = localStorage['oe_pos_' + key]; - if (stored) - this.data[key] = JSON.parse(stored); - else - return _default; - } - return this.data[key]; - }, - set: function(key, value) { - this.data[key] = value; - localStorage['oe_pos_' + key] = JSON.stringify(value); - }, - }); var DAOInterface = { @@ -78,7 +54,7 @@ openerp.point_of_sale = function(db) { var Pos = Backbone.Model.extend({ initialize: function(session, attributes) { Backbone.Model.prototype.initialize.call(this, attributes); - this.store = new Store(); + this.dao = new LocalStorageDAO(); this.ready = $.Deferred(); this.flush_mutex = new $.Mutex(); this.build_tree = _.bind(this.build_tree, this);