kopia lustrzana https://github.com/wagtail/wagtail
Move snippet-chooser-modal.js to client js
rodzic
2af6ad3683
commit
1fc66294a4
|
@ -139,6 +139,7 @@ module.exports = {
|
|||
'wagtail/**/**',
|
||||
'client/src/entrypoints/documents/document-chooser-modal.js',
|
||||
'client/src/entrypoints/images/image-chooser-modal.js',
|
||||
'client/src/entrypoints/snippets/snippet-chooser-modal.js',
|
||||
],
|
||||
globals: {
|
||||
$: 'readonly',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS = {
|
||||
choose: function (modal, jsonData) {
|
||||
import $ from 'jquery';
|
||||
|
||||
window.SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS = {
|
||||
choose: function (modal) {
|
||||
function ajaxifyLinks(context) {
|
||||
$('a.snippet-choice', modal.body).on('click', function () {
|
||||
modal.loadUrl(this.href);
|
|
@ -66,7 +66,11 @@ module.exports = function exports(env, argv) {
|
|||
'document-chooser-modal',
|
||||
'document-chooser-telepath',
|
||||
],
|
||||
'snippets': ['snippet-chooser', 'snippet-chooser-telepath'],
|
||||
'snippets': [
|
||||
'snippet-chooser',
|
||||
'snippet-chooser-modal',
|
||||
'snippet-chooser-telepath',
|
||||
],
|
||||
'contrib/table_block': ['table'],
|
||||
'contrib/typed_table_block': ['typed_table_block'],
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue