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

Commit

Permalink
Browse files Browse the repository at this point in the history
Show loading terms
  • Loading branch information
Alex Eng committed Mar 9, 2016
1 parent 077da13 commit 606ecb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions frontend/src/main/web/src/containers/Glossary/Entries.js
Expand Up @@ -19,11 +19,9 @@ import {
ButtonLink,
ButtonRound,
Icon,
LoaderText,
OverlayTrigger,
Overlay,
Tooltip } from 'zanata-ui'
import Comment from './Comment'
LoaderText } from 'zanata-ui'

import EntryModal from './EntryModal'
import DeleteEntryModal from './DeleteEntryModal'

let sameRenders = 0
Expand All @@ -46,9 +44,9 @@ class Entries extends Component {
handleDeleteTerm,
handleResetTerm,
handleUpdateTerm,
termsLoading,
termIds,
terms,
transLoading,
selectedTransLocale,
selectedTerm,
permission
Expand Down Expand Up @@ -82,7 +80,6 @@ class Entries extends Component {
const displayUpdateButton = permission.canUpdateEntry && isTermModified
const isSaving = term.status && term.status.isSaving
const editable = permission.canUpdateEntry && !isSaving

let updateButton
if (isSaving) {
updateButton = (
Expand Down Expand Up @@ -113,7 +110,7 @@ class Entries extends Component {
</TableCell>
<TableCell size={transSelected ? '2' : '1'} tight={transSelected}>
{transSelected
? transLoading
? termsLoading
? <div className='LineClamp(1,24px) Px(rq)'>Loading…</div>
: (<EditableText
editable={transSelected && editable}
Expand Down Expand Up @@ -154,7 +151,7 @@ class Entries extends Component {
<Icon name='info'/>
</ButtonLink>

{transSelected ? (<Comment term={term}
{transSelected ? (<EntryModal term={term}
canUpdateEntry={permission.canUpdateEntry}/>) : ''}
{updateButton}
<div className='Op(0) row--selected_Op(1) editable:h_Op(1) Trs(eo)'>
Expand Down
Expand Up @@ -15,7 +15,7 @@ import {
glossaryUpdateComment
} from '../../actions/glossary'

class Comment extends Component {
class EntryModal extends Component {

constructor (props) {
super(props)
Expand Down Expand Up @@ -124,7 +124,7 @@ class Comment extends Component {
}
}

Comment.propTypes = {
EntryModal.propTypes = {
term: React.PropTypes.object,
canUpdateEntry: React.PropTypes.bool,
}
Expand All @@ -137,4 +137,4 @@ const mapDispatchToProps = (dispatch) => {
}
}

export default connect(null, mapDispatchToProps)(Comment)
export default connect(null, mapDispatchToProps)(EntryModal)

0 comments on commit 606ecb4

Please sign in to comment.