Changeset 779

Show
Ignore:
Timestamp:
01/04/12 16:17:57 (5 months ago)
Author:
mgalloy
Message:

Fix for broken search: using single quotes for Javascript strings which contain double quotes and making all links open in the main window instead of the search results window.

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/resources/search.js

    r421 r779  
    134134  html += "<h1>" + title + "</h1>"; 
    135135  html += "<h2>" + subtitle + "</h2>";   
    136   html += "</div"; 
     136  html += "</div>"; 
    137137   
    138138  html += "<div class=\"content\">"; 
     
    144144  mType = libdata[item][MATCH_TYPE]; 
    145145  width = Math.round(2 * libdata[item][SCORE]); 
     146  matchType = libdata[item][TYPE] 
     147  matchTypeRefEnd = matchType.indexOf(">") 
     148  matchType = matchType.substring(0, matchTypeRefEnd) + "target=\"main_frame\">" + matchType.substring(matchTypeRefEnd + 1, matchType.length); 
    146149   
    147150  html += "<li>"; 
    148151  html += "<img src=\"idldoc-resources/searchbar.png\" height=\"10\" width=\"" + width + "\" />&nbsp;"; 
    149152  html += "<a href=\"" + libdata[item][URL] + "\" target=\"main_frame\">" + libdata[item][NAME] + "</a><br/>"; 
    150   html += libdata[item][TYPE] + "<br/>"; 
     153  html += matchType + "<br/>"; 
    151154   
    152155  nPreCharacters = 25; 
  • trunk/src/templates/libdata.tt

    r419 r779  
    1212[% IF n_visible_pro_files %] 
    1313[% FOREACH f IN visible_pro_files %][% SCOPE f %] 
    14 libdata[libdataItem++] = new Array("[% index_url %]", "[% index_name %]", "[% index_type %]", "[% file_basename(basename) %]", "[% plain_author %]", "", "[% plain_comments %]", "", "[% strjoin(categories, ' ') %]", "[% plain_attributes %]"); 
     14libdata[libdataItem++] = new Array("[% index_url %]", "[% index_name %]", '[% index_type %]', "[% file_basename(basename) %]", "[% plain_author %]", "", "[% plain_comments %]", "", "[% strjoin(categories, ' ') %]", "[% plain_attributes %]"); 
    1515  [% IF n_visible_routines gt 0 %] 
    1616  [% FOREACH r IN visible_routines %][% SCOPE r %] 
    17   libdata[libdataItem++] = new Array("[% index_url %]", "[% index_name %]", "[% index_type %]", "[% file_basename(basename) %]", "[% plain_author %]", "[% name %]", "[% plain_comments %]", "[% plain_parameters %]", "[% strjoin(categories, ' ') %]", "[% plain_attributes %]"); 
     17  libdata[libdataItem++] = new Array("[% index_url %]", "[% index_name %]", '[% index_type %]', "[% file_basename(basename) %]", "[% plain_author %]", "[% name %]", "[% plain_comments %]", "[% plain_parameters %]", "[% strjoin(categories, ' ') %]", "[% plain_attributes %]"); 
    1818  [% END %][% END %] 
    1919  [% END %]