From 2a542999c5eef0e6abc89fc12cecd623c58fac41 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Tue, 13 May 2008 04:02:31 +0000 Subject: [PATCH] * In development mode, disable session filter for static files. This may prevent some session deadlock errors. * Fixed some bugs with the new auto-resizing toolbar: * In IE 6/7, when you click on a formatting button such as italics, it doesn't visibly depress, because update_toolbar() is causing it to unpress until you start typing the italic text. Fixed by only calling update_toolbar() in focused_editor() if focused_editor is null. * When downing or upping a toolbar button, now calling resize_toolbar_button() unconditionally. --- config/Development.py | 2 ++ static/css/ie6.css | 4 ++-- static/js/Editor.js | 1 - static/js/Wiki.js | 12 ++++++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/config/Development.py b/config/Development.py index 858d7ec..c8729d7 100644 --- a/config/Development.py +++ b/config/Development.py @@ -11,9 +11,11 @@ settings = { "/static": { "static_filter.on": True, "static_filter.dir": "static", + "session_filter.on": False, }, "/favicon.ico": { "static_filter.on": True, "static_filter.file": "static/images/favicon.ico", + "session_filter.on": False, }, } diff --git a/static/css/ie6.css b/static/css/ie6.css index d973e7e..e4ea018 100644 --- a/static/css/ie6.css +++ b/static/css/ie6.css @@ -4,13 +4,13 @@ #toolbar { position: absolute; - width: expression( eval( document.all.center_area && ( document.all.center_area.offsetLeft - 50 ) || 0 ) ); + width: expression( eval( document.all.center_area && ( document.all.center_area.offsetLeft - 60 ) || 0 ) ); text-align: right; } #note_tree_area { left: 0; - width: expression( eval( document.all.center_area && ( document.all.center_area.offsetLeft - 50 ) || 0 ) ); + width: expression( eval( document.all.center_area && ( document.all.center_area.offsetLeft - 60 ) || 0 ) ); position: absolute; top: expression( eval( document.compatMode && document.compatMode == 'CSS1Compat' ) ? documentElement.scrollTop + 80 : document.body.scrollTop + 80 ); } diff --git a/static/js/Editor.js b/static/js/Editor.js index 5caa1a7..d820202 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -412,7 +412,6 @@ Editor.prototype.mouse_clicked = function ( event ) { // in case the cursor has moved, update the state if ( this.edit_enabled ) signal( this, "state_changed", this, link_clicked ); - } Editor.prototype.scrape_title = function () { diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 3f2a862..79359c2 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -867,8 +867,12 @@ Wiki.prototype.editor_focused = function ( editor, synchronous ) { } } - this.focused_editor = editor; - this.update_toolbar(); + if ( !this.focused_editor ) { + this.focused_editor = editor; + this.update_toolbar(); + } else { + this.focused_editor = editor; + } } Wiki.prototype.key_pressed = function ( event ) { @@ -1011,7 +1015,7 @@ Wiki.prototype.down_image_button = function ( name ) { var button = getElement( name ); var toolbar_image_dir = this.get_toolbar_image_dir(); - if ( /_down/.test( button.src ) && !this.resize_toolbar_button( button ) ) + if ( !this.resize_toolbar_button( button ) && /_down/.test( button.src ) ) return; if ( /_hover/.test( button.src ) ) @@ -1025,7 +1029,7 @@ Wiki.prototype.up_image_button = function ( name ) { var button = getElement( name ); var toolbar_image_dir = this.get_toolbar_image_dir(); - if ( !/_down/.test( button.src ) && !this.resize_toolbar_button( button ) ) + if ( !this.resize_toolbar_button( button ) && !/_down/.test( button.src ) ) return; if ( /_hover/.test( button.src ) )