aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreeng5 <eleanor_eng@brown.edu>2019-09-28 16:53:13 -0400
committereeng5 <eleanor_eng@brown.edu>2019-09-28 16:53:13 -0400
commit16e511e35ecbe6166ced813d27884b367f6c6fbb (patch)
treecbe280e4ed0d9333ed8eb5f635236da38a581d88 /src
parent7e4dc0b2b2c604c60ffdfbaeb3eda95fa8221a06 (diff)
delete and menu button for group header
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionMasonryViewFieldRow.tsx26
-rw-r--r--src/client/views/collections/CollectionStackingView.scss2
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx12
3 files changed, 31 insertions, 9 deletions
diff --git a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
index 38f7493de..ad84b7635 100644
--- a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
+++ b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
@@ -261,6 +261,17 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
);
}
+ renderMenu = () => {
+ let selected = this.props.headingObject ? this.props.headingObject.color : "#f1efeb";
+ return (
+ <div className="collectionStackingView-optionPicker">
+ <div className="optionOptions">
+ <div className="optionPicker">Create Alias</div>
+ </div>
+ </div>
+ );
+ }
+
@observable private collapsed: boolean = false;
private toggleVisibility = action(() => {
@@ -327,10 +338,19 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
</ Flyout >
</div>
}
+ {evContents === `NO ${key.toUpperCase()} VALUE` ?
+ (null) :
+ <button className="collectionStackingView-sectionDelete" onClick={this.deleteRow}>
+ <FontAwesomeIcon icon="trash" size="lg" />
+ </button>}
{evContents === `NO ${key.toUpperCase()} VALUE` ? (null) :
- <button className="collectionStackingView-sectionOptions" onClick={this.deleteRow}>
- <FontAwesomeIcon icon="ellipsis-v" size="lg"></FontAwesomeIcon>
- </button>
+ <div className="collectionStackingView-sectionOptions">
+ <Flyout anchorPoint={anchorPoints.CENTER_RIGHT} content={this.renderMenu()}>
+ <button className="collectionStackingView-sectionOptionButton">
+ <FontAwesomeIcon icon="ellipsis-v" size="lg"></FontAwesomeIcon>
+ </button>
+ </Flyout>
+ </div>
}
</div>
</div > : (null);
diff --git a/src/client/views/collections/CollectionStackingView.scss b/src/client/views/collections/CollectionStackingView.scss
index f34b3768b..d3deff9f1 100644
--- a/src/client/views/collections/CollectionStackingView.scss
+++ b/src/client/views/collections/CollectionStackingView.scss
@@ -226,7 +226,7 @@
.collectionStackingView-sectionDelete {
position: absolute;
- right: 0;
+ right: 25px;
top: 0;
height: 100%;
}
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index b04e1fc73..e94a7d7f6 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -257,10 +257,7 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
return (
<div className="collectionStackingView-optionPicker">
<div className="optionOptions">
- <div className="optionPicker" onClick={() => this.deleteColumn()}>Delete</div>
- <div className="optionPicker">Edit</div>
- <div className="optionPicker">Collapse</div>
- <div className="optionPicker">Alias</div>
+ <div className="optionPicker">Create Alias</div>
</div>
</div>
);
@@ -325,11 +322,16 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
<div className="collectionStackingView-sectionColor">
<Flyout anchorPoint={anchorPoints.CENTER_RIGHT} content={this.renderColorPicker()}>
<button className="collectionStackingView-sectionColorButton">
- <FontAwesomeIcon icon="palette" size="sm" />
+ <FontAwesomeIcon icon="palette" size="lg" />
</button>
</ Flyout >
</div>
}
+ {evContents === `NO ${key.toUpperCase()} VALUE` ?
+ (null) :
+ <button className="collectionStackingView-sectionDelete" onClick={this.deleteColumn}>
+ <FontAwesomeIcon icon="trash" size="lg" />
+ </button>}
{evContents === `NO ${key.toUpperCase()} VALUE` ? (null) :
<div className="collectionStackingView-sectionOptions">
<Flyout anchorPoint={anchorPoints.CENTER_RIGHT} content={this.renderMenu()}>