summaryrefslogtreecommitdiff
path: root/js/model
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-01-30 23:52:52 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-01-30 23:56:23 -0500
commit05664ee58924c39d641db83c63e44d4d7579b641 (patch)
tree634448e0f194b94cd590d427b6da75d05f93c870 /js/model
parent16001bd47e035475888f5bb1396a4a3d48a20084 (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.js7
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;