Changeset 5861


Ignore:
Timestamp:
22/10/09 12:06:52 (10 years ago)
Author:
sdonegan
Message:

Adjusted so no selection and proper colouring of more/less buttons, only showing where text l > 200

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/templates/meta.kid

    r5858 r5861  
    216216        thisRecordTrun = 'trunAbstract_' + str(i) 
    217217         
     218        abslen = len(d.abstract) 
     219         
    218220        if len(d.timeCoverage)==1: 
    219221            tc=d.timeCoverage[0] 
     
    233235                    <span py:replace="abbreviate(d.name,70,0)"/> 
    234236                <br/> 
    235                 <!-- Adjust so shows rest of abstract if required. --> 
    236                    
     237                                 
    237238                <!-- trunc text --> 
    238239                <div id="$thisRecordTrun" class="abstractText_shown"> 
     
    243244                        <span py:replace="abbreviateAbstract(d.abstract,200,'')"/><!-- the text --> 
    244245                         
    245                         <input type="button"  class="txtButtons" alt="Click to show/hide rest of abstract" value="(more)" onclick="Div_show('$thisRecordFull');Div_hide('$thisRecordTrun')" /> 
    246                          
     246                        <!-- Only show "more" button if abstract long enough..  --> 
     247                        <span py:if="abslen > 200"> 
     248                            <input type="button"  class="txtButtons_more" alt="Click to show/hide rest of abstract" value="more" onclick="Div_show('$thisRecordFull');Div_hide('$thisRecordTrun')" /> 
     249                        </span> 
    247250                </div> 
    248251                 
     
    253256                     
    254257                        ${d.abstract} 
    255                         <input type="button"  class="txtButtons" alt="Click to show/hide rest of abstract" value="(less)" onclick="Div_show('$thisRecordTrun');Div_hide('$thisRecordFull')" /> 
     258                        <input type="button"  class="txtButtons_less" alt="Click to show/hide rest of abstract" value="less" onclick="Div_show('$thisRecordTrun');Div_hide('$thisRecordFull')" /> 
    256259                </div> 
    257260                
     
    266269                <div py:replace="Spatial(d.bbox,0)"/> 
    267270            </td> 
    268             <!-- check if the DIF has already been selected --> 
     271            <!-- check if the DIF has already been selected  
    269272            <?python  
    270273                selected=False 
     
    300303                                             )))} 
    301304                </span> 
    302             </td> 
     305            </td>--> 
    303306        </tr> 
    304307    </span> 
Note: See TracChangeset for help on using the changeset viewer.