Browse Source

Check existence of a localStorage variable.

In browsers without localStorage variable links to viewed records are
stored only for current browser session (i.e. until user close browser tab)
pull/95/head
Ivan Yelizariev 10 years ago
parent
commit
97332bcd64
  1. 5
      web_last_viewed_records/static/src/js/main.js

5
web_last_viewed_records/static/src/js/main.js

@ -1,4 +1,9 @@
openerp.web_last_viewed_records = function(instance){ openerp.web_last_viewed_records = function(instance){
var localStorage = {};
if (typeof window.localStorage !== "undefined"){
localStorage = window.localStorage;
}
instance.web.ActionManager.include({ instance.web.ActionManager.include({
last_viewed_history_var: 'odoo_last_viewed', last_viewed_history_var: 'odoo_last_viewed',
last_viewed_history_size: 8, last_viewed_history_size: 8,

Loading…
Cancel
Save