Skip to content

Commit 3c7de83

Browse files
committed
fixed requested changes
1 parent 64a2bec commit 3c7de83

4 files changed

Lines changed: 18 additions & 33 deletions

File tree

web/client/components/buttons/GlobeViewSwitcherButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const GlobeViewSwitcherButton = React.createClass({
8282
].reduce((result, key) => { result[key] = this.props[key]; return result; }, {});
8383
},
8484
render() {
85-
return <ToggleButton {...this.getButtonProperties()} pressed={this.props.active} tooltip={<Tooltip id="globeViewSwitcher"><Message msgId={this.props.active ? this.props.activeTooltip : this.props.notActiveTooltip}/></Tooltip>} />;
85+
return <ToggleButton {...this.getButtonProperties()} pressed={this.props.active} tooltip={<Tooltip id="globeViewSwitcher-tooltip"><Message msgId={this.props.active ? this.props.activeTooltip : this.props.notActiveTooltip}/></Tooltip>} />;
8686
}
8787
});
8888

web/client/components/misc/DockablePanel.jsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const DockablePanel = React.createClass({
4747
},
4848
getDefaultProps() {
4949
return {
50-
id: "dock",
5150
dimMode: "none",
5251
dockSize: 0.35,
5352
fluid: true,
@@ -62,11 +61,11 @@ const DockablePanel = React.createClass({
6261
zIndex: 1030
6362
};
6463
},
65-
getAutoHeight(pos) {
66-
return pos === "top" || pos === "bottom";
64+
getHeight(pos) {
65+
return pos === "top" || pos === "bottom" ? true : undefined;
6766
},
68-
getAutoWidth(pos) {
69-
return pos === "left" || pos === "right";
67+
getWidth(pos) {
68+
return pos === "left" || pos === "right" ? true : undefined;
7069
},
7170
render() {
7271
const WrappedComponent = this.props.wrappedComponent;
@@ -82,12 +81,11 @@ const DockablePanel = React.createClass({
8281
fluid={this.props.fluid}
8382
dimStyle={{ background: 'rgba(0, 0, 100, 0.2)' }}
8483
>
85-
<div id="container-wrapped-component" style={{height: "calc(100% - " + this.props.toolbarHeight + "px)"}}>
84+
<div className="dockpanel-wrapped-component" style={{height: "calc(100% - " + this.props.toolbarHeight + "px)"}}>
8685
{this.props.wrappedComponent !== null ? (<WrappedComponent
8786
size={{
88-
width: this.getAutoWidth(this.props.position),
89-
height: this.getAutoHeight(this.props.position),
90-
size: this.props.dockSize
87+
height: this.getHeight(this.props.position) && this.props.dockSize,
88+
width: this.getWidth(this.props.position) && this.props.dockSize
9189
}}
9290
/>) : null }
9391
</div>

web/client/components/misc/ResizableGrid.jsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ const ReactDataGrid = require('react-data-grid');
1717
* @prop {number} headerRowHeight the height in pixels of the rows in the header
1818
* @prop {number} minHeight the min height of the grid container
1919
* @prop {number} minWidth the min width of the grid container
20-
* @prop {function} onRowsSelected. The method to call when checkbox is checked.
21-
* @prop {function} onRowsDeselected. The method to call when checkbox is un-checked.
2220
* @prop {string} refGrid the reference to the react-data-grid-component
2321
* @prop {number} rowHeight the height of the rows in the grid
2422
* @prop {string} rowKey the key used to distinguish rows
2523
* @prop {object} rows. The features passed to the grid
26-
* @prop {object} selectBy. It contains the selected rows
2724
* @prop {number} size. The size of the dock panel wrapping this component
2825
*
2926
*/
@@ -35,14 +32,12 @@ const ResizableGrid = React.createClass({
3532
headerRowHeight: React.PropTypes.number,
3633
minHeight: React.PropTypes.number.isRequired,
3734
minWidth: React.PropTypes.number,
38-
onRowsDeselected: React.PropTypes.func,
39-
onRowsSelected: React.PropTypes.func,
4035
onMount: React.PropTypes.func,
4136
refGrid: React.PropTypes.string,
4237
rowHeight: React.PropTypes.number.isRequired,
4338
rowKey: React.PropTypes.string,
39+
rowSelection: React.PropTypes.object,
4440
rows: React.PropTypes.array.isRequired,
45-
selectBy: React.PropTypes.object,
4641
size: React.PropTypes.object
4742
},
4843
contextTypes: {
@@ -56,13 +51,11 @@ const ResizableGrid = React.createClass({
5651
headerRowHeight: 55,
5752
minHeight: 250,
5853
minWidth: null,
59-
onRowsDeselected: () => {},
60-
onRowsSelected: () => {},
6154
refGrid: "grid",
6255
rowHeight: 30,
6356
rowKey: "id",
57+
rowSelection: null,
6458
rows: [],
65-
selectBy: {keys: {values: []}},
6659
onMount: () => {}
6760
};
6861
},
@@ -97,13 +90,7 @@ const ResizableGrid = React.createClass({
9790
rowGetter={this.rowGetter}
9891
rowHeight={this.props.rowHeight}
9992
rowKey={this.props.rowKey}
100-
rowSelection={{
101-
showCheckbox: true,
102-
enableShiftSelect: true,
103-
onRowsSelected: this.props.onRowsSelected,
104-
onRowsDeselected: this.props.onRowsDeselected,
105-
selectBy: this.props.selectBy
106-
}}
93+
rowSelection={this.props.rowSelection}
10794
rowsCount={this.props.rows.length}
10895
/>
10996
);

web/client/themes/default/ms2-theme.less

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -953,26 +953,26 @@ select.form-control option {
953953
color: @ms2-color-text-primary !important;
954954
}
955955
/* feature grid made by react-data-grid */
956-
#container-wrapped-component .react-grid-Header{
956+
.dockpanel-wrapped-component .react-grid-Header{
957957
background: @ms2-color-primary;
958958
color: @ms2-color-text-primary;
959959
font-family: @font-family-base;
960960
}
961-
#container-wrapped-component .react-grid-Main .react-grid-Header .react-grid-HeaderCell{
961+
.dockpanel-wrapped-component .react-grid-Main .react-grid-Header .react-grid-HeaderCell{
962962
background: @ms2-color-primary;
963963
color: @ms2-color-text-primary;
964964
font-family: @font-family-base;
965965
height:55px !important;
966966
text-align: center;
967967
padding-top: 17px;
968968
}
969-
#container-wrapped-component .react-grid-Row--even .react-grid-Cell { background-color: #f2f2f2; }
969+
.dockpanel-wrapped-component .react-grid-Row--even .react-grid-Cell { background-color: #f2f2f2; }
970970

971-
#container-wrapped-component .react-grid-Main, .react-grid-Container {
971+
.dockpanel-wrapped-component .react-grid-Main, .react-grid-Container {
972972
height: 100%;
973973
width: 100% !important;
974974
}
975-
#container-wrapped-component .react-grid-Container {
975+
.dockpanel-wrapped-component .react-grid-Container {
976976
width: 100% !important;
977977
}
978978
// dock panel
@@ -986,13 +986,13 @@ select.form-control option {
986986
right: 2px;
987987
bottom: 2px;
988988
}
989-
#container-wrapped-component{
989+
.dockpanel-wrapped-component{
990990
display: flex;
991991
flex: 1 0 auto;
992992
flexDirection: column;
993993
width: 100%;
994994
}
995-
#container-wrapped-component .react-grid-Grid{
995+
.dockpanel-wrapped-component .react-grid-Grid{
996996
min-height: 100% !important;
997997
}
998998

0 commit comments

Comments
 (0)