Commit 845824c5 authored by Oleg Korshul's avatar Oleg Korshul

reporter mode complete version

parent 29aee779
...@@ -3809,6 +3809,7 @@ function CEditorPage(api) ...@@ -3809,6 +3809,7 @@ function CEditorPage(api)
// first run // first run
this.m_oApi.StartDemonstration("id_reporter_dem", 0); this.m_oApi.StartDemonstration("id_reporter_dem", 0);
this.m_oApi.sendEvent("asc_onDemonstrationFirstRun"); this.m_oApi.sendEvent("asc_onDemonstrationFirstRun");
window.postMessage("{ \"reporter_command\" : \"start_show\" }", "*");
} }
else else
{ {
......
...@@ -2700,6 +2700,8 @@ function CDemonstrationManager(htmlpage) ...@@ -2700,6 +2700,8 @@ function CDemonstrationManager(htmlpage)
this.SlideIndexes[0] = -1; this.SlideIndexes[0] = -1;
this.SlideIndexes[1] = -1; this.SlideIndexes[1] = -1;
this.waitReporterObject = null;
var oThis = this; var oThis = this;
this.CacheSlide = function(slide_num, slide_index) this.CacheSlide = function(slide_num, slide_index)
...@@ -2877,6 +2879,37 @@ function CDemonstrationManager(htmlpage) ...@@ -2877,6 +2879,37 @@ function CDemonstrationManager(htmlpage)
this.SlideNum = this.SlidesCount; this.SlideNum = this.SlidesCount;
} }
this.StartWaitReporter = function(main_div_id, start_slide_num, is_play_mode)
{
var _parent = document.getElementById(main_div_id);
if (_parent)
{
var _elem = document.createElement('div');
_elem.setAttribute("id", "dem_id_wait_reporter");
_elem.setAttribute("style", "line-height:100%;overflow:hidden;position:absolute;margin:0px;padding:25% 0px 0px 0px;left:0px;top:0px;width:100%;height:100%;z-index:4;background-color:#000000;text-align:center;font-family:monospace;font-size:12pt;color:#FFFFFF;");
_elem.innerHTML = "WAITING...";
_parent.appendChild(_elem);
}
this.waitReporterObject = [main_div_id, start_slide_num, is_play_mode];
}
this.EndWaitReporter = function()
{
var _parent = document.getElementById(this.waitReporterObject[0]);
var _elem = document.getElementById("dem_id_wait_reporter");
try
{
_parent.removeChild(_elem);
}
catch (err)
{
}
this.Start(this.waitReporterObject[0], this.waitReporterObject[1], this.waitReporterObject[2]);
this.waitReporterObject = null;
}
this.Start = function(main_div_id, start_slide_num, is_play_mode) this.Start = function(main_div_id, start_slide_num, is_play_mode)
{ {
this.SlidesCount = this.HtmlPage.m_oDrawingDocument.SlidesCount; this.SlidesCount = this.HtmlPage.m_oDrawingDocument.SlidesCount;
......
...@@ -5847,6 +5847,9 @@ background-repeat: no-repeat;\ ...@@ -5847,6 +5847,9 @@ background-repeat: no-repeat;\
if (reporterStartObject && !this.isReporterMode) if (reporterStartObject && !this.isReporterMode)
this.DemonstrationReporterStart(reporterStartObject); this.DemonstrationReporterStart(reporterStartObject);
if (this.reporterWindow)
this.WordControl.DemonstrationManager.StartWaitReporter(div_id, slidestart_num, true);
else
this.WordControl.DemonstrationManager.Start(div_id, slidestart_num, true); this.WordControl.DemonstrationManager.Start(div_id, slidestart_num, true);
}; };
...@@ -5949,6 +5952,10 @@ background-repeat: no-repeat;\ ...@@ -5949,6 +5952,10 @@ background-repeat: no-repeat;\
{ {
_this.WordControl.DemonstrationManager.GoToSlide(_obj["slide"]); _this.WordControl.DemonstrationManager.GoToSlide(_obj["slide"]);
} }
case "start_show":
{
_this.WordControl.DemonstrationManager.EndWaitReporter();
}
default: default:
break; break;
} }
...@@ -6285,6 +6292,14 @@ background-repeat: no-repeat;\ ...@@ -6285,6 +6292,14 @@ background-repeat: no-repeat;\
this.asc_setViewMode(this.isViewMode); this.asc_setViewMode(this.isViewMode);
AscCommon.baseEditorsApi.prototype._onEndLoadSdk.call(this); AscCommon.baseEditorsApi.prototype._onEndLoadSdk.call(this);
var _onbeforeunload = function() {
window.editor.EndDemonstration();
};
if ( window.attachEvent )
window.attachEvent('onbeforeunload', _onbeforeunload);
else
window.addEventListener('beforeunload', _onbeforeunload, false);
}; };
asc_docs_api.prototype._downloadAs = function(filetype, actionType, options) asc_docs_api.prototype._downloadAs = function(filetype, actionType, options)
......
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