Produced by Araxis Merge on 7/25/2018 3:40:58 PM 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 | Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\js\view | confirm.js | Fri Jun 1 14:26:04 2018 UTC |
2 | Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\js\view | confirm.js | Wed Jul 25 14:10:36 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 306 |
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 | VPC.View.c onfirm = B ackbone.Ma rionette.I temView.ex tend({ | |
2 | te mplate: VP C.Template .confirm, | |
3 | ||
4 | ui : { | |
5 | "act ivityDate" : "#confir m-activity -date" | |
6 | }, | |
7 | ||
8 | ev ents: { | |
9 | 'cli ck #confir m-button' : 'confirm ', | |
10 | "cli ck #titleM enu" : "selectM enuDropdow nOpen" | |
11 | }, | |
12 | ||
13 | in itialize: function() { | |
14 | ||
15 | }, | |
16 | ||
17 | template Helpers: f unction() { | |
18 | return { | |
19 | plan Activity: $( $.pars eHTML(loca lStorage.g etItem('pl anActivity '))).text( ), | |
20 | toolPa ge: 'pleas ant-activi ty' | |
21 | }; | |
22 | }, | |
23 | on Render: fu nction() { | |
24 | this .ui.activi tyDate.dat epicker({ | |
25 | clearB tn: false, | |
26 | multid ate: false , | |
27 | autocl ose: true, | |
28 | todayB tn: true, | |
29 | todayH ighlight: true, | |
30 | format : 'mm/dd/y yyy' | |
31 | }) | |
32 | // s et focus b ack on cal endar inpu t after se lecting da te in cale ndar | |
33 | .on( 'hide', fu nction () { | |
34 | if (!t his.firstH ide) { | |
35 | if (!$(t his).is(": focus")) { | |
36 | this.first Hide = tru e; | |
37 | // this wi ll inadver tently cal l show (we 're trying to hide!) | |
38 | this.focus (); | |
39 | } | |
40 | } else { | |
41 | this.fir stHide = f alse; | |
42 | } | |
43 | }) | |
44 | ||
45 | .on( 'show', fu nction () { | |
46 | if (th is.firstHi de) { | |
47 | // caref ul, we hav e an infin ite loop! | |
48 | $(this). datepicker ('hide'); | |
49 | } | |
50 | }) | |
51 | ||
52 | setT imeout(fun ction () { | |
53 | A pp_Utils.F ocusOnLoad (); | |
54 | $('#date ErrorRegio n').remove Class('hid den'); | |
55 | $('#date ErrorRegio n').attr(" style", "d isplay:non e"); | |
56 | }, 900); // increased timeout fr om 300 to 900 becaus e of page load issue s | |
57 | }, | |
58 | pr epend_bom: function (blob) { | |
59 | if ( /^\s*(?:te xt\/\S*|ap plication\ /xml|\S*\/ \S*\+xml)\ s*;.*chars et\s*=\s*u tf-8/i.tes t(blob.typ e)) { | |
60 | return new Blob( ["\ufeff", blob], {t ype: blob. type}); | |
61 | } | |
62 | retu rn blob; | |
63 | }, | |
64 | sa veTheFile: function (blob, fil ename){ | |
65 | if ( typeof win dow.naviga tor !== "u ndefined" && window. navigator. msSaveOrOp enBlob) { //Is IE | |
66 | return window.na vigator.ms SaveOrOpen Blob(this. prepend_bo m(blob), f ilename); | |
67 | ||
68 | }els e{ //Else Not IE | |
69 | blob = this.prep end_bom(bl ob); | |
70 | var | |
71 | view = w indow, | |
72 | doc = vi ew.documen t | |
73 | // onl y get URL when neces sary in ca se Blob.js hasn't ov erridden i t yet | |
74 | , get_UR L = functi on() { | |
75 | return vie w.URL || v iew.webkit URL || vie w; | |
76 | } | |
77 | , save_l ink = doc. createElem entNS("htt p://www.w3 .org/1999/ xhtml", "a ") | |
78 | , can_us e_save_lin k = "downl oad" in sa ve_link | |
79 | , click = function (node) { | |
80 | var event = doc.crea teEvent("M ouseEvents "); | |
81 | event.init MouseEvent ( | |
82 | "c lick", tru e, false, view, 0, 0 , 0, 0, 0 | |
83 | , false, fal se, false, false, 0, null | |
84 | ); | |
85 | node.dispa tchEvent(e vent); | |
86 | }; | |
87 | if (ca n_use_save _link) { | |
88 | var obje ct_url = g et_URL().c reateObjec tURL(blob) ; | |
89 | save_lin k.href = o bject_url; | |
90 | save_lin k.download = filenam e; | |
91 | click(sa ve_link); | |
92 | return; | |
93 | } | |
94 | } | |
95 | }, | |
96 | co nfirm: fun ction(e) { | |
97 | //e. preventDef ault(); | |
98 | try { | |
99 | var fi lename = " ical.ics"; | |
100 | ||
101 | var ac tivityItem = $( $.pa rseHTML(lo calStorage .getItem(' planActivi ty'))).tex t(); | |
102 | var ac tivityDate = $('#con firm-activ ity-date') .val(); | |
103 | var to day = new Date(); | |
104 | today. setDate(to day.getDat e() - 1); | |
105 | ||
106 | activi tyItem = a ctivityIte m.replace( '.', ''); | |
107 | ||
108 | var bO k = activi tyDate.mat ch(/[0-9]{ 2}\/[0-9]{ 2}\/(20)\d {2}$/); // year ra nge: 2000 to 2099 | |
109 | if (is NaN(Date.p arse(activ ityDate)) || !bOk) { | |
110 | $('#date ErrorRegio n').attr(" style", "d isplay:blo ck"); | |
111 | //$( '#dateErro rRegion sp an').focus (); | |
112 | } | |
113 | else { | |
114 | var dtActivity Date = new Date(acti vityDate); | |
115 | if ( dtActivity Date > tod ay) { | |
116 | var datest amp = new Date(); | |
117 | $('#dateEr rorRegion' ).attr("st yle", "dis play:none" ); | |
118 | ||
119 | //alert('a ctivity da te: ' + ac tivityDate , dtActivi tyDate); | |
120 | var ical = 'BEGIN:VC ALENDAR\n' ; | |
121 | ical += 'P RODID: -// Microsoft Corporatio n/Outlook MIMEDIR//E N\n'; | |
122 | ical += 'V ERSION:2.0 \n'; | |
123 | ical += 'P RODID:-//V PC//NONSGM L v1.0//EN \n'; | |
124 | ical += 'B EGIN:VEVEN T\n'; | |
125 | ical += 'U ID:VAPainC oach-Activ ity\n'; | |
126 | ical += 'D TSTAMP:'+d atestamp.t oISOString ()+'\n'; | |
127 | //ical += 'ORGANIZER ;CN=' + VPC.Model. User.get(" AI ").display Name + P I I \n'; | |
128 | ical += 'D TSTART:'+d tActivityD ate.toISOS tring()+'\ n'; | |
129 | ical += 'D TEND:'+dtA ctivityDat e.toISOStr ing()+'\n' ; | |
130 | ical += 'S UMMARY:' + activityI tem + '\n' ; | |
131 | ical += 'E ND:VEVENT\ n'; | |
132 | ical += 'E ND:VCALEND AR\n'; | |
133 | var blob = new Blob( [ical], { | |
134 | type: "text/plai n;charset= utf-8" | |
135 | }); | |
136 | //window.o pen( "data :text/cale ndar;chars et=utf8," + encodeUR I(ical), ' Download') ; | |
137 | this.saveT heFile(blo b, filenam e); | |
138 | } | |
139 | else { | |
140 | $('#dateEr rorRegion' ).attr("st yle", "dis play:block "); | |
141 | //$('#date ErrorRegio n span').f ocus(); | |
142 | } | |
143 | } | |
144 | } | |
145 | catc h(err) { | |
146 | App.ve nt.trigger ('website: error', er r.message) ; | |
147 | } | |
148 | //var href = 'ma ilto:?subj ect=' + ac tivityItem + '&body= On ' + act ivityDate + ', I wou ld like to : ' + acti vityItem; | |
149 | ||
150 | }, | |
151 | se lectMenuDr opdownOpen : function () { | |
152 | App_ Utils.Sele ctTitleMen u('veteran View', '#c onfirm-con tent'); | |
153 | } | |
154 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.