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 | F457.js | Wed Jun 7 14:02:28 2017 UTC |
| 2 | adk\adk\product\production\demo_files\feature_forms | F457.js | Tue Sep 26 13:01:43 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 524 |
| Changed | 2 | 4 |
| 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 F4 57 = { | |
| 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 F457 Fields = [ { | |
| 20 | cont rol: "cont ainer", | |
| 21 | extr aClasses: ["modal-bo dy"], | |
| 22 | item s: [{ | |
| 23 | control: " container" , | |
| 24 | extraClass es: ["cont ainer-flui d"], | |
| 25 | items: [{ | |
| 26 | contro l: "contai ner", | |
| 27 | extraC lasses: [" row", "top -padding-l g"], | |
| 28 | items: [{ | |
| 29 | co ntrol: "co ntainer", | |
| 30 | ex traClasses : ["col-xs -2"], | |
| 31 | it ems: [{ | |
| 32 | control: "containe r", | |
| 33 | title: " Image of t he user", | |
| 34 | template : '<img sr c="{{userI mage}}" al t="image o f user" /> ' | |
| 35 | }] | |
| 36 | }, { | |
| 37 | co ntrol: "co ntainer", | |
| 38 | ex traClasses : ["col-xs -10", "lef t-padding- xs"], | |
| 39 | it ems: [{ | |
| 40 | control: "containe r", | |
| 41 | extraCla sses: ["co l-xs-12", "left-padd ing-no"], | |
| 42 | template : '<h2 cla ss="no-pad ding top-m argin-none bold uppe rcase">{{f irstName}} {{lastNam e}}</h2>' | |
| 43 | }] | |
| 44 | }] | |
| 45 | }, { | |
| 46 | contro l: "contai ner", | |
| 47 | extraC lasses: [" row"], | |
| 48 | items: [{ | |
| 49 | co ntrol: "co ntainer", | |
| 50 | ex traClasses : ["col-xs -12", "bot tom-paddin g-sm"], | |
| 51 | it ems: [{ | |
| 52 | control: "containe r", | |
| 53 | template : '<p clas s="border- bottom bol d top-padd ing-lg bot tom-paddin g-no">User Informati on</p>', | |
| 54 | }, { | |
| 55 | control: "spacer", | |
| 56 | }] | |
| 57 | }] | |
| 58 | }, { | |
| 59 | contro l: "contai ner", | |
| 60 | extraC lasses: [" row"], | |
| 61 | items: [{ | |
| 62 | co ntrol: "co ntainer", | |
| 63 | ex traClasses : ["col-xs -6", "bott om-margin- sm"], | |
| 64 | it ems: [{ | |
| 65 | control: "containe r", | |
| 66 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 67 | template : 'First N ame' | |
| 68 | }, { | |
| 69 | control: "containe r", | |
| 70 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 71 | template : '{{first Name}}' | |
| 72 | }, { | |
| 73 | control: "containe r", | |
| 74 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 75 | template : 'Last Na me' | |
| 76 | }, { | |
| 77 | control: "containe r", | |
| 78 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 79 | template : '{{lastN ame}}' | |
| 80 | }, { | |
| 81 | control: "containe r", | |
| 82 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 83 | template : 'Role' | |
| 84 | }, { | |
| 85 | control: "containe r", | |
| 86 | extraCla sses: ["co l-xs-5", " bottom-pad ding-xs"], | |
| 87 | template : '{{role} }' | |
| 88 | }, { | |
| 89 | control: 'popover' , | |
| 90 | srOnlyLa bel: true, | |
| 91 | label: " Press ente r to edit role", | |
| 92 | name: "a dd-visit-m odifiers-p opover", | |
| 93 | title: " Select Rol es", | |
| 94 | icon: "f a-pencil", | |
| 95 | extraCla sses: ["co l-xs-1", " bottom-pad ding-xs", "btn-icon" , "pull-ri ght", "all -padding-n o"], | |
| 96 | options: { | |
| 97 | plac ement: 'to p' | |
| 98 | }, | |
| 99 | items: [ { | |
| 100 | cont rol: "cont ainer", | |
| 101 | extr aClasses: ["row", "s ection-add -modifiers "], | |
| 102 | item s: [{ | |
| 103 | control: " container" , | |
| 104 | extraClass es: ["col- xs-12"], | |
| 105 | items: [{ | |
| 106 | contro l: "contai ner", | |
| 107 | templa te:"<p>Ref er to F662 for the m ultiselect side by s ide that w ill appear in this p opover</p> " | |
| 108 | }] | |
| 109 | }, { | |
| 110 | control: " container" , | |
| 111 | extraClass es: ["col- xs-12", "t ext-right" ], | |
| 112 | items: [{ | |
| 113 | contro l: "button ", | |
| 114 | type: "button", | |
| 115 | label: "Done", | |
| 116 | extraC lasses: [" btn-primar y", "btn-s m"], | |
| 117 | title: "Press en ter to clo se.", | |
| 118 | id: "a dd-visit-m odifiers-c lose-btn" | |
| 119 | }] | |
| 120 | }] | |
| 121 | }] | |
| 122 | }, { | |
| 123 | control: "containe r", | |
| 124 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 125 | template : 'Facilit y' | |
| 126 | }, { | |
| 127 | control: "containe r", | |
| 128 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 129 | template : '{{facil ity}}' | |
| 130 | }, { | |
| 131 | control: "containe r", | |
| 132 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 133 | template : 'Phone 1 ' | |
| 134 | }, { | |
| 135 | control: "containe r", | |
| 136 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 137 | template : '{{phone 1}}' | |
| 138 | }, { | |
| 139 | control: "containe r", | |
| 140 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 141 | template : 'Phone 2 ' | |
| 142 | }, { | |
| 143 | control: "containe r", | |
| 144 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 145 | template : '{{phone 2}}' | |
| 146 | }, { | |
| 147 | control: "containe r", | |
| 148 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 149 | template : 'Email A ddress' | |
| 150 | }, { | |
| 151 | control: "containe r", | |
| 152 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 153 | template : '<a href ="mailto:{ {email1}}" >{{email1} }</a>' | |
| 154 | }, { | |
| 155 | control: "containe r", | |
| 156 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 157 | template : 'Email A ddress 2' | |
| 158 | }, { | |
| 159 | control: "containe r", | |
| 160 | extraCla sses: ["co l-xs-6", " bottom-pad ding-xs"], | |
| 161 | template : '<a href ="mailto:{ {email2}}" >{{email2} }</a>' | |
| 162 | }] | |
| 163 | }] | |
| 164 | }] | |
| 165 | }] | |
| 166 | }]; | |
| 167 | // ***** ********** ********** ********** ********** ** END OF FIELDS *** ********** ********** ********** ********** * | |
| 168 | ||
| 169 | // ***** ********** ********** ********** ********** ** MODEL * ********** ********** ********** ********** ********** * | |
| 170 | // Okay to copy an d paste - Please Add additiona l items to prepopula te the fie lds | |
| 171 | var Form Model = Ba ckbone.Mod el.extend( { | |
| 172 | defa ults: { | |
| 173 | userImage: "demo_fil es/feature _forms/sup porting_fi les/user-i mage.jpg", | |
| 174 | firstName: "Clark", | |
| 175 | lastName: "Bravo", | |
| 176 | role: "non e", | |
| 177 | facility: "TST01 - L as Vegas", | |
| 178 | phone1: "( 702) 321-4 567", | |
| 179 | phone2: "n one", | |
| 180 | email1: " PII ", | |
| 181 | email2: "c lark.bravo @asmr.com" | |
| 182 | } | |
| 183 | }); | |
| 184 | // ***** ********** ********** ********** ********** ** END OF MODEL **** ********** ********** ********** ********** * | |
| 185 | ||
| 186 | // ***** ********** ********** ********** ********** ** VIEWS * ********** ********** ********** ********** ***** | |
| 187 | // Okay to copy an d paste - WITH 1 EXC EPTION (se e below) | |
| 188 | ||
| 189 | var form View = ADK .UI.Form.e xtend({ | |
| 190 | ui: { | |
| 191 | 'AddVisitM odifiersPo pover': '. add-visit- modifiers- popover', | |
| 192 | 'ClosAddVi sitModifie rs': '.add -visit-mod ifiers-pop over #add- visit-modi fiers-clos e-btn', | |
| 193 | }, | |
| 194 | fiel ds: F457Fi elds, | |
| 195 | even ts: { | |
| 196 | "click #fo rm-close-b tn": funct ion(e) { | |
| 197 | if (!t his.model. isValid()) | |
| 198 | th is.model.s et("formSt atus", { | |
| 199 | status: "error", | |
| 200 | message: self.mode l.validati onError | |
| 201 | }) ; | |
| 202 | else { | |
| 203 | th is.model.u nset("form Status"); | |
| 204 | va r saveAler tView = ne w ADK.UI.N otificatio n({ | |
| 205 | title: ' Note Submi tted', | |
| 206 | icon: 'f a-check', | |
| 207 | message: 'Note suc cessfully saved with no errors .', | |
| 208 | type: "s uccess" | |
| 209 | }) ; | |
| 210 | sa veAlertVie w.show(); | |
| 211 | AD K.UI.Workf low.hide() ; | |
| 212 | } | |
| 213 | }, | |
| 214 | "submit": function(e ) { | |
| 215 | e.prev entDefault (); | |
| 216 | if (!t his.model. isValid()) | |
| 217 | th is.model.s et("formSt atus", { | |
| 218 | status: "error", | |
| 219 | message: self.mode l.validati onError | |
| 220 | }) ; | |
| 221 | else { | |
| 222 | th is.model.u nset("form Status"); | |
| 223 | ||
| 224 | // ********* ********** ** Go to s ignature f orm here * ********** ********** | |
| 225 | ||
| 226 | AD K.UI.Workf low.hide() ; | |
| 227 | } | |
| 228 | return false; | |
| 229 | } | |
| 230 | }, | |
| 231 | mode lEvents: { | |
| 232 | // none | |
| 233 | }, | |
| 234 | even ts: { | |
| 235 | "click @ui .ClosAddVi sitModifie rs": funct ion(e) { | |
| 236 | e.prev entDefault (); | |
| 237 | this.$ (this.ui[" AddVisitMo difiersPop over"]).tr igger('con trol:popov er:hidden' , true); | |
| 238 | } | |
| 239 | } | |
| 240 | }); | |
| 241 | // ***** ********** ********** ********** ********** ** END OF FORM VIEW ********** ********** ********** ********** * | |
| 242 | ||
| 243 | // ***** ********** ********** ********** ********** ** MODEL A ND WORKFLO W INSTANCE ********* ********** ********** * | |
| 244 | // Okay to copy an d paste | |
| 245 | var form Model = ne w FormMode l(); | |
| 246 | ||
| 247 | var work flowOption s = { | |
| 248 | size : "medium" , | |
| 249 | titl e: "Users" , | |
| 250 | show Progress: false, | |
| 251 | keyb oard: true , | |
| 252 | step s: [{ | |
| 253 | view: form View, | |
| 254 | viewModel: formModel , | |
| 255 | stepTitle: 'Step 1' | |
| 256 | }] | |
| 257 | }; | |
| 258 | var work flow = new ADK.UI.Wo rkflow(wor kflowOptio ns); | |
| 259 | workflow .show(); | |
| 260 | // ***** ********** ********** ********** ********** ** END OF MODEL AND WORKFLOW I NSTANCE ** ********** ********** * | |
| 261 | } | |
| 262 | }; | |
| 263 | return F457; | |
| 264 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.