Skip to content

Commit

Permalink
fix #1095 added modal correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
saidaipparla committed Oct 10, 2016
1 parent 47f524f commit 60a3ec3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
4 changes: 2 additions & 2 deletions web/client/components/catalog/RecordGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const RecordGrid = React.createClass({
records: [],
onLayerAdd: () => {},
onError: () => {},
column: {xs: 12, sm: 6, md: 6, lg: 6}
column: {xs: 12, sm: 12, md: 12, lg: 12}
};
},
renderRecordItem(record) {
Expand All @@ -53,7 +53,7 @@ const RecordGrid = React.createClass({
if (this.props.records) {
let mapsList = this.props.records instanceof Array ? this.props.records : [this.props.records];
return (
<Grid className="record-grid" style={this.props.style}>
<Grid className="record-grid" fluid={true} style={this.props.style}>
<Row>
{mapsList.map(this.renderRecordItem)}
</Row>
Expand Down
4 changes: 2 additions & 2 deletions web/client/components/catalog/__tests__/RecordGrid-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('This test for Record Grid', () => {
const itemDom = ReactDOM.findDOMNode(item);
expect(itemDom).toExist();

expect(itemDom.className).toBe("record-grid container");
expect(itemDom.className).toBe("record-grid container-fluid");
});
// test data
it('creates the component with data', () => {
Expand All @@ -62,7 +62,7 @@ describe('This test for Record Grid', () => {

const itemDom = ReactDOM.findDOMNode(item);
expect(itemDom).toExist();
expect(itemDom.className).toBe("record-grid container");
expect(itemDom.className).toBe("record-grid container-fluid");

// check the thumbnail as a to verify thtat the url is really loaded into the component
let img = TestUtils.findRenderedDOMComponentWithTag(
Expand Down
4 changes: 2 additions & 2 deletions web/client/jsapi/mapstore2.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@
}

#mapstore-catalog-panel {
width: auto;
margin: 100px;
width: 920px;
margin: 0px;
}

#mapstore-catalog-panel .record-item {
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/MetadataExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const MetadataExplorerComponent = React.createClass({
{panel}
</Panel>);
}
return (<Dialog id="mapstore-catalog-panel" style={this.props.style}>
return (<Dialog modal id="mapstore-catalog-panel" style={assign({}, this.props.style, {display: "block" })}>
<span role="header"><span className="metadataexplorer-panel-title"><Message msgId="catalog.title"/></span><button onClick={this.props.toggleControl} className="print-panel-close close">{this.props.closeGlyph ? <Glyphicon glyph={this.props.closeGlyph}/> : <span>×</span>}</button></span>
{panel}
</Dialog>);
Expand Down
25 changes: 23 additions & 2 deletions web/client/product/assets/css/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ html, body, #container, .fill {
}

#mapstore-catalog-panel {
width: auto;
margin: 100PX;
width: 920px;
margin: 0px;
}

#mapstore-catalog-panel .record-item {
Expand Down Expand Up @@ -575,3 +575,24 @@ html, body, #container, .fill {
font-size: 16px;
color: red;
}

/* Small devices (tablets, 768px and up) */
@media (min-width: 280px ) {
#mapstore-catalog-panel {
width: 305px;
}
}

/* Medium devices (desktops, 992px and up) */
@media (min-width: 992px) {
#mapstore-catalog-panel {
width: 500px;
}
}

/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
#mapstore-catalog-panel {
width: 920px;
}
}

0 comments on commit 60a3ec3

Please sign in to comment.