widgets.js -> Tools.js
This commit is contained in:
parent
3ada1fcc1d
commit
0288fd685e
@ -41,14 +41,14 @@ define("webodf/editor/Editor", [
|
||||
"webodf/editor/MemberListView",
|
||||
"dijit/layout/BorderContainer",
|
||||
"dijit/layout/ContentPane",
|
||||
"webodf/editor/widgets"],
|
||||
"webodf/editor/Tools"],
|
||||
|
||||
function (myResources,
|
||||
EditorSession,
|
||||
MemberListView,
|
||||
BorderContainer,
|
||||
ContentPane,
|
||||
ToolBarTools) {
|
||||
Tools) {
|
||||
"use strict";
|
||||
|
||||
runtime.loadClass('odf.OdfCanvas');
|
||||
@ -70,7 +70,7 @@ define("webodf/editor/Editor", [
|
||||
editorSession,
|
||||
mainContainer,
|
||||
memberListView,
|
||||
toolbarTools,
|
||||
tools,
|
||||
loadOdtFile = args.loadCallback,
|
||||
saveOdtFile = args.saveCallback,
|
||||
close = args.closeCallback,
|
||||
@ -233,7 +233,7 @@ define("webodf/editor/Editor", [
|
||||
this.startEditing = function () {
|
||||
runtime.assert(editorSession, "editorSession should exist here.");
|
||||
|
||||
toolbarTools.setEditorSession(editorSession);
|
||||
tools.setEditorSession(editorSession);
|
||||
editorSession.sessionController.startEditing();
|
||||
};
|
||||
|
||||
@ -245,7 +245,7 @@ define("webodf/editor/Editor", [
|
||||
this.endEditing = function () {
|
||||
runtime.assert(editorSession, "editorSession should exist here.");
|
||||
|
||||
toolbarTools.setEditorSession(undefined);
|
||||
tools.setEditorSession(undefined);
|
||||
editorSession.sessionController.endEditing();
|
||||
};
|
||||
|
||||
@ -266,7 +266,7 @@ define("webodf/editor/Editor", [
|
||||
if (err) {
|
||||
callback(err);
|
||||
} else {
|
||||
toolbarTools.destroy(function(err) {
|
||||
tools.destroy(function(err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
} else {
|
||||
@ -362,7 +362,7 @@ define("webodf/editor/Editor", [
|
||||
inviteButton.onclick = window.inviteButtonProxy.clicked;
|
||||
}
|
||||
|
||||
toolbarTools = new ToolBarTools({
|
||||
tools = new Tools({
|
||||
loadOdtFile: loadOdtFile,
|
||||
saveOdtFile: saveOdtFile,
|
||||
close: close,
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
/*global define,document,require */
|
||||
|
||||
define("webodf/editor/widgets", [
|
||||
define("webodf/editor/Tools", [
|
||||
"dojo/ready",
|
||||
"dijit/MenuItem",
|
||||
"dijit/DropDownMenu",
|
||||
@ -49,7 +49,7 @@ define("webodf/editor/widgets", [
|
||||
function (ready, MenuItem, DropDownMenu, Button, DropDownButton, Toolbar, SimpleStyles, UndoRedoMenu, CurrentStyle, ParagraphStylesDialog, ZoomSlider) {
|
||||
"use strict";
|
||||
|
||||
return function ToolBarTools(args) {
|
||||
return function Tools(args) {
|
||||
var translator = document.translator,
|
||||
loadOdtFile = args.loadOdtFile,
|
||||
saveOdtFile = args.saveOdtFile,
|
||||
@ -104,8 +104,8 @@ define("webodf/editor/widgets", [
|
||||
undoRedoMenu.setEditorSession(editorSession);
|
||||
}
|
||||
|
||||
// Simple Style Selector [B, I, U, S]
|
||||
if (args.directStylingEnabled) {
|
||||
// Simple Style Selector [B, I, U, S]
|
||||
simpleStyles = new SimpleStyles(function (widget) {
|
||||
widget.placeAt(toolbar);
|
||||
widget.startup();
|
Loading…
x
Reference in New Issue
Block a user