Commit e5501d76 authored by Julia Radzhabova's avatar Julia Radzhabova

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

[DE][PE] При загрузке редакторов с открытой правой панелью показывать настройки параграфа/слайда (контролы на панелях пустые и disabled).
parent c44660cb
......@@ -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" />
......
......@@ -71,18 +71,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();
......@@ -99,19 +99,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);
......@@ -119,12 +121,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);
......@@ -133,24 +136,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>') },
......@@ -206,6 +212,7 @@ define([
}));
this.linkAdvanced = $('#paragraph-advanced-link');
this.linkAdvanced.toggleClass('disabled', this._locked);
},
setApi: function(api) {
......
......@@ -197,8 +197,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%;">
......
......@@ -181,8 +181,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);
......
......@@ -78,13 +78,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',
......@@ -93,7 +93,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;
......@@ -125,13 +125,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>') },
......@@ -462,9 +464,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 = [
......@@ -496,7 +499,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));
......@@ -505,10 +509,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));
......@@ -516,7 +521,7 @@ define([
el: $('#slide-spin-delay'),
step: 1,
width: 70,
value: '2 s',
value: '',
defaultUnit : this.textSec,
maxValue: 300,
minValue: 0,
......@@ -526,18 +531,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();
......@@ -545,7 +553,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