Changeset 3774

Show
Ignore:
Timestamp:
11/27/07 07:29:43 (1 year ago)
Author:
claudio.martinez
Message:

Fixed an error when a controller raised a NotImplementedError? without arguments.
The extension shutdown function name was incorrect and was not being called, also fixed an error in it.
Fixed a problem in the autocomplete field template were the id and text fields would wrap.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/twAjaxTools/trunk/toscawidgets/widgets/ajax_tools/extensions/tg.py

    r2998 r3774  
    2525        redirect = e.args[0][0] 
    2626    except NotImplementedError, e: 
    27         if 'has no applicable error handler' not in e.args[0]: 
     27        # catch the error that not having an @error_handler() raises 
     28        if not e.args or 'has no applicable error handler' not in e.args[0]: 
    2829            raise 
    2930     
     
    8384        setattr(cherrypy.root, controller_name, controller) 
    8485 
    85 def stop_extension(): 
     86def shutdown_extension(): 
    8687    if not config.get('toscawidgets.on', False) or \ 
    87        not extension.controllers_locked: 
     88       not extensions.controllers_locked: 
    8889        return 
    8990     
    9091    extensions.controllers_locked = False 
    9192     
    92     for controller_name, obj in extensions.controllers: 
    93         delattr(cherrypy, controller_name) 
     93    for obj, controller_name in extensions.controllers.iteritems(): 
     94        if hasattr(cherrypy, controller_name): 
     95            delattr(cherrpy, controller_name) 
    9496 
  • projects/twAjaxTools/trunk/toscawidgets/widgets/ajax_tools/templates/auto_completing_fk_lookup_field.html

    r2998 r3774  
    22     xmlns:py="http://genshi.edgewall.org/" 
    33    > 
    4     
    5     <input type="text" name="${name}" class="${css_class}" 
    6            id="${id}" value="${value}" py:attrs="attrs"/> 
    74     
    8     <input type="text" class="${css_class}" id="${id}_text" 
    9            value="" py:attrs="text_field_attrs" /> 
     5    <div> 
     6        <input type="text" name="${name}" class="${css_class}" 
     7               id="${id}" value="${value}" py:attrs="attrs"/> 
     8         
     9        <input type="text" class="${css_class}" id="${id}_text" 
     10               value="" py:attrs="text_field_attrs" /> 
     11    </div> 
    1012     
    1113    <span id="${id}_spinner" class="spinner" style="display: none">