commit
1a897081f8
|
@ -203,8 +203,7 @@ define([
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
var onApiEndCalculate = function() {
|
var onApiEndCalculate = function() {
|
||||||
var rec = me.cmbType.getSelectedRecord();
|
me.refreshReferences(me.cmbType.getSelectedRecord());
|
||||||
rec && me.refreshReferences(rec.value);
|
|
||||||
};
|
};
|
||||||
this.api.asc_registerCallback('asc_onEndCalculate', onApiEndCalculate);
|
this.api.asc_registerCallback('asc_onEndCalculate', onApiEndCalculate);
|
||||||
this.on('close', function(obj){
|
this.on('close', function(obj){
|
||||||
|
@ -288,7 +287,7 @@ define([
|
||||||
|
|
||||||
refreshReferenceTypes: function(record, currentRef) {
|
refreshReferenceTypes: function(record, currentRef) {
|
||||||
var arr = [],
|
var arr = [],
|
||||||
str = this.textWhich, type = 5;
|
str = this.textWhich;
|
||||||
if (record.type==1 || record.value > 4) {
|
if (record.type==1 || record.value > 4) {
|
||||||
// custom labels from caption dialog and Equation, Figure, Table
|
// custom labels from caption dialog and Equation, Figure, Table
|
||||||
arr = [
|
arr = [
|
||||||
|
@ -299,7 +298,6 @@ define([
|
||||||
{ value: Asc.c_oAscDocumentRefenceToType.AboveBelow, displayValue: this.textAboveBelow }
|
{ value: Asc.c_oAscDocumentRefenceToType.AboveBelow, displayValue: this.textAboveBelow }
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
type = record.value;
|
|
||||||
switch (record.value) {
|
switch (record.value) {
|
||||||
case 0: // paragraph
|
case 0: // paragraph
|
||||||
arr = [
|
arr = [
|
||||||
|
@ -360,11 +358,14 @@ define([
|
||||||
this.cmbReference.setValue(rec ? currentRef : arr[0].value);
|
this.cmbReference.setValue(rec ? currentRef : arr[0].value);
|
||||||
this.onReferenceSelected(this.cmbReference, this.cmbReference.getSelectedRecord());
|
this.onReferenceSelected(this.cmbReference, this.cmbReference.getSelectedRecord());
|
||||||
this.lblWhich.text(str);
|
this.lblWhich.text(str);
|
||||||
this.refreshReferences(type);
|
this.refreshReferences(record);
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshReferences: function(type) {
|
refreshReferences: function(record) {
|
||||||
|
if (!record) return;
|
||||||
|
|
||||||
var store = this.refList.store,
|
var store = this.refList.store,
|
||||||
|
type = (record.type==1 || record.value > 4) ? 5 : record.value,
|
||||||
arr = [],
|
arr = [],
|
||||||
props;
|
props;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
@ -1085,7 +1085,7 @@ define([
|
||||||
if (linkstr) {
|
if (linkstr) {
|
||||||
linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>';
|
linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>';
|
||||||
} else {
|
} else {
|
||||||
linkstr = props.asc_getHyperlinkUrl() + '<br><b>' + me.textCtrlClick + '</b>';
|
linkstr = Common.Utils.String.htmlEncode(props.asc_getHyperlinkUrl()) + '<br><b>' + me.textCtrlClick + '</b>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
linkstr = Common.Utils.String.htmlEncode(props.asc_getTooltip() || (props.asc_getLocation()));
|
linkstr = Common.Utils.String.htmlEncode(props.asc_getTooltip() || (props.asc_getLocation()));
|
||||||
|
|
Loading…
Reference in a new issue