Ignore:
Timestamp:
2013-01-21T19:07:55+13:00 (11 years ago)
Author:
davidb
Message:

Work done on linking collection browsing frames as well as linking to matching collection item frames.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in

    r26753 r26767  
    355355                       
    356356                        var docRE    = new RegExp("(?:\\\\/)document\\\\/(.*?)(?:\$)");
    357                        
     357                        var clRE     = new RegExp("(\\\\/)browse\\\\/" + cl + "(\\\\/\\\\d+)+(\$)");
    358358                       
    359359                        for(var i = 0; i < gsContentChildren.length; i++){
     
    383383                                        if(fn !== null && fn!== undefined){
    384384                                            var frameName = collect + fn;
    385                                        
    386                                             //aElemChild.setAttribute("link",frameName);
    387                                             //console.log(aElemChild.getAttribute('link'));
    388                                             //console.log(aElemChild.link);
     385                                            aElemChild.setAttribute("link",frameName);
    389386                                        }
    390387                                    }
    391388                                   
    392                                 }else{
    393                                     //TODO: Check if the link is a CL link.
    394                                     //TODO: Make a hashmap for storing CL page frame numbers?
     389                                }else if(aElemSrc.match(clRE)){ //link the item to one of the other CL browsing frameset pages
     390
     391                                    var clMatch = clRE.exec(aElemSrc);
     392                                    var clPage = clMatch[2].substring(1);
     393                                    console.log(clPage);
     394                                    aElem.setAttribute("link",clPage);
    395395                                }
    396396                            }
    397397                        }
    398398   
    399                        
    400                         //TODO: Need to change htmlToExpeditee code to account for links
    401                        
    402                        
    403399                        var expFrameTree = htmlToExpeditee(gsContent);
    404400                        var expFrame = JSON.stringify(expFrameTree);
Note: See TracChangeset for help on using the changeset viewer.