Merge branch hotfix/v6.4.3 into master
This commit is contained in:
commit
334e6e124b
|
@ -92,52 +92,44 @@ class SearchView extends Component {
|
||||||
|
|
||||||
const $$ = Dom7;
|
const $$ = Dom7;
|
||||||
|
|
||||||
$$(document).on('page:init', (e, page) => {
|
|
||||||
if ( page.name == 'home' ) {
|
|
||||||
this.searchbar = f7.searchbar.create({
|
|
||||||
el: '.searchbar',
|
|
||||||
customSearch: true,
|
|
||||||
expandable: true,
|
|
||||||
backdrop: false,
|
|
||||||
on: {
|
|
||||||
search: (bar, curval, prevval) => {
|
|
||||||
},
|
|
||||||
enable: this.onSearchbarShow.bind(this, true),
|
|
||||||
disable: this.onSearchbarShow.bind(this, false)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// function iOSVersion() {
|
|
||||||
// var ua = navigator.userAgent;
|
|
||||||
// var m;
|
|
||||||
// return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
const $editor = $$('#editor_sdk');
|
|
||||||
// const $replaceLink = $$('#replace-link');
|
|
||||||
|
|
||||||
if (false /* iOSVersion < 13 */) {
|
|
||||||
// $editor.on('mousedown touchstart', this.onEditorTouchStart.bind(this));
|
|
||||||
// $editor.on('mouseup touchend', this.onEditorTouchEnd.bind(this));
|
|
||||||
} else {
|
|
||||||
// $editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
|
||||||
// $editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
$editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
|
||||||
$editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
|
||||||
// $replaceLink.on('click', this.onReplaceHold.bind(this));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.onSettingsClick = this.onSettingsClick.bind(this);
|
this.onSettingsClick = this.onSettingsClick.bind(this);
|
||||||
this.onSearchClick = this.onSearchClick.bind(this);
|
this.onSearchClick = this.onSearchClick.bind(this);
|
||||||
this.onReplaceClick = this.onReplaceClick.bind(this);
|
this.onReplaceClick = this.onReplaceClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
const $$ = Dom7;
|
|
||||||
this.$replace = $$('#idx-replace-val');
|
this.$replace = $$('#idx-replace-val');
|
||||||
|
const $editor = $$('#editor_sdk');
|
||||||
|
|
||||||
|
this.onEditorTouchStart = this.onEditorTouchStart.bind(this);
|
||||||
|
this.onEditorTouchEnd = this.onEditorTouchEnd.bind(this);
|
||||||
|
|
||||||
|
$editor.on('pointerdown', this.onEditorTouchStart);
|
||||||
|
$editor.on('pointerup', this.onEditorTouchEnd);
|
||||||
|
|
||||||
|
if( !this.searchbar ) {
|
||||||
|
this.searchbar = f7.searchbar.get('.searchbar');
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !this.searchbar ) {
|
||||||
|
this.searchbar = f7.searchbar.create({
|
||||||
|
el: '.searchbar',
|
||||||
|
customSearch: true,
|
||||||
|
expandable: true,
|
||||||
|
backdrop: false,
|
||||||
|
on: {
|
||||||
|
search: (bar, curval, prevval) => {
|
||||||
|
},
|
||||||
|
enable: this.onSearchbarShow.bind(this, true),
|
||||||
|
disable: this.onSearchbarShow.bind(this, false)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
$$('#editor_sdk').off('pointerdown', this.onEditorTouchStart)
|
||||||
|
.off('pointerup', this.onEditorTouchEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSettingsClick(e) {
|
onSettingsClick(e) {
|
||||||
|
@ -202,6 +194,7 @@ class SearchView extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEditorTouchStart(e) {
|
onEditorTouchStart(e) {
|
||||||
|
console.log('taouch start');
|
||||||
this.startPoint = this.pointerPosition(e);
|
this.startPoint = this.pointerPosition(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-about-logo {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -231,47 +231,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Theme
|
|
||||||
|
|
||||||
.slide-theme {
|
|
||||||
&__list {
|
|
||||||
margin: auto;
|
|
||||||
ul {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding-left: 18px;
|
|
||||||
padding-right: 18px;
|
|
||||||
padding-bottom: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.item-inner:after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.item-theme {
|
|
||||||
position: relative;
|
|
||||||
margin: 0;
|
|
||||||
box-shadow: 0 0 0 1px rgba(0,0,0,.15);
|
|
||||||
width: 88px;
|
|
||||||
height: 40px;
|
|
||||||
margin-top: 14px;
|
|
||||||
background-image: url(../img/themes/themes.png);
|
|
||||||
display: block;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
.item-theme.active:before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
right: -5px;
|
|
||||||
bottom: -5px;
|
|
||||||
z-index: 1;
|
|
||||||
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="#aa5252"><g><circle fill="#fff" cx="11" cy="11" r="11"/><path d="M11,21A10,10,0,1,1,21,11,10,10,0,0,1,11,21h0ZM17.4,7.32L17.06,7a0.48,0.48,0,0,0-.67,0l-7,6.84L6.95,11.24a0.51,0.51,0,0,0-.59.08L6,11.66a0.58,0.58,0,0,0,0,.65l3.19,3.35a0.38,0.38,0,0,0,.39,0L17.4,8a0.48,0.48,0,0,0,0-.67h0Z"/></g></svg>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transition
|
// Transition
|
||||||
|
|
||||||
.slide-transition {
|
.slide-transition {
|
||||||
|
|
|
@ -4,10 +4,9 @@ import { f7 } from 'framework7-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolbarView from "../view/Toolbar";
|
import ToolbarView from "../view/Toolbar";
|
||||||
|
|
||||||
const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'storeFocusObjects', 'storeToolbarSettings')(observer(props => {
|
const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'storeFocusObjects', 'storeToolbarSettings','storeDocumentInfo')(observer(props => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("Toolbar", { returnObjects: true });
|
const _t = t("Toolbar", { returnObjects: true });
|
||||||
|
|
||||||
const appOptions = props.storeAppOptions;
|
const appOptions = props.storeAppOptions;
|
||||||
const isDisconnected = props.users.isDisconnected;
|
const isDisconnected = props.users.isDisconnected;
|
||||||
const displayMode = props.storeReview.displayMode;
|
const displayMode = props.storeReview.displayMode;
|
||||||
|
@ -20,11 +19,16 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
||||||
const storeToolbarSettings = props.storeToolbarSettings;
|
const storeToolbarSettings = props.storeToolbarSettings;
|
||||||
const isCanUndo = storeToolbarSettings.isCanUndo;
|
const isCanUndo = storeToolbarSettings.isCanUndo;
|
||||||
const isCanRedo = storeToolbarSettings.isCanRedo;
|
const isCanRedo = storeToolbarSettings.isCanRedo;
|
||||||
|
const disabledControls = storeToolbarSettings.disabledControls;
|
||||||
|
const disabledEditControls = storeToolbarSettings.disabledEditControls;
|
||||||
|
const disabledSettings = storeToolbarSettings.disabledSettings;
|
||||||
|
|
||||||
const showEditDocument = !appOptions.isEdit && appOptions.canEdit && appOptions.canRequestEditRights;
|
const showEditDocument = !appOptions.isEdit && appOptions.canEdit && appOptions.canRequestEditRights;
|
||||||
|
|
||||||
|
const docInfo = props.storeDocumentInfo;
|
||||||
|
const docTitle = docInfo.dataDoc ? docInfo.dataDoc.title : '';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Common.Notifications.on('setdoctitle', setDocTitle);
|
|
||||||
Common.Gateway.on('init', loadConfig);
|
Common.Gateway.on('init', loadConfig);
|
||||||
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
||||||
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
||||||
|
@ -37,24 +41,19 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Common.Notifications.off('setdoctitle', setDocTitle);
|
|
||||||
Common.Notifications.off('toolbar:activatecontrols', activateControls);
|
Common.Notifications.off('toolbar:activatecontrols', activateControls);
|
||||||
Common.Notifications.off('toolbar:deactivateeditcontrols', deactivateEditControls);
|
Common.Notifications.off('toolbar:deactivateeditcontrols', deactivateEditControls);
|
||||||
Common.Notifications.off('goback', goBack);
|
Common.Notifications.off('goback', goBack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [docTitle, resetDocTitle] = useState('');
|
|
||||||
const setDocTitle = (title) => {
|
|
||||||
resetDocTitle(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Back button
|
// Back button
|
||||||
const [isShowBack, setShowBack] = useState(false);
|
const [isShowBack, setShowBack] = useState(appOptions.canBackToFolder);
|
||||||
const loadConfig = (data) => {
|
const loadConfig = (data) => {
|
||||||
if (data && data.config && data.config.canBackToFolder !== false &&
|
if (data && data.config && data.config.canBackToFolder !== false &&
|
||||||
data.config.customization && data.config.customization.goback &&
|
data.config.customization && data.config.customization.goback &&
|
||||||
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose)) {
|
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose))
|
||||||
|
{
|
||||||
setShowBack(true);
|
setShowBack(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -108,20 +107,17 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const [disabledEditControls, setDisabledEditControls] = useState(false);
|
|
||||||
const [disabledSettings, setDisabledSettings] = useState(false);
|
|
||||||
const deactivateEditControls = (enableDownload) => {
|
const deactivateEditControls = (enableDownload) => {
|
||||||
setDisabledEditControls(true);
|
storeToolbarSettings.setDisabledEditControls(true);
|
||||||
if (enableDownload) {
|
if (enableDownload) {
|
||||||
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
||||||
} else {
|
} else {
|
||||||
setDisabledSettings(true);
|
storeToolbarSettings.setDisabledSettings(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const [disabledControls, setDisabledControls] = useState(true);
|
|
||||||
const activateControls = () => {
|
const activateControls = () => {
|
||||||
setDisabledControls(false);
|
storeToolbarSettings.setDisabledControls(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onEditDocument = () => {
|
const onEditDocument = () => {
|
||||||
|
|
|
@ -97,7 +97,7 @@ class MainPage extends Component {
|
||||||
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
||||||
{/* Top Navbar */}
|
{/* Top Navbar */}
|
||||||
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
||||||
{showLogo && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
||||||
<Subnavbar>
|
<Subnavbar>
|
||||||
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
||||||
<Search useSuspense={false}/>
|
<Search useSuspense={false}/>
|
||||||
|
|
|
@ -6,10 +6,34 @@ export class storeToolbarSettings {
|
||||||
isCanUndo: observable,
|
isCanUndo: observable,
|
||||||
setCanUndo: action,
|
setCanUndo: action,
|
||||||
isCanRedo: observable,
|
isCanRedo: observable,
|
||||||
setCanRedo: action
|
setCanRedo: action,
|
||||||
|
disabledControls: observable,
|
||||||
|
setDisabledControls: action,
|
||||||
|
disabledEditControls: observable,
|
||||||
|
setDisabledEditControls: action,
|
||||||
|
disabledSettings: observable,
|
||||||
|
setDisabledSettings: action
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disabledControls = true;
|
||||||
|
|
||||||
|
setDisabledControls(value) {
|
||||||
|
this.disabledControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledEditControls = false;
|
||||||
|
|
||||||
|
setDisabledEditControls(value) {
|
||||||
|
this.disabledEditControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledSettings = false;
|
||||||
|
|
||||||
|
setDisabledSettings(value) {
|
||||||
|
this.disabledSettings = value;
|
||||||
|
}
|
||||||
|
|
||||||
isCanUndo = false;
|
isCanUndo = false;
|
||||||
|
|
||||||
setCanUndo(can) {
|
setCanUndo(can) {
|
||||||
|
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
@ -4,7 +4,7 @@ import { f7 } from 'framework7-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolbarView from "../view/Toolbar";
|
import ToolbarView from "../view/Toolbar";
|
||||||
|
|
||||||
const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects', 'storeToolbarSettings')(observer(props => {
|
const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects', 'storeToolbarSettings', 'storePresentationInfo')(observer(props => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("Toolbar", { returnObjects: true });
|
const _t = t("Toolbar", { returnObjects: true });
|
||||||
|
|
||||||
|
@ -20,9 +20,14 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects'
|
||||||
const isCanUndo = storeToolbarSettings.isCanUndo;
|
const isCanUndo = storeToolbarSettings.isCanUndo;
|
||||||
const isCanRedo = storeToolbarSettings.isCanRedo;
|
const isCanRedo = storeToolbarSettings.isCanRedo;
|
||||||
const disabledPreview = storeToolbarSettings.countPages <= 0;
|
const disabledPreview = storeToolbarSettings.countPages <= 0;
|
||||||
|
const disabledControls = storeToolbarSettings.disabledControls;
|
||||||
|
const disabledEditControls = storeToolbarSettings.disabledEditControls;
|
||||||
|
const disabledSettings = storeToolbarSettings.disabledSettings;
|
||||||
|
|
||||||
|
const docInfo = props.storePresentationInfo;
|
||||||
|
const docTitle = docInfo.dataDoc ? docInfo.dataDoc.title : '';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Common.Notifications.on('setdoctitle', setDocTitle);
|
|
||||||
Common.Gateway.on('init', loadConfig);
|
Common.Gateway.on('init', loadConfig);
|
||||||
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
||||||
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
||||||
|
@ -35,24 +40,19 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects'
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Common.Notifications.off('setdoctitle', setDocTitle);
|
|
||||||
Common.Notifications.off('toolbar:activatecontrols', activateControls);
|
Common.Notifications.off('toolbar:activatecontrols', activateControls);
|
||||||
Common.Notifications.off('toolbar:deactivateeditcontrols', deactivateEditControls);
|
Common.Notifications.off('toolbar:deactivateeditcontrols', deactivateEditControls);
|
||||||
Common.Notifications.off('goback', goBack);
|
Common.Notifications.off('goback', goBack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [docTitle, resetDocTitle] = useState('');
|
|
||||||
const setDocTitle = (title) => {
|
|
||||||
resetDocTitle(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Back button
|
// Back button
|
||||||
const [isShowBack, setShowBack] = useState(false);
|
const [isShowBack, setShowBack] = useState(appOptions.canBackToFolder);
|
||||||
const loadConfig = (data) => {
|
const loadConfig = (data) => {
|
||||||
if (data && data.config && data.config.canBackToFolder !== false &&
|
if (data && data.config && data.config.canBackToFolder !== false &&
|
||||||
data.config.customization && data.config.customization.goback &&
|
data.config.customization && data.config.customization.goback &&
|
||||||
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose)) {
|
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose))
|
||||||
|
{
|
||||||
setShowBack(true);
|
setShowBack(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -108,21 +108,17 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const [disabledEditControls, setDisabledEditControls] = useState(false);
|
|
||||||
const [disabledSettings, setDisabledSettings] = useState(false);
|
|
||||||
const deactivateEditControls = (enableDownload) => {
|
const deactivateEditControls = (enableDownload) => {
|
||||||
setDisabledEditControls(true);
|
storeToolbarSettings.setDisabledEditControls(true);
|
||||||
if (enableDownload) {
|
if (enableDownload) {
|
||||||
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
||||||
} else {
|
} else {
|
||||||
setDisabledSettings(true);
|
storeToolbarSettings.setDisabledSettings(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const [disabledControls, setDisabledControls] = useState(true);
|
|
||||||
const activateControls = () => {
|
const activateControls = () => {
|
||||||
setDisabledControls(false);
|
storeToolbarSettings.setDisabledControls(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onEditDocument = () => {
|
const onEditDocument = () => {
|
||||||
|
|
|
@ -83,3 +83,45 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Theme
|
||||||
|
|
||||||
|
.slide-theme {
|
||||||
|
&__list {
|
||||||
|
margin: auto;
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding-left: 18px;
|
||||||
|
padding-right: 18px;
|
||||||
|
padding-bottom: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item-inner:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.item-theme {
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: 0 0 0 1px rgba(0,0,0,.15);
|
||||||
|
width: 88px;
|
||||||
|
height: 40px;
|
||||||
|
margin-top: 14px;
|
||||||
|
background-image: ~"url(@{app-image-path}/themes/themes.png)";
|
||||||
|
display: block;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
.item-theme.active:before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
right: -5px;
|
||||||
|
bottom: -5px;
|
||||||
|
z-index: 1;
|
||||||
|
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="#aa5252"><g><circle fill="#fff" cx="11" cy="11" r="11"/><path d="M11,21A10,10,0,1,1,21,11,10,10,0,0,1,11,21h0ZM17.4,7.32L17.06,7a0.48,0.48,0,0,0-.67,0l-7,6.84L6.95,11.24a0.51,0.51,0,0,0-.59.08L6,11.66a0.58,0.58,0,0,0,0,.65l3.19,3.35a0.38,0.38,0,0,0,.39,0L17.4,8a0.48,0.48,0,0,0,0-.67h0Z"/></g></svg>');
|
||||||
|
}
|
||||||
|
}
|
|
@ -105,7 +105,7 @@ class MainPage extends Component {
|
||||||
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
||||||
{/* Top Navbar */}
|
{/* Top Navbar */}
|
||||||
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
||||||
{showLogo && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
{showLogo && appOptions.canBranding && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
||||||
<Subnavbar>
|
<Subnavbar>
|
||||||
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
||||||
<Search useSuspense={false}/>
|
<Search useSuspense={false}/>
|
||||||
|
|
|
@ -11,6 +11,7 @@ export class storeAppOptions {
|
||||||
|
|
||||||
lostEditingRights: observable,
|
lostEditingRights: observable,
|
||||||
changeEditingRights: action,
|
changeEditingRights: action,
|
||||||
|
canBrandingExt: observable,
|
||||||
|
|
||||||
isDocReady: observable,
|
isDocReady: observable,
|
||||||
changeDocReady: action
|
changeDocReady: action
|
||||||
|
@ -19,6 +20,7 @@ export class storeAppOptions {
|
||||||
|
|
||||||
isEdit = false;
|
isEdit = false;
|
||||||
canViewComments = false;
|
canViewComments = false;
|
||||||
|
canBrandingExt = false;
|
||||||
config = {};
|
config = {};
|
||||||
|
|
||||||
lostEditingRights = false;
|
lostEditingRights = false;
|
||||||
|
|
|
@ -8,10 +8,34 @@ export class storeToolbarSettings {
|
||||||
isCanRedo: observable,
|
isCanRedo: observable,
|
||||||
setCanRedo: action,
|
setCanRedo: action,
|
||||||
countPages: observable,
|
countPages: observable,
|
||||||
setCountPages: action
|
setCountPages: action,
|
||||||
|
disabledControls: observable,
|
||||||
|
setDisabledControls: action,
|
||||||
|
disabledEditControls: observable,
|
||||||
|
setDisabledEditControls: action,
|
||||||
|
disabledSettings: observable,
|
||||||
|
setDisabledSettings: action
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disabledControls = true;
|
||||||
|
|
||||||
|
setDisabledControls(value) {
|
||||||
|
this.disabledControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledEditControls = false;
|
||||||
|
|
||||||
|
setDisabledEditControls(value) {
|
||||||
|
this.disabledEditControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledSettings = false;
|
||||||
|
|
||||||
|
setDisabledSettings(value) {
|
||||||
|
this.disabledSettings = value;
|
||||||
|
}
|
||||||
|
|
||||||
isCanUndo = false;
|
isCanUndo = false;
|
||||||
|
|
||||||
setCanUndo(can) {
|
setCanUndo(can) {
|
||||||
|
|
|
@ -24,10 +24,12 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
|
||||||
const storeToolbarSettings = props.storeToolbarSettings;
|
const storeToolbarSettings = props.storeToolbarSettings;
|
||||||
const isCanUndo = storeToolbarSettings.isCanUndo;
|
const isCanUndo = storeToolbarSettings.isCanUndo;
|
||||||
const isCanRedo = storeToolbarSettings.isCanRedo;
|
const isCanRedo = storeToolbarSettings.isCanRedo;
|
||||||
|
const disabledControls = storeToolbarSettings.disabledControls;
|
||||||
|
const disabledEditControls = storeToolbarSettings.disabledEditControls;
|
||||||
|
const disabledSettings = storeToolbarSettings.disabledSettings;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Common.Gateway.on('init', loadConfig);
|
Common.Gateway.on('init', loadConfig);
|
||||||
|
|
||||||
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
Common.Notifications.on('toolbar:activatecontrols', activateControls);
|
||||||
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
Common.Notifications.on('toolbar:deactivateeditcontrols', deactivateEditControls);
|
||||||
Common.Notifications.on('goback', goBack);
|
Common.Notifications.on('goback', goBack);
|
||||||
|
@ -48,11 +50,12 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
|
||||||
});
|
});
|
||||||
|
|
||||||
// Back button
|
// Back button
|
||||||
const [isShowBack, setShowBack] = useState(false);
|
const [isShowBack, setShowBack] = useState(appOptions.canBackToFolder);
|
||||||
const loadConfig = (data) => {
|
const loadConfig = (data) => {
|
||||||
if (data && data.config && data.config.canBackToFolder !== false &&
|
if (data && data.config && data.config.canBackToFolder !== false &&
|
||||||
data.config.customization && data.config.customization.goback &&
|
data.config.customization && data.config.customization.goback &&
|
||||||
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose)) {
|
(data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose))
|
||||||
|
{
|
||||||
setShowBack(true);
|
setShowBack(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -108,26 +111,21 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const [disabledEditControls, setDisabledEditControls] = useState(false);
|
|
||||||
|
|
||||||
const onApiActiveSheetChanged = (index) => {
|
const onApiActiveSheetChanged = (index) => {
|
||||||
Common.Notifications.trigger('comments:filterchange', ['doc', 'sheet' + Common.EditorApi.get().asc_getWorksheetId(index)], false );
|
Common.Notifications.trigger('comments:filterchange', ['doc', 'sheet' + Common.EditorApi.get().asc_getWorksheetId(index)], false );
|
||||||
};
|
};
|
||||||
|
|
||||||
const [disabledSettings, setDisabledSettings] = useState(false);
|
|
||||||
const deactivateEditControls = (enableDownload) => {
|
const deactivateEditControls = (enableDownload) => {
|
||||||
setDisabledEditControls(true);
|
storeToolbarSettings.setDisabledEditControls(true);
|
||||||
if (enableDownload) {
|
if (enableDownload) {
|
||||||
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
//DE.getController('Settings').setMode({isDisconnected: true, enableDownload: enableDownload});
|
||||||
} else {
|
} else {
|
||||||
setDisabledSettings(true);
|
storeToolbarSettings.setDisabledSettings(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const [disabledControls, setDisabledControls] = useState(true);
|
|
||||||
const activateControls = () => {
|
const activateControls = () => {
|
||||||
setDisabledControls(false);
|
storeToolbarSettings.setDisabledControls(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onEditDocument = () => {
|
const onEditDocument = () => {
|
||||||
|
|
|
@ -1,79 +1,79 @@
|
||||||
|
|
||||||
.chart-types .thumb {
|
.chart-types .thumb {
|
||||||
@relativepath: '../../resources/img';
|
//@relativepath: '../../resources/img';
|
||||||
&.bar-normal {
|
&.bar-normal {
|
||||||
background-image: url('@{relativepath}/charts/chart-03.png');
|
background-image: url('@{app-image-path}/charts/chart-03.png');
|
||||||
}
|
}
|
||||||
&.bar-stacked {
|
&.bar-stacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-02.png');
|
background-image: url('@{app-image-path}/charts/chart-02.png');
|
||||||
}
|
}
|
||||||
&.bar-pstacked {
|
&.bar-pstacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-01.png');
|
background-image: url('@{app-image-path}/charts/chart-01.png');
|
||||||
}
|
}
|
||||||
&.line-normal {
|
&.line-normal {
|
||||||
background-image: url('@{relativepath}/charts/chart-06.png');
|
background-image: url('@{app-image-path}/charts/chart-06.png');
|
||||||
}
|
}
|
||||||
&.line-stacked {
|
&.line-stacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-05.png');
|
background-image: url('@{app-image-path}/charts/chart-05.png');
|
||||||
}
|
}
|
||||||
&.line-pstacked {
|
&.line-pstacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-04.png');
|
background-image: url('@{app-image-path}/charts/chart-04.png');
|
||||||
}
|
}
|
||||||
&.hbar-normal {
|
&.hbar-normal {
|
||||||
background-image: url('@{relativepath}/charts/chart-09.png');
|
background-image: url('@{app-image-path}/charts/chart-09.png');
|
||||||
}
|
}
|
||||||
&.hbar-stacked {
|
&.hbar-stacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-08.png');
|
background-image: url('@{app-image-path}/charts/chart-08.png');
|
||||||
}
|
}
|
||||||
&.hbar-pstacked {
|
&.hbar-pstacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-07.png');
|
background-image: url('@{app-image-path}/charts/chart-07.png');
|
||||||
}
|
}
|
||||||
&.area-normal {
|
&.area-normal {
|
||||||
background-image: url('@{relativepath}/charts/chart-12.png');
|
background-image: url('@{app-image-path}/charts/chart-12.png');
|
||||||
}
|
}
|
||||||
&.area-stacked {
|
&.area-stacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-11.png');
|
background-image: url('@{app-image-path}/charts/chart-11.png');
|
||||||
}
|
}
|
||||||
&.area-pstacked {
|
&.area-pstacked {
|
||||||
background-image: url('@{relativepath}/charts/chart-10.png');
|
background-image: url('@{app-image-path}/charts/chart-10.png');
|
||||||
}
|
}
|
||||||
&.pie {
|
&.pie {
|
||||||
background-image: url('@{relativepath}/charts/chart-13.png');
|
background-image: url('@{app-image-path}/charts/chart-13.png');
|
||||||
}
|
}
|
||||||
&.doughnut {
|
&.doughnut {
|
||||||
background-image: url('@{relativepath}/charts/chart-14.png');
|
background-image: url('@{app-image-path}/charts/chart-14.png');
|
||||||
}
|
}
|
||||||
&.pie3d {
|
&.pie3d {
|
||||||
background-image: url('@{relativepath}/charts/chart-22.png');
|
background-image: url('@{app-image-path}/charts/chart-22.png');
|
||||||
}
|
}
|
||||||
&.scatter {
|
&.scatter {
|
||||||
background-image: url('@{relativepath}/charts/chart-15.png');
|
background-image: url('@{app-image-path}/charts/chart-15.png');
|
||||||
}
|
}
|
||||||
&.stock {
|
&.stock {
|
||||||
background-image: url('@{relativepath}/charts/chart-16.png');
|
background-image: url('@{app-image-path}/charts/chart-16.png');
|
||||||
}
|
}
|
||||||
&.line3d {
|
&.line3d {
|
||||||
background-image: url('@{relativepath}/charts/chart-21.png');
|
background-image: url('@{app-image-path}/charts/chart-21.png');
|
||||||
}
|
}
|
||||||
&.bar3dnormal {
|
&.bar3dnormal {
|
||||||
background-image: url('@{relativepath}/charts/chart-17.png');
|
background-image: url('@{app-image-path}/charts/chart-17.png');
|
||||||
}
|
}
|
||||||
&.bar3dstack {
|
&.bar3dstack {
|
||||||
background-image: url('@{relativepath}/charts/chart-18.png');
|
background-image: url('@{app-image-path}/charts/chart-18.png');
|
||||||
}
|
}
|
||||||
&.bar3dpstack {
|
&.bar3dpstack {
|
||||||
background-image: url('@{relativepath}/charts/chart-19.png');
|
background-image: url('@{app-image-path}/charts/chart-19.png');
|
||||||
}
|
}
|
||||||
&.hbar3dnormal {
|
&.hbar3dnormal {
|
||||||
background-image: url('@{relativepath}/charts/chart-25.png');
|
background-image: url('@{app-image-path}/charts/chart-25.png');
|
||||||
}
|
}
|
||||||
&.hbar3dstack {
|
&.hbar3dstack {
|
||||||
background-image: url('@{relativepath}/charts/chart-24.png');
|
background-image: url('@{app-image-path}/charts/chart-24.png');
|
||||||
}
|
}
|
||||||
&.hbar3dpstack {
|
&.hbar3dpstack {
|
||||||
background-image: url('@{relativepath}/charts/chart-23.png');
|
background-image: url('@{app-image-path}/charts/chart-23.png');
|
||||||
}
|
}
|
||||||
&.bar3dpsnormal {
|
&.bar3dpsnormal {
|
||||||
background-image: url('@{relativepath}/charts/chart-20.png');
|
background-image: url('@{app-image-path}/charts/chart-20.png');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ class MainPage extends Component {
|
||||||
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
||||||
{/* Top Navbar */}
|
{/* Top Navbar */}
|
||||||
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
||||||
{showLogo && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
||||||
<Subnavbar>
|
<Subnavbar>
|
||||||
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
||||||
<Search useSuspense={false}/>
|
<Search useSuspense={false}/>
|
||||||
|
|
|
@ -11,6 +11,7 @@ export class storeAppOptions {
|
||||||
|
|
||||||
lostEditingRights: observable,
|
lostEditingRights: observable,
|
||||||
changeEditingRights: action,
|
changeEditingRights: action,
|
||||||
|
canBranding: observable,
|
||||||
|
|
||||||
isDocReady: observable,
|
isDocReady: observable,
|
||||||
changeDocReady: action
|
changeDocReady: action
|
||||||
|
@ -25,6 +26,7 @@ export class storeAppOptions {
|
||||||
this.canViewComments = value;
|
this.canViewComments = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
canBranding = undefined;
|
||||||
lostEditingRights = false;
|
lostEditingRights = false;
|
||||||
changeEditingRights (value) {
|
changeEditingRights (value) {
|
||||||
this.lostEditingRights = value;
|
this.lostEditingRights = value;
|
||||||
|
@ -76,6 +78,8 @@ export class storeAppOptions {
|
||||||
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
||||||
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||||
permissions.edit = false;
|
permissions.edit = false;
|
||||||
|
this.canBranding = params.asc_getCustomization();
|
||||||
|
this.canBrandingExt = params.asc_getCanBranding() && (typeof this.customization == 'object');
|
||||||
this.canAutosave = true;
|
this.canAutosave = true;
|
||||||
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||||
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||||
|
@ -98,8 +102,6 @@ export class storeAppOptions {
|
||||||
this.trialMode = params.asc_getLicenseMode();
|
this.trialMode = params.asc_getLicenseMode();
|
||||||
this.canDownloadOrigin = permissions.download !== false;
|
this.canDownloadOrigin = permissions.download !== false;
|
||||||
this.canDownload = permissions.download !== false;
|
this.canDownload = permissions.download !== false;
|
||||||
this.canBranding = params.asc_getCustomization();
|
|
||||||
this.canBrandingExt = params.asc_getCanBranding() && (typeof this.customization == 'object');
|
|
||||||
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
||||||
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
||||||
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
||||||
|
|
|
@ -6,10 +6,34 @@ export class storeToolbarSettings {
|
||||||
isCanUndo: observable,
|
isCanUndo: observable,
|
||||||
setCanUndo: action,
|
setCanUndo: action,
|
||||||
isCanRedo: observable,
|
isCanRedo: observable,
|
||||||
setCanRedo: action
|
setCanRedo: action,
|
||||||
|
disabledControls: observable,
|
||||||
|
setDisabledControls: action,
|
||||||
|
disabledEditControls: observable,
|
||||||
|
setDisabledEditControls: action,
|
||||||
|
disabledSettings: observable,
|
||||||
|
setDisabledSettings: action
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disabledControls = true;
|
||||||
|
|
||||||
|
setDisabledControls(value) {
|
||||||
|
this.disabledControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledEditControls = false;
|
||||||
|
|
||||||
|
setDisabledEditControls(value) {
|
||||||
|
this.disabledEditControls = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
disabledSettings = false;
|
||||||
|
|
||||||
|
setDisabledSettings(value) {
|
||||||
|
this.disabledSettings = value;
|
||||||
|
}
|
||||||
|
|
||||||
isCanUndo = false;
|
isCanUndo = false;
|
||||||
|
|
||||||
setCanUndo(can) {
|
setCanUndo(can) {
|
||||||
|
|
|
@ -133,6 +133,7 @@ module.exports = {
|
||||||
globalVars: {
|
globalVars: {
|
||||||
"common-image-header-path": env === 'production' ? `../../../${editor}/mobile/resources/img/header` : '../../common/mobile/resources/img/header',
|
"common-image-header-path": env === 'production' ? `../../../${editor}/mobile/resources/img/header` : '../../common/mobile/resources/img/header',
|
||||||
"common-image-about-path": env === 'production' ? `../../../${editor}/mobile/resources/img/about` : '../../common/main/resources/img/about',
|
"common-image-about-path": env === 'production' ? `../../../${editor}/mobile/resources/img/about` : '../../common/main/resources/img/about',
|
||||||
|
"app-image-path": env === 'production' ? '../resources/img' : './resources/img',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +173,8 @@ module.exports = {
|
||||||
__PUBLISHER_NAME__: JSON.stringify(process.env.PUBLISHER_NAME || 'Ascensio System SIA'),
|
__PUBLISHER_NAME__: JSON.stringify(process.env.PUBLISHER_NAME || 'Ascensio System SIA'),
|
||||||
__APP_TITLE_TEXT__: JSON.stringify(process.env.APP_TITLE_TEXT ? process.env.APP_TITLE_TEXT : 'ONLYOFFICE'),
|
__APP_TITLE_TEXT__: JSON.stringify(process.env.APP_TITLE_TEXT ? process.env.APP_TITLE_TEXT : 'ONLYOFFICE'),
|
||||||
__COMPANY_NAME__: JSON.stringify(process.env.COMPANY_NAME ? process.env.COMPANY_NAME : 'ONLYOFFICE'),
|
__COMPANY_NAME__: JSON.stringify(process.env.COMPANY_NAME ? process.env.COMPANY_NAME : 'ONLYOFFICE'),
|
||||||
__HELP_URL__: JSON.stringify(process.env.HELP_URL || 'https://helpcenter.onlyoffice.com')
|
__HELP_URL__: JSON.stringify(process.env.HELP_URL || 'https://helpcenter.onlyoffice.com'),
|
||||||
|
__SALES_EMAIL__: JSON.stringify(process.env.__SALES_EMAIL__ || 'sales@onlyoffice.com'),
|
||||||
}),
|
}),
|
||||||
new webpack.BannerPlugin(`\n* Version: ${process.env.PRODUCT_VERSION} (build: ${process.env.BUILD_NUMBER})\n`),
|
new webpack.BannerPlugin(`\n* Version: ${process.env.PRODUCT_VERSION} (build: ${process.env.BUILD_NUMBER})\n`),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue