|
|
@ -41,14 +41,14 @@ define("webodf/editor/Editor", [
|
|
|
|
"webodf/editor/MemberListView",
|
|
|
|
"webodf/editor/MemberListView",
|
|
|
|
"dijit/layout/BorderContainer",
|
|
|
|
"dijit/layout/BorderContainer",
|
|
|
|
"dijit/layout/ContentPane",
|
|
|
|
"dijit/layout/ContentPane",
|
|
|
|
"webodf/editor/widgets"],
|
|
|
|
"webodf/editor/Tools"],
|
|
|
|
|
|
|
|
|
|
|
|
function (myResources,
|
|
|
|
function (myResources,
|
|
|
|
EditorSession,
|
|
|
|
EditorSession,
|
|
|
|
MemberListView,
|
|
|
|
MemberListView,
|
|
|
|
BorderContainer,
|
|
|
|
BorderContainer,
|
|
|
|
ContentPane,
|
|
|
|
ContentPane,
|
|
|
|
ToolBarTools) {
|
|
|
|
Tools) {
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
runtime.loadClass('odf.OdfCanvas');
|
|
|
|
runtime.loadClass('odf.OdfCanvas');
|
|
|
@ -70,7 +70,7 @@ define("webodf/editor/Editor", [
|
|
|
|
editorSession,
|
|
|
|
editorSession,
|
|
|
|
mainContainer,
|
|
|
|
mainContainer,
|
|
|
|
memberListView,
|
|
|
|
memberListView,
|
|
|
|
toolbarTools,
|
|
|
|
tools,
|
|
|
|
loadOdtFile = args.loadCallback,
|
|
|
|
loadOdtFile = args.loadCallback,
|
|
|
|
saveOdtFile = args.saveCallback,
|
|
|
|
saveOdtFile = args.saveCallback,
|
|
|
|
close = args.closeCallback,
|
|
|
|
close = args.closeCallback,
|
|
|
@ -233,7 +233,7 @@ define("webodf/editor/Editor", [
|
|
|
|
this.startEditing = function () {
|
|
|
|
this.startEditing = function () {
|
|
|
|
runtime.assert(editorSession, "editorSession should exist here.");
|
|
|
|
runtime.assert(editorSession, "editorSession should exist here.");
|
|
|
|
|
|
|
|
|
|
|
|
toolbarTools.setEditorSession(editorSession);
|
|
|
|
tools.setEditorSession(editorSession);
|
|
|
|
editorSession.sessionController.startEditing();
|
|
|
|
editorSession.sessionController.startEditing();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -245,7 +245,7 @@ define("webodf/editor/Editor", [
|
|
|
|
this.endEditing = function () {
|
|
|
|
this.endEditing = function () {
|
|
|
|
runtime.assert(editorSession, "editorSession should exist here.");
|
|
|
|
runtime.assert(editorSession, "editorSession should exist here.");
|
|
|
|
|
|
|
|
|
|
|
|
toolbarTools.setEditorSession(undefined);
|
|
|
|
tools.setEditorSession(undefined);
|
|
|
|
editorSession.sessionController.endEditing();
|
|
|
|
editorSession.sessionController.endEditing();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -266,7 +266,7 @@ define("webodf/editor/Editor", [
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
toolbarTools.destroy(function(err) {
|
|
|
|
tools.destroy(function(err) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -362,7 +362,7 @@ define("webodf/editor/Editor", [
|
|
|
|
inviteButton.onclick = window.inviteButtonProxy.clicked;
|
|
|
|
inviteButton.onclick = window.inviteButtonProxy.clicked;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
toolbarTools = new ToolBarTools({
|
|
|
|
tools = new Tools({
|
|
|
|
loadOdtFile: loadOdtFile,
|
|
|
|
loadOdtFile: loadOdtFile,
|
|
|
|
saveOdtFile: saveOdtFile,
|
|
|
|
saveOdtFile: saveOdtFile,
|
|
|
|
close: close,
|
|
|
|
close: close,
|
|
|
|