Ignore:
Timestamp:
24 Dec 2014, 14:18:18 (10 years ago)
Author:
Henrik Bettermann
Message:

Tweak the objectwidget.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py

    r12262 r12314  
    2222    ContextualDictSourceFactoryBase)
    2323from waeup.ikoba.interfaces import MessageFactory as _
     24from waeup.ikoba.products.productoptions import ProductOptionEntryField
    2425
    2526class ConCatSource(ContextualDictSourceFactoryBase):
     
    6263        required = True,
    6364        )
     65
     66    options = schema.List(
     67        title = _(u'Options/Fees'),
     68        value_type = ProductOptionEntryField(),
     69        required = False,
     70        readonly = False,
     71        default = [],
     72        )
  • main/waeup.ikoba/trunk/src/waeup/ikoba/widgets/objectwidget.pt

    r7802 r12314  
    1 <span 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 </span>
     1<div class="form-inline">
     2  <span tal:repeat="widget context/subwidgets">
     3    <div class="form-group">
     4      <span for="field.name" title="The widget's hint"
     5        tal:attributes="for widget/name; title widget/hint"
     6        tal:replace="widget/label"
     7        i18n:translate="">
     8          LABEL
     9        </span>:
     10      <tal:block define="error widget/error"
     11        condition="error" content="structure error">
     12        ERROR
     13      </tal:block>
     14      <div tal:replace="structure widget">
     15        WIDGET
     16      </div>
     17    </div>
     18  </span>
     19</div>
  • main/waeup.ikoba/trunk/src/waeup/ikoba/widgets/objectwidget.py

    r11949 r12314  
    2828    template = ViewPageTemplateFile('objectwidget.pt')
    2929
     30class IkobaObjectWidgetDisplayView(ObjectWidgetView):
     31    template = ViewPageTemplateFile('objectdisplaywidget.pt')
     32
    3033class IkobaObjectWidget(ObjectWidget):
    3134
    3235    def __init__(self, context, request, factory, **kw):
    33         #super(ResultsEntryWidget, self).__init__(context, request)
    3436        super(ObjectWidget, self).__init__(context, request)
    3537
     
    4951        # set up my subwidgets
    5052        self._setUpWidgets()
    51 
     53       
    5254    def subwidgets(self):
    5355        result = [self.getSubWidget(name) for name in self.names]
     
    5557
    5658    def _setUpWidgets(self):
    57         return self._setUpEditWidgets()
     59        self._setUpEditWidgets()
     60        # enlarge title widgets
     61        for subwidget in self.subwidgets():
     62            if 'title' in subwidget.name:
     63                subwidget.displayWidth = '50%'
     64        return
    5865
    5966    def _getView(self, request):
     
    7380    def _setUpWidgets(self):
    7481        return self._setUpDisplayWidgets()
     82
     83    def _getView(self, request):
     84        return IkobaObjectWidgetDisplayView(self, request)
Note: See TracChangeset for help on using the changeset viewer.