19. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/25/2018 3:40:55 PM Central 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.

19.1 Files compared

# Location File Last Modified
1 Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\cordova\grunt_merge\ios\common\js veteran.js Fri Jun 1 14:26:04 2018 UTC
2 Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\cordova\grunt_merge\ios\common\js veteran.js Wed Jul 25 13:46:25 2018 UTC

19.2 Comparison summary

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

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

19.4 Active regular expressions

No regular expressions were active.

19.5 Comparison detail

  1   /* Start A pplication  */
  2   window.App  = new VPC .App({cont ainer: "di v.containe r-fluid"}) ;
  3  
  4   App.checkE ula = func tion () {
  5       //Need  to check  that EULA  has been a ccepted
  6       if (_. isNull(App _Utils.Get LocalStora ge('VPC_Eu la'))) {
  7           VP C.Layout.m odal.show( VPC.View.E ula = new  VPC.View.e ula());
  8           VP C.View.Eul a.show();
  9       }
  10       else {  App.vent. trigger('e ula:accept ed'); }
  11   };
  12  
  13   App.resour ceErrorHan dler = fun ction(coll ection, re sponse, op tions) {
  14       Backbo ne.history .start();
  15  
  16       var er rorMessage  = "Error  retrieving  resource  directorie s!  Error  Code: " +  response.s tatus + "  Error Mess age: " + r esponse.st atusText;
  17       consol e.log(erro rMessage);
  18       var ht ml = VPC.T emplate.er ror({
  19           er rorMessage : errorMes sage
  20       });
  21  
  22       $("#er rorSection ").html(ht ml);
  23       $('.sp inner-imag e').addCla ss('hidden ');
  24       App.ve nt.trigger ('resource s:failed',  collectio n.key);
  25   };
  26  
  27   App.loadRe sources =  function()  {
  28       var re ady = 0;
  29  
  30       var re adyCheck =  function  () {
  31           if  (ready == = 3) {
  32                App.vent .trigger(' resources: loaded');
  33           }
  34       };
  35  
  36       var re sourceErro rHandler =  function( collection , response , options)  {
  37           Ba ckbone.his tory.start ();
  38           va r errorMes sage = "Er ror retrie ving resou rce direct ories!  Er ror Code:  " + respon se.status  + " Error  Message: "  + respons e.statusTe xt;
  39           va r x = {res ource:[]};
  40           x. resource.p ush(errorM essage);
  41           $( '#errorSec tion').htm l(VPC.Temp late.resou rceFailedB anner({"re sources":x , "help":  VPC.Data.a pp.help})) ;
  42           $( '.spinner- image').ad dClass('hi dden');
  43           Ap p.vent.tri gger('reso urces:fail ed', colle ction.key) ;
  44       };
  45  
  46       var su ccessMustS tart = fun ction() {
  47           VP C.Resource s.App = ne w App_Reso urces.Coll ection.App Resources( );
  48           VP C.Resource s.App.fetc h({
  49                success:  function( ) {
  50                    VPC. Resources. HAResource s = new VP C.Collecti on.HAResou rces();
  51                    VPC. Resources. VPCResourc es = new V PC.Collect ion.VPCRes ources();
  52                    VPC. Resources. HAResource s.fetch({s uccess: su ccessHandl er, error:  resourceE rrorHandle r});
  53                    VPC. Resources. VPCResourc es.fetch({ success: s uccessHand ler, error : resource ErrorHandl er});
  54                    succ essHandler ();
  55                },
  56                error: A pp.resourc eErrorHand ler});
  57  
  58       };
  59  
  60       var su ccessHandl er = funct ion(collec tion, resp onse, opti ons) {
  61           re ady++;
  62           re adyCheck() ;
  63       };
  64  
  65       succes sMustStart ();
  66   };
  67  
  68   App.loginO ptions = f unction()  {
  69       var re directUri  = App_Util s.GetDomai nPath()+"p aincoach",
  70           op tions = {
  71                appName:  'paincoac h',
  72                autoRedi rect: true ,   /* do  not auto d irect if i n debug mo de unless  auth serve r allows C ORS  */
  73                redirect Uri: redir ectUri,
  74                resource sLink: App _Utils.Get DomainPath ()+'vpc-re source',
  75                authoriz eUrl: VPC. Resources. HAResource s.findWher e({title:' oauth-auth orize'}).g et('href')
  76           };
  77       return  options;
  78   };
  79  
  80   App.on('st art', func tion() {
  81       consol e.log("in  app start" );
  82         App_Resour ces.hostna me = "http s:// URL /";
  83         //App_Reso urces.host name = "ht tps:// URL /";
  84  
  85       VPC.La yout = new  VPC.View. layout();
  86       VPC.La yout.rende r();
  87  
  88       if (wi ndow.locat ion.href.i ndexOf("to ken") > -1 ) {
  89           co nsole.log( 'setting t oken!');
  90           Ap p_Utils.Se tSessionTo ken('token ', App_Uti ls.GetUrlP arameter(' token'));
  91           wi ndow.locat ion = App_ Utils.SetU rl();
  92       }
  93       else {
  94           Ap p.loadReso urces();
  95       }
  96   });
  97  
  98   App.vent.o n('eula:ac cepted', f unction ()  {
  99       consol e.log('eul a accepted ...');
  100       VPC.La yout.heade r.show(VPC .View.Head er = new V PC.View.he ader());
  101       VPC.La yout.foote r.show(new  VPC.View. footer());
  102       VPC.ro uter = new  VPC.Route r();
  103       //VPC. Data.app.a ppConfig.v eteran = t rue;
  104  
  105       Backbo ne.history .start();
  106       //Set  Authorize  Request he ader
  107       App_Ut ils.SetReq uestHeader ();
  108       //Trig ger event  to load us er
  109       App.ve nt.trigger ('load:use r', { init : true });
  110   });
  111  
  112   App.vent.o n('resourc es:loaded' , function  () {
  113       consol e.log('res ources loa ded...');
  114       App.lo ginUtils =  new Login Utils(App. loginOptio ns());
  115       //App. loginUtils .authorize (); //Call  this in t he console  to test l ogin
  116  
  117       if (Ap p_Utils.Ge tSessionTo ken() != n ull) {
  118           Ap p.checkEul a();
  119       }
  120       else {
  121           // App_Utils. LaunchpadL ogin();
  122           co nsole.log( 'calling c heckforaut hcode...') ;
  123           Ap p.loginUti ls.checkFo rAuthCode( );
  124           se tTimeout(f unction(){
  125                if (App_ Utils.GetS essionToke n()) {
  126                    loca tion.reloa d()
  127                }
  128                else {
  129                    cons ole.log('s ession tok en is not  set!!');
  130                }
  131           },  1000);
  132       }
  133   });