Skip to content

Commit

Permalink
show a placeholder for each tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rloomans committed Nov 22, 2016
1 parent 883aa4c commit fd1fe75
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/js/components/assessment/assessmentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var AssessmentList = React.createClass({
<td className='wrap'>
{this.props.assessmentTags.hasOwnProperty(assessment.id)
? <TagList tags={this.props.assessmentTags[assessment.id] || []} />
: <span>•••&nbsp;</span>}
: assessment.tags.map(function (tagId) { return <span key={tagId}>•••&nbsp;</span> })}
{assessment.status === 'DONE' && <Label bsStyle='default'>Read Only</Label>}
</td>
{this.props.showTeams && <td>
Expand Down
2 changes: 1 addition & 1 deletion client/js/components/team/teamList.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var TeamList = React.createClass({
<td className='wrap'>
{this.props.teamTags.hasOwnProperty(team.id)
? <TagList tags={this.props.teamTags[team.id] || []} />
: <span>•••</span>}
: team.tags.map(function (tagId) { return <span key={tagId}>•••&nbsp;</span> })}
</td>
<td data-sort={team.created}>
{prettyCreated} <small>({relativeCreated})</small>
Expand Down
12 changes: 10 additions & 2 deletions client/js/components/team/teamTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,17 @@ var TeamTable = React.createClass({
url: '/api/teams/',
dataType: 'json',
cache: false,
success: function (data) {
success: function (teams) {
var tags = {}
teams.filter(function (team) {
return (team.tags.length == 0)
}, this).forEach(function (team) {
tags[team.id] = []
}, this)

this.setState({
teams: data,
teams: teams,
teamTags: tags,
loaded: true
})
this.loadAllTagsFromServer()
Expand Down
6 changes: 5 additions & 1 deletion measure_mate/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

DEBUG = os.environ.get('DJANGO_DEBUG', True)

CSP_CONNECT_SRC = ("'self'", "ws://localhost:3000", "ws://127.0.0.1:3000")
CSP_CONNECT_SRC = (
"'self'",
"ws://localhost:*", "ws://127.0.0.1:*",
"http://localhost:*", "http://127.0.0.1:*"
)

INSTALLED_APPS += (
'django_extensions',
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4352,7 +4352,7 @@ gulp-sourcemaps@1.6.0:
through2 "^2.0.0"
vinyl "^1.0.0"

gulp-sourcemaps@^2.2.0:
gulp-sourcemaps@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.2.1.tgz#b9c7321526089d022180485a9eba2277d72805a7"
dependencies:
Expand Down Expand Up @@ -8548,11 +8548,11 @@ stylehacks@^2.3.0:
text-table "^0.2.0"
write-file-stdout "0.0.2"

stylelint-config-standard@15.0.0:
stylelint-config-standard@^15.0.0:
version "15.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-15.0.0.tgz#3180b2f9aa3896a754ce6a69bf1b1fe7ab2e0ca0"

stylelint@^7.4.2, stylelint@^7.5.0:
stylelint@^7.4.2, stylelint@^7.6.0:
version "7.6.0"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-7.6.0.tgz#ddeb06ccc95f72c119fcde5e85439fb7e9cde4df"
dependencies:
Expand Down

0 comments on commit fd1fe75

Please sign in to comment.