()
| 29 | }; |
| 30 | |
| 31 | var toggleDownload = function() { |
| 32 | downloadLink = class="st">'https:class="cm">//oss.sonatype.org/content/repositories/releases/org/mongodb/'; |
| 33 | downloadSnapshotLink = class="st">'https:class="cm">//oss.sonatype.org/content/repositories/snapshots/org/mongodb/'; |
| 34 | prefix = $(class="st">'.distroPicker').prop(class="st">'checked') ? class="st">"#maven" : class="st">"#gradle"; |
| 35 | driverVersion = $(class="st">'.driverPicker').selectpicker().val(); |
| 36 | releaseVersion = $(class="st">'.releasePicker').selectpicker().val(); |
| 37 | activeDriver = $(class="st">'.driverPicker option:selected').text(); |
| 38 | activeVersion = $(class="st">'.releasePicker option:selected').text(); |
| 39 | |
| 40 | driverVersions = $(class="st">'.driverPicker option:selected').data(class="st">'versions'); |
| 41 | $(class="st">'.releasePicker option').each(function(){ |
| 42 | $(this).prop(class="st">'disabled', driverVersions.indexOf($(this).text()) < 0); |
| 43 | }); |
| 44 | |
| 45 | $(class="st">'.driverPicker option').each(function(){ |
| 46 | driverVersions = $(this).data(class="st">'versions'); |
| 47 | $(this).prop(class="st">'disabled', driverVersions.indexOf(activeVersion) < 0); |
| 48 | }); |
| 49 | |
| 50 | $(class="st">'.driverPicker').selectpicker(class="st">'refresh'); |
| 51 | $(class="st">'.releasePicker').selectpicker(class="st">'refresh'); |
| 52 | |
| 53 | activeSample = prefix + class="st">"-" + releaseVersion + class="st">"-" + driverVersion; |
| 54 | activeDescription = class="st">"#driver-" + driverVersion; |
| 55 | |
| 56 | if (activeVersion.indexOf(class="st">"SNAPSHOT") > -1) { |
| 57 | activeLink = downloadSnapshotLink + activeDriver +class="st">'/' + activeVersion + class="st">'/'; |
| 58 | } else { |
| 59 | activeLink = downloadLink + activeDriver +class="st">'/' + activeVersion + class="st">'/'; |
| 60 | } |
| 61 | |
| 62 | $(class="st">'.download').addClass(class="st">'hidden'); |
| 63 | $(activeSample).removeClass(class="st">'hidden'); |
| 64 | $(activeDescription).removeClass(class="st">'hidden'); |
| 65 | $(class="st">'#downloadLink').attr(class="st">'href', activeLink); |
| 66 | }; |
| 67 | |
| 68 | jQuery(document).ready(function(){ |
| 69 | initializeJS(); |
nothing calls this directly
no test coverage detected