Skip to content

Commit

Permalink
Merge pull request 'fix/new-features' (#75) from fix/new-features int…
Browse files Browse the repository at this point in the history
…o release/v8.2.0
  • Loading branch information
trofim24 committed Oct 10, 2024
2 parents 09bf7f8 + dded409 commit fa93dae
Show file tree
Hide file tree
Showing 193 changed files with 1,375 additions and 257 deletions.
2 changes: 1 addition & 1 deletion apps/common/forms/resources/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
.btn {
&.active, &:active {
&:not(:disabled):not(.disabled) {
.icon {
.svg-icon {
@btn-active-icon-offset: -20px;
background-position-y: @btn-active-icon-offset;
background-position-y: var(--button-small-active-icon-offset-x, 0);
Expand Down
3 changes: 2 additions & 1 deletion apps/common/main/lib/component/SynchronizeTip.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ define([
// prev: '' // don't show tooltip if the prev was not shown
// automove: false // applyPlacement on window resize
// maxwidth: 250 // 250 by default
// extCls: '' //
// }
};

Expand Down Expand Up @@ -269,7 +270,7 @@ define([
}
target.addClass('highlight-tip');
props.tip = new Common.UI.SynchronizeTip({
extCls: 'colored',
extCls: 'colored' + (props.extCls ? ' ' + props.extCls : ''),
style: 'min-width:200px;max-width:' + (props.maxwidth ? props.maxwidth : 250) + 'px;',
placement: placement,
target: target,
Expand Down
1 change: 1 addition & 0 deletions apps/common/main/lib/controller/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ define([
onShowBeforeButtonMenu: function() {
if(this.api && this.panelHistory.chHighlightDeleted) {
this.panelHistory.chHighlightDeleted.setChecked(this.api.asc_isShowedDeletedTextInVersionHistory(), true);
Common.UI.TooltipManager.closeTip('textDeleted');
}
},

Expand Down
18 changes: 3 additions & 15 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ define([
if ( has_edit_users ) {
$panelUsers['show']();
$btnUsers.find('.caption').html(originalCount);
isPDFEditor && appConfig && (appConfig.isPDFEdit || appConfig.isPDFAnnotate || appConfig.isPDFFill) && Common.UI.TooltipManager.showTip('pdfCoedit')
} else {
$panelUsers['hide']();
isPDFEditor && appConfig && (appConfig.isPDFEdit || appConfig.isPDFAnnotate || appConfig.isPDFFill) && Common.UI.TooltipManager.closeTip('pdfCoedit')
}
updateDocNamePosition();
}
Expand All @@ -224,6 +226,7 @@ define([

usertip.hide();
}
isPDFEditor && appConfig && (appConfig.isPDFEdit || appConfig.isPDFAnnotate || appConfig.isPDFFill) && Common.UI.TooltipManager.closeTip('pdfCoedit')
}

function updateDocNamePosition(config) {
Expand Down Expand Up @@ -304,7 +307,6 @@ define([
this.btnDocMode.options.value = type;
if (show && !this.btnDocMode.isVisible()) {
this.btnDocMode.setVisible(true);
Common.UI.TooltipManager.showTip('docMode');
}
if (this.btnDocMode.menu && typeof this.btnDocMode.menu === 'object') {
var item = _.find(this.btnDocMode.menu.items, function(item) { return item.value == type; });
Expand Down Expand Up @@ -523,7 +525,6 @@ define([
items: arr
}));
me.btnQuickAccess.menu.on('show:before', function (menu) {
Common.UI.TooltipManager.closeTip('quickAccess');
menu.items.forEach(function (item) {
if (item.value === 'save') {
item.setChecked(Common.localStorage.getBool(me.appPrefix + 'quick-access-save', true), true);
Expand Down Expand Up @@ -560,7 +561,6 @@ define([
onChangeQuickAccess.call(me, 'header', props);
});
Common.NotificationCenter.on('quickaccess:changed', onChangeQuickAccess.bind(me, 'settings'));
isSSEEditor && Common.UI.TooltipManager.showTip('quickAccess');
}

if ( !appConfig.twoLevelHeader ) {
Expand Down Expand Up @@ -676,15 +676,11 @@ define([
menuAlign: 'tr-br',
items: arr
}));
me.btnDocMode.on('click', function (menu, item) {
Common.UI.TooltipManager.closeTip('docMode');
});
me.btnDocMode.menu.on('item:click', function (menu, item) {
Common.NotificationCenter.trigger('doc:mode-apply', item.value, true);
});
var item = _.find(me.btnDocMode.menu.items, function(item) { return item.value == type; });
item && item.setChecked(true);
me.btnDocMode.isVisible() && Common.UI.TooltipManager.showTip('docMode');
}
if (appConfig.twoLevelHeader && !appConfig.compactHeader)
Common.NotificationCenter.on('window:resize', onResize);
Expand Down Expand Up @@ -976,10 +972,6 @@ define([
me.btnDocMode.render($html.find('#slot-btn-edit-mode'));
changeDocMode.call(me);
Common.NotificationCenter.on('doc:mode-changed', _.bind(changeDocMode, me));

!config.isPDFForm && Common.UI.LayoutManager.isElementVisible('header-editMode') && Common.UI.TooltipManager.addTips({
'docMode' : {name: 'de-help-tip-doc-mode', placement: 'bottom-left', text: me.helpDocMode, header: me.helpDocModeHeader, target: '#slot-btn-edit-mode', maxwidth: 300}
});
} else
$html.find('#slot-btn-edit-mode').hide();

Expand Down Expand Up @@ -1060,10 +1052,6 @@ define([
});
me.btnQuickAccess.render($html.find('#slot-btn-dt-quick-access'));

isSSEEditor && Common.UI.TooltipManager.addTips({
'quickAccess' : {name: 'common-help-tip-quick-access', placement: 'bottom-right', text: me.helpQuickAccess, header: me.helpQuickAccessHeader, target: '#slot-btn-dt-quick-access'}
});

return $html;
}
},
Expand Down
7 changes: 1 addition & 6 deletions apps/common/main/resources/less/calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@
background-position: -40px -12px;
}
}
&:hover {
&:hover, &:active {
background-color: @highlight-button-hover-ie;
background-color: @highlight-button-hover;
cursor: pointer;
}

&:active {
background-color: @highlight-button-pressed-ie;
background-color: @highlight-button-pressed;
}
}
.calendar-header {
height: 68px;
Expand Down
3 changes: 2 additions & 1 deletion apps/common/main/resources/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ label {
padding: 4px 12px 4px 16px;
}

&:hover:not(.disabled) {
&:hover:not(.disabled),
&.highlight-tip {
background-color: @highlight-button-hover-ie;
background-color: @highlight-button-hover;
}
Expand Down
4 changes: 3 additions & 1 deletion apps/documenteditor/main/app/controller/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ define([
var me = this;
if (!this._state.formCount) { // add first form
this.closeHelpTip('create');
Common.UI.TooltipManager.showTip('signatureField');
} else if (this._state.formCount===1) {
setTimeout(function() {
me.showHelpTip('roles');
// me.showHelpTip('roles');
}, 500);
}
this._state.formCount++;
Expand Down Expand Up @@ -628,6 +629,7 @@ define([
this.closeHelpTip('create');
this.closeHelpTip('roles');
this.closeHelpTip('save');
Common.UI.TooltipManager.closeTip('signatureField');
},

onChangeProtectDocument: function(props) {
Expand Down
28 changes: 21 additions & 7 deletions apps/documenteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,15 @@ define([
setMode: function(mode) {
this.mode = mode;
this.toolbar.applyLayout(mode);
!this.mode.isPDFForm && Common.UI.TooltipManager.addTips({
'pageColor' : {name: 'de-help-tip-page-color', placement: 'bottom-left', text: this.helpPageColor, header: this.helpPageColorHeader, target: '#slot-btn-pagecolor', automove: true}
this.mode.isPDFForm ? Common.UI.TooltipManager.addTips({
'signatureField' : {name: 'de-help-tip-signature-field', placement: 'bottom-right', text: this.helpSignField, header: this.helpSignFieldHeader, target: '#slot-btn-form-signature', automove: true, maxwidth: 320}
}) : Common.UI.TooltipManager.addTips({
'textFromFile' : {name: 'de-help-tip-text-from-file', placement: 'bottom-left', text: this.helpTextFromFile, header: this.helpTextFromFileHeader, target: '#slot-btn-text-from-file', automove: true, maxwidth: 270},
'textDeleted' : {name: 'de-help-tip-text-deleted', placement: 'right-bottom', text: this.helpTextDeleted, header: this.helpTextDeletedHeader, target: '#history-btn-menu', automove: true, maxwidth: 320},
'customInfo' : {name: 'help-tip-custom-info', placement: 'right', text: this.helpCustomInfo, header: this.helpCustomInfoHeader, target: '#fm-btn-info', automove: true, extCls: 'inc-index'}
});
Common.UI.TooltipManager.addTips({
'grayTheme' : {name: 'help-tip-gray-theme', placement: 'bottom-right', text: this.helpGrayTheme, header: this.helpGrayThemeHeader, target: '#slot-btn-interface-theme', automove: true, maxwidth: 320}
});
},

Expand Down Expand Up @@ -413,6 +420,7 @@ define([
toolbar.btnPageColor.on('color:select', _.bind(this.onSelectPageColor, this));
toolbar.mnuPageNoFill.on('click', _.bind(this.onPageNoFillClick, this));
toolbar.btnTextFromFile.menu.on('item:click', _.bind(this.onTextFromFileClick, this));
toolbar.btnTextFromFile.menu.on('show:after', _.bind(this.onTextFromFileShowAfter, this));
Common.NotificationCenter.on('leftmenu:save', _.bind(this.tryToSave, this));
this.onSetupCopyStyleButton();
this.onBtnChangeState('undo:disabled', toolbar.btnUndo, toolbar.btnUndo.isDisabled());
Expand Down Expand Up @@ -1470,8 +1478,6 @@ define([
if (!(e && e.target===e.currentTarget))
return;

Common.UI.TooltipManager.closeTip('pageColor');

var picker = this.toolbar.mnuPageColorPicker,
color = this.api.asc_getPageColor();

Expand Down Expand Up @@ -1607,6 +1613,13 @@ define([
}
},

onTextFromFileShowAfter: function(menu, e) {
if (!(e && e.target === e.currentTarget))
return;

Common.UI.TooltipManager.closeTip('textFromFile');
},

onMarkerSettingsClick: function(type) {
var me = this;
var listId = me.api.asc_GetCurrentNumberingId(),
Expand Down Expand Up @@ -3889,12 +3902,13 @@ define([
},

onActiveTab: function(tab) {
(tab === 'layout') ? Common.UI.TooltipManager.showTip('pageColor') : Common.UI.TooltipManager.closeTip('pageColor');
(tab !== 'home') && Common.UI.TooltipManager.closeTip('docMode');
(tab === 'ins') ? Common.UI.TooltipManager.showTip('textFromFile') : Common.UI.TooltipManager.closeTip('textFromFile');
(tab === 'view') ? Common.UI.TooltipManager.showTip('grayTheme') : Common.UI.TooltipManager.closeTip('grayTheme');
},

onTabCollapse: function(tab) {
Common.UI.TooltipManager.closeTip('pageColor');
Common.UI.TooltipManager.closeTip('textFromFile');
Common.UI.TooltipManager.closeTip('grayTheme');
}

}, DE.Controllers.Toolbar || {}));
Expand Down
3 changes: 3 additions & 0 deletions apps/documenteditor/main/app/controller/ViewTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ define([
Common.NotificationCenter.on('uitheme:countchanged', _fill_themes.bind(me));
_fill_themes.call(me);

me.view.btnInterfaceTheme.menu && me.view.btnInterfaceTheme.menu.on('show:after', function() {
Common.UI.TooltipManager.closeTip('grayTheme');
});
if (me.view.btnInterfaceTheme.menu.items.length) {
// me.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
me.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
Expand Down
4 changes: 3 additions & 1 deletion apps/documenteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ define([
events: function() {
return {
'click .fm-btn': _.bind(function(event){
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
var $item = $(event.currentTarget);
if (!$item.hasClass('active')) {
$('.fm-btn',this.el).removeClass('active');
$item.addClass('active');
}

var item = _.findWhere(this.items, {el: event.currentTarget});
if (item) {
var panel = this.panels[item.options.action];
Expand Down Expand Up @@ -381,10 +381,12 @@ define([
this.selectMenu(panel, opts, defPanel);
this.api && this.api.asc_enableKeyEvents(false);

this.mode.isEdit && Common.UI.TooltipManager.showTip('customInfo');
this.fireEvent('menu:show', [this]);
},

hide: function() {
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
this.$el.hide();
// if (this.mode.isEdit) DE.getController('Toolbar').DisableToolbar(false);
this.fireEvent('menu:hide', [this]);
Expand Down
1 change: 1 addition & 0 deletions apps/documenteditor/main/app/view/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ define([
me.fireEvent('forms:insert', ['picture']);
});
this.btnSignField && this.btnSignField.on('click', function (b, e) {
Common.UI.TooltipManager.closeTip('signatureField');
me.fireEvent('forms:insert', ['signature']);
});
this.btnComplexField && this.btnComplexField.on('click', function (b, e) {
Expand Down
1 change: 1 addition & 0 deletions apps/documenteditor/main/app/view/LeftMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ define([
this._state.pluginIsRunning = false;
this.panelHistory.show();
this.panelHistory.$el.width((parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
Common.UI.TooltipManager.showTip('textDeleted');
Common.NotificationCenter.trigger('layout:changed', 'history');
},

Expand Down
12 changes: 11 additions & 1 deletion apps/documenteditor/main/locale/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3653,5 +3653,15 @@
"DE.Controllers.Main.textSignature": "Signature",
"DE.Views.FormSettings.textSignature": "Signature",
"DE.Views.FormsTab.capBtnSignature": "Signature Field",
"DE.Views.FormsTab.tipSignField": "Insert signature field"
"DE.Views.FormsTab.tipSignField": "Insert signature field",
"DE.Controllers.Toolbar.helpTextFromFile": "Insert text from external files directly into your document.",
"DE.Controllers.Toolbar.helpTextFromFileHeader": "Text import from third-party sources",
"DE.Controllers.Toolbar.helpSignField": "Insert the signature field into your PDF forms.",
"DE.Controllers.Toolbar.helpSignFieldHeader": "Signatures",
"DE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"DE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"DE.Controllers.Toolbar.helpTextDeleted": "Highlight deleted text to easily track changes and see the removed content between revisions.",
"DE.Controllers.Toolbar.helpTextDeletedHeader": "Enhanced Version History",
"DE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"DE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields"
}
12 changes: 11 additions & 1 deletion apps/documenteditor/main/locale/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -3653,5 +3653,15 @@
"DE.Controllers.Main.textSignature": "Signature",
"DE.Views.FormSettings.textSignature": "Signature",
"DE.Views.FormsTab.capBtnSignature": "Signature Field",
"DE.Views.FormsTab.tipSignField": "Insert signature field"
"DE.Views.FormsTab.tipSignField": "Insert signature field",
"DE.Controllers.Toolbar.helpTextFromFile": "Insert text from external files directly into your document.",
"DE.Controllers.Toolbar.helpTextFromFileHeader": "Text import from third-party sources",
"DE.Controllers.Toolbar.helpSignField": "Insert the signature field into your PDF forms.",
"DE.Controllers.Toolbar.helpSignFieldHeader": "Signatures",
"DE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"DE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"DE.Controllers.Toolbar.helpTextDeleted": "Highlight deleted text to easily track changes and see the removed content between revisions.",
"DE.Controllers.Toolbar.helpTextDeletedHeader": "Enhanced Version History",
"DE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"DE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields"
}
12 changes: 11 additions & 1 deletion apps/documenteditor/main/locale/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -3653,5 +3653,15 @@
"DE.Controllers.Main.textSignature": "Signature",
"DE.Views.FormSettings.textSignature": "Signature",
"DE.Views.FormsTab.capBtnSignature": "Signature Field",
"DE.Views.FormsTab.tipSignField": "Insert signature field"
"DE.Views.FormsTab.tipSignField": "Insert signature field",
"DE.Controllers.Toolbar.helpTextFromFile": "Insert text from external files directly into your document.",
"DE.Controllers.Toolbar.helpTextFromFileHeader": "Text import from third-party sources",
"DE.Controllers.Toolbar.helpSignField": "Insert the signature field into your PDF forms.",
"DE.Controllers.Toolbar.helpSignFieldHeader": "Signatures",
"DE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"DE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"DE.Controllers.Toolbar.helpTextDeleted": "Highlight deleted text to easily track changes and see the removed content between revisions.",
"DE.Controllers.Toolbar.helpTextDeletedHeader": "Enhanced Version History",
"DE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"DE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields"
}
12 changes: 11 additions & 1 deletion apps/documenteditor/main/locale/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3653,5 +3653,15 @@
"DE.Controllers.Main.textSignature": "Signature",
"DE.Views.FormSettings.textSignature": "Signature",
"DE.Views.FormsTab.capBtnSignature": "Signature Field",
"DE.Views.FormsTab.tipSignField": "Insert signature field"
"DE.Views.FormsTab.tipSignField": "Insert signature field",
"DE.Controllers.Toolbar.helpTextFromFile": "Insert text from external files directly into your document.",
"DE.Controllers.Toolbar.helpTextFromFileHeader": "Text import from third-party sources",
"DE.Controllers.Toolbar.helpSignField": "Insert the signature field into your PDF forms.",
"DE.Controllers.Toolbar.helpSignFieldHeader": "Signatures",
"DE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"DE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"DE.Controllers.Toolbar.helpTextDeleted": "Highlight deleted text to easily track changes and see the removed content between revisions.",
"DE.Controllers.Toolbar.helpTextDeletedHeader": "Enhanced Version History",
"DE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"DE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields"
}
Loading

0 comments on commit fa93dae

Please sign in to comment.