Commit 95d2b890 authored by Julia Radzhabova's avatar Julia Radzhabova

[DE][PE] При загрузке редакторов с открытой правой панелью показывать...

[DE][PE] При загрузке редакторов с открытой правой панелью показывать настройки параграфа/слайда (контролы на панелях пустые и disabled).
parent 0de954f2
......@@ -16,8 +16,6 @@
</div>
<div id="id-textart-settings" class="settings-panel">
</div>
<div id="id-empty-settings" class="settings-panel">
</div>
</div>
<div class="tool-menu-btns">
<div class="ct-btn-category arrow-left" />
......
......@@ -63,18 +63,18 @@ define([
this._initSettings = true;
this._state = {
LineRuleIdx: 1,
LineHeight: 1.5,
LineSpacingBefore: 0,
LineSpacingAfter: 0.35,
LineRuleIdx: null,
LineHeight: null,
LineSpacingBefore: null,
LineSpacingAfter: null,
AddInterval: false,
BackColor: '#000000',
DisabledControls: false,
DisabledControls: true,
HideTextOnlySettings: false
};
this.spinners = [];
this.lockedControls = [];
this._locked = false;
this._locked = true;
this.isChart = false;
this.render();
......@@ -91,19 +91,21 @@ define([
cls: 'input-group-nr',
menuStyle: 'min-width: 85px;',
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.numLineHeight = new Common.UI.MetricSpinner({
el: $('#paragraph-spin-line-height'),
step: .01,
width: 85,
value: '1.5',
value: '',
defaultUnit : "",
maxValue: 132,
minValue: 0.5
minValue: 0.5,
disabled: this._locked
});
this.lockedControls.push(this.numLineHeight);
......@@ -111,12 +113,13 @@ define([
el: $('#paragraph-spin-spacing-before'),
step: .1,
width: 85,
value: '0 cm',
value: '',
defaultUnit : "cm",
maxValue: 55.88,
minValue: 0,
allowAuto : true,
autoText : this.txtAutoText
autoText : this.txtAutoText,
disabled: this._locked
});
this.spinners.push(this.numSpacingBefore);
this.lockedControls.push(this.numSpacingBefore);
......@@ -125,24 +128,27 @@ define([
el: $('#paragraph-spin-spacing-after'),
step: .1,
width: 85,
value: '0.35 cm',
value: '',
defaultUnit : "cm",
maxValue: 55.88,
minValue: 0,
allowAuto : true,
autoText : this.txtAutoText
autoText : this.txtAutoText,
disabled: this._locked
});
this.spinners.push(this.numSpacingAfter);
this.lockedControls.push(this.numSpacingAfter);
this.chAddInterval = new Common.UI.CheckBox({
el: $('#paragraph-checkbox-add-interval'),
labelText: this.strSomeParagraphSpace
labelText: this.strSomeParagraphSpace,
disabled: this._locked
});
this.lockedControls.push(this.chAddInterval);
this.btnColor = new Common.UI.ColorButton({
style: "width:45px;",
disabled: this._locked,
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
......@@ -198,6 +204,7 @@ define([
}));
this.linkAdvanced = $('#paragraph-advanced-link');
this.linkAdvanced.toggleClass('disabled', this._locked);
},
setApi: function(api) {
......
......@@ -189,8 +189,8 @@ define([
}
if (open) {
$('#id-empty-settings').parent().css("display", "inline-block" );
$('#id-empty-settings').addClass("active");
$('#id-paragraph-settings').parent().css("display", "inline-block" );
$('#id-paragraph-settings').addClass("active");
}
this.trigger('render:after', this);
......
......@@ -14,8 +14,6 @@
</div>
<div id="id-textart-settings" class="settings-panel">
</div>
<div id="id-empty-settings" class="settings-panel">
</div>
</div>
<div class="tool-menu-btns">
<div class="ct-btn-category arrow-left" />
......
......@@ -11,7 +11,7 @@
</tr>
<tr class="padding-small">
<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>
<div id="slide-panel-image-fill" class="settings-hidden padding-small" style="width: 100%;">
......
......@@ -173,8 +173,8 @@ define([
}
if (open) {
$('#id-empty-settings').parent().css("display", "inline-block" );
$('#id-empty-settings').addClass("active");
$('#id-slide-settings').parent().css("display", "inline-block" );
$('#id-slide-settings').addClass("active");
}
this.trigger('render:after', this);
......
......@@ -70,13 +70,13 @@ define([
this.FillItems = [];
this._stateDisabled = {
background: false,
effects: false,
timing: false
background: true,
effects: true,
timing: true
};
this._state = {
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
FillType:undefined,
SlideColor: 'ffffff',
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
FGColor: '000000',
......@@ -85,7 +85,7 @@ define([
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.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.Effect = Asc.c_oAscSlideTransitionTypes.None;
......@@ -117,13 +117,15 @@ define([
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
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.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
disabled: true,
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="slide-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
......@@ -454,9 +456,10 @@ define([
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
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._arrEffectType = [
......@@ -488,7 +491,8 @@ define([
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
editable: false,
data: this._arrEffectType
data: this._arrEffectType,
disabled: true
});
this.cmbEffectType.setValue('');
this.cmbEffectType.on('selected', _.bind(this.onEffectTypeSelect, this));
......@@ -497,10 +501,11 @@ define([
el: $('#slide-spin-duration'),
step: 1,
width: 65,
value: '2 s',
value: '',
defaultUnit : this.textSec,
maxValue: 300,
minValue: 0
minValue: 0,
disabled: true
});
this.numDuration.on('change', _.bind(this.onDurationChange, this));
......@@ -508,7 +513,7 @@ define([
el: $('#slide-spin-delay'),
step: 1,
width: 70,
value: '2 s',
value: '',
defaultUnit : this.textSec,
maxValue: 300,
minValue: 0,
......@@ -518,18 +523,21 @@ define([
this.chStartOnClick = new Common.UI.CheckBox({
el: $('#slide-checkbox-start-click'),
labelText: this.strStartOnClick
labelText: this.strStartOnClick,
disabled: true
});
this.chStartOnClick.on('change', _.bind(this.onStartOnClickChange, this));
this.chDelay = new Common.UI.CheckBox({
el: $('#slide-checkbox-delay'),
labelText: this.strDelay
labelText: this.strDelay,
disabled: true
});
this.chDelay.on('change', _.bind(this.onCheckDelayChange, this));
this.btnPreview = new Common.UI.Button({
el: $('#slide-button-preview')
el: $('#slide-button-preview'),
disabled: true
});
this.btnPreview.on('click', _.bind(function(btn){
if (this.api) this.api.SlideTransitionPlay();
......@@ -537,7 +545,8 @@ define([
}, this));
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){
if (this.api) this.api.SlideTimingApplyToAll();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment