Produced by Araxis Merge on 5/9/2017 12:03:03 PM Eastern 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 | Tue May 9 16:03:03 2017 UTC | ||
| 2 | OSCIF_HEC_v1.4_Sprint23_build4_Apr_2017.zip\CRM_solutions\Managed\North52BPA_1_0_0_506_managed_2013_2015_2016..zip\WebResources | north52_javascripteditorsourceproperty8DEC08F9-262B-E611-8C6D-00155D011502 | Mon Sep 19 18:20:18 2016 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 310 |
| 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 | if (typeof North52 = = 'undefin ed') { Nor th52 = {}; } | |||||
| 2 | if (typeof North52.M etadataPro perty == ' undefined' ) { North5 2.Metadata Property = {}; } | |||||
| 3 | ||||||
| 4 | var Met adataPrope rty = {}; | |||||
| 5 | Metada taProperty .parentRef erenceProp erty = ""; | |||||
| 6 | Metada taProperty .entityMet adata = nu ll; | |||||
| 7 | Metada taProperty .CacheKey = ""; | |||||
| 8 | ||||||
| 9 | North5 2.Metadata Property.D isable = f unction () { | |||||
| 10 | $( "#metadata property") .attr("dis abled", tr ue); | |||||
| 11 | }; | |||||
| 12 | ||||||
| 13 | ||||||
| 14 | ||||||
| 15 | North5 2.Metadata Property.S ort = func tion (a, b ) { | |||||
| 16 | ||||||
| 17 | ||||||
| 18 | re turn (a.in nerHTML > b.innerHTM L) ? 1 : - 1; | |||||
| 19 | } | |||||
| 20 | ||||||
| 21 | ||||||
| 22 | North5 2.Metadata Property.C lear = fun ction () { | |||||
| 23 | $( "select[id $=metadata property] > option") .remove(); | |||||
| 24 | N5 2.HTMLWebR esourceHel per.Insert OptionSetI tem("metad atapropert y", "", "" ); | |||||
| 25 | ||||||
| 26 | }; | |||||
| 27 | ||||||
| 28 | North5 2.Metadata Property.L oad = func tion (enti ty, parent ReferenceP roperty, a ddAllPrope rties, isF romPageLoa d) { | |||||
| 29 | ||||||
| 30 | $( '#loading- sourceprop erty').sho w(); | |||||
| 31 | $( '#metadata property') .hide(); | |||||
| 32 | ||||||
| 33 | $( "select[id $=metadata property] > option") .remove(); | |||||
| 34 | Me tadataProp erty.paren tReference Property = parentRef erenceProp erty; | |||||
| 35 | Me tadataProp erty.Cache Key = 'Sin gleEntity' + parent. Xrm.Page.c ontext.get OrgUniqueN ame() + en tity; | |||||
| 36 | ||||||
| 37 | SD K.Metadata .RetrieveE ntity(SDK. Metadata.E ntityFilte rs.Attribu tes, entit y, null, f alse, func tion (enti tyMetadata ) { | |||||
| 38 | North52. MetadataPr operty.suc cessRetrie veAttribut es(entityM etadata, p arentRefer enceProper ty, addAll Properties , isFromPa geLoad); | |||||
| 39 | }, North52.M etadataPro perty.erro rRetrieveA ttributes) ; | |||||
| 40 | ||||||
| 41 | }; | |||||
| 42 | ||||||
| 43 | North5 2.Metadata Property.s uccessRetr ieveAttrib utes = fun ction (ent ityMetadat a, parentR eferencePr operty, ad dAllProper ties, isFr omPageLoad ) { | |||||
| 44 | ||||||
| 45 | Me tadataProp erty.entit yMetadata = entityMe tadata; | |||||
| 46 | ||||||
| 47 | ||||||
| 48 | va r mode = p arent.Xrm. Page.data. entity.att ributes.ge t("north52 _mode").ge tValue(); | |||||
| 49 | if (mode == null) mode = 2178900 02; | |||||
| 50 | ||||||
| 51 | if ((entityM etadata.At tributes ! = null) && ((mode == 217890000 ) || (mode == 217890 002))) { | |||||
| 52 | ||||||
| 53 | for (var i = 0; i < entityMe tadata.Att ributes.le ngth; i++) { | |||||
| 54 | var attribute = entityMe tadata.Att ributes[i] ; | |||||
| 55 | ||||||
| 56 | if ( attribute. DisplayNam e.UserLoca lizedLabel != null) { | |||||
| 57 | if (attrib ute.Displa yName.User LocalizedL abel.Label != null) { | |||||
| 58 | text = attribute .DisplayNa me.UserLoc alizedLabe l.Label | |||||
| 59 | value = attribut e.LogicalN ame; | |||||
| 60 | ||||||
| 61 | N52.HT MLWebResou rceHelper. InsertOpti onSetItem( 'metadatap roperty', text, valu e); | |||||
| 62 | } | |||||
| 63 | } | |||||
| 64 | } | |||||
| 65 | ||||||
| 66 | currentS erverSideA ttribute = parent.Xr m.Page.get Attribute( parentRefe rencePrope rty).getVa lue(); | |||||
| 67 | if (curr entServerS ideAttribu te !== nul l && curre ntServerSi deAttribut e !== "") { | |||||
| 68 | var splitStrin g = curren tServerSid eAttribute .split("|" ); | |||||
| 69 | $("# metadatapr operty").v al(splitSt ring); | |||||
| 70 | } | |||||
| 71 | ||||||
| 72 | ||||||
| 73 | $("#meta dataproper ty option" ).sort(Nor th52.Metad ataPropert y.Sort).ap pendTo("#m etadatapro perty"); | |||||
| 74 | ||||||
| 75 | if (addA llProperti es == 'tru e') { | |||||
| 76 | N52. HTMLWebRes ourceHelpe r.InsertOp tionSetIte mAtTop("me tadataprop erty", "Al l Properti es", ""); | |||||
| 77 | ||||||
| 78 | if ( currentSer verSideAtt ribute == null || cu rrentServe rSideAttri bute == "" ) | |||||
| 79 | $("#metada taproperty ").val("") ; | |||||
| 80 | } | |||||
| 81 | else { | |||||
| 82 | N52. HTMLWebRes ourceHelpe r.InsertOp tionSetIte m("metadat aproperty" , "", "na" ); | |||||
| 83 | } | |||||
| 84 | ||||||
| 85 | ||||||
| 86 | N52.HTML WebResourc eHelper.In sertOption SetItemAtT op("metada taproperty ", "", "na "); | |||||
| 87 | N52.HTML WebResourc eHelper.In sertOption SetItemAtT op("metada taproperty ", "--- Se rver Side Properties ---", "na "); | |||||
| 88 | ||||||
| 89 | ||||||
| 90 | $('#load ing-source property') .hide(); | |||||
| 91 | $('#meta dataproper ty').show( ); | |||||
| 92 | ||||||
| 93 | } | |||||
| 94 | ||||||
| 95 | No rth52.Meta dataProper ty.LoadCli entSide(); | |||||
| 96 | ||||||
| 97 | }; | |||||
| 98 | ||||||
| 99 | ||||||
| 100 | North5 2.Metadata Property.e rrorRetrie veAttribut es = funct ion (error ) { | |||||
| 101 | al ert("North 52 Formula Manager : " + error .message); | |||||
| 102 | }; | |||||
| 103 | ||||||
| 104 | North5 2.Metadata Property.D ropDownCha nged = fun ction (val ue) { | |||||
| 105 | va r selected Values = $ ("#metadat aproperty" ).val() || []; | |||||
| 106 | ||||||
| 107 | va r selected ValuesServ erSide = [ ]; | |||||
| 108 | va r selected ValuesClie ntSide = [ ]; | |||||
| 109 | ||||||
| 110 | fo r (var i = 0; i < se lectedValu es.length; i++) { | |||||
| 111 | if (sele ctedValues [i] != 'na ') { | |||||
| 112 | if ( selectedVa lues[i].sp lit('.').l ength > 1) | |||||
| 113 | selectedVa luesClient Side.push( selectedVa lues[i]); | |||||
| 114 | else | |||||
| 115 | selectedVa luesServer Side.push( selectedVa lues[i]); | |||||
| 116 | } | |||||
| 117 | } | |||||
| 118 | ||||||
| 119 | va r selected ValuesServ erSideFina l = select edValuesSe rverSide.j oin("|"); | |||||
| 120 | va r selected ValuesClie ntSideFina l = select edValuesCl ientSide.j oin("|"); | |||||
| 121 | ||||||
| 122 | if (selected ValuesServ erSideFina l.substrin g(0, 1) == "|") { se lectedValu esServerSi deFinal = selectedVa luesServer SideFinal. substring( 1); } | |||||
| 123 | if (selected ValuesClie ntSideFina l.substrin g(0, 1) == "|") { se lectedValu esClientSi deFinal = selectedVa luesClient SideFinal. substring( 1); } | |||||
| 124 | ||||||
| 125 | pa rent.Xrm.P age.data.e ntity.attr ibutes.get (MetadataP roperty.pa rentRefere ncePropert y).setValu e(selected ValuesServ erSideFina l); | |||||
| 126 | pa rent.Xrm.P age.data.e ntity.attr ibutes.get ("north52_ sourceenti typroperty clientside ").setValu e(selected ValuesClie ntSideFina l); | |||||
| 127 | No rth52.Form ulaEditor. ShowHideCl ientSideSa veMode(); | |||||
| 128 | }; | |||||
| 129 | ||||||
| 130 | North5 2.Metadata Property.R eset = fun ction () { | |||||
| 131 | ||||||
| 132 | $( '#metadata property o ption:firs t-child'). attr("sele cted", "se lected"); | |||||
| 133 | }; | |||||
| 134 | ||||||
| 135 | ||||||
| 136 | ||||||
| 137 | North5 2.Metadata Property.L oadFromQue ry = funct ion (query ) { | |||||
| 138 | ||||||
| 139 | $( "select[id $=metadata property] > option") .remove(); | |||||
| 140 | ||||||
| 141 | va r xml = N5 2.HTMLWebR esourceHel per.GetXml Document(q uery); | |||||
| 142 | va r attribut es = xml.s electNodes ("//attrib ute"); | |||||
| 143 | ||||||
| 144 | fo r (var i = 0; i < at tributes.l ength; i++ ) { | |||||
| 145 | var node = attribu tes[i]; | |||||
| 146 | var valu e = node.a ttributes[ 0].value; | |||||
| 147 | ||||||
| 148 | N52.HTML WebResourc eHelper.In sertOption SetItem('m etadatapro perty', va lue, value ); | |||||
| 149 | ||||||
| 150 | } | |||||
| 151 | ||||||
| 152 | $( "#metadata property o ption").so rt(North52 .MetadataP roperty.So rt).append To("#metad atapropert y"); | |||||
| 153 | ||||||
| 154 | cu rrentAttri bute = par ent.Xrm.Pa ge.getAttr ibute("nor th52_targe tentitypro perty").ge tValue(); | |||||
| 155 | if (currentA ttribute ! == null && currentAt tribute != = "") { | |||||
| 156 | $("#meta dataproper ty").val(c urrentAttr ibute); | |||||
| 157 | North52. MetadataPr operty.Dro pDownChang ed(current Attribute) ; | |||||
| 158 | } | |||||
| 159 | el se { | |||||
| 160 | $('#meta dataproper ty option: first-chil d').attr(" selected", "selected "); | |||||
| 161 | currentA ttribute = $("#metad atapropert y option:s elected"). val(); | |||||
| 162 | North52. MetadataPr operty.Dro pDownChang ed(current Attribute) ; | |||||
| 163 | } | |||||
| 164 | ||||||
| 165 | ||||||
| 166 | $( '#loading- sourceprop erty').hid e(); | |||||
| 167 | $( '#metadata property') .show(); | |||||
| 168 | ||||||
| 169 | }; | |||||
| 170 | ||||||
| 171 | ||||||
| 172 | North5 2.Metadata Property.L oadClientS ide = func tion () { | |||||
| 173 | ||||||
| 174 | va r mode = p arent.Xrm. Page.data. entity.att ributes.ge t("north52 _mode").ge tValue(); | |||||
| 175 | if (mode == null) mode = 2178900 02; | |||||
| 176 | ||||||
| 177 | if ((mode == 217890000 ) || (mode == 217890 001)) { | |||||
| 178 | var sour ceEntity = parent.Xr m.Page.dat a.entity.a ttributes. get("north 52_sourcee ntityname" ).getValue (); | |||||
| 179 | var opti ons = ""; | |||||
| 180 | ||||||
| 181 | if (type of parent. Xrm.Page.u i.clearFor mNotificat ion != "un defined") | |||||
| 182 | opti ons = "$se lect=*&$fi lter=Objec tTypeCode eq " + "'" + sourceE ntity + "' and (Type /Value eq 2 or Type/ Value eq 7 ) and Form Activation State/Valu e eq 1"; | |||||
| 183 | else | |||||
| 184 | opti ons = "$se lect=*&$fi lter=Objec tTypeCode eq " + "'" + sourceE ntity + "' and Type/ Value eq 2 "; | |||||
| 185 | ||||||
| 186 | SDK.REST .retrieveM ultipleRec ords("Syst emForm", o ptions, No rth52.Meta dataProper ty.retriev eFormCallB ack, funct ion (error ) { alert( "North52 F ormula Man ager: " + error.mess age); }, N orth52.Met adataPrope rty.formsR etrieveCom plete) | |||||
| 187 | ||||||
| 188 | } | |||||
| 189 | }; | |||||
| 190 | ||||||
| 191 | North5 2.Metadata Property.r etrieveFor mCallBack = function () { | |||||
| 192 | ||||||
| 193 | }; | |||||
| 194 | ||||||
| 195 | North5 2.Metadata Property.r etrieveFor mCallBack = function (retrieve dForms) { | |||||
| 196 | ||||||
| 197 | va r duplicat eFormName = false; | |||||
| 198 | va r formName s = []; | |||||
| 199 | va r excludeA rray = ["m apcontrol" , "notesco ntrol", "W ebResource _RecordWal l"]; | |||||
| 200 | N5 2.HTMLWebR esourceHel per.Insert OptionSetI tem("metad atapropert y", "--- C lient Side Propertie s ---", "n a"); | |||||
| 201 | ||||||
| 202 | fo r (var i = 0; i < re trievedFor ms.length; i++) { | |||||
| 203 | var form Result = r etrievedFo rms[i]; | |||||
| 204 | var xml = N52.HTML WebResourc eHelper.Ge tXmlDocume nt(formRes ult.FormXm l); | |||||
| 205 | var xpat h = "/form /tabs/tab/ columns/co lumn/secti ons/sectio n/rows/row /cell/cont rol"; | |||||
| 206 | ||||||
| 207 | var attr ibutes = N 52.HTMLWeb ResourceHe lper.GetXm lNodes(xml , xpath); | |||||
| 208 | ||||||
| 209 | formName s.push(for mResult.Na me); | |||||
| 210 | ||||||
| 211 | N52.HTML WebResourc eHelper.In sertOption SetItem("m etadatapro perty", "" , "na"); | |||||
| 212 | N52.HTML WebResourc eHelper.In sertOption SetItem("m etadatapro perty", "* ** " + for mResult.Na me + " Eve nts ***", "na"); | |||||
| 213 | N52.HTML WebResourc eHelper.In sertOption SetItem("m etadatapro perty", "" , "na"); | |||||
| 214 | ||||||
| 215 | N52.HTML WebResourc eHelper.In sertOption SetItem("m etadatapro perty", "O nLoad", fo rmResult.N ame + ".on load"); | |||||
| 216 | N52.HTML WebResourc eHelper.In sertOption SetItem("m etadatapro perty", "O nSave", fo rmResult.N ame + ".on save"); | |||||
| 217 | if ( (fo rmResult.T ype.Value == 2) && ( North52.Me tadataProp erty.isBus inessProce ssEnabled( parent.Xrm .Page.getA ttribute(" north52_so urceentity name").get Value()) = = true ) ) | |||||
| 218 | N52.HTMLWe bResourceH elper.Inse rtOptionSe tItem("met adataprope rty", "OnS tageChange ", formRes ult.Name + ".onload. stageid"); | |||||
| 219 | ||||||
| 220 | for (var k = 0; k < attribut es.length; k++) { | |||||
| 221 | var node = att ributes[k] ; | |||||
| 222 | var attributeN ame = ''; | |||||
| 223 | ||||||
| 224 | try { | |||||
| 225 | ||||||
| 226 | attr ibuteName = node.att ributes['i d'].value; | |||||
| 227 | } catch (ex) { | |||||
| 228 | attr ibuteName = node.att ributes[0] .value; | |||||
| 229 | ||||||
| 230 | if ( (attribute Name == 't rue') || ( attributeN ame == 'fa lse') ) | |||||
| 231 | at tributeNam e = node.a ttributes[ 1].value; | |||||
| 232 | } | |||||
| 233 | if (excludeAr ray.indexO f(attribut eName ) > -1) | |||||
| 234 | continue; | |||||
| 235 | ||||||
| 236 | var attribute DisplayNam e = North5 2.Metadata Property.g etDisplayN ame(attrib uteName); | |||||
| 237 | ||||||
| 238 | var valueBehi nd = formR esult.Name + ".oncha nge." + at tributeNam e; | |||||
| 239 | ||||||
| 240 | N52 .HTMLWebRe sourceHelp er.InsertO ptionSetIt em('metada taproperty ', attribu teDisplayN ame, value Behind); | |||||
| 241 | } | |||||
| 242 | } | |||||
| 243 | ||||||
| 244 | du plicateFor mName = N5 2.HTMLWebR esourceHel per.CheckD uplicates( 'metadatap roperty', formNames) ; | |||||
| 245 | ||||||
| 246 | if (duplicat eFormName == false) { | |||||
| 247 | ||||||
| 248 | var sele ctedValues ServerSide = $("#met adataprope rty").val( ) || []; | |||||
| 249 | ||||||
| 250 | currentC lientSideA ttribute = parent.Xr m.Page.get Attribute( "north52_s ourceentit ypropertyc lientside" ).getValue (); | |||||
| 251 | if (curr entClientS ideAttribu te !== nul l && curre ntClientSi deAttribut e !== "") { | |||||
| 252 | var splitStrin gClientSid e = curren tClientSid eAttribute .split("|" ); | |||||
| 253 | ||||||
| 254 | var splitStrin gMerged = selectedVa luesServer Side.conca t(splitStr ingClientS ide); | |||||
| 255 | ||||||
| 256 | $("# metadatapr operty").v al(splitSt ringMerged ); | |||||
| 257 | } | |||||
| 258 | } | |||||
| 259 | ||||||
| 260 | $( '#loading- sourceprop erty').hid e(); | |||||
| 261 | $( '#metadata property') .show(); | |||||
| 262 | No rth52.Form ulaEditor. ShowHideCl ientSideSa veMode(); | |||||
| 263 | ||||||
| 264 | }; | |||||
| 265 | ||||||
| 266 | North5 2.Metadata Property.f ormsRetrie veComplete = functio n () { | |||||
| 267 | va r msg = 'C omplete'; | |||||
| 268 | }; | |||||
| 269 | ||||||
| 270 | North5 2.Metadata Property.g etDisplayN ame = func tion (logi calName) { | |||||
| 271 | va r result = logicalNa me; | |||||
| 272 | ||||||
| 273 | if (Metadata Property.e ntityMetad ata != nul l) { | |||||
| 274 | var enti tyMetadata = Metadat aProperty. entityMeta data; | |||||
| 275 | ||||||
| 276 | for (var i = 0; i < entityMe tadata.Att ributes.le ngth; i++) { | |||||
| 277 | var attribute = entityMe tadata.Att ributes[i] ; | |||||
| 278 | ||||||
| 279 | if ( attribute. LogicalNam e == logic alName) | |||||
| 280 | result = a ttribute.D isplayName .UserLocal izedLabel. Label; | |||||
| 281 | } | |||||
| 282 | } | |||||
| 283 | re turn resul t; | |||||
| 284 | }; | |||||
| 285 | ||||||
| 286 | ||||||
| 287 | North52.M etadataPro perty.isBu sinessProc essEnabled = functio n (entityl ogicalname ) { | |||||
| 288 | va r result = false; | |||||
| 289 | va r entityCa cheKey = ' EntityList 52' + pare nt.Xrm.Pag e.context. getOrgUniq ueName(); | |||||
| 290 | va r entityMe tadataColl ection = J SON.parse( localStora ge.getItem (entityCac heKey )); | |||||
| 291 | ||||||
| 292 | ||||||
| 293 | for (var i = 0; i < ent ityMetadat aCollectio n.length; i++) | |||||
| 294 | { | |||||
| 295 | var sp litArray = entityMet adataColle ction[i].s plit('|'); | |||||
| 296 | if (sp litArray.l ength < 2) | |||||
| 297 | c ontinue; | |||||
| 298 | ||||||
| 299 | var la bel = spl itArray[0] ; | |||||
| 300 | var lo gicalname = splitAr ray[1]; | |||||
| 301 | var bu sinessenab led = spl itArray[2] ; | |||||
| 302 | ||||||
| 303 | if (en titylogica lname == l ogicalname ) | |||||
| 304 | i f (busines senabled = = 'true') | |||||
| 305 | result = true; | |||||
| 306 | ||||||
| 307 | } | |||||
| 308 | ||||||
| 309 | re turn resul t; | |||||
| 310 | }; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.