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

Commit

Permalink
merge with master #600
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunkat committed May 26, 2017
2 parents 55a35c0 + 83af110 commit ed4b32b
Show file tree
Hide file tree
Showing 20 changed files with 209 additions and 108 deletions.
10 changes: 6 additions & 4 deletions src/actions/GenericActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function completeRequest(

export function autocompleteRequest(
docType, propertyName, query, docId, tabId, rowId, entity, subentity,
subentityId, viewId
subentityId, viewId, attribute
) {
return () => axios.get(
config.API_URL +
Expand All @@ -127,14 +127,15 @@ export function autocompleteRequest(
(rowId ? '/' + rowId : '') +
(subentity ? '/' + subentity : '') +
(subentityId ? '/' + subentityId : '') +
'/attribute/' + propertyName +
(attribute ? '/attribute/' : '/field/') +
propertyName +
'/typeahead' + '?query=' + encodeURIComponent(query)
);
}

export function dropdownRequest(
docType, propertyName, docId, tabId, rowId, entity, subentity, subentityId,
viewId
viewId, attribute
) {
return () => axios.get(
config.API_URL +
Expand All @@ -146,7 +147,8 @@ export function dropdownRequest(
(rowId ? '/' + rowId : '') +
(subentity ? '/' + subentity : '') +
(subentityId ? '/' + subentityId : '') +
'/attribute/' + propertyName +
(attribute ? '/attribute/' : '/field/') +
propertyName +
'/dropdown'
);
}
Expand Down
9 changes: 5 additions & 4 deletions src/actions/WindowActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,14 +592,15 @@ export function attachFileAction(windowType, docId, data){
}

//ZOOM INTO
export function getZoomIntoWindow(windowId, docId, field, tabId, rowId) {
export function getZoomIntoWindow(entity, windowId, docId, tabId, rowId, field){
return () => axios.get(
config.API_URL +
'/window/' + windowId +
'/' + docId +
'/' + entity +
'/' + windowId +
(docId ? '/' + docId : '') +
(tabId ? '/' + tabId : '') +
(rowId ? '/' + rowId : '') +
'/attribute' +
'/field' +
'/' + field +
'/zoomInto?showError=true'
);
Expand Down
13 changes: 13 additions & 0 deletions src/assets/css/inputs.css
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,24 @@ button {
border-radius: 2px;
}

.input-state-false {
border-color: $brand-success-dark-color;
border-width: 2px;
}

.input-checkbox input:checked ~ .input-checkbox-tick {
background: $brand-success-dark-color;
border-color: $brand-success-dark-color;
}

.input-side {
position: relative;
top: -5px;
margin-left: 5px;
color: $brand-light-color;
cursor: pointer;
}

.input-checkbox input:disabled ~ .input-checkbox-tick {
pointer-events: none;
background: #ccc;
Expand Down
22 changes: 22 additions & 0 deletions src/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ body {
z-index: 3;
}

.context-menu-separator {
margin:0;
}

.context-menu-open {
display: block;
}
Expand Down Expand Up @@ -1135,3 +1139,21 @@ td.pulse-off input {
text-decoration: underline;
cursor: pointer;
}

.separator {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;

margin-top: .5rem;
}

.separator-title {
color: $brand-font-color-weak;
}

.separator-hr {
width: 100%;
margin-left: 1rem;
}
25 changes: 9 additions & 16 deletions src/assets/css/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -251,38 +251,31 @@ th {
position: relative;
}

.th-lg {
width: 200px;
/* Table cols sizing */

.td-lg {
width: 225px;
max-width: 225px;
}

.th-md {
width: 100px;
.td-md {
width: 144px;
max-width: 144px;
}

.th-sm {
.td-sm {
min-width: 60px;
max-width: 100px;
}

.table .td-lg {
width: 225px;
max-width: 225px;
}

.td-lg .input-dropdown-list {
width: 225px;
}

.table .td-md {
width: 144px;
max-width: 144px;
}

.td-lg .input-dropdown-list {
width: auto;
}


.pagination {
margin-top: 0;
margin-bottom: 0;
Expand Down
19 changes: 19 additions & 0 deletions src/components/Separator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from 'react';

class Separator extends Component {
constructor(props) {
super(props);
}

render() {
const {title} = this.props;
return (
<div className="separator col-xs-12">
<span className="separator-title">{title}</span>
<hr className="separator-hr" />
</div>
);
}
}

export default Separator;
13 changes: 9 additions & 4 deletions src/components/Window.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from 'react';

import Dropzone from './Dropzone';
import Separator from './Separator';

import {
findRowByPropName
Expand Down Expand Up @@ -85,20 +86,22 @@ class Window extends Component {

renderSections = (sections) => {
return sections.map((elem, id)=> {
const columns = elem.columns;
const {title, columns} = elem;
const isFirst = (id === 0);
return (
<div className="row" key={'section' + id}>
{columns && this.renderColumns(columns)}
{title && <Separator {...{title}} />}
{columns && this.renderColumns(columns, isFirst)}
</div>
)
})
}

renderColumns = (columns) => {
renderColumns = (columns, isSectionFirst) => {
const maxRows = 12;
const colWidth = Math.floor(maxRows / columns.length);
return columns.map((elem, id)=> {
const isFirst = (id === 0);
const isFirst = id === 0 && isSectionFirst;
const elementGroups = elem.elementGroups;
return (
<div className={'col-sm-' + colWidth} key={'col' + id}>
Expand All @@ -111,6 +114,7 @@ class Window extends Component {
}

renderElementGroups = (group, isFirst) => {
const {isModal} = this.props;
return group.map((elem, id)=> {
const {type, elementsLine} = elem;
const shouldBeFocused = isFirst && (id === 0);
Expand All @@ -123,6 +127,7 @@ class Window extends Component {
elementsLine && elementsLine.length > 0 &&
<div
key={'elemGroups' + id}
ref={c => isModal && shouldBeFocused && c && c.focus()}
tabIndex={shouldBeFocused ? 0 : undefined}
className={
'panel panel-spaced panel-distance ' +
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class DocumentList extends Component {
{...{isIncluded, disconnectFromState, autofocus,
open, page, closeOverlays, inBackground,
disablePaginationShortcuts, isModal,
hasIncluded
hasIncluded, viewId
}}
>
{layout.supportAttributes && !isIncluded &&
Expand Down
1 change: 1 addition & 0 deletions src/components/app/SelectionAttributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class SelectionAttributes extends Component {
{DLWrapperLayout && DLWrapperLayout.map((item, id) =>
<RawWidget
entity={entity}
attribute={true}
widgetType={item.widgetType}
fields={item.fields}
dataId={DLWrapperDataId}
Expand Down
4 changes: 2 additions & 2 deletions src/components/filters/FiltersItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class FiltersItem extends Component {
active.parameters.map(item => {
this.mergeData(
item.parameterName,
item.value ? item.value : '',
item.valueTo ? item.valueTo : ''
item.value != null ? item.value : '',
item.valueTo != null ? item.valueTo : ''
);
})
}else if(filter.parameters){
Expand Down
9 changes: 8 additions & 1 deletion src/components/header/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Actions extends Component {
} = this.props;

if(!windowType || docId === 'notfound' || notfound){
this.setState({
data: []
})
return;
}

Expand All @@ -32,7 +35,11 @@ class Actions extends Component {
this.setState({
data: response.data.actions
});
});
}).catch(() => {
this.setState({
data: []
})
})
}

renderData = () => {
Expand Down
Loading

0 comments on commit ed4b32b

Please sign in to comment.