Skip to content

Commit fa0f751

Browse files
author
Sacha Trauwaen
committed
CollectionField
contain filter in place of start on display name in dnn user data source
1 parent 8881b2d commit fa0f751

File tree

7 files changed

+112
-4
lines changed

7 files changed

+112
-4
lines changed

OpenContent/Components/Datasource/DnnUsersDataSource.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public override IDataItems GetAll(DataSourceContext context, Select selectQuery)
140140

141141
if (ruleDisplayName != null)
142142
{
143-
string displayName = ruleDisplayName.Value.AsString + "%";
143+
string displayName = "%"+ruleDisplayName.Value.AsString + "%";
144144
users = UserController.GetUsersByDisplayName(context.PortalId, displayName, pageIndex, pageSize, ref total, true, false).Cast<UserInfo>();
145145
}
146146
else

OpenContent/OpenContent.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,7 @@
12811281
<Content Include="js\summernote\font\summernote.woff" />
12821282
<Content Include="js\swagger\fonts\DroidSans-Bold.ttf" />
12831283
<Content Include="js\swagger\fonts\DroidSans.ttf" />
1284+
<Content Include="lama\src\components\CollectionField.vue" />
12841285
<None Include="packages.config" />
12851286
<None Include="Scripts\_references.js" />
12861287
<Content Include="js\select2\select2.css" />

OpenContent/js/lamaengine.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,14 @@ alpacaEngine.engine = function (config) {
386386

387387
} else if (config.query.type == "relation") {
388388
var postData = {
389+
"collection": config.query.collection,
389390
"dataKey": config.query.dataKey,
390391
"valueField": config.query.valueField,
391392
"textField": config.query.textField
392393
};
393394
$.ajax({
394395
//url: self.sf.getServiceRoot(self.options.dataService.module) + self.options.dataService.controller + "/" + self.options.dataService.action,
395-
url: self.sf.getServiceRoot("OpenContent") + "OpenContentAPI" + "/" + "LookupData",
396+
url: self.sf.getServiceRoot("OpenContent") + "OpenContentAPI" + "/" + config.query.action,
396397
beforeSend: self.sf.setModuleHeaders,
397398

398399
type: "post",

OpenContent/lama/dist/js/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)