tiny webodf updates
This commit is contained in:
parent
7359811f1e
commit
2130c872a8
@ -169,6 +169,7 @@ define("webodf/editor/Editor", [
|
|||||||
editorSession = new EditorSession(session, memberid, {
|
editorSession = new EditorSession(session, memberid, {
|
||||||
viewOptions: viewOptions
|
viewOptions: viewOptions
|
||||||
});
|
});
|
||||||
|
editorSession.sessionController.setUndoManager(new gui.TrivialUndoManager());
|
||||||
|
|
||||||
if (peopleListDiv) {
|
if (peopleListDiv) {
|
||||||
userList = new UserList(editorSession, peopleListDiv);
|
userList = new UserList(editorSession, peopleListDiv);
|
||||||
@ -218,7 +219,7 @@ define("webodf/editor/Editor", [
|
|||||||
* call editorReadyCallback once everything is done.
|
* call editorReadyCallback once everything is done.
|
||||||
*
|
*
|
||||||
* @param {!string} docUrl
|
* @param {!string} docUrl
|
||||||
* @param {?function()} editorReadyCallback
|
* @param {!function()} editorReadyCallback
|
||||||
* @return {undefined}
|
* @return {undefined}
|
||||||
*/
|
*/
|
||||||
self.initAndLoadDocument = function (docUrl, editorReadyCallback) {
|
self.initAndLoadDocument = function (docUrl, editorReadyCallback) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* @source: http://www.webodf.org/
|
* @source: http://www.webodf.org/
|
||||||
* @source: http://gitorious.org/webodf/webodf/
|
* @source: http://gitorious.org/webodf/webodf/
|
||||||
*/
|
*/
|
||||||
/*global define,runtime,gui,ops,document */
|
/*global define, runtime, core, gui, ops, document */
|
||||||
define("webodf/editor/EditorSession", [
|
define("webodf/editor/EditorSession", [
|
||||||
"dojo/text!resources/fonts/fonts.css"
|
"dojo/text!resources/fonts/fonts.css"
|
||||||
], function (fontsCSS) { // fontsCSS is retrieved as a string, using dojo's text retrieval AMD plugin
|
], 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) {
|
function createNCName(name) {
|
||||||
var letter,
|
var letter,
|
||||||
result = "";
|
result = "",
|
||||||
|
i;
|
||||||
|
|
||||||
// encode
|
// encode
|
||||||
for (var i = 0; i < name.length; i++) {
|
for (i = 0; i < name.length; i++) {
|
||||||
letter = name[i];
|
letter = name[i];
|
||||||
// simple approach, can be improved to not skip other allowed chars
|
// simple approach, can be improved to not skip other allowed chars
|
||||||
if (letter.match(/[a-zA-Z0-9.-_]/) !== null) {
|
if (letter.match(/[a-zA-Z0-9.-_]/) !== null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user