From 55d38d3bbf00bfc6816d5e23bf9dfa487d9a8f22 Mon Sep 17 00:00:00 2001 From: Seyi Adebajo Date: Thu, 27 Apr 2017 18:39:13 -0700 Subject: [PATCH] adds styling to owner list component. small updates --- wherehows-web/app/components/dataset-author.js | 11 ++++++++++- wherehows-web/app/styles/abstracts/_variables.scss | 3 ++- .../dataset-owner-list/_dataset-owner-list.scss | 2 ++ .../app/templates/components/dataset-author.hbs | 3 +-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/wherehows-web/app/components/dataset-author.js b/wherehows-web/app/components/dataset-author.js index 4cabe5d967..fe947deb9c 100644 --- a/wherehows-web/app/components/dataset-author.js +++ b/wherehows-web/app/components/dataset-author.js @@ -9,8 +9,17 @@ const { inject: { service } } = Ember; +/** + * Array of source names to restrict from user updates + * @type {[String]} + */ const restrictedSources = ['SCM', 'NUAGE']; -const restrictedSourcesPattern = new RegExp(`.*${restrictedSources.join('|')}.*`, 'ig'); +/** + * Pattern to look for in source strings + * Will case-insensitive find strings containing `scm` or `nuage` + * @type {RegExp} + */ +const restrictedSourcesPattern = new RegExp(`.*${restrictedSources.join('|')}.*`, 'i'); const removeFromSourceMessage = `Owners sourced from ${restrictedSources.join(', ')} should be removed directly from that source`; // Class to toggle readonly mode vs edit mode diff --git a/wherehows-web/app/styles/abstracts/_variables.scss b/wherehows-web/app/styles/abstracts/_variables.scss index 194e6b68b2..afb81e64b5 100644 --- a/wherehows-web/app/styles/abstracts/_variables.scss +++ b/wherehows-web/app/styles/abstracts/_variables.scss @@ -63,7 +63,8 @@ $color-scheme: ( ), white: ( base: rgb(255, 255, 255), - catskill: rgb(243, 247, 249) + catskill: rgb(243, 247, 249), + earlydawn:rgb(255, 249, 232) ) ); diff --git a/wherehows-web/app/styles/components/dataset-owner-list/_dataset-owner-list.scss b/wherehows-web/app/styles/components/dataset-owner-list/_dataset-owner-list.scss index b7c28a4dfe..4067b075bd 100644 --- a/wherehows-web/app/styles/components/dataset-owner-list/_dataset-owner-list.scss +++ b/wherehows-web/app/styles/components/dataset-owner-list/_dataset-owner-list.scss @@ -15,6 +15,8 @@ margin: 0 5px 5px 0; line-height: 1.5; border: 1px solid set-color(grey, mid); + background-color: set-color(white, earlydawn); border-radius: 2px; + font-weight: fw(normal, 4); } } diff --git a/wherehows-web/app/templates/components/dataset-author.hbs b/wherehows-web/app/templates/components/dataset-author.hbs index cd2a68a13a..453e9af57e 100644 --- a/wherehows-web/app/templates/components/dataset-author.hbs +++ b/wherehows-web/app/templates/components/dataset-author.hbs @@ -82,8 +82,7 @@ onclick={{action "willEditUserName" owner}}> -