From 05664ee58924c39d641db83c63e44d4d7579b641 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 30 Jan 2015 23:52:52 -0500 Subject: 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. --- js/model/packages.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/model') 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; -- cgit v1.2.3