Skip to content

Commit c1d82d3

Browse files
committed
bug fixing and targets file
1 parent b13bfb5 commit c1d82d3

File tree

3 files changed

+30
-80
lines changed

3 files changed

+30
-80
lines changed

src/Umbraco.Cms.Integrations.PIM.Inriver/App_Plugins/UmbracoCms.Integrations/PIM/Inriver/js/configuration.controller.js

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@
1313

1414
vm.showToast = showToast;
1515

16-
//vm.showToast({
17-
// color: 'danger',
18-
// headline: 'Algolia',
19-
// message: 'Index name and content schema are required.'
20-
//});
21-
2216
if ($scope.model.value == null) {
2317
$scope.model.value = {
2418
entityType: '',
2519
displayFieldTypeIds: []
2620
};
2721
}
2822
$scope.$on('formSubmitting', function (ev) {
29-
if (vm.selectedEntityType != undefined
23+
if (vm.selectedEntityType == undefined
3024
|| vm.selectedEntityType.value.length == 0
3125
|| vm.selectedFieldTypes.length == 0) {
3226
notificationsService.error("Inriver", "Entity type and display fields are required. Configuration was not saved.");
@@ -97,71 +91,6 @@
9791
});
9892
}
9993
}
100-
101-
/* Toast Config properties:
102-
* color
103-
* headline
104-
* message
105-
*/
106-
function showToast(config) {
107-
const con = document.querySelector('uui-toast-notification-container');
108-
109-
const toast = document.createElement('uui-toast-notification');
110-
toast.color = config.color;
111-
112-
const toastLayout = document.createElement('uui-toast-notification-layout');
113-
toastLayout.headline = config.headline;
114-
toast.appendChild(toastLayout);
115-
116-
const messageEl = document.createElement('span');
117-
messageEl.innerHTML = config.message;
118-
toastLayout.appendChild(messageEl);
119-
120-
if (con) {
121-
con.appendChild(toast);
122-
}
123-
}
124-
125-
/**
126-
* toggle rows selection with uui-checkbox - prototype
127-
* */
128-
vm._selectFieldType = function (fieldTypeId) {
129-
var fieldTypeIndex = vm.selectedFieldTypes.indexOf(fieldTypeId);
130-
if (fieldTypeIndex == -1) {
131-
vm.selectedFieldTypes.push(fieldTypeId);
132-
document.getElementById('chk' + fieldTypeId).setAttribute('checked', '');
133-
}
134-
else {
135-
document.getElementById('chk' + fieldTypeId).removeAttribute('checked');
136-
vm.selectedFieldTypes = vm.selectedFieldTypes.splice(fieldTypeIndex, 1);
137-
}
138-
}
139-
140-
vm._selectFieldTypes = function () {
141-
const selectAll = vm.selectedFieldTypes.length == 0;
142-
143-
vm.selectedFieldTypes = [];
144-
145-
console.log('select all', selectAll);
146-
if (selectAll == true) {
147-
vm.selectedFieldTypes = vm.fieldTypes.map(obj => obj.fieldTypeId);
148-
var elements = document.querySelectorAll("uui-checkbox");
149-
for (var i = 0; i < elements.length; i++) {
150-
elements[i].setAttribute("checked", "");
151-
}
152-
}
153-
else {
154-
var elements = document.querySelectorAll("uui-checkbox");
155-
for (var i = 0; i < elements.length; i++) {
156-
elements[i].removeAttribute("checked");
157-
}
158-
}
159-
160-
vm.fieldTypes = vm.fieldTypes.map(obj => {
161-
obj.selected = selectAll;
162-
return obj;
163-
});
164-
}
16594
}
16695

16796
angular.module("umbraco")

src/Umbraco.Cms.Integrations.PIM.Inriver/App_Plugins/UmbracoCms.Integrations/PIM/Inriver/views/configuration.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
<uui-table class="uui-text">
2222
<uui-table-column style="width: 60px;"></uui-table-column>
2323
<uui-table-head>
24-
<!--<uui-table-head-cell style="--uui-table-cell-padding: 0">
25-
<uui-checkbox style="padding: var(--uui-size-4) var(--uui-size-5);"
26-
ng-click="vm.selectFieldTypes()"></uui-checkbox>
27-
</uui-table-head-cell>-->
2824
<uui-table-head-cell>Id</uui-table-head-cell>
2925
<uui-table-head-cell>Name</uui-table-head-cell>
3026
</uui-table-head>
@@ -33,10 +29,6 @@
3329
ng-repeat="fieldType in vm.fieldTypes" selectable
3430
ng-on-selected="vm.selectFieldType(fieldType.fieldTypeId)"
3531
ng-on-unselected="vm.unselectFieldType(fieldType.fieldTypeId)">
36-
<!--<uui-table-cell>
37-
<uui-checkbox id="chk{{fieldType.fieldTypeId}}" ng-on-click="vm.selectFieldType(fieldType.fieldTypeId)">
38-
</uui-checkbox>
39-
</uui-table-cell>-->
4032
<uui-table-cell>{{fieldType.fieldTypeId}}</uui-table-cell>
4133
<uui-table-cell>{{fieldType.fieldTypeDisplayName}}</uui-table-cell>
4234
</uui-table-row>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<InriverPropertyEditorFilesPath>
4+
$(MSBuildThisFileDirectory)..\App_Plugins\UmbracoCms.Integrations\PIM\Inriver\**\*.*
5+
</InriverPropertyEditorFilesPath>
6+
</PropertyGroup>
7+
<Target Name="CopyInriverPropertyEditorAssets" BeforeTargets="Build">
8+
<ItemGroup>
9+
<InriverPropertyEditorFiles Include="$(InriverPropertyEditorFilesPath)" />
10+
</ItemGroup>
11+
<Message
12+
Text="Copying Inriver Property Editor files: $(InriverPropertyEditorFilesPath) - #@(InriverPropertyEditorFiles->Count()) files"
13+
Importance="high" />
14+
<Copy SourceFiles="@(InriverPropertyEditorFiles)"
15+
DestinationFiles="@(InriverPropertyEditorFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoCms.Integrations\PIM\Inriver\%(RecursiveDir)%(Filename)%(Extension)')"
16+
SkipUnchangedFiles="true" />
17+
18+
</Target>
19+
20+
<Target Name="ClearInriverPropertyEditorAssets" BeforeTargets="Clean">
21+
<ItemGroup>
22+
<InriverPropertyEditorDir
23+
Include="$(MSBuildProjectDirectory)\App_Plugins\UmbracoCms\PIM\Inriver\" />
24+
</ItemGroup>
25+
<Message Text="Clear old Inriver Property Editor data" Importance="high" />
26+
<RemoveDir Directories="@(InriverPropertyEditorDir)" />
27+
</Target>
28+
29+
</Project>

0 commit comments

Comments
 (0)