discourse/test/javascripts/models
Robin Ward ddf0db0338 Refactor notifications localStorage cache into adapter pattern.
Sometimes you want stale data right away, then refresh it async.
This adds `findStale` to the store for that case. If it returns
an object with `hasResults` you can get the `results` and display
them.

It also returns a `refresh()` method to freshen up the stale data.

To enable `localStorage` support for stale data, just include the
mixin `StaleLocalStorage` into an adapter for that model. This
commit includes a sample of doing that for `Notifications`.
2015-08-31 14:12:27 -04:00
..
badge-test.js.es6 Convert Badges / User Badges to ES6. 2015-08-19 12:09:10 -04:00
category-test.js.es6 FEATURE: add slug geneartion options 2015-05-05 18:08:30 +08:00
composer-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
email-log-test.js.es6 ES6: Convert all test files over 2014-08-06 17:51:03 -04:00
invite-test.js.es6 Add ES6 support to more files 2015-08-13 10:49:08 -04:00
model-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
nav-item-test.js.es6 Fixes issues with composer 2015-05-11 11:18:38 -04:00
post-stream-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
post-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
report-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
rest-model-test.js.es6 FIX: Return promises from async tests. 2015-05-11 11:30:14 -04:00
result-set-test.js.es6 Upgrade Notifications to fix deprecations and use store 2015-05-11 11:20:45 -04:00
session-test.js.es6 ES6ify some of the remaining files 2015-08-10 10:21:05 -04:00
site-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
staff-action-log-test.js.es6 ES6: Convert all test files over 2014-08-06 17:51:03 -04:00
store-test.js.es6 Refactor notifications localStorage cache into adapter pattern. 2015-08-31 14:12:27 -04:00
topic-details-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
topic-test.js.es6 FIX: emoji unescape 2015-08-26 21:37:57 -07:00
topic-tracking-state-test.js.es6 ES6: Convert all test files over 2014-08-06 17:51:03 -04:00
user-action-test.js.es6 ES6: Convert all test files over 2014-08-06 17:51:03 -04:00
user-badge-test.js.es6 Convert Badges / User Badges to ES6. 2015-08-19 12:09:10 -04:00
user-stream-test.js.es6 Remove ObjectController, Discouse Controllers + Presence 2015-08-13 10:49:08 -04:00
user-test.js.es6 FEATURE: Can specify a list of default_avatars urls. 2015-03-03 16:19:29 -05:00
version-check-test.js.es6 TRIVIAL: fix deprecations due to momentjs upgrade 2014-08-20 22:22:58 +02:00