23. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/8/2016 5:24:52 PM Eastern Standard 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.

23.1 Files compared

# Location File Last Modified
1 rxrefill-v2.0.0 P2.zip\rxr-web-master.zip\app\common\lib app_utils.js Fri Oct 21 01:05:18 2016 UTC
2 rxrefill-v2.0.0 P2.zip\rxr-web-master.zip\app\common\lib app_utils.js Mon Oct 31 14:23:09 2016 UTC

23.2 Comparison summary

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

23.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

23.4 Active regular expressions

No regular expressions were active.

23.5 Comparison detail

  1   var App_Ut ils = {
  2       GetDom ainPath: f unction ()  {
  3           if  (document .location. hostname = = "localho st") {
  4                App.debu g = true;
  5                if (!App .DebugMode ) {
  6                    App. DebugMode  = true;
  7                    App_ Utils.Debu gMode();
  8                }
  9                return A pp_Utils.G etReferenc ePath();
  10           }
  11           el se {
  12                App.debu g = false;
  13                return e ncodeURI(w indow.loca tion.proto col + "//"  + window. location.h ost + "/") ;
  14           }
  15       },
  16       GetRef erencePath : function  () {
  17           if  (document .location. hostname = = "localho st") {
  18                  return enc odeURI("ht tps:// DNS . DNS     /");
  19           }
  20           el se {
  21                var refe rencePath  = window.l ocation.pr otocol + " //" + wind ow.locatio n.host + w indow.loca tion.pathn ame;
  22                var inde x = refere ncePath.in dexOf("ind ex.html");
  23                if (inde x !== -1)  {
  24                    refe rencePath  = referenc ePath.subs tring(0, i ndex);
  25                }
  26                return e ncodeURI(r eferencePa th);
  27           }
  28       },
  29       SetReq uestHeader : function  () {
  30           va r sync = B ackbone.sy nc;
  31           Ba ckbone.syn c = functi on (method , model, o ptions) {
  32                options. beforeSend  = functio n (xhr) {
  33                    if ( App_Utils. GetSession Token() !=  null) {
  34                         xhr.setReq uestHeader ('Authoriz ation', 'B earer ' +  App_Utils. GetSession Token());
  35                    }
  36                };
  37                sync(met hod, model , options) ;
  38           };
  39       },
  40       ErrorH andling: f unction ()  {
  41           va r sync = B ackbone.sy nc;
  42           Ba ckbone.syn c = functi on (method , model, o ptions) {
  43                var erro r = option s.error;
  44                options. error = fu nction (xh r, statusT xt, thrown ) {
  45                    if ( !RXR.View. Header) {/ /early err ors before  full star t
  46                         RXR.Layout .header.sh ow(RXR.Vie w.Header =  new RXR.V iew.header ());
  47                    }
  48                    else  if (xhr.s tatus ===  401) {
  49                         //User in  not authen ticated
  50                         App.loginU tils.check ForAuthCod e();
  51                    }
  52                    else  if (xhr.s tatus == 4 04 && mode l.key == " Right of A ccess") {
  53                         //User has  not accep ted Right  of Access,  redirect  so they ca n be promp ted.
  54                         App_Utils. ROARedirec t();
  55                    }
  56                    else  if (xhr.s tatus ===  400 && mod el.key ===  "Tracking  Prescript ion Detail s") {
  57                         //Pass err or to mode l
  58                         error(xhr,  statusTxt , thrown);
  59                    }
  60                    else {
  61                         //Broadcas t model er ror
  62                         App.vent.t rigger(((m odel.key ?  model.key  : "genera l") + ":fa iled"), {  model: mod el, xhr: x hr });
  63                         //Let form at this fo r a human
  64                         App_Utils. FormatErro rMSG(model , xhr);
  65                         //Pass err or to mode l
  66                         error(xhr,  statusTxt , thrown);
  67                    }
  68                };
  69                sync(met hod, model , options) ;
  70           };
  71       },
  72       Cookie Exists: fu nction (co okieName)  {
  73           re turn docum ent.cookie .indexOf(c ookieName)  > 0;
  74       },
  75       Delete Cookie: fu nction (co okieName)  {
  76           do cument.coo kie = enco deURICompo nent(cooki eName) + " =deleted;  expires="  + new Date (0).toUTCS tring();
  77       },
  78       SetSes sionToken:  function  (name, val ue) {
  79           va lue = valu e.replace( /"/g, ""). replace(/' /g, "");
  80           se ssionStora ge.setItem (name, '"'  + value.t oString()  +'"');
  81       },
  82       ClearS essionToke n: functio n (name) {
  83           se ssionStora ge.setItem (name, nul l);
  84       },
  85       Retrie veToken: f unction (n ame) {
  86           va r token =  sessionSto rage.getIt em(name);
  87           if  (token !=  'null' &&  token !=  null) {
  88                return t oken.repla ce(/"/g, " ");
  89           }
  90           el se { retur n null; }
  91       },
  92       GetSes sionToken:  function  () {
  93           re turn App_U tils.Retri eveToken(' token');
  94       },
  95       GetMHV Token: fun ction () {
  96           re turn App_U tils.Retri eveToken(' mhvToken') ;
  97       },
  98       AppCle anup: func tion () {
  99           // console.lo g("In appU tils.appCl eanup...") ;
  100           if  (App_Util s.GetSessi onToken()  != null) {
  101                RXR.Mode l.DeleteTo ken = new  RXR.Model. deleteToke n();
  102                RXR.Mode l.DeleteTo ken.destro y({
  103                    data Type: "tex t",
  104                    cont entType: f alse,
  105                    proc essData: f alse,
  106                    comp lete: func tion (mode l, respons e) {
  107                         App.vent.t rigger('to ken:delete d');
  108                    }
  109                });
  110                App_Util s.ClearSes sionToken( 'token');
  111                App_Util s.ClearSes sionToken( 'mhvToken' );
  112           }
  113           el se {
  114                App.vent .trigger(' token:dele ted');
  115           }
  116           Ap p.vent.on( 'token:del eted', fun ction (dat a) {
  117                //consol e.log("tok en deleted ...");
  118                if (App_ Utils.Cook ieExists(' JSESSIONID ')) {
  119                    App_ Utils.Dele teCookie(' JSESSIONID ');
  120                    App. vent.trigg er('cookie :deleted') ;
  121                }
  122                else { A pp.vent.tr igger('coo kie:delete d'); }
  123                App.vent .trigger(' AppCleanup :complete' );
  124           }) ;
  125       },
  126       Format ErrorMSG:  function ( model, xhr ) {
  127           va r key, res , status,  statustext , msg, dev msg;
  128           ke y = res =  status = s tatustext  = msg = '' ;
  129           ke y = model. key ? mode l.key : "" ;
  130           if  (xhr.resp onseJSON)  {
  131                res = xh r.response JSON.devel operMessag e ? xhr.re sponseJSON .developer Message :  "";
  132                devmsg =  xhr.respo nseJSON.me ssage ? xh r.response JSON.messa ge : "";
  133           }
  134  
  135           st atus = xhr .status ?  xhr.status  : "No sta tus";
  136           st atustext =  xhr.statu sText ? xh r.statusTe xt : "No s tatus text ";
  137           ms g = key +  " encounte red the fo llowing er ror: " + r es + " (St atus: " +  status + "  / " + sta tustext+")  " + devms g;
  138           Ap p.vent.tri gger('webs ite:error' , msg);
  139       },
  140       GetLoc alStorage:  function  (key) {
  141           re turn local Storage.ge tItem(key) ;
  142       },
  143       SetLoc alStorage:  function  (key, valu e) {
  144           lo calStorage .setItem(k ey, JSON.s tringify(v alue));
  145       },
  146       Delete LocalStora ge: functi on (key) {
  147           lo calStorage .removeIte m(key);
  148       },
  149       Return ToLaunchpa d: functio n () {
  150           // Redirect b ack to Lau nchpad her e.
  151           // window.loc ation = Ap p_Utils.Ge tDomainPat h() + "lau nchpad";
  152           wi ndow.locat ion = RXR_ Data.HARes ources.get ('launchpa d-link').t oJSON().hr ef;// + ne w Date().g etTime() +  '&redirec t_uri=' +  App_Utils. GetReferen cePath() +  'rx-refil l/';
  153       },
  154       Launch padLogin:  function ( ) {
  155           // Redirect b ack to Lau nchpad Log in.
  156           if  (App.debu g) {
  157                console. log("Redir ect back t o Launchpa d Login.") ;
  158                //consol e.log(RXR_ Data.HARes ources.get ('oauth-lo gin').toJS ON().href  + '?' + ne w Date().g etTime() +  '&redirec t_uri=' +  App_Utils. GetReferen cePath() +  'rx-refil l/');
  159           }
  160         /*   else { win dow.locati on = RXR_D ata.HAReso urces.get( 'oauth-log in').toJSO N().href +  '?' + new  Date().ge tTime() +  '&redirect _uri=' + A pp_Utils.G etReferenc ePath(); } */
  161  
  162       },
  163       Launch padLogout_ old: funct ion () {
  164           wi ndow.locat ion = RXR_ Data.HARes ources.get ('logout') .toJSON(). href;
  165       },
  166       Launch padLogout:  function  () {
  167           co nsole.log( "In Launch padLogout. ..");
  168           va r url = "" ;
  169           va r isProd =  RXR.Data. app.appCon fig.prod;
  170           co nsole.log( "veteran f lag: " + R XR.Data.ap p.appConfi g.veteran) ;
  171           co nsole.log( "In logout : isProduc tion? " +  isProd);
  172           if  (isProd)  {
  173                //  For  veteran in  pre-produ ction and  production  environme nts, a log out page h as to be s et up with  VAAFI tea m. Once th e page is  set up, th e client w ill use an  endpoint  similar to :
  174                //  http s://<auth- environmen t-address> /pkmslogou t?filename =app-x-log out.html
  175                url = Ap p_Utils.Ge tDomainPat h() + 'pkm slogout?fi lename=mbb -logout.ht ml';
  176           }
  177           el se {
  178                //  For  veteran in  developme nt environ ments:
  179                //  http s://<envir onment-add ress>/ssoe proxy/logo ut
  180  
  181                //  A re direct_uri  parameter  may be sp ecified in  developme nt to redi rect the b rowser aft er a succe ssful logo ut:
  182                //  http s://<envir onment-add ress>/ssoe proxy/logo ut?redirec t_uri=(you r app home  page)
  183                url = Ap p_Utils.Ge tDomainPat h() + 'sso eproxy/log out' + '?'  + new Dat e().getTim e() + '&re direct_uri =' + App_U tils.GetDo mainPath()  + 'launch pad/';
  184           }
  185           wi ndow.locat ion = url;
  186       },
  187       GetUrl Parameter:  function  (sParam) {
  188           va r sPageURL  = window. location.s earch.subs tring(1);
  189           va r sURLVari ables = sP ageURL.spl it('&');
  190           fo r (var i =  0; i < sU RLVariable s.length;  i++)
  191           {
  192                var sPar ameterName  = sURLVar iables[i]. split('=') ;
  193                if (sPar ameterName [0] == sPa ram)
  194                {
  195                    retu rn sParame terName[1] ;
  196                }
  197           }
  198       },
  199       SetUrl : function  () {
  200           va r url = wi ndow.locat ion.href;
  201           ur l = url.sl ice(0, url .indexOf(' ?'));
  202           re turn encod eURI(url);
  203       },
  204       BackBu tton: func tion () {
  205           wi ndow.histo ry.back();
  206       },
  207       RightO fAccess: f unction ()  {
  208           if  (App.debu g) {   //  bypass if  running lo cally
  209                App.vent .trigger(' roa:accept ed');
  210           }
  211           el se {
  212                // store  old value  of emulat e
  213                var oldE mulateHTTP  = Backbon e.emulateH TTP;
  214                Backbone .emulateHT TP = true;
  215                RXR.Mode l.ROA = ne w RXR.Mode l.roa();
  216                RXR.Mode l.ROA.fetc h({
  217                    succ ess: funct ion (model , response ) {
  218                         response.r ightOfAcce ssAccepted  ? App.ven t.trigger( 'roa:accep ted') : Ap p_Utils.RO ARedirect( );
  219                    },
  220                    erro r: functio n (model,  response,  options) {
  221                         if (respon se.status  == 200)  {
  222                             respon se.rightOf AccessAcce pted ? App .vent.trig ger('roa:a ccepted')  : App_Util s.ROARedir ect();
  223                         }
  224                    }
  225                });
  226                Backbone .emulateHT TP = oldEm ulateHTTP;   // reset  back to o ld value a fter fetch
  227           }
  228       },
  229       ROARed irect: fun ction () {
  230           // window.ale rt("Redire cting to r oa site!") ;
  231           wi ndow.locat ion = App_ Utils.GetD omainPath( ) + 'Mobil eHealthPla tformWeb/r oa/index.h tml?url='  + App_Util s.GetRefer encePath() ;
  232       },
  233       DebugM ode: funct ion () {
  234           /*
  235           if (App_Utils .GetSessio nToken() = == null){
  236                //Quick  and dirty  input to a dd token i f developi ng and tok en is not  present
  237                var html  = '<form  class="for m-inline"> ' +
  238                    '<di v class="f orm-group" >' +
  239                         '<label fo r="tokenIn put">Token :</label>  ' +
  240                         '<input ty pe="text"  class="for m-control  input-sm"  id="tokenI nput" plac eholder="E nter Token ">' +
  241                    '</d iv>' +
  242                    '<bu tton type= "button" c lass="btn- default bt n-sm" id=" setToken"> Set Token< /button>'  +
  243                  '</for m>';
  244                if (!$(" #debug").l ength) {
  245                    $("b ody").appe nd("<div i d='token'  style='pos ition:abso lute; righ t:10px; to p:0px;'>"  + html + " </div>");
  246                }
  247                $("#setT oken").on( "click", f unction ()  {
  248                    var  token = $( "#tokenInp ut").val() ;
  249                    App_ Utils.SetS essionToke n('token',  token);
  250                    loca tion.reloa d();
  251                });
  252           }
  253           */
  254           if  (App_Util s.GetLocal Storage('R XR_Eula'))  {
  255                //Add bu tton to cl ear Eula l ocalStorag e value
  256                var html 2 = '<butt on type="b utton" cla ss="btn-de fault btn- sm" id="eu laBtn" sty le="positi on:absolut e; right:3 35px; top: 0px;">Dele te Eula</b utton>';
  257                if (!$(" #eulaBtn") .length) {
  258                    $("b ody").appe nd(html2);
  259                }
  260                $("#eula Btn").on(" click", fu nction ()  {
  261                    App_ Utils.Dele teLocalSto rage('RXR_ Eula');
  262                    loca tion.reloa d();
  263                });
  264           }
  265           if  (App_Util s.GetLocal Storage('R XR_Leave_M odal')) {
  266                //Add bu tton to cl ear leave  modal loca lStorage v alue
  267                var html  = '<butto n type="bu tton" clas s="btn-def ault btn-s m" id="lea veBtn" sty le="positi on:absolut e; right:5 25px; top: 0px;">Dele te Leave</ button>';
  268                if (!$(" #leaveBtn" ).length)  {
  269                    $("b ody").appe nd(html);
  270                }
  271                $("#leav eBtn").on( "click", f unction ()  {
  272                    App_ Utils.Dele teLocalSto rage('RXR_ Leave_Moda l');
  273                    loca tion.reloa d();
  274                });
  275           }
  276           if  (App_Util s.GetSessi onToken()  != null) {
  277                //Add bu tton to cl ear MHPUSE R token
  278                var html 3 = '<butt on type="b utton" cla ss="btn-de fault btn- sm" id="to kenBtn" st yle="posit ion:absolu te; right: 425px; top :0px;">Del ete Token< /button>';
  279                if (!$(" #tokenBtn" ).length)  {
  280                    $("b ody").appe nd(html3);
  281                }
  282                $("#toke nBtn").on( "click", f unction ()  {
  283                    App_ Utils.Clea rSessionTo ken('token ');
  284                    loca tion.reloa d();
  285                });
  286           }
  287  
  288           // Any other  code to qu ickly aid  in develop ment
  289       },
  290       Flatte nLinks: fu nction(obj ect) {
  291           va r links =  object.get ('link');
  292           if  (typeof l inks !== ' undefined' ) {
  293                for (var  i= 0, siz e = links. length; i< size; i++)  {
  294                    if ( links[i].t itle) {
  295                         object.set (links[i]. title,link s[i]);
  296                    } el se {
  297                         object.set ('self',li nks[i]);
  298                    }
  299                }
  300                object.u nset('link ');
  301           }
  302       },
  303  
  304       /**
  305        * For  modals in side <head er>, e.g.  About, Hel p
  306        */
  307       Header ModalShown : function  () {
  308           $( ".va-title -area, .ap p-title-ar ea, main,  footer").a ttr("aria- hidden", " true");
  309           th is.FocusOn Modal();
  310       },
  311       Header ModalHidde n: functio n () {
  312           $( ".va-title -area, .ap p-title-ar ea, main,  footer").r emoveAttr( "aria-hidd en");
  313       },
  314  
  315       /**
  316        * For  modals in side <foot er>, e.g.  Important  Info
  317        */
  318       Footer ModalShown : function  () {
  319           $( "header, m ain, .foot er-content ").attr("a ria-hidden ", "true") ;
  320           th is.FocusOn Modal();
  321       },
  322       Footer ModalHidde n: functio n () {
  323           $( "header, m ain, .foot er-content ").removeA ttr("aria- hidden");
  324       },
  325  
  326       /**
  327        * For  modals in side <main >, e.g. Re fill Confi rmation
  328        * @pa ram elemen t - the HT ML element  to get fo cus; can b e either a  CSS class  name (if  unique)
  329        *         or an  element ID ; default  to '.modal -title' if  not provi ded
  330        */
  331       MainMo dalShown:  function ( element) {
  332           $( "header, # main-conte nt, footer , .scrollb ar-gradien t").attr(' aria-hidde n', 'true' );
  333           th is.FocusOn Modal(elem ent);
  334       },
  335       MainMo dalHidden:  function  () {
  336           $( "header, # main-conte nt, footer , .scrollb ar-gradien t").remove Attr('aria -hidden');
  337       },
  338  
  339       /**
  340        * For  modals in side the . modal-cont ainer div,  e.g. EULA , Timeout,  Exit, Pre scription  successful ly refille d
  341        */
  342       ModalC ontainerSh own: funct ion (eleme nt) {
  343           $( "header, m ain, foote r, .scroll bar-gradie nt").attr( "aria-hidd en", "true ");
  344           th is.FocusOn Modal(elem ent);
  345       },
  346       ModalC ontainerHi dden: func tion () {
  347           $( "header, m ain, foote r, .scroll bar-gradie nt").remov eAttr("ari a-hidden") ;
  348       },
  349  
  350       /**
  351        * For  the Sort  menu/subme nu
  352        * @pa ram contai ner - ID o f the list  container  unique to  each view , e.g. #hi storyListC ontainer
  353        */
  354       SetSor t: functio n (contain er) {
  355           va r _self =  this;
  356           //  On dropdo wn open
  357           $( '#sortMenu ').on('sho wn.bs.drop down', fun ction() {
  358                // Set a ria-expand ed to true
  359                $('#sort Btn').attr ('aria-exp anded', tr ue);
  360  
  361                // Set f ocus on th e first li nk in the  dropdown
  362                // delay ed by 0.5  second to  allow VO a nnouncemen t of expan ded state
  363                setTimeo ut(functio n() {
  364                    $('# sortMenu . dropdown-m enu li:fir st-child a ').focus() ;
  365                }, 500);
  366  
  367                // hide  other elem ents
  368                _self.So rtOnShownA ria(contai ner);
  369           }) ;
  370  
  371           //  On dropdo wn close
  372           $( '#sortMenu ').on('hid den.bs.dro pdown', fu nction() {
  373                // Set a ria-expand ed to fals e
  374                $('#sort Btn').attr ('aria-exp anded', fa lse);
  375  
  376                // un-hi de other e lements
  377                _self.So rtOnHidden Aria(conta iner);
  378           }) ;
  379       },
  380  
  381       /**
  382        * The  elements  to hide wh en user in teracts wi th the Sor t function ality
  383        * @pa ram contai ner - ID o f the list  container  unique to  each view
  384        */
  385       SortOn ShownAria:  function  (container ) {
  386           $( 'header, . title-back -btn, #con tent-title , footer,  .scrollbar -gradient' ).attr('ar ia-hidden' , 'true');
  387           $( container) .attr('ari a-hidden',  'true');
  388       },
  389       /**
  390        * The  elements  to un-hide  when user  interacts  with the  Sort funct ionality
  391        * @pa ram contai ner - ID o f the list  container  unique to  each view
  392        */
  393       SortOn HiddenAria : function  (containe r) {
  394           $( 'header, . title-back -btn, #con tent-title , footer,  .scrollbar -gradient' ).removeAt tr('aria-h idden');
  395           $( container) .removeAtt r('aria-hi dden');
  396       },
  397  
  398       /**
  399        * Def ault focus  on modal  display
  400        * @pa ram elemen t - the HT ML element  to get fo cus; can b e either a  CSS class  name (if  unique)
  401        *         or an  element ID ; default  to '.modal -title' if  not provi ded
  402        */
  403       FocusO nModal: fu nction (el ement) {
  404           va r target =  element ?  element :  '.modal-t itle';     // default  to .modal -title (us ually <h4> )
  405           $( target).fo cus();
  406       },
  407  
  408       /**
  409        * Def ault focus  on page l oad
  410        */
  411       FocusO nLoad: fun ction () {
  412           //  focus goe s to Impor tant Modal  if displa yed
  413           if  ($('#impo rtant-moda l').css('d isplay') = == 'block'  ||
  414                $('#impo rtant-trac king-modal ').css('di splay') == = 'block')  {
  415                this.Foc usOnModal( );
  416           }
  417           el se {
  418                $('#user MenuLink') .focus();
  419           }
  420       }
  421   };