Changeset c0d873f in sasview for sansmodels/docs/sphinx/html/_static
- Timestamp:
- Oct 24, 2011 2:52:52 PM (13 years ago)
- 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:
- 8d70c0a
- Parents:
- 67cd7c0
- Location:
- sansmodels/docs/sphinx/html/_static
- Files:
-
- 9 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/docs/sphinx/html/_static/basic.css
r512573a rc0d873f 80 80 } 81 81 82 div.sphinxsidebar input[type="text"] { 83 width: 170px; 84 } 85 86 div.sphinxsidebar input[type="submit"] { 87 width: 30px; 88 } 89 82 90 img { 83 91 border: 0; … … 237 245 238 246 .align-center { 239 clear: both;240 247 text-align: center; 241 248 } … … 441 448 } 442 449 450 abbr, acronym { 451 border-bottom: dotted 1px; 452 cursor: help; 453 } 454 443 455 /* -- code displays --------------------------------------------------------- */ 444 456 -
sansmodels/docs/sphinx/html/_static/doctools.js
r512573a rc0d873f 186 186 }); 187 187 }, 10); 188 $('< liclass="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')); 191 191 } 192 192 }, … … 214 214 */ 215 215 hideSearchWords : function() { 216 $(' .sidebar .this-page-menu li.highlight-link').fadeOut(300);216 $('#searchbox .highlight-link').fadeOut(300); 217 217 $('span.highlighted').removeClass('highlighted'); 218 218 }, -
sansmodels/docs/sphinx/html/_static/searchtools.js
r512573a rc0d873f 1 1 /* 2 * searchtools.js 3 * ~~~~~~~~~~~~~~ 2 * searchtools.js_t 3 * ~~~~~~~~~~~~~~~~ 4 4 * 5 5 * Sphinx JavaScript utilties for the full-text search. … … 37 37 } 38 38 39 39 40 /** 40 41 * Porter Stemmer 41 42 */ 42 var PorterStemmer = function() {43 var Stemmer = function() { 43 44 44 45 var step2list = { … … 301 302 302 303 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(); 311 308 var searchterms = []; 312 309 var excluded = []; 313 310 var hlterms = []; 314 311 var tmp = query.split(/\s+/); 315 var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;312 var objectterms = []; 316 313 for (var i = 0; i < tmp.length; i++) { 314 if (tmp[i] != "") { 315 objectterms.push(tmp[i].toLowerCase()); 316 } 317 317 318 if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) || 318 319 tmp[i] == "") { … … 345 346 var titles = this._index.titles; 346 347 var terms = this._index.terms; 347 var objects = this._index.objects;348 var objtypes = this._index.objtypes;349 var objnames = this._index.objnames;350 348 var fileMap = {}; 351 349 var files = null; … … 358 356 359 357 // 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 } 393 370 394 371 // perform the search on the required terms … … 490 467 displayNextItem(); 491 468 }); 492 } );469 }, "text"); 493 470 } else { 494 471 // no source available, just display title … … 511 488 } 512 489 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] 513 555 } 514 556 } -
sansmodels/docs/sphinx/html/_static/sidebar.js
r512573a rc0d873f 29 29 var sidebar = $('.sphinxsidebar'); 30 30 var sidebarwrapper = $('.sphinxsidebarwrapper'); 31 32 // for some reason, the document has no sidebar; do not run into errors 33 if (!sidebar.length) return; 31 34 32 35 // original margin-left of the bodywrapper and width of the sidebar -
sansmodels/docs/sphinx/html/_static/underscore.js
r512573a rc0d873f 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/ 1 8 (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, 2 9 a[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.