Home | History | Annotate | Download | only in js

Lines Matching refs:if

8 var isMobile = false; // true if mobile, so we can adjust some layout
32 if(jqxhr.status === 200) {
34 if(jqxhr.status === 200) {
49 if (event.which == 191) {
56 if ($(this).hasClass('disabled')) {
83 if (quicknav_open) {
116 if ($("#search_autocomplete").is(":focus")) return;
117 if ($("#search_autocomplete").val() == '') {
125 if ($("#search_autocomplete").val() == '') {
134 if (pagePath.indexOf("/intl/") == 0) {
138 if (pagePath.indexOf(SITE_ROOT) == 0) {
139 if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') {
147 if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') {
148 // If running locally, SITE_ROOT will be a relative path, so account for that by
168 if ($("body").hasClass("design")) {
172 } else if ($("body").hasClass("develop") || $("body").hasClass("google")) {
176 if (rootDir == "training") {
178 } else if (rootDir == "guide") {
180 } else if (rootDir == "reference") {
181 // If the root is reference, but page is also part of Google Services, select Google
182 if ($("body").hasClass("google")) {
187 } else if ((rootDir == "tools") || (rootDir == "sdk")) {
189 } else if ($("body").hasClass("google")) {
194 } else if ($("body").hasClass("distribute")) {
203 // set up prev/next links if they exist
206 if ($selNavLink.length) {
215 if ($prevListItem.length) {
216 if ($prevListItem.hasClass('nav-section')) {
219 } else if (!$selListItem.hasClass('nav-section')) {
224 // jump to this section's index page (if it exists)
228 // except if cross boundaries aren't allowed, and we're at the top of a section already
230 if (!crossBoundaries && $parentListItem.hasClass('nav-section')
242 if ($selListItem.hasClass('nav-section')) {
246 // if there aren't any children, go to the next section (required for About pages)
247 if($nextLink.length == 0) {
249 } else if ($('.topic-start-link').length) {
255 // If the selected page has a description, then it's a class or article homepage
256 if ($selListItem.find('a[description]').length) {
261 // jump to the next topic in this section (if it exists)
263 if (!$nextLink.length) {
267 if (!$nextLink.length) { // Go up another layer to look for next page (lesson > class > course)
273 if (startClass) {
276 // if there's no training bar (below the start button),
278 if (!$("#tb").length) {
281 } else if (isCrossingBoundary && !$('body.design').length) { // Design always crosses boundaries
294 if (!startClass && $prevLink.length) {
296 if (prevHref == SITE_ROOT + 'index.html') {
303 // If this is a training 'article', there should be no prev/next nav
304 // ... if the grandparent is the "nav" ... and it has no child list items...
305 if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') &&
316 if ($('body.trainingcourse').length) {
336 if ($lessons.length) {
358 if (section.hasClass('expanded')) {
360 // if (section.hasClass('selected') || section.find('li').hasClass('selected')) {
361 // /* but not if myself or my descendents are selected */
389 if ($('#side-nav').length == 0) return;
391 setNavBarLeftPos(); // do this even if sidenav isn't fixed because it could become fixed
393 if (navBarIsFixed) {
394 if ((stylesheet.attr("disabled") == "disabled") || stylesheet.length == 0) {
407 if ($('#side-nav').length == 0) return;
408 if (event.target.nodeName == "DIV") {
409 // Dump scroll event if the target is a DIV, because that means the event is coming
421 // ... except if the document content is shorter than the sidenav height.
423 if ($("#doc-col").height() < $("#side-nav").height()) {
429 if (navBarIsFixed && (scrollLeft != prevScrollLeft)) {
434 if the header is sufficently far away
436 if (navBarIsFixed && navBarShouldBeFixed) {
440 if (navBarIsFixed != navBarShouldBeFixed) {
441 if (navBarShouldBeFixed) {
469 if ($('#devdoc-nav').length) {
519 if (id) {
540 if ($(".scroll-pane").length > 1) {
541 // Check if there's a user preference for the panel heights
543 if (cookieHeight) {
567 if (location.href.indexOf("/reference/") != -1) {
569 } else if (location.href.indexOf("/guide/") != -1) {
571 } else if (location.href.indexOf("/tools/") != -1) {
573 } else if (location.href.indexOf("/training/") != -1) {
575 } else if (location.href.indexOf("/design/") != -1) {
577 } else if (location.href.indexOf("/distribute/") != -1) {
586 // select current page in sidenav and header, and set up prev/next links if they exist
589 if ($selNavLink.length) {
608 if (enable) {
651 if (typeof window.onload != 'function') {
662 // If a mobile phone, set flag and do mobile setup
663 if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
700 if (headerVisible) {
711 if ($scrollPanes.length > 1) {
716 if ($("#nav-tree").is(":visible")) {
723 // if the window becomes small enough to make the class panel height 0,
725 if (parseInt(classesHeight) <= 0) {
738 if (delay) {
756 // If we're scheduled for an update, but have received another resize request
759 if (updateScrollbars && updateFromResize) {
765 if (updateScrollbars && !updateFromResize) {
779 if (!api) { setTimeout(reInitScrollbars,300); return;}
819 if ($nav.is(':visible')) {
821 if ($selected.length == 0) return;
824 if (selectedOffset + 90 > $nav.height()) { // add 90 so that we scroll up even
825 // if the current item is close to the bottom
853 if (document.cookie) {
855 if (index != -1) {
858 if (valEnd == -1) {
869 if (val==undefined) return;
871 if (expiration == null) {
910 if (li.hasClass("closed")) {
911 if (slide) {
941 if($list.hasClass('showing')) {
984 if (v != NAV_PREF_TREE) {
992 if (nav_pref == NAV_PREF_TREE) {
1001 if (nav_pref == NAV_PREF_TREE) {
1024 if ($("#nav-tree").is(':visible')) {
1040 if (intlUrl) {
1054 if (lang) {
1069 if (lang != "en") { // No need to worry about English, because a language change invokes new request
1084 // This condition is only needed if we still need to support legacy GAE server
1085 if (devsite) {
1087 if (submit) {
1092 if (submit) {
1100 if (lang != 0) {
1107 if (!lang) {
1125 if (div.hasClass("closed")) { // if it's closed, open it
1131 } else { // if it's open, close it
1145 if($(id).is(':visible')) {
1250 if (o.pagination) {
1253 if (tl > 1) {
1257 if (i==o.start) li.addClass('active');
1268 if(o.btnPrev)
1275 if(o.btnNext)
1282 if(o.btnPause)
1285 if ($(this).hasClass('paused')) {
1293 if(o.auto) startRotateTimer();
1298 if (curr == tl-1) {
1314 if(!running) {
1316 if(to<0) {
1318 } else if (to>itemLength-1) {
1347 if(o.auto) startRotateTimer();
1435 if(!running) {
1504 if (selected) {
1541 // if there are NO results at all, hide all columns
1542 if (!(gMatches.length > 0) && !(gGoogleMatches.length > 0) && !(gDocsMatches.length > 0)) {
1547 // if there are api results
1548 if ((gMatches.length > 0) || (gGoogleMatches.length > 0)) {
1558 if (gMatches.length > 0) {
1571 if (gGoogleMatches.length > 0) {
1589 if (gDocsMatches.length > 0) {
1598 if (sugg.type == "design") {
1601 if (sugg.type == "distribute") {
1604 if (sugg.type == "training") {
1607 if (sugg.type == "guide"||"google") {
1618 if ($(".suggest-card.design li").length > 0) {
1624 if ($(".suggest-card.distribute li").length > 0) {
1630 if ($(".child-card.guides li").length > 0) {
1634 if ($(".child-card.training li").length > 0) {
1639 if ($(".suggest-card.develop li").length > 0) {
1654 * @param kd True if the event is key-down
1656 * @returns True if the event should bubble up
1668 if (text != '') {
1674 if (e.keyCode == 27) {
1676 if (kd) $('.search .close').trigger('click');
1680 else if (e.keyCode == 13) {
1681 if (gSelectedIndex < 0) {
1683 if ($("#searchResults").is(":hidden") && (search.value != "")) {
1684 // if results aren't showing (and text not empty), return true to allow search to execute
1691 } else if (kd && gSelectedIndex >= 0) {
1697 // Stop here if Google results are showing
1698 else if ($("#searchResults").is(":visible")) {
1702 else if (kd && (e.keyCode == 38)) {
1703 // if the next item is a header, skip it
1704 if ($($("li", $selectedUl)[gSelectedIndex-1]).hasClass("header")) {
1707 if (gSelectedIndex >= 0) {
1711 // If user reaches top, reset selected column
1712 if (gSelectedIndex < 0) {
1719 else if (kd && (e.keyCode == 40)) {
1720 // if the next item is a header, skip it
1721 if ($($("li", $selectedUl)[gSelectedIndex+1]).hasClass("header")) {
1724 if ((gSelectedIndex < $("li", $selectedUl).length-1) ||
1734 else if (kd && $columns.length > 1 && gSelectedColumn >= 0) {
1736 // go left only if current column is not left-most column (last column)
1737 if (e.keyCode == 37 && gSelectedColumn < $columns.length - 1) {
1745 // if the corresponding item is a header, move down
1746 if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
1754 // go right only if current column is not the right-most column (first column)
1755 else if (e.keyCode == 39 && gSelectedColumn > 0) {
1763 // if the corresponding item is a header, move down
1764 if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
1773 // if key-up event and not arrow down/up,
1775 else if (!kd && (e.keyCode != 40)
1790 if (text.length != 0 &&
1805 if (text.length != 0 &&
1821 if (text.length >= 3) {
1832 // Check if query matches any tags; work backwards toward 1 to assist ranking
1835 if (s.tags[j].toLowerCase().match(textRegex)) {
1842 if (!(s.type == "training" && s.link.indexOf("index.html") == -1) || matched) {
1844 if (s.label.toLowerCase().match(textRegex)) {
1849 if (matched) {
1866 if (!matches || !matches.length)
1872 // if the query matched a tag
1873 if (match.matched_tag > 0) {
1877 // if it also matched the title
1878 if (match.matched_title > 0) {
1881 } else if (match.matched_title > 0) {
1894 if (n == 0) // lexicographical sort if scores are the same
1903 if (!matches || !matches.length)
1907 // in the given string, or -1 if not found
1909 if (s == '')
1914 if (l < 0) l = 0;
1926 if (s.charAt(i) == c) ++n;
1943 if (t >= 0) {
1949 if (t >= 0) {
1960 // if the API is deprecated, default score is 0; otherwise, perform scoring
1961 if (matches[i].deprecated == "true") {
1970 if (n == 0) // lexicographical sort if scores are the same
1979 if ((!gMatches || !gMatches.length) && (!gGoogleMatches || !gGoogleMatches.length))
1998 if (!focused) {
1999 if(obj.value == ""){
2127 if (location.hash.indexOf("q=") == -1) {
2128 // if there's no query in the url, don't search and make sure results are hidden
2141 // Exit if the hash isn't a search query or there's an error in the query
2142 if ((location.hash.indexOf("q=") == -1) || (query == "undefined")) {
2143 // If the results pane is open, close it.
2144 if (!$("#searchResults").is(":hidden")) {
2226 /* Initialize some droiddoc stuff, but only if we're in the reference */
2227 if (location.pathname.indexOf("/reference")) {
2228 if(!location.pathname.indexOf("/reference-gms/packages.html")
2261 if (!navBarIsFixed) return;
2272 if (!navBarIsFixed) return;
2285 userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
2291 if (isNaN(minLevel) && minLevel.length) {
2297 // if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
2318 if (selectedLevel < minLevel) {
2346 if (apiLevel.length == 0) { // for odd cases when the since data is actually missing, just bail
2351 // Handle provisional api levels; if this item's level is the provisional one, set it to the max
2354 if (isNaN(apiLevelNum)) {
2359 if (apiLevelNum > selectedLevelNum) {
2384 if (api_level != null) {
2390 if (children_data != null) {
2394 if (node.expanded) {
2418 if (link) {
2421 if (children_data != null) {
2435 if (!node.children_ul) {
2452 if (node.children_data && !node.expanded) {
2453 if (node.children_visited) {
2457 if ($(node.label_div).hasClass("absent")) {
2485 if (toroot.substr(0, 1) == "/") {
2486 if (full.substr(0, toroot.length) == toroot) {
2493 if (toroot != "./") {
2497 if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
2514 if (d[1] == url) {
2517 else if (d[2] != null) {
2519 if (result != null) {
2531 if(jqxhr.status === 200) {
2560 if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
2601 if (!node.children_ul) {
2613 if(link) {
2622 if (children_data != null) {
2633 if(link) {
2652 if(linkText.match("^"+"com.google.android")=="com.google.android"){
2668 if(jqxhr.status === 200) {
2680 if(jqxhr.status === 200) {
2701 if ( (expand == null && a.hasClass("closed")) || expand ) {
2707 } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
2726 if ( (expand == null && a.text() == "[Expand]") || expand ) {
2731 } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
2745 if (a.text() == "[Expand All]") {
2777 if (control && e.which == 70) { // 70 is "F"