tiny webodf updates

pull/1/head
Tobias Hintze 11 years ago
parent 7359811f1e
commit 2130c872a8

@ -169,6 +169,7 @@ define("webodf/editor/Editor", [
editorSession = new EditorSession(session, memberid, {
viewOptions: viewOptions
});
editorSession.sessionController.setUndoManager(new gui.TrivialUndoManager());
if (peopleListDiv) {
userList = new UserList(editorSession, peopleListDiv);
@ -218,7 +219,7 @@ define("webodf/editor/Editor", [
* call editorReadyCallback once everything is done.
*
* @param {!string} docUrl
* @param {?function()} editorReadyCallback
* @param {!function()} editorReadyCallback
* @return {undefined}
*/
self.initAndLoadDocument = function (docUrl, editorReadyCallback) {

@ -32,7 +32,7 @@
* @source: http://www.webodf.org/
* @source: http://gitorious.org/webodf/webodf/
*/
/*global define,runtime,gui,ops,document */
/*global define, runtime, core, gui, ops, document */
define("webodf/editor/EditorSession", [
"dojo/text!resources/fonts/fonts.css"
], function (fontsCSS) { // fontsCSS is retrieved as a string, using dojo's text retrieval AMD plugin
@ -136,10 +136,11 @@ define("webodf/editor/EditorSession", [
*/
function createNCName(name) {
var letter,
result = "";
result = "",
i;
// encode
for (var i = 0; i < name.length; i++) {
for (i = 0; i < name.length; i++) {
letter = name[i];
// simple approach, can be improved to not skip other allowed chars
if (letter.match(/[a-zA-Z0-9.-_]/) !== null) {

Loading…
Cancel
Save