diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-01-30 13:54:41 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-01-30 13:54:41 -0500 |
commit | b8ee5e4fc44bf8a37d3a8e47bc32bfe56f058aba (patch) | |
tree | e6f2ef33d1ed5b22417b8be68840fb29b79d5423 /js/controller | |
parent | 2589fac3c5c8d1df880765d7383d0b343339f5cc (diff) |
js: Fix display when there are 0 search results
* js/controller/packages.js (guix.packages.packages): Default to empty
array.
* js/model/packages.js (guix.packages.Pager.currentPage): Always return
an array
* js/view/packages.js (guix.packages.view): Show spinner when there are
0 packages loaded from the server, not when there are 0 pages of
results.
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/packages.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/controller/packages.js b/js/controller/packages.js index d9e0839..b1348e9 100644 --- a/js/controller/packages.js +++ b/js/controller/packages.js @@ -51,8 +51,10 @@ this.pager = m.prop(Pager([])); this.phase = m.prop(packages.PHASE_NONE); this.selectedPackage = m.prop(null); + this.packages = m.prop([]); - this.packages = packages.Packages() + packages.Packages() + .then(this.packages) .then(function(packages) { // All packages are visible initially self.pager(Pager(packages)); |