diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index 244110e07..6aa866693 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -29,7 +29,7 @@ .loadmask > .brendpanel { width: 100%; position: absolute; - height: 32px; + height: 48px; background-color: #e2e2e2; } @@ -42,7 +42,7 @@ .loadmask > .brendpanel .loading-logo { max-width: 200px; height: 24px; - margin: 0 auto; + margin-left: 10px; text-align: center; } @@ -53,6 +53,9 @@ margin-top: 2px; opacity: 0; } + .loadmask > .brendpanel .doc-title { + flex-grow: 1; + } .loadmask > .brendpanel .circle { vertical-align: middle; @@ -67,7 +70,7 @@ background: #f5f5f5; width: 100%; height: 100%; - padding-top: 32px; + padding-top: 48px; } .loadmask > .placeholder .slide-h { @@ -145,10 +148,10 @@
-
+
@@ -239,17 +242,16 @@
- +
- +
-
of 0
-
-
+
of 0
+
diff --git a/apps/presentationeditor/embed/index.html.deploy b/apps/presentationeditor/embed/index.html.deploy index baac7d2fa..c65e1ea48 100644 --- a/apps/presentationeditor/embed/index.html.deploy +++ b/apps/presentationeditor/embed/index.html.deploy @@ -27,7 +27,7 @@ .loadmask > .brendpanel { width: 100%; position: absolute; - height: 32px; + height: 48px; background-color: #e2e2e2; } @@ -40,7 +40,7 @@ .loadmask > .brendpanel .loading-logo { max-width: 200px; height: 24px; - margin: 0 auto; + margin-left: 10px; text-align: center; } @@ -51,6 +51,9 @@ margin-top: 2px; opacity: 0; } + .loadmask > .brendpanel .doc-title { + flex-grow: 1; + } .loadmask > .brendpanel .circle { vertical-align: middle; @@ -65,7 +68,7 @@ background: #f5f5f5; width: 100%; height: 100%; - padding-top: 32px; + padding-top: 48px; } .loadmask > .placeholder .slide-h { @@ -143,10 +146,10 @@
-
+
@@ -233,17 +236,16 @@
- +
- +
-
of 0
-
-
+
of 0
+
diff --git a/apps/presentationeditor/embed/index_loader.html b/apps/presentationeditor/embed/index_loader.html index e1031217f..0d98ea98c 100644 --- a/apps/presentationeditor/embed/index_loader.html +++ b/apps/presentationeditor/embed/index_loader.html @@ -293,17 +293,16 @@
- +
- +
-
of 0
-
-
+
of 0
+
diff --git a/apps/presentationeditor/embed/index_loader.html.deploy b/apps/presentationeditor/embed/index_loader.html.deploy index 2c48fd364..cb929d1b1 100644 --- a/apps/presentationeditor/embed/index_loader.html.deploy +++ b/apps/presentationeditor/embed/index_loader.html.deploy @@ -286,17 +286,16 @@
- +
- +
-
of 0
-
-
+
of 0
+
diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 1fbfa83cd..77d5b07c5 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -40,7 +40,9 @@ PE.ApplicationController = new(function(){ maxPages = 0, created = false, currentPage = 0, - ttOffset = [0, -10]; + ttOffset = [0, -10], + labelDocName, + appOptions = {}; // Initialize analytics // ------------------------- @@ -76,13 +78,8 @@ PE.ApplicationController = new(function(){ $('#editor_sdk').addClass('top'); } - if (config.canBackToFolder === false || !(config.customization && config.customization.goback && (config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose))) { - $('#id-btn-close').hide(); - - // Hide last separator - $('#toolbar .right .separator').hide(); - $('#pages').css('margin-right', '12px'); - } + config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback && + (config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose); } function loadDocument(data) { @@ -122,6 +119,8 @@ PE.ApplicationController = new(function(){ } embedConfig.docTitle = docConfig.title; + labelDocName = $('#title-doc-name'); + labelDocName.text(embedConfig.docTitle || '') } } @@ -243,14 +242,19 @@ PE.ApplicationController = new(function(){ if ( !embedConfig.shareUrl ) $('#idt-share').hide(); + if (!config.canBackToFolder) + $('#id-close').hide(); + if ( !embedConfig.embedUrl ) $('#idt-embed').hide(); if ( !embedConfig.fullscreenUrl ) $('#idt-fullscreen').hide(); - if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl) + if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl && !config.canBackToFolder) $('#box-tools').addClass('hidden'); + else if (!embedConfig.embedUrl && !embedConfig.fullscreenUrl) + $('#box-tools .divider').hide(); common.controller.modals.attach({ share: '#idt-share', @@ -298,6 +302,16 @@ PE.ApplicationController = new(function(){ Common.Analytics.trackEvent('Print'); }); + PE.ApplicationView.tools.get('#idt-close') + .on('click', function(){ + if (config.customization && config.customization.goback) { + if (config.customization.goback.requestClose && config.canRequestClose) + Common.Gateway.requestClose(); + else if (config.customization.goback.url) + window.parent.location.href = config.customization.goback.url; + } + }); + var $pagenum = $('#page-number'); $pagenum.on({ 'keyup': function(e){ @@ -334,15 +348,6 @@ PE.ApplicationController = new(function(){ $pagenum.focus(); }); - $('#id-btn-close').on('click', function(){ - if (config.customization && config.customization.goback) { - if (config.customization.goback.requestClose && config.canRequestClose) - Common.Gateway.requestClose(); - else if (config.customization.goback.url) - window.parent.location.href = config.customization.goback.url; - } - }); - $('#btn-left').on('click', function(){ if ( isplaymode ) { api.DemonstrationPrevSlide(); @@ -440,6 +445,16 @@ PE.ApplicationController = new(function(){ } } api.asc_setViewMode(true); + + var $parent = labelDocName.parent(); + var _left_width = $parent.position().left, + _right_width = $parent.next().outerWidth(); + + if ( _left_width < _right_width ) + $parent.css('padding-left', _right_width - _left_width); + else + $parent.css('padding-right', _left_width - _right_width); + api.asc_LoadDocument(); api.Resize(); } diff --git a/apps/presentationeditor/embed/js/ApplicationView.js b/apps/presentationeditor/embed/js/ApplicationView.js index 70c359c26..613087c00 100644 --- a/apps/presentationeditor/embed/js/ApplicationView.js +++ b/apps/presentationeditor/embed/js/ApplicationView.js @@ -44,10 +44,12 @@ PE.ApplicationView = new(function(){ $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); $btnTools.parent().append( - '