Produced by Araxis Merge on 5/10/2018 8:40:52 AM 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.
# | Location | File | Last Modified |
---|---|---|---|
1 | MHED_APPS_CIF.zip\VAR v4.2.7\var-web-4.2.7@0810ae549c1.zip\veteran-appointment-requests\app\modules\new-appointment-request\views\common\facility | layout-view.js | Mon Apr 9 06:06:53 2018 UTC |
2 | MHED_APPS_CIF.zip\VAR v4.2.7\var-web-4.2.7@0810ae549c1.zip\veteran-appointment-requests\app\modules\new-appointment-request\views\common\facility | layout-view.js | Thu May 3 13:36:32 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 378 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
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 |
No regular expressions were active.
1 | define([ | |
2 | /* Cor e */ | |
3 | 'under score', | |
4 | 'jquer y', | |
5 | 'backb one', | |
6 | 'mario nette', | |
7 | ||
8 | /* Res ources */ | |
9 | 'modul es/new-app ointment-r equest/res ources/com mon/facili ty/collect ion', | |
10 | ||
11 | /* Vie ws */ | |
12 | 'modul es/new-app ointment-r equest/vie ws/common/ scheduling -steps/hea ding-view' , | |
13 | 'modul es/new-app ointment-r equest/vie ws/common/ facility/s ection-vie w', | |
14 | 'modul es/new-app ointment-r equest/vie ws/common/ facility/s ingle-item -view', | |
15 | ||
16 | /* Tem plates */ | |
17 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-no- match.html ', | |
18 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-one -match.htm l', | |
19 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/facil ity/templa tes/instru ctions-def ault.html' , | |
20 | 'text! modules/ne w-appointm ent-reques t/views/co mmon/sched uling-step s/template s/step-reg ion.html', | |
21 | ], functio n facility LayoutView ( | |
22 | /* Cor e */ | |
23 | _, | |
24 | $, | |
25 | Backbo ne, | |
26 | Mn, | |
27 | ||
28 | /* Res ources */ | |
29 | Collec tion, | |
30 | ||
31 | /* Vie ws */ | |
32 | Headin gView, | |
33 | Sectio nView, | |
34 | Single ItemView, | |
35 | ||
36 | /* Tem plates */ | |
37 | noMatc hTemplate, | |
38 | oneMat chTemplate , | |
39 | defaul tMatchTemp late, | |
40 | templa te | |
41 | ) { | |
42 | 'use s trict'; | |
43 | ||
44 | var LINK = '<a href= "https://w ww. DNS /directory /guide/div ision.asp? dnum=1" cl ass="exter nal-link"> VA Facilit y Locator< /a>'; | |
45 | ||
46 | // esl int-disabl e-next-lin e max-len | |
47 | var HE LP_TEXT = 'If you ca nnot find the locati on you nee d, please visit the ' + LINK + ' to cont act the fa cility for assistanc e.'; | |
48 | var EX PRESS_CARE _ID = 'CR1 '; | |
49 | ||
50 | ||
51 | /** | |
52 | * @cl ass Facili tyLayoutVi ew | |
53 | * @ty pedef {Bac kbone.View <Backbone. Model>} | |
54 | */ | |
55 | var Vi ew = Mn.La youtView.e xtend({ | |
56 | HE LP_TEXT: H ELP_TEXT, | |
57 | ||
58 | te mplate: _. template(t emplate), | |
59 | ||
60 | re gions: { | |
61 | heading: '.step-he ading', | |
62 | section: '.step-se ction', | |
63 | }, | |
64 | ||
65 | in itialize: function() { | |
66 | var type OfCare = t his.model. getCareId( ); | |
67 | ||
68 | this.col lection = new Collec tion(); | |
69 | this.lis tenTo(this .collectio n, 'fetch: success', this.showR egions); | |
70 | ||
71 | this.col lection.fe tchPatient Facilities (typeOfCar e); | |
72 | }, | |
73 | ||
74 | /* * | |
75 | * @return { function} | |
76 | * / | |
77 | ge tInstructi onsTemplat e: functio n() { | |
78 | var leng th = this. collection .length; | |
79 | if (leng th === 0) { | |
80 | retu rn _.templ ate(noMatc hTemplate) ; | |
81 | } else i f (length === 1) { | |
82 | retu rn _.templ ate(oneMat chTemplate ); | |
83 | } | |
84 | return _ .template( defaultMat chTemplate ); | |
85 | }, | |
86 | ||
87 | /* * | |
88 | * Finds the correct i nstruction s based on the numbe r of facil ities retu rn for the type of c are select ed | |
89 | * @return { string} ht ml | |
90 | * / | |
91 | ge tInstructi ons: funct ion() { | |
92 | var inst ructionTem plate = th is.getInst ructionsTe mplate(); | |
93 | var data = { | |
94 | type OfCareName : this.opt ions.typeO fCareName, | |
95 | help Text: HELP _TEXT, | |
96 | }; | |
97 | ||
98 | return i nstruction Template(d ata); | |
99 | }, | |
100 | ||
101 | /* * | |
102 | * @return { void} | |
103 | * / | |
104 | sh owRegions: function( ) { | |
105 | this.sho wHeading() ; | |
106 | this.sho wBody(); | |
107 | }, | |
108 | ||
109 | /* * | |
110 | * @return { void} | |
111 | * / | |
112 | sh owHeading: function( ) { | |
113 | var regi on = this. getRegion( 'heading') ; | |
114 | var mode l = new Ba ckbone.Mod el({ | |
115 | titl e: View.TI TLE, | |
116 | numb er: View.S TEP_NUMBER , | |
117 | inst ructions: this.getIn structions (), | |
118 | }); | |
119 | ||
120 | region.s how(new He adingView( {model: mo del})); | |
121 | }, | |
122 | ||
123 | /* * | |
124 | * @return { void} | |
125 | * / | |
126 | sh owBody: fu nction() { | |
127 | var leng th = this. collection .length; | |
128 | var regi on; | |
129 | var view ; | |
130 | ||
131 | if (leng th === 0) { | |
132 | // T hey won't be able to continue onward no facilities are avail able | |
133 | retu rn; | |
134 | } | |
135 | ||
136 | region = this.getR egion('sec tion'); | |
137 | view = l ength === 1 ? this.g etSingleIt emView() : this.getS ectionView (); | |
138 | ||
139 | region.s how(view); | |
140 | }, | |
141 | ||
142 | /* * | |
143 | * Gets the express ca re message . | |
144 | * @param {s tring} typ eOfCare | |
145 | * @param {B ackbone.Mo del} facil ity | |
146 | * @return { string} | |
147 | * / | |
148 | ge tExpressMe ssage: fun ction(type OfCare, fa cility) { | |
149 | if (type OfCare === EXPRESS_C ARE_ID && facility.i sExpressSu pportedTod ay()) { | |
150 | retu rn facilit y.getExpre ssMessage( ); | |
151 | } | |
152 | return ' '; | |
153 | }, | |
154 | ||
155 | /* * | |
156 | * Creates a custom Vi ew for whe n there is only one facility a vailable | |
157 | * @return { Marionette } | |
158 | * / | |
159 | ge tSingleIte mView: fun ction() { | |
160 | var mode l = this.c ollection. first(); | |
161 | var clas sName = mo del.get('s upportsVAR ') ? '' : 'static-te xt-disable d'; | |
162 | var type OfCare = t his.model. getCareId( ); | |
163 | ||
164 | this.mod el.set('fa cility', m odel); | |
165 | ||
166 | return n ew SingleI temView({ | |
167 | clas sName: cla ssName, | |
168 | mode l: model, | |
169 | form Model: thi s.model, | |
170 | expr essMessage : this.get ExpressMes sage(typeO fCare, mod el), | |
171 | }); | |
172 | }, | |
173 | ||
174 | /* * | |
175 | * Creates t he section view | |
176 | * @return { Marionette } | |
177 | * / | |
178 | ge tSectionVi ew: functi on() { | |
179 | return n ew Section View({ | |
180 | mode l: this.mo del, | |
181 | pati entEnrolle dFacilitie s: this.co llection, | |
182 | }); | |
183 | }, | |
184 | }); | |
185 | ||
186 | View.T ITLE = 'Lo cation'; | |
187 | View.S TEP_NUMBER = 2; | |
188 | ||
189 | return View; | |
190 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.