Skip to content

Commit 748aa7b

Browse files
committed
prettier fix
1 parent 3337869 commit 748aa7b

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

sfdx-source/LabsActionPlans/main/default/components/APLightningLookup.component

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ For full license text, see the LICENSE file in the repo root or https://opensour
182182
checkinput();
183183
</script>
184184
<apex:inputhidden value="{!sObj[field]}" id="HiddenInput" />
185-
</apex:component>
185+
</apex:component>

sfdx-source/LabsActionPlans/main/default/pages/ActionPlanCreation.page

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -192,50 +192,50 @@ For full license text, see the LICENSE file in the repo root or https://opensour
192192
{ escape: true }
193193
);
194194
},
195-
searchRecords: function (key) {
196-
j$('#' + key.attr('aria-activedescendant')).show();
197-
//Grabbing The Input Field Value
198-
var searchKey = key.val();
199-
if (searchKey == '') {
200-
j$('#' + key.attr('aria-activedescendant')).hide();
201-
}
202-
var searchList = '';
203-
Visualforce.remoting.Manager.invokeAction(
204-
'{!$RemoteAction.ActionPlanCreationController.searchTemplates}',
205-
searchKey,
206-
function (result, event) {
207-
if (event.status) {
208-
records = result;
209-
if (records.length > 0) {
210-
for (var i = 0; i < records.length; i++) {
211-
//List Elements With Onclick and ID Attributes
212-
var objectIcon = '{!URLFOR($Asset.SLDS, "assets/icons/custom-sprite/svg/symbols.svg#custom39")}';
213-
// Escape HTML to prevent XSS attacks
214-
var escapedName = j$('<div>').text(records[i].Name).html();
215-
var escapedId = j$('<div>').text(records[i].Id).html();
216-
searchList +=
217-
'<li onclick="LightningLookupScripts.recInfo(\'' +
218-
escapedId.replace(/'/g, "\\'") +
219-
'\');" class="slds-lookup__item"><a id="' +
220-
escapedId +
221-
'" href="#" role="option"><svg aria-hidden="true" class="slds-icon slds-icon-custom-custom39 slds-icon_small">' +
222-
'<use xlink:href="' +
223-
objectIcon +
224-
'"></use></svg>' +
225-
escapedName +
226-
'</a></li>';
195+
searchRecords: function (key) {
196+
j$('#' + key.attr('aria-activedescendant')).show();
197+
//Grabbing The Input Field Value
198+
var searchKey = key.val();
199+
if (searchKey == '') {
200+
j$('#' + key.attr('aria-activedescendant')).hide();
201+
}
202+
var searchList = '';
203+
Visualforce.remoting.Manager.invokeAction(
204+
'{!$RemoteAction.ActionPlanCreationController.searchTemplates}',
205+
searchKey,
206+
function (result, event) {
207+
if (event.status) {
208+
records = result;
209+
if (records.length > 0) {
210+
for (var i = 0; i < records.length; i++) {
211+
//List Elements With Onclick and ID Attributes
212+
var objectIcon = '{!URLFOR($Asset.SLDS, "assets/icons/custom-sprite/svg/symbols.svg#custom39")}';
213+
// Escape HTML to prevent XSS attacks
214+
var escapedName = j$('<div>').text(records[i].Name).html();
215+
var escapedId = j$('<div>').text(records[i].Id).html();
216+
searchList +=
217+
'<li onclick="LightningLookupScripts.recInfo(\'' +
218+
escapedId.replace(/'/g, "\\'") +
219+
'\');" class="slds-lookup__item"><a id="' +
220+
escapedId +
221+
'" href="#" role="option"><svg aria-hidden="true" class="slds-icon slds-icon-custom-custom39 slds-icon_small">' +
222+
'<use xlink:href="' +
223+
objectIcon +
224+
'"></use></svg>' +
225+
escapedName +
226+
'</a></li>';
227+
}
228+
} else {
229+
searchList += '<li class="slds-lookup__item">No Records Found</li>';
227230
}
231+
j$('[id$=searchResultsUL]').html(searchList);
228232
} else {
229-
searchList += '<li class="slds-lookup__item">No Records Found</li>';
233+
alert(event.message);
230234
}
231-
j$('[id$=searchResultsUL]').html(searchList);
232-
} else {
233-
alert(event.message);
234-
}
235-
},
236-
{ escape: true }
237-
);
238-
}
235+
},
236+
{ escape: true }
237+
);
238+
}
239239
};
240240
checkinput();
241241
</script>

0 commit comments

Comments
 (0)