From c2282cef5208541ce8b696b86bc45acbd9f132b3 Mon Sep 17 00:00:00 2001 From: bob Date: Tue, 11 Feb 2020 15:13:35 -0500 Subject: added a publish button to doc dec titles/. --- src/client/views/DocumentDecorations.scss | 12 ++++++++++++ src/client/views/DocumentDecorations.tsx | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index 32346165d..d57b1456a 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -98,6 +98,18 @@ $linkGap : 3px; pointer-events: auto; overflow: hidden; text-align: center; + display:inline-block; + } + .publishBox { + width: 20px; + height: 22px; + grid-column-start: 3; + grid-column-end: 4; + pointer-events: all; + background: darkgray; + display: inline-block; + position: absolute; + right: 0; } } diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index e2b624776..7359835c5 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -19,6 +19,7 @@ import { DocumentButtonBar } from './DocumentButtonBar'; import './DocumentDecorations.scss'; import { DocumentView } from "./nodes/DocumentView"; import React = require("react"); +import { Id } from '../../new_fields/FieldSymbols'; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -537,8 +538,17 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> }}> {minimizeIcon} - {this._edtingTitle ? - this.titleBlur(true)} onChange={this.titleChanged} onKeyPress={this.titleEntered} /> : + {this._edtingTitle ? <> + this.titleBlur(true)} onChange={this.titleChanged} onKeyPress={this.titleEntered} /> +
{ + const promoteDoc = SelectionManager.SelectedDocuments()[0]; + DocUtils.Publish(promoteDoc.props.Document, this._accumulatedTitle, promoteDoc.props.addDocument, promoteDoc.props.removeDocument); + }}> + +
+ :
{`${this.selectionTitle}`}
}
-- cgit v1.2.3-70-g09d2