4391. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/9/2017 3:51:34 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

4391.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:51:34 2017 UTC
2 eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-web\src\main\webapp\js common.js Fri Apr 21 20:03:30 2017 UTC

4391.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 257
Removed 0 0

4391.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

4391.4 Active regular expressions

No regular expressions were active.

4391.5 Comparison detail

        1   /*(functio n () {
        2       if (wi ndow.locat ion.pathna me === '/n vap-web/Lo gin.do' ||  window.lo cation.pat hname ===  '/nvap-web /Logout.do _sec') {
        3           re turn;
        4       }
        5       $.ajax ({
        6           ur l: 'Login. do?checkSe ssion=true ',
        7           su ccess: fun ction(resu lt) {
        8                if (resu lt !== '1' ) {
        9                    wind ow.locatio n.href = ' Login.do';
        10                }
        11           },
        12           er ror: funct ion(result ) {
        13                window.l ocation.hr ef = 'Logi n.do';
        14           }
        15       });
        16   })();*/
        17  
        18   function d oSubmit(fo rm) {
        19       return  true;
        20   }
        21  
        22   function s etFocus(ob j) {
        23       docume nt.all.for mErrors ?  document.a ll.offScre enErrors.f ocus() : o bj.focus() ;
        24   }
        25  
        26   $(document ).ready(fu nction ()  {
        27       $(docu ment).on(' click', '. allableChe ckbox', fu nction ()  {
        28           if  ($(this). val() ===  'ALL') {
        29                if ($('. allableChe ckbox[valu e=ALL]').i s(':checke d')) {
        30                    $('. allableChe ckbox').ea ch(functio n () {
        31                         $(this).pr op("checke d", false) ;
        32                    });
        33                    $('. allableChe ckbox[valu e=ALL]').p rop("check ed", true) ;
        34                }
        35           }  else {
        36                var nonA llChecked  = false;
        37                $('.alla bleCheckbo x').each(f unction ()  {
        38                    nonA llChecked  |= $(this) .prop("che cked");
        39                });
        40                $('.alla bleCheckbo x[value=AL L]').prop( "checked",  !nonAllCh ecked);
        41           }
        42       });
        43  
        44       if ($( ".vap-aler t")) {
        45           wi ndow.setTi meout(func tion () {
        46                $(".vap- alert").fa deTo(500,  0).slideUp (500, func tion () {
        47                    $(th is).remove ();
        48                });
        49           },  5000);
        50       }
        51       
        52       //for  all of the  tags with  a data-to oltip attr ibute, add  the appro priate too ltip for i t
        53       if ($( "[data-too ltip]") != = null) {
        54           $( "[data-too ltip]").ea ch(functio n(){
        55                var elem ent = $(th is);
        56                var tool tipText =  element.da ta('toolti p'); 
        57  
        58                if(eleme nt.is("[da ta-tooltip -position] ")) {
        59                    var  position =  element.d ata('toolt ip-positio n');
        60                    if(p osition == = 'left')  { //so far  we only h ave left a lignment a s an optio n other th an the def ault
        61                         var pos =  {
        62                             my: 'c enter righ t',
        63                             at: 'c enter left '
        64                         };
        65                    }
        66                } else {  //this is  the defau lt
        67                    var  pos = { 
        68                         my: 'cente r left',
        69                         at: 'cente r right'
        70                    };
        71                }
        72  
        73                element. qtip($.ext end(tipOpt ions, {
        74                    cont ent: toolt ipText,
        75                    posi tion: pos
        76                }));
        77           }) ;
        78       }
        79       
        80       jQuery ('#csvButt on').on('c lick', fun ction () {
        81           if  (reportTa ble.page.i nfo().reco rdsTotal <  scheduled ExportThre shold) {
        82                createEx portModal( 'export-al ert', 'exp ortToCsv',  true, val idateSSNsB eforeExpor t);
        83           }
        84           el se {
        85                createEx portModal( 'scheduled -csv-expor t-alert',  'exportToC sv', false , validate SSNsBefore Export);
        86           }
        87       });
        88  
        89       //the  button is  ajaxed as  to not ref resh the p age
        90       jQuery ('#excelBu tton').on( 'click', f unction ()  {
        91           if  (reportTa ble.page.i nfo().reco rdsTotal <  scheduled ExportThre shold) {
        92                createEx portModal( 'export-al ert', 'exp ortToExcel ', true, v alidateSSN sBeforeExp ort);
        93           }
        94           el se {
        95                createEx portModal( 'scheduled -export-al ert', 'exp ortToExcel ', false,  validateSS NsBeforeEx port);
        96           }
        97       });
        98   });
        99  
        100   createExpo rtModal =  function(d ivToShow,  baseUrl, e xportNow,  mustValida teSSNsBefo reExport)  {
        101       $('#'  + divToSho w).dialog( {
        102           re sizable: f alse,
        103           he ight: "aut o",
        104           wi dth: 400,
        105           mo dal: true,
        106           op en: functi on(event,  ui) {
        107                $('#' +  divToShow) .show();
        108           },
        109           bu ttons: {
        110                "Export" : function () {
        111                    if(e xportNow){
        112                         if(mustVal idateSSNsB eforeExpor t){
        113                             if(val idateSsns( )){
        114                                 wi ndow.locat ion.href =  construct Url(baseUr l);
        115                             }
        116                         } else {
        117                             window .location. href = con structUrl( baseUrl);
        118                         }
        119                        
        120                    } el se {
        121                         if(mustVal idateSSNsB eforeExpor t){
        122                             if(val idateSsns( )){
        123                                 $. ajax(const ructUrl(ba seUrl));
        124                                 $( this).prop ('disabled ', true);
        125                             }
        126                         } else {
        127                             $.ajax (construct Url(baseUr l));
        128                             $(this ).prop('di sabled', t rue);
        129                         }
        130                    }
        131                    
        132                    $(th is).dialog ("close");
        133                },
        134                Cancel:  function()  {
        135                    $(th is).dialog ("close");
        136                }
        137           }
        138       });
        139   };
        140  
        141   jQuery(doc ument).aja xError(fun ction (e,  jqXHR, aja xSettings,  thrownErr or) {
        142       // if  901 - user  does not  have an ac tive sessi on, so red irect to l ogin page
        143       if (jq XHR.status  == '901')  {
        144           wi ndow.locat ion.href =  'Login.do ';
        145       }
        146   });
        147  
        148   //global o ptions for  the tool  tips (desc riptors in  the sessi on scope)
        149   tipOptions  = {
        150       positi on : {
        151           my : 'center  left',
        152           at : 'center  right'
        153       },
        154       show :  {
        155           de lay: 700
        156       }
        157   };
        158  
        159   function e scapeHTML( unsafe) {
        160       return  unsafe
        161            . replace(/& /g, "&amp; ")
        162            . replace(/< /g, "&lt;" )
        163            . replace(/> /g, "&gt;" )
        164            . replace(/" /g, "&quot ;")
        165            . replace(/' /g, "&#039 ;");
        166    };
        167  
        168   //DataTabl es specifi c override s/function s
        169  
        170   function a ddAriaToDa taTable(ta bleId, dat aTableVari able) {
        171       var $t body = $(' #' + table Id + '').f ind("tbody ");
        172       $tbody .find("th" ).attr("ro le", "rowh eader");
        173       $tbody .find("td" ).attr("ro le", "grid cell");
        174  
        175       if ( ! dataTableV ariable.da ta().any()  ) {
        176           // we have no  records s o we have  to add a r ole="row"  to the ret urned tr f or aria co mpliance
        177           $t body.find( "tr").attr ("role", " row");
        178       }
        179   };
        180  
        181   function s etProcessi ngForDataT able(table Id, top) {
        182       $('#'  + tableId) .on( 'proc essing.dt' , function  () {
        183           if  (top ===  undefined)  top = 0;
        184           $( '#' + tabl eId + '_pr ocessing') .css('back ground', ' rgba(220,2 20,220,0.8 )');
        185           $( '#' + tabl eId + '_pr ocessing') .css('font -weight',  'bold');
        186           $( '#' + tabl eId + '_pr ocessing') .css('top' , top + 'p x');
        187           $( '#' + tabl eId + '_pr ocessing') .css('heig ht', '100% ');
        188           $( '#' + tabl eId + '_pr ocessing') .css('z-in dex', '10' );
        189           if  (top !==  0) {
        190                $('#' +  tableId +  '_processi ng').css(' padding-bo ttom', -to p + 'px');
        191           }
        192       }).dat aTable();
        193   };
        194  
        195   function h andleError sInDataTab le(tableId , response Object, co lsToSpan)  {
        196       $('#'  + tableId  + '_proces sing').hid e();
        197       $('.da taTables_e mpty').rem ove();
        198       var js on = respo nseObject. responseJS ON;
        199       
        200       //hand le session  expiratio ns
        201       if(res ponseObjec t.status = = '901') {
        202           wi ndow.locat ion.href =  'Login.do ';
        203       }
        204       
        205       if(jso n.errorDat a){
        206           va r message  = json.err orData.cus tomMessage .length >  0 ? json.e rrorData.c ustomMessa ge : 'An E rror Occur red';
        207           $( '#' + tabl eId + ' tb ody').html ('<tr clas s="odd" ro le="row">< td valign= "top" cols pan="' + c olsToSpan  + '" class ="dataTabl es_empty t ext-center " role="gr idcell">'  + message  + '</td></ tr>');
        208       } else  {
        209           $( '#' + tabl eId + ' tb ody').html ('<tr clas s="odd" ro le="row">< td valign= "top" cols pan="' + c olsToSpan  + '" class ="dataTabl es_empty t ext-center " role="gr idcell">An  Error Occ urred</td> </tr>');
        210       }
        211   };
        212  
        213   //called o n the succ ess of the  last JSCh art create d on a pag e (as they  are curre ntly chain ed togethe r)
        214   function a ddAriaToJS Charts(){
        215       $('.ch artjs-hidd en-iframe' ).each(fun ction(i, o bj) {
        216           va r titleToS et = $(obj ).siblings ("canvas") .data('tit le');
        217           $( obj).attr( "title", t itleToSet) ;
        218       });
        219   };
        220  
        221   //common m ethod to v alidate a  start and  end date.  returns an  error mes sage if on e is found  or return s a blank  one if non e are foun d. validat es dates i n mm/dd/yy yy format
        222   function v alidateSta rtAndEndDa te(startDa te, endDat e, futureD atesEnable d) {
        223       var er rorMessage  = '';
        224       var to day = mome nt();
        225       var re  = /^(\d{1 ,2})\/(\d{ 1,2})\/(\d {4})$/;
        226       
        227       if (ty peof futur eDatesEnab led === 'u ndefined')  {
        228           fu tureDatesE nabled = f alse; //de fault this  to false  if its not  passed in  as it is  an optiona l param
        229       }
        230       
        231       if ((s tartDate = == '' || ( moment(sta rtDate, 'M M/DD/YYYY' ).isValid( ) && start Date.match (re))) &&  ((endDate  === '' ||  (moment(en dDate, 'MM /DD/YYYY') .isValid()  && endDat e.match(re ))))) {
        232           va r startDat eToUse = m oment(star tDate, 'MM /DD/YYYY') ;
        233           va r endDateT oUse = mom ent(endDat e, 'MM/DD/ YYYY');
        234  
        235           if  (!futureD atesEnable d) { //if  the future  dates are  NOT enabl ed (defaul t) then we  check for  start and  end dates  that need  to be pri or or equa l to today
        236                if (star tDate !==  '') {
        237                    if ( startDateT oUse.isAft er(today))  {
        238                         errorMessa ge = 'Star t date mus t be prior  or equal  to today.' ;
        239                    }
        240                }
        241                if (endD ate !== '' ) {
        242                    if ( endDateToU se.isAfter (today)) {
        243                         errorMessa ge = 'End  date must  be prior o r equal to  today.';
        244                    }
        245                }
        246           }
        247           if  (startDat e !== '' & & endDate  !== '') {
        248                if (star tDateToUse .isAfter(e ndDateToUs e)) {
        249                    erro rMessage =  'Start da te must be  before or  equal to  end date.' ;
        250                }
        251           }
        252       } else  {
        253           er rorMessage  = 'Start  date and e nd date mu st be vali d dates in  the mm/dd /yyyy form at.';
        254       }
        255       
        256       return  errorMess age;
        257   }