From 365b867eaa087372b8f3bae185b488f4fe8c1c0f Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Thu, 16 Jul 2015 14:35:23 -0400 Subject: [PATCH] Added required/optional logic and displaying ont he endpoints. --- dist/js/controllers/analyzer.endpoints.js | 4 ++-- dist/views/analyzer.endpoints.html | 6 +++--- scss/main.scss | 9 ++++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dist/js/controllers/analyzer.endpoints.js b/dist/js/controllers/analyzer.endpoints.js index e80b9fa..2493163 100644 --- a/dist/js/controllers/analyzer.endpoints.js +++ b/dist/js/controllers/analyzer.endpoints.js @@ -41,7 +41,7 @@ app.controller('analyzer.endpoints', ['$scope', 'analyzerNav', '$parse', functio "key": "politicalParty", "description": "Registered political party affiliation", "type": "discrete", - "required": true, + "required": false, "states": ["Democrat", "Republican", "Libertarian", "Independent", "other"] }, { @@ -55,7 +55,7 @@ app.controller('analyzer.endpoints', ['$scope', 'analyzerNav', '$parse', functio "key": "profession", "description": "Primary field of employment", "type": "discrete", - "required": true, + "required": false, "states": ["Health Care", "Science", "Information Technology", "Service Industry", "Other"] }, { diff --git a/dist/views/analyzer.endpoints.html b/dist/views/analyzer.endpoints.html index b0d06bf..caa5d11 100644 --- a/dist/views/analyzer.endpoints.html +++ b/dist/views/analyzer.endpoints.html @@ -9,7 +9,7 @@ <table> <tbody> <tr ng-repeat-start="datapoint in datapoints"> - <td><i class="datapoint-cell datapoint-required optional"></i></td> + <td><i class="datapoint-cell datapoint-required" ng-class="{require: datapoint.required == true, optional: datapoint.required == false}"></i></td> <td class="datapoint-cell">{{datapoint.key}}</td> <td class="datapoint-cell">{{datapoint.type}}</td> <td class="datapoint-cell">{{datapoint.description}}</td> @@ -44,7 +44,7 @@ <table> <tbody> <tr> - <td><i class="datapoint-cell datapoint-required optional"></i></td> + <td><i class="datapoint-cell datapoint-required require"></i></td> <td class="datapoint-cell">given</td> <td class="datapoint-cell">Map</td> <td class="datapoint-cell">A map describing the known properties of the datapoint</td> @@ -70,7 +70,7 @@ </td> </tr> <tr> - <td><i class="datapoint-cell datapoint-required optional"></i></td> + <td><i class="datapoint-cell datapoint-required require"></i></td> <td class="datapoint-cell">target</td> <td class="datapoint-cell">String</td> <td class="datapoint-cell">A string indicating the boolean logic for the fields being analyzed for.</td> diff --git a/scss/main.scss b/scss/main.scss index 857d989..8bc397c 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -499,12 +499,19 @@ footer div { color: #03a100; } -.datapoint-required.optional { +.datapoint-required { @extend .fa; @extend .fa-circle; +} + +.datapoint-required.optional { color: #bbbbbb; } +.datapoint-required.require { + color: $important-alert-color; +} + .datapoint-cell { padding-right: 10px; padding-top: 10px; -- GitLab