Merge branch 'feature/mobile-apps-on-reactjs-fixes' into feature/mobile-apps-on-reactjs

This commit is contained in:
JuliaSvinareva 2021-04-15 13:26:46 +03:00
commit 92520c0e13
19 changed files with 93 additions and 27 deletions

View file

@ -272,13 +272,13 @@ class SearchView extends Component {
</div> </div>
<div className="searchbar-inner__center"> <div className="searchbar-inner__center">
<div className="searchbar-input-wrap"> <div className="searchbar-input-wrap">
<input placeholder={_t.textSearch} type="search" value={searchQuery} <input placeholder={_t.textSearch} type="search" maxLength="255" value={searchQuery}
onChange={e => {this.changeSearchQuery(e.target.value)}} /> onChange={e => {this.changeSearchQuery(e.target.value)}} />
{isIos ? <i className="searchbar-icon" /> : null} {isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" /> <span className="input-clear-button" />
</div> </div>
<div className="searchbar-input-wrap" style={!usereplace ? hidden: null}> <div className="searchbar-input-wrap" style={!usereplace ? hidden: null}>
<input placeholder={_t.textReplace} type="search" id="idx-replace-val" value={replaceQuery} <input placeholder={_t.textReplace} type="search" maxLength="255" id="idx-replace-val" value={replaceQuery}
onChange={e => {this.changeReplaceQuery(e.target.value)}} /> onChange={e => {this.changeReplaceQuery(e.target.value)}} />
{isIos ? <i className="searchbar-icon" /> : null} {isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" /> <span className="input-clear-button" />

View file

@ -116,6 +116,12 @@
} }
} }
.dialog {
.content-block {
padding: 0;
}
}
.about { .about {
.content-block { .content-block {
margin: 0 auto 15px; margin: 0 auto 15px;
@ -224,6 +230,7 @@
height: 38px; height: 38px;
margin-top: 14px; margin-top: 14px;
background-image: url(../img/themes/themes.png); background-image: url(../img/themes/themes.png);
display: block;
} }
.item-theme.active:before { .item-theme.active:before {
content: ''; content: '';
@ -727,6 +734,24 @@ input[type="number"]::-webkit-inner-spin-button {
} }
.picker-3d {
.picker-item {
padding: 0;
text-align: left;
font-size: 16px;
span {
padding: 0;
}
}
}
.picker-center-highlight {
width: 100%;
left: 0;
right: 0;
}

View file

@ -517,10 +517,15 @@ class MainController extends Component {
switch (type) { switch (type) {
case 0: case 0:
storeTextSettings.resetBullets(subtype); storeTextSettings.resetBullets(subtype);
storeTextSettings.resetNumbers(-1);
break; break;
case 1: case 1:
storeTextSettings.resetNumbers(subtype); storeTextSettings.resetNumbers(subtype);
storeTextSettings.resetBullets(-1);
break; break;
default:
storeTextSettings.resetBullets(-1);
storeTextSettings.resetNumbers(-1);
} }
}); });
this.api.asc_registerCallback('asc_onPrAlign', (align) => { this.api.asc_registerCallback('asc_onPrAlign', (align) => {

View file

@ -18,7 +18,7 @@ class EditTextController extends Component {
if (isDecrement) { if (isDecrement) {
typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size); typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size);
} else { } else {
typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(100, ++size); typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(300, ++size);
} }
if (typeof size !== 'undefined') { if (typeof size !== 'undefined') {
api.put_TextPrFontSize(size); api.put_TextPrFontSize(size);

View file

@ -43,16 +43,35 @@ const Settings = props => {
closeModal(); closeModal();
}, 1); }, 1);
} }
} };
const onPrint = () => { const onPrint = () => {
setTimeout(() => { setTimeout(() => {
Common.EditorApi.get().asc_Print(); Common.EditorApi.get().asc_Print();
}, 1); }, 1);
closeModal(); closeModal();
};
const showHelp = () => {
let url = __HELP_URL__;
// let url = 'https://helpcenter.onlyoffice.com';
if (url.charAt(url.length-1) !== '/') {
url += '/';
} }
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} onReaderMode={onReaderMode} onPrint={onPrint}/> if (Device.sailfish || Device.android) {
url+='mobile-applications/documents/mobile-web-editors/android/index.aspx';
}
else {
url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx';
}
closeModal();
window.open(url, "_blank");
};
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} onReaderMode={onReaderMode} onPrint={onPrint} showHelp={showHelp}/>
}; };
export default inject("storeAppOptions")(observer(Settings)); export default inject("storeAppOptions")(observer(Settings));

