Changeset 3682 in products


Ignore:
Timestamp:
Apr 30, 2013 3:04:40 PM (11 years ago)
Author:
mike
Message:

add icon field

Location:
quintagroup.plonetabs/branches/nokss/quintagroup/plonetabs/browser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonetabs/branches/nokss/quintagroup/plonetabs/browser/plonetabs.py

    r3681 r3682  
    3737from interfaces import IPloneTabsControlPanel 
    3838 
    39 ACTION_ATTRS = ["id", "title", "url_expr", "available_expr", "visible"] 
     39ACTION_ATTRS = ["id", "title", "url_expr", "icon_expr", "available_expr", "visible"] 
    4040UI_ATTRS = {"id": "id", 
    4141            "title": "name", 
    4242            "url_expr": "action", 
     43            "icon_expr": "icon_expr", 
    4344            "available_expr": "condition", 
    4445            "visible": "visible"} 
  • quintagroup.plonetabs/branches/nokss/quintagroup/plonetabs/browser/templates/actionslist.pt

    r3077 r3682  
    7777                                     id name" /></dd> 
    7878          </dl> 
     79          <dl class="edit-field-icon" 
     80              tal:define="name string:icon_expr_${id}; 
     81                          error python:errors.get(name, ''); 
     82                          tab_icon tab/icon_expr" 
     83              tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> 
     84            <dt><label tal:attributes="for name" 
     85                       i18n:translate="">Icon (Expression)</label></dt> 
     86            <dd> 
     87              <span class="error-container" tal:content="error" 
     88                    i18n:translate="">Validation error output</span> 
     89              <input type="text" value="" name="icon_expr"     size="30" 
     90                     tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_icon); 
     91                                     name name; 
     92                                     id name" /></dd> 
     93          </dl> 
    7994          <dl class="edit-field-id" 
    8095              tal:define="name string:id_${id}; 
  • quintagroup.plonetabs/branches/nokss/quintagroup/plonetabs/browser/templates/plonetabs.pt

    r3680 r3682  
    130130          </dd> 
    131131        </dl> 
     132        <dl class="field-icon" 
     133          tal:define="error errors/icon_expr|nothing" 
     134          tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> 
     135        <dt> 
     136          <label for="actaction" i18n:translate="">Icon (Expression)</label> 
     137        </dt> 
     138        <dd> 
     139          <span class="error-container" tal:content="error" 
     140                i18n:translate="">Validation error output</span> 
     141          <input id="actaction" type="text" value="" size="30" name="icon_expr" 
     142                 tal:attributes="value request/icon_expr|nothing"/> 
     143        </dd> 
     144      </dl> 
    132145        <dl class="field-condition" 
    133146            tal:define="error errors/available_expr|nothing" 
Note: See TracChangeset for help on using the changeset viewer.