Skip to content

Commit

Permalink
refactor(ZNTA-2514) WIP: TM Merge modal
Browse files Browse the repository at this point in the history
  • Loading branch information
kgough committed May 15, 2018
1 parent 71905c5 commit 05e6311
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions server/zanata-frontend/src/app/components/LockIcon/index.tsx
@@ -1,16 +1,16 @@
import React from "react"
import { Tooltip } from "antd"
import {Icon} from "../../components"
import {EntityStatus, isEntityStatusReadOnly} from "../../utils/EnumValueUtils"
import {entityStatusPropType} from "../../utils/prop-types-util"
import React from "react";
import { Tooltip } from "antd";
import {Icon} from "../../components";
import {EntityStatus, isEntityStatusReadOnly} from "../../utils/EnumValueUtils";
import {entityStatusPropType} from "../../utils/prop-types-util";

const DO_NOT_RENDER: null = null

/**
* Version Lock Icon with tooltip
*/
const LockIcon: React.SFC<LockIconProps> = ({status}) => {
const tooltipReadOnly = <span id="tooltipreadonly">Read only</span>
const tooltipReadOnly = <span id="tooltipreadonly">Read only</span>;
return isEntityStatusReadOnly(status)
? (
<Tooltip placement="top" title={tooltipReadOnly}>
Expand Down
Expand Up @@ -111,26 +111,24 @@ class TMMergeProjectSources extends Component {
placeholder="input search text"
onSearch={this.projectSearchTermChange}
enterButton />
<Row>
<Col span={24} className='mr2'>
<span>
Select source project versions to merge
</span>
<div>
<LoaderText loading={fetchingProject}
loadingText={'Fetching Projects'} />
<span className="u-textMuted">{noResults}</span>
</div>
</Col>
</Row>
<Row>
<Col span={12} className='mr2'>
<Col span={11}>
<span className='mb1 b'>
Select source project versions to merge
</span>
<div>
<LoaderText loading={fetchingProject}
loadingText={'Fetching Projects'} />
<span className="u-textMuted">{noResults}</span>
</div>
</Col>
<Row gutter={16}>
<Col span={12}>
<ProjectVersionPanels projectVersions={projectVersions}
selectedVersions={mergeOptions.selectedVersions}
onVersionCheckboxChange={onVersionCheckboxChange}
onAllVersionCheckboxChange={onAllVersionCheckboxChange} />
</Col>
<Col span={11}>
<Col span={12}>
<DraggableVersionPanels
selectedVersions={mergeOptions.selectedVersions}
onDraggableMoveEnd={onDragMoveEnd}
Expand Down Expand Up @@ -185,7 +183,7 @@ class TMMergeProjectSources extends Component {
<TMMergeProjectTMOptions {...this.props} disabled={disabled}
disableDifferentProjectOption={disableDiffProjectOption} />
</Row>
<Row>
<Row className='mt3 mb3'>
<Col span={24}>
<Card>
<p>Translations which satisfy all conditions will copy as
Expand Down
Expand Up @@ -27,7 +27,7 @@ const MetaDataCheckOption = ({name, value, callback, hasReject, disabled}) => {
<CopyLabel type={REJECT} value={value} />
</Radio>
)
return <Col span={7}>
return <Col xs={24} md={8}>
If the translation is from a different&nbsp;
<span className="import-type">{name}</span><br />
<Radio checked={value === IGNORE_CHECK} validationState='success'
Expand Down Expand Up @@ -81,7 +81,7 @@ class TMMergeProjectTMOptions extends Component {
disabled
} = this.props
const diffProjectOption = disableDifferentProjectOption
? (<Col span={7}>
? (<Col xs={24} md={8}>
If the translation is from a different&nbsp;
<span className="import-type">project</span><br />
<Radio checked validationState="error" disabled>
Expand All @@ -92,7 +92,7 @@ class TMMergeProjectTMOptions extends Component {
: <MetaDataCheckOption name="project" disabled={disabled}
value={differentProject} callback={this.onDifferentProjectChange} />
return (
<Col span={24}>
<Col xs={24}>
{diffProjectOption}
<MetaDataCheckOption name="document" value={differentDocId}
disabled={disabled}
Expand Down
4 changes: 3 additions & 1 deletion server/zanata-frontend/src/app/styles/ant-theme-vars.less
Expand Up @@ -17,7 +17,9 @@

@btn-primary-bg: @primary-color;

// pagination alignment on Explore page
// antd component overrides - tachyons not used because these apply globally to
// the antd components

.teaserHeader .ant-layout {
display: flex;
flex-direction: row;
Expand Down

0 comments on commit 05e6311

Please sign in to comment.