Commit 84e1645c authored by Oleg Korshul's avatar Oleg Korshul

separate functions for reporter mode

parent 44d95af7
...@@ -13,14 +13,14 @@ copy ..\cell\sdk-all-min.js ..\..\core\build\jsdesktop\sdkjs\cell\sdk-all-min.js ...@@ -13,14 +13,14 @@ copy ..\cell\sdk-all-min.js ..\..\core\build\jsdesktop\sdkjs\cell\sdk-all-min.js
copy ..\common\Native\native.js ..\..\core\build\jsdesktop\sdkjs\common\Native\native.js copy ..\common\Native\native.js ..\..\core\build\jsdesktop\sdkjs\common\Native\native.js
copy ..\word\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all.js copy ..\word\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all.js
copy ..\slide\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all.js copy ..\slide\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all.js
copy ..\cell\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all.js copy ..\cell\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all.js
copy ..\word\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all-min.js copy ..\word\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all-min.js
copy ..\slide\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all-min.js copy ..\slide\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all-min.js
copy ..\cell\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all-min.js copy ..\cell\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all-min.js
copy ..\common\Native\native.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\common\Native\native.js copy ..\common\Native\native.js ..\..\core-ext\desktop-sdk-wrapper\test\build\win_64\Debug\Local\editors\sdkjs\common\Native\native.js
pause pause
\ No newline at end of file
...@@ -723,7 +723,7 @@ function CEditorPage(api) ...@@ -723,7 +723,7 @@ function CEditorPage(api)
{ {
try try
{ {
window.postMessage("{ \"reporter_command\" : \"end\" }", "*"); window.editor.sendFromReporter("{ \"reporter_command\" : \"end\" }");
} }
catch (err) catch (err)
{ {
...@@ -3879,7 +3879,7 @@ function CEditorPage(api) ...@@ -3879,7 +3879,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\" }", "*"); this.m_oApi.sendFromReporter("{ \"reporter_command\" : \"start_show\" }");
} }
else if (true !== isReporterUpdateSlide) else if (true !== isReporterUpdateSlide)
{ {
......
...@@ -3205,7 +3205,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3205,7 +3205,7 @@ function CDemonstrationManager(htmlpage)
return; return;
if (this.HtmlPage.m_oApi.isReporterMode) if (this.HtmlPage.m_oApi.isReporterMode)
window.postMessage("{ \"reporter_command\" : \"next\" }", "*"); this.HtmlPage.m_oApi.sendFromReporter("{ \"reporter_command\" : \"next\" }");
this.CorrectSlideNum(); this.CorrectSlideNum();
...@@ -3236,7 +3236,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3236,7 +3236,7 @@ function CDemonstrationManager(htmlpage)
return; return;
if (this.HtmlPage.m_oApi.isReporterMode) if (this.HtmlPage.m_oApi.isReporterMode)
window.postMessage("{ \"reporter_command\" : \"prev\" }", "*"); this.HtmlPage.m_oApi.sendFromReporter("{ \"reporter_command\" : \"prev\" }");
if (0 != this.SlideNum) if (0 != this.SlideNum)
{ {
...@@ -3261,7 +3261,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3261,7 +3261,7 @@ function CDemonstrationManager(htmlpage)
return; return;
if (this.HtmlPage.m_oApi.isReporterMode) if (this.HtmlPage.m_oApi.isReporterMode)
window.postMessage("{ \"reporter_command\" : \"go_to_slide\", \"slide\" : " + slideNum + " }", "*"); this.HtmlPage.m_oApi.sendFromReporter("{ \"reporter_command\" : \"go_to_slide\", \"slide\" : " + slideNum + " }");
this.CorrectSlideNum(); this.CorrectSlideNum();
...@@ -3341,7 +3341,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3341,7 +3341,7 @@ function CDemonstrationManager(htmlpage)
"keyCode" : AscCommon.global_keyboardEvent.KeyCode "keyCode" : AscCommon.global_keyboardEvent.KeyCode
}; };
oThis.HtmlPage.m_oApi.reporterWindow.postMessage(JSON.stringify(_msg_), "*"); oThis.HtmlPage.m_oApi.sendToReporter(JSON.stringify(_msg_));
oThis.HtmlPage.IsKeyDownButNoPress = true; oThis.HtmlPage.IsKeyDownButNoPress = true;
return false; return false;
} }
...@@ -3415,7 +3415,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3415,7 +3415,7 @@ function CDemonstrationManager(htmlpage)
"mouseUp" : true "mouseUp" : true
}; };
oThis.HtmlPage.m_oApi.reporterWindow.postMessage(JSON.stringify(_msg_), "*"); oThis.HtmlPage.m_oApi.sendToReporter(JSON.stringify(_msg_));
AscCommon.stopEvent(e); AscCommon.stopEvent(e);
return false; return false;
...@@ -3484,7 +3484,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3484,7 +3484,7 @@ function CDemonstrationManager(htmlpage)
"mouseWhell" : delta "mouseWhell" : delta
}; };
oThis.HtmlPage.m_oApi.reporterWindow.postMessage(JSON.stringify(_msg_), "*"); oThis.HtmlPage.m_oApi.sendToReporter(JSON.stringify(_msg_));
AscCommon.stopEvent(e); AscCommon.stopEvent(e);
return false; return false;
} }
...@@ -3504,7 +3504,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3504,7 +3504,7 @@ function CDemonstrationManager(htmlpage)
"resize" : true "resize" : true
}; };
oThis.HtmlPage.m_oApi.reporterWindow.postMessage(JSON.stringify(_msg_), "*"); oThis.HtmlPage.m_oApi.sendToReporter(JSON.stringify(_msg_));
} }
if (!this.Mode) if (!this.Mode)
...@@ -3567,7 +3567,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3567,7 +3567,7 @@ function CDemonstrationManager(htmlpage)
"x" : x, "x" : x,
"y" : y "y" : y
}; };
window.postMessage(JSON.stringify(_msg_), "*"); this.HtmlPage.m_oApi.sendFromReporter(JSON.stringify(_msg_));
} }
} }
...@@ -3585,7 +3585,7 @@ function CDemonstrationManager(htmlpage) ...@@ -3585,7 +3585,7 @@ function CDemonstrationManager(htmlpage)
if (this.Overlay) if (this.Overlay)
this.Overlay.style.cursor = "default"; this.Overlay.style.cursor = "default";
window.postMessage("{ \"reporter_command\" : \"pointer_remove\" }", "*"); this.HtmlPage.m_oApi.sendFromReporter("{ \"reporter_command\" : \"pointer_remove\" }");
} }
} }
} }
\ No newline at end of file
...@@ -5918,7 +5918,7 @@ background-repeat: no-repeat;\ ...@@ -5918,7 +5918,7 @@ background-repeat: no-repeat;\
}; };
this.reporterStartObject = null; this.reporterStartObject = null;
_this.reporterWindow.postMessage(JSON.stringify(_msg_), '*'); _this.sendToReporter(JSON.stringify(_msg_));
return; return;
} }
...@@ -5981,6 +5981,17 @@ background-repeat: no-repeat;\ ...@@ -5981,6 +5981,17 @@ background-repeat: no-repeat;\
} }
}; };
asc_docs_api.prototype.sendToReporter = function(value)
{
if (this.reporterWindow)
this.reporterWindow.postMessage(value, "*");
};
asc_docs_api.prototype.sendFromReporter = function(value)
{
window.postMessage(value, "*");
};
asc_docs_api.prototype.DemonstrationToReporterMessages = function(e) asc_docs_api.prototype.DemonstrationToReporterMessages = function(e)
{ {
var _this = window.editor; var _this = window.editor;
...@@ -6052,7 +6063,7 @@ background-repeat: no-repeat;\ ...@@ -6052,7 +6063,7 @@ background-repeat: no-repeat;\
this.WordControl.DemonstrationManager.GoToSlide(slideNum); this.WordControl.DemonstrationManager.GoToSlide(slideNum);
if (this.isReporterMode) if (this.isReporterMode)
window.postMessage("{ \"reporter_command\" : \"slide\", \"slide\" : " + slideNum + " }", "*"); this.sendFromReporter("{ \"reporter_command\" : \"slide\", \"slide\" : " + slideNum + " }");
}; };
asc_docs_api.prototype.SetDemonstrationModeOnly = function() asc_docs_api.prototype.SetDemonstrationModeOnly = function()
......
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