diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 3582875b5..60e3aa90e 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -49,7 +49,8 @@ define([ 'common/main/lib/view/InsertTableDialog', 'presentationeditor/main/app/view/Toolbar', 'presentationeditor/main/app/view/HyperlinkSettingsDialog', - 'presentationeditor/main/app/view/SlideSizeSettings' + 'presentationeditor/main/app/view/SlideSizeSettings', + 'presentationeditor/main/app/view/SlideshowSettings' ], function () { 'use strict'; PE.Controllers.Toolbar = Backbone.Controller.extend(_.extend({ @@ -184,7 +185,8 @@ define([ toolbar.mnuAddSlidePicker.on('item:click', _.bind(this.onAddSlide, this)); if (toolbar.mnuChangeSlidePicker) toolbar.mnuChangeSlidePicker.on('item:click', _.bind(this.onChangeSlide, this)); - toolbar.btnPreview.on('click', _.bind(this.onPreview, this)); + toolbar.btnPreview.on('click', _.bind(this.onPreviewBtnClick, this)); + toolbar.btnPreview.menu.on('item:click', _.bind(this.onPreviewItemClick, this)); toolbar.btnPrint.on('click', _.bind(this.onPrint, this)); toolbar.btnSave.on('click', _.bind(this.onSave, this)); toolbar.btnUndo.on('click', _.bind(this.onUndo, this)); @@ -746,17 +748,14 @@ define([ } }, - onPreview: function(btn, e) { + onPreview: function(slidenum) { var previewPanel = PE.getController('Viewport').getView('DocumentPreview'), me = this; if (previewPanel && me.api) { previewPanel.show(); var onWindowResize = function() { Common.NotificationCenter.off('window:resize', onWindowResize); - - var current = me.api.getCurrentPage(); - me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0); - + me.api.StartDemonstration('presentation-preview', _.isNumber(slidenum) ? slidenum : 0); Common.component.Analytics.trackEvent('ToolBar', 'Preview'); }; if (!me.toolbar.mode.isDesktopApp) { @@ -781,6 +780,57 @@ define([ } }, + onPreviewBtnClick: function(btn, e) { + this.onPreview(this.api.getCurrentPage()); + }, + + onPreviewItemClick: function(menu, item) { + switch (item.value) { + case 0: + this.onPreview(0); + break; + case 1: + this.onPreview(this.api.getCurrentPage()); + break; + case 2: + var win, + me = this, + selectedElements = me.api.getSelectedElements(), + loop = false; + if (selectedElements && _.isArray(selectedElements)){ + for (var i=0; i
- +
diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index b99230efe..17735c278 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -2036,7 +2036,7 @@ define([ txtDeleteSlide : 'Delete Slide', txtBackground : 'Background', txtChangeLayout : 'Change Layout', - txtPreview : 'Preview', + txtPreview : 'Start slideshow', textShapeAlignLeft : 'Align Left', textShapeAlignRight : 'Align Right', textShapeAlignCenter : 'Align Center', diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index 4d7256ed7..a43ce03da 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -356,7 +356,7 @@ define([ txtPrev: 'Previous Slide', txtNext: 'Next Slide', - txtClose: 'Close Preview', + txtClose: 'Close Slideshow', goToSlideText : 'Go to Slide', slideIndexText : 'Slide {0} of {1}', txtPlay: 'Start Presentation', diff --git a/apps/presentationeditor/main/app/view/Statusbar.js b/apps/presentationeditor/main/app/view/Statusbar.js index 2e253ec47..db506a62b 100644 --- a/apps/presentationeditor/main/app/view/Statusbar.js +++ b/apps/presentationeditor/main/app/view/Statusbar.js @@ -375,7 +375,7 @@ define([ tipZoomOut : 'Zoom Out', tipZoomFactor : 'Magnification', txtPageNumInvalid: 'Slide number invalid', - tipPreview : 'Start Preview', + tipPreview : 'Start Slideshow', tipAccessRights : 'Manage document access rights', tipViewUsers : 'View users and manage document access rights', txAccessRights : 'Change access rights' diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 70ff8d149..dc60f9e9e 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -221,7 +221,20 @@ define([ cls : 'btn-toolbar', iconCls : 'btn-preview', lock : [_set.menuFileOpen, _set.slideDeleted, _set.noSlides, _set.disableOnStart], - hint : me.tipPreview + hint : me.tipPreview, + split : true, + menu : new Common.UI.Menu({ + items : [ + {caption: this.textShowBegin, value: 0}, + {caption: this.textShowCurrent, value: 1}, + {caption: '--'}, + me.mnuShowSettings = new Common.UI.MenuItem({ + caption: this.textShowSettings, + value: 2, + lock: [_set.lostConnect] + }) + ] + }) }); me.slideOnlyControls.push(me.btnPreview); @@ -1078,7 +1091,7 @@ define([ this.btnNumbers, this.btnDecLeftOffset, this.btnIncLeftOffset, this.btnLineSpace, this.btnHorizontalAlign, this.btnVerticalAlign, this.btnShapeArrange, this.btnShapeAlign, this.btnInsertTable, this.btnInsertImage, this.btnInsertChart, this.btnInsertText, - this.btnInsertHyperlink, this.btnInsertShape, this.btnColorSchemas, this.btnSlideSize, this.listTheme + this.btnInsertHyperlink, this.btnInsertShape, this.btnColorSchemas, this.btnSlideSize, this.listTheme, this.mnuShowSettings ]; // Disable all components before load document @@ -1555,7 +1568,7 @@ define([ tipInsertHyperlink: 'Add Hyperlink', tipInsertText: 'Insert Text', tipInsertShape: 'Insert Autoshape', - tipPreview: 'Start Preview', + tipPreview: 'Start Slideshow', tipAddSlide: 'Add Slide', tipNewDocument: 'New Document', tipOpenDocument: 'Open Document', @@ -1628,6 +1641,9 @@ define([ tipSlideTheme: 'Slide Theme', tipSaveCoauth: 'Save your changes for the other users to see them.', textInsText: 'Insert text box', - textInsTextArt: 'Insert Text Art' + textInsTextArt: 'Insert Text Art', + textShowBegin: 'Show from Beginning', + textShowCurrent: 'Show from Current slide', + textShowSettings: 'Show Settings' }, PE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 1847d7350..edafb8439 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -303,14 +303,14 @@ "PE.Views.DocumentHolder.txtGroup": "Group", "PE.Views.DocumentHolder.txtNewSlide": "New Slide", "PE.Views.DocumentHolder.txtPressLink": "Press CTRL and click link", - "PE.Views.DocumentHolder.txtPreview": "Preview", + "PE.Views.DocumentHolder.txtPreview": "Start slideshow", "PE.Views.DocumentHolder.txtSelectAll": "Select All", "PE.Views.DocumentHolder.txtSlide": "Slide", "PE.Views.DocumentHolder.txtUngroup": "Ungroup", "PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "PE.Views.DocumentPreview.goToSlideText": "Go to Slide", "PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}", - "PE.Views.DocumentPreview.txtClose": "Close Preview", + "PE.Views.DocumentPreview.txtClose": "Close Slideshow", "PE.Views.DocumentPreview.txtExitFullScreen": "Exit Full Screen", "PE.Views.DocumentPreview.txtFinalMessage": "The end of slide preview. Click to exit.", "PE.Views.DocumentPreview.txtFullScreen": "Full Screen", @@ -609,6 +609,10 @@ "PE.Views.SlideSettings.txtLeather": "Leather", "PE.Views.SlideSettings.txtPapyrus": "Papyrus", "PE.Views.SlideSettings.txtWood": "Wood", + "PE.Views.SlideshowSettings.textTitle": "Show Settings", + "PE.Views.SlideshowSettings.textLoop": "Loop continuously until 'Esc' is pressed", + "PE.Views.SlideshowSettings.cancelButtonText": "Cancel", + "PE.Views.SlideshowSettings.okButtonText": "Ok", "PE.Views.SlideSizeSettings.cancelButtonText": "Cancel", "PE.Views.SlideSizeSettings.okButtonText": "OK", "PE.Views.SlideSizeSettings.strPortrait": "Portrait", @@ -637,7 +641,7 @@ "PE.Views.Statusbar.tipFitPage": "Fit Slide", "PE.Views.Statusbar.tipFitWidth": "Fit Width", "PE.Views.Statusbar.tipMoreUsers": "and %1 users.", - "PE.Views.Statusbar.tipPreview": "Start Preview", + "PE.Views.Statusbar.tipPreview": "Start Slideshow", "PE.Views.Statusbar.tipShowUsers": "To see all users click the icon below.", "PE.Views.Statusbar.tipUsers": "Document is currently being edited by several users.", "PE.Views.Statusbar.tipViewUsers": "View users and manage document access rights", @@ -821,7 +825,7 @@ "PE.Views.Toolbar.tipNumbers": "Numbering", "PE.Views.Toolbar.tipOpenDocument": "Open Presentation", "PE.Views.Toolbar.tipPaste": "Paste", - "PE.Views.Toolbar.tipPreview": "Start Preview", + "PE.Views.Toolbar.tipPreview": "Start Slideshow", "PE.Views.Toolbar.tipPrint": "Print", "PE.Views.Toolbar.tipRedo": "Redo", "PE.Views.Toolbar.tipSave": "Save", @@ -857,5 +861,8 @@ "PE.Views.Toolbar.txtScheme7": "Equity", "PE.Views.Toolbar.txtScheme8": "Flow", "PE.Views.Toolbar.txtScheme9": "Foundry", - "PE.Views.Toolbar.txtUngroup": "Ungroup" + "PE.Views.Toolbar.txtUngroup": "Ungroup", + "PE.Views.Toolbar.textShowBegin": "Show from Beginning", + "PE.Views.Toolbar.textShowCurrent": "Show from Current slide", + "PE.Views.Toolbar.textShowSettings": "Show Settings" } \ No newline at end of file