View file

@ -76,10 +76,10 @@ const PageWrap = props => {
} }
<List> <List>
<ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}> <ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}>
<Toggle checked={moveText} onToggleChange={() => {props.onMoveText(!moveText)}}/> <Toggle checked={moveText} onChange={() => {props.onMoveText(!moveText)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textAllowOverlap}> <ListItem title={_t.textAllowOverlap}>
<Toggle checked={overlap} onToggleChange={() => {props.onOverlap(!overlap)}}/> <Toggle checked={overlap} onChange={() => {props.onOverlap(!overlap)}}/>
</ListItem> </ListItem>
</List> </List>
{ {

View file

@ -70,10 +70,10 @@ const PageWrap = props => {
<Page> <Page>
<Navbar title={_t.textWrap} backLink={_t.textBack} /> <Navbar title={_t.textWrap} backLink={_t.textBack} />
<List> <List>
<ListItem title={_t.textInline} radio checked={wrapType === 'inline'} onClick={() => {props.onWrapType(c_tableWrap.TABLE_WRAP_NONE)}}> <ListItem title={_t.textInline} radio checked={wrapType === 'inline'} onChange={() => {props.onWrapType(c_tableWrap.TABLE_WRAP_NONE)}}>
{!isAndroid && <Icon slot="media" icon="icon-wrap-table-inline"></Icon>} {!isAndroid && <Icon slot="media" icon="icon-wrap-table-inline"></Icon>}
</ListItem> </ListItem>
<ListItem title={_t.textFlow} radio checked={wrapType === 'flow'} onClick={() => {props.onWrapType(c_tableWrap.TABLE_WRAP_PARALLEL)}}> <ListItem title={_t.textFlow} radio checked={wrapType === 'flow'} onChange={() => {props.onWrapType(c_tableWrap.TABLE_WRAP_PARALLEL)}}>
{!isAndroid && <Icon slot="media" icon="icon-wrap-table-flow"></Icon>} {!isAndroid && <Icon slot="media" icon="icon-wrap-table-flow"></Icon>}
</ListItem> </ListItem>
</List> </List>

View file

@ -131,6 +131,7 @@ const PageBullets = props => {
]; ];
const storeTextSettings = props.storeTextSettings; const storeTextSettings = props.storeTextSettings;
const typeBullets = storeTextSettings.typeBullets; const typeBullets = storeTextSettings.typeBullets;
return( return(
<Page className='bullets dataview'> <Page className='bullets dataview'>
<Navbar title={t('Edit.textBullets')} backLink={t('Edit.textBack')} /> <Navbar title={t('Edit.textBullets')} backLink={t('Edit.textBack')} />

View file

@ -151,7 +151,7 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
<Icon slot="media" icon="icon-info"></Icon> <Icon slot="media" icon="icon-info"></Icon>
</ListItem> </ListItem>
{_canHelp && {_canHelp &&
<ListItem title={_t.textHelp} link="#"> <ListItem title={_t.textHelp} link="#" onClick={props.showHelp}>
<Icon slot="media" icon="icon-help"></Icon> <Icon slot="media" icon="icon-help"></Icon>
</ListItem> </ListItem>
} }
@ -182,10 +182,10 @@ class SettingsView extends Component {
return ( return (
show_popover ? show_popover ?
<Popover id="settings-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}> <Popover id="settings-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint}/> <SettingsList inPopover={true} onOptionClick={this.onoptionclick} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp}/>
</Popover> : </Popover> :
<Popup className="settings-popup" onPopupClosed={() => this.props.onclosed()}> <Popup className="settings-popup" onPopupClosed={() => this.props.onclosed()}>
<SettingsList onOptionClick={this.onoptionclick} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint}/> <SettingsList onOptionClick={this.onoptionclick} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp}/>
</Popup> </Popup>
) )
} }

