Changeset 4991

Show
Ignore:
Timestamp:
07/01/08 08:12:26 (5 months ago)
Author:
marc.englund@…
Message:

For #1859 "error messages overflow popup"; made tooltip maxwidth wider, overflow:auto, and added the possibility to mouseover the tooltip in order to scroll or cut&paste.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebContent/ITMILL/themes/default/caption/caption.css

    r4971 r4991  
    3636        background-color: #FFE0E0; 
    3737        border: 1px solid #FFB0B0; 
     38        overflow: auto; 
    3839} 
  • trunk/WebContent/ITMILL/themes/default/styles.css

    r4971 r4991  
    100100        background-color: #FFE0E0; 
    101101        border: 1px solid #FFB0B0; 
     102        overflow: auto; 
    102103} 
    103104/* body tag created by servlet */ 
  • trunk/src/com/itmill/toolkit/terminal/gwt/client/Tooltip.java

    r4959 r4991  
    2121            | Event.ONMOUSEOVER | Event.ONMOUSEOUT | Event.ONMOUSEMOVE 
    2222            | Event.ONCLICK; 
    23     protected static final int MAX_WIDTH = 280; 
     23    protected static final int MAX_WIDTH = 500; 
    2424    ErrorMessage em = new ErrorMessage(); 
    2525    Element description = DOM.createDiv(); 
    2626    private Paintable tooltipOwner; 
    27     private boolean closing; 
    28     private boolean opening; 
     27    private boolean closing = false; 
     28    private boolean opening = false; 
    2929    private ApplicationConnection ac; 
    3030 
     
    8080 
    8181                    setPopupPosition(x, y); 
     82                    sinkEvents(Event.ONMOUSEOVER | Event.ONMOUSEOUT); 
    8283                } 
    8384            }); 
     
    136137        } 
    137138        closeTimer.schedule(300); 
     139        closing = true; 
    138140    } 
    139141 
     
    163165    } 
    164166 
     167    public void onBrowserEvent(Event event) { 
     168        final int type = DOM.eventGetType(event); 
     169        // cancel closing event if tooltip is mouseovered; the user might want 
     170        // to scroll of cut&paste 
     171 
     172        switch (type) { 
     173        case Event.ONMOUSEOVER: 
     174            closeTimer.cancel(); 
     175            closing = false; 
     176            break; 
     177        case Event.ONMOUSEOUT: 
     178            hideTooltip(); 
     179            break; 
     180        default: 
     181            // NOP 
     182        } 
     183    } 
     184 
    165185}