Merge branch 'release/v1.2' of https://github.com/ONLYOFFICE/AppServer into release/v1.2
This commit is contained in:
commit
bb7871abad
@ -49,8 +49,8 @@ const withHotkeys = (Component) => {
|
||||
filterPreventDefault: false,
|
||||
enableOnTags: ["INPUT"],
|
||||
enabled: !someDialogIsOpen && enabledHotkeys && !mediaViewerIsVisible,
|
||||
keyup: true,
|
||||
keydown: false,
|
||||
// keyup: true,
|
||||
// keydown: false,
|
||||
};
|
||||
|
||||
const onKeyDown = (e) => activateHotkeys(e);
|
||||
@ -130,21 +130,21 @@ const withHotkeys = (Component) => {
|
||||
useHotkeys(
|
||||
"Shift+s",
|
||||
() => setAction({ type: FileAction.Create, extension: "xlsx", id: -1 }),
|
||||
hotkeysFilter
|
||||
{ ...hotkeysFilter, ...{ keyup: true } }
|
||||
);
|
||||
|
||||
//Crete presentation
|
||||
useHotkeys(
|
||||
"Shift+p",
|
||||
() => setAction({ type: FileAction.Create, extension: "pptx", id: -1 }),
|
||||
hotkeysFilter
|
||||
{ ...hotkeysFilter, ...{ keyup: true } }
|
||||
);
|
||||
|
||||
//Crete form template
|
||||
useHotkeys(
|
||||
"Shift+o",
|
||||
() => setAction({ type: FileAction.Create, extension: "docxf", id: -1 }),
|
||||
hotkeysFilter
|
||||
{ ...hotkeysFilter, ...{ keyup: true } }
|
||||
);
|
||||
|
||||
//Crete form template from file
|
||||
@ -158,7 +158,7 @@ const withHotkeys = (Component) => {
|
||||
useHotkeys(
|
||||
"Shift+f",
|
||||
() => setAction({ type: FileAction.Create, id: -1 }),
|
||||
hotkeysFilter
|
||||
{ ...hotkeysFilter, ...{ keyup: true } }
|
||||
);
|
||||
|
||||
//Delete selection
|
||||
|
@ -40,6 +40,7 @@ const FileTile = (props) => {
|
||||
getContextModel,
|
||||
onHideContextMenu,
|
||||
thumbSize,
|
||||
setSelection,
|
||||
} = props;
|
||||
|
||||
const temporaryExtension =
|
||||
@ -103,6 +104,7 @@ const FileTile = (props) => {
|
||||
: t("Translations:TitleShowActions")
|
||||
}
|
||||
showHotkeyBorder={showHotkeyBorder}
|
||||
setSelection={setSelection}
|
||||
>
|
||||
<FilesTileContent
|
||||
item={item}
|
||||
@ -116,9 +118,11 @@ const FileTile = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ settingsStore }) => {
|
||||
export default inject(({ settingsStore, filesStore }) => {
|
||||
const { getIcon } = settingsStore;
|
||||
return { getIcon };
|
||||
const { setSelection } = filesStore;
|
||||
|
||||
return { getIcon, setSelection };
|
||||
})(
|
||||
withTranslation(["Home", "InfoPanel"])(
|
||||
withRouter(
|
||||
|
@ -371,9 +371,16 @@ class Tile extends React.PureComponent {
|
||||
onSelect && onSelect(true, item);
|
||||
};
|
||||
|
||||
onFileClick = () => {
|
||||
const { onSelect, item, checked } = this.props;
|
||||
onSelect && onSelect(!checked, item);
|
||||
onFileClick = (e) => {
|
||||
const { onSelect, item, checked, setSelection } = this.props;
|
||||
if (e.detail === 1) {
|
||||
if (e.target.nodeName === "INPUT" || e.target.nodeName === "rect") {
|
||||
onSelect && onSelect(!checked, item);
|
||||
} else {
|
||||
setSelection && setSelection([]);
|
||||
onSelect && onSelect(!checked, item);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user