From 357ca73a998b4a76450321ae43cef2c40ffacb55 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Wed, 30 May 2012 10:00:36 +0200 Subject: [PATCH 1/2] Bugfix for bug introduced by 96ab3dc3b46a0f5d02d8ddb64d7ba2dcdb6b8aa6: jQuery is packaged - this is pure duplication. --- src/static/js/ace.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 26d6c0eb6..600b6136e 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -239,10 +239,6 @@ require.setGlobalKeyPath("require");\n\ iframeHTML.push(doctype); iframeHTML.push(""); - hooks.callAll("aceInitInnerdocbodyHead", { - iframeHTML: iframeHTML - }); - // calls to these functions ($$INCLUDE_...) are replaced when this file is processed // and compressed, putting the compressed code from the named file directly into the // source here. @@ -277,6 +273,11 @@ require.setGlobalKeyPath("require");\n\ iframeHTML.push('<\/script>'); iframeHTML.push(''); + + hooks.callAll("aceInitInnerdocbodyHead", { + iframeHTML: iframeHTML + }); + iframeHTML.push(' '); // Expose myself to global for my child frame. From 27f25b8c61b18f290a72cf154aa8462ed5bce338 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Wed, 30 May 2012 17:18:43 +0200 Subject: [PATCH 2/2] Added hook to catch edit events --- src/static/js/ace2_inner.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 723d410f2..cc9f1288d 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -341,6 +341,11 @@ function Ace2Inner(){ return rep; }; + editorInfo.ace_getAuthor = function() + { + return thisAuthor; + } + var currentCallStack = null; function inCallStack(type, action) @@ -439,6 +444,14 @@ function Ace2Inner(){ try { result = action(); + + hooks.callAll('aceEditEvent', { + callstack: currentCallStack, + editorInfo: editorInfo, + rep: rep, + documentAttributeManager: documentAttributeManager + }); + //console.log("Just did action for: "+type); cleanExit = true; } @@ -522,6 +535,7 @@ function Ace2Inner(){ { return rep.lines.atOffset(charOffset).key; } + function dispose() {