Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
update shrinkwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Oct 12, 2015
1 parent 17b2363 commit 003a438
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 109 deletions.
2 changes: 1 addition & 1 deletion frontend/src/main/web/index.html
Expand Up @@ -10,7 +10,7 @@
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
wf.src = ('https:' === document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/web/lib/components/SystemGlossary.jsx
Expand Up @@ -40,7 +40,7 @@ var SystemGlossary = React.createClass({
},

_handleFilterKeyDown: function(event) {
if(event.key == 'Enter') {
if(event.key === 'Enter') {
Actions.updateFilter(this.state.filter);
}
},
Expand Down
50 changes: 26 additions & 24 deletions frontend/src/main/web/lib/components/UserProfile.jsx
Expand Up @@ -59,33 +59,35 @@ var UserProfile = React.createClass({
languageTeams = user.languageTeams;
}

return (<div className="g">
<div id="profile-overview" className="g__item w--1-4 w--1-2-m">
<div className="media l--push-bottom-half">
<div className="media__item--right bx--round">
<img src={imageUrl} alt={username}/>
</div>
<div className="media__body">
<h1 id="profile-displayname"
className="l--push-all-0">{name}</h1>
<ul className="list--no-bullets txt--meta">
<li id="profile-username">
<i className="i i--user list__icon"
title="Username"></i>
{username}
</li>
<li id="profile-languages">
<i className="i i--language list__icon"
title="Spoken languages"></i>
{languageTeams}
</li>
</ul>
return (
<div className="g">
<div id="profile-overview" className="g__item w--1-4 w--1-2-m">
<div className="media l--push-bottom-half">
<div className="media__item--right bx--round">
<img src={imageUrl} alt={username}/>
</div>
<div className="media__body">
<h1 id="profile-displayname"
className="l--push-all-0">{name}</h1>
<ul className="list--no-bullets txt--meta">
<li id="profile-username">
<i className="i i--user list__icon"
title="Username"></i>
{username}
</li>
<li id="profile-languages">
<i className="i i--language list__icon"
title="Spoken languages"></i>
{languageTeams}
</li>
</ul>
</div>
</div>
</div>
<!-- user contribution matrix -->
{recentContribution}
</div>
<!-- user contribution matrix -->
{recentContribution}
</div>);
);
}
});

Expand Down
6 changes: 4 additions & 2 deletions frontend/src/main/web/lib/components/glossary/ActionCell.jsx
Expand Up @@ -70,7 +70,8 @@ var ActionCell = React.createClass({
<Icon className="cpri" name="info"/>
</OverlayTrigger>);

var updateButton = null, cancelButton = null,
var updateButton = null,
cancelButton = null,
comment = (
<Comment
className="ml1/4"
Expand All @@ -81,7 +82,8 @@ var ActionCell = React.createClass({

if(isSaving) {
return (
<div>{info} {comment}
<div>
{info} {comment}
<Button kind='primary' className="ml1/4" loading>Update</Button>
</div>
);
Expand Down
40 changes: 21 additions & 19 deletions frontend/src/main/web/lib/components/glossary/Comment.jsx
Expand Up @@ -37,7 +37,7 @@ var Comment = React.createClass({
},

_handleKeyUp: function (event) {
if(event.key == 'Escape') {
if(event.key === 'Escape') {
this._onCancelComment();
}
},
Expand All @@ -57,24 +57,26 @@ var Comment = React.createClass({
disableUpdate = !this._hasValueChanged();

if(this.props.readOnly !== true) {
var tooltip = (<Tooltip id="comment" title="Comment">
<textarea className="p1/4 w100p bd2 bdcsec30 bdrs1/4"
onChange={this._onCommentChange}
value={this.state.value}
onKeyUp={this._handleKeyUp}/>
<div className="mt1/4">
<Button className="mr1/2" link
onClick={this._onCancelComment}>
Cancel
</Button>
<Button kind='primary'
size={-1}
disabled={disableUpdate}
onClick={this._onUpdateComment}>
Update Comment
</Button>
</div>
</Tooltip>);
var tooltip = (
<Tooltip id="comment" title="Comment">
<textarea className="p1/4 w100p bd2 bdcsec30 bdrs1/4"
onChange={this._onCommentChange}
value={this.state.value}
onKeyUp={this._handleKeyUp}/>
<div className="mt1/4">
<Button className="mr1/2" link
onClick={this._onCancelComment}>
Cancel
</Button>
<Button kind='primary'
size={-1}
disabled={disableUpdate}
onClick={this._onUpdateComment}>
Update Comment
</Button>
</div>
</Tooltip>
);
} else {
var comment = StringUtils.isEmptyOrNull(this.state.value) ? (<i>No comment</i>) : (<span>{this.state.value}</span>);
tooltip = (<Tooltip id="comment">{comment}</Tooltip>);
Expand Down
Expand Up @@ -291,7 +291,7 @@ var DataTable = React.createClass({
if(resId === null) {
return (<LoadingCell/>);
} else if(!this.props.canUpdateEntry && !this.props.canAddNewEntry) {
return;
return null;
}
var entry = this._getGlossaryEntry(resId);
if(this._isTranslationSelected()) {
Expand Down

0 comments on commit 003a438

Please sign in to comment.