Commit 07085df8 authored by Oleg Korshul's avatar Oleg Korshul

new embed mode

parent 57bc02a2
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
this.HtmlElement = null; this.HtmlElement = null;
this.isMobileVersion = (config['mobile'] === true); this.isMobileVersion = (config['mobile'] === true);
this.isEmbedVersion = (config['embedded'] === true);
this.isViewMode = false; this.isViewMode = false;
......
...@@ -3095,7 +3095,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3095,7 +3095,7 @@ function CDemonstrationManager(htmlpage)
if (oThis.IsPlayMode) if (oThis.IsPlayMode)
{ {
oThis.SlideNum++; oThis.SlideNum++;
if(oThis.SlideNum === oThis.SlidesCount && oThis.HtmlPage.m_oApi.WordControl.m_oLogicDocument.isLoopShowMode()) if(oThis.SlideNum === oThis.SlidesCount && oThis.isLoop())
{ {
oThis.SlideNum = 0; oThis.SlideNum = 0;
} }
...@@ -3109,6 +3109,9 @@ function CDemonstrationManager(htmlpage) ...@@ -3109,6 +3109,9 @@ function CDemonstrationManager(htmlpage)
this.End = function(isNoUseFullScreen) this.End = function(isNoUseFullScreen)
{ {
if (this.HtmlPage.m_oApi.isOnlyDemonstration)
return;
if (true !== isNoUseFullScreen) if (true !== isNoUseFullScreen)
{ {
if (undefined !== window["AscDesktopEditor"]) if (undefined !== window["AscDesktopEditor"])
...@@ -3156,7 +3159,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3156,7 +3159,7 @@ function CDemonstrationManager(htmlpage)
if (!_is_transition) if (!_is_transition)
this.SlideNum++; this.SlideNum++;
if (this.HtmlPage.m_oApi.WordControl.m_oLogicDocument.isLoopShowMode() && (this.SlideNum >= this.SlidesCount)) if (this.isLoop() && (this.SlideNum >= this.SlidesCount))
this.SlideNum = 0; this.SlideNum = 0;
if (this.SlideNum > this.SlidesCount) if (this.SlideNum > this.SlidesCount)
...@@ -3168,6 +3171,11 @@ function CDemonstrationManager(htmlpage) ...@@ -3168,6 +3171,11 @@ function CDemonstrationManager(htmlpage)
} }
} }
this.isLoop = function()
{
return (this.HtmlPage.m_oApi.WordControl.m_oLogicDocument.isLoopShowMode() || this.HtmlPage.m_oApi.isEmbedVersion);
}
this.PrevSlide = function() this.PrevSlide = function()
{ {
if (!this.Mode) if (!this.Mode)
...@@ -3181,7 +3189,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3181,7 +3189,7 @@ function CDemonstrationManager(htmlpage)
this.StartSlideBackward(); this.StartSlideBackward();
this.HtmlPage.m_oApi.sync_DemonstrationSlideChanged(this.SlideNum); this.HtmlPage.m_oApi.sync_DemonstrationSlideChanged(this.SlideNum);
} }
else if(this.HtmlPage.m_oApi.WordControl.m_oLogicDocument.isLoopShowMode()) else if (this.isLoop())
{ {
this.CorrectSlideNum(); this.CorrectSlideNum();
this.SlideNum = this.SlidesCount; this.SlideNum = this.SlidesCount;
......
...@@ -750,6 +750,8 @@ ...@@ -750,6 +750,8 @@
this.EndShowMessage = undefined; this.EndShowMessage = undefined;
this.isOnlyDemonstration = false;
if (window.editor == undefined) if (window.editor == undefined)
{ {
window.editor = this; window.editor = this;
...@@ -5861,6 +5863,11 @@ background-repeat: no-repeat;\ ...@@ -5861,6 +5863,11 @@ background-repeat: no-repeat;\
this.WordControl.DemonstrationManager.GoToSlide(slideNum); this.WordControl.DemonstrationManager.GoToSlide(slideNum);
}; };
asc_docs_api.prototype.SetDemonstrationModeOnly = function()
{
this.isOnlyDemonstration = true;
};
asc_docs_api.prototype.ApplySlideTiming = function(oTiming) asc_docs_api.prototype.ApplySlideTiming = function(oTiming)
{ {
if (this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_SlideTiming) === false) if (this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_SlideTiming) === false)
...@@ -6882,6 +6889,7 @@ background-repeat: no-repeat;\ ...@@ -6882,6 +6889,7 @@ background-repeat: no-repeat;\
asc_docs_api.prototype['DemonstrationNextSlide'] = asc_docs_api.prototype.DemonstrationNextSlide; asc_docs_api.prototype['DemonstrationNextSlide'] = asc_docs_api.prototype.DemonstrationNextSlide;
asc_docs_api.prototype['DemonstrationPrevSlide'] = asc_docs_api.prototype.DemonstrationPrevSlide; asc_docs_api.prototype['DemonstrationPrevSlide'] = asc_docs_api.prototype.DemonstrationPrevSlide;
asc_docs_api.prototype['DemonstrationGoToSlide'] = asc_docs_api.prototype.DemonstrationGoToSlide; asc_docs_api.prototype['DemonstrationGoToSlide'] = asc_docs_api.prototype.DemonstrationGoToSlide;
asc_docs_api.prototype['SetDemonstrationModeOnly'] = asc_docs_api.prototype.SetDemonstrationModeOnly;
asc_docs_api.prototype['ApplySlideTiming'] = asc_docs_api.prototype.ApplySlideTiming; asc_docs_api.prototype['ApplySlideTiming'] = asc_docs_api.prototype.ApplySlideTiming;
asc_docs_api.prototype['SlideTimingApplyToAll'] = asc_docs_api.prototype.SlideTimingApplyToAll; asc_docs_api.prototype['SlideTimingApplyToAll'] = asc_docs_api.prototype.SlideTimingApplyToAll;
asc_docs_api.prototype['SlideTransitionPlay'] = asc_docs_api.prototype.SlideTransitionPlay; asc_docs_api.prototype['SlideTransitionPlay'] = asc_docs_api.prototype.SlideTransitionPlay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment