diff --git a/src/actions/GenericActions.js b/src/actions/GenericActions.js index 26d5351f5..8fe31076a 100644 --- a/src/actions/GenericActions.js +++ b/src/actions/GenericActions.js @@ -19,6 +19,17 @@ export function initLayout( ); } +export function getViewAttributesLayout(windowId, viewId, rowId) { + return axios.get( + config.API_URL + + '/documentView'+ + '/' + windowId + + '/' + viewId + + '/' + rowId + + '/attributes/layout' + ); +} + export function getData( entity, docType, docId, tabId, rowId, subentity, subentityId, isAdvanced, orderBy, viewId diff --git a/src/components/app/SelectionAttributes.js b/src/components/app/SelectionAttributes.js index 2e1a96dbb..3c6dfbba9 100644 --- a/src/components/app/SelectionAttributes.js +++ b/src/components/app/SelectionAttributes.js @@ -3,7 +3,7 @@ import {connect} from 'react-redux'; import counterpart from 'counterpart'; import { - initLayout, + getViewAttributesLayout, getViewAttributes } from '../../actions/GenericActions'; @@ -35,10 +35,10 @@ class SelectionAttributes extends Component { fetchActions = () => { const { - windowType, viewId, selected, entity, DLWrapperSetData, + windowType, viewId, selected, DLWrapperSetData, DLWrapperSetLayout } = this.props; - initLayout(entity, windowType, selected[0], null, viewId) + getViewAttributesLayout(windowType, viewId, selected[0]) .then(response => { DLWrapperSetLayout(response.data.elements); return getViewAttributes(windowType, viewId, selected[0]);