2016-06-17 15:48:33 +02:00
|
|
|
/**
|
|
|
|
* Test stubs to mirror available global variables.
|
|
|
|
* Those variables usually come from the back-end via templates.
|
|
|
|
* See /wagtailadmin/templates/wagtailadmin/admin_base.html.
|
|
|
|
*/
|
2018-02-09 23:07:29 +01:00
|
|
|
import 'element-closest';
|
2016-06-17 15:48:33 +02:00
|
|
|
|
2016-02-26 22:10:54 +01:00
|
|
|
global.wagtailConfig = {
|
2016-06-17 15:48:33 +02:00
|
|
|
ADMIN_API: {
|
2019-11-05 12:39:48 +01:00
|
|
|
DOCUMENTS: '/admin/api/main/documents/',
|
|
|
|
IMAGES: '/admin/api/main/images/',
|
|
|
|
PAGES: '/admin/api/main/pages/',
|
2017-02-12 16:29:56 +01:00
|
|
|
EXTRA_CHILDREN_PARAMETERS: '',
|
2016-06-17 15:48:33 +02:00
|
|
|
},
|
|
|
|
ADMIN_URLS: {
|
|
|
|
PAGES: '/admin/pages/',
|
|
|
|
},
|
2017-02-09 16:52:07 +01:00
|
|
|
DATE_FORMATTING: {
|
|
|
|
DATE_FORMAT: 'MMM. D, YYYY',
|
|
|
|
SHORT_DATE_FORMAT: 'DD/MM/YYYY',
|
|
|
|
},
|
2016-06-17 15:48:33 +02:00
|
|
|
STRINGS: {
|
2018-01-17 15:39:47 +01:00
|
|
|
DELETE: 'Delete',
|
2020-07-23 14:55:38 +02:00
|
|
|
EDIT: 'Edit',
|
2017-02-12 16:29:56 +01:00
|
|
|
PAGE: 'Page',
|
|
|
|
PAGES: 'Pages',
|
2018-01-26 15:04:15 +01:00
|
|
|
LOADING: 'Loading…',
|
2016-06-17 15:48:33 +02:00
|
|
|
NO_RESULTS: 'No results',
|
2018-01-17 15:39:47 +01:00
|
|
|
SERVER_ERROR: 'Server Error',
|
2017-02-12 16:29:56 +01:00
|
|
|
SEE_ALL: 'See all',
|
|
|
|
CLOSE_EXPLORER: 'Close explorer',
|
2018-01-17 15:39:47 +01:00
|
|
|
ALT_TEXT: 'Alt text',
|
2021-01-27 12:36:56 +01:00
|
|
|
DECORATIVE_IMAGE: 'Decorative image',
|
2018-01-17 15:39:47 +01:00
|
|
|
WRITE_HERE: 'Write here…',
|
2018-01-18 17:31:15 +01:00
|
|
|
HORIZONTAL_LINE: 'Horizontal line',
|
|
|
|
LINE_BREAK: 'Line break',
|
|
|
|
UNDO: 'Undo',
|
|
|
|
REDO: 'Redo',
|
2018-02-27 16:34:22 +01:00
|
|
|
RELOAD_PAGE: 'Reload the page',
|
2018-04-02 16:50:02 +02:00
|
|
|
RELOAD_EDITOR: 'Reload saved content',
|
2018-02-27 16:34:22 +01:00
|
|
|
SHOW_LATEST_CONTENT: 'Show latest content',
|
2018-04-02 18:03:06 +02:00
|
|
|
SHOW_ERROR: 'Show error',
|
2018-02-27 16:34:22 +01:00
|
|
|
EDITOR_CRASH: 'The editor just crashed. Content has been reset to the last saved version.',
|
2019-02-02 18:04:01 +01:00
|
|
|
BROKEN_LINK: 'Broken link',
|
|
|
|
MISSING_DOCUMENT: 'Missing document',
|
2019-06-17 16:56:48 +02:00
|
|
|
CLOSE: 'Close',
|
2019-06-19 16:19:41 +02:00
|
|
|
EDIT_PAGE: 'Edit \'{title}\'',
|
|
|
|
VIEW_CHILD_PAGES_OF_PAGE: 'View child pages of \'{title}\'',
|
2019-06-20 19:02:28 +02:00
|
|
|
PAGE_EXPLORER: 'Page explorer',
|
2020-12-04 12:13:45 +01:00
|
|
|
SAVE: 'Save',
|
|
|
|
SAVING: 'Saving...',
|
|
|
|
CANCEL: 'Cancel',
|
|
|
|
DELETING: 'Deleting...',
|
2021-03-25 10:56:27 +01:00
|
|
|
ADD_A_COMMENT: 'Add a comment',
|
2020-12-04 12:13:45 +01:00
|
|
|
SHOW_COMMENTS: 'Show comments',
|
|
|
|
REPLY: 'Reply',
|
2020-12-03 13:11:07 +01:00
|
|
|
RESOLVE: 'Resolve',
|
2020-12-04 12:13:45 +01:00
|
|
|
RETRY: 'Retry',
|
|
|
|
DELETE_ERROR: 'Delete error',
|
|
|
|
CONFIRM_DELETE_COMMENT: 'Are you sure?',
|
|
|
|
SAVE_ERROR: 'Save error',
|
2020-12-17 17:41:38 +01:00
|
|
|
SAVE_COMMENT_WARNING: 'This will be saved when the page is saved',
|
2020-12-04 12:13:45 +01:00
|
|
|
FOCUS_COMMENT: 'Focus comment',
|
2021-04-23 18:53:54 +02:00
|
|
|
UNFOCUS_COMMENT: 'Unfocus comment',
|
|
|
|
SAVE_PAGE_TO_ADD_COMMENT: 'Save the page to add this comment',
|
2021-04-26 16:51:17 +02:00
|
|
|
SAVE_PAGE_TO_SAVE_COMMENT_CHANGES: 'Save the page to save this comment',
|
2021-04-26 16:56:25 +02:00
|
|
|
SAVE_PAGE_TO_SAVE_REPLY: 'Save the page to save this reply',
|
2016-02-26 22:10:54 +01:00
|
|
|
},
|
2020-10-22 17:24:41 +02:00
|
|
|
WAGTAIL_I18N_ENABLED: true,
|
|
|
|
LOCALES: [
|
|
|
|
{
|
|
|
|
code: 'en',
|
|
|
|
display_name: 'English'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: 'fr',
|
|
|
|
display_nam: 'French'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
ACTIVE_LOCALE: 'en'
|
2016-02-26 22:10:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
global.wagtailVersion = '1.6a1';
|
2018-02-02 23:11:21 +01:00
|
|
|
|
2018-04-17 23:27:07 +02:00
|
|
|
global.wagtail = {};
|
|
|
|
|
2018-02-02 23:11:21 +01:00
|
|
|
global.chooserUrls = {
|
|
|
|
documentChooser: '/admin/documents/chooser/',
|
|
|
|
emailLinkChooser: '/admin/choose-email-link/',
|
2019-08-13 18:24:00 +02:00
|
|
|
anchorLinkChooser: '/admin/choose-anchor-link',
|
2018-02-02 23:11:21 +01:00
|
|
|
embedsChooser: '/admin/embeds/chooser/',
|
|
|
|
externalLinkChooser: '/admin/choose-external-link/',
|
|
|
|
imageChooser: '/admin/images/chooser/',
|
|
|
|
pageChooser: '/admin/choose-page/',
|
|
|
|
};
|
|
|
|
|
2018-06-01 23:40:23 +02:00
|
|
|
/* use dummy content for onload handlers just so that we can verify that we've chosen the right one */
|
|
|
|
global.IMAGE_CHOOSER_MODAL_ONLOAD_HANDLERS = { type: 'image' };
|
|
|
|
global.PAGE_CHOOSER_MODAL_ONLOAD_HANDLERS = { type: 'page' };
|
2018-06-04 17:56:36 +02:00
|
|
|
global.EMBED_CHOOSER_MODAL_ONLOAD_HANDLERS = { type: 'embed' };
|
2018-06-04 22:37:37 +02:00
|
|
|
global.DOCUMENT_CHOOSER_MODAL_ONLOAD_HANDLERS = { type: 'document' };
|