From c8ffe4a6cb04c5577b4e76ffb2cebe514225578b Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Wed, 21 May 2014 15:13:46 -0400 Subject: [PATCH] Show "latest release" and "total" counts --- app/css/app.css | 10 ++++++++++ app/css/showModule.css | 10 ++++++++++ app/js/showControllers.js | 3 ++- app/less/showModule.less | 18 +++++++++++++++++- app/partials/showModule.html | 12 ++++++++++-- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/app/css/app.css b/app/css/app.css index 4d3701b..72aa0db 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -15,6 +15,9 @@ .module-detail-table td { width: 60%; } +.module-detail-table td .url { + word-break: break-all; +} .module-detail-table .no-users-label { color: #555555; font-style: italic; @@ -27,6 +30,13 @@ .module-detail-table .select-container { min-width: 18em; } +.module-detail-table .count { + white-space: nowrap; +} +.module-detail-table .count .count-description { + font-size: 85%; + margin-right: 1em; +} header { padding-top: 1.5em; padding-bottom: 1.5em; diff --git a/app/css/showModule.css b/app/css/showModule.css index daf1ce4..fc69419 100644 --- a/app/css/showModule.css +++ b/app/css/showModule.css @@ -15,6 +15,9 @@ .module-detail-table td { width: 60%; } +.module-detail-table td .url { + word-break: break-all; +} .module-detail-table .no-users-label { color: #555555; font-style: italic; @@ -27,3 +30,10 @@ .module-detail-table .select-container { min-width: 18em; } +.module-detail-table .count { + white-space: nowrap; +} +.module-detail-table .count .count-description { + font-size: 85%; + margin-right: 1em; +} diff --git a/app/js/showControllers.js b/app/js/showControllers.js index a858f71..e4e58a4 100644 --- a/app/js/showControllers.js +++ b/app/js/showControllers.js @@ -68,7 +68,8 @@ angular.module('modulusOne.showControllers', ['ui']) } $scope.incrementDownload = function() { - $scope.latestRelease.downloadCount++ + $scope.latestRelease.downloadCount++; + $scope.module.downloadCount++ } // Search function that typeahead in the `owner` field calls diff --git a/app/less/showModule.less b/app/less/showModule.less index 67cdf99..bc20ac0 100644 --- a/app/less/showModule.less +++ b/app/less/showModule.less @@ -11,6 +11,11 @@ } td { width: 60%; + + // Break long URLs to prevent overflow problems on small screens. + .url { + word-break: break-all; + } } .no-users-label, { @@ -25,6 +30,17 @@ } .select-container { - min-width: 18em + min-width: 18em; + } + + .count { + + white-space: nowrap; + + .count-description { + font-size: 85%; + margin-right: 1em; + } + } } \ No newline at end of file diff --git a/app/partials/showModule.html b/app/partials/showModule.html index 9f43d66..2ecf8b0 100644 --- a/app/partials/showModule.html +++ b/app/partials/showModule.html @@ -44,7 +44,7 @@

Documentation - + {{module.documentationURL}} @@ -68,7 +68,15 @@

Downloads - {{latestRelease.downloadCount}} + + {{latestRelease.downloadCount}} + latest release + + + {{module.downloadCount}} + total + +