Changeset 1711

Show
Ignore:
Timestamp:
05/19/07 13:49:20 (16 months ago)
Author:
mbonetti
Message:

Fix in the kbnav plugin to use the new standardized classnames and ids. And
fixed a stupid bug in the lilina item template

Location:
trunk/gregarius
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/plugins/keyboardnavigation.php

    r1710 r1711  
    131131                ret.cid = rx[3]; 
    132132            } else { 
    133                 var divs = item.getElementsByTagName('div'); 
    134                 for(var i=0;i<divs.length;i++) { 
    135                     if(divs[i].className.indexOf('content') > -1) { 
    136                         ret.id = divs[i].id.replace(/[^0-9]/g,''); 
    137                         break; 
    138                     } 
     133                ret.id = item.id.replace(/[^0-9]/g,''); 
     134            } 
     135            var links = item.getElementsByTagName('a'); 
     136            for(var i=0;i<links.length;i++){ 
     137                if(links[i].className.indexOf('item_url') > -1) { 
     138                    ret.url = links[i].href; 
     139                    break; 
    139140                } 
    140             } 
    141             if (href = item.getElementsByTagName('h4').item(0).getElementsByTagName('a').item(0).href) { 
    142                 ret.url = href; 
    143141            } 
    144142            return ret; 
  • trunk/gregarius/themes/lilina/web/item.php

    r1709 r1711  
    6767    //list mode : we only show titles 
    6868?> 
    69 <li class="<?php echo rss_item_css_class(); ?>"> 
     69<li class="<?php echo rss_item_css_class(); ?>" id="item_<?php echo rss_item_id(); ?>"> 
    7070    <?php if(rss_item_permalink()) { ?> 
    7171    <a class="plink" title="<?php echo rss_item_pl_title(); ?>" href="<?php echo rss_item_pl_url(); ?>"> 
     
    9090    <h4><a class="tlink" href="#" onclick="toggleItemByID(<?php echo rss_item_id();?>);return false;"> 
    9191    <?php echo rss_item_title(); ?></a></h4>  
    92     <a href="<?php echo rss_item_url(); ?>">&nbsp;&raquo;&nbsp;&lrm; 
     92    <a class="item_url" href="<?php echo rss_item_url(); ?>">&nbsp;&raquo;&nbsp;&lrm; 
    9393    <?php echo rss_feed_title();?></a> 
    9494    <div id="sad<?php echo rss_item_id(); ?>" style="display:none"></div>