|
|
|
@ -18,6 +18,7 @@ import {sanitizeIdent} from 'app/common/gutil';
|
|
|
|
|
import {bundleChanges, Computed, dom, DomContents, DomElementArg, fromKo, MultiHolder,
|
|
|
|
|
Observable, styled} from 'grainjs';
|
|
|
|
|
import * as ko from 'knockout';
|
|
|
|
|
import { textarea } from './inputs';
|
|
|
|
|
|
|
|
|
|
const t = makeT('FieldConfig');
|
|
|
|
|
|
|
|
|
@ -88,6 +89,22 @@ export function buildNameConfig(
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function buildDescriptionConfig(
|
|
|
|
|
owner: MultiHolder,
|
|
|
|
|
origColumn: ColumnRec,
|
|
|
|
|
cursor: ko.Computed<CursorPos>,
|
|
|
|
|
) {
|
|
|
|
|
const editedDescription = Observable.create(owner, '');
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
cssLabel(t("DESCRIPTION")),
|
|
|
|
|
cssRow(
|
|
|
|
|
cssTextArea(editedDescription, {})
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SaveHandler = (column: ColumnRec, formula: string) => Promise<void>;
|
|
|
|
|
type BuildEditor = (
|
|
|
|
|
cellElem: Element,
|
|
|
|
@ -494,3 +511,19 @@ const cssInput = styled(textInput, `
|
|
|
|
|
color: ${theme.inputDisabledFg};
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
|
|
const cssTextArea = styled(textarea, `
|
|
|
|
|
color: ${theme.inputFg};
|
|
|
|
|
background-color: ${theme.mainPanelBg};
|
|
|
|
|
border: 1px solid ${theme.inputBorder};
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
|
color: ${theme.inputPlaceholderFg};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&[readonly] {
|
|
|
|
|
background-color: ${theme.inputDisabledBg};
|
|
|
|
|
color: ${theme.inputDisabledFg};
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|