View file

@ -273,7 +273,8 @@
"textSearch": "Search", "textSearch": "Search",
"textCaseSensitive": "Case Sensitive", "textCaseSensitive": "Case Sensitive",
"textHighlight": "Highlight Results", "textHighlight": "Highlight Results",
"textNoTextFound": "Text not Found" "textNoTextFound": "Text not Found",
"textSelectObjectToEdit": "Select object to edit"
} }
}, },
"Common": { "Common": {

View file

@ -271,9 +271,11 @@ class MainController extends Component {
switch (type) { switch (type) {
case 0: case 0:
storeTextSettings.resetBullets(subtype); storeTextSettings.resetBullets(subtype);
storeTextSettings.resetNumbers(-1);
break; break;
case 1: case 1:
storeTextSettings.resetNumbers(subtype); storeTextSettings.resetNumbers(subtype);
storeTextSettings.resetBullets(-1);
break; break;
default: default:
storeTextSettings.resetBullets(-1); storeTextSettings.resetBullets(-1);

View file

@ -132,7 +132,7 @@ class EditTextController extends Component {
if (isDecrement) { if (isDecrement) {
typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size); typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size);
} else { } else {
typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(100, ++size); typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(300, ++size);
} }
if (typeof size !== 'undefined') { if (typeof size !== 'undefined') {
api.put_TextPrFontSize(size); api.put_TextPrFontSize(size);

View file

@ -73,9 +73,11 @@ const AddLayoutContent = ({ tabs }) => {
const AddTabs = props => { const AddTabs = props => {
const { t } = useTranslation(); const { t } = useTranslation();
const _t = t('View.Add', {returnObjects: true}); const _t = t('View.Add', {returnObjects: true});
const api = Common.EditorApi.get();
const countPages = api.getCountPages();
const showPanels = props.showPanels; const showPanels = props.showPanels;
const tabs = []; const tabs = [];
if (!showPanels) { if (!showPanels && countPages) {
tabs.push({ tabs.push({
caption: _t.textSlide, caption: _t.textSlide,
id: 'add-slide', id: 'add-slide',
@ -101,6 +103,14 @@ const AddTabs = props => {
component: <AddOtherController/> component: <AddOtherController/>
}); });
} }
if(!showPanels && !countPages) {
tabs.push({
caption: _t.textSlide,
id: 'add-slide',
icon: 'icon-add-slide',
component: <AddSlideController />
});
}
if (showPanels && showPanels === 'link') { if (showPanels && showPanels === 'link') {
tabs.push({ tabs.push({
caption: _t.textAddLink, caption: _t.textAddLink,

View file

@ -60,24 +60,24 @@ const PageStyleOptions = props => {
<Navbar title={_t.textOptions} backLink={_t.textBack}/> <Navbar title={_t.textOptions} backLink={_t.textBack}/>
<List> <List>
<ListItem title={_t.textHeaderRow}> <ListItem title={_t.textHeaderRow}>
<Toggle checked={isFirstRow} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/> <Toggle checked={isFirstRow} onChange={() => {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textTotalRow}> <ListItem title={_t.textTotalRow}>
<Toggle checked={isLastRow} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 1, !isLastRow)}}/> <Toggle checked={isLastRow} onChange={() => {props.onCheckTemplateChange(tableLook, 1, !isLastRow)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textBandedRow}> <ListItem title={_t.textBandedRow}>
<Toggle checked={isBandHor} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 2, !isBandHor)}}/> <Toggle checked={isBandHor} onChange={() => {props.onCheckTemplateChange(tableLook, 2, !isBandHor)}}/>
</ListItem> </ListItem>
</List> </List>
<List> <List>
<ListItem title={_t.textFirstColumn}> <ListItem title={_t.textFirstColumn}>
<Toggle checked={isFirstCol} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 3, !isFirstCol)}}/> <Toggle checked={isFirstCol} onChange={() => {props.onCheckTemplateChange(tableLook, 3, !isFirstCol)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textLastColumn}> <ListItem title={_t.textLastColumn}>
<Toggle checked={isLastCol} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 4, !isLastCol)}}/> <Toggle checked={isLastCol} onChange={() => {props.onCheckTemplateChange(tableLook, 4, !isLastCol)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textBandedColumn}> <ListItem title={_t.textBandedColumn}>
<Toggle checked={isBandVer} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 5, !isBandVer)}}/> <Toggle checked={isBandVer} onChange={() => {props.onCheckTemplateChange(tableLook, 5, !isBandVer)}}/>
</ListItem> </ListItem>
</List> </List>
</Page> </Page>

View file

@ -84,7 +84,8 @@ const SettingsList = withTranslation()(props => {
const showHelp = () => { const showHelp = () => {
// let url = '{{HELP_URL}}'; // let url = '{{HELP_URL}}';
let url = 'https://helpcenter.onlyoffice.com'; let url = __HELP_URL__;
// let url = 'https://helpcenter.onlyoffice.com';
if (url.charAt(url.length-1) !== '/') { if (url.charAt(url.length-1) !== '/') {
url += '/'; url += '/';

View file

@ -47,7 +47,7 @@ class EditCellController extends Component {
if (isDecrement) { if (isDecrement) {
typeof size === 'undefined' ? api.asc_decreaseFontSize() : size = Math.max(1, --size); typeof size === 'undefined' ? api.asc_decreaseFontSize() : size = Math.max(1, --size);
} else { } else {
typeof size === 'undefined' ? api.asc_increaseFontSize() : size = Math.min(100, ++size); typeof size === 'undefined' ? api.asc_increaseFontSize() : size = Math.min(409, ++size);
} }
if (typeof size !== 'undefined') { if (typeof size !== 'undefined') {

View file

@ -69,7 +69,7 @@ class EditTextController extends Component {
if (isDecrement) { if (isDecrement) {
typeof size === 'undefined' ? api.asc_decreaseFontSize() : size = Math.max(1, --size); typeof size === 'undefined' ? api.asc_decreaseFontSize() : size = Math.max(1, --size);
} else { } else {
typeof size === 'undefined' ? api.asc_increaseFontSize() : size = Math.min(100, ++size); typeof size === 'undefined' ? api.asc_increaseFontSize() : size = Math.min(409, ++size);
} }
if (typeof size !== 'undefined') { if (typeof size !== 'undefined') {

View file

@ -92,7 +92,8 @@ const SettingsList = withTranslation()(props => {
const showHelp = () => { const showHelp = () => {
// let url = '{{HELP_URL}}'; // let url = '{{HELP_URL}}';
let url = 'https://helpcenter.onlyoffice.com'; // let url = 'https://helpcenter.onlyoffice.com';
let url = __HELP_URL__;
if (url.charAt(url.length-1) !== '/') { if (url.charAt(url.length-1) !== '/') {
url += '/'; url += '/';

View file

@ -167,7 +167,8 @@ module.exports = {
__PUBLISHER_URL__: JSON.stringify('https://www.onlyoffice.com'), __PUBLISHER_URL__: JSON.stringify('https://www.onlyoffice.com'),
__PUBLISHER_NAME__: JSON.stringify('Ascensio System SIA'), __PUBLISHER_NAME__: JSON.stringify('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('https://helpcenter.onlyoffice.com')
}), }),
...(env === 'production' ? [ ...(env === 'production' ? [