kopia lustrzana https://github.com/wagtail/wagtail
Moved TableBlock block's table.js into client
rodzic
24d393d7cb
commit
84010b92a7
client
src/entrypoints/contrib/table_block
wagtail/contrib/table_block/static/table_block/js
|
@ -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;
|
|
@ -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 = {};
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/table.js
|
||||
/table.js.map
|
Ładowanie…
Reference in New Issue