adds styling to owner list component. small updates

This commit is contained in:
Seyi Adebajo 2017-04-27 18:39:13 -07:00 committed by Mars Lan
parent 5e51805584
commit 55d38d3bbf
4 changed files with 15 additions and 4 deletions

View File

@ -9,8 +9,17 @@ const {
inject: { service } inject: { service }
} = Ember; } = Ember;
/**
* Array of source names to restrict from user updates
* @type {[String]}
*/
const restrictedSources = ['SCM', 'NUAGE']; 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`; const removeFromSourceMessage = `Owners sourced from ${restrictedSources.join(', ')} should be removed directly from that source`;
// Class to toggle readonly mode vs edit mode // Class to toggle readonly mode vs edit mode

View File

@ -63,7 +63,8 @@ $color-scheme: (
), ),
white: ( white: (
base: rgb(255, 255, 255), base: rgb(255, 255, 255),
catskill: rgb(243, 247, 249) catskill: rgb(243, 247, 249),
earlydawn:rgb(255, 249, 232)
) )
); );

View File

@ -15,6 +15,8 @@
margin: 0 5px 5px 0; margin: 0 5px 5px 0;
line-height: 1.5; line-height: 1.5;
border: 1px solid set-color(grey, mid); border: 1px solid set-color(grey, mid);
background-color: set-color(white, earlydawn);
border-radius: 2px; border-radius: 2px;
font-weight: fw(normal, 4);
} }
} }

View File

@ -82,8 +82,7 @@
onclick={{action "willEditUserName" onclick={{action "willEditUserName"
owner}}> owner}}>
<label class={{if (contains owner.source restrictedSources) "" <label class={{if (contains owner.source restrictedSources) "" "dataset-author-cell__name-tag"}}>
"dataset-author-cell__name-tag"}}>
{{owner.userName}} {{owner.userName}}
</label> </label>
{{aupac-typeahead {{aupac-typeahead