Changeset 3100 for trunk


Ignore:
Timestamp:
11/08/10 17:58:37 (9 years ago)
Author:
jukka
Message:

Fixed deleting presentations and validating references.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/PresentationMaterial.py

    r3002 r3100  
    196196    def deleteResource(self, reason=''): 
    197197        pieces_to_delete = [] 
    198         for chapter, chapter_type in self.getRawBodyText(): 
    199             if chapter_type=='image_piece' and self.isUid(chapter): 
    200                 piece=self.getObjectByUID(chapter) 
    201                 if len(piece.getResourcesUsingPiece())==1: 
     198        for chapter in self.getRawBodyText(): 
     199            if chapter['type']=='image_piece': 
     200                piece=self.getObjectByUID(chapter['uid']) 
     201                if piece and len(piece.getResourcesUsingPiece())==1: 
    202202                    pieces_to_delete.append(piece) 
    203203        Material.deleteResource(self) 
  • trunk/skins/lemill/button_macros.pt

    r3074 r3100  
    4040    </div> 
    4141    <div class="required_notes"> 
    42         <ul id="req_list" tal:repeat="req context/getRequiredFieldNames"> 
    43         <li tal:attributes="id string:required_${req}; onclick string:focusToField('${req}'); onmouseover string:showFieldHint(this, '${req}'); onmouseout string:hideFieldHint(this, '${req}');" class="req_link"><span class="hint_label" tal:content="req" i18n:translate="" /> <span i18n:translate="is_required">is required</span></li> 
     42        <ul id="req_list"><tal:rep repeat="req context/getRequiredFieldNames"> 
     43        <li tal:attributes="id string:required_${req}; onclick string:focusToField('${req}'); onmouseover string:showFieldHint(this, '${req}'); onmouseout string:hideFieldHint(this, '${req}');" class="req_link"><span class="hint_label" tal:content="req" i18n:translate="" /> <span i18n:translate="is_required">is required</span></li></tal:rep> 
    4444        </ul> 
    4545    </div> 
     
    8282    </div> 
    8383    <div class="required_notes"> 
    84         <ul id="req_list" tal:repeat="req context/getRequiredFieldNames"> 
    85         <li tal:attributes="id string:required_${req}; onclick string:focusToField('${req}'); onmouseover string:showFieldHint(this, '${req}'); onmouseout string:hideFieldHint(this, '${req}');" class="req_link"><span class="hint_label" tal:content="req" i18n:translate="" /> <span i18n:translate="is_required">is required</span></li> 
     84        <ul id="req_list"><tal:rep repeat="req context/getRequiredFieldNames"> 
     85        <li tal:attributes="id string:required_${req}; onclick string:focusToField('${req}'); onmouseover string:showFieldHint(this, '${req}'); onmouseout string:hideFieldHint(this, '${req}');" class="req_link"><span class="hint_label" tal:content="req" i18n:translate="" /> <span i18n:translate="is_required">is required</span></li></tal:rep> 
    8686        </ul> 
    8787    </div> 
  • trunk/skins/lemill/presentationmaterial_view.pt

    r2962 r3100  
    99            <tal:macro metal:define-macro="body"> 
    1010                <tal:block tal:define="visibleFields python:context.getTemplate('presentation').get('fields'); 
    11                                        fields python:here.Schema().viewableFields(here)"> 
    12                     <tal:embed define="embed context/getEmbedCode | nothing" condition="embed" replace="structure embed" />                     
     11                                       fields python:here.Schema().viewableFields(here); 
     12                                       embed context/getEmbedCode | nothing;"> 
     13                    <tal:embed condition="embed" replace="structure embed" />                     
    1314                    <tal:fields repeat="field fields"> 
    1415                        <tal:cond condition="python:field.getName() in visibleFields and field.getName() not in ['title']"> 
  • trunk/skins/lemill/widget_htmllink.pt

    r3022 r3100  
    2525                    id fieldName; 
    2626                    tabindex tabindex/next; 
    27                     value value" /> 
     27                    value value; 
     28                    onKeyUp python:test(field.required, 'quickWatchRequiredField(this)', ''); 
     29                    onChange python:test(field.required, 'watchRequiredField(this)', ''); 
     30                    class python:test(field.required, 'requiredfield', '');"                     
     31                    /> 
    2832    </div> 
    2933      </div> 
Note: See TracChangeset for help on using the changeset viewer.