Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6188a56 authored by Scott Main's avatar Scott Main Committed by Android Git Automerger
Browse files

am 972c3798: am 28ca0f32: am 25e7300c: load the navtree javascript on demand;...

am 972c3798: am 28ca0f32: am 25e7300c: load the navtree javascript on demand; don\'t try setting up the tree until it\'s loaded

* commit '972c3798':
  load the navtree javascript on demand; don't try setting up the tree until it's loaded
parents 709fcf04 972c3798
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -11,6 +11,10 @@ var basePath = getBaseUri(location.pathname);
var SITE_ROOT = toRoot + basePath.substring(1,basePath.indexOf("/",1));
var GOOGLE_DATA; // combined data for google service apis, used for search suggest
  
// Ensure that all ajax getScript() requests allow caching
$.ajaxSetup({
  cache: true
});

/******  ON LOAD SET UP STUFF *********/

@@ -2319,7 +2323,13 @@ function find_page(url, data)
}

function init_default_navtree(toroot) {
  // load json file for navtree data
  $.getScript(toRoot + 'navtree_data.js', function(data, textStatus, jqxhr) {
      // when the file is loaded, initialize the tree
      if(jqxhr.status === 200) {
          init_navtree("tree-list", toroot, NAVTREE_DATA);
      }
  });
  
  // perform api level toggling because because the whole tree is new to the DOM
  var selectedLevel = $("#apiLevelSelector option:selected").val();
+0 −2
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ else
<?cs if:reference.gms || reference.gcm || google?>
<script src="<?cs var:toroot ?>gms_navtree_data.js" async type="text/javascript"></script>
<script src="<?cs var:toroot ?>gcm_navtree_data.js" async type="text/javascript"></script>
<?cs elif:reference ?>
<script src="<?cs var:toroot ?>navtree_data.js" async type="text/javascript"></script>
<?cs /if ?>

<script type="text/javascript">