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 | F170.js | Wed Jun 7 14:02:28 2017 UTC |
| 2 | adk\adk\product\production\demo_files\feature_forms | F170.js | Tue Sep 26 13:01:38 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 680 |
| 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 F1 70 = { | |
| 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 vita lsChecklis tCollectio n = { | |
| 20 | cont rol: 'chec klist', | |
| 21 | name : 'listOfV itals', | |
| 22 | labe l: 'Vital' , | |
| 23 | titl e: 'Press tab to vie w options for the ch eckboxes', | |
| 24 | item Template: "<strong>{ {label}}</ strong>{{# if itemEIE Value}}<sp an>{{itemE IEValue}}< /span>{{/i f}}", | |
| 25 | extr aClasses: ["split-ch ecklist bo ttom-margi n-no all-p adding-no" ], | |
| 26 | attr ibuteMappi ng: { | |
| 27 | unique: 'i temName', | |
| 28 | value: 'it emValue', | |
| 29 | eIEValue: 'itemEIEVa lue', | |
| 30 | label: 'it emLabel' | |
| 31 | }, | |
| 32 | sele ctedCountN ame: "chec klistCount ", | |
| 33 | srOn lyLabel: t rue | |
| 34 | }; | |
| 35 | ||
| 36 | var vita lsChecklis tRegion = { | |
| 37 | cont rol: "cont ainer", | |
| 38 | extr aClasses: "div", | |
| 39 | item s: [{ | |
| 40 | control: " container" , | |
| 41 | extraClass es: ["col- xs-12"], | |
| 42 | items: [{ | |
| 43 | contro l: "button ", | |
| 44 | extraC lasses: [" btn-defaul t btn-sm"] , | |
| 45 | label: "Check Al l", | |
| 46 | name: "checkAll" , | |
| 47 | title: "Press en ter to sel ect all vi tals", | |
| 48 | type: "button" | |
| 49 | }] | |
| 50 | }, { | |
| 51 | control: " container" , | |
| 52 | extraClass es: "col-x s-12", | |
| 53 | template: Handlebars .compile([ | |
| 54 | '<hr c lass="bott om-margin- xs top-mar gin-xs" ar ia-hidden= "true">', | |
| 55 | '<p cl ass="flex- display le ft-margin- lg bottom- margin-no" ><strong a ria-hidden =true clas s="flex-wi dth-1 left -padding-x s">Name</s trong><str ong aria-h idden=true class="fl ex-width-1 ">Result</ strong></p >', | |
| 56 | '<hr c lass="bott om-margin- xs top-mar gin-xs" ar ia-hidden= "true">' | |
| 57 | ].join("\n ")), | |
| 58 | }, { | |
| 59 | control: " container" , | |
| 60 | extraClass es: "col-x s-12", | |
| 61 | items: [vi talsCheckl istCollect ion] | |
| 62 | }] | |
| 63 | }; | |
| 64 | ||
| 65 | var vita lsNoteRegi on = { | |
| 66 | cont rol: "cont ainer", | |
| 67 | extr aClasses: "bottom-ma rgin-no", | |
| 68 | tagN ame: "p", | |
| 69 | temp late: Hand lebars.com pile('NOTE : To mark CLIO recor ds as "Ent er in Erro r" use the Flowsheet applicati on.') | |
| 70 | }; | |
| 71 | ||
| 72 | var vita lsRadioCol lection = { | |
| 73 | cont rol: "radi o", | |
| 74 | labe l: "Reason ", | |
| 75 | name : "eieReas on", | |
| 76 | disa bled: true , | |
| 77 | requ ired: true , | |
| 78 | extr aClasses: ["radio-co l-2 all-pa dding-no"] , | |
| 79 | opti ons: [{ | |
| 80 | label: "In correct da te/time", | |
| 81 | value: "op t1", | |
| 82 | title: "Pr ess enter to select and then p ress the u p or down arrows to view optio ns" | |
| 83 | }, { | |
| 84 | label: "In correct pa tient", | |
| 85 | value: "op t2", | |
| 86 | title: "Pr ess enter to select and then p ress the u p or down arrows to view optio ns" | |
| 87 | }, { | |
| 88 | label: "In correct re ading", | |
| 89 | value: "op t3", | |
| 90 | title: "Pr ess enter to select and then p ress the u p or down arrows to view optio ns" | |
| 91 | }, { | |
| 92 | label: "In valid reco rd", | |
| 93 | value: "op t4", | |
| 94 | title: "Pr ess enter to select and then p ress the u p or down arrows to view optio ns" | |
| 95 | }] | |
| 96 | }; | |
| 97 | ||
| 98 | var conn ectionAndD isabilitie sInfo = { | |
| 99 | cont rol: "cont ainer", | |
| 100 | extr aClasses: ["col-xs-1 2"], | |
| 101 | mode lListeners : ["connec tionPercen t", "rated Disabiliti es"], | |
| 102 | temp late: Hand lebars.com pile('<h6> Service Co nnection & amp; Rated Disabilit ies</h6><p >Service C onnected: {{connecti onPercent} }%</p><p>R ated Disab ilities: { {ratedDisa bilities}} </p>'), | |
| 103 | }; | |
| 104 | ||
| 105 | var F170 Fields = [ { | |
| 106 | cont rol: "cont ainer", | |
| 107 | extr aClasses: ["modal-bo dy"], | |
| 108 | item s: [{ | |
| 109 | control: " container" , | |
| 110 | extraClass es: ["cont ainer-flui d"], | |
| 111 | items: [{ | |
| 112 | contro l: "contai ner", | |
| 113 | extraC lasses: "r ow", | |
| 114 | items: [vitalsCh ecklistReg ion] | |
| 115 | }, { | |
| 116 | contro l: "contai ner", | |
| 117 | extraC lasses: "r ow", | |
| 118 | items: [{ | |
| 119 | co ntrol: "co ntainer", | |
| 120 | ex traClasses : "col-xs- 12", | |
| 121 | it ems: [{ | |
| 122 | control: 'spacer' | |
| 123 | }, vitalsNot eRegion, { | |
| 124 | control: 'spacer' | |
| 125 | }] | |
| 126 | }] | |
| 127 | }, { | |
| 128 | contro l: "contai ner", | |
| 129 | extraC lasses: "r ow", | |
| 130 | items: [{ | |
| 131 | co ntrol: "co ntainer", | |
| 132 | ex traClasses : "col-xs- 12", | |
| 133 | it ems: [vita lsRadioCol lection] | |
| 134 | }] | |
| 135 | }] | |
| 136 | }] | |
| 137 | }, { | |
| 138 | cont rol: "cont ainer", | |
| 139 | extr aClasses: ["modal-fo oter"], | |
| 140 | item s: [{ | |
| 141 | control: " container" , | |
| 142 | extraClass es: ["col- xs-12"], | |
| 143 | items: [{ | |
| 144 | contro l: "contai ner", | |
| 145 | extraC lasses: [" row"], | |
| 146 | items: [{ | |
| 147 | co ntrol: "bu tton", | |
| 148 | ex traClasses : ["btn-de fault btn- sm"], | |
| 149 | la bel: "Canc el", | |
| 150 | na me: "cance l", | |
| 151 | ti tle: "Pres s enter to cancel.", | |
| 152 | ty pe: "butto n" | |
| 153 | }, { | |
| 154 | co ntrol: "bu tton", | |
| 155 | ex traClasses : ["btn-pr imary btn- sm"], | |
| 156 | la bel: "Ente red in err or", | |
| 157 | na me: 'enter InError', | |
| 158 | ti tle: "Pres s enter to submit." | |
| 159 | }] | |
| 160 | }] | |
| 161 | }] | |
| 162 | }]; | |
| 163 | // ***** ********** ********** ********** ********** ** END OF FIELDS *** ********** ********** ********** ********** * | |
| 164 | ||
| 165 | // ***** ********** ********** ********** ********** ** MODEL * ********** ********** ********** ********** ********** * | |
| 166 | // Okay to copy an d paste - Please Add additiona l items to prepopula te the fie lds | |
| 167 | var Form Model = Ba ckbone.Mod el.extend( { | |
| 168 | defa ults: { | |
| 169 | 'listOfVit als': new Backbone.C ollection( [{ | |
| 170 | itemNa me: 'item1 ', | |
| 171 | itemVa lue: false , | |
| 172 | itemLa bel: 'Bloo d Pressure ', | |
| 173 | itemEI EValue: '1 43/73 mmHG ', | |
| 174 | title: 'Press ta b to view options fo r the chec kboxes' | |
| 175 | }, { | |
| 176 | itemNa me: 'item2 ', | |
| 177 | itemVa lue: false , | |
| 178 | itemLa bel: 'Temp erature', | |
| 179 | itemEI EValue: '9 8.7 F (73. 1 C)' | |
| 180 | }, { | |
| 181 | itemNa me: 'item3 ', | |
| 182 | itemVa lue: false , | |
| 183 | itemLa bel: 'Puls e', | |
| 184 | itemEI EValue: '6 7 /min' | |
| 185 | }, { | |
| 186 | itemNa me: 'item4 ', | |
| 187 | itemVa lue: false , | |
| 188 | itemLa bel: 'Resp iration', | |
| 189 | itemEI EValue: '1 0 /min' | |
| 190 | }, { | |
| 191 | itemNa me: 'item5 ', | |
| 192 | itemVa lue: false , | |
| 193 | itemLa bel: 'Puls e Oximetry ', | |
| 194 | itemEI EValue: '9 2 %' | |
| 195 | }, { | |
| 196 | itemNa me: 'item6 ', | |
| 197 | itemVa lue: false , | |
| 198 | itemLa bel: 'Heig ht', | |
| 199 | itemEI EValue: '6 8 in (172. 72 cm)' | |
| 200 | }, { | |
| 201 | itemNa me: 'item7 ', | |
| 202 | itemVa lue: false , | |
| 203 | itemLa bel: 'Weig ht', | |
| 204 | itemEI EValue: '1 67 Ib (75. 91 kg)' | |
| 205 | }, { | |
| 206 | itemNa me: 'item8 ', | |
| 207 | itemVa lue: false , | |
| 208 | itemLa bel: 'Pain ', | |
| 209 | itemEI EValue: '0 ' | |
| 210 | }, { | |
| 211 | itemNa me: 'item9 ', | |
| 212 | itemVa lue: false , | |
| 213 | itemLa bel: 'Circ umference/ Girth', | |
| 214 | itemEI EValue: 'U navailable ' | |
| 215 | }]) | |
| 216 | } | |
| 217 | }); | |
| 218 | // ***** ********** ********** ********** ********** ** END OF MODEL **** ********** ********** ********** ********** * | |
| 219 | ||
| 220 | // ***** ********** ********** ********** ********** ** VIEWS * ********** ********** ********** ********** ***** | |
| 221 | ||
| 222 | var Dele teMessageV iew = Back bone.Mario nette.Item View.exten d({ | |
| 223 | temp late: Hand lebars.com pile('You will lose all work i n progress if you de lete this task. Woul d you like to procee d?'), | |
| 224 | tagN ame: 'p' | |
| 225 | }); | |
| 226 | ||
| 227 | var Foot erView = B ackbone.Ma rionette.I temView.ex tend({ | |
| 228 | 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-butto n "Continu e" id="ale rt-continu e-btn" cla sses="btn- primary bt n-sm" titl e="Press e nter to Co ntinue!"}} '), | |
| 229 | even ts: { | |
| 230 | 'click #al ert-contin ue-btn': f unction() { | |
| 231 | ADK.UI .Alert.hid e(); | |
| 232 | ADK.UI .Workflow. hide(); | |
| 233 | }, | |
| 234 | 'click #al ert-cancel -btn': fun ction() { | |
| 235 | ADK.UI .Alert.hid e(); | |
| 236 | } | |
| 237 | }, | |
| 238 | tagN ame: 'span ' | |
| 239 | }); | |
| 240 | ||
| 241 | var form View = ADK .UI.Form.e xtend({ | |
| 242 | ui: { | |
| 243 | "checkAllB tn": ".but ton-contro l.checkAll button", | |
| 244 | "checkAllC ontrol": " .button-co ntrol.chec kAll", | |
| 245 | "formSignB tn": ".but ton-contro l.sign", | |
| 246 | "formCance lBtn": ".b utton-cont rol.cancel button", | |
| 247 | "eieReason ": ".eieRe ason", | |
| 248 | "vitalsChe cklist": " .listOfVit als" | |
| 249 | }, | |
| 250 | fiel ds: F170Fi elds, | |
| 251 | hasB eenClicked : false, | |
| 252 | even ts: { | |
| 253 | "click @ui .checkAllB tn": funct ion(e) { | |
| 254 | e.prev entDefault (); | |
| 255 | // con ditional t o toggle c heck all b utton | |
| 256 | var bt nText; | |
| 257 | var bt nTitle; | |
| 258 | if (!t his.hasBee nClicked) { | |
| 259 | th is.hasBeen Clicked = !this.hasB eenClicked ; | |
| 260 | bt nText = "D eselect Al l"; | |
| 261 | bt nTitle = " Press ente r to desel ect all vi tals."; | |
| 262 | } else { | |
| 263 | th is.hasBeen Clicked = !this.hasB eenClicked ; | |
| 264 | bt nText = "C heck All"; | |
| 265 | bt nTitle = " Press ente r to selec t all vita ls."; | |
| 266 | } | |
| 267 | ||
| 268 | this.u i.vitalsCh ecklist.tr igger('con trol:item: value', { | |
| 269 | bo oleanValue : this.has BeenClicke d | |
| 270 | }); | |
| 271 | this.u i.checkAll Control.tr igger('con trol:label ', btnText ); | |
| 272 | this.u i.checkAll Control.tr igger('con trol:title ', btnTitl e); | |
| 273 | this.u i.checkAll Control.fi nd('button ').focus() ; | |
| 274 | }, | |
| 275 | "click @ui .formCance lBtn": fun ction(e) { | |
| 276 | e.prev entDefault (); | |
| 277 | var de leteAlertV iew = new ADK.UI.Ale rt({ | |
| 278 | ti tle: 'Are you sure y ou want to cancel?', | |
| 279 | ic on: 'icon- warning', | |
| 280 | me ssageView: DeleteMes sageView, | |
| 281 | fo oterView: FooterView | |
| 282 | }); | |
| 283 | delete AlertView. show(); | |
| 284 | }, | |
| 285 | "submit": function(e ) { | |
| 286 | e.prev entDefault (); | |
| 287 | if (!t his.model. isValid()) { | |
| 288 | th is.model.s et("formSt atus", { | |
| 289 | status: "error", | |
| 290 | message: self.mode l.validati onError | |
| 291 | }) ; | |
| 292 | } else { | |
| 293 | th is.model.u nset("form Status"); | |
| 294 | va r saveAler tView = ne w ADK.UI.N otificatio n({ | |
| 295 | title: ' Vitals ent ered in er ror Submit ted', | |
| 296 | icon: 'f a-check', | |
| 297 | message: 'Vitals e ntered in error item s submitte d with no errors.', | |
| 298 | type: "s uccess" | |
| 299 | ||
| 300 | }) ; | |
| 301 | sa veAlertVie w.show(); | |
| 302 | AD K.UI.Workf low.hide() ; | |
| 303 | } | |
| 304 | return false; | |
| 305 | } | |
| 306 | }, | |
| 307 | mode lEvents: { | |
| 308 | "change:ch ecklistCou nt": funct ion(model) { | |
| 309 | if (mo del.get('c hecklistCo unt') === 0) { | |
| 310 | th is.model.u nset('eieR eason'); | |
| 311 | th is.ui.eieR eason.trig ger('contr ol:disable d', true); | |
| 312 | } else { | |
| 313 | th is.ui.eieR eason.trig ger('contr ol:disable d', false) ; | |
| 314 | } | |
| 315 | } | |
| 316 | } | |
| 317 | }); | |
| 318 | // ***** ********** ********** ********** ********** ** END OF FORM VIEW ********** ********** ********** ********** * | |
| 319 | ||
| 320 | // ***** ********** ********** ********** ********** ** MODEL A ND WORKFLO W INSTANCE ********* ********** ********** * | |
| 321 | // Okay to copy an d paste | |
| 322 | var form Model = ne w FormMode l(); | |
| 323 | ||
| 324 | var work flowOption s = { | |
| 325 | size : "small", | |
| 326 | titl e: "Vitals - Entered In Error 04/11/2015 - 03:30", | |
| 327 | show Progress: false, | |
| 328 | keyb oard: true , | |
| 329 | head erOptions: {}, | |
| 330 | step s: [{ | |
| 331 | view: form View, | |
| 332 | viewModel: formModel | |
| 333 | }] | |
| 334 | }; | |
| 335 | var work flow = new ADK.UI.Wo rkflow(wor kflowOptio ns); | |
| 336 | workflow .show(); | |
| 337 | // ***** ********** ********** ********** ********** ** END OF MODEL AND WORKFLOW I NSTANCE ** ********** ********** * | |
| 338 | } | |
| 339 | }; | |
| 340 | return F170; | |
| 341 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.