|
@ -800,13 +800,16 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
getPasteSymbol: function(cellId) {
|
getPasteSymbol: function(cellId) {
|
||||||
var bUpdateRecents = cellId[0] === 'c';
|
var bUpdateRecents = false;
|
||||||
var sFont;
|
var sFont;
|
||||||
if(bUpdateRecents){
|
if (cellId && cellId.length>0) {
|
||||||
sFont = aFontSelects[nCurrentFont].displayValue;
|
bUpdateRecents = (cellId[0] === 'c');
|
||||||
} else {
|
if(bUpdateRecents){
|
||||||
var nFontId = parseInt(cellId.split('_')[2]);
|
sFont = aFontSelects[nCurrentFont].displayValue;
|
||||||
sFont = aFontSelects[nFontId].displayValue;
|
} else {
|
||||||
|
var nFontId = parseInt(cellId.split('_')[2]);
|
||||||
|
sFont = aFontSelects[nFontId].displayValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
|
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
|
||||||
},
|
},
|
||||||
|
@ -831,7 +834,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var special = this.btnSpecial.isActive();
|
var special = this.btnSpecial.isActive();
|
||||||
var settings = special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'));
|
var settings = (state=='ok') ? (special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'))) : {};
|
||||||
if (this.options.handler) {
|
if (this.options.handler) {
|
||||||
this.options.handler.call(this, this, state, settings);
|
this.options.handler.call(this, this, state, settings);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ define([
|
||||||
'rightmenuclick': this.onRightMenuClick
|
'rightmenuclick': this.onRightMenuClick
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-form", 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
@ -95,8 +97,29 @@ define([
|
||||||
this.editMode = mode.isEdit;
|
this.editMode = mode.isEdit;
|
||||||
},
|
},
|
||||||
|
|
||||||
onRightMenuClick: function(menu, type, minimized) {
|
onRightMenuClick: function(menu, type, minimized, event) {
|
||||||
if (!minimized && this.editMode) {
|
if (!minimized && this.editMode) {
|
||||||
|
if (event) { // user click event
|
||||||
|
if (!this._settings[Common.Utils.documentSettingsType.Form].hidden) {
|
||||||
|
if (type == Common.Utils.documentSettingsType.Form) {
|
||||||
|
if (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden)
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-para", 0);
|
||||||
|
if (!this._settings[Common.Utils.documentSettingsType.Image].hidden)
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0);
|
||||||
|
if (!this._settings[Common.Utils.documentSettingsType.Shape].hidden)
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0);
|
||||||
|
} else if (type == Common.Utils.documentSettingsType.Paragraph) {
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-para", 2);
|
||||||
|
} else if (type == Common.Utils.documentSettingsType.Image) {
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-image", 2);
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0);
|
||||||
|
} else if (type == Common.Utils.documentSettingsType.Shape) {
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 2);
|
||||||
|
Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var panel = this._settings[type].panel;
|
var panel = this._settings[type].panel;
|
||||||
var props = this._settings[type].props;
|
var props = this._settings[type].props;
|
||||||
if (props && panel)
|
if (props && panel)
|
||||||
|
@ -223,6 +246,26 @@ define([
|
||||||
if (!this.rightmenu.minimizedMode || open) {
|
if (!this.rightmenu.minimizedMode || open) {
|
||||||
var active;
|
var active;
|
||||||
|
|
||||||
|
if (priorityactive<0 && !this._settings[Common.Utils.documentSettingsType.Form].hidden &&
|
||||||
|
(!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden || !this._settings[Common.Utils.documentSettingsType.Image].hidden
|
||||||
|
|| !this._settings[Common.Utils.documentSettingsType.Shape].hidden)) {
|
||||||
|
var imageactive = Common.Utils.InternalSettings.get("de-rightpanel-active-image") || 0,
|
||||||
|
shapeactive = Common.Utils.InternalSettings.get("de-rightpanel-active-shape") || 0,
|
||||||
|
paraactive = Common.Utils.InternalSettings.get("de-rightpanel-active-para") || 0,
|
||||||
|
formactive = Common.Utils.InternalSettings.get("de-rightpanel-active-form") || 0;
|
||||||
|
|
||||||
|
if (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden) {
|
||||||
|
priorityactive = (formactive>paraactive) ? Common.Utils.documentSettingsType.Form : Common.Utils.documentSettingsType.Paragraph;
|
||||||
|
} else if (!this._settings[Common.Utils.documentSettingsType.Paragraph].Image || !this._settings[Common.Utils.documentSettingsType.Shape].hidden) {
|
||||||
|
if (formactive>shapeactive && formactive>imageactive)
|
||||||
|
priorityactive = Common.Utils.documentSettingsType.Form;
|
||||||
|
else if (shapeactive>formactive && shapeactive>imageactive)
|
||||||
|
priorityactive = Common.Utils.documentSettingsType.Shape;
|
||||||
|
else
|
||||||
|
priorityactive = Common.Utils.documentSettingsType.Image;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (priorityactive>-1) active = priorityactive;
|
if (priorityactive>-1) active = priorityactive;
|
||||||
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
||||||
else if (currentactive>=0) active = currentactive;
|
else if (currentactive>=0) active = currentactive;
|
||||||
|
|
|
@ -1897,7 +1897,7 @@ define([
|
||||||
})).show();
|
})).show();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.api.asc_RemoveContentControl(id);
|
this.api.asc_RemoveContentControlWrapper(id);
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Remove Content Control');
|
Common.component.Analytics.trackEvent('ToolBar', 'Remove Content Control');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1880,7 +1880,7 @@ define([
|
||||||
}
|
}
|
||||||
})).show();
|
})).show();
|
||||||
} else if (item.value == 'remove') {
|
} else if (item.value == 'remove') {
|
||||||
this.api.asc_RemoveContentControl(props.get_InternalId());
|
props.get_FormPr() ? this.api.asc_RemoveContentControl(props.get_InternalId()) : this.api.asc_RemoveContentControlWrapper(props.get_InternalId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
me.fireEvent('editcomplete', me);
|
me.fireEvent('editcomplete', me);
|
||||||
|
|
|
@ -293,7 +293,7 @@ define([
|
||||||
Common.localStorage.setItem("de-hide-right-settings", 1);
|
Common.localStorage.setItem("de-hide-right-settings", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]);
|
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]);
|
||||||
},
|
},
|
||||||
|
|
||||||
SetActivePane: function(type, open) {
|
SetActivePane: function(type, open) {
|
||||||
|
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 633 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 951 B |
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 1 KiB |