Skip to content

Commit d89ebdb

Browse files
committed
make it work on 8.4
1 parent f07d93b commit d89ebdb

File tree

7 files changed

+32
-50
lines changed

7 files changed

+32
-50
lines changed

appveyor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# version format
2-
version: 2.0.2.{build}
2+
version: 2.1.0.{build}
33

44
image: Visual Studio 2017
55

@@ -11,7 +11,7 @@ cache:
1111
install:
1212
- set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe;C:\Ruby22\bin;%PATH%
1313
- cmd: npm install -g gulp-cli
14-
- cmd: set UMBRACO_PACKAGE_MIN_VERSION=8.1.0
14+
- cmd: set UMBRACO_PACKAGE_MIN_VERSION=8.4.0
1515
- cmd: cd BuildPackage
1616
- cmd: Build.bat
1717

@@ -39,9 +39,9 @@ deploy:
3939
appveyor_repo_tag: true
4040

4141
- provider: GitHub
42-
tag: v2.0.2
43-
release: Release 2.0.2
44-
description: "v8 bugfixes"
42+
tag: v2.1.0
43+
release: Release 2.1.0
44+
description: "8.4 bugfixes"
4545
force_update: true
4646
auth_token:
4747
secure: Otbl8p8qCwciDqJgSWCyN0Arfs5XS1CwiHcK+r0F6uz9Rxt4gzBFvlc3cjPV3NxR
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(() => {
2+
3+
angular.module('nc.components', []);
4+
5+
angular.module('nc', [
6+
'nc.components'
7+
]);
8+
9+
angular.module('umbraco').requires.push('nc');
10+
11+
for (let q of angular.module('umbraco')._invokeQueue) {
12+
if (q[2][0] === 'nestedContentPropertyEditor') {
13+
const pattern = /<div class="umb-nested-content__icons">/gmi;
14+
q[2][1].template = q[2][1].template.replace(pattern, '$&<nc-toggle node="node" index="$index" model="$parent.$parent.model"></nc-toggle>');
15+
}
16+
}
17+
18+
})();

src/NestingContently/backoffice/button.component.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
function controller($element, $scope, locale) {
55

66
let prop = {};
7-
let labels = {};
7+
let labels = {};
88
let disabled = false;
99

1010
locale.localizeMany(['actions_enable','actions_disable']).then(data => {
1111
labels.enable = data[0];
1212
labels.disable = data[1];
1313
});
14-
14+
1515
const disabledClass = 'umb-nested-content__item--disabled';
1616
const itemClass = '.umb-nested-content__item';
1717
const editorName = 'NestingContently';
@@ -26,15 +26,14 @@
2626

2727
prop.value = disabled ? 1 : 0;
2828

29-
this.parent.model.value[this.index].disabled = disabled;
30-
this.parent.$parent.$parent.model.value[this.index].disabled = disabled;
29+
this.model.value[this.index].disabled = disabled;
3130

3231
setTitle();
3332
setClass('toggle');
3433
}
3534

3635
this.$onInit = () => {
37-
if (this.node) {
36+
if (this.node) {
3837
const props = this.node.variants[0].tabs[0]
3938
.properties.filter(p => p.editor === editorName);
4039

@@ -67,13 +66,13 @@
6766
bindings: {
6867
node: '<',
6968
index: '<',
70-
parent: '<'
69+
model: '<'
7170
},
7271
controller: controller,
7372
template: template
7473
};
7574

7675
controller.$inject = ['$element', '$scope', 'localizationService'];
7776

78-
angular.module('umbraco.directives').component('ncToggle', component);
77+
angular.module('nc.components').component('ncToggle', component);
7978
})();

src/NestingContently/backoffice/editor.controller.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@
1717
}
1818

1919
angular.module('umbraco').controller('nestingContentlyController', ['$element', nestingContently]);
20-
})();
21-
20+
})();
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<div ng-controller="nestingContentlyController as vm">
2-
{{ model.value }}
3-
</div>
1+
<div ng-controller="nestingContentlyController as vm"></div>

src/NestingContently/backoffice/interceptor.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/NestingContently/package.dev.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
'~/app_plugins/nestingcontently/backoffice/styles.css'
1414
],
1515
javascript: [
16+
'~/app_plugins/nestingcontently/backoffice/app.js',
1617
'~/app_plugins/nestingcontently/backoffice/editor.controller.js',
17-
'~/app_plugins/nestingcontently/backoffice/interceptor.js',
1818
'~/app_plugins/nestingcontently/backoffice/button.component.js'
1919

2020
]

0 commit comments

Comments
 (0)