mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 00:35:56 +00:00
rework dojo singleton modules to better work with phpstorm completion (ugh) - declare() is not needed there anyway
remove event.observe from login form (not needed) load pluginhost via amd
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
'use strict'
|
||||
/* global __, ngettext */
|
||||
define(["dojo/_base/declare"], function (declare) {
|
||||
return declare("fox.ArticleCache", null, {
|
||||
ArticleCache = {
|
||||
has_storage: 'sessionStorage' in window && window['sessionStorage'] !== null,
|
||||
set: function(id, obj) {
|
||||
set: function (id, obj) {
|
||||
if (this.has_storage)
|
||||
try {
|
||||
sessionStorage["article:" + id] = obj;
|
||||
@@ -11,17 +11,19 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
sessionStorage.clear();
|
||||
}
|
||||
},
|
||||
get: function(id) {
|
||||
get: function (id) {
|
||||
if (this.has_storage)
|
||||
return sessionStorage["article:" + id];
|
||||
},
|
||||
clear: function() {
|
||||
clear: function () {
|
||||
if (this.has_storage)
|
||||
sessionStorage.clear();
|
||||
},
|
||||
del: function(id) {
|
||||
del: function (id) {
|
||||
if (this.has_storage)
|
||||
sessionStorage.removeItem("article:" + id);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return ArticleCache;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user