@@ -1669,50 +1669,38 @@ require([
16691669 filtObj = new Object ( ) ;
16701670 for ( ckey in window . filterObj ) {
16711671 if ( ckey === 'Program' ) {
1672-
16731672 for ( ind = 0 ; ind < window . filterObj [ ckey ] . length ; ind ++ ) {
16741673 program = window . filterObj [ ckey ] [ ind ] ;
16751674 if ( program in window . projSets ) {
16761675 if ( ! ( 'Program.' + program in window . filterObj ) ) {
16771676 collObj = collObj . concat ( window . projSets [ program ] ) ;
16781677 }
1679- }
1680- else {
1678+ } else {
16811679 collObj . push ( program ) ;
16821680 }
16831681 }
1684- }
1685- else if ( ckey . startsWith ( 'Program.' ) ) {
1682+ } else if ( ckey . startsWith ( 'Program.' ) ) {
16861683 for ( ind = 0 ; ind < window . filterObj [ ckey ] . length ; ind ++ ) {
16871684 collObj . push ( window . filterObj [ ckey ] [ ind ] ) ;
16881685 }
1689- }
1690- else {
1686+ } else {
16911687 nmA = ckey . split ( '.' ) ;
16921688 nm = nmA [ nmA . length - 1 ] ;
16931689 if ( nm . endsWith ( '_rng' ) ) {
16941690 if ( window . filterObj [ ckey ] . type === 'none' ) {
16951691 nm = nm . replace ( '_rng' , '' ) ;
1696- }
1697- else {
1692+ } else {
16981693 nm = nm . replace ( '_rng' , '_' + window . filterObj [ ckey ] . type ) ;
16991694 }
17001695 if ( ( 'rng' in window . filterObj [ ckey ] ) && ( 'none' in window . filterObj [ ckey ] ) ) {
17011696 filtObj [ nm ] = [ window . filterObj [ ckey ] [ 'rng' ] , 'None' ]
1702- }
1703-
1704- else if ( 'rng' in window . filterObj [ ckey ] ) {
1697+ } else if ( 'rng' in window . filterObj [ ckey ] ) {
17051698 filtObj [ nm ] = window . filterObj [ ckey ] [ 'rng' ]
1706- }
1707- else if ( 'none' in window . filterObj [ ckey ] ) {
1699+ } else if ( 'none' in window . filterObj [ ckey ] ) {
17081700 noneKey = nm . replace ( '_rng' , '' ) ;
17091701 filtObj [ noneKey ] = [ 'None' ] ;
17101702 }
1711-
1712-
1713-
1714- }
1715- else {
1703+ } else {
17161704 filtObj [ nm ] = window . filterObj [ ckey ] ;
17171705 }
17181706 }
@@ -1747,11 +1735,19 @@ require([
17471735 if ( is_cohort ) {
17481736 if ( data . file_parts_count > data . display_file_parts_count ) {
17491737 $ ( '#file-export-option' ) . prop ( 'title' , 'Your cohort exceeds the maximum for download.' ) ;
1750- $ ( '#file-manifest-max-exceeded' ) . show ( ) ;
17511738 $ ( '#file-export-option input' ) . prop ( 'disabled' , 'disabled' ) ;
17521739 $ ( '#file-export-option input' ) . prop ( 'checked' , false ) ;
1753- $ ( '#bq-export-option input' ) . prop ( 'checked' , true ) . trigger ( "click" ) ;
1740+ $ ( '#file-manifest' ) . hide ( ) ;
1741+ if ( ! user_is_social ) {
1742+ $ ( '#need-social-account' ) . show ( ) ;
1743+ } else {
1744+ $ ( '#file-manifest-max-exceeded' ) . show ( ) ;
1745+ $ ( '#bq-export-option input' ) . prop ( 'checked' , true ) . trigger ( "click" ) ;
1746+ }
17541747 } else {
1748+ $ ( '#file-manifest-max-exceeded' ) . hide ( ) ;
1749+ $ ( '#file-manifest' ) . show ( ) ;
1750+
17551751 var select_box_div = $ ( '#file-part-select-box' ) ;
17561752 var select_box = select_box_div . find ( 'select' ) ;
17571753 if ( data . file_parts_count > 1 ) {
@@ -2527,12 +2523,8 @@ require([
25272523 filtnm = checkBox . value ;
25282524 hasCheckBox = true ;
25292525 numCheckBoxes ++ ;
2530- }
2531- else
2532- {
2533-
2526+ } else {
25342527 filtnm = $ ( filterCat ) . children ( '.list-group-sub-item__body, .list-group-item__body, .collection-list' ) [ 0 ] . id ;
2535-
25362528 if ( $ ( filterCat ) . children ( '.list-group-item__heading' ) . children ( 'input:checkbox' ) . length > 0 ) {
25372529 hasCheckBox = true ;
25382530 numCheckBoxes ++ ;
@@ -2662,35 +2654,26 @@ require([
26622654
26632655 if ( item1 === item2 ) {
26642656 if ( isSeries && ( curInd === 0 ) ) {
2665-
26662657 var seriesNuma = parseInt ( $ ( a ) . children ( ) [ 1 ] . innerText ) ;
26672658 var seriesNumb = parseInt ( $ ( b ) . children ( ) [ 1 ] . innerText ) ;
2668-
26692659 if ( seriesNuma === seriesNumb ) {
26702660 return 0 ;
2671- }
2672- else if ( ( ( seriesNuma > seriesNumb ) ) ) {
2661+ } else if ( ( ( seriesNuma > seriesNumb ) ) ) {
26732662 return 1 ;
2674- }
2675- else {
2663+ } else {
26762664 return - 1 ;
26772665 }
2678- }
2679- else {
2666+ } else {
26802667 return 0 ;
26812668 }
2682- }
2683-
2684- else if ( ( ( item1 > item2 ) && asc ) || ( ( item2 > item1 ) && ! asc ) ) {
2669+ } else if ( ( ( item1 > item2 ) && asc ) || ( ( item2 > item1 ) && ! asc ) ) {
26852670 return 1 ;
2686- }
2687- else {
2671+ } else {
26882672 return - 1
26892673 }
26902674 } ) ;
26912675 $ ( tbl ) . find ( 'tbody' ) . append ( rowSet ) ;
2692- }
2693-
2676+ } ;
26942677
26952678 var filterItemBindings = function ( filterId ) {
26962679 $ ( '#' + filterId ) . find ( 'input:checkbox' ) . on ( 'click' , function ( ) {
@@ -2803,16 +2786,16 @@ require([
28032786
28042787 }
28052788
2806- }
2789+ } ;
28072790
28082791 var addFilterBindings = function ( id ) {
28092792 var filterCats = findFilterCats ( id , false ) ;
28102793 for ( var i = 0 ; i < filterCats . length ; i ++ ) {
28112794 filterItemBindings ( filterCats [ i ] ) ;
28122795 }
2813- }
2796+ } ;
28142797
2815- var addSliders = function ( id , initialized , hideZeros , parStr ) {
2798+ var addSliders = function ( id , initialized , hideZeros , parStr ) {
28162799 $ ( '#' + id ) . find ( '.list-group-item__body.isQuant' ) . each ( function ( ) {
28172800 $ ( this ) . find ( '.more-checks' ) . addClass ( 'hide' ) ;
28182801 $ ( this ) . find ( '.less-checks' ) . addClass ( 'hide' ) ;
@@ -2828,7 +2811,6 @@ require([
28282811 var wNone = $ ( this ) . hasClass ( 'wNone' ) ;
28292812 var checked = ( $ ( this ) . find ( '.noneBut' ) . length > 0 ) ? $ ( this ) . find ( '.noneBut' ) . find ( ':input' ) [ 0 ] . checked : false ;
28302813
2831-
28322814 if ( ! initialized ) {
28332815 var slideDivId = $ ( this ) . prop ( 'id' ) + '_slide' ;
28342816 curmin = $ ( this ) . attr ( 'data-curmin' ) ;
@@ -2846,51 +2828,39 @@ require([
28462828 addSlider = false ;
28472829 $ ( this ) . removeClass ( 'hasSlider' ) ;
28482830 //$(this).removeClass('isActive');
2849- }
2850- else if ( isActive ) {
2831+ } else if ( isActive ) {
28512832 if ( curmin === 'NA' ) {
28522833 min = lower ;
2853- }
2854- else {
2834+ } else {
28552835 min = Math . min ( lower , Math . floor ( curmin ) ) ;
28562836 }
28572837 if ( curmax === 'NA' ) {
28582838 max = upper ;
2859- }
2860- else {
2839+ } else {
28612840 max = Math . max ( upper , Math . ceil ( curmax ) ) ;
28622841 }
2863-
2864- }
2865- else {
2842+ } else {
28662843 min = Math . floor ( curmin ) ;
28672844 max = Math . ceil ( curmax ) ;
28682845 lower = min ;
28692846 upper = max ;
28702847 //$(this).attr('data-curminrng', lower);
28712848 //$(this).attr('data-curmaxrng', upper);
2872- }
28732849 }
2874-
2875- else if ( ! isActive ) {
2850+ } else if ( ! isActive ) {
28762851 lower = min ;
28772852 upper = max ;
28782853 //$(this).attr('data-curminrng', lower);
28792854 //$(this).attr('data-curmaxrng', upper);
28802855 }
2881-
2882-
28832856 }
28842857
2885-
28862858 if ( addSlider ) {
28872859 $ ( this ) . addClass ( 'hasSlider' ) ;
28882860 mkSlider ( $ ( this ) . prop ( 'id' ) , min , max , 1 , true , wNone , parStr , $ ( this ) . data ( 'filter-attr-id' ) , $ ( this ) . data ( 'filter-display-attr' ) , lower , upper , isActive , checked ) ;
2889- }
2890- else {
2861+ } else {
28912862 $ ( this ) . removeClass ( 'hasSlider' ) ;
28922863 //$(this).removeClass('isActive');
2893-
28942864 }
28952865 } ) ;
28962866 } ;
@@ -2952,10 +2922,8 @@ require([
29522922 // For collection list
29532923 $ ( '.collection-list' ) . each ( function ( ) {
29542924 var $group = $ ( this ) ;
2955-
29562925 var checkboxes = $group . find ( "input:checked" ) ;
2957- if ( checkboxes . length > 0 )
2958- {
2926+ if ( checkboxes . length > 0 ) {
29592927 var values = [ ] ;
29602928 var my_id = "" ;
29612929 checkboxes . each ( function ( ) {
@@ -3040,7 +3008,6 @@ require([
30403008 var cohort_loaded = false ;
30413009 function load_preset_filters ( ) {
30423010 if ( is_cohort && ! cohort_loaded ) {
3043- console . debug ( "Unloaded cohort found, loading..." ) ;
30443011 var loadPending = load_filters ( cohort_filters ) ;
30453012 loadPending . done ( function ( ) {
30463013 console . debug ( "Load pending complete." ) ;
@@ -3060,7 +3027,7 @@ require([
30603027 } else if ( Object . keys ( filters_for_load ) . length > 0 ) {
30613028 var loadPending = load_filters ( filters_for_load ) ;
30623029 loadPending . done ( function ( ) {
3063- console . debug ( "External filter load done." ) ;
3030+ // console.debug("External filter load done.");
30643031 } ) ;
30653032 } else {
30663033 // check for localStorage key of saved filters from a login
@@ -3070,7 +3037,7 @@ require([
30703037 if ( has_sliders ) {
30713038 let loadPending = load_sliders ( ANONYMOUS_SLIDERS , ! has_filters ) ;
30723039 loadPending . done ( function ( ) {
3073- console . debug ( "Sliders loaded from anonymous login." ) ;
3040+ // console.debug("Sliders loaded from anonymous login.");
30743041 } ) ;
30753042 }
30763043 if ( has_filters ) {
0 commit comments