From e5501d76925e5bceaf0abb9ddc713c79df58b985 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 21 Jun 2016 17:30:02 +0300 Subject: [PATCH] =?UTF-8?q?[DE][PE]=20=D0=9F=D1=80=D0=B8=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B5=20=D1=80=D0=B5=D0=B4=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20=D1=81=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D1=80=D1=8B=D1=82=D0=BE=D0=B9=20=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D1=8C=D1=8E=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D0=B3=D1=80=D0=B0=D1=84=D0=B0/=D1=81=D0=BB?= =?UTF-8?q?=D0=B0=D0=B9=D0=B4=D0=B0=20(=D0=BA=D0=BE=D0=BD=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D1=8B=20=D0=BD=D0=B0=20=D0=BF=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=D1=85=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=B8=20disabled).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/app/template/RightMenu.template | 2 - .../main/app/view/ParagraphSettings.js | 37 +++++++++------- .../documenteditor/main/app/view/RightMenu.js | 4 +- .../main/app/template/RightMenu.template | 2 - .../main/app/template/SlideSettings.template | 2 +- .../main/app/view/RightMenu.js | 4 +- .../main/app/view/SlideSettings.js | 43 +++++++++++-------- 7 files changed, 53 insertions(+), 41 deletions(-) diff --git a/apps/documenteditor/main/app/template/RightMenu.template b/apps/documenteditor/main/app/template/RightMenu.template index 499e30afa..6b30dae46 100644 --- a/apps/documenteditor/main/app/template/RightMenu.template +++ b/apps/documenteditor/main/app/template/RightMenu.template @@ -16,8 +16,6 @@
-
-
diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index a2f8d25dd..3b60b3216 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -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('
') }, @@ -206,6 +212,7 @@ define([ })); this.linkAdvanced = $('#paragraph-advanced-link'); + this.linkAdvanced.toggleClass('disabled', this._locked); }, setApi: function(api) { diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index 3366d6cfe..0288e6a30 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -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); diff --git a/apps/presentationeditor/main/app/template/RightMenu.template b/apps/presentationeditor/main/app/template/RightMenu.template index d8119b24b..6a34f6b22 100644 --- a/apps/presentationeditor/main/app/template/RightMenu.template +++ b/apps/presentationeditor/main/app/template/RightMenu.template @@ -14,8 +14,6 @@
-
-
diff --git a/apps/presentationeditor/main/app/template/SlideSettings.template b/apps/presentationeditor/main/app/template/SlideSettings.template index 776e9a705..2c4133d77 100644 --- a/apps/presentationeditor/main/app/template/SlideSettings.template +++ b/apps/presentationeditor/main/app/template/SlideSettings.template @@ -11,7 +11,7 @@ -
+
diff --git a/apps/presentationeditor/main/app/view/RightMenu.js b/apps/presentationeditor/main/app/view/RightMenu.js index eefa15406..5f78ff9c7 100644 --- a/apps/presentationeditor/main/app/view/RightMenu.js +++ b/apps/presentationeditor/main/app/view/RightMenu.js @@ -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); diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index 8043180cf..b2629b0e2 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -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('
') }, @@ -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();