Ignore:
Timestamp:
2012-10-09T11:52:53+13:00 (12 years ago)
Author:
sjm84
Message:

The document view will now correctly focus the subsection you have specified when in paged mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r26218 r26296  
    315315            <!-- NOTE: alb = ajax load bypass -->
    316316            <!--
    317                 If the docType is hierarchy and the we want to bypass the ajax load then do this
     317                If the docType is hierarchy and we want to bypass the ajax load then do this
    318318                OR If the docType is hierarchy and we have asked for the expanded document OR we have asked for the top level document then do this
    319319            -->
     
    338338                        $(window).load(function()
    339339                        {
    340                             var url = gs.xsltParams.library_name + "?a=d&amp;c=" + gs.cgiParams.c + "&amp;excerptid=gs-document&amp;dt=hierarchy&amp;d=" + gs.cgiParams.d.replace(/([^.]*)\..*/, "$1");
    341                             loadTopLevelPage(null, url);
     340                            var sectionID = gs.cgiParams.d;
     341                            var callbackFunction = null;
     342                            if(sectionID.indexOf("\\.") == -1)
     343                            {
     344                                callbackFunction = function()
     345                                {
     346                                    focusSection(sectionID);
     347                                };
     348                            }
     349                       
     350                            var docID = sectionID.replace(/([^.]*)\..*/, "$1");
     351                            var url = gs.xsltParams.library_name + "?a=d&amp;c=" + gs.cgiParams.c + "&amp;excerptid=gs-document&amp;dt=hierarchy&amp;d=" + docID;
     352                            loadTopLevelPage(callbackFunction, url);
    342353                        });
    343354                    </xsl:text>
Note: See TracChangeset for help on using the changeset viewer.