Produced by Araxis Merge on 9/27/2017 9:44:47 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 | adk\adk\product\production\demo_files\feature_forms | F568.js | Wed Jun 7 14:02:28 2017 UTC |
| 2 | adk\adk\product\production\demo_files\feature_forms | F568.js | Tue Sep 26 13:01:44 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 884 |
| 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 | 'backb one', | |
| 3 | 'mario nette', | |
| 4 | 'jquer y', | |
| 5 | 'handl ebars', | |
| 6 | ], functio n(Backbone , Marionet te, $, Han dlebars) { | |
| 7 | ||
| 8 | //==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ===== | |
| 9 | // PLE ASE DO NOT COPY AND PASTE THIS FULL FILE . PLEASE J UST USE AS A REFEREN CE AND COP Y PARTS TH AT ARE NEE DED | |
| 10 | // for more info rmation on how to la yout this form for y our applet please ch eckout the following link: | |
| 11 | // http:// IP /documenta tion/#/adk /conventio ns#Writeba ck | |
| 12 | //==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ===== | |
| 13 | ||
| 14 | var F5 68 = { | |
| 15 | // DO NOT US E CREATE F ORM FUNCTI ON --- THI S IS FOR D EMO PURPOS ES ONLY!!! | |
| 16 | cr eateForm: function() { | |
| 17 | // ***** ********** ********** ********** ********** ** FIELDS ********** ********** ********** ********** ********** * | |
| 18 | // Okay to copy an d paste | |
| 19 | var Outp atientMeds Checklist = { | |
| 20 | cont rol: 'togg leOptionsC hecklist', | |
| 21 | name : 'outpati entMedsChe cklist', | |
| 22 | labe l: 'Please indicate if the ord er is rela ted to the following treatment factors.< br />All O rders Exce pt Control led Substa nce Orders .', | |
| 23 | colu mnHeaders: [{ | |
| 24 | id: 'SC', | |
| 25 | label: 'SC ', | |
| 26 | title: 'Se rvice Conn ected' | |
| 27 | }, { | |
| 28 | id: 'CV', | |
| 29 | label: 'CV ', | |
| 30 | title: 'CV ' | |
| 31 | }, { | |
| 32 | id: 'AO', | |
| 33 | label: 'AO ', | |
| 34 | title: 'Ag ent Orange Exposure' | |
| 35 | }, { | |
| 36 | id: 'IR', | |
| 37 | label: 'IR ', | |
| 38 | title: 'Io nizing Rad iation Exp osure' | |
| 39 | }, { | |
| 40 | id: 'SWAC' , | |
| 41 | label: 'SW AC', | |
| 42 | title: 'So uthwest As ia Conditi ons' | |
| 43 | }, { | |
| 44 | id: 'SHD', | |
| 45 | label: 'SH D', | |
| 46 | title: 'Sh ipboard Ha zard and D efense' | |
| 47 | }, { | |
| 48 | id: 'MST', | |
| 49 | label: 'MS T', | |
| 50 | title: 'Mi litary Sex ual Truama ' | |
| 51 | }, { | |
| 52 | id: 'HNC', | |
| 53 | label: 'HN C', | |
| 54 | title: 'Hi ppopotomal Nordic Co nditions' | |
| 55 | }], | |
| 56 | sele ctedCountN ame: 'outp atientMeds ChecklistC ount' | |
| 57 | }; | |
| 58 | ||
| 59 | var Note sChecklist = { | |
| 60 | cont rol: "chec klist", | |
| 61 | labe l: "Notes" , | |
| 62 | name : "notesCh ecklist", | |
| 63 | extr aClasses: ["bordered -checklist "], | |
| 64 | sele ctedCountN ame: 'note sChecklist Count', | |
| 65 | hide CheckboxFo rSingleIte m: true, | |
| 66 | item Template: "<strong>{ {label}}</ strong>{{# if date}} - <span cl ass='date- taken'>{{d ate}}</spa n>{{/if}}{ {#if time} }<span cla ss='time-t aken'> {{t ime}}</spa n>{{/if}}" | |
| 67 | }; | |
| 68 | ||
| 69 | var Labs Checklist = { | |
| 70 | cont rol: "chec klist", | |
| 71 | labe l: "Labs", | |
| 72 | name : "labsChe cklist", | |
| 73 | extr aClasses: ["bordered -checklist "], | |
| 74 | sele ctedCountN ame: 'labs ChecklistC ount', | |
| 75 | hide CheckboxFo rSingleIte m: true, | |
| 76 | item Template: "<strong>{ {label}}{{ #if labNum ber}} #<sp an class=' lab-number '>{{labNum ber}}</spa n>{{/if}}< /strong>" | |
| 77 | }; | |
| 78 | ||
| 79 | var Conn ectionAndD isabilitie sInfo = { | |
| 80 | cont rol: "cont ainer", | |
| 81 | extr aClasses: ["col-xs-1 2"], | |
| 82 | mode lListeners : ["connec tionPercen t", "rated Disabiliti es"], | |
| 83 | temp late: Hand lebars.com pile('<h6> Service Co nnection & Rated Dis abilities< /h6><p>Ser vice Conne cted: {{co nnectionPe rcent}}%</ p><p>Rated Disabilit ies: {{rat edDisabili ties}}</p> '), | |
| 84 | }; | |
| 85 | ||
| 86 | var Tota lSelected = { | |
| 87 | cont rol: "cont ainer", | |
| 88 | extr aClasses: ["pull-lef t"], | |
| 89 | mode lListeners : ["outpat ientMedsCh ecklistCou nt", "note sChecklist Count", "l absCheckli stCount"], | |
| 90 | temp late: Hand lebars.com pile("<spa n>Total Se lected: {{ getSum out patientMed sChecklist Count note sChecklist Count labs ChecklistC ount}}</sp an>") | |
| 91 | }; | |
| 92 | ||
| 93 | var F568 Fields = [ { | |
| 94 | cont rol: "cont ainer", | |
| 95 | extr aClasses: ["modal-bo dy"], | |
| 96 | item s: [{ | |
| 97 | control: " container" , | |
| 98 | extraClass es: ["cont ainer-flui ds"], | |
| 99 | items: [{ | |
| 100 | contro l: "contai ner", | |
| 101 | extraC lasses: [" container- fluid"], | |
| 102 | items: [{ | |
| 103 | co ntrol: "co ntainer", | |
| 104 | ex traClasses : ["row"], | |
| 105 | it ems: [{ | |
| 106 | control: "containe r", | |
| 107 | extraCla sses: ["co l-xs-12"], | |
| 108 | template : Handleba rs.compile ('<h5 clas s="section -title fir st">Outpat ient Meds< /h5>'), | |
| 109 | items: [ Outpatient MedsCheckl ist] | |
| 110 | }] | |
| 111 | }, { | |
| 112 | co ntrol: "co ntainer", | |
| 113 | ex traClasses : ["row"], | |
| 114 | it ems: [{ | |
| 115 | control: "containe r", | |
| 116 | extraCla sses: ["co l-xs-12"], | |
| 117 | items: [ { | |
| 118 | cont rol: "spac er" | |
| 119 | }, Notes Checklist, { | |
| 120 | cont rol: "spac er" | |
| 121 | }, LabsC hecklist] | |
| 122 | }] | |
| 123 | }, { | |
| 124 | co ntrol: "co ntainer", | |
| 125 | ex traClasses : ["row"], | |
| 126 | it ems: [{ | |
| 127 | control: "spacer" | |
| 128 | }, Connectio nAndDisabi litiesInfo , { | |
| 129 | control: "spacer" | |
| 130 | }] | |
| 131 | }, { | |
| 132 | co ntrol: "co ntainer", | |
| 133 | ex traClasses : ["row"], | |
| 134 | it ems: [{ | |
| 135 | control: "containe r", | |
| 136 | extraCla sses: ["co l-xs-6"], | |
| 137 | items: [ { | |
| 138 | cont rol: "inpu t", | |
| 139 | labe l: "Enter Electronic Signature Code", | |
| 140 | name : "esignCo de", | |
| 141 | requ ired: true , | |
| 142 | titl e: "Please enter you r Electron ic Signatu re Code", | |
| 143 | type : "passwor d" | |
| 144 | }] | |
| 145 | }] | |
| 146 | }] | |
| 147 | }] | |
| 148 | }] | |
| 149 | }, { | |
| 150 | cont rol: "cont ainer", | |
| 151 | extr aClasses: ["modal-fo oter"], | |
| 152 | item s: [{ | |
| 153 | control: " container" , | |
| 154 | extraClass es: ["row" ], | |
| 155 | items: [{ | |
| 156 | contro l: "contai ner", | |
| 157 | extraC lasses: [" col-xs-6"] , | |
| 158 | items: [TotalSel ected] | |
| 159 | }, { | |
| 160 | contro l: "contai ner", | |
| 161 | extraC lasses: [" col-xs-6"] , | |
| 162 | items: [{ | |
| 163 | co ntrol: "bu tton", | |
| 164 | ex traClasses : ["btn-de fault", "b tn-sm"], | |
| 165 | la bel: "Canc el", | |
| 166 | na me: "cance l", | |
| 167 | ti tle: "Pres s enter to cancel.", | |
| 168 | ty pe: "butto n" | |
| 169 | }, { | |
| 170 | co ntrol: "bu tton", | |
| 171 | // disabled: "true", | |
| 172 | ex traClasses : ["btn-pr imary", "b tn-sm"], | |
| 173 | la bel: "Sign ", | |
| 174 | na me: 'sign' , | |
| 175 | ti tle: "Pres s enter to sign note ", | |
| 176 | ty pe: "submi t" | |
| 177 | }] | |
| 178 | }] | |
| 179 | }] | |
| 180 | }]; | |
| 181 | // ***** ********** ********** ********** ********** ** END OF FIELDS *** ********** ********** ********** ********** * | |
| 182 | ||
| 183 | // ***** ********** ********** ********** ********** ** MODEL * ********** ********** ********** ********** ********** * | |
| 184 | // Okay to copy an d paste - Please Add additiona l items to prepopula te the fie lds | |
| 185 | var Form Model = Ba ckbone.Mod el.extend( { | |
| 186 | defa ults: { | |
| 187 | name: "", | |
| 188 | esigToggle OptionsChe cklist: "" , | |
| 189 | esignCode: "", | |
| 190 | connection Percent: " 10", | |
| 191 | ratedDisab ilities: " None State d", | |
| 192 | outpatient MedsCheckl ist: new B ackbone.Co llection([ { | |
| 193 | id: 'r ow01', | |
| 194 | label: 'Sodium C hloride Ta b 1gm Take two table ts by mout h 5XD Quan tity: 300 Refill: 0 ', | |
| 195 | value: true, | |
| 196 | column Collection : [{ | |
| 197 | na me: 'SC', | |
| 198 | va lue: null | |
| 199 | }, { | |
| 200 | na me: 'CV', | |
| 201 | va lue: null | |
| 202 | }, { | |
| 203 | na me: 'AO', | |
| 204 | va lue: null | |
| 205 | }, { | |
| 206 | na me: 'IR', | |
| 207 | va lue: null | |
| 208 | }, { | |
| 209 | na me: 'SWAC' , | |
| 210 | va lue: null | |
| 211 | }, { | |
| 212 | na me: 'SHD', | |
| 213 | va lue: null | |
| 214 | }, { | |
| 215 | na me: 'MST', | |
| 216 | va lue: null | |
| 217 | }, { | |
| 218 | na me: 'HNC', | |
| 219 | va lue: null | |
| 220 | }], | |
| 221 | }, { | |
| 222 | id: 'r ow02', | |
| 223 | label: 'Heparin Sodium 100 U/ML, Solu tion, Inje ction for Blood Thin ning Refil l: 0', | |
| 224 | value: false, | |
| 225 | column Collection : [{ | |
| 226 | na me: 'SC', | |
| 227 | va lue: null | |
| 228 | }, { | |
| 229 | na me: 'CV', | |
| 230 | va lue: null | |
| 231 | }, { | |
| 232 | na me: 'AO', | |
| 233 | va lue: null | |
| 234 | }, { | |
| 235 | na me: 'IR', | |
| 236 | va lue: null | |
| 237 | }, { | |
| 238 | na me: 'SWAC' , | |
| 239 | va lue: null | |
| 240 | }, { | |
| 241 | na me: 'SHD', | |
| 242 | va lue: null | |
| 243 | }, { | |
| 244 | na me: 'MST', | |
| 245 | va lue: null | |
| 246 | }, { | |
| 247 | na me: 'HNC', | |
| 248 | va lue: null | |
| 249 | }], | |
| 250 | }, { | |
| 251 | id: 'r ow03', | |
| 252 | label: 'Hydralaz ine Hydroc hloride 20 mg/ML, Sol ution, Inj ection Ref ill: 0', | |
| 253 | value: undefined , | |
| 254 | column Collection : [{ | |
| 255 | na me: 'SC', | |
| 256 | va lue: null | |
| 257 | }, { | |
| 258 | na me: 'CV', | |
| 259 | va lue: null | |
| 260 | }, { | |
| 261 | na me: 'AO', | |
| 262 | va lue: null | |
| 263 | }, { | |
| 264 | na me: 'IR', | |
| 265 | va lue: null | |
| 266 | }, { | |
| 267 | na me: 'SWAC' , | |
| 268 | va lue: null | |
| 269 | }, { | |
| 270 | na me: 'SHD', | |
| 271 | va lue: null | |
| 272 | }, { | |
| 273 | na me: 'MST', | |
| 274 | va lue: null | |
| 275 | }, { | |
| 276 | na me: 'HNC', | |
| 277 | va lue: null | |
| 278 | }], | |
| 279 | }]), | |
| 280 | notesCheck list: new Backbone.C ollection( [{ | |
| 281 | name: 'note_001' , | |
| 282 | label: 'First No te Title', | |
| 283 | value: true, | |
| 284 | time: "08:30", | |
| 285 | date: "09/28/201 5" | |
| 286 | }, { | |
| 287 | name: 'note_002' , | |
| 288 | label: 'Second N ote Title' , | |
| 289 | value: false, | |
| 290 | time: "10:30", | |
| 291 | date: "09/27/201 5" | |
| 292 | }, { | |
| 293 | name: 'note_003' , | |
| 294 | label: 'Third No te Title', | |
| 295 | value: undefined , | |
| 296 | time: "03:30", | |
| 297 | date: "09/09/201 5" | |
| 298 | }]), | |
| 299 | labsCheckl ist: new B ackbone.Co llection([ { | |
| 300 | name: 'lab_15006 ', | |
| 301 | label: 'Potassiu m Blood Se rum WC LB' , | |
| 302 | value: undefined , | |
| 303 | labNum ber: '1500 6' | |
| 304 | }, { | |
| 305 | name: 'lab_12001 ', | |
| 306 | label: 'Potassiu m Blood Se rum WC LB' , | |
| 307 | value: false, | |
| 308 | labNum ber: '1200 1' | |
| 309 | }, { | |
| 310 | name: 'lab_16040 ', | |
| 311 | label: 'Potassiu m Blood Se rum WC LB' , | |
| 312 | value: true, | |
| 313 | labNum ber: '1604 0' | |
| 314 | }]) | |
| 315 | }, | |
| 316 | vali date: func tion(attri butes, opt ions) { | |
| 317 | this.error Model.clea r(); | |
| 318 | if (attrib utes.outpa tientMedsC hecklist = == "") { | |
| 319 | this.e rrorModel. set({ | |
| 320 | ou tpatientMe dsChecklis t: "Please complete the treatm ent factor s form." | |
| 321 | }); | |
| 322 | } | |
| 323 | if (attrib utes.esign Code.repla ce(/\s+/g, '') === " ") { | |
| 324 | this.e rrorModel. set({ | |
| 325 | es ignCode: " Please ent er a valid signature " | |
| 326 | }); | |
| 327 | } | |
| 328 | if (!_.isE mpty(this. errorModel .toJSON()) ) { | |
| 329 | return "Validati on errors. Please fi x."; | |
| 330 | } | |
| 331 | } | |
| 332 | }); | |
| 333 | // ***** ********** ********** ********** ********** ** END OF MODEL **** ********** ********** ********** ********** * | |
| 334 | ||
| 335 | // ***** ********** ********** ********** ********** ** VIEWS * ********** ********** ********** ********** ***** | |
| 336 | ||
| 337 | var Dele teMessageV iew = Back bone.Mario nette.Item View.exten d({ | |
| 338 | temp late: Hand lebars.com pile('You will lose all work i n progress if you ca ncel this signature process. W ould you l ike to pro ceed?'), | |
| 339 | tagN ame: 'p' | |
| 340 | }); | |
| 341 | ||
| 342 | var Foot erView = B ackbone.Ma rionette.I temView.ex tend({ | |
| 343 | tagN ame: 'span ', | |
| 344 | ui: { | |
| 345 | 'ContinueB utton': '# alert-cont inue-btn', | |
| 346 | 'CancelBut ton': '#al ert-cancel -btn' | |
| 347 | }, | |
| 348 | temp late: Hand lebars.com pile('{{ui -button "C ancel" id= "alert-can cel-btn" c lasses="bt n-default btn-sm" ti tle="Press enter to cancel"}}{ {ui-button "Continue " id="aler t-continue -btn" clas ses="btn-p rimary btn -sm" title ="Press en ter to con tinue"}}') , | |
| 349 | even ts: { | |
| 350 | 'click @ui .ContinueB utton': fu nction() { | |
| 351 | ADK.UI .Alert.hid e(); | |
| 352 | ADK.UI .Workflow. hide(); | |
| 353 | }, | |
| 354 | 'click @ui .CancelBut ton': func tion() { | |
| 355 | ADK.UI .Alert.hid e(); | |
| 356 | } | |
| 357 | } | |
| 358 | }); | |
| 359 | ||
| 360 | ||
| 361 | var form View = ADK .UI.Form.e xtend({ | |
| 362 | ui: { | |
| 363 | "FormCance lBtn": ".b utton-cont rol.cancel button", | |
| 364 | "esignCode ": ".esign Code" | |
| 365 | }, | |
| 366 | fiel ds: F568Fi elds, | |
| 367 | even ts: { | |
| 368 | "click @ui .FormCance lBtn": fun ction(e) { | |
| 369 | e.prev entDefault (); | |
| 370 | var de leteAlertV iew = new ADK.UI.Ale rt({ | |
| 371 | ti tle: 'Are you sure y ou want to cancel?', | |
| 372 | ic on: 'icon- cancel', | |
| 373 | me ssageView: DeleteMes sageView, | |
| 374 | fo oterView: FooterView | |
| 375 | }); | |
| 376 | delete AlertView. show(); | |
| 377 | }, | |
| 378 | "submit": function(e ) { | |
| 379 | e.prev entDefault (); | |
| 380 | if (th is.model.i sValid()) { | |
| 381 | th is.model.u nset("form Status"); | |
| 382 | va r saveAler tView = ne w ADK.UI.N otificatio n({ | |
| 383 | title: ' Signature Submitted' , | |
| 384 | icon: 'f a-check', | |
| 385 | message: 'Signatur e successf ully submi tted with no errors. ', | |
| 386 | type: "s uccess" | |
| 387 | ||
| 388 | }) ; | |
| 389 | sa veAlertVie w.show(); | |
| 390 | AD K.UI.Workf low.hide() ; | |
| 391 | } | |
| 392 | return false; | |
| 393 | } | |
| 394 | }, | |
| 395 | areA nyChecked: function( model){ | |
| 396 | var outpat ientMedsCh ecklistCou nt = model .get('outp atientMeds ChecklistC ount'); | |
| 397 | var notesC hecklistCo unt = mode l.get('not esChecklis tCount'); | |
| 398 | var labsCh ecklistCou nt = model .get('labs ChecklistC ount'); | |
| 399 | var totalC hecklistCo unt = outp atientMeds ChecklistC ount + not esChecklis tCount + l absCheckli stCount; | |
| 400 | ||
| 401 | if(totalCh ecklistCou nt <= 0) { | |
| 402 | this.u i.esignCod e.trigger( 'control:d isabled', true); | |
| 403 | } else { | |
| 404 | this.u i.esignCod e.trigger( 'control:d isabled', false); | |
| 405 | } | |
| 406 | }, | |
| 407 | mode lEvents: { | |
| 408 | "change:ou tpatientMe dsChecklis tCount": f unction(mo del) { | |
| 409 | this.a reAnyCheck ed(model); | |
| 410 | }, | |
| 411 | "change:no tesCheckli stCount": function(m odel) { | |
| 412 | this.a reAnyCheck ed(model); | |
| 413 | }, | |
| 414 | "change:la bsChecklis tCount": f unction(mo del) { | |
| 415 | this.a reAnyCheck ed(model); | |
| 416 | } | |
| 417 | } | |
| 418 | }); | |
| 419 | // ***** ********** ********** ********** ********** ** END OF FORM VIEW ********** ********** ********** ********** * | |
| 420 | ||
| 421 | // ***** ********** ********** ********** ********** ** MODEL A ND WORKFLO W INSTANCE ********* ********** ********** * | |
| 422 | // Okay to copy an d paste | |
| 423 | var form Model = ne w FormMode l(); | |
| 424 | ||
| 425 | var work flowOption s = { | |
| 426 | size : "medium" , | |
| 427 | titl e: "Sign", | |
| 428 | show Progress: false, | |
| 429 | keyb oard: fals e, | |
| 430 | head erOptions: {}, | |
| 431 | step s: [{ | |
| 432 | view: form View, | |
| 433 | viewModel: formModel , | |
| 434 | stepTitle: "E-Signat ure" | |
| 435 | }] | |
| 436 | }; | |
| 437 | var work flow = new ADK.UI.Wo rkflow(wor kflowOptio ns); | |
| 438 | workflow .show(); | |
| 439 | // ***** ********** ********** ********** ********** ** END OF MODEL AND WORKFLOW I NSTANCE ** ********** ********** * | |
| 440 | } | |
| 441 | }; | |
| 442 | return F568; | |
| 443 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.