Skip to content

Commit

Permalink
Merge pull request #2958 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
[PDF] Add hyperlink dialog
  • Loading branch information
JuliaRadzhabova authored Apr 23, 2024
2 parents 8a998f8 + cca6eed commit df736af
Show file tree
Hide file tree
Showing 5 changed files with 499 additions and 10 deletions.
3 changes: 2 additions & 1 deletion apps/pdfeditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ define([
'pdfeditor/main/app/view/DocumentHolder',
'common/main/lib/view/ImageFromUrlDialog',
'common/main/lib/view/SelectFileDlg',
'common/main/lib/view/SaveAsDlg'
'common/main/lib/view/SaveAsDlg',
'pdfeditor/main/app/view/HyperlinkSettingsDialog'
], function () {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion apps/pdfeditor/main/app/controller/InsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ define([
if (props) {
win = new PDFE.Views.HyperlinkSettingsDialog({
api: me.api,
appOptions: me.appOptions,
appOptions: me.mode,
handler: handlerDlg,
slides: _arr
});
Expand Down
9 changes: 1 addition & 8 deletions apps/pdfeditor/main/app/view/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ define([
})
});

var menuHyperlinkSeparator = new Common.UI.MenuItem({
caption : '--'
});

me.menuAddCommentTable = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-add-comment',
caption : me.addCommentText
Expand Down Expand Up @@ -454,7 +450,6 @@ define([

me.menuAddHyperlinkTable.setVisible(!_.isUndefined(value.paraProps) && _.isUndefined(value.hyperProps) && text!==false);
menuHyperlinkTable.setVisible(!_.isUndefined(value.paraProps) && !_.isUndefined(value.hyperProps));
menuHyperlinkSeparator.setVisible(me.menuAddHyperlinkTable.isVisible() || menuHyperlinkTable.isVisible());

me.menuEditHyperlinkTable.hyperProps = value.hyperProps;

Expand All @@ -470,7 +465,6 @@ define([
}

me.menuAddCommentTable.setVisible(me.mode && me.mode.canComments);
menuHyperlinkSeparator.setVisible(menuHyperlinkSeparator.isVisible() || me.menuAddCommentTable.isVisible());

//equation menu
var eqlen = 0;
Expand Down Expand Up @@ -520,8 +514,7 @@ define([
me.menuAddCommentTable, //23
/** coauthoring end **/
me.menuAddHyperlinkTable, //24
menuHyperlinkTable, //25
menuHyperlinkSeparator //26
menuHyperlinkTable
]
}).on('hide:after', function(menu, e, isFromInputControl) {
me.clearCustomItems(menu);
Expand Down
Loading

0 comments on commit df736af

Please sign in to comment.