Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #693 from metasfresh/dev-676
Browse files Browse the repository at this point in the history
Process result: implement openDocument as modal #676
  • Loading branch information
damianprzygodzki authored Apr 26, 2017
2 parents 3e07487 + 9166cf1 commit 55ef2dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/actions/WindowActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ export function handleProcessResponse(response, type, id, successCallback) {
dispatch(
openModal(
'', action.windowId, 'window', null, null,
true, '', '', action.documentId
action.advanced ? action.advanced : false,
'', '', action.documentId
)
);
} else {
Expand Down
12 changes: 7 additions & 5 deletions src/components/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class Window extends Component {
render() {
const {sections, tabs} = this.props.layout;
const {
handleDropFile, handleRejectDropped, handleDragStart
handleDropFile, handleRejectDropped, handleDragStart, isModal
} = this.props;

return (
Expand All @@ -202,10 +202,12 @@ class Window extends Component {
{sections && this.renderSections(sections)}
</div>
</Dropzone>

<div className="mt-1 tabs-wrapper">
{tabs && this.renderTabs(tabs)}
</div>
{
!isModal &&
<div className="mt-1 tabs-wrapper">
{tabs && this.renderTabs(tabs)}
</div>
}
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/app/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class Modal extends Component {

renderPanel = () => {
const {
data, modalTitle, modalType, isDocumentNotSaved
data, modalTitle, modalType, isDocumentNotSaved, layout
} = this.props;

const {
Expand All @@ -274,7 +274,7 @@ class Modal extends Component {
}
>
<span className="panel-modal-header-title">
{modalTitle ? modalTitle : 'Modal'}
{modalTitle ? modalTitle : layout.caption}
</span>
<div className="items-row-2">
<button
Expand Down

0 comments on commit 55ef2dc

Please sign in to comment.