Merge pull request #949 from ONLYOFFICE/fix/fix-bugs-on-mobiles

Fix/fix bugs on mobiles
This commit is contained in:
maxkadushkin 2021-06-28 17:52:35 +03:00 committed by GitHub
commit adb073b2ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 203 additions and 51 deletions

View file

@ -340,7 +340,27 @@
"textMarginsW": "Left and right margins are too high for a given page width", "textMarginsW": "Left and right margins are too high for a given page width",
"textMarginsH": "Top and bottom margins are too high for a given page height", "textMarginsH": "Top and bottom margins are too high for a given page height",
"textCollaboration": "Collaboration", "textCollaboration": "Collaboration",
"textFindAndReplaceAll": "Find and Replace All" "textFindAndReplaceAll": "Find and Replace All",
"txtScheme1": "Office",
"txtScheme2": "Grayscale",
"txtScheme3": "Apex",
"txtScheme4": "Aspect",
"txtScheme5": "Civic",
"txtScheme6": "Concourse",
"txtScheme7": "Equity",
"txtScheme8": "Flow",
"txtScheme9": "Foundry",
"txtScheme10": "Median",
"txtScheme11": "Metro",
"txtScheme12": "Module",
"txtScheme13": "Opulent",
"txtScheme14": "Oriel",
"txtScheme15": "Origin",
"txtScheme16": "Paper",
"txtScheme17": "Solstice",
"txtScheme18": "Technic",
"txtScheme19": "Trek",
"txtScheme22": "New Office"
}, },
"Edit": { "Edit": {
"textClose": "Close", "textClose": "Close",

View file

@ -56,9 +56,9 @@ class AddTableController extends Component {
api.put_Table(parseInt(size[0]), parseInt(size[1]), type.toString()); api.put_Table(parseInt(size[0]), parseInt(size[1]), type.toString());
} }
} }
] ],
}).open(); on: {
dialog.on('opened', () => { open: () => {
picker = f7.picker.create({ picker = f7.picker.create({
containerEl: document.getElementById('picker-table-size'), containerEl: document.getElementById('picker-table-size'),
cols: [ cols: [
@ -77,7 +77,9 @@ class AddTableController extends Component {
rotateEffect: true, rotateEffect: true,
value: [3, 3] value: [3, 3]
}); });
}); }
}
}).open();
} }
render () { render () {

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(300, ++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

@ -162,6 +162,13 @@ const PageDocumentColorSchemes = props => {
const _t = t('Settings', {returnObjects: true}); const _t = t('Settings', {returnObjects: true});
const storeSettings = props.storeDocumentSettings; const storeSettings = props.storeDocumentSettings;
const allSchemes = storeSettings.allSchemes; const allSchemes = storeSettings.allSchemes;
const SchemeNames = [
_t.txtScheme1, _t.txtScheme2, _t.txtScheme3, _t.txtScheme4, _t.txtScheme5,
_t.txtScheme6, _t.txtScheme7, _t.txtScheme8, _t.txtScheme9, _t.txtScheme10,
_t.txtScheme11, _t.txtScheme12, _t.txtScheme13, _t.txtScheme14, _t.txtScheme15,
_t.txtScheme16, _t.txtScheme17, _t.txtScheme18, _t.txtScheme19, _t.txtScheme20,
_t.txtScheme21, _t.txtScheme22
];
return ( return (
<Page> <Page>
@ -169,8 +176,9 @@ const PageDocumentColorSchemes = props => {
<List> <List>
{ {
allSchemes ? allSchemes.map((scheme, index) => { allSchemes ? allSchemes.map((scheme, index) => {
const name = scheme.get_name();
return ( return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={scheme.get_name()} checked={stateScheme === index} <ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => { onChange={() => {
if(index !== curScheme) { if(index !== curScheme) {
setScheme(index); setScheme(index);

View file

@ -209,7 +209,27 @@
"textHighlight": "Highlight Results", "textHighlight": "Highlight Results",
"textReplace": "Replace", "textReplace": "Replace",
"textNoTextFound": "Text not Found", "textNoTextFound": "Text not Found",
"textCollaboration": "Collaboration" "textCollaboration": "Collaboration",
"txtScheme1": "Office",
"txtScheme2": "Grayscale",
"txtScheme3": "Apex",
"txtScheme4": "Aspect",
"txtScheme5": "Civic",
"txtScheme6": "Concourse",
"txtScheme7": "Equity",
"txtScheme8": "Flow",
"txtScheme9": "Foundry",
"txtScheme10": "Median",
"txtScheme11": "Metro",
"txtScheme12": "Module",
"txtScheme13": "Opulent",
"txtScheme14": "Oriel",
"txtScheme15": "Origin",
"txtScheme16": "Paper",
"txtScheme17": "Solstice",
"txtScheme18": "Technic",
"txtScheme19": "Trek",
"txtScheme22": "New Office"
}, },
"Add": { "Add": {
"textSlide": "Slide", "textSlide": "Slide",

View file

@ -64,9 +64,9 @@ class AddOtherController extends Component {
api.put_Table(parseInt(size[0]), parseInt(size[1]), undefined, type.toString()); api.put_Table(parseInt(size[0]), parseInt(size[1]), undefined, type.toString());
} }
} }
] ],
}).open(); on: {
dialog.on('opened', () => { open: () => {
picker = f7.picker.create({ picker = f7.picker.create({
containerEl: document.getElementById('picker-table-size'), containerEl: document.getElementById('picker-table-size'),
cols: [ cols: [
@ -85,7 +85,9 @@ class AddOtherController extends Component {
rotateEffect: true, rotateEffect: true,
value: [3, 3] value: [3, 3]
}); });
}); }
}
}).open();
} }
hideAddComment () { hideAddComment () {

View file

@ -38,6 +38,13 @@ const PagePresentationColorSchemes = props => {
const _t = t('View.Settings', {returnObjects: true}); const _t = t('View.Settings', {returnObjects: true});
const storePresentationSettings = props.storePresentationSettings; const storePresentationSettings = props.storePresentationSettings;
const allSchemes = storePresentationSettings.allSchemes; const allSchemes = storePresentationSettings.allSchemes;
const SchemeNames = [
_t.txtScheme1, _t.txtScheme2, _t.txtScheme3, _t.txtScheme4, _t.txtScheme5,
_t.txtScheme6, _t.txtScheme7, _t.txtScheme8, _t.txtScheme9, _t.txtScheme10,
_t.txtScheme11, _t.txtScheme12, _t.txtScheme13, _t.txtScheme14, _t.txtScheme15,
_t.txtScheme16, _t.txtScheme17, _t.txtScheme18, _t.txtScheme19, _t.txtScheme20,
_t.txtScheme21, _t.txtScheme22
];
return ( return (
<Page> <Page>
@ -45,8 +52,9 @@ const PagePresentationColorSchemes = props => {
<List> <List>
{ {
allSchemes ? allSchemes.map((scheme, index) => { allSchemes ? allSchemes.map((scheme, index) => {
const name = scheme.get_name();
return ( return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={scheme.get_name()} checked={stateScheme === index} <ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => { onChange={() => {
if(index !== curScheme) { if(index !== curScheme) {
setScheme(index); setScheme(index);

View file

@ -28,7 +28,39 @@
"txtXAxis": "X Axis", "txtXAxis": "X Axis",
"txtYAxis": "Y Axis", "txtYAxis": "Y Axis",
"txtArt": "Your text here", "txtArt": "Your text here",
"txtAccent": "Accent" "txtAccent": "Accent",
"txtTable": "Table",
"txtPrintArea": "Print_Area",
"txtConfidential": "Confidential",
"txtPreparedBy": "Prepared by",
"txtPage": "Page",
"txtPageOf": "Page %1 of %2",
"txtPages": "Pages",
"txtDate": "Date",
"txtTime": "Time",
"txtTab": "Tab",
"txtFile": "File",
"txtColumn": "Column",
"txtRow": "Row",
"txtByField": "%1 of %2",
"txtAll": "(All)",
"txtValues": "Values",
"txtGrandTotal": "Grand Total",
"txtRowLbls": "Row Labels",
"txtColLbls": "Column Labels",
"txtMultiSelect": "Multi-Select (Alt+S)",
"txtClearFilter": "Clear Filter (Alt+C)",
"txtBlank": "(blank)",
"txtGroup": "Group",
"txtSeconds": "Seconds",
"txtMinutes": "Minutes",
"txtHours": "Hours",
"txtDays": "Days",
"txtMonths": "Months",
"txtQuarters": "Quarters",
"txtYears": "Years",
"txtOr": "%1 or %2",
"txtQuarter": "Qtr"
}, },
"textGuest": "Guest", "textGuest": "Guest",
"textAnonymous": "Anonymous", "textAnonymous": "Anonymous",
@ -513,7 +545,27 @@
"textValues": "Values", "textValues": "Values",
"textNoTextFound": "Text not found", "textNoTextFound": "Text not found",
"textReplaceAll": "Replace All", "textReplaceAll": "Replace All",
"textCollaboration": "Collaboration" "textCollaboration": "Collaboration",
"txtScheme1": "Office",
"txtScheme2": "Grayscale",
"txtScheme3": "Apex",
"txtScheme4": "Aspect",
"txtScheme5": "Civic",
"txtScheme6": "Concourse",
"txtScheme7": "Equity",
"txtScheme8": "Flow",
"txtScheme9": "Foundry",
"txtScheme10": "Median",
"txtScheme11": "Metro",
"txtScheme12": "Module",
"txtScheme13": "Opulent",
"txtScheme14": "Oriel",
"txtScheme15": "Origin",
"txtScheme16": "Paper",
"txtScheme17": "Solstice",
"txtScheme18": "Technic",
"txtScheme19": "Trek",
"txtScheme22": "New Office"
} }
}, },
"Statusbar": { "Statusbar": {

View file

@ -221,7 +221,39 @@ class MainController extends Component {
'Diagram Title': _t.txtDiagramTitle, 'Diagram Title': _t.txtDiagramTitle,
'X Axis': _t.txtXAxis, 'X Axis': _t.txtXAxis,
'Y Axis': _t.txtYAxis, 'Y Axis': _t.txtYAxis,
'Your text here': _t.txtArt 'Your text here': _t.txtArt,
'Table': _t.txtTable,
'Print_Area': _t.txtPrintArea,
'Confidential': _t.txtConfidential,
'Prepared by ': _t.txtPreparedBy + ' ',
'Page': _t.txtPage,
'Page %1 of %2': _t.txtPageOf,
'Pages': _t.txtPages,
'Date': _t.txtDate,
'Time': _t.txtTime,
'Tab': _t.txtTab,
'File': _t.txtFile,
'Column': _t.txtColumn,
'Row': _t.txtRow,
'%1 of %2': _t.txtByField,
'(All)': _t.txtAll,
'Values': _t.txtValues,
'Grand Total': _t.txtGrandTotal,
'Row Labels': _t.txtRowLbls,
'Column Labels': _t.txtColLbls,
'Multi-Select (Alt+S)': _t.txtMultiSelect,
'Clear Filter (Alt+C)': _t.txtClearFilter,
'(blank)': _t.txtBlank,
'Group': _t.txtGroup,
'Seconds': _t.txtSeconds,
'Minutes': _t.txtMinutes,
'Hours': _t.txtHours,
'Days': _t.txtDays,
'Months': _t.txtMonths,
'Quarters': _t.txtQuarters,
'Years': _t.txtYears,
'%1 or %2': _t.txtOr,
'Qtr': _t.txtQuarter
}; };
styleNames.forEach(function(item){ styleNames.forEach(function(item){
translate[item] = _t['txtStyle_' + item.replace(/ /g, '_')] || item; translate[item] = _t['txtStyle_' + item.replace(/ /g, '_')] || item;

View file

@ -11,6 +11,13 @@ const PageSpreadsheetColorSchemes = props => {
const _t = t('View.Settings', {returnObjects: true}); const _t = t('View.Settings', {returnObjects: true});
const storeSpreadsheetSettings = props.storeSpreadsheetSettings; const storeSpreadsheetSettings = props.storeSpreadsheetSettings;
const allSchemes = storeSpreadsheetSettings.allSchemes; const allSchemes = storeSpreadsheetSettings.allSchemes;
const SchemeNames = [
_t.txtScheme1, _t.txtScheme2, _t.txtScheme3, _t.txtScheme4, _t.txtScheme5,
_t.txtScheme6, _t.txtScheme7, _t.txtScheme8, _t.txtScheme9, _t.txtScheme10,
_t.txtScheme11, _t.txtScheme12, _t.txtScheme13, _t.txtScheme14, _t.txtScheme15,
_t.txtScheme16, _t.txtScheme17, _t.txtScheme18, _t.txtScheme19, _t.txtScheme20,
_t.txtScheme21, _t.txtScheme22
];
return ( return (
<Page> <Page>
@ -18,8 +25,9 @@ const PageSpreadsheetColorSchemes = props => {
<List> <List>
{ {
allSchemes ? allSchemes.map((scheme, index) => { allSchemes ? allSchemes.map((scheme, index) => {
const name = scheme.get_name();
return ( return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={scheme.get_name()} checked={stateScheme === index} <ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => { onChange={() => {
if(index !== curScheme) { if(index !== curScheme) {
setScheme(index); setScheme(index);