|
109 | 109 | }
|
110 | 110 | ]
|
111 | 111 | };
|
112 |
| - |
| 112 | + |
113 | 113 | editorService.contentTypePicker(settingsTypePicker);
|
114 | 114 |
|
115 | 115 | });
|
|
179 | 179 | },
|
180 | 180 | close: () => editorService.close()
|
181 | 181 | };
|
182 |
| - |
| 182 | + |
183 | 183 | editorService.filePicker(filePicker);
|
184 | 184 |
|
185 | 185 | });
|
|
206 | 206 | };
|
207 | 207 |
|
208 | 208 | 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 | + }; |
225 | 225 |
|
226 |
| - editorService.filePicker(filePicker); |
| 226 | + editorService.staticFilePicker(filePicker); |
227 | 227 |
|
228 |
| - }); |
| 228 | + }); |
229 | 229 | };
|
230 | 230 |
|
231 | 231 | vm.requestRemoveStylesheetForBlock = function(block) {
|
|
251 | 251 | vm.addThumbnailForBlock = function(block) {
|
252 | 252 |
|
253 | 253 | localizationService.localize("blockEditor_headlineAddThumbnail").then(localizedTitle => {
|
254 |
| - |
| 254 | + |
255 | 255 | let allowedFileExtensions = ['jpg', 'jpeg', 'png', 'svg', 'webp', 'gif'];
|
256 | 256 |
|
257 | 257 | const thumbnailPicker = {
|
|
269 | 269 | },
|
270 | 270 | close: () => editorService.close()
|
271 | 271 | };
|
272 |
| - |
| 272 | + |
273 | 273 | editorService.staticFilePicker(thumbnailPicker);
|
274 | 274 |
|
275 | 275 | });
|
|
0 commit comments