Home | History | Annotate | Download | only in js

Lines Matching refs:if

8 var isMobile = false; // true if mobile, so we can adjust some layout
18 if (devsite) {
25 if ($(this).hasClass('disabled')) {
53 if (!$('#search_autocomplete').is(":focused")) {
61 if (quicknav_open) {
94 if ($("#search_autocomplete").is(":focus")) return;
95 if ($("#search_autocomplete").val() == '') {
103 if ($("#search_autocomplete").val() == '') {
112 if (pagePath.indexOf("/intl/") == 0) {
116 if (pagePath.indexOf(SITE_ROOT) == 0) {
117 if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') {
122 if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') {
123 // If running locally, SITE_ROOT will be a relative path, so account for that by
141 // select current page in sidenav and set up prev/next links if they exist
144 if ($selNavLink.length) {
162 if ($prevListItem.length) {
163 if ($prevListItem.hasClass('nav-section')) {
166 } else if (!$selListItem.hasClass('nav-section')) {
171 // jump to this section's index page (if it exists)
175 // except if cross boundaries aren't allowed, and we're at the top of a section already
177 if (!crossBoundaries && $parentListItem.hasClass('nav-section')
189 if ($selListItem.hasClass('nav-section')) {
193 // if there aren't any children, go to the next section (required for About pages)
194 if($nextLink.length == 0) {
196 } else if ($('.topic-start-link').length) {
202 // If the selected page has a description, then it's a class or article homepage
203 if ($selListItem.find('a[description]').length) {
208 // jump to the next topic in this section (if it exists)
210 if (!$nextLink.length) {
214 if (!$nextLink.length) { // Go up another layer to look for next page (lesson > class > course)
220 if (startClass) {
223 // if there's no training bar (below the start button),
225 if (!$("#tb").length) {
228 } else if (isCrossingBoundary && !$('body.design').length) { // Design always crosses boundaries
241 if (!startClass && $prevLink.length) {
243 if (prevHref == SITE_ROOT + 'index.html') {
250 // If this is a training 'article', there should be no prev/next nav
251 // ... if the grandparent is the "nav" ... and it has no child list items...
252 if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') &&
263 if ($('body.trainingcourse').length) {
283 if ($lessons.length) {
305 if (section.hasClass('expanded')) {
307 // if (section.hasClass('selected') || section.find('li').hasClass('selected')) {
308 // /* but not if myself or my descendents are selected */
336 if ($('#side-nav').length == 0) return;
338 setNavBarLeftPos(); // do this even if sidenav isn't fixed because it could become fixed
340 if (navBarIsFixed) {
341 if ((stylesheet.attr("disabled") == "disabled") || stylesheet.length == 0) {
354 if ($('#side-nav').length == 0) return;
355 if (event.target.nodeName == "DIV") {
356 // Dump scroll event if the target is a DIV, because that means the event is coming
368 // ... except if the document content is shorter than the sidenav height.
370 if ($("#doc-col").height() < $("#side-nav").height()) {
376 if (navBarIsFixed && (scrollLeft != prevScrollLeft)) {
381 // Don't continue if the header is sufficently far away
383 if (navBarIsFixed && navBarShouldBeFixed) {
387 if (navBarIsFixed != navBarShouldBeFixed) {
388 if (navBarShouldBeFixed) {
416 if ($('#devdoc-nav').length) {
466 if (id) {
487 if ($(".scroll-pane").length > 1) {
488 // Check if there's a user preference for the panel heights
490 if (cookieHeight) {
514 if (location.href.indexOf("/reference/") != -1) {
516 } else if (location.href.indexOf("/guide/") != -1) {
518 } else if (location.href.indexOf("/tools/") != -1) {
520 } else if (location.href.indexOf("/training/") != -1) {
522 } else if (location.href.indexOf("/design/") != -1) {
524 } else if (location.href.indexOf("/distribute/") != -1) {
536 if (enable) {
579 if (typeof window.onload != 'function') {
590 // If a mobile phone, set flag and do mobile setup
591 if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
638 if (headerVisible) {
649 if ($scrollPanes.length > 1) {
654 if ($("#nav-tree").is(":visible")) {
661 // if the window becomes small enough to make the class panel height 0,
663 if (parseInt(classesHeight) <= 0) {
676 if (delay) {
694 // If we're scheduled for an update, but have received another resize request
697 if (updateScrollbars && updateFromResize) {
703 if (updateScrollbars && !updateFromResize) {
717 if (!api) { setTimeout(reInitScrollbars,300); return;}
757 if ($nav.is(':visible')) {
759 if ($selected.length == 0) return;
762 if (selectedOffset + 90 > $nav.height()) { // add 90 so that we scroll up even
763 // if the current item is close to the bottom
791 if (document.cookie) {
793 if (index != -1) {
796 if (valEnd == -1) {
807 if (val==undefined) return;
809 if (expiration == null) {
851 if (location.indexOf("/"+cookiePath+"/") != -1) {
855 if (lastPage) {
866 if (path.indexOf("/reference/") != -1) {
868 } else if (path.indexOf("/guide/") != -1) {
870 } else if ((path.indexOf("/resources/") != -1) || (path.indexOf("/training/") != -1)) {
893 if (li.hasClass("closed")) {
894 if (slide) {
958 if (v != NAV_PREF_TREE) {
966 if (nav_pref == NAV_PREF_TREE) {
975 if (nav_pref == NAV_PREF_TREE) {
998 if ($("#nav-tree").is(':visible')) {
1014 if (intlUrl) {
1028 if (lang) {
1043 if (lang != "en") { // No need to worry about English, because a language change invokes new request
1058 // This condition is only needed if we still need to support legacy GAE server
1059 if (devsite) {
1061 if (submit) {
1067 if (submit) {
1075 if (lang != 0) {
1082 if (!lang) {
1100 if (div.hasClass("closed")) { // if it's closed, open it
1106 } else { // if it's open, close it
1120 if($(id).is(':visible')) {
1225 if (o.pagination) {
1228 if (tl > 1) {
1232 if (i==o.start) li.addClass('active');
1243 if(o.btnPrev)
1250 if(o.btnNext)
1257 if(o.btnPause)
1260 if ($(this).hasClass('paused')) {
1268 if(o.auto) startRotateTimer();
1273 if (curr == tl-1) {
1289 if(!running) {
1291 if(to<0) {
1293 } else if (to>itemLength-1) {
1322 if(o.auto) startRotateTimer();
1410 if(!running) {
1461 if (selected) {
1483 if (!gInitialized) {
1501 //if we have results, make the table visible and initialize result info
1502 if (gMatches.length > 0) {
1510 if (i == gSelectedIndex) {
1519 //if there are more results we're not showing, so say so.
1520 /* if (gMatches.length > ROW_COUNT) {
1528 //if we have no results, hide the table
1540 if (text != '') {
1547 if (e.keyCode == 13) {
1549 if (!$('#search_filtered_div').hasClass('no-display') || (gSelectedIndex < 0)) {
1550 if ($("#searchResults").is(":hidden")) {
1551 // if results aren't showing, return true to allow search to execute
1558 } else if (kd && gSelectedIndex >= 0) {
1564 else if (kd && (e.keyCode == 38)) {
1565 if (gSelectedIndex >= 0) {
1573 else if (kd && (e.keyCode == 40)) {
1574 if (gSelectedIndex < gMatches.length-1
1582 else if (!kd && (e.keyCode != 40) && (e.keyCode != 38)) {
1588 if (text.length != 0 &&
1597 if (gSelectedID == s.id) {
1609 if (!gMatches || !gMatches.length)
1613 // in the given string, or -1 if not found
1615 if (s == '')
1620 if (l < 0) l = 0;
1632 if (s.charAt(i) == c) ++n;
1649 if (t >= 0) {
1655 if (t >= 0) {
1671 if (n == 0) // lexicographical sort if scores are the same
1679 if (!gMatches || !gMatches.length)
1694 if (!focused) {
1695 if(obj.value == ""){
1811 if (location.hash.indexOf("q=") == -1) {
1812 // if there's no query in the url, don't search and make sure results are hidden
1825 // Exit if the hash isn't a search query or there's an error in the query
1826 if ((location.hash.indexOf("q=") == -1) || (query == "undefined")) {
1827 // If the results pane is open, close it.
1828 if (!$("#searchResults").is(":hidden")) {
1899 /* Initialize some droiddoc stuff, but only if we're in the reference */
1900 if (location.pathname.indexOf("/reference")) {
1901 if(!location.pathname.indexOf("/reference-gms/packages.html")
1934 if (!navBarIsFixed) return;
1945 if (!navBarIsFixed) return;
1958 userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
1964 if (isNaN(minLevel) && minLevel.length) {
1970 // if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
1991 if (selectedLevel < minLevel) {
2019 if (apiLevel.length == 0) { // for odd cases when the since data is actually missing, just bail
2024 // Handle provisional api levels; if this item's level is the provisional one, set it to the max
2027 if (isNaN(apiLevelNum)) {
2032 if (apiLevelNum > selectedLevelNum) {
2057 if (api_level != null) {
2063 if (children_data != null) {
2067 if (node.expanded) {
2091 if (link) {
2094 if (children_data != null) {
2108 if (!node.children_ul) {
2125 if (node.children_data && !node.expanded) {
2126 if (node.children_visited) {
2130 if ($(node.label_div).hasClass("absent")) {
2158 if (toroot.substr(0, 1) == "/") {
2159 if (full.substr(0, toroot.length) == toroot) {
2166 if (toroot != "./") {
2170 if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
2187 if (d[1] == url) {
2190 else if (d[2] != null) {
2192 if (result != null) {
2227 if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
2269 if (!node.children_ul) {
2281 if(link) {
2290 if (children_data != null) {
2301 if(link) {
2320 if(linkText.match("^"+"com.google.android")=="com.google.android"){
2354 if ( (expand == null && a.hasClass("closed")) || expand ) {
2360 } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
2379 if ( (expand == null && a.text() == "[Expand]") || expand ) {
2384 } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
2398 if (a.text() == "[Expand All]") {
2430 if (control && e.which == 70) { // 70 is "F"