[DE][PE] При загрузке редакторов с открытой правой панелью показывать настройки параграфа/слайда (контролы на панелях пустые и disabled).
This commit is contained in:
parent
c44660cbed
commit
e5501d7692
|
@ -16,8 +16,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="id-textart-settings" class="settings-panel">
|
<div id="id-textart-settings" class="settings-panel">
|
||||||
</div>
|
</div>
|
||||||
<div id="id-empty-settings" class="settings-panel">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-menu-btns">
|
<div class="tool-menu-btns">
|
||||||
<div class="ct-btn-category arrow-left" />
|
<div class="ct-btn-category arrow-left" />
|
||||||
|
|
|
@ -71,18 +71,18 @@ define([
|
||||||
this._initSettings = true;
|
this._initSettings = true;
|
||||||
|
|
||||||
this._state = {
|
this._state = {
|
||||||
LineRuleIdx: 1,
|
LineRuleIdx: null,
|
||||||
LineHeight: 1.5,
|
LineHeight: null,
|
||||||
LineSpacingBefore: 0,
|
LineSpacingBefore: null,
|
||||||
LineSpacingAfter: 0.35,
|
LineSpacingAfter: null,
|
||||||
AddInterval: false,
|
AddInterval: false,
|
||||||
BackColor: '#000000',
|
BackColor: '#000000',
|
||||||
DisabledControls: false,
|
DisabledControls: true,
|
||||||
HideTextOnlySettings: false
|
HideTextOnlySettings: false
|
||||||
};
|
};
|
||||||
this.spinners = [];
|
this.spinners = [];
|
||||||
this.lockedControls = [];
|
this.lockedControls = [];
|
||||||
this._locked = false;
|
this._locked = true;
|
||||||
this.isChart = false;
|
this.isChart = false;
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
@ -99,19 +99,21 @@ define([
|
||||||
cls: 'input-group-nr',
|
cls: 'input-group-nr',
|
||||||
menuStyle: 'min-width: 85px;',
|
menuStyle: 'min-width: 85px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
data: this._arrLineRule
|
data: this._arrLineRule,
|
||||||
|
disabled: this._locked
|
||||||
});
|
});
|
||||||
this.cmbLineRule.setValue(this._arrLineRule[ this._state.LineRuleIdx].value);
|
this.cmbLineRule.setValue('');
|
||||||
this.lockedControls.push(this.cmbLineRule);
|
this.lockedControls.push(this.cmbLineRule);
|
||||||
|
|
||||||
this.numLineHeight = new Common.UI.MetricSpinner({
|
this.numLineHeight = new Common.UI.MetricSpinner({
|
||||||
el: $('#paragraph-spin-line-height'),
|
el: $('#paragraph-spin-line-height'),
|
||||||
step: .01,
|
step: .01,
|
||||||
width: 85,
|
width: 85,
|
||||||
value: '1.5',
|
value: '',
|
||||||
defaultUnit : "",
|
defaultUnit : "",
|
||||||
maxValue: 132,
|
maxValue: 132,
|
||||||
minValue: 0.5
|
minValue: 0.5,
|
||||||
|
disabled: this._locked
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.numLineHeight);
|
this.lockedControls.push(this.numLineHeight);
|
||||||
|
|
||||||
|
@ -119,12 +121,13 @@ define([
|
||||||
el: $('#paragraph-spin-spacing-before'),
|
el: $('#paragraph-spin-spacing-before'),
|
||||||
step: .1,
|
step: .1,
|
||||||
width: 85,
|
width: 85,
|
||||||
value: '0 cm',
|
value: '',
|
||||||
defaultUnit : "cm",
|
defaultUnit : "cm",
|
||||||
maxValue: 55.88,
|
maxValue: 55.88,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
allowAuto : true,
|
allowAuto : true,
|
||||||
autoText : this.txtAutoText
|
autoText : this.txtAutoText,
|
||||||
|
disabled: this._locked
|
||||||
});
|
});
|
||||||
this.spinners.push(this.numSpacingBefore);
|
this.spinners.push(this.numSpacingBefore);
|
||||||
this.lockedControls.push(this.numSpacingBefore);
|
this.lockedControls.push(this.numSpacingBefore);
|
||||||
|
@ -133,24 +136,27 @@ define([
|
||||||
el: $('#paragraph-spin-spacing-after'),
|
el: $('#paragraph-spin-spacing-after'),
|
||||||
step: .1,
|
step: .1,
|
||||||
width: 85,
|
width: 85,
|
||||||
value: '0.35 cm',
|
value: '',
|
||||||
defaultUnit : "cm",
|
defaultUnit : "cm",
|
||||||
maxValue: 55.88,
|
maxValue: 55.88,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
allowAuto : true,
|
allowAuto : true,
|
||||||
autoText : this.txtAutoText
|
autoText : this.txtAutoText,
|
||||||
|
disabled: this._locked
|
||||||
});
|
});
|
||||||
this.spinners.push(this.numSpacingAfter);
|
this.spinners.push(this.numSpacingAfter);
|
||||||
this.lockedControls.push(this.numSpacingAfter);
|
this.lockedControls.push(this.numSpacingAfter);
|
||||||
|
|
||||||
this.chAddInterval = new Common.UI.CheckBox({
|
this.chAddInterval = new Common.UI.CheckBox({
|
||||||
el: $('#paragraph-checkbox-add-interval'),
|
el: $('#paragraph-checkbox-add-interval'),
|
||||||
labelText: this.strSomeParagraphSpace
|
labelText: this.strSomeParagraphSpace,
|
||||||
|
disabled: this._locked
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chAddInterval);
|
this.lockedControls.push(this.chAddInterval);
|
||||||
|
|
||||||
this.btnColor = new Common.UI.ColorButton({
|
this.btnColor = new Common.UI.ColorButton({
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
|
disabled: this._locked,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||||
|
@ -206,6 +212,7 @@ define([
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.linkAdvanced = $('#paragraph-advanced-link');
|
this.linkAdvanced = $('#paragraph-advanced-link');
|
||||||
|
this.linkAdvanced.toggleClass('disabled', this._locked);
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function(api) {
|
setApi: function(api) {
|
||||||
|
|
|
@ -197,8 +197,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (open) {
|
if (open) {
|
||||||
$('#id-empty-settings').parent().css("display", "inline-block" );
|
$('#id-paragraph-settings').parent().css("display", "inline-block" );
|
||||||
$('#id-empty-settings').addClass("active");
|
$('#id-paragraph-settings').addClass("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.trigger('render:after', this);
|
this.trigger('render:after', this);
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="id-textart-settings" class="settings-panel">
|
<div id="id-textart-settings" class="settings-panel">
|
||||||
</div>
|
</div>
|
||||||
<div id="id-empty-settings" class="settings-panel">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-menu-btns">
|
<div class="tool-menu-btns">
|
||||||
<div class="ct-btn-category arrow-left" />
|
<div class="ct-btn-category arrow-left" />
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="padding-small">
|
<tr class="padding-small">
|
||||||
<td>
|
<td>
|
||||||
<div id="slide-panel-color-fill" class="padding-small" style="width: 100%;">
|
<div id="slide-panel-color-fill" class="settings-hidden padding-small" style="width: 100%;">
|
||||||
<div id="slide-back-color-btn" style=""></div>
|
<div id="slide-back-color-btn" style=""></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="slide-panel-image-fill" class="settings-hidden padding-small" style="width: 100%;">
|
<div id="slide-panel-image-fill" class="settings-hidden padding-small" style="width: 100%;">
|
||||||
|
|
|
@ -181,8 +181,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (open) {
|
if (open) {
|
||||||
$('#id-empty-settings').parent().css("display", "inline-block" );
|
$('#id-slide-settings').parent().css("display", "inline-block" );
|
||||||
$('#id-empty-settings').addClass("active");
|
$('#id-slide-settings').addClass("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.trigger('render:after', this);
|
this.trigger('render:after', this);
|
||||||
|
|
|
@ -78,13 +78,13 @@ define([
|
||||||
this.FillItems = [];
|
this.FillItems = [];
|
||||||
|
|
||||||
this._stateDisabled = {
|
this._stateDisabled = {
|
||||||
background: false,
|
background: true,
|
||||||
effects: false,
|
effects: true,
|
||||||
timing: false
|
timing: true
|
||||||
};
|
};
|
||||||
|
|
||||||
this._state = {
|
this._state = {
|
||||||
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
|
FillType:undefined,
|
||||||
SlideColor: 'ffffff',
|
SlideColor: 'ffffff',
|
||||||
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
|
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
|
||||||
FGColor: '000000',
|
FGColor: '000000',
|
||||||
|
@ -93,7 +93,7 @@ define([
|
||||||
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR
|
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR
|
||||||
};
|
};
|
||||||
|
|
||||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
|
this.OriginalFillType = undefined;
|
||||||
this.SlideColor = {Value: 1, Color: 'ffffff'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
|
this.SlideColor = {Value: 1, Color: 'ffffff'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
|
||||||
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
|
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
|
||||||
this.Effect = Asc.c_oAscSlideTransitionTypes.None;
|
this.Effect = Asc.c_oAscSlideTransitionTypes.None;
|
||||||
|
@ -125,13 +125,15 @@ define([
|
||||||
style: 'width: 100%;',
|
style: 'width: 100%;',
|
||||||
menuStyle: 'min-width: 190px;',
|
menuStyle: 'min-width: 190px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
data: this._arrFillSrc
|
data: this._arrFillSrc,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
|
this.cmbFillSrc.setValue('');
|
||||||
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
|
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
|
||||||
|
|
||||||
this.btnBackColor = new Common.UI.ColorButton({
|
this.btnBackColor = new Common.UI.ColorButton({
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
|
disabled: true,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="slide-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="slide-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||||
|
@ -462,9 +464,10 @@ define([
|
||||||
style: 'width: 100%;',
|
style: 'width: 100%;',
|
||||||
menuStyle: 'min-width: 190px;',
|
menuStyle: 'min-width: 190px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
data: this._arrEffectName
|
data: this._arrEffectName,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.cmbEffectName.setValue(this._arrEffectName[0].value);
|
this.cmbEffectName.setValue('');
|
||||||
this.cmbEffectName.on('selected', _.bind(this.onEffectNameSelect, this));
|
this.cmbEffectName.on('selected', _.bind(this.onEffectNameSelect, this));
|
||||||
|
|
||||||
this._arrEffectType = [
|
this._arrEffectType = [
|
||||||
|
@ -496,7 +499,8 @@ define([
|
||||||
style: 'width: 100%;',
|
style: 'width: 100%;',
|
||||||
menuStyle: 'min-width: 190px;',
|
menuStyle: 'min-width: 190px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
data: this._arrEffectType
|
data: this._arrEffectType,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.cmbEffectType.setValue('');
|
this.cmbEffectType.setValue('');
|
||||||
this.cmbEffectType.on('selected', _.bind(this.onEffectTypeSelect, this));
|
this.cmbEffectType.on('selected', _.bind(this.onEffectTypeSelect, this));
|
||||||
|
@ -505,10 +509,11 @@ define([
|
||||||
el: $('#slide-spin-duration'),
|
el: $('#slide-spin-duration'),
|
||||||
step: 1,
|
step: 1,
|
||||||
width: 65,
|
width: 65,
|
||||||
value: '2 s',
|
value: '',
|
||||||
defaultUnit : this.textSec,
|
defaultUnit : this.textSec,
|
||||||
maxValue: 300,
|
maxValue: 300,
|
||||||
minValue: 0
|
minValue: 0,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.numDuration.on('change', _.bind(this.onDurationChange, this));
|
this.numDuration.on('change', _.bind(this.onDurationChange, this));
|
||||||
|
|
||||||
|
@ -516,7 +521,7 @@ define([
|
||||||
el: $('#slide-spin-delay'),
|
el: $('#slide-spin-delay'),
|
||||||
step: 1,
|
step: 1,
|
||||||
width: 70,
|
width: 70,
|
||||||
value: '2 s',
|
value: '',
|
||||||
defaultUnit : this.textSec,
|
defaultUnit : this.textSec,
|
||||||
maxValue: 300,
|
maxValue: 300,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
|
@ -526,18 +531,21 @@ define([
|
||||||
|
|
||||||
this.chStartOnClick = new Common.UI.CheckBox({
|
this.chStartOnClick = new Common.UI.CheckBox({
|
||||||
el: $('#slide-checkbox-start-click'),
|
el: $('#slide-checkbox-start-click'),
|
||||||
labelText: this.strStartOnClick
|
labelText: this.strStartOnClick,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.chStartOnClick.on('change', _.bind(this.onStartOnClickChange, this));
|
this.chStartOnClick.on('change', _.bind(this.onStartOnClickChange, this));
|
||||||
|
|
||||||
this.chDelay = new Common.UI.CheckBox({
|
this.chDelay = new Common.UI.CheckBox({
|
||||||
el: $('#slide-checkbox-delay'),
|
el: $('#slide-checkbox-delay'),
|
||||||
labelText: this.strDelay
|
labelText: this.strDelay,
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.chDelay.on('change', _.bind(this.onCheckDelayChange, this));
|
this.chDelay.on('change', _.bind(this.onCheckDelayChange, this));
|
||||||
|
|
||||||
this.btnPreview = new Common.UI.Button({
|
this.btnPreview = new Common.UI.Button({
|
||||||
el: $('#slide-button-preview')
|
el: $('#slide-button-preview'),
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.btnPreview.on('click', _.bind(function(btn){
|
this.btnPreview.on('click', _.bind(function(btn){
|
||||||
if (this.api) this.api.SlideTransitionPlay();
|
if (this.api) this.api.SlideTransitionPlay();
|
||||||
|
@ -545,7 +553,8 @@ define([
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
this.btnApplyToAll = new Common.UI.Button({
|
this.btnApplyToAll = new Common.UI.Button({
|
||||||
el: $('#slide-button-apply-all')
|
el: $('#slide-button-apply-all'),
|
||||||
|
disabled: true
|
||||||
});
|
});
|
||||||
this.btnApplyToAll.on('click', _.bind(function(btn){
|
this.btnApplyToAll.on('click', _.bind(function(btn){
|
||||||
if (this.api) this.api.SlideTimingApplyToAll();
|
if (this.api) this.api.SlideTimingApplyToAll();
|
||||||
|
|
Loading…
Reference in a new issue