Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/web-apps into release/v7.1.0
|
@ -66,17 +66,18 @@
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textReplaceText %></label>
|
<label class="header"><%= scope.textReplaceText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-quotes"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-quotes"></div>
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-hyphens"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyphens"></div>
|
||||||
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
|
||||||
|
<div class="padding-small" id="id-autocorrect-dialog-chk-double-space"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textApplyText %></label>
|
<label class="header"><%= scope.textApplyText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-bulleted"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-bulleted"></div>
|
||||||
<div id="id-autocorrect-dialog-chk-numbered"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-numbered"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,14 +86,14 @@
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textReplaceText %></label>
|
<label class="header"><%= scope.textReplaceText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textApplyAsWork %></label>
|
<label class="header"><%= scope.textApplyAsWork %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-new-rows"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-new-rows"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,7 +102,7 @@
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
|
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-fl-cells"></div>
|
<div id="id-autocorrect-dialog-chk-fl-cells"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -325,6 +325,17 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
|
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
|
||||||
me.api.asc_SetAutomaticNumberedLists(checked);
|
me.api.asc_SetAutomaticNumberedLists(checked);
|
||||||
});
|
});
|
||||||
|
this.chDoubleSpaces = new Common.UI.CheckBox({
|
||||||
|
el: panelAutoFormat.find('#id-autocorrect-dialog-chk-double-space'),
|
||||||
|
labelText: this.textDoubleSpaces,
|
||||||
|
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-double-space")
|
||||||
|
}).on('change', function(field, newValue, oldValue, eOpts){
|
||||||
|
var checked = (field.getValue()==='checked');
|
||||||
|
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-double-space", checked);
|
||||||
|
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-double-space", checked);
|
||||||
|
me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(checked);
|
||||||
|
});
|
||||||
|
this.chDoubleSpaces.setVisible(this.appPrefix=='de-');
|
||||||
// AutoCorrect
|
// AutoCorrect
|
||||||
this.chFLSentence = new Common.UI.CheckBox({
|
this.chFLSentence = new Common.UI.CheckBox({
|
||||||
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
|
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
|
||||||
|
@ -841,7 +852,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
textAutoCorrect: 'AutoCorrect',
|
textAutoCorrect: 'AutoCorrect',
|
||||||
textFLSentence: 'Capitalize first letter of sentences',
|
textFLSentence: 'Capitalize first letter of sentences',
|
||||||
textHyperlink: 'Internet and network paths with hyperlinks',
|
textHyperlink: 'Internet and network paths with hyperlinks',
|
||||||
textFLCells: 'Capitalize first letter of table cells'
|
textFLCells: 'Capitalize first letter of table cells',
|
||||||
|
textDoubleSpaces: 'Add period with double-space'
|
||||||
|
|
||||||
}, Common.Views.AutoCorrectDialog || {}))
|
}, Common.Views.AutoCorrectDialog || {}))
|
||||||
});
|
});
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ define([
|
||||||
var type = /^(?:(djvu))$/.exec(this.document.fileType);
|
var type = /^(?:(djvu))$/.exec(this.document.fileType);
|
||||||
this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
|
this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||||
this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
||||||
this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps|oxps))$/.test(this.document.fileType);
|
this.appOptions.canUseSelectHandTools = this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps|oxps))$/.test(this.document.fileType);
|
||||||
this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload;
|
this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload;
|
||||||
|
|
||||||
this.appOptions.fileKey = this.document.key;
|
this.appOptions.fileKey = this.document.key;
|
||||||
|
@ -2663,6 +2663,10 @@ define([
|
||||||
value = Common.localStorage.getBool("de-settings-autoformat-fl-cells", true);
|
value = Common.localStorage.getBool("de-settings-autoformat-fl-cells", true);
|
||||||
Common.Utils.InternalSettings.set("de-settings-autoformat-fl-cells", value);
|
Common.Utils.InternalSettings.set("de-settings-autoformat-fl-cells", value);
|
||||||
me.api.asc_SetAutoCorrectFirstLetterOfCells(value);
|
me.api.asc_SetAutoCorrectFirstLetterOfCells(value);
|
||||||
|
|
||||||
|
value = Common.localStorage.getBool("de-settings-autoformat-double-space", Common.Utils.isMac); // add period with double-space in MacOs by default
|
||||||
|
Common.Utils.InternalSettings.set("de-settings-autoformat-double-space", value);
|
||||||
|
me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(value);
|
||||||
},
|
},
|
||||||
|
|
||||||
showRenameUserDialog: function() {
|
showRenameUserDialog: function() {
|
||||||
|
|
|
@ -119,6 +119,9 @@ define([
|
||||||
} else {
|
} else {
|
||||||
me.statusbar.$el.find('.el-edit, .el-review').hide();
|
me.statusbar.$el.find('.el-edit, .el-review').hide();
|
||||||
}
|
}
|
||||||
|
if (cfg.canUseSelectHandTools) {
|
||||||
|
me.statusbar.$el.find('.hide-select-tools').removeClass('hide-select-tools');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me));
|
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me));
|
||||||
|
@ -131,6 +134,12 @@ define([
|
||||||
resolve();
|
resolve();
|
||||||
})).then(function () {
|
})).then(function () {
|
||||||
me.bindViewEvents(me.statusbar, me.events);
|
me.bindViewEvents(me.statusbar, me.events);
|
||||||
|
if (config.canUseSelectHandTools) {
|
||||||
|
me.statusbar.btnSelectTool.on('click', _.bind(me.onSelectTool, me, 'select'));
|
||||||
|
me.statusbar.btnHandTool.on('click', _.bind(me.onSelectTool, me, 'hand'));
|
||||||
|
me.statusbar.btnHandTool.toggle(true, true);
|
||||||
|
me.api.asc_setViewerTargetType('hand');
|
||||||
|
}
|
||||||
|
|
||||||
var statusbarIsHidden = Common.localStorage.getBool("de-hidden-status");
|
var statusbarIsHidden = Common.localStorage.getBool("de-hidden-status");
|
||||||
if ( config.canReview && !statusbarIsHidden ) {
|
if ( config.canReview && !statusbarIsHidden ) {
|
||||||
|
@ -344,6 +353,12 @@ define([
|
||||||
this.disconnectTip = null;
|
this.disconnectTip = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onSelectTool: function (type, btn, e) {
|
||||||
|
if (this.api) {
|
||||||
|
this.api.asc_setViewerTargetType(type);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
zoomText : 'Zoom {0}%',
|
zoomText : 'Zoom {0}%',
|
||||||
textHasChanges : 'New changes have been tracked',
|
textHasChanges : 'New changes have been tracked',
|
||||||
textTrackChanges: 'The document is opened with the Track Changes mode enabled',
|
textTrackChanges: 'The document is opened with the Track Changes mode enabled',
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
<div class="separator short el-edit el-lang"></div>
|
<div class="separator short el-edit el-lang"></div>
|
||||||
<div id="btn-doc-review" class="el-edit el-review" style="display: inline-block;"></div>
|
<div id="btn-doc-review" class="el-edit el-review" style="display: inline-block;"></div>
|
||||||
<div class="separator short el-edit el-review"></div>
|
<div class="separator short el-edit el-review"></div>
|
||||||
|
<div class="separator short hide-select-tools"></div>
|
||||||
|
<button id="btn-select-tool" type="button" class="btn small btn-toolbar hide-select-tools" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-select-tool"> </span></button>
|
||||||
|
<button id="btn-hand-tool" type="button" class="btn small btn-toolbar hide-select-tools" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-hand-tool"> </span></button>
|
||||||
|
<div class="separator short hide-select-tools"></div>
|
||||||
<button id="btn-zoom-topage" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-ic-zoomtopage"> </span></button>
|
<button id="btn-zoom-topage" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-ic-zoomtopage"> </span></button>
|
||||||
<button id="btn-zoom-towidth" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-ic-zoomtowidth"> </span></button>
|
<button id="btn-zoom-towidth" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small"><span class="icon toolbar__icon btn-ic-zoomtowidth"> </span></button>
|
||||||
<button id="btn-zoom-down" type="button" class="btn small btn-toolbar"><span class="icon toolbar__icon btn-zoomdown"> </span></button>
|
<button id="btn-zoom-down" type="button" class="btn small btn-toolbar"><span class="icon toolbar__icon btn-zoomdown"> </span></button>
|
||||||
|
|
|
@ -79,6 +79,11 @@ define([
|
||||||
me.btnZoomDown.updateHint(me.tipZoomOut + Common.Utils.String.platformKey('Ctrl+-'));
|
me.btnZoomDown.updateHint(me.tipZoomOut + Common.Utils.String.platformKey('Ctrl+-'));
|
||||||
me.btnZoomUp.updateHint(me.tipZoomIn + Common.Utils.String.platformKey('Ctrl++'));
|
me.btnZoomUp.updateHint(me.tipZoomIn + Common.Utils.String.platformKey('Ctrl++'));
|
||||||
|
|
||||||
|
if (config.canUseSelectHandTools) {
|
||||||
|
me.btnSelectTool.updateHint(me.tipSelectTool);
|
||||||
|
me.btnHandTool.updateHint(me.tipHandTool);
|
||||||
|
}
|
||||||
|
|
||||||
if (me.btnLanguage && me.btnLanguage.cmpEl) {
|
if (me.btnLanguage && me.btnLanguage.cmpEl) {
|
||||||
me.btnLanguage.updateHint(me.tipSetLang);
|
me.btnLanguage.updateHint(me.tipSetLang);
|
||||||
me.langMenu.on('item:click', _.bind(_clickLanguage, this));
|
me.langMenu.on('item:click', _.bind(_clickLanguage, this));
|
||||||
|
@ -179,6 +184,20 @@ define([
|
||||||
textPageNumber: Common.Utils.String.format(this.pageIndexText, 1, 1)
|
textPageNumber: Common.Utils.String.format(this.pageIndexText, 1, 1)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this.btnSelectTool = new Common.UI.Button({
|
||||||
|
hintAnchor: 'top',
|
||||||
|
toggleGroup: 'select-tools',
|
||||||
|
enableToggle: true,
|
||||||
|
allowDepress: false
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnHandTool = new Common.UI.Button({
|
||||||
|
hintAnchor: 'top',
|
||||||
|
toggleGroup: 'select-tools',
|
||||||
|
enableToggle: true,
|
||||||
|
allowDepress: false
|
||||||
|
});
|
||||||
|
|
||||||
this.btnZoomToPage = new Common.UI.Button({
|
this.btnZoomToPage = new Common.UI.Button({
|
||||||
hintAnchor: 'top',
|
hintAnchor: 'top',
|
||||||
toggleGroup: 'status-zoom',
|
toggleGroup: 'status-zoom',
|
||||||
|
@ -292,6 +311,11 @@ define([
|
||||||
me.langMenu.prevTip = 'en';
|
me.langMenu.prevTip = 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.canUseSelectHandTools) {
|
||||||
|
_btn_render(me.btnSelectTool, $('#btn-select-tool', me.$layout));
|
||||||
|
_btn_render(me.btnHandTool, $('#btn-hand-tool', me.$layout));
|
||||||
|
}
|
||||||
|
|
||||||
me.zoomMenu.render($('.cnt-zoom',me.$layout));
|
me.zoomMenu.render($('.cnt-zoom',me.$layout));
|
||||||
me.zoomMenu.cmpEl.attr({tabindex: -1});
|
me.zoomMenu.cmpEl.attr({tabindex: -1});
|
||||||
|
|
||||||
|
@ -394,7 +418,9 @@ define([
|
||||||
tipSetLang : 'Set Text Language',
|
tipSetLang : 'Set Text Language',
|
||||||
txtPageNumInvalid : 'Page number invalid',
|
txtPageNumInvalid : 'Page number invalid',
|
||||||
textTrackChanges : 'Track Changes',
|
textTrackChanges : 'Track Changes',
|
||||||
textChangesPanel : 'Changes panel'
|
textChangesPanel : 'Changes panel',
|
||||||
|
tipSelectTool : 'Select tool',
|
||||||
|
tipHandTool : 'Hand tool'
|
||||||
}, DE.Views.Statusbar || {}));
|
}, DE.Views.Statusbar || {}));
|
||||||
}
|
}
|
||||||
);
|
);
|
|
@ -234,6 +234,7 @@
|
||||||
"Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?",
|
"Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?",
|
||||||
"Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?",
|
"Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?",
|
||||||
"Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
|
"Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
|
||||||
|
"Common.Views.AutoCorrectDialog.textDoubleSpaces": "Add period with double-space",
|
||||||
"Common.Views.Chat.textSend": "Send",
|
"Common.Views.Chat.textSend": "Send",
|
||||||
"Common.Views.Comments.mniAuthorAsc": "Author A to Z",
|
"Common.Views.Comments.mniAuthorAsc": "Author A to Z",
|
||||||
"Common.Views.Comments.mniAuthorDesc": "Author Z to A",
|
"Common.Views.Comments.mniAuthorDesc": "Author Z to A",
|
||||||
|
@ -2383,6 +2384,8 @@
|
||||||
"DE.Views.Statusbar.tipZoomIn": "Zoom in",
|
"DE.Views.Statusbar.tipZoomIn": "Zoom in",
|
||||||
"DE.Views.Statusbar.tipZoomOut": "Zoom out",
|
"DE.Views.Statusbar.tipZoomOut": "Zoom out",
|
||||||
"DE.Views.Statusbar.txtPageNumInvalid": "Page number invalid",
|
"DE.Views.Statusbar.txtPageNumInvalid": "Page number invalid",
|
||||||
|
"DE.Views.Statusbar.tipSelectTool": "Select tool",
|
||||||
|
"DE.Views.Statusbar.tipHandTool": "Hand tool",
|
||||||
"DE.Views.StyleTitleDialog.textHeader": "Create New Style",
|
"DE.Views.StyleTitleDialog.textHeader": "Create New Style",
|
||||||
"DE.Views.StyleTitleDialog.textNextStyle": "Next paragraph style",
|
"DE.Views.StyleTitleDialog.textNextStyle": "Next paragraph style",
|
||||||
"DE.Views.StyleTitleDialog.textTitle": "Title",
|
"DE.Views.StyleTitleDialog.textTitle": "Title",
|
||||||
|
|
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 396 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 298 B |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 557 B |
|
@ -164,4 +164,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide-select-tools {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#btn-select-tool {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
|
|
||||||
initMenuItems() {
|
initMenuItems() {
|
||||||
if ( !Common.EditorApi ) return [];
|
if ( !Common.EditorApi ) return [];
|
||||||
const { isEdit, canFillForms } = this.props;
|
const { isEdit, canFillForms, isDisconnected } = this.props;
|
||||||
|
|
||||||
if (isEdit && EditorUIController.ContextMenu) {
|
if (isEdit && EditorUIController.ContextMenu) {
|
||||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||||
|
@ -259,6 +259,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isDisconnected) {
|
||||||
if ( canFillForms && canCopy && !locked ) {
|
if ( canFillForms && canCopy && !locked ) {
|
||||||
itemsIcon.push({
|
itemsIcon.push({
|
||||||
event: 'cut',
|
event: 'cut',
|
||||||
|
@ -286,6 +287,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
event: 'addcomment'
|
event: 'addcomment'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( isLink ) {
|
if ( isLink ) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
|
|
|
@ -407,7 +407,8 @@ class MainController extends Component {
|
||||||
onLicenseChanged (params) {
|
onLicenseChanged (params) {
|
||||||
const appOptions = this.props.storeAppOptions;
|
const appOptions = this.props.storeAppOptions;
|
||||||
const licType = params.asc_getLicenseType();
|
const licType = params.asc_getLicenseType();
|
||||||
if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' &&
|
|
||||||
|
if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' &&
|
||||||
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
||||||
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||||
this._state.licenseType = licType;
|
this._state.licenseType = licType;
|
||||||
|
@ -558,6 +559,9 @@ class MainController extends Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onShowContentControlsActions', (obj, x, y) => {
|
this.api.asc_registerCallback('asc_onShowContentControlsActions', (obj, x, y) => {
|
||||||
|
const storeAppOptions = this.props.storeAppOptions;
|
||||||
|
if (!storeAppOptions.isEdit && !(storeAppOptions.isRestrictedEdit && storeAppOptions.canFillForms) || this.props.users.isDisconnected) return;
|
||||||
|
|
||||||
switch (obj.type) {
|
switch (obj.type) {
|
||||||
case Asc.c_oAscContentControlSpecificType.DateTime:
|
case Asc.c_oAscContentControlSpecificType.DateTime:
|
||||||
this.onShowDateActions(obj, x, y);
|
this.onShowDateActions(obj, x, y);
|
||||||
|
@ -705,19 +709,20 @@ class MainController extends Component {
|
||||||
|
|
||||||
onShowDateActions(obj, x, y) {
|
onShowDateActions(obj, x, y) {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
|
const boxSdk = $$('#editor_sdk');
|
||||||
|
|
||||||
let props = obj.pr,
|
let props = obj.pr,
|
||||||
specProps = props.get_DateTimePr(),
|
specProps = props.get_DateTimePr(),
|
||||||
isPhone = Device.isPhone;
|
isPhone = Device.isPhone,
|
||||||
|
controlsContainer = boxSdk.find('#calendar-target-element'),
|
||||||
|
_dateObj = props;
|
||||||
|
|
||||||
this.controlsContainer = this.boxSdk.find('#calendar-target-element');
|
if (controlsContainer.length < 1) {
|
||||||
this._dateObj = props;
|
controlsContainer = $$('<div id="calendar-target-element" style="position: absolute;"></div>');
|
||||||
|
boxSdk.append(controlsContainer);
|
||||||
if (this.controlsContainer.length < 1) {
|
|
||||||
this.controlsContainer = $$('<div id="calendar-target-element" style="position: absolute;"></div>');
|
|
||||||
this.boxSdk.append(this.controlsContainer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.controlsContainer.css({left: `${x}px`, top: `${y}px`});
|
controlsContainer.css({left: `${x}px`, top: `${y}px`});
|
||||||
|
|
||||||
this.cmpCalendar = f7.calendar.create({
|
this.cmpCalendar = f7.calendar.create({
|
||||||
inputEl: '#calendar-target-element',
|
inputEl: '#calendar-target-element',
|
||||||
|
@ -730,7 +735,7 @@ class MainController extends Component {
|
||||||
on: {
|
on: {
|
||||||
change: (calendar, value) => {
|
change: (calendar, value) => {
|
||||||
if(calendar.initialized && value[0]) {
|
if(calendar.initialized && value[0]) {
|
||||||
let specProps = this._dateObj.get_DateTimePr();
|
let specProps = _dateObj.get_DateTimePr();
|
||||||
specProps.put_FullDate(new Date(value[0]));
|
specProps.put_FullDate(new Date(value[0]));
|
||||||
this.api.asc_SetContentControlDatePickerDate(specProps);
|
this.api.asc_SetContentControlDatePickerDate(specProps);
|
||||||
calendar.close();
|
calendar.close();
|
||||||
|
@ -747,14 +752,15 @@ class MainController extends Component {
|
||||||
|
|
||||||
onShowListActions(obj, x, y) {
|
onShowListActions(obj, x, y) {
|
||||||
if(!Device.isPhone) {
|
if(!Device.isPhone) {
|
||||||
this.dropdownListTarget = this.boxSdk.find('#dropdown-list-target');
|
const boxSdk = $$('#editor_sdk');
|
||||||
|
let dropdownListTarget = boxSdk.find('#dropdown-list-target');
|
||||||
|
|
||||||
if (this.dropdownListTarget.length < 1) {
|
if (dropdownListTarget.length < 1) {
|
||||||
this.dropdownListTarget = $$('<div id="dropdown-list-target" style="position: absolute;"></div>');
|
dropdownListTarget = $$('<div id="dropdown-list-target" style="position: absolute;"></div>');
|
||||||
this.boxSdk.append(this.dropdownListTarget);
|
boxSdk.append(dropdownListTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dropdownListTarget.css({left: `${x}px`, top: `${y}px`});
|
dropdownListTarget.css({left: `${x}px`, top: `${y}px`});
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Notifications.trigger('openDropdownList', obj);
|
Common.Notifications.trigger('openDropdownList', obj);
|
||||||
|
|
|
@ -196,7 +196,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
initMenuItems() {
|
initMenuItems() {
|
||||||
if ( !Common.EditorApi ) return [];
|
if ( !Common.EditorApi ) return [];
|
||||||
|
|
||||||
const { isEdit } = this.props;
|
const { isEdit, isDisconnected } = this.props;
|
||||||
|
|
||||||
if (isEdit && EditorUIController.ContextMenu) {
|
if (isEdit && EditorUIController.ContextMenu) {
|
||||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||||
|
@ -253,6 +253,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
icon: 'icon-copy'
|
icon: 'icon-copy'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(!isDisconnected) {
|
||||||
if (canViewComments && this.isComments && !isEdit) {
|
if (canViewComments && this.isComments && !isEdit) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
caption: _t.menuViewComment,
|
caption: _t.menuViewComment,
|
||||||
|
@ -266,6 +267,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
event: 'addcomment'
|
event: 'addcomment'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isLink) {
|
if (isLink) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
|
|
|
@ -489,7 +489,7 @@ class MainController extends Component {
|
||||||
onLicenseChanged (params) {
|
onLicenseChanged (params) {
|
||||||
const appOptions = this.props.storeAppOptions;
|
const appOptions = this.props.storeAppOptions;
|
||||||
const licType = params.asc_getLicenseType();
|
const licType = params.asc_getLicenseType();
|
||||||
if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' &&
|
if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' &&
|
||||||
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
||||||
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||||
this._state.licenseType = licType;
|
this._state.licenseType = licType;
|
||||||
|
|
|
@ -209,7 +209,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
const _t = t("ContextMenu", { returnObjects: true });
|
const _t = t("ContextMenu", { returnObjects: true });
|
||||||
|
|
||||||
const { isEdit } = this.props;
|
const { isEdit, isDisconnected } = this.props;
|
||||||
|
|
||||||
if (isEdit && EditorUIController.ContextMenu) {
|
if (isEdit && EditorUIController.ContextMenu) {
|
||||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||||
|
@ -249,6 +249,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
event: 'openlink'
|
event: 'openlink'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(!isDisconnected) {
|
||||||
if (canViewComments && hasComments && hasComments.length>0) {
|
if (canViewComments && hasComments && hasComments.length>0) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
caption: _t.menuViewComment,
|
caption: _t.menuViewComment,
|
||||||
|
@ -262,6 +263,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
event: 'addcomment'
|
event: 'addcomment'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return itemsIcon.concat(itemsText);
|
return itemsIcon.concat(itemsText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,11 +426,16 @@ class MainController extends Component {
|
||||||
this.api.asc_registerCallback('asc_onActiveSheetChanged', this.onChangeProtectSheet.bind(this));
|
this.api.asc_registerCallback('asc_onActiveSheetChanged', this.onChangeProtectSheet.bind(this));
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onRenameCellTextEnd', this.onRenameText.bind(this));
|
this.api.asc_registerCallback('asc_onRenameCellTextEnd', this.onRenameText.bind(this));
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onEntriesListMenu', this.onEntriesListMenu.bind(this, false));
|
this.api.asc_registerCallback('asc_onEntriesListMenu', this.onEntriesListMenu.bind(this, false));
|
||||||
this.api.asc_registerCallback('asc_onValidationListMenu', this.onEntriesListMenu.bind(this, true));
|
this.api.asc_registerCallback('asc_onValidationListMenu', this.onEntriesListMenu.bind(this, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntriesListMenu(validation, textArr, addArr) {
|
onEntriesListMenu(validation, textArr, addArr) {
|
||||||
|
const storeAppOptions = this.props.storeAppOptions;
|
||||||
|
|
||||||
|
if (!storeAppOptions.isEdit && !storeAppOptions.isRestrictedEdit || this.props.users.isDisconnected) return;
|
||||||
|
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
const boxSdk = $$('#editor_sdk');
|
const boxSdk = $$('#editor_sdk');
|
||||||
|
|
||||||
|
@ -606,7 +611,7 @@ class MainController extends Component {
|
||||||
if (appOptions.isEditDiagram || appOptions.isEditMailMerge) return;
|
if (appOptions.isEditDiagram || appOptions.isEditMailMerge) return;
|
||||||
|
|
||||||
const licType = params.asc_getLicenseType();
|
const licType = params.asc_getLicenseType();
|
||||||
if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' &&
|
if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' &&
|
||||||
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
(licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS
|
||||||
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
|| licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||||
this._state.licenseType = licType;
|
this._state.licenseType = licType;
|
||||||
|
|
|
@ -33,7 +33,7 @@ module.exports = function(grunt) {
|
||||||
return !!string && !!iconv_lite ? iconv_lite.encode(string,encoding) : string;
|
return !!string && !!iconv_lite ? iconv_lite.encode(string,encoding) : string;
|
||||||
};
|
};
|
||||||
|
|
||||||
var jsreplacements = [
|
global.jsreplacements = [
|
||||||
{
|
{
|
||||||
from: /\{\{SUPPORT_EMAIL\}\}/g,
|
from: /\{\{SUPPORT_EMAIL\}\}/g,
|
||||||
to: _encode(process.env.SUPPORT_EMAIL) || 'support@onlyoffice.com'
|
to: _encode(process.env.SUPPORT_EMAIL) || 'support@onlyoffice.com'
|
||||||
|
@ -355,12 +355,12 @@ module.exports = function(grunt) {
|
||||||
replacements: [{
|
replacements: [{
|
||||||
from: /\{\{PRODUCT_VERSION\}\}/g,
|
from: /\{\{PRODUCT_VERSION\}\}/g,
|
||||||
to: packageFile.version
|
to: packageFile.version
|
||||||
}]
|
}, ...global.jsreplacements]
|
||||||
},
|
},
|
||||||
prepareHelp: {
|
prepareHelp: {
|
||||||
src: ['<%= pkg.main.copy.help[0].dest %>/ru/**/*.htm*'],
|
src: ['<%= pkg.main.copy.help[0].dest %>/ru/**/*.htm*'],
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
replacements: []
|
replacements: [...helpreplacements]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -427,10 +427,10 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var replace = grunt.config.get('replace');
|
// var replace = grunt.config.get('replace');
|
||||||
replace.writeVersion.replacements.push(...jsreplacements);
|
// replace.writeVersion.replacements.push(...global.jsreplacements);
|
||||||
replace.prepareHelp.replacements.push(...helpreplacements);
|
// replace.prepareHelp.replacements.push(...helpreplacements);
|
||||||
grunt.config.set('replace', replace);
|
// grunt.config.set('replace', replace);
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('deploy-reporter', function(){
|
grunt.registerTask('deploy-reporter', function(){
|
||||||
|
|
|
@ -65,6 +65,17 @@ module.exports = (grunt) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
replace: {
|
||||||
|
varsEnviroment: {
|
||||||
|
src: ['<%= pkg.forms.js.requirejs.options.out %>'],
|
||||||
|
overwrite: true,
|
||||||
|
replacements: [{
|
||||||
|
from: /\{\{PRODUCT_VERSION\}\}/g,
|
||||||
|
to: packageFile.version
|
||||||
|
}, ...global.jsreplacements]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
inline: {
|
inline: {
|
||||||
dist: {
|
dist: {
|
||||||
src: packageFile.forms.inline.src
|
src: packageFile.forms.inline.src
|
||||||
|
@ -76,5 +87,5 @@ module.exports = (grunt) => {
|
||||||
|
|
||||||
grunt.registerTask('deploy-app-forms', ['forms-app-init', 'clean:prebuild', /*'imagemin',*/ 'less',
|
grunt.registerTask('deploy-app-forms', ['forms-app-init', 'clean:prebuild', /*'imagemin',*/ 'less',
|
||||||
'requirejs', 'concat', 'copy', 'inline', /*'json-minify',*/
|
'requirejs', 'concat', 'copy', 'inline', /*'json-minify',*/
|
||||||
/*'replace:writeVersion',*/ /*'replace:prepareHelp',*/ 'clean:postbuild']);
|
'replace:varsEnviroment', /*'replace:prepareHelp',*/ 'clean:postbuild']);
|
||||||
}
|
}
|