diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-01-30 23:52:52 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-01-30 23:56:23 -0500 |
commit | 05664ee58924c39d641db83c63e44d4d7579b641 (patch) | |
tree | 634448e0f194b94cd590d427b6da75d05f93c870 /js/model | |
parent | 16001bd47e035475888f5bb1396a4a3d48a20084 (diff) |
Render package details on the client.
* js/routes.js: Add new route.
* js/controller/packageInfo.js: New file.
* js/view/packageInfo.js: New file.
* js/model/packages.js (guix.packages.PackagesByName): New function.
* js/view/ui.js (guix.ui.licenseList): New function.
* js/view/packages.js (guix.packages.view): Render package links as
Mithril URLs. Remove factorized inner 'renderLicese' function.
* guix-web/view/html.scm (javascripts): Add new JS files.
(view-package): Delete.
Diffstat (limited to 'js/model')
-rw-r--r-- | js/model/packages.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/model/packages.js b/js/model/packages.js index bea1280..39e6a8d 100644 --- a/js/model/packages.js +++ b/js/model/packages.js @@ -28,6 +28,13 @@ }); }; + packages.PackagesByName = function(name) { + return m.request({ + method: "GET", + url: "/package/".concat(name).concat(".json") + }); + }; + packages.Sorter = (function() { function Sorter(field, isDescending) { this.field = field; |