mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
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)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
openerp.web_last_viewed_records = function(instance){
|
||||
var localStorage = {};
|
||||
if (typeof window.localStorage !== "undefined"){
|
||||
localStorage = window.localStorage;
|
||||
}
|
||||
|
||||
instance.web.ActionManager.include({
|
||||
last_viewed_history_var: 'odoo_last_viewed',
|
||||
last_viewed_history_size: 8,
|
||||
|
||||
Reference in New Issue
Block a user