Ignore:
Timestamp:
8 Mar 2012, 03:30:30 (13 years ago)
Author:
uli
Message:

Merge changes from ulif-schoolgrades back into trunk.

Location:
main/waeup.sirp/trunk
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk

  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/objectwidget.pt

    r5328 r7795  
    1   <td class="row" tal:repeat="widget context/subwidgets">
    2     <span tal:define="error widget/error"
    3           tal:replace="structure error" tal:condition="error" />
    4     <span tal:replace="structure widget" />
    5   </td>
     1  <div class="row">
     2    <span tal:repeat="widget context/subwidgets">
     3      <span tal:define="error widget/error"
     4            tal:replace="structure error" tal:condition="error" />
     5      <span tal:replace="structure widget" />
     6    </span>
     7  </div>
  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/objectwidget.py

    r7321 r7795  
    6060        return SIRPObjectWidgetView(self, request)
    6161
     62
    6263class SIRPObjectDisplayWidget(SIRPObjectWidget):
    6364
  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/tests/test_objectwidget.py

    r7501 r7795  
    2121import unittest
    2222import sys
    23 from zope.component import testing
    2423from zope.interface import Interface, implements
    2524from zope.interface.verify import verifyClass
     
    4544    name = TextLine()
    4645    email = TextLine()
    47    
     46
    4847class TestContact(object):
    4948    implements(ITestContact)
     
    5150class ITestContent(Interface):
    5251    foo = Object(
    53         ITestContact, 
     52        ITestContact,
    5453        title = u'Foo Title',
    5554        description = u'',
    5655        )
    57    
     56
    5857class ObjectWidgetInputErrorView(object):
    5958    implements(IWidgetInputErrorView)
     
    8281        provideAdapter(TextWidget, (ITextLine, IDefaultBrowserLayer),
    8382                       IInputWidget)
    84        
     83
    8584        class TestObject(object):
    8685            implements(ITestContent)
     
    120119        error_html = widget.error()
    121120        if sys.version_info < (2, 5):
    122             self.assertTrue("email: <zope.formlib.interfaces.Mis" 
     121            self.assertTrue("email: <zope.formlib.interfaces.Mis"
    123122                             in error_html)
    124123            self.assertTrue("name: <zope.formlib.interfaces.Miss"
     
    161160        widget1, widget2 = widget.subwidgets()
    162161        self.assertTrue(widget1 is name_widget)
    163        
    164        
     162
     163
    165164class ObjectDisplayWidgetTest(BrowserWidgetTest):
    166165    """Documents and tests the display variant of object widget.
     
    184183        # adapter that can turn nearly any object into an ITraversable.
    185184        provideAdapter(DefaultTraversable, (None,), ITraversable)
    186        
     185
    187186        class TestObject(object):
    188187            implements(ITestContent)
     
    206205                       IDisplayWidget)
    207206
    208        
     207
    209208    def test_interfaces(self):
    210         from zope.interface.verify import DoesNotImplement
    211209        self.assertTrue(IDisplayWidget.providedBy(self._widget))
    212210        self.assertFalse(IInputWidget.providedBy(self._widget))
     
    219217
    220218        check_list = [
    221             '<td', 'class=', 'row',
     219            '<div', 'class=', 'row',
     220            '<span',
    222221            'Foo Name',
    223             '</td>', '<td', 'class=', 'row',
     222            '</span>', '<span',
    224223            'foo@foo.test',
    225             '</td>']
    226         self.verifyResult(widget(), check_list, inorder=True)   
     224            '</div>']
     225        self.verifyResult(widget(), check_list, inorder=True)
    227226
    228227def test_suite():
Note: See TracChangeset for help on using the changeset viewer.