[PE] Hide slides.
This commit is contained in:
parent
0a38441e06
commit
ed0ae77b97
|
@ -216,7 +216,7 @@ define([
|
||||||
var onContextMenu = function(event){
|
var onContextMenu = function(event){
|
||||||
_.delay(function(){
|
_.delay(function(){
|
||||||
if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
|
if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
|
||||||
showPopupMenu.call(me, me.slideMenu, {isSlideSelect: event.get_IsSlideSelect(), fromThumbs: true}, event);
|
showPopupMenu.call(me, me.slideMenu, {isSlideSelect: event.get_IsSlideSelect(), isSlideHidden: event.get_IsSlideHidden(), fromThumbs: true}, event);
|
||||||
} else {
|
} else {
|
||||||
showObjectMenu.call(me, event);
|
showObjectMenu.call(me, event);
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,14 @@ define([
|
||||||
if (me.currentMenu && me.currentMenu.isVisible()){
|
if (me.currentMenu && me.currentMenu.isVisible()){
|
||||||
if (me.api.asc_getCurrentFocusObject() === 0 ){ // thumbnails
|
if (me.api.asc_getCurrentFocusObject() === 0 ){ // thumbnails
|
||||||
if (me.slideMenu===me.currentMenu) {
|
if (me.slideMenu===me.currentMenu) {
|
||||||
me.currentMenu.options.initMenu({isSlideSelect: me.slideMenu.items[2].isVisible(), fromThumbs: true});
|
var isHidden = false;
|
||||||
|
_.each(selectedElements, function(element, index) {
|
||||||
|
if (Asc.c_oAscTypeSelectElement.Slide == element.get_ObjectType()) {
|
||||||
|
isHidden = element.get_ObjectValue().get_IsHidden();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
me.currentMenu.options.initMenu({isSlideSelect: me.slideMenu.items[2].isVisible(), isSlideHidden: isHidden, fromThumbs: true});
|
||||||
me.currentMenu.alignPosition();
|
me.currentMenu.alignPosition();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1814,18 +1821,33 @@ define([
|
||||||
PE.getController('RightMenu').onDoubleClickOnObject(item.options.value);
|
PE.getController('RightMenu').onDoubleClickOnObject(item.options.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var mnuSlideHide = new Common.UI.MenuItem({
|
||||||
|
caption : me.txtSlideHide,
|
||||||
|
checkable: true,
|
||||||
|
checked: false
|
||||||
|
}).on('click', function(item){
|
||||||
|
if (me.api){
|
||||||
|
me.api.asc_HideSlides(item.checked);
|
||||||
|
|
||||||
|
me.fireEvent('editcomplete', me);
|
||||||
|
Common.component.Analytics.trackEvent('DocumentHolder', 'Hide Slides');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
me.slideMenu = new Common.UI.Menu({
|
me.slideMenu = new Common.UI.Menu({
|
||||||
initMenu: function(value) {
|
initMenu: function(value) {
|
||||||
menuSlidePaste.setVisible(value.fromThumbs!==true);
|
menuSlidePaste.setVisible(value.fromThumbs!==true);
|
||||||
me.slideMenu.items[1].setVisible(value.fromThumbs===true); // New Slide
|
me.slideMenu.items[1].setVisible(value.fromThumbs===true); // New Slide
|
||||||
me.slideMenu.items[2].setVisible(value.isSlideSelect===true); // Duplicate Slide
|
me.slideMenu.items[2].setVisible(value.isSlideSelect===true); // Duplicate Slide
|
||||||
mnuDeleteSlide.setVisible(value.isSlideSelect===true);
|
mnuDeleteSlide.setVisible(value.isSlideSelect===true);
|
||||||
me.slideMenu.items[4].setVisible(value.isSlideSelect===true || value.fromThumbs!==true);
|
mnuSlideHide.setVisible(value.isSlideSelect===true);
|
||||||
|
mnuSlideHide.setChecked(value.isSlideHidden===true);
|
||||||
|
me.slideMenu.items[5].setVisible(value.isSlideSelect===true || value.fromThumbs!==true);
|
||||||
mnuChangeSlide.setVisible(value.isSlideSelect===true || value.fromThumbs!==true);
|
mnuChangeSlide.setVisible(value.isSlideSelect===true || value.fromThumbs!==true);
|
||||||
menuSlideSettings.setVisible(value.fromThumbs!==true);
|
menuSlideSettings.setVisible(value.fromThumbs!==true);
|
||||||
menuSlideSettings.options.value = null;
|
menuSlideSettings.options.value = null;
|
||||||
|
|
||||||
for (var i = 7; i < 11; i++) {
|
for (var i = 8; i < 12; i++) {
|
||||||
me.slideMenu.items[i].setVisible(value.fromThumbs===true);
|
me.slideMenu.items[i].setVisible(value.fromThumbs===true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1852,6 +1874,7 @@ define([
|
||||||
mnuSelectAll.setDisabled(locked || me.slidesCount<2);
|
mnuSelectAll.setDisabled(locked || me.slidesCount<2);
|
||||||
mnuDeleteSlide.setDisabled(lockedDeleted || locked);
|
mnuDeleteSlide.setDisabled(lockedDeleted || locked);
|
||||||
mnuChangeSlide.setDisabled(lockedLayout || locked);
|
mnuChangeSlide.setDisabled(lockedLayout || locked);
|
||||||
|
mnuSlideHide.setDisabled(lockedLayout || locked);
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
menuSlidePaste,
|
menuSlidePaste,
|
||||||
|
@ -1878,6 +1901,7 @@ define([
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
mnuDeleteSlide,
|
mnuDeleteSlide,
|
||||||
|
mnuSlideHide,
|
||||||
{caption: '--'},
|
{caption: '--'},
|
||||||
mnuChangeSlide,
|
mnuChangeSlide,
|
||||||
menuSlideSettings,
|
menuSlideSettings,
|
||||||
|
@ -3245,7 +3269,8 @@ define([
|
||||||
moreText: 'More variants...',
|
moreText: 'More variants...',
|
||||||
spellcheckText: 'Spellcheck',
|
spellcheckText: 'Spellcheck',
|
||||||
langText: 'Select Language',
|
langText: 'Select Language',
|
||||||
textUndo: 'Undo'
|
textUndo: 'Undo',
|
||||||
|
txtSlideHide: 'Hide Slide'
|
||||||
|
|
||||||
}, PE.Views.DocumentHolder || {}));
|
}, PE.Views.DocumentHolder || {}));
|
||||||
});
|
});
|
|
@ -781,6 +781,7 @@
|
||||||
"PE.Views.DocumentHolder.txtUnderbar": "Bar under text",
|
"PE.Views.DocumentHolder.txtUnderbar": "Bar under text",
|
||||||
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
||||||
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||||
|
"PE.Views.DocumentHolder.txtSlideHide": "Hide Slide",
|
||||||
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
|
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
|
||||||
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
|
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
|
||||||
"PE.Views.DocumentPreview.txtClose": "Close Slideshow",
|
"PE.Views.DocumentPreview.txtClose": "Close Slideshow",
|
||||||
|
|
Loading…
Reference in a new issue