Skip to content

Commit

Permalink
Merge pull request #2984 from ONLYOFFICE/fix/bug-67159
Browse files Browse the repository at this point in the history
Fix/bug 67159
  • Loading branch information
JuliaRadzhabova authored May 8, 2024
2 parents 444af66 + 13388b4 commit 63f8a1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 13 additions & 3 deletions apps/presentationeditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ var c_paragraphSpecial = {
HANGING: 2
};

var c_oHyperlinkType = {
InternalLink:0,
WebLink: 1
};

define([
'core',
'presentationeditor/main/app/view/DocumentHolder'
Expand Down Expand Up @@ -1136,7 +1141,7 @@ define([
}
},

onDialogAddHyperlink: function() {
onDialogAddHyperlink: function(isButton) {
var win, props, text;
var me = this;
if (me.api && me.mode.isEdit && !me._isDisabled && !PE.getController('LeftMenu').leftMenu.menuFile.isVisible()){
Expand Down Expand Up @@ -1165,11 +1170,16 @@ define([
api: me.api,
appOptions: me.mode,
handler: handlerDlg,
type: isButton===true ? c_oHyperlinkType.InternalLink : undefined,
slides: _arr
});

props = new Asc.CHyperlinkProperty();
props.put_Text(text);
if (isButton && (isButton instanceof Asc.CHyperlinkProperty))
props = isButton;
else {
props = new Asc.CHyperlinkProperty()
props.put_Text(text);
}

win.show();
win.setSettings(props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
if (Common === undefined)
var Common = {};

var c_oHyperlinkType = {
InternalLink:0,
WebLink: 1
};

define([
'common/main/lib/util/utils',
'common/main/lib/component/InputField',
Expand Down Expand Up @@ -99,6 +94,7 @@ define([
this.options.tpl = _.template(this.template)(this.options);
this.slides = this.options.slides;
this.api = this.options.api;
this.type = options.type;
this.urlType = AscCommon.c_oAscUrlType.Invalid;
this.appOptions = this.options.appOptions;

Expand Down Expand Up @@ -203,7 +199,7 @@ define([
if (props) {
var me = this;

var type = me.parseUrl(props.get_Value());
var type = (me.type!==undefined) ? me.type : me.parseUrl(props.get_Value());
(type == c_oHyperlinkType.WebLink) ? me.btnExternal.toggle(true) : me.btnInternal.toggle(true);
me.ShowHideElem(type, props.get_Value());

Expand Down

0 comments on commit 63f8a1b

Please sign in to comment.