Ignore:
Timestamp:
Oct 24, 2011 1:50:18 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7247844
Parents:
8884996
Message:

edit doc

Location:
sanscalculator/docs/sphinx/html/_static
Files:
9 added
5 edited

Legend:

Unmodified
Added
Removed
  • sanscalculator/docs/sphinx/html/_static/basic.css

    r771fe98 ra4f04f2  
    8080} 
    8181 
     82div.sphinxsidebar input[type="text"] { 
     83    width: 170px; 
     84} 
     85 
     86div.sphinxsidebar input[type="submit"] { 
     87    width: 30px; 
     88} 
     89 
    8290img { 
    8391    border: 0; 
     
    237245 
    238246.align-center { 
    239     clear: both; 
    240247    text-align: center; 
    241248} 
     
    441448} 
    442449 
     450abbr, acronym { 
     451    border-bottom: dotted 1px; 
     452    cursor: help; 
     453} 
     454 
    443455/* -- code displays --------------------------------------------------------- */ 
    444456 
  • sanscalculator/docs/sphinx/html/_static/doctools.js

    r771fe98 ra4f04f2  
    186186        }); 
    187187      }, 10); 
    188       $('<li class="highlight-link"><a href="javascript:Documentation.' + 
    189         'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>') 
    190           .appendTo($('.sidebar .this-page-menu')); 
     188      $('<p class="highlight-link"><a href="javascript:Documentation.' + 
     189        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>') 
     190          .appendTo($('#searchbox')); 
    191191    } 
    192192  }, 
     
    214214   */ 
    215215  hideSearchWords : function() { 
    216     $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); 
     216    $('#searchbox .highlight-link').fadeOut(300); 
    217217    $('span.highlighted').removeClass('highlighted'); 
    218218  }, 
  • sanscalculator/docs/sphinx/html/_static/searchtools.js

    r771fe98 ra4f04f2  
    11/* 
    2  * searchtools.js 
    3  * ~~~~~~~~~~~~~~ 
     2 * searchtools.js_t 
     3 * ~~~~~~~~~~~~~~~~ 
    44 * 
    55 * Sphinx JavaScript utilties for the full-text search. 
     
    3737} 
    3838 
     39 
    3940/** 
    4041 * Porter Stemmer 
    4142 */ 
    42 var PorterStemmer = function() { 
     43var Stemmer = function() { 
    4344 
    4445  var step2list = { 
     
    301302 
    302303  query : function(query) { 
    303     var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in', 
    304                      'if', 'for', 'no', 'there', 'their', 'was', 'is', 
    305                      'be', 'to', 'that', 'but', 'they', 'not', 'such', 
    306                      'with', 'by', 'a', 'on', 'these', 'of', 'will', 
    307                      'this', 'near', 'the', 'or', 'at']; 
    308  
    309     // stem the searchterms and add them to the correct list 
    310     var stemmer = new PorterStemmer(); 
     304    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"]; 
     305 
     306    // Stem the searchterms and add them to the correct list 
     307    var stemmer = new Stemmer(); 
    311308    var searchterms = []; 
    312309    var excluded = []; 
    313310    var hlterms = []; 
    314311    var tmp = query.split(/\s+/); 
    315     var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; 
     312    var objectterms = []; 
    316313    for (var i = 0; i < tmp.length; i++) { 
     314      if (tmp[i] != "") { 
     315          objectterms.push(tmp[i].toLowerCase()); 
     316      } 
     317 
    317318      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) || 
    318319          tmp[i] == "") { 
     
    345346    var titles = this._index.titles; 
    346347    var terms = this._index.terms; 
    347     var objects = this._index.objects; 
    348     var objtypes = this._index.objtypes; 
    349     var objnames = this._index.objnames; 
    350348    var fileMap = {}; 
    351349    var files = null; 
     
    358356 
    359357    // lookup as object 
    360     if (object != null) { 
    361       for (var prefix in objects) { 
    362         for (var name in objects[prefix]) { 
    363           var fullname = (prefix ? prefix + '.' : '') + name; 
    364           if (fullname.toLowerCase().indexOf(object) > -1) { 
    365             match = objects[prefix][name]; 
    366             descr = objnames[match[1]] + _(', in ') + titles[match[0]]; 
    367             // XXX the generated anchors are not generally correct 
    368             // XXX there may be custom prefixes 
    369             result = [filenames[match[0]], fullname, '#'+fullname, descr]; 
    370             switch (match[2]) { 
    371             case 1: objectResults.push(result); break; 
    372             case 0: importantResults.push(result); break; 
    373             case 2: unimportantResults.push(result); break; 
    374             } 
    375           } 
    376         } 
    377       } 
    378     } 
    379  
    380     // sort results descending 
    381     objectResults.sort(function(a, b) { 
    382       return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
    383     }); 
    384  
    385     importantResults.sort(function(a, b) { 
    386       return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
    387     }); 
    388  
    389     unimportantResults.sort(function(a, b) { 
    390       return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
    391     }); 
    392  
     358    for (var i = 0; i < objectterms.length; i++) { 
     359      var others = [].concat(objectterms.slice(0,i), 
     360                             objectterms.slice(i+1, objectterms.length)) 
     361      var results = this.performObjectSearch(objectterms[i], others); 
     362      // Assume first word is most likely to be the object, 
     363      // other words more likely to be in description. 
     364      // Therefore put matches for earlier words first. 
     365      // (Results are eventually used in reverse order). 
     366      objectResults = results[0].concat(objectResults); 
     367      importantResults = results[1].concat(importantResults); 
     368      unimportantResults = results[2].concat(unimportantResults); 
     369    } 
    393370 
    394371    // perform the search on the required terms 
     
    490467              displayNextItem(); 
    491468            }); 
    492           }); 
     469          }, "text"); 
    493470        } else { 
    494471          // no source available, just display title 
     
    511488    } 
    512489    displayNextItem(); 
     490  }, 
     491 
     492  performObjectSearch : function(object, otherterms) { 
     493    var filenames = this._index.filenames; 
     494    var objects = this._index.objects; 
     495    var objnames = this._index.objnames; 
     496    var titles = this._index.titles; 
     497 
     498    var importantResults = []; 
     499    var objectResults = []; 
     500    var unimportantResults = []; 
     501 
     502    for (var prefix in objects) { 
     503      for (var name in objects[prefix]) { 
     504        var fullname = (prefix ? prefix + '.' : '') + name; 
     505        if (fullname.toLowerCase().indexOf(object) > -1) { 
     506          var match = objects[prefix][name]; 
     507          var objname = objnames[match[1]][2]; 
     508          var title = titles[match[0]]; 
     509          // If more than one term searched for, we require other words to be 
     510          // found in the name/title/description 
     511          if (otherterms.length > 0) { 
     512            var haystack = (prefix + ' ' + name + ' ' + 
     513                            objname + ' ' + title).toLowerCase(); 
     514            var allfound = true; 
     515            for (var i = 0; i < otherterms.length; i++) { 
     516              if (haystack.indexOf(otherterms[i]) == -1) { 
     517                allfound = false; 
     518                break; 
     519              } 
     520            } 
     521            if (!allfound) { 
     522              continue; 
     523            } 
     524          } 
     525          var descr = objname + _(', in ') + title; 
     526          anchor = match[3]; 
     527          if (anchor == '') 
     528            anchor = fullname; 
     529          else if (anchor == '-') 
     530            anchor = objnames[match[1]][1] + '-' + fullname; 
     531          result = [filenames[match[0]], fullname, '#'+anchor, descr]; 
     532          switch (match[2]) { 
     533          case 1: objectResults.push(result); break; 
     534          case 0: importantResults.push(result); break; 
     535          case 2: unimportantResults.push(result); break; 
     536          } 
     537        } 
     538      } 
     539    } 
     540 
     541    // sort results descending 
     542    objectResults.sort(function(a, b) { 
     543      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
     544    }); 
     545 
     546    importantResults.sort(function(a, b) { 
     547      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
     548    }); 
     549 
     550    unimportantResults.sort(function(a, b) { 
     551      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); 
     552    }); 
     553 
     554    return [importantResults, objectResults, unimportantResults] 
    513555  } 
    514556} 
  • sanscalculator/docs/sphinx/html/_static/sidebar.js

    r771fe98 ra4f04f2  
    2929  var sidebar = $('.sphinxsidebar'); 
    3030  var sidebarwrapper = $('.sphinxsidebarwrapper'); 
     31 
     32  // for some reason, the document has no sidebar; do not run into errors 
     33  if (!sidebar.length) return; 
    3134 
    3235  // original margin-left of the bodywrapper and width of the sidebar 
  • sanscalculator/docs/sphinx/html/_static/underscore.js

    r771fe98 ra4f04f2  
     1// Underscore.js 0.5.5 
     2// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc. 
     3// Underscore is freely distributable under the terms of the MIT license. 
     4// Portions of Underscore are inspired by or borrowed from Prototype.js, 
     5// Oliver Steele's Functional, and John Resig's Micro-Templating. 
     6// For all details and documentation: 
     7// http://documentcloud.github.com/underscore/ 
    18(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d, 
    29a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c); 
Note: See TracChangeset for help on using the changeset viewer.