Home | History | Annotate | Download | only in js

Lines Matching refs:if

8 var isMobile = false; // true if mobile, so we can adjust some layout
25 if(jqxhr.status === 200) {
27 if(jqxhr.status === 200) {
41 if (devsite) {
48 if ($(this).hasClass('disabled')) {
76 if (!$('#search_autocomplete').is(":focus")) {
84 if (quicknav_open) {
117 if ($("#search_autocomplete").is(":focus")) return;
118 if ($("#search_autocomplete").val() == '') {
126 if ($("#search_autocomplete").val() == '') {
135 if (pagePath.indexOf("/intl/") == 0) {
139 if (pagePath.indexOf(SITE_ROOT) == 0) {
140 if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') {
145 if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') {
146 // If running locally, SITE_ROOT will be a relative path, so account for that by
166 if ($("body").hasClass("design")) {
170 } else if ($("body").hasClass("develop") || $("body").hasClass("google")) {
175 if (rootDir == "training") {
177 } else if (rootDir == "guide") {
179 } else if (rootDir == "reference") {
180 // If the root is reference, but page is also part of Google Services, select Google
181 if ($("body").hasClass("google")) {
186 } else if ((rootDir == "tools") || (rootDir == "sdk")) {
188 } else if ($("body").hasClass("google")) {
193 } else if ($("body").hasClass("distribute")) {
198 // select current page in sidenav and header, and set up prev/next links if they exist
201 if ($selNavLink.length) {
219 if ($prevListItem.length) {
220 if ($prevListItem.hasClass('nav-section')) {
223 } else if (!$selListItem.hasClass('nav-section')) {
228 // jump to this section's index page (if it exists)
232 // except if cross boundaries aren't allowed, and we're at the top of a section already
234 if (!crossBoundaries && $parentListItem.hasClass('nav-section')
246 if ($selListItem.hasClass('nav-section')) {
250 // if there aren't any children, go to the next section (required for About pages)
251 if($nextLink.length == 0) {
253 } else if ($('.topic-start-link').length) {
259 // If the selected page has a description, then it's a class or article homepage
260 if ($selListItem.find('a[description]').length) {
265 // jump to the next topic in this section (if it exists)
267 if (!$nextLink.length) {
271 if (!$nextLink.length) { // Go up another layer to look for next page (lesson > class > course)
277 if (startClass) {
280 // if there's no training bar (below the start button),
282 if (!$("#tb").length) {
285 } else if (isCrossingBoundary && !$('body.design').length) { // Design always crosses boundaries
298 if (!startClass && $prevLink.length) {
300 if (prevHref == SITE_ROOT + 'index.html') {
307 // If this is a training 'article', there should be no prev/next nav
308 // ... if the grandparent is the "nav" ... and it has no child list items...
309 if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') &&
316 //If auto-toc div is present, generate the automated TOC
317 if ($("#auto-toc").is('*')) {
322 if(current.is("h3") && previous.is("h2")){ //need nested ols for h3s
325 else if(current.is("h2") && previous.is("h3")){ //close up the nested ol
337 if ($('body.trainingcourse').length) {
357 if ($lessons.length) {
379 if (section.hasClass('expanded')) {
381 // if (section.hasClass('selected') || section.find('li').hasClass('selected')) {
382 // /* but not if myself or my descendents are selected */
410 if ($('#side-nav').length == 0) return;
412 setNavBarLeftPos(); // do this even if sidenav isn't fixed because it could become fixed
414 if (navBarIsFixed) {
415 if ((stylesheet.attr("disabled") == "disabled") || stylesheet.length == 0) {
428 if ($('#side-nav').length == 0) return;
429 if (event.target.nodeName == "DIV") {
430 // Dump scroll event if the target is a DIV, because that means the event is coming
442 // ... except if the document content is shorter than the sidenav height.
444 if ($("#doc-col").height() < $("#side-nav").height()) {
450 if (navBarIsFixed && (scrollLeft != prevScrollLeft)) {
455 // Don't continue if the header is sufficently far away
457 if (navBarIsFixed && navBarShouldBeFixed) {
461 if (navBarIsFixed != navBarShouldBeFixed) {
462 if (navBarShouldBeFixed) {
490 if ($('#devdoc-nav').length) {
540 if (id) {
561 if ($(".scroll-pane").length > 1) {
562 // Check if there's a user preference for the panel heights
564 if (cookieHeight) {
588 if (location.href.indexOf("/reference/") != -1) {
590 } else if (location.href.indexOf("/guide/") != -1) {
592 } else if (location.href.indexOf("/tools/") != -1) {
594 } else if (location.href.indexOf("/training/") != -1) {
596 } else if (location.href.indexOf("/design/") != -1) {
598 } else if (location.href.indexOf("/distribute/") != -1) {
611 if (enable) {
654 if (typeof window.onload != 'function') {
665 // If a mobile phone, set flag and do mobile setup
666 if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
703 if (headerVisible) {
714 if ($scrollPanes.length > 1) {
719 if ($("#nav-tree").is(":visible")) {
726 // if the window becomes small enough to make the class panel height 0,
728 if (parseInt(classesHeight) <= 0) {
741 if (delay) {
759 // If we're scheduled for an update, but have received another resize request
762 if (updateScrollbars && updateFromResize) {
768 if (updateScrollbars && !updateFromResize) {
782 if (!api) { setTimeout(reInitScrollbars,300); return;}
822 if ($nav.is(':visible')) {
824 if ($selected.length == 0) return;
827 if (selectedOffset + 90 > $nav.height()) { // add 90 so that we scroll up even
828 // if the current item is close to the bottom
856 if (document.cookie) {
858 if (index != -1) {
861 if (valEnd == -1) {
872 if (val==undefined) return;
874 if (expiration == null) {
916 if (location.indexOf("/"+cookiePath+"/") != -1) {
920 if (lastPage) {
931 if (path.indexOf("/reference/") != -1) {
933 } else if (path.indexOf("/guide/") != -1) {
935 } else if ((path.indexOf("/resources/") != -1) || (path.indexOf("/training/") != -1)) {
958 if (li.hasClass("closed")) {
959 if (slide) {
1023 if (v != NAV_PREF_TREE) {
1031 if (nav_pref == NAV_PREF_TREE) {
1040 if (nav_pref == NAV_PREF_TREE) {
1063 if ($("#nav-tree").is(':visible')) {
1079 if (intlUrl) {
1093 if (lang) {
1108 if (lang != "en") { // No need to worry about English, because a language change invokes new request
1123 // This condition is only needed if we still need to support legacy GAE server
1124 if (devsite) {
1126 if (submit) {
1131 if (submit) {
1139 if (lang != 0) {
1146 if (!lang) {
1164 if (div.hasClass("closed")) { // if it's closed, open it
1170 } else { // if it's open, close it
1184 if($(id).is(':visible')) {
1289 if (o.pagination) {
1292 if (tl > 1) {
1296 if (i==o.start) li.addClass('active');
1307 if(o.btnPrev)
1314 if(o.btnNext)
1321 if(o.btnPause)
1324 if ($(this).hasClass('paused')) {
1332 if(o.auto) startRotateTimer();
1337 if (curr == tl-1) {
1353 if(!running) {
1355 if(to<0) {
1357 } else if (to>itemLength-1) {
1386 if(o.auto) startRotateTimer();
1474 if(!running) {
1531 if (selected) {
1572 //if we have results, make the table visible and initialize result info
1573 if ((gMatches.length > 0) || (gGoogleMatches.length > 0)) {
1579 if (gMatches.length > 0) {
1592 if (gGoogleMatches.length > 0) {
1605 //if we have no results, hide the table
1617 if (text != '') {
1624 if
1626 if (!$('#search_filtered_div').hasClass('no-display') || (gSelectedIndex < 0)) {
1627 if ($("#searchResults").is(":hidden") && (search.value != "")) {
1628 // if results aren't showing (and text not empty), return true to allow search to execute
1635 } else if (kd && gSelectedIndex >= 0) {
1641 else if (kd && (e.keyCode == 38)) {
1642 if ($($("#search_filtered li")[gSelectedIndex-1]).hasClass("header")) {
1647 if (gSelectedIndex >= 0) {
1655 else if (kd && (e.keyCode == 40)) {
1656 if ($($("#search_filtered li")[gSelectedIndex+1]).hasClass("header")) {
1661 if ((gSelectedIndex < $("ul#search_filtered li").length-1) ||
1669 // if key-up event and not arrow down/up,
1671 else if (!kd && (e.keyCode != 40) && (e.keyCode != 38)) {
1681 if (text.length != 0 &&
1696 if (text.length != 0 &&
1718 if (!matches || !matches.length)
1722 // in the given string, or -1 if not found
1724 if (s == '')
1729 if (l < 0) l = 0;
1741 if (s.charAt(i) == c) ++n;
1758 if (t >= 0) {
1764 if (t >= 0) {
1780 if (n == 0) // lexicographical sort if scores are the same
1789 if ((!gMatches || !gMatches.length) && (!gGoogleMatches || !gGoogleMatches.length))
1808 if (!focused) {
1809 if(obj.value == ""){
1915 if (location.hash.indexOf("q=") == -1) {
1916 // if there's no query in the url, don't search and make sure results are hidden
1929 // Exit if the hash isn't a search query or there's an error in the query
1930 if ((location.hash.indexOf("q=") == -1) || (query == "undefined")) {
1931 // If the results pane is open, close it.
1932 if (!$("#searchResults").is(":hidden")) {
2003 /* Initialize some droiddoc stuff, but only if we're in the reference */
2004 if (location.pathname.indexOf("/reference")) {
2005 if(!location.pathname.indexOf("/reference-gms/packages.html")
2038 if (!navBarIsFixed) return;
2049 if (!navBarIsFixed) return;
2062 userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
2068 if (isNaN(minLevel) && minLevel.length) {
2074 // if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
2095 if (selectedLevel < minLevel) {
2123 if (apiLevel.length == 0) { // for odd cases when the since data is actually missing, just bail
2128 // Handle provisional api levels; if this item's level is the provisional one, set it to the max
2131 if (isNaN(apiLevelNum)) {
2136 if (apiLevelNum > selectedLevelNum) {
2161 if (api_level != null) {
2167 if (children_data != null) {
2171 if (node.expanded) {
2195 if (link) {
2198 if (children_data != null) {
2212 if (!node.children_ul) {
2229 if (node.children_data && !node.expanded) {
2230 if (node.children_visited) {
2234 if ($(node.label_div).hasClass("absent")) {
2262 if (toroot.substr(0, 1) == "/") {
2263 if (full.substr(0, toroot.length) == toroot) {
2270 if (toroot != "./") {
2274 if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
2291 if (d[1] == url) {
2294 else if (d[2] != null) {
2296 if (result != null) {
2331 if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
2373 if (!node.children_ul) {
2385 if(link) {
2394 if (children_data != null) {
2405 if(link) {
2424 if(linkText.match("^"+"com.google.android")=="com.google.android"){
2427 else if(linkText.match("^"+"com.android")=="com.android"){
2471 if ( (expand == null && a.hasClass("closed")) || expand ) {
2477 } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
2496 if ( (expand == null && a.text() == "[Expand]") || expand ) {
2501 } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
2515 if (a.text() == "[Expand All]") {
2547 if (control && e.which == 70) { // 70 is "F"