aboutsummaryrefslogtreecommitdiff
path: root/src/client/views
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-06-24 12:04:43 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-06-24 12:04:43 -0400
commit2f92d924a8dc1675cd12b08bbac7f57b2335a7b2 (patch)
tree1b417da6c65aa322917fe5326e001245f5950534 /src/client/views
parent3f940bd45fd1bf72f6c16edc188f754b01f689ba (diff)
fixing
Diffstat (limited to 'src/client/views')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx10
-rw-r--r--src/client/views/global/globalScripts.ts10
2 files changed, 5 insertions, 15 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index 2ad7f0ed1..09cddda19 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -660,16 +660,6 @@ export class CollectionCardView extends CollectionSubView() {
onMouseLeave={() => this.setHoveredNodeIndex(-1)}>
{this.renderCards()}
</div>
- <div className="collectionNotetaking-pivotField" style={{ right: 0, top: 0, position: 'absolute' }}>
- <FieldsDropdown
- Document={this.Document}
- selectFunc={undoable(fieldKey => {
- this.layoutDoc._pivotField = fieldKey;
- // this.removeEmptyColumns();
- }, 'change pivot field')}
- placeholder={StrCast(this.layoutDoc._pivotField)}
- />
- </div>
</div>
);
}
diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts
index cef913837..1344dd071 100644
--- a/src/client/views/global/globalScripts.ts
+++ b/src/client/views/global/globalScripts.ts
@@ -175,15 +175,15 @@ ScriptingGlobals.add(function showFreeform(attr: 'center' | 'grid' | 'snaplines'
}],
['time', {
checkResult: (doc: Doc) => StrCast(doc?.cardSort) === "time",
- setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort = "time",
+ setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort === "time" ? doc.cardSort = '' : doc.cardSort = 'time',
}],
['docType', {
checkResult: (doc: Doc) => StrCast(doc?.cardSort) === "type",
- setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort = "type",
+ setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort === "type" ? doc.cardSort = '' : doc.cardSort = 'type',
}],
['color', {
checkResult: (doc: Doc) => StrCast(doc?.cardSort) === "color",
- setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort = "color",
+ setDoc: (doc: Doc, dv: DocumentView) => doc.cardSort === "color" ? doc.cardSort = '' : doc.cardSort = 'color',
}],
['links', {
checkResult: (doc: Doc) => StrCast(doc?.cardSort) === "links",
@@ -216,8 +216,8 @@ ScriptingGlobals.add(function showFreeform(attr: 'center' | 'grid' | 'snaplines'
['chat', {
checkResult: (doc: Doc) => StrCast(doc?.cardSort) === "custom" && StrCast(doc?.cardSort_customField) === "chat",
setDoc: (doc: Doc, dv: DocumentView) => {
- doc.cardSort = "custom";
- doc.cardSort_customField = "chat";
+ doc.cardSort === "custom" ? doc.cardSort = '' : doc.cardSort = 'custom';
+ doc.cardSort_customField === "chat" ? doc.cardSort_customField = '' : doc.cardSort_customField = 'chat';
doc.cardSort_visibleSortGroups = new List<number>();
},
}],