Changeset 7795 for main/waeup.sirp/trunk/src/waeup/sirp/widgets
- Timestamp:
- 8 Mar 2012, 03:30:30 (13 years ago)
- Location:
- main/waeup.sirp/trunk
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk
- Property svn:mergeinfo changed
/main/waeup.sirp/branches/ulif-schoolgrades (added) merged: 7761-7774,7778-7794
- Property svn:mergeinfo changed
-
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 60 60 return SIRPObjectWidgetView(self, request) 61 61 62 62 63 class SIRPObjectDisplayWidget(SIRPObjectWidget): 63 64 -
main/waeup.sirp/trunk/src/waeup/sirp/widgets/tests/test_objectwidget.py
r7501 r7795 21 21 import unittest 22 22 import sys 23 from zope.component import testing24 23 from zope.interface import Interface, implements 25 24 from zope.interface.verify import verifyClass … … 45 44 name = TextLine() 46 45 email = TextLine() 47 46 48 47 class TestContact(object): 49 48 implements(ITestContact) … … 51 50 class ITestContent(Interface): 52 51 foo = Object( 53 ITestContact, 52 ITestContact, 54 53 title = u'Foo Title', 55 54 description = u'', 56 55 ) 57 56 58 57 class ObjectWidgetInputErrorView(object): 59 58 implements(IWidgetInputErrorView) … … 82 81 provideAdapter(TextWidget, (ITextLine, IDefaultBrowserLayer), 83 82 IInputWidget) 84 83 85 84 class TestObject(object): 86 85 implements(ITestContent) … … 120 119 error_html = widget.error() 121 120 if sys.version_info < (2, 5): 122 self.assertTrue("email: <zope.formlib.interfaces.Mis" 121 self.assertTrue("email: <zope.formlib.interfaces.Mis" 123 122 in error_html) 124 123 self.assertTrue("name: <zope.formlib.interfaces.Miss" … … 161 160 widget1, widget2 = widget.subwidgets() 162 161 self.assertTrue(widget1 is name_widget) 163 164 162 163 165 164 class ObjectDisplayWidgetTest(BrowserWidgetTest): 166 165 """Documents and tests the display variant of object widget. … … 184 183 # adapter that can turn nearly any object into an ITraversable. 185 184 provideAdapter(DefaultTraversable, (None,), ITraversable) 186 185 187 186 class TestObject(object): 188 187 implements(ITestContent) … … 206 205 IDisplayWidget) 207 206 208 207 209 208 def test_interfaces(self): 210 from zope.interface.verify import DoesNotImplement211 209 self.assertTrue(IDisplayWidget.providedBy(self._widget)) 212 210 self.assertFalse(IInputWidget.providedBy(self._widget)) … … 219 217 220 218 check_list = [ 221 '<td', 'class=', 'row', 219 '<div', 'class=', 'row', 220 '<span', 222 221 'Foo Name', 223 '</ td>', '<td', 'class=', 'row',222 '</span>', '<span', 224 223 'foo@foo.test', 225 '</ td>']226 self.verifyResult(widget(), check_list, inorder=True) 224 '</div>'] 225 self.verifyResult(widget(), check_list, inorder=True) 227 226 228 227 def test_suite():
Note: See TracChangeset for help on using the changeset viewer.