Index: typo3/sysext/t3editor/res/jslib/t3editor.js =================================================================== --- typo3/sysext/t3editor/res/jslib/t3editor.js (revision 10173) +++ typo3/sysext/t3editor/res/jslib/t3editor.js (working copy) @@ -65,14 +65,14 @@ this.statusbar_wrap = this.outerdiv.down('.t3e_statusbar_wrap'); this.statusbar_title = this.outerdiv.down('.t3e_statusbar_title'); this.statusbar_status = this.outerdiv.down('.t3e_statusbar_status'); - + this.statusbar_title.update( this.textarea.readAttribute('alt') ); this.statusbar_status.update( '' ); // setting options var options = { height: ( textareaDim.height ) + 'px', - width: ( textareaDim.width - 40 ) + 'px', + width: ( textareaDim.width + this.adjustWidth ) + 'px', content: $(this.textarea).value, parserfile: T3editor.parserfile, stylesheet: T3editor.stylesheet, @@ -94,22 +94,23 @@ saveFunctionEvent: null, saveButtons: null, updateTextareaEvent: null, - + adjustWidth: -30, + init: function() { var textareaDim = $(this.textarea).getDimensions(); // hide the textarea this.textarea.hide(); this.attachEvents(); - this.resize(textareaDim.width, textareaDim.height ); - + this.resize(textareaDim.width + this.adjustWidth, textareaDim.height ); + this.modalOverlay.hide(); $(this.outerdiv).fire('t3editor:initFinished', {t3editor: this}); }, attachEvents: function() { var that = this; - + // get the form object var form = $(this.textarea.form); this.saveButtons = form.getInputs('image', 'submit'); @@ -121,7 +122,7 @@ }.bind(this)); this.updateTextareaEvent = this.updateTextarea.bind(this); - + Event.observe($(this.textarea.form), 'submit', this.updateTextareaEvent); Event.observe(this.mirror.win.document, 'keyup', function(event) { @@ -129,7 +130,7 @@ }); Event.observe(this.mirror.win.document, 'keydown', function(event) { $(that.outerdiv).fire('t3editor:keydown', {t3editor: that, actualEvent: event}); - + if ((event.ctrlKey || event.metaKey) && event.keyCode == 122) { that.toggleFullscreen(); event.stop(); @@ -139,17 +140,17 @@ $(that.outerdiv).fire('t3editor:click', {t3editor: that, actualEvent: event}); }); }, - + // indicates is content is modified and not safed yet textModified: false, - + // check if code in editor has been modified since last saving checkTextModified: function() { if (!this.textModified) { this.textModified = true; } }, - + updateTextarea: function(event) { this.textarea.value = this.mirror.getCode(); }, @@ -159,18 +160,18 @@ this.checkTextModified(); $(that.outerdiv).fire('t3editor:change', {t3editor: that}); }, - + saveFunction: function(event) { this.modalOverlay.show(); this.updateTextarea(event); - + if (event) { Event.stop(event); } var params = $(this.textarea.form).serialize(true); params = Object.extend( {t3editor_disableEditor: 'false'}, params); - + $(this.outerdiv).fire('t3editor:save', {parameters: params, t3editor: this}); }, @@ -184,7 +185,7 @@ } this.modalOverlay.hide(); }, - + // toggle between the textarea and t3editor toggleView: function(disable) { $(this.outerdiv).fire('t3editor:toggleView', {t3editor: this, disable: disable}); @@ -196,7 +197,7 @@ Event.stopObserving(button,'click',this.saveFunctionEvent); }.bind(this)); Event.stopObserving($(this.textarea.form), 'submit', this.updateTextareaEvent); - + } else { this.mirror.editor.importCode(this.textarea.value); this.textarea.hide(); @@ -208,14 +209,13 @@ Event.observe($(this.textarea.form), 'submit', this.updateTextareaEvent); } }, - - + resize: function(width, height) { if (this.outerdiv) { newheight = (height - 1); newwidth = (width + 11); if (Prototype.Browser.IE) newwidth = newwidth + 8; - + $(this.outerdiv).setStyle({ height: newheight + 'px', width: newwidth + 'px' @@ -231,7 +231,7 @@ } }, - + // toggle between normal view and fullscreen mode toggleFullscreen: function() { if (this.outerdiv.hasClassName('t3e_fullscreen')) { @@ -276,7 +276,7 @@ T3editor.toggleEditor = function(checkbox, index) { if (!Prototype.Browser.MobileSafari && !Prototype.Browser.WebKit) { - + if (index == undefined) { $$('textarea.t3editor').each( function(textarea, i) { @@ -298,7 +298,7 @@ // ------------------------------------------------------------------------ if (!Prototype.Browser.MobileSafari) { - // everything ready: turn textarea's into fancy editors + // everything ready: turn textarea's into fancy editors Event.observe(window, 'load', function() { $$('textarea.t3editor').each( @@ -310,7 +310,7 @@ } } ); - + if (T3editor.ajaxSavetype != "") { Event.observe(document, 't3editor:save', function(event) { Index: typo3/sysext/t3editor/res/css/t3editor.css =================================================================== --- typo3/sysext/t3editor/res/css/t3editor.css (revision 10173) +++ typo3/sysext/t3editor/res/css/t3editor.css (working copy) @@ -1,6 +1,5 @@ .CodeMirror-wrapping { position: relative; - margin-left: 21px; } .CodeMirror-wrapping div { line-height: 13px !important; @@ -132,10 +131,11 @@ position: absolute; top: 0; left: 0; + z-index:999; } .t3e_iframe_wrap { - margin: 0 0 0 5px; + margin: 0 0 0 3px; } .t3e_iframe {