diff --git a/server/zanata-frontend/src/app/components/DraggableVersionPanels/index.tsx b/server/zanata-frontend/src/app/components/DraggableVersionPanels/index.tsx index 36195686e1..5c73b69f71 100644 --- a/server/zanata-frontend/src/app/components/DraggableVersionPanels/index.tsx +++ b/server/zanata-frontend/src/app/components/DraggableVersionPanels/index.tsx @@ -13,10 +13,13 @@ import { ListGroup, ListGroupItem, } from "react-bootstrap"; -import { Button, Tooltip, Icon } from "antd"; +import Button from 'antd/lib/button'; +import Icon from 'antd/lib/icon'; +import Tooltip from 'antd/lib/tooltip'; +import 'antd/lib/tooltip/style/'; +import Layout from 'antd/lib/layout' -export const tooltipSort = Best match will be chosen based on the priority - of selected projects. Exact matches take precendence.; +export const tooltipSort = Best match; export const DragHandle = SortableHandle(() => ); @@ -73,6 +76,7 @@ class Items extends Component { value={value} removeVersion={removeVersion} />)) return ( + Adjust priority of selected versions @@ -85,6 +89,7 @@ class Items extends Component { {sortableItems} + ) } diff --git a/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.js b/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.js index 5b62621a78..1d268972c8 100644 --- a/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.js +++ b/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.js @@ -1,11 +1,10 @@ import React from 'react' import { Component } from 'react' import * as PropTypes from 'prop-types' -import { - Button, ProgressBar -} from 'react-bootstrap' +import { ProgressBar } from 'react-bootstrap' import { processStatusType } from '../../utils/prop-types-util' import { isProcessEnded } from '../../utils/EnumValueUtils' +import { Button } from 'antd' /** * This component can be used to show progress of a background task running on @@ -62,7 +61,7 @@ class CancellableProgressBar extends Component { - {buttonLabel} diff --git a/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.test.js b/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.test.js index 3ed985c5d8..7c911a722c 100644 --- a/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.test.js +++ b/server/zanata-frontend/src/app/components/ProgressBar/CancellableProgressBar.test.js @@ -44,7 +44,7 @@ describe('CancellableProgressBar', () => { )).toEqual(ReactDOMServer.renderToStaticMarkup( - + Cancel TM Merge diff --git a/server/zanata-frontend/src/app/components/Sidebar/index.jsx b/server/zanata-frontend/src/app/components/Sidebar/index.jsx index 1825a8c191..e8be5db04e 100644 --- a/server/zanata-frontend/src/app/components/Sidebar/index.jsx +++ b/server/zanata-frontend/src/app/components/Sidebar/index.jsx @@ -1,8 +1,10 @@ import React from 'react' import { Component } from 'react' -import { Button, DropdownButton, MenuItem, ProgressBar, +import { DropdownButton, MenuItem, ProgressBar, Nav, NavItem, Well } from 'react-bootstrap' import { Icon } from '../../components' +import { Button } from 'antd' + /** * Root component for Sidebar */ diff --git a/server/zanata-frontend/src/app/components/Tooltip/Tooltip.story.js b/server/zanata-frontend/src/app/components/Tooltip/Tooltip.story.js index 563aa09a2d..e10926c264 100644 --- a/server/zanata-frontend/src/app/components/Tooltip/Tooltip.story.js +++ b/server/zanata-frontend/src/app/components/Tooltip/Tooltip.story.js @@ -1,34 +1,22 @@ import React from 'react' import { storiesOf } from '@storybook/react' -import { Button, ButtonToolbar, OverlayTrigger, - Tooltip, Well } from 'react-bootstrap' +import { Well } from 'react-bootstrap' +import { Button, Tooltip, Layout } from 'antd' -const tooltip = ( - Tooltip ahoy! Check this info. - -) +const tooltip = Tooltip ahoy!; storiesOf('Tooltip', module) .add('default', () => ( + Tooltip Tooltip component for a more stylish alternative to that anchor tag title attribute. Attach and position tooltips with OverlayTrigger. Props for react-bootstrap Tooltips - - - Holy guacamole! - - - Holy guacamole! - - - Holy guacamole! - - - Holy guacamole! - - + + Holy guacamole! + + )) diff --git a/server/zanata-frontend/src/app/containers/Glossary/DeleteAllEntriesModal.jsx b/server/zanata-frontend/src/app/containers/Glossary/DeleteAllEntriesModal.jsx index 5d4d857131..c36ef199da 100644 --- a/server/zanata-frontend/src/app/containers/Glossary/DeleteAllEntriesModal.jsx +++ b/server/zanata-frontend/src/app/containers/Glossary/DeleteAllEntriesModal.jsx @@ -2,9 +2,8 @@ import React from 'react' import { Component } from 'react' import * as PropTypes from 'prop-types' -import * as ReactDOM from 'react-dom' -import { LoaderText, Icon } from '../../components' -import { Button, Tooltip, Overlay } from 'react-bootstrap' +import { LoaderText } from '../../components' +import { Button, Tooltip } from 'antd' /** * Confirmation modal dialog for delete all glossary entries @@ -24,47 +23,41 @@ class DeleteAllEntriesModal extends Component { handleDeleteAllEntriesDisplay, handleDeleteAllEntries } = this.props - + const deleteAll = ( + + + Are you sure you want to delete + all entries ? + + + handleDeleteAllEntriesDisplay(false)}> + Cancel + + handleDeleteAllEntries}> + + Delete + + + + + ) /* eslint-disable react/jsx-no-bind */ return ( - ReactDOM.findDOMNode(this)} - rootClose - className='bstrapReact' - show={show} - onHide={() => handleDeleteAllEntriesDisplay(false)}> - - - Are you sure you want to delete - all entries ? - - - handleDeleteAllEntriesDisplay(false)}> - Cancel - - - - Delete - - - - - - handleDeleteAllEntriesDisplay(true)} - disabled={isDeleting}> - - + visible={show} + title={deleteAll}> + handleDeleteAllEntriesDisplay(true)} + disabled={isDeleting} icon='delete'> Delete - - + + ) /* eslint-enable react/jsx-no-bind */ diff --git a/server/zanata-frontend/src/app/containers/Glossary/DeleteEntryModal.jsx b/server/zanata-frontend/src/app/containers/Glossary/DeleteEntryModal.jsx index 286fb45792..a9fb811e55 100644 --- a/server/zanata-frontend/src/app/containers/Glossary/DeleteEntryModal.jsx +++ b/server/zanata-frontend/src/app/containers/Glossary/DeleteEntryModal.jsx @@ -55,7 +55,7 @@ class DeleteEntryModal extends Component { onClick={() => handleDeleteEntryDisplay(false)}> Cancel - { handleDeleteEntry(entry.id) diff --git a/server/zanata-frontend/src/app/containers/Languages/DeleteEntry.js b/server/zanata-frontend/src/app/containers/Languages/DeleteEntry.js index 9ba5639cb9..cacfad876a 100644 --- a/server/zanata-frontend/src/app/containers/Languages/DeleteEntry.js +++ b/server/zanata-frontend/src/app/containers/Languages/DeleteEntry.js @@ -3,11 +3,8 @@ import { Component } from 'react' import * as PropTypes from 'prop-types' import { Button, - Tooltip, - Overlay -} from 'react-bootstrap' -import * as ReactDOM from 'react-dom' -import { Icon } from '../../components' + Tooltip +} from 'antd' class DeleteEntry extends Component { static propTypes = { @@ -25,36 +22,36 @@ class DeleteEntry extends Component { handleDeleteEntry } = this.props /* eslint-disable react/jsx-no-bind */ + const deleteLanguage = ( + + Are you sure you want to delete + {locale.displayName}? + + + handleDeleteEntryDisplay(false)}> + Cancel + + { + handleDeleteEntry(locale.localeId) + handleDeleteEntryDisplay(false) + }}> + Delete + + + + ) + return ( - handleDeleteEntryDisplay(true)}> - - Delete - - ReactDOM.findDOMNode(this)}> - - Are you sure you want to delete - {locale.displayName}? - - - handleDeleteEntryDisplay(false)}> - Cancel - - { - handleDeleteEntry(locale.localeId) - handleDeleteEntryDisplay(false) - }}> - Delete - - - - + + handleDeleteEntryDisplay(true)}> + Delete + + ) /* eslint-enable react/jsx-no-bind */ diff --git a/server/zanata-frontend/src/app/entrypoint/index.js b/server/zanata-frontend/src/app/entrypoint/index.js index fe2378116f..a738fdbc90 100644 --- a/server/zanata-frontend/src/app/entrypoint/index.js +++ b/server/zanata-frontend/src/app/entrypoint/index.js @@ -14,7 +14,6 @@ import rootReducer from '../reducers' import Root from '../containers/Root' import '../editor/index.css' -import '../styles/antd.less' import '../styles/style.less' WebFont.load({ diff --git a/server/zanata-frontend/src/app/styles/style.less b/server/zanata-frontend/src/app/styles/style.less index f1370499aa..c00813f2d6 100644 --- a/server/zanata-frontend/src/app/styles/style.less +++ b/server/zanata-frontend/src/app/styles/style.less @@ -12,6 +12,7 @@ @import "../components/TriCheckbox/index.less"; @import "../components/RejectionsForm/index.less"; @import "legacy.less"; +@import "./antd.less"; // jsf and gwt overrides @import "./bstrap-styleguide.less"; /* Class wrapper for bootstrap css. Used in:
title
OverlayTrigger
+ Are you sure you want to delete + all entries ? +
- Are you sure you want to delete - all entries ? -
Are you sure you want to delete + {locale.displayName}? +
Are you sure you want to delete - {locale.displayName}? -