From 2e178f08beeb885d9e44641c973a26c5c7b10b4a Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 29 Nov 2007 20:15:37 +0000 Subject: [PATCH] Resizing all iframes whenever the window resizes. --- static/js/Wiki.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 7f42481..2b6e6a6 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -57,6 +57,7 @@ function Wiki( invoker ) { connect( "search_form", "onsubmit", this, "search" ); connect( "html", "onclick", this, "background_clicked" ); connect( "html", "onkeydown", this, "key_pressed" ); + connect( window, "onresize", this, "resize_editors" ); var blank_note_stub = getElement( "blank_note_stub" ); if ( blank_note_stub ) { @@ -628,6 +629,14 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi return editor; } +Wiki.prototype.resize_editors = function () { + var iframes = getElementsByTagAndClassName( "iframe", "note_frame" ); + for ( var i in iframes ) { + var editor = iframes[ i ].editor; + editor.resize(); + } +} + Wiki.prototype.editor_state_changed = function ( editor ) { this.update_toolbar(); this.display_link_pulldown( editor );