2017-03-07 13:59:18 +00:00
|
|
|
/*
|
|
|
|
* Global UI elements references
|
|
|
|
*/
|
2019-05-24 03:40:16 +00:00
|
|
|
/* global $ */
|
2017-03-07 13:59:18 +00:00
|
|
|
|
|
|
|
export const getUIElements = () => ({
|
2017-03-09 07:39:42 +00:00
|
|
|
spinner: $('.ui-spinner'),
|
|
|
|
content: $('.ui-content'),
|
|
|
|
toolbar: {
|
|
|
|
shortStatus: $('.ui-short-status'),
|
|
|
|
status: $('.ui-status'),
|
|
|
|
new: $('.ui-new'),
|
|
|
|
publish: $('.ui-publish'),
|
|
|
|
extra: {
|
|
|
|
revision: $('.ui-extra-revision'),
|
|
|
|
slide: $('.ui-extra-slide')
|
2017-03-07 13:59:18 +00:00
|
|
|
},
|
2017-03-09 07:39:42 +00:00
|
|
|
download: {
|
|
|
|
markdown: $('.ui-download-markdown'),
|
|
|
|
html: $('.ui-download-html'),
|
|
|
|
rawhtml: $('.ui-download-raw-html'),
|
|
|
|
pdf: $('.ui-download-pdf-beta')
|
2017-03-07 13:59:18 +00:00
|
|
|
},
|
2017-03-09 07:39:42 +00:00
|
|
|
export: {
|
|
|
|
dropbox: $('.ui-save-dropbox'),
|
|
|
|
gist: $('.ui-save-gist'),
|
|
|
|
snippet: $('.ui-save-snippet')
|
2017-03-07 13:59:18 +00:00
|
|
|
},
|
2017-03-09 07:39:42 +00:00
|
|
|
import: {
|
|
|
|
dropbox: $('.ui-import-dropbox'),
|
|
|
|
gist: $('.ui-import-gist'),
|
|
|
|
snippet: $('.ui-import-snippet'),
|
|
|
|
clipboard: $('.ui-import-clipboard')
|
2017-03-07 13:59:18 +00:00
|
|
|
},
|
2017-03-09 07:39:42 +00:00
|
|
|
mode: $('.ui-mode'),
|
|
|
|
edit: $('.ui-edit'),
|
|
|
|
view: $('.ui-view'),
|
|
|
|
both: $('.ui-both'),
|
2017-12-28 18:21:52 +00:00
|
|
|
night: $('.ui-night'),
|
2017-03-09 07:39:42 +00:00
|
|
|
uploadImage: $('.ui-upload-image')
|
|
|
|
},
|
|
|
|
infobar: {
|
|
|
|
lastchange: $('.ui-lastchange'),
|
|
|
|
lastchangeuser: $('.ui-lastchangeuser'),
|
|
|
|
nolastchangeuser: $('.ui-no-lastchangeuser'),
|
|
|
|
permission: {
|
|
|
|
permission: $('.ui-permission'),
|
|
|
|
label: $('.ui-permission-label'),
|
|
|
|
freely: $('.ui-permission-freely'),
|
|
|
|
editable: $('.ui-permission-editable'),
|
|
|
|
locked: $('.ui-permission-locked'),
|
|
|
|
private: $('.ui-permission-private'),
|
|
|
|
limited: $('.ui-permission-limited'),
|
|
|
|
protected: $('.ui-permission-protected')
|
|
|
|
},
|
|
|
|
delete: $('.ui-delete-note')
|
|
|
|
},
|
|
|
|
toc: {
|
|
|
|
toc: $('.ui-toc'),
|
|
|
|
affix: $('.ui-affix-toc'),
|
|
|
|
label: $('.ui-toc-label'),
|
|
|
|
dropdown: $('.ui-toc-dropdown')
|
|
|
|
},
|
|
|
|
area: {
|
|
|
|
edit: $('.ui-edit-area'),
|
|
|
|
view: $('.ui-view-area'),
|
|
|
|
codemirror: $('.ui-edit-area .CodeMirror'),
|
|
|
|
codemirrorScroll: $('.ui-edit-area .CodeMirror .CodeMirror-scroll'),
|
|
|
|
codemirrorSizer: $('.ui-edit-area .CodeMirror .CodeMirror-sizer'),
|
|
|
|
codemirrorSizerInner: $(
|
2018-11-14 13:10:14 +00:00
|
|
|
'.ui-edit-area .CodeMirror .CodeMirror-sizer > div'
|
2017-03-09 07:39:42 +00:00
|
|
|
),
|
2020-06-01 15:01:17 +00:00
|
|
|
codemirrorLines: $(
|
|
|
|
'.ui-edit-area .CodeMirror .CodeMirror-lines'
|
|
|
|
),
|
2017-03-09 07:39:42 +00:00
|
|
|
markdown: $('.ui-view-area .markdown-body'),
|
|
|
|
resize: {
|
|
|
|
handle: $('.ui-resizable-handle'),
|
|
|
|
syncToggle: $('.ui-sync-toggle')
|
2017-03-07 13:59:18 +00:00
|
|
|
}
|
2017-03-09 07:39:42 +00:00
|
|
|
},
|
|
|
|
modal: {
|
|
|
|
snippetImportProjects: $('#snippetImportModalProjects'),
|
|
|
|
snippetImportSnippets: $('#snippetImportModalSnippets'),
|
2019-08-25 03:02:15 +00:00
|
|
|
revision: $('#revisionModal'),
|
|
|
|
pandocExport: $('.pandoc-export-modal')
|
2017-03-09 07:39:42 +00:00
|
|
|
}
|
2017-03-07 13:59:18 +00:00
|
|
|
})
|
|
|
|
|
2017-03-09 07:39:42 +00:00
|
|
|
export default getUIElements
|