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

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

[DE][PE] При загрузке редакторов с открытой правой панелью показывать настройки параграфа/слайда (контролы на панелях пустые и disabled).
parent 0de954f2
...@@ -16,8 +16,6 @@ ...@@ -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" />
......
...@@ -63,18 +63,18 @@ define([ ...@@ -63,18 +63,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();
...@@ -91,19 +91,21 @@ define([ ...@@ -91,19 +91,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);
...@@ -111,12 +113,13 @@ define([ ...@@ -111,12 +113,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);
...@@ -125,24 +128,27 @@ define([ ...@@ -125,24 +128,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>') },
...@@ -198,6 +204,7 @@ define([ ...@@ -198,6 +204,7 @@ define([
})); }));
this.linkAdvanced = $('#paragraph-advanced-link'); this.linkAdvanced = $('#paragraph-advanced-link');
this.linkAdvanced.toggleClass('disabled', this._locked);
}, },
setApi: function(api) { setApi: function(api) {
......
...@@ -189,8 +189,8 @@ define([ ...@@ -189,8 +189,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 @@ ...@@ -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 @@ ...@@ -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%;">
......
...@@ -173,8 +173,8 @@ define([ ...@@ -173,8 +173,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);
......
...@@ -70,13 +70,13 @@ define([ ...@@ -70,13 +70,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',
...@@ -85,7 +85,7 @@ define([ ...@@ -85,7 +85,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;
...@@ -117,13 +117,15 @@ define([ ...@@ -117,13 +117,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>') },
...@@ -454,9 +456,10 @@ define([ ...@@ -454,9 +456,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 = [
...@@ -488,7 +491,8 @@ define([ ...@@ -488,7 +491,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));
...@@ -497,10 +501,11 @@ define([ ...@@ -497,10 +501,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));
...@@ -508,7 +513,7 @@ define([ ...@@ -508,7 +513,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,
...@@ -518,18 +523,21 @@ define([ ...@@ -518,18 +523,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();
...@@ -537,7 +545,8 @@ define([ ...@@ -537,7 +545,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();
......
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