Skip to content

Commit 54eeaed

Browse files
ZeegaanNikolaj Geisle
andauthored
v9: bugfix 11228 Blocklist stylesheet path includes wwwroot (#11298)
* Update blocklist.blockconfiguration.overlay.controller.js * Removed obsolete property sets, and switched to staticfilePicker Signed-off-by: Nikolaj Geisle <[email protected]> Co-authored-by: Nikolaj Geisle <[email protected]>
1 parent bef1cce commit 54eeaed

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
}
110110
]
111111
};
112-
112+
113113
editorService.contentTypePicker(settingsTypePicker);
114114

115115
});
@@ -179,7 +179,7 @@
179179
},
180180
close: () => editorService.close()
181181
};
182-
182+
183183
editorService.filePicker(filePicker);
184184

185185
});
@@ -206,26 +206,26 @@
206206
};
207207

208208
vm.addStylesheetForBlock = function(block) {
209-
localizationService.localize("blockEditor_headlineAddCustomStylesheet").then(localizedTitle => {
210-
211-
const filePicker = {
212-
title: localizedTitle,
213-
isDialog: true,
214-
filter: i => {
215-
return !(i.name.indexOf(".css") !== -1);
216-
},
217-
filterCssClass: "not-allowed",
218-
select: node => {
219-
const filepath = decodeURIComponent(node.id.replace(/\+/g, " "));
220-
block.stylesheet = "~/" + filepath;
221-
editorService.close();
222-
},
223-
close: () => editorService.close()
224-
};
209+
localizationService.localize("blockEditor_headlineAddCustomStylesheet").then(localizedTitle => {
210+
211+
const filePicker = {
212+
title: localizedTitle,
213+
isDialog: true,
214+
filter: i => {
215+
return !(i.name.indexOf(".css") !== -1);
216+
},
217+
filterCssClass: "not-allowed",
218+
select: node => {
219+
const filepath = decodeURIComponent(node.id.replace(/\+/g, " "));
220+
block.stylesheet = "~/" + filepath.replace("wwwroot/", "");
221+
editorService.close();
222+
},
223+
close: () => editorService.close()
224+
};
225225

226-
editorService.filePicker(filePicker);
226+
editorService.staticFilePicker(filePicker);
227227

228-
});
228+
});
229229
};
230230

231231
vm.requestRemoveStylesheetForBlock = function(block) {
@@ -251,7 +251,7 @@
251251
vm.addThumbnailForBlock = function(block) {
252252

253253
localizationService.localize("blockEditor_headlineAddThumbnail").then(localizedTitle => {
254-
254+
255255
let allowedFileExtensions = ['jpg', 'jpeg', 'png', 'svg', 'webp', 'gif'];
256256

257257
const thumbnailPicker = {
@@ -269,7 +269,7 @@
269269
},
270270
close: () => editorService.close()
271271
};
272-
272+
273273
editorService.staticFilePicker(thumbnailPicker);
274274

275275
});

0 commit comments

Comments
 (0)