Moved TableBlock block's table.js into client

pull/6931/head
Karl Hobley 2021-01-07 16:36:43 +00:00 zatwierdzone przez Matt Westcott
rodzic 24d393d7cb
commit 84010b92a7
3 zmienionych plików z 20 dodań i 6 usunięć
client
src/entrypoints/contrib/table_block
wagtail/contrib/table_block/static/table_block/js

Wyświetl plik

@ -1,4 +1,4 @@
'use strict';
/* eslint-disable */
function initTable(id, tableOptions) {
var containerId = id + '-handsontable-container';
@ -172,3 +172,4 @@ function initTable(id, tableOptions) {
});
}
}
window.initTable = initTable;

Wyświetl plik

@ -2,7 +2,15 @@ const path = require('path');
// Generates a path to the output bundle to be loaded in the browser.
const getOutputPath = (app, filename) => {
const appLabel = (app === 'documents' ? 'wagtaildocs' : `wagtail${app}`);
let appLabel = `wagtail${app}`;
// Exceptions
if (app === 'documents') {
appLabel = 'wagtaildocs';
} else if (app === 'contrib/table_block') {
appLabel = 'table_block';
}
return path.join('wagtail', app, 'static', appLabel, 'js', filename);
};
@ -17,7 +25,7 @@ const exposedDependencies = {
module.exports = function exports() {
const entrypoints = {
admin: [
'admin': [
'blocks/list',
'blocks/sequence',
'blocks/stream',
@ -47,18 +55,21 @@ module.exports = function exports() {
'workflow-action',
'workflow-status',
],
images: [
'images': [
'image-chooser',
'image-chooser-telepath',
],
documents: [
'documents': [
'document-chooser',
'document-chooser-telepath',
],
snippets: [
'snippets': [
'snippet-chooser',
'snippet-chooser-telepath',
],
'contrib/table_block': [
'table',
],
};
const entry = {};

Wyświetl plik

@ -0,0 +1,2 @@
/table.js
/table.js.map