summaryrefslogtreecommitdiff
path: root/js
Commit message (Collapse)AuthorAgeFilesLines
* js: layout: Update copyright year in footer.David Thompson2015-01-301-1/+1
| | | | * js/view/layout.js (guix.withLayout): Add © 2015.
* js: Fix package sorting.David Thompson2015-01-301-4/+9
| | | | | | | * js/controllers/packages.js (guix.packages.controller.sortAndPage): New function. (guix.packages.controller): Use 'sortAndPage'. (guix.packages.controller.doSearch): Likewise.
* js: Fix display when there are 0 search resultsDavid Thompson2015-01-303-3/+5
| | | | | | | | | | * 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.
* js: Factorize headerWithBadge function.David Thompson2015-01-303-8/+9
| | | | | | * js/view/ui.js (guix.ui.headerWithBadge): New function. * js/view/packages.js (guix.view.packages): Use it. * js/view/generations.js (guix.view.generations): Likewise.
* js: Extract modal creation function.David Thompson2015-01-302-17/+42
| | | | | | * js/view/ui.js: New file. * guix-web/view/html.scm (javascripts): Add it. * js/view/packages.js (guix.packages.view): Use 'guix.ui.modal' function.
* css: Improve appearance of counter badges next to headers.David Thompson2015-01-302-2/+2
| | | | | | | * css/guix.css (.header .badge): New style. * js/view/generations.js (guix.generations.view): Add 'header' class to h2 element. * js/view/packages.js (guix.packages.view): Likewise.
* js: Clean up packageCount function.David Thompson2015-01-302-3/+11
| | | | | | * js/utils.js (guix.add): New function. * js/controllers/packages.js (guix.packages.controller.packageCount): Reimplement.
* js: Extract pagination model.David Thompson2014-10-164-49/+82
| | | | | | | | | | * js/utils.js (guix.clamp): New function. * js/controller/packages.js (guix.packages.controller): Remove 'pages', 'currentPageIndex', and 'pageSize' properties. Add 'pager' prop. Delete 'paginate', 'currentPage', 'isFirstPage', 'isLastPage', and 'isCurrentPage' methods. * js/model/packages.js (guix.packages.Pager): New function. * js/view/packages.js (guix.packages.view): Use new Pager API.
* Add generations view.David Thompson2014-10-165-5/+124
| | | | | | | | | | | | * guix-web/controller.scm (controller): Add '/generations' route. * guix-web/package.scm (profile-generations*): New procedure. * guix-web/view.scm (generations-json): New procedure. (javascripts): Add new JS files. * js/model/generations.js: New file. * js/controller/generations.js: New file. * js/view/generations.js: New file. * js/view/layout.js (guix.withLayout): Add 'Generations' navbar entry. * js/routes.js: Add '/generations' route.
* js: Hook up navbar to routes.David Thompson2014-10-151-1/+6
| | | | | * js/view/layout.js (guix.withLayout): Add click handler for 'Packages' link.
* js: Add loading spinner to packages page.David Thompson2014-10-154-9/+20
| | | | | | | | | | | * css/guix.css: Add spinner styles. * js/controller/packages.js (guix.packages.view): Explicitly redraw after loading packages. * js/model/packages.js (guix.packages.Packages): Load packages in the background. * js/view/layout.js (guix.withLayout): Cast elem to array if needed. * js/view/packages.js (guix.packages.view): Render spinner when there are no packages to display.
* Render footer on client instead of server.David Thompson2014-10-151-13/+38
| | | | | | | * guix-web/view.scm (main-layout): Remove footer. (all-packages): Remove '#guix' div. (librejs): Add container and logo. * js/view/layout.js (guix.withLayout): Render footer.
* js: utils file initializes guix namespace with certainty.David Thompson2014-10-151-1/+1
| | | | * js/utils.js (guix): Don't check for existing value (there isn't one).
* js: Break package components into model/view/controller files.David Thompson2014-10-155-388/+425
| | | | | | | | | * js/packages.js: Delete. * js/model/packages.js: New file. * js/view/packages.js: New file. * js/controller/packages.js: New file. * js/routes.js: Use new namespace for packages. * guix-web/view.scm (javascripts): Add new JS files.
* Restructure JavaScript files.David Thompson2014-10-156-19/+88
| | | | | | | | | | | | | | | * js/guix-packages.js: Delete. * js/mithril.js: Delete. * js/underscore.js: Delete. * js/lib/mithril.js: New file. * js/lib/underscore.js: New file. * js/packages.js: New file. * js/routes.js: New file. * js/utils.js: New file. * js/view/layout.js: New file. * guix-web/view.scm (javascripts): Add new files. Delete old ones. * css/guix.css (logo): New class. * images/logo.png: Shrink logo.
* js: Extract more rendering to functions.David Thompson2014-08-301-35/+43
| | | | | * js/guix-packages.js (guix.view): Extract renderPackageTable and renderSearchBox functions.
* Add a currently useless abort button to the package install modal.David Thompson2014-08-151-1/+1
| | | | * js/guix-packages.js (guix.view): Render abort button in derivation phase.
* Tweak messaging during package installation.David Thompson2014-08-151-1/+7
| | | | * js/guix-packages.js (guix.view): Tweak messaging during derivation phase.
* Always return to the first page of results after searching.David Thompson2014-08-151-0/+2
| | | | | * js/guix-packages.js (guix.controller.prototype.doSearch): Reset currentPageIndex to 0.
* Show close button on modal when installation fails.David Thompson2014-08-151-1/+1
| | | | * js/guix-packages.js (guix.view): Show close button on the error phase.
* Add basic, hacky package installation.David Thompson2014-08-151-3/+122
| | | | | | | | | | | * guix-web/controller.scm (controller): Add package installation route. * guix-web/package.scm: New file. * guix-web/render.scm (unprocessable-entity, created): New procedures. * js/guix-packages.js (guix.PHASE_NONE, guix.PHASE_PROMPT, guix.PHASE_DERIVATION, guix.PHASE_SUCCESS, guix.PHASE_ERROR): New variables. (guix.controller.phase, guix.controller.selectedPackage): New properties. (guix.controller.prototype.installSelectedPackage): New method. (guix.view): Add modal for package installation UI.
* Better encapsulate JS data types.David Thompson2014-08-131-88/+98
| | | | | * js/guix-packages.js (guix.Sorter, guix.controller): Use module pattern to encapsulate data type creation.
* Add column sorting to package table.David Thompson2014-08-131-8/+52
| | | | | | | | | | | * css/guix.css: New file. * guix-web/view.scm (main-layout): Include guix.css. * js/guix-packages.js (guix.Sorter.prototype.reverse): New method. (guix.controller.sorter): Make property. (guix.controller.columns): New variable. (guix.controller.prototype.paginate): Use sorter property. (guix.controller.prototype.sortBy): New method. (guix.view): Render column sorting UI.
* Add package sorting.David Thompson2014-08-131-0/+12
| | | | | | * guix-packages.js (guix.Sorter): New data type. (guix.Soter.prototype.sort): New method. (guix.controller): Sort by name by default.
* Move pagination function to controller prototype.David Thompson2014-08-131-6/+6
| | | | | | * js/guix-packages.js (guix.paginate): Delete it. (guix.controller): Use new paginate method. (guix.controller.prototype.paginate): New method.
* Move controller methods to prototype.David Thompson2014-08-091-24/+24
| | | | | * js/guix-packages.js: Move functions defined on each instance of guix.controller to guix.controller's prototype.
* Add pagination.David Thompson2014-08-091-7/+95
| | | | | | | | | | | | * js/guix-packages.js: (guix.chunk): New function. (guix.paginate): New function. (guix.controller.pages, guix.controller.currentPageIndex, guix.controller.pageSize): New variables. (guix.controller.currentPage, guix.controller.isFirstPage, guix.controller.isLastPage, guix.controller.isCurrentPage, guix.controller.packageCount): New functions. (guix.controller.doSearch): Paginate. (guix.view): Render pagination UI.
* Perform case insensitive search.David Thompson2014-08-081-1/+1
| | | | * js/guix-packages.js: Specify case insensitive mode when creating regexp.
* Display visible packages in badge on package search page.David Thompson2014-08-071-1/+1
| | | | * js/guix-packages.js (guix.view): Display ctrl.visiblePackages() in badge.
* Rename guix-web.js to guix-packages.js.David Thompson2014-08-071-2/+7
| | | | | | * guix-web (javascripts): Update. * js/guix-packages.js: New file. * js/guix-web.js: Delete it.
* js: Add form-control class to search input.David Thompson2014-08-071-12/+9
| | | | * js/guix-web.js (guix.view): Add it.
* js: Apply search terms to package synopsis.David Thompson2014-08-071-1/+2
| | | | | * js/guix-web.js (guix.controller.doSearch): Test regexp against package synopsis.
* Use uncompressed source code for mithril.js.David Thompson2014-08-072-8/+674
| | | | | | * guix-web: Update javascripts. * js/mithril.js: New file. * js/mithril.min.js: Delete it.
* Add copyright information to source files.David Thompson2014-08-071-0/+17
| | | | | * guix-web: * js/guix-web.js: Add it.
* First commit.David Thompson2014-08-063-0/+1445