Bug 44821: save type of the last added hyperlink
This commit is contained in:
parent
f6f64218d2
commit
e826d8a8e1
|
@ -308,7 +308,7 @@ define([
|
|||
var me = this;
|
||||
|
||||
var bookmark = props.get_Bookmark(),
|
||||
type = (bookmark === null || bookmark=='') ? c_oHyperlinkType.WebLink : c_oHyperlinkType.InternalLink;
|
||||
type = (bookmark === null || bookmark=='') ? ((props.get_Value() || !Common.Utils.InternalSettings.get("de-settings-link-type")) ? c_oHyperlinkType.WebLink : c_oHyperlinkType.InternalLink) : c_oHyperlinkType.InternalLink;
|
||||
|
||||
(type == c_oHyperlinkType.WebLink) ? me.btnExternal.toggle(true) : me.btnInternal.toggle(true);
|
||||
me.ShowHideElem(type);
|
||||
|
@ -426,6 +426,7 @@ define([
|
|||
this.inputDisplay.cmpEl.find('input').focus();
|
||||
return;
|
||||
}
|
||||
(!this._originalProps.get_Bookmark() && !this._originalProps.get_Value()) && Common.Utils.InternalSettings.set("de-settings-link-type", this.btnInternal.isActive()); // save last added hyperlink
|
||||
}
|
||||
|
||||
this.options.handler.call(this, this, state);
|
||||
|
|
|
@ -210,6 +210,7 @@ define([
|
|||
me.inputUrl.cmpEl.find('input').focus();
|
||||
},50);
|
||||
}
|
||||
me._originalProps = props;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -275,8 +276,8 @@ define([
|
|||
this.inputDisplay.cmpEl.find('input').focus();
|
||||
return;
|
||||
}
|
||||
!this._originalProps.get_Value() && Common.Utils.InternalSettings.set("pe-settings-link-type", this.btnInternal.isActive());
|
||||
}
|
||||
|
||||
this.options.handler.call(this, this, state);
|
||||
}
|
||||
|
||||
|
@ -390,7 +391,7 @@ define([
|
|||
|
||||
parseUrl: function(url) {
|
||||
if (url===null || url===undefined || url=='' )
|
||||
return c_oHyperlinkType.WebLink;
|
||||
return Common.Utils.InternalSettings.get("pe-settings-link-type") ? c_oHyperlinkType.InternalLink : c_oHyperlinkType.WebLink;
|
||||
|
||||
var indAction = url.indexOf("ppaction://hlink");
|
||||
if (0 == indAction)
|
||||
|
|
|
@ -220,16 +220,16 @@ define([
|
|||
var me = this;
|
||||
me.settings = settings;
|
||||
|
||||
var type = (settings.props) ? settings.props.asc_getType() : Asc.c_oAscHyperlinkType.WebLink;
|
||||
var type = (settings.props) ? settings.props.asc_getType() : (Common.Utils.InternalSettings.get("sse-settings-link-type") ? Asc.c_oAscHyperlinkType.RangeLink : Asc.c_oAscHyperlinkType.WebLink);
|
||||
(type == Asc.c_oAscHyperlinkType.WebLink) ? me.btnExternal.toggle(true) : me.btnInternal.toggle(true);
|
||||
me.ShowHideElem(type, settings.props);
|
||||
me.btnInternal.setDisabled(!settings.allowInternal && (type == Asc.c_oAscHyperlinkType.WebLink));
|
||||
me.btnExternal.setDisabled(!settings.allowInternal && (type == Asc.c_oAscHyperlinkType.RangeLink));
|
||||
|
||||
var defrange = '';
|
||||
if (!settings.props) {
|
||||
if (!settings.props) { // add link
|
||||
this.inputDisplay.setValue(settings.isLock ? this.textDefault : settings.text);
|
||||
this.focusedInput = this.inputUrl.cmpEl.find('input');
|
||||
this.focusedInput = (type == Asc.c_oAscHyperlinkType.WebLink) ? this.inputUrl.cmpEl.find('input') : this.inputRange.cmpEl.find('input');
|
||||
} else {
|
||||
if (type == Asc.c_oAscHyperlinkType.RangeLink) {
|
||||
if (settings.props.asc_getSheet()) {
|
||||
|
@ -324,6 +324,7 @@ define([
|
|||
this.inputDisplay.cmpEl.find('input').focus();
|
||||
return;
|
||||
}
|
||||
!this.settings.props && Common.Utils.InternalSettings.set("sse-settings-link-type", this.btnInternal.isActive()); // save last added hyperlink
|
||||
}
|
||||
|
||||
this.options.handler.call(this, this, state);
|
||||
|
|
Loading…
Reference in a new issue