[PE] Поправка к bug 27793
This commit is contained in:
parent
d0382c04f0
commit
4ee5489eb8
|
@ -69,6 +69,7 @@ define([
|
||||||
slidelayoutdisable:undefined,
|
slidelayoutdisable:undefined,
|
||||||
shapecontrolsdisable:undefined,
|
shapecontrolsdisable:undefined,
|
||||||
no_paragraph: undefined,
|
no_paragraph: undefined,
|
||||||
|
no_text: undefined,
|
||||||
no_object: undefined,
|
no_object: undefined,
|
||||||
clrtext: undefined,
|
clrtext: undefined,
|
||||||
linespace: undefined,
|
linespace: undefined,
|
||||||
|
@ -560,6 +561,7 @@ define([
|
||||||
slide_deleted = undefined,
|
slide_deleted = undefined,
|
||||||
slide_layout_lock = undefined,
|
slide_layout_lock = undefined,
|
||||||
no_paragraph = true,
|
no_paragraph = true,
|
||||||
|
no_text = true,
|
||||||
no_object = true;
|
no_object = true;
|
||||||
|
|
||||||
while (++i < selectedObjects.length) {
|
while (++i < selectedObjects.length) {
|
||||||
|
@ -568,6 +570,7 @@ define([
|
||||||
if (type == Asc.c_oAscTypeSelectElement.Paragraph) {
|
if (type == Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||||
paragraph_locked = pr.get_Locked();
|
paragraph_locked = pr.get_Locked();
|
||||||
no_paragraph = false;
|
no_paragraph = false;
|
||||||
|
no_text = false;
|
||||||
no_object = false;
|
no_object = false;
|
||||||
} else if (type == Asc.c_oAscTypeSelectElement.Slide) {
|
} else if (type == Asc.c_oAscTypeSelectElement.Slide) {
|
||||||
slide_deleted = pr.get_LockDelete();
|
slide_deleted = pr.get_LockDelete();
|
||||||
|
@ -575,6 +578,9 @@ define([
|
||||||
} else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) {
|
} else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) {
|
||||||
shape_locked = pr.get_Locked();
|
shape_locked = pr.get_Locked();
|
||||||
no_object = false;
|
no_object = false;
|
||||||
|
if (type !== Asc.c_oAscTypeSelectElement.Image) {
|
||||||
|
no_text = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,9 +595,14 @@ define([
|
||||||
this.toolbar.lockToolbar(PE.enumLock.noParagraphSelected, no_paragraph, {array: [me.toolbar.btnCopyStyle]});
|
this.toolbar.lockToolbar(PE.enumLock.noParagraphSelected, no_paragraph, {array: [me.toolbar.btnCopyStyle]});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._state.no_text !== no_text) {
|
||||||
|
if (this._state.activated) this._state.no_text = no_text;
|
||||||
|
this.toolbar.lockToolbar(PE.enumLock.noTextSelected, no_text, {array: me.toolbar.paragraphControls});
|
||||||
|
}
|
||||||
|
|
||||||
if (shape_locked!==undefined && this._state.shapecontrolsdisable !== shape_locked) {
|
if (shape_locked!==undefined && this._state.shapecontrolsdisable !== shape_locked) {
|
||||||
if (this._state.activated) this._state.shapecontrolsdisable = shape_locked;
|
if (this._state.activated) this._state.shapecontrolsdisable = shape_locked;
|
||||||
this.toolbar.lockToolbar(PE.enumLock.shapeLock, shape_locked, {array: me.toolbar.shapeControls});
|
this.toolbar.lockToolbar(PE.enumLock.shapeLock, shape_locked, {array: me.toolbar.shapeControls.concat(me.toolbar.paragraphControls)});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._state.no_object !== no_object ) {
|
if (this._state.no_object !== no_object ) {
|
||||||
|
|
|
@ -79,7 +79,8 @@ define([
|
||||||
noParagraphSelected: 'no-paragraph',
|
noParagraphSelected: 'no-paragraph',
|
||||||
noObjectSelected: 'no-object',
|
noObjectSelected: 'no-object',
|
||||||
disableOnStart: 'on-start',
|
disableOnStart: 'on-start',
|
||||||
cantPrint: 'cant-print'
|
cantPrint: 'cant-print',
|
||||||
|
noTextSelected: 'no-text'
|
||||||
};
|
};
|
||||||
|
|
||||||
PE.Views.Toolbar = Backbone.View.extend(_.extend({
|
PE.Views.Toolbar = Backbone.View.extend(_.extend({
|
||||||
|
@ -282,7 +283,7 @@ define([
|
||||||
menuCls : 'scrollable-menu',
|
menuCls : 'scrollable-menu',
|
||||||
menuStyle : 'min-width: 325px;',
|
menuStyle : 'min-width: 325px;',
|
||||||
hint : me.tipFontName,
|
hint : me.tipFontName,
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
store : new Common.Collections.Fonts()
|
store : new Common.Collections.Fonts()
|
||||||
});
|
});
|
||||||
me.paragraphControls.push(me.cmbFontName);
|
me.paragraphControls.push(me.cmbFontName);
|
||||||
|
@ -291,7 +292,7 @@ define([
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
menuStyle : 'min-width: 55px;',
|
menuStyle : 'min-width: 55px;',
|
||||||
hint : me.tipFontSize,
|
hint : me.tipFontSize,
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
data : [
|
data : [
|
||||||
{ value: 8, displayValue: "8" },
|
{ value: 8, displayValue: "8" },
|
||||||
{ value: 9, displayValue: "9" },
|
{ value: 9, displayValue: "9" },
|
||||||
|
@ -317,7 +318,7 @@ define([
|
||||||
id : 'id-toolbar-btn-bold',
|
id : 'id-toolbar-btn-bold',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-bold',
|
iconCls : 'btn-bold',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textBold + Common.Utils.String.platformKey('Ctrl+B'),
|
hint : me.textBold + Common.Utils.String.platformKey('Ctrl+B'),
|
||||||
enableToggle: true
|
enableToggle: true
|
||||||
});
|
});
|
||||||
|
@ -327,7 +328,7 @@ define([
|
||||||
id : 'id-toolbar-btn-italic',
|
id : 'id-toolbar-btn-italic',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-italic',
|
iconCls : 'btn-italic',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textItalic + Common.Utils.String.platformKey('Ctrl+I'),
|
hint : me.textItalic + Common.Utils.String.platformKey('Ctrl+I'),
|
||||||
enableToggle: true
|
enableToggle: true
|
||||||
});
|
});
|
||||||
|
@ -337,7 +338,7 @@ define([
|
||||||
id : 'id-toolbar-btn-underline',
|
id : 'id-toolbar-btn-underline',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-underline',
|
iconCls : 'btn-underline',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textUnderline + Common.Utils.String.platformKey('Ctrl+U'),
|
hint : me.textUnderline + Common.Utils.String.platformKey('Ctrl+U'),
|
||||||
enableToggle: true
|
enableToggle: true
|
||||||
});
|
});
|
||||||
|
@ -347,7 +348,7 @@ define([
|
||||||
id : 'id-toolbar-btn-strikeout',
|
id : 'id-toolbar-btn-strikeout',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-strikeout',
|
iconCls : 'btn-strikeout',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textStrikeout,
|
hint : me.textStrikeout,
|
||||||
enableToggle: true
|
enableToggle: true
|
||||||
});
|
});
|
||||||
|
@ -357,7 +358,7 @@ define([
|
||||||
id : 'id-toolbar-btn-superscript',
|
id : 'id-toolbar-btn-superscript',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-superscript',
|
iconCls : 'btn-superscript',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textSuperscript,
|
hint : me.textSuperscript,
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
toggleGroup : 'superscriptGroup'
|
toggleGroup : 'superscriptGroup'
|
||||||
|
@ -368,7 +369,7 @@ define([
|
||||||
id : 'id-toolbar-btn-subscript',
|
id : 'id-toolbar-btn-subscript',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-subscript',
|
iconCls : 'btn-subscript',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.textSubscript,
|
hint : me.textSubscript,
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
toggleGroup : 'superscriptGroup'
|
toggleGroup : 'superscriptGroup'
|
||||||
|
@ -379,7 +380,7 @@ define([
|
||||||
id : 'id-toolbar-btn-fontcolor',
|
id : 'id-toolbar-btn-fontcolor',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-fontcolor',
|
iconCls : 'btn-fontcolor',
|
||||||
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noParagraphSelected],
|
lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
|
||||||
hint : me.tipFontColor,
|
hint : me.tipFontColor,
|
||||||
split : true,
|
split : true,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
|
|
Loading…
Reference in a new issue