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 | F226.js | Wed Jun 7 14:02:28 2017 UTC |
| 2 | adk\adk\product\production\demo_files\feature_forms | F226.js | Tue Sep 26 13:01:39 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 618 |
| 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 F2 26 = { | |
| 15 | // DO NOT US E CREATE F ORM FUNCTI ON --- THI S IS FOR D EMO PURPOS ES ONLY!!! | |
| 16 | cr eateForm: function() { | |
| 17 | // ***** ********** ********** ********** ********** ** STATIC ARRAY **** ********** ********** ********** ******* | |
| 18 | // NOTE: PICKLIST IS ONLY FO R THIS DEM O EXAMPLE | |
| 19 | var time ZonesArray = [{ | |
| 20 | grou p: 'Group 1', | |
| 21 | pick List: [{ | |
| 22 | value: 'op t1', | |
| 23 | label: 'Op tion 1' | |
| 24 | }, { | |
| 25 | value: 'op t2', | |
| 26 | label: 'Op tion 2' | |
| 27 | }] | |
| 28 | }, { | |
| 29 | grou p: 'Group 2', | |
| 30 | pick List: [{ | |
| 31 | value: 'op t3', | |
| 32 | label: 'Op tion 3' | |
| 33 | }, { | |
| 34 | value: 'op t4', | |
| 35 | label: 'Op tion 4' | |
| 36 | }, { | |
| 37 | value: 'op t5', | |
| 38 | label: 'Op tion 5' | |
| 39 | }, { | |
| 40 | value: 'op t6', | |
| 41 | label: 'Op tion 6' | |
| 42 | }] | |
| 43 | }, { | |
| 44 | grou p: 'Group 3', | |
| 45 | pick List: [{ | |
| 46 | value: 'op t7', | |
| 47 | label: 'Op tion 7' | |
| 48 | }, { | |
| 49 | value: 'op t8', | |
| 50 | label: 'Op tion 8' | |
| 51 | }, { | |
| 52 | value: 'op t9', | |
| 53 | label: 'Op tion 9' | |
| 54 | }] | |
| 55 | }]; | |
| 56 | // ***** ********** ********** ********** ********** ** END OF STATIC ARR AY ******* ********** ********** ******* | |
| 57 | ||
| 58 | // ***** ********** ********** ********** ********** ** FIELDS ********** ********** ********** ********** ********** * | |
| 59 | // Okay to copy an d paste | |
| 60 | var F226 Fields = [ { | |
| 61 | cont rol: "cont ainer", | |
| 62 | extr aClasses: ["modal-bo dy"], | |
| 63 | item s: [{ | |
| 64 | control: " container" , | |
| 65 | extraClass es: ["cont ainer-flui d"], | |
| 66 | items: [{ | |
| 67 | contro l: "contai ner", | |
| 68 | extraC lasses: [" row"], | |
| 69 | items: [{ | |
| 70 | co ntrol: "co ntainer", | |
| 71 | ex traClasses : ["col-xs -5"], | |
| 72 | it ems: [{ | |
| 73 | control: "select", | |
| 74 | name: "t itle", | |
| 75 | label: " Note Title ", | |
| 76 | title: " Press ente r to open search fil ter text." , | |
| 77 | pickList : timeZone sArray, | |
| 78 | showFilt er: true, | |
| 79 | groupEna bled: true , | |
| 80 | required : true, | |
| 81 | options: { | |
| 82 | mini mumInputLe ngth: 0 | |
| 83 | } | |
| 84 | }] | |
| 85 | }, { | |
| 86 | co ntrol: "co ntainer", | |
| 87 | ex traClasses : ["col-xs -4"], | |
| 88 | it ems: [{ | |
| 89 | control: "datepick er", | |
| 90 | name: "n otesCalend ar", | |
| 91 | title: " Enter in a date in t he followi ng format, MM/DD/YYY Y", | |
| 92 | label: " Date", | |
| 93 | required : true | |
| 94 | }] | |
| 95 | }, { | |
| 96 | co ntrol: "co ntainer", | |
| 97 | ex traClasses : ["col-xs -3"], | |
| 98 | it ems: [{ | |
| 99 | control: "timepick er", | |
| 100 | name: "n otesTime", | |
| 101 | title: " Please ent er in a ti me in the following format, HH :MM", | |
| 102 | label: " Time", | |
| 103 | required : true, | |
| 104 | placehol der: "HH:M M" | |
| 105 | }] | |
| 106 | }] | |
| 107 | }, { | |
| 108 | contro l: "contai ner", | |
| 109 | extraC lasses: [" row"], | |
| 110 | items: [{ | |
| 111 | co ntrol: "co ntainer", | |
| 112 | ex traClasses : ["col-xs -12"], | |
| 113 | it ems: [{ | |
| 114 | control: "textarea ", | |
| 115 | name: "m oreInfo", | |
| 116 | title: " Please ent er in note details", | |
| 117 | label: " Note", | |
| 118 | rows: 19 , | |
| 119 | required : true | |
| 120 | }] | |
| 121 | }] | |
| 122 | }] | |
| 123 | }] | |
| 124 | ||
| 125 | }, { //* ********** ********** ****** Mod al Footer START **** ********** ********** *** | |
| 126 | cont rol: "cont ainer", | |
| 127 | extr aClasses: ["modal-fo oter"], | |
| 128 | item s: [{ | |
| 129 | control: " container" , | |
| 130 | extraClass es: ["row" ], | |
| 131 | items: [{ | |
| 132 | contro l: "contai ner", | |
| 133 | extraC lasses: [" col-xs-6"] , | |
| 134 | templa te: Handle bars.compi le('<p ari a-hidden=" true">(* i ndicates a required field.)</p >{{#if sav edTime}}<p ><span id= "notes-sav ed-at">Sav ed at: {{s avedTime}} </span></p >{{/if}}') | |
| 135 | }, { | |
| 136 | contro l: "contai ner", | |
| 137 | extraC lasses: [" col-xs-6"] , | |
| 138 | items: [{ | |
| 139 | co ntrol: "bu tton", | |
| 140 | id : "form-ca ncel-btn", | |
| 141 | ex traClasses : ["btn-de fault", "b tn-sm"], | |
| 142 | ti tle: "Pres s enter to cancel an d close no te", | |
| 143 | la bel: "Canc el", | |
| 144 | ty pe: 'butto n' | |
| 145 | }, { | |
| 146 | co ntrol: "bu tton", | |
| 147 | id : "form-cl ose-btn", | |
| 148 | ex traClasses : ["btn-de fault", "b tn-sm"], | |
| 149 | ti tle: "Pres s enter to save and close note ", | |
| 150 | la bel: "Clos e", | |
| 151 | ty pe: 'butto n' | |
| 152 | }, { | |
| 153 | co ntrol: "bu tton", | |
| 154 | ex traClasses : ["btn-pr imary", "b tn-sm"], | |
| 155 | ti tle: "Pres s enter to sign note ", | |
| 156 | la bel: "Sign ", | |
| 157 | id : "form-si gn-btn", | |
| 158 | ty pe: "submi t" | |
| 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 | name: "", | |
| 170 | //savedTim e: moment( ).format(' HH:mm') | |
| 171 | } | |
| 172 | }); | |
| 173 | // ***** ********** ********** ********** ********** ** END OF MODEL **** ********** ********** ********** ********** * | |
| 174 | ||
| 175 | // ***** ********** ********** ********** ********** ** VIEWS * ********** ********** ********** ********** ***** | |
| 176 | // Okay to copy an d paste - WITH 1 EXC EPTION (se e below) | |
| 177 | var Dele teMessageV iew = Back bone.Mario nette.Item View.exten d({ | |
| 178 | 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?'), | |
| 179 | tagN ame: 'p' | |
| 180 | }); | |
| 181 | var Clos eMessageVi ew = Backb one.Marion ette.ItemV iew.extend ({ | |
| 182 | temp late: Hand lebars.com pile('You will lose all work i n progress if you ca ncel this note. Woul d you like to procee d?'), | |
| 183 | tagN ame: 'p' | |
| 184 | }); | |
| 185 | var Foot erView = B ackbone.Ma rionette.I temView.ex tend({ | |
| 186 | temp late: Hand lebars.com pile('{{ui -button "C ancel" cla sses="btn- default bt n-sm" titl e="Press e nter to ca ncel"}}{{u i-button " Continue" classes="b tn-primary btn-sm" t itle="Pres s enter to continue" }}'), | |
| 187 | even ts: { | |
| 188 | 'click .bt n-primary' : function () { | |
| 189 | ADK.UI .Alert.hid e(); | |
| 190 | ADK.UI .Workflow. hide(); | |
| 191 | }, | |
| 192 | 'click .bt n-default' : function () { | |
| 193 | ADK.UI .Alert.hid e(); | |
| 194 | } | |
| 195 | }, | |
| 196 | tagN ame: 'span ' | |
| 197 | }); | |
| 198 | ||
| 199 | var form View = ADK .UI.Form.e xtend({ | |
| 200 | ui: { | |
| 201 | 'CancelBut ton': '#fo rm-cancel- btn', | |
| 202 | 'CloseButt on': '#for m-close-bt n' | |
| 203 | }, | |
| 204 | fiel ds: F226Fi elds, | |
| 205 | even ts: { | |
| 206 | "click @ui .CancelBut ton": func tion(e) { | |
| 207 | e.prev entDefault (); | |
| 208 | var cl oseAlertVi ew = new A DK.UI.Aler t({ | |
| 209 | ti tle: 'Are you sure y ou want to cancel?', | |
| 210 | ic on: 'icon- warning', | |
| 211 | me ssageView: CloseMess ageView, | |
| 212 | fo oterView: FooterView | |
| 213 | }); | |
| 214 | closeA lertView.s how(); | |
| 215 | }, | |
| 216 | "click @ui .CloseButt on": funct ion(e) { | |
| 217 | if (!t his.model. isValid()) | |
| 218 | th is.model.s et("formSt atus", { | |
| 219 | status: "error", | |
| 220 | message: self.mode l.validati onError | |
| 221 | }) ; | |
| 222 | else { | |
| 223 | th is.model.u nset("form Status"); | |
| 224 | va r saveAler tView = ne w ADK.UI.N otificatio n({ | |
| 225 | title: ' Note Saved ', | |
| 226 | icon: 'f a-check', | |
| 227 | message: 'Note suc cessfully saved with no errors .', | |
| 228 | type: "s uccess" | |
| 229 | }) ; | |
| 230 | sa veAlertVie w.show(); | |
| 231 | AD K.UI.Workf low.hide() ; | |
| 232 | } | |
| 233 | }, | |
| 234 | "submit": function(e ) { | |
| 235 | e.prev entDefault (); | |
| 236 | if (!t his.model. isValid()) { | |
| 237 | th is.model.s et("formSt atus", { | |
| 238 | status: "error", | |
| 239 | message: self.mode l.validati onError | |
| 240 | }) ; | |
| 241 | th is.transfe rFocusToFi rstError() ; | |
| 242 | } els e { | |
| 243 | th is.model.u nset("form Status"); | |
| 244 | va r saveAler tView = ne w ADK.UI.N otificatio n({ | |
| 245 | title: ' Note Saved ', | |
| 246 | icon: 'f a-check', | |
| 247 | message: 'Note suc cessfully saved with no errors .', | |
| 248 | type: "s uccess" | |
| 249 | }) ; | |
| 250 | sa veAlertVie w.show(); | |
| 251 | AD K.UI.Workf low.hide() ; | |
| 252 | ||
| 253 | // ********* ********** ** Go to s ignature f orm here * ********** ********** | |
| 254 | ||
| 255 | } | |
| 256 | return false; | |
| 257 | } | |
| 258 | }, | |
| 259 | mode lEvents: { | |
| 260 | // none | |
| 261 | } | |
| 262 | }); | |
| 263 | // ***** ********** ********** ********** ********** ** END OF FORM VIEW ********** ********** ********** ********** * | |
| 264 | ||
| 265 | // ***** ********** ********** ********** ********** ** MODEL A ND WORKFLO W INSTANCE ********* ********** ********** * | |
| 266 | // Okay to copy an d paste | |
| 267 | var form Model = ne w FormMode l(); | |
| 268 | ||
| 269 | var work flowOption s = { | |
| 270 | titl e: "New No te", | |
| 271 | show Progress: false, | |
| 272 | keyb oard: true , | |
| 273 | head erOptions: { | |
| 274 | actionItem s: [{ | |
| 275 | label: 'Preview' , | |
| 276 | onClic k: functio n() { | |
| 277 | // Preview f unctionali ty to go h ere | |
| 278 | } | |
| 279 | }, { | |
| 280 | label: 'Print', | |
| 281 | onClic k: functio n() { | |
| 282 | // Print fun ctionality to go her e | |
| 283 | } | |
| 284 | }, { | |
| 285 | label: 'Delete', | |
| 286 | onClic k: functio n() { | |
| 287 | // Delete fu nctionalit y to go he re | |
| 288 | } | |
| 289 | }], | |
| 290 | closeButto nOptions: { | |
| 291 | title: 'Press en ter to sav e and clos e note', | |
| 292 | onClic k: functio n(){ | |
| 293 | // Save func tionality to go here | |
| 294 | AD K.UI.Workf low.hide() ; | |
| 295 | } | |
| 296 | } | |
| 297 | }, | |
| 298 | step s: [{ | |
| 299 | view: form View, | |
| 300 | viewModel: formModel , | |
| 301 | stepTitle: 'Step 1' | |
| 302 | }] | |
| 303 | }; | |
| 304 | var work flow = new ADK.UI.Wo rkflow(wor kflowOptio ns); | |
| 305 | workflow .show(); | |
| 306 | // ***** ********** ********** ********** ********** ** END OF MODEL AND WORKFLOW I NSTANCE ** ********** ********** * | |
| 307 | } | |
| 308 | }; | |
| 309 | return F226; | |
| 310 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.