Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details wrapping #134

Merged
merged 1 commit into from
May 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions client/app/scripts/components/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ const Details = React.createClass({
return (
<div id="details">
<Paper zDepth={3}>
<div className="details-tools">
<span className="fa fa-close" onClick={this.handleClickClose} />
<div className="details-tools-wrapper">
<div className="details-tools">
<span className="fa fa-close" onClick={this.handleClickClose} />
</div>
</div>
<NodeDetails details={this.props.details} />
</Paper>
Expand Down
4 changes: 2 additions & 2 deletions client/app/scripts/components/node-details-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const NodeDetailsTable = React.createClass({
<div className="node-details-table-row-key">{row.key}</div>
{isNumeric && <div className="node-details-table-row-value-scalar">{row.value_major}</div>}
{isNumeric && <div className="node-details-table-row-value-unit">{row.value_minor}</div>}
{!isNumeric && <div className="node-details-table-row-value-major">{row.value_major}</div>}
{!isNumeric && row.value_minor && <div className="node-details-table-row-value-minor">{row.value_minor}</div>}
{!isNumeric && <div className="node-details-table-row-value-major truncate">{row.value_major}</div>}
{!isNumeric && row.value_minor && <div className="node-details-table-row-value-minor truncate">{row.value_minor}</div>}
</div>
);
})}
Expand Down
4 changes: 2 additions & 2 deletions client/app/scripts/components/node-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const NodeDetails = React.createClass({
return (
<div className="node-details">
<div className="node-details-header" style={style}>
<h2 className="node-details-header-label">
<h2 className="node-details-header-label truncate">
{node.label_major}
</h2>
<div className="node-details-header-label-minor">{node.label_minor}</div>
<div className="node-details-header-label-minor truncate">{node.label_minor}</div>
</div>

<div className="node-details-content">
Expand Down
23 changes: 17 additions & 6 deletions client/app/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ html, body {
.wrap {
}

/* add this class to truncate text with ellipsis, container needs width */
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* Space out content a bit */
body {
Expand Down Expand Up @@ -185,11 +191,16 @@ body {
right: 36px;
top: 24px;
bottom: 48px;
width: 32em;
width: 420px;

.details-tools-wrapper {
position: relative;
}

.details-tools {
float: right;
padding: 16px 24px;
position: absolute;
top: 16px;
right: 24px;
color: @white;

span {
Expand Down Expand Up @@ -217,8 +228,10 @@ body {
&-label {
color: white;
margin-bottom: 0;
width: 348px;

&-minor {
width: 348px;
font-size: 120%;
color: @white;
}
Expand Down Expand Up @@ -251,14 +264,12 @@ body {
clear: left;

&-key {
width: 9em;
width: 11em;
float: left;
}

&-value-major {
margin-right: 0.5em;
overflow: hidden;
text-overflow: ellipsis;
}

&-value-scalar {
Expand Down