3 <html lang=
"en" class=
"no-js">
7 <meta name=
"viewport" content=
"width=device-width,initial-scale=1">
12 <link rel=
"icon" href=
"../../assets/default.favicon.ico">
13 <meta name=
"generator" content=
"mkdocs-1.1.2, mkdocs-material-7.1.0">
17 <title>User Interface - WoltLab Suite Documentation
</title>
21 <link rel=
"stylesheet" href=
"../../assets/stylesheets/main.33e2939f.min.css">
24 <link rel=
"stylesheet" href=
"../../assets/stylesheets/palette.ef6f36e2.min.css">
28 <meta name=
"theme-color" content=
"#009485">
38 <link rel=
"stylesheet" href=
"../../stylesheets/extra.css">
52 <body dir=
"ltr" data-md-color-scheme=
"" data-md-color-primary=
"teal" data-md-color-accent=
"">
55 <script>function __prefix(e){return new URL(
"../..",location).pathname+
"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}
</script>
57 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
58 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
59 <label class=
"md-overlay" for=
"__drawer"></label>
60 <div data-md-component=
"skip">
63 <a href=
"#user-interface-javascript-api" class=
"md-skip">
68 <div data-md-component=
"announce">
70 <aside class=
"md-announce">
71 <div class=
"md-announce__inner md-grid md-typeset">
73 <a href=
"https://www.woltlab.com">Back to
<strong>woltlab.com
</strong></a>
80 <header class=
"md-header" data-md-component=
"header">
81 <nav class=
"md-header__inner md-grid" aria-label=
"Header">
82 <a href=
"../.." title=
"WoltLab Suite Documentation" class=
"md-header__button md-logo" aria-label=
"WoltLab Suite Documentation" data-md-component=
"logo">
84 <img src=
"../../assets/logo.png" alt=
"logo">
87 <label class=
"md-header__button md-icon" for=
"__drawer">
88 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
90 <div class=
"md-header__title" data-md-component=
"header-title">
91 <div class=
"md-header__ellipsis">
92 <div class=
"md-header__topic">
93 <span class=
"md-ellipsis">
94 WoltLab Suite Documentation
97 <div class=
"md-header__topic" data-md-component=
"header-topic">
98 <span class=
"md-ellipsis">
109 <label class=
"md-header__button md-icon" for=
"__search">
110 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
113 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
114 <label class=
"md-search__overlay" for=
"__search"></label>
115 <div class=
"md-search__inner" role=
"search">
116 <form class=
"md-search__form" name=
"search">
117 <input type=
"text" class=
"md-search__input" name=
"query" aria-label=
"Search" placeholder=
"Search" autocapitalize=
"off" autocorrect=
"off" autocomplete=
"off" spellcheck=
"false" data-md-component=
"search-query" data-md-state=
"active" required
>
118 <label class=
"md-search__icon md-icon" for=
"__search">
119 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
120 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
122 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
123 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
126 <div class=
"md-search__output">
127 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
128 <div class=
"md-search-result" data-md-component=
"search-result">
129 <div class=
"md-search-result__meta">
132 <ol class=
"md-search-result__list"></ol>
140 <div class=
"md-header__source">
142 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
143 <div class=
"md-source__icon md-icon">
145 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
147 <div class=
"md-source__repository">
156 <div class=
"md-container" data-md-component=
"container">
161 <main class=
"md-main" data-md-component=
"main">
162 <div class=
"md-main__inner md-grid">
166 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
167 <div class=
"md-sidebar__scrollwrap">
168 <div class=
"md-sidebar__inner">
172 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
173 <label class=
"md-nav__title" for=
"__drawer">
174 <a href=
"../.." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation" data-md-component=
"logo">
176 <img src=
"../../assets/logo.png" alt=
"logo">
179 WoltLab Suite Documentation
182 <div class=
"md-nav__source">
184 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
185 <div class=
"md-source__icon md-icon">
187 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
189 <div class=
"md-source__repository">
195 <ul class=
"md-nav__list" data-md-scrollfix
>
204 <li class=
"md-nav__item">
205 <a href=
"../../getting-started/" class=
"md-nav__link">
220 <li class=
"md-nav__item md-nav__item--nested">
223 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" >
225 <label class=
"md-nav__link" for=
"__nav_2">
227 <span class=
"md-nav__icon md-icon"></span>
229 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
230 <label class=
"md-nav__title" for=
"__nav_2">
231 <span class=
"md-nav__icon md-icon"></span>
234 <ul class=
"md-nav__list" data-md-scrollfix
>
240 <li class=
"md-nav__item">
241 <a href=
"../../php/pages/" class=
"md-nav__link">
252 <li class=
"md-nav__item">
253 <a href=
"../../php/database-objects/" class=
"md-nav__link">
264 <li class=
"md-nav__item">
265 <a href=
"../../php/database-access/" class=
"md-nav__link">
276 <li class=
"md-nav__item">
277 <a href=
"../../php/exceptions/" class=
"md-nav__link">
289 <li class=
"md-nav__item md-nav__item--nested">
292 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" >
294 <label class=
"md-nav__link" for=
"__nav_2_5">
296 <span class=
"md-nav__icon md-icon"></span>
298 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
299 <label class=
"md-nav__title" for=
"__nav_2_5">
300 <span class=
"md-nav__icon md-icon"></span>
303 <ul class=
"md-nav__list" data-md-scrollfix
>
310 <li class=
"md-nav__item md-nav__item--nested">
313 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_1" type=
"checkbox" id=
"__nav_2_5_1" >
315 <label class=
"md-nav__link" for=
"__nav_2_5_1">
317 <span class=
"md-nav__icon md-icon"></span>
319 <nav class=
"md-nav" aria-label=
"Caches" data-md-level=
"3">
320 <label class=
"md-nav__title" for=
"__nav_2_5_1">
321 <span class=
"md-nav__icon md-icon"></span>
324 <ul class=
"md-nav__list" data-md-scrollfix
>
330 <li class=
"md-nav__item">
331 <a href=
"../../php/api/caches/" class=
"md-nav__link">
342 <li class=
"md-nav__item">
343 <a href=
"../../php/api/caches_persistent-caches/" class=
"md-nav__link">
354 <li class=
"md-nav__item">
355 <a href=
"../../php/api/caches_runtime-caches/" class=
"md-nav__link">
372 <li class=
"md-nav__item">
373 <a href=
"../../php/api/comments/" class=
"md-nav__link">
384 <li class=
"md-nav__item">
385 <a href=
"../../php/api/cronjobs/" class=
"md-nav__link">
396 <li class=
"md-nav__item">
397 <a href=
"../../php/api/events/" class=
"md-nav__link">
409 <li class=
"md-nav__item md-nav__item--nested">
412 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" >
414 <label class=
"md-nav__link" for=
"__nav_2_5_5">
416 <span class=
"md-nav__icon md-icon"></span>
418 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
419 <label class=
"md-nav__title" for=
"__nav_2_5_5">
420 <span class=
"md-nav__icon md-icon"></span>
423 <ul class=
"md-nav__list" data-md-scrollfix
>
429 <li class=
"md-nav__item">
430 <a href=
"../../php/api/form_builder/overview/" class=
"md-nav__link">
441 <li class=
"md-nav__item">
442 <a href=
"../../php/api/form_builder/structure/" class=
"md-nav__link">
453 <li class=
"md-nav__item">
454 <a href=
"../../php/api/form_builder/form_fields/" class=
"md-nav__link">
465 <li class=
"md-nav__item">
466 <a href=
"../../php/api/form_builder/validation_data/" class=
"md-nav__link">
477 <li class=
"md-nav__item">
478 <a href=
"../../php/api/form_builder/dependencies/" class=
"md-nav__link">
495 <li class=
"md-nav__item">
496 <a href=
"../../php/api/package_installation_plugins/" class=
"md-nav__link">
497 Package Installation Plugins
507 <li class=
"md-nav__item">
508 <a href=
"../../php/api/user_activity_points/" class=
"md-nav__link">
519 <li class=
"md-nav__item">
520 <a href=
"../../php/api/user_notifications/" class=
"md-nav__link">
531 <li class=
"md-nav__item">
532 <a href=
"../../php/api/sitemaps/" class=
"md-nav__link">
549 <li class=
"md-nav__item">
550 <a href=
"../../php/code-style/" class=
"md-nav__link">
561 <li class=
"md-nav__item">
562 <a href=
"../../php/apps/" class=
"md-nav__link">
573 <li class=
"md-nav__item">
574 <a href=
"../../php/gdpr/" class=
"md-nav__link">
595 <li class=
"md-nav__item md-nav__item--nested">
598 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
600 <label class=
"md-nav__link" for=
"__nav_3">
601 Languages, Templates & CSS
602 <span class=
"md-nav__icon md-icon"></span>
604 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
605 <label class=
"md-nav__title" for=
"__nav_3">
606 <span class=
"md-nav__icon md-icon"></span>
607 Languages, Templates & CSS
609 <ul class=
"md-nav__list" data-md-scrollfix
>
615 <li class=
"md-nav__item">
616 <a href=
"../../view/languages/" class=
"md-nav__link">
627 <li class=
"md-nav__item">
628 <a href=
"../../view/templates/" class=
"md-nav__link">
639 <li class=
"md-nav__item">
640 <a href=
"../../view/template-plugins/" class=
"md-nav__link">
651 <li class=
"md-nav__item">
652 <a href=
"../../view/css/" class=
"md-nav__link">
675 <li class=
"md-nav__item md-nav__item--active md-nav__item--nested">
678 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" checked
>
680 <label class=
"md-nav__link" for=
"__nav_4">
681 TypeScript and JavaScript API
682 <span class=
"md-nav__icon md-icon"></span>
684 <nav class=
"md-nav" aria-label=
"TypeScript and JavaScript API" data-md-level=
"1">
685 <label class=
"md-nav__title" for=
"__nav_4">
686 <span class=
"md-nav__icon md-icon"></span>
687 TypeScript and JavaScript API
689 <ul class=
"md-nav__list" data-md-scrollfix
>
695 <li class=
"md-nav__item">
696 <a href=
"../general-usage/" class=
"md-nav__link">
707 <li class=
"md-nav__item">
708 <a href=
"../typescript/" class=
"md-nav__link">
722 <li class=
"md-nav__item md-nav__item--active md-nav__item--nested">
725 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_3" type=
"checkbox" id=
"__nav_4_3" checked
>
727 <label class=
"md-nav__link" for=
"__nav_4_3">
729 <span class=
"md-nav__icon md-icon"></span>
731 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
732 <label class=
"md-nav__title" for=
"__nav_4_3">
733 <span class=
"md-nav__icon md-icon"></span>
736 <ul class=
"md-nav__list" data-md-scrollfix
>
742 <li class=
"md-nav__item">
743 <a href=
"../new-api_writing-a-module/" class=
"md-nav__link">
754 <li class=
"md-nav__item">
755 <a href=
"../new-api_data-structures/" class=
"md-nav__link">
766 <li class=
"md-nav__item">
767 <a href=
"../new-api_core/" class=
"md-nav__link">
778 <li class=
"md-nav__item">
779 <a href=
"../new-api_dom/" class=
"md-nav__link">
790 <li class=
"md-nav__item">
791 <a href=
"../new-api_events/" class=
"md-nav__link">
802 <li class=
"md-nav__item">
803 <a href=
"../new-api_ajax/" class=
"md-nav__link">
814 <li class=
"md-nav__item">
815 <a href=
"../new-api_dialogs/" class=
"md-nav__link">
826 <li class=
"md-nav__item">
827 <a href=
"../new-api_browser/" class=
"md-nav__link">
828 Browser and Screen Sizes
840 <li class=
"md-nav__item md-nav__item--active">
842 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"toc" type=
"checkbox" id=
"__toc">
847 <label class=
"md-nav__link md-nav__link--active" for=
"__toc">
849 <span class=
"md-nav__icon md-icon"></span>
852 <a href=
"./" class=
"md-nav__link md-nav__link--active">
857 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
863 <label class=
"md-nav__title" for=
"__toc">
864 <span class=
"md-nav__icon md-icon"></span>
867 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
869 <li class=
"md-nav__item">
870 <a href=
"#uialignment" class=
"md-nav__link">
874 <nav class=
"md-nav" aria-label=
"Ui/Alignment">
875 <ul class=
"md-nav__list">
877 <li class=
"md-nav__item">
878 <a href=
"#setelement-element-referenceelement-element-options-object" class=
"md-nav__link">
879 set(element: Element, referenceElement: Element, options: Object)
882 <nav class=
"md-nav" aria-label=
"set(element: Element, referenceElement: Element, options: Object)">
883 <ul class=
"md-nav__list">
885 <li class=
"md-nav__item">
886 <a href=
"#verticaloffset-number" class=
"md-nav__link">
887 verticalOffset: number
892 <li class=
"md-nav__item">
893 <a href=
"#pointer-boolean" class=
"md-nav__link">
899 <li class=
"md-nav__item">
900 <a href=
"#pointeroffset-number" class=
"md-nav__link">
901 pointerOffset: number
906 <li class=
"md-nav__item">
907 <a href=
"#pointerclassnames-string" class=
"md-nav__link">
908 pointerClassNames: string[]
913 <li class=
"md-nav__item">
914 <a href=
"#refdimensionselement-element" class=
"md-nav__link">
915 refDimensionsElement: Element
920 <li class=
"md-nav__item">
921 <a href=
"#horizontal-string" class=
"md-nav__link">
927 <li class=
"md-nav__item">
928 <a href=
"#vertical-string" class=
"md-nav__link">
934 <li class=
"md-nav__item">
935 <a href=
"#allowflip-string" class=
"md-nav__link">
951 <li class=
"md-nav__item">
952 <a href=
"#uicloseoverlay" class=
"md-nav__link">
956 <nav class=
"md-nav" aria-label=
"Ui/CloseOverlay">
957 <ul class=
"md-nav__list">
959 <li class=
"md-nav__item">
960 <a href=
"#addidentifier-string-callback-void" class=
"md-nav__link">
961 add(identifier: string, callback: () =
> void)
971 <li class=
"md-nav__item">
972 <a href=
"#uiconfirmation" class=
"md-nav__link">
976 <nav class=
"md-nav" aria-label=
"Ui/Confirmation">
977 <ul class=
"md-nav__list">
979 <li class=
"md-nav__item">
980 <a href=
"#showoptions-object" class=
"md-nav__link">
981 show(options: Object)
984 <nav class=
"md-nav" aria-label=
"show(options: Object)">
985 <ul class=
"md-nav__list">
987 <li class=
"md-nav__item">
988 <a href=
"#cancel-parameters-object-void" class=
"md-nav__link">
989 cancel: (parameters: Object) =
> void
994 <li class=
"md-nav__item">
995 <a href=
"#confirm-parameters-object-void" class=
"md-nav__link">
996 confirm: (parameters: Object) =
> void
1001 <li class=
"md-nav__item">
1002 <a href=
"#message-string" class=
"md-nav__link">
1008 <li class=
"md-nav__item">
1009 <a href=
"#messageishtml" class=
"md-nav__link">
1015 <li class=
"md-nav__item">
1016 <a href=
"#parameters-object" class=
"md-nav__link">
1022 <li class=
"md-nav__item">
1023 <a href=
"#template-string" class=
"md-nav__link">
1039 <li class=
"md-nav__item">
1040 <a href=
"#uinotification" class=
"md-nav__link">
1044 <nav class=
"md-nav" aria-label=
"Ui/Notification">
1045 <ul class=
"md-nav__list">
1047 <li class=
"md-nav__item">
1048 <a href=
"#showmessage-string-callback-void-cssclassname-string" class=
"md-nav__link">
1049 show(message: string, callback?: () =
> void, cssClassName?: string)
1077 <li class=
"md-nav__item">
1078 <a href=
"../legacy-api/" class=
"md-nav__link">
1089 <li class=
"md-nav__item">
1090 <a href=
"../helper-functions/" class=
"md-nav__link">
1101 <li class=
"md-nav__item">
1102 <a href=
"../code-snippets/" class=
"md-nav__link">
1123 <li class=
"md-nav__item md-nav__item--nested">
1126 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
1128 <label class=
"md-nav__link" for=
"__nav_5">
1130 <span class=
"md-nav__icon md-icon"></span>
1132 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
1133 <label class=
"md-nav__title" for=
"__nav_5">
1134 <span class=
"md-nav__icon md-icon"></span>
1137 <ul class=
"md-nav__list" data-md-scrollfix
>
1143 <li class=
"md-nav__item">
1144 <a href=
"../../package/package-xml/" class=
"md-nav__link">
1156 <li class=
"md-nav__item md-nav__item--nested">
1159 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
1161 <label class=
"md-nav__link" for=
"__nav_5_2">
1163 <span class=
"md-nav__icon md-icon"></span>
1165 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
1166 <label class=
"md-nav__title" for=
"__nav_5_2">
1167 <span class=
"md-nav__icon md-icon"></span>
1170 <ul class=
"md-nav__list" data-md-scrollfix
>
1176 <li class=
"md-nav__item">
1177 <a href=
"../../package/pip/" class=
"md-nav__link">
1188 <li class=
"md-nav__item">
1189 <a href=
"../../package/pip/acl-option/" class=
"md-nav__link">
1200 <li class=
"md-nav__item">
1201 <a href=
"../../package/pip/acp-menu/" class=
"md-nav__link">
1212 <li class=
"md-nav__item">
1213 <a href=
"../../package/pip/acp-search-provider/" class=
"md-nav__link">
1224 <li class=
"md-nav__item">
1225 <a href=
"../../package/pip/acp-template/" class=
"md-nav__link">
1236 <li class=
"md-nav__item">
1237 <a href=
"../../package/pip/bbcode/" class=
"md-nav__link">
1248 <li class=
"md-nav__item">
1249 <a href=
"../../package/pip/box/" class=
"md-nav__link">
1260 <li class=
"md-nav__item">
1261 <a href=
"../../package/pip/clipboard-action/" class=
"md-nav__link">
1272 <li class=
"md-nav__item">
1273 <a href=
"../../package/pip/core-object/" class=
"md-nav__link">
1284 <li class=
"md-nav__item">
1285 <a href=
"../../package/pip/cronjob/" class=
"md-nav__link">
1296 <li class=
"md-nav__item">
1297 <a href=
"../../package/pip/database/" class=
"md-nav__link">
1308 <li class=
"md-nav__item">
1309 <a href=
"../../package/pip/event-listener/" class=
"md-nav__link">
1320 <li class=
"md-nav__item">
1321 <a href=
"../../package/pip/file/" class=
"md-nav__link">
1332 <li class=
"md-nav__item">
1333 <a href=
"../../package/pip/language/" class=
"md-nav__link">
1344 <li class=
"md-nav__item">
1345 <a href=
"../../package/pip/media-provider/" class=
"md-nav__link">
1356 <li class=
"md-nav__item">
1357 <a href=
"../../package/pip/menu/" class=
"md-nav__link">
1368 <li class=
"md-nav__item">
1369 <a href=
"../../package/pip/menu-item/" class=
"md-nav__link">
1380 <li class=
"md-nav__item">
1381 <a href=
"../../package/pip/object-type/" class=
"md-nav__link">
1392 <li class=
"md-nav__item">
1393 <a href=
"../../package/pip/object-type-definition/" class=
"md-nav__link">
1394 objectTypeDefinition
1404 <li class=
"md-nav__item">
1405 <a href=
"../../package/pip/option/" class=
"md-nav__link">
1416 <li class=
"md-nav__item">
1417 <a href=
"../../package/pip/page/" class=
"md-nav__link">
1428 <li class=
"md-nav__item">
1429 <a href=
"../../package/pip/pip/" class=
"md-nav__link">
1440 <li class=
"md-nav__item">
1441 <a href=
"../../package/pip/script/" class=
"md-nav__link">
1452 <li class=
"md-nav__item">
1453 <a href=
"../../package/pip/smiley/" class=
"md-nav__link">
1464 <li class=
"md-nav__item">
1465 <a href=
"../../package/pip/sql/" class=
"md-nav__link">
1476 <li class=
"md-nav__item">
1477 <a href=
"../../package/pip/style/" class=
"md-nav__link">
1488 <li class=
"md-nav__item">
1489 <a href=
"../../package/pip/template/" class=
"md-nav__link">
1500 <li class=
"md-nav__item">
1501 <a href=
"../../package/pip/template-listener/" class=
"md-nav__link">
1512 <li class=
"md-nav__item">
1513 <a href=
"../../package/pip/user-group-option/" class=
"md-nav__link">
1524 <li class=
"md-nav__item">
1525 <a href=
"../../package/pip/user-menu/" class=
"md-nav__link">
1536 <li class=
"md-nav__item">
1537 <a href=
"../../package/pip/user-notification-event/" class=
"md-nav__link">
1538 userNotificationEvent
1548 <li class=
"md-nav__item">
1549 <a href=
"../../package/pip/user-option/" class=
"md-nav__link">
1560 <li class=
"md-nav__item">
1561 <a href=
"../../package/pip/user-profile-menu/" class=
"md-nav__link">
1578 <li class=
"md-nav__item">
1579 <a href=
"../../package/database-php-api/" class=
"md-nav__link">
1600 <li class=
"md-nav__item md-nav__item--nested">
1603 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1605 <label class=
"md-nav__link" for=
"__nav_6">
1607 <span class=
"md-nav__icon md-icon"></span>
1609 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1610 <label class=
"md-nav__title" for=
"__nav_6">
1611 <span class=
"md-nav__icon md-icon"></span>
1614 <ul class=
"md-nav__list" data-md-scrollfix
>
1621 <li class=
"md-nav__item md-nav__item--nested">
1624 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1626 <label class=
"md-nav__link" for=
"__nav_6_1">
1627 Migrating from WSC
5.3
1628 <span class=
"md-nav__icon md-icon"></span>
1630 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1631 <label class=
"md-nav__title" for=
"__nav_6_1">
1632 <span class=
"md-nav__icon md-icon"></span>
1633 Migrating from WSC
5.3
1635 <ul class=
"md-nav__list" data-md-scrollfix
>
1641 <li class=
"md-nav__item">
1642 <a href=
"../../migration/wsc53/php/" class=
"md-nav__link">
1653 <li class=
"md-nav__item">
1654 <a href=
"../../migration/wsc53/session/" class=
"md-nav__link">
1655 Session Handling and Authentication
1665 <li class=
"md-nav__item">
1666 <a href=
"../../migration/wsc53/javascript/" class=
"md-nav__link">
1667 TypeScript and JavaScript
1677 <li class=
"md-nav__item">
1678 <a href=
"../../migration/wsc53/templates/" class=
"md-nav__link">
1689 <li class=
"md-nav__item">
1690 <a href=
"../../migration/wsc53/libraries/" class=
"md-nav__link">
1691 Third Party Libraries
1708 <li class=
"md-nav__item md-nav__item--nested">
1711 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1713 <label class=
"md-nav__link" for=
"__nav_6_2">
1714 Migrating from WSC
5.2
1715 <span class=
"md-nav__icon md-icon"></span>
1717 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1718 <label class=
"md-nav__title" for=
"__nav_6_2">
1719 <span class=
"md-nav__icon md-icon"></span>
1720 Migrating from WSC
5.2
1722 <ul class=
"md-nav__list" data-md-scrollfix
>
1728 <li class=
"md-nav__item">
1729 <a href=
"../../migration/wsc52/php/" class=
"md-nav__link">
1740 <li class=
"md-nav__item">
1741 <a href=
"../../migration/wsc52/templates/" class=
"md-nav__link">
1742 Templates and Languages
1752 <li class=
"md-nav__item">
1753 <a href=
"../../migration/wsc52/libraries/" class=
"md-nav__link">
1754 Third Party Libraries
1771 <li class=
"md-nav__item md-nav__item--nested">
1774 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1776 <label class=
"md-nav__link" for=
"__nav_6_3">
1777 Migrating from WSC
3.1
1778 <span class=
"md-nav__icon md-icon"></span>
1780 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1781 <label class=
"md-nav__title" for=
"__nav_6_3">
1782 <span class=
"md-nav__icon md-icon"></span>
1783 Migrating from WSC
3.1
1785 <ul class=
"md-nav__list" data-md-scrollfix
>
1791 <li class=
"md-nav__item">
1792 <a href=
"../../migration/wsc31/php/" class=
"md-nav__link">
1810 <li class=
"md-nav__item md-nav__item--nested">
1813 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1815 <label class=
"md-nav__link" for=
"__nav_6_4">
1816 Migrating from WSC
3.0
1817 <span class=
"md-nav__icon md-icon"></span>
1819 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1820 <label class=
"md-nav__title" for=
"__nav_6_4">
1821 <span class=
"md-nav__icon md-icon"></span>
1822 Migrating from WSC
3.0
1824 <ul class=
"md-nav__list" data-md-scrollfix
>
1830 <li class=
"md-nav__item">
1831 <a href=
"../../migration/wsc30/php/" class=
"md-nav__link">
1842 <li class=
"md-nav__item">
1843 <a href=
"../../migration/wsc30/javascript/" class=
"md-nav__link">
1854 <li class=
"md-nav__item">
1855 <a href=
"../../migration/wsc30/templates/" class=
"md-nav__link">
1866 <li class=
"md-nav__item">
1867 <a href=
"../../migration/wsc30/css/" class=
"md-nav__link">
1878 <li class=
"md-nav__item">
1879 <a href=
"../../migration/wsc30/package/" class=
"md-nav__link">
1897 <li class=
"md-nav__item md-nav__item--nested">
1900 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
1902 <label class=
"md-nav__link" for=
"__nav_6_5">
1903 Migrating from WCF
2.1
1904 <span class=
"md-nav__icon md-icon"></span>
1906 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
1907 <label class=
"md-nav__title" for=
"__nav_6_5">
1908 <span class=
"md-nav__icon md-icon"></span>
1909 Migrating from WCF
2.1
1911 <ul class=
"md-nav__list" data-md-scrollfix
>
1917 <li class=
"md-nav__item">
1918 <a href=
"../../migration/wcf21/php/" class=
"md-nav__link">
1929 <li class=
"md-nav__item">
1930 <a href=
"../../migration/wcf21/templates/" class=
"md-nav__link">
1941 <li class=
"md-nav__item">
1942 <a href=
"../../migration/wcf21/css/" class=
"md-nav__link">
1953 <li class=
"md-nav__item">
1954 <a href=
"../../migration/wcf21/package/" class=
"md-nav__link">
1981 <li class=
"md-nav__item md-nav__item--nested">
1984 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
1986 <label class=
"md-nav__link" for=
"__nav_7">
1988 <span class=
"md-nav__icon md-icon"></span>
1990 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
1991 <label class=
"md-nav__title" for=
"__nav_7">
1992 <span class=
"md-nav__icon md-icon"></span>
1995 <ul class=
"md-nav__list" data-md-scrollfix
>
2002 <li class=
"md-nav__item md-nav__item--nested">
2005 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
2007 <label class=
"md-nav__link" for=
"__nav_7_1">
2009 <span class=
"md-nav__icon md-icon"></span>
2011 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
2012 <label class=
"md-nav__title" for=
"__nav_7_1">
2013 <span class=
"md-nav__icon md-icon"></span>
2016 <ul class=
"md-nav__list" data-md-scrollfix
>
2022 <li class=
"md-nav__item">
2023 <a href=
"../../tutorial/series/overview/" class=
"md-nav__link">
2034 <li class=
"md-nav__item">
2035 <a href=
"../../tutorial/series/part_1/" class=
"md-nav__link">
2046 <li class=
"md-nav__item">
2047 <a href=
"../../tutorial/series/part_2/" class=
"md-nav__link">
2058 <li class=
"md-nav__item">
2059 <a href=
"../../tutorial/series/part_3/" class=
"md-nav__link">
2086 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
2087 <div class=
"md-sidebar__scrollwrap">
2088 <div class=
"md-sidebar__inner">
2090 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
2096 <label class=
"md-nav__title" for=
"__toc">
2097 <span class=
"md-nav__icon md-icon"></span>
2100 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
2102 <li class=
"md-nav__item">
2103 <a href=
"#uialignment" class=
"md-nav__link">
2107 <nav class=
"md-nav" aria-label=
"Ui/Alignment">
2108 <ul class=
"md-nav__list">
2110 <li class=
"md-nav__item">
2111 <a href=
"#setelement-element-referenceelement-element-options-object" class=
"md-nav__link">
2112 set(element: Element, referenceElement: Element, options: Object)
2115 <nav class=
"md-nav" aria-label=
"set(element: Element, referenceElement: Element, options: Object)">
2116 <ul class=
"md-nav__list">
2118 <li class=
"md-nav__item">
2119 <a href=
"#verticaloffset-number" class=
"md-nav__link">
2120 verticalOffset: number
2125 <li class=
"md-nav__item">
2126 <a href=
"#pointer-boolean" class=
"md-nav__link">
2132 <li class=
"md-nav__item">
2133 <a href=
"#pointeroffset-number" class=
"md-nav__link">
2134 pointerOffset: number
2139 <li class=
"md-nav__item">
2140 <a href=
"#pointerclassnames-string" class=
"md-nav__link">
2141 pointerClassNames: string[]
2146 <li class=
"md-nav__item">
2147 <a href=
"#refdimensionselement-element" class=
"md-nav__link">
2148 refDimensionsElement: Element
2153 <li class=
"md-nav__item">
2154 <a href=
"#horizontal-string" class=
"md-nav__link">
2160 <li class=
"md-nav__item">
2161 <a href=
"#vertical-string" class=
"md-nav__link">
2167 <li class=
"md-nav__item">
2168 <a href=
"#allowflip-string" class=
"md-nav__link">
2184 <li class=
"md-nav__item">
2185 <a href=
"#uicloseoverlay" class=
"md-nav__link">
2189 <nav class=
"md-nav" aria-label=
"Ui/CloseOverlay">
2190 <ul class=
"md-nav__list">
2192 <li class=
"md-nav__item">
2193 <a href=
"#addidentifier-string-callback-void" class=
"md-nav__link">
2194 add(identifier: string, callback: () =
> void)
2204 <li class=
"md-nav__item">
2205 <a href=
"#uiconfirmation" class=
"md-nav__link">
2209 <nav class=
"md-nav" aria-label=
"Ui/Confirmation">
2210 <ul class=
"md-nav__list">
2212 <li class=
"md-nav__item">
2213 <a href=
"#showoptions-object" class=
"md-nav__link">
2214 show(options: Object)
2217 <nav class=
"md-nav" aria-label=
"show(options: Object)">
2218 <ul class=
"md-nav__list">
2220 <li class=
"md-nav__item">
2221 <a href=
"#cancel-parameters-object-void" class=
"md-nav__link">
2222 cancel: (parameters: Object) =
> void
2227 <li class=
"md-nav__item">
2228 <a href=
"#confirm-parameters-object-void" class=
"md-nav__link">
2229 confirm: (parameters: Object) =
> void
2234 <li class=
"md-nav__item">
2235 <a href=
"#message-string" class=
"md-nav__link">
2241 <li class=
"md-nav__item">
2242 <a href=
"#messageishtml" class=
"md-nav__link">
2248 <li class=
"md-nav__item">
2249 <a href=
"#parameters-object" class=
"md-nav__link">
2255 <li class=
"md-nav__item">
2256 <a href=
"#template-string" class=
"md-nav__link">
2272 <li class=
"md-nav__item">
2273 <a href=
"#uinotification" class=
"md-nav__link">
2277 <nav class=
"md-nav" aria-label=
"Ui/Notification">
2278 <ul class=
"md-nav__list">
2280 <li class=
"md-nav__item">
2281 <a href=
"#showmessage-string-callback-void-cssclassname-string" class=
"md-nav__link">
2282 show(message: string, callback?: () =
> void, cssClassName?: string)
2300 <div class=
"md-content" data-md-component=
"content">
2301 <article class=
"md-content__inner md-typeset">
2304 <a href=
"https://github.com/WoltLab/docs.woltlab.com/edit/5.4/docs/javascript/new-api_ui.md" title=
"Edit this page" class=
"md-content__button md-icon">
2305 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
2309 <h1 id=
"user-interface-javascript-api">User Interface - JavaScript API
<a class=
"headerlink" href=
"#user-interface-javascript-api" title=
"Permanent link">#
</a></h1>
2310 <h2 id=
"uialignment"><code>Ui/Alignment
</code><a class=
"headerlink" href=
"#uialignment" title=
"Permanent link">#
</a></h2>
2311 <p>Calculates the alignment of one element relative to another element, with support
2312 for boundary constraints, alignment restrictions and additional pointer elements.
</p>
2313 <h3 id=
"setelement-element-referenceelement-element-options-object"><code>set(element: Element, referenceElement: Element, options: Object)
</code><a class=
"headerlink" href=
"#setelement-element-referenceelement-element-options-object" title=
"Permanent link">#
</a></h3>
2314 <p>Calculates and sets the alignment of the element
<code>element
</code>.
</p>
2315 <h4 id=
"verticaloffset-number"><code>verticalOffset: number
</code><a class=
"headerlink" href=
"#verticaloffset-number" title=
"Permanent link">#
</a></h4>
2316 <p><em>Defaults to
<code>0</code>.
</em></p>
2317 <p>Creates a gap between the element and the reference element, in pixels.
</p>
2318 <h4 id=
"pointer-boolean"><code>pointer: boolean
</code><a class=
"headerlink" href=
"#pointer-boolean" title=
"Permanent link">#
</a></h4>
2319 <p><em>Defaults to
<code>false
</code>.
</em></p>
2320 <p>Sets the position of the pointer element, requires an existing child of the
2321 element with the CSS class
<code>.elementPointer
</code>.
</p>
2322 <h4 id=
"pointeroffset-number"><code>pointerOffset: number
</code><a class=
"headerlink" href=
"#pointeroffset-number" title=
"Permanent link">#
</a></h4>
2323 <p><em>Defaults to
<code>4</code>.
</em></p>
2324 <p>The margin from the left/right edge of the element and is used to avoid the
2325 arrow from being placed right at the edge.
</p>
2326 <p>Does not apply when aligning the element to the reference elemnent's center.
</p>
2327 <h4 id=
"pointerclassnames-string"><code>pointerClassNames: string[]
</code><a class=
"headerlink" href=
"#pointerclassnames-string" title=
"Permanent link">#
</a></h4>
2328 <p><em>Defaults to
<code>[]
</code>.
</em></p>
2329 <p>If your element uses CSS-only pointers, such as using the
<code>::before
</code> or
<code>::after
</code>
2330 pseudo selectors, you can specifiy two separate CSS class names that control the
2333 <li><code>pointerClassNames[
0]
</code> is applied to the element when the pointer is displayed
2335 <li><code>pointerClassNames[
1]
</code> is used to align the pointer to the right side of the
2338 <h4 id=
"refdimensionselement-element"><code>refDimensionsElement: Element
</code><a class=
"headerlink" href=
"#refdimensionselement-element" title=
"Permanent link">#
</a></h4>
2339 <p><em>Defaults to
<code>null
</code>.
</em></p>
2340 <p>An alternative element that will be used to determine the position and dimensions
2341 of the reference element. This can be useful if you reference element is contained
2342 in a wrapper element with alternating dimensions.
</p>
2343 <h4 id=
"horizontal-string"><code>horizontal: string
</code><a class=
"headerlink" href=
"#horizontal-string" title=
"Permanent link">#
</a></h4>
2344 <div class=
"admonition info">
2345 <p class=
"admonition-title">This value is automatically flipped for RTL (right-to-left) languages,
<code>left
</code> is changed into
<code>right
</code> and vice versa.
</p>
2347 <p><em>Defaults to
<code>"left"</code>.
</em></p>
2348 <p>Sets the prefered alignment, accepts either
<code>left
</code> or
<code>right
</code>. The value
<code>left
</code>
2349 instructs the module to align the element with the left boundary of the reference
2351 <p>The
<code>horizontal
</code> alignment is used as the default and a flip only occurs, if there
2352 is not enough space in the desired direction. If the element exceeds the boundaries
2353 in both directions, the value of
<code>horizontal
</code> is used.
</p>
2354 <h4 id=
"vertical-string"><code>vertical: string
</code><a class=
"headerlink" href=
"#vertical-string" title=
"Permanent link">#
</a></h4>
2355 <p><em>Defaults to
<code>"bottom"</code>.
</em></p>
2356 <p>Sets the prefered alignment, accepts either
<code>bottom
</code> or
<code>top
</code>. The value
<code>bottom
</code>
2357 instructs the module to align the element below the reference element.
</p>
2358 <p>The
<code>vertical
</code> alignment is used as the default and a flip only occurs, if there
2359 is not enough space in the desired direction. If the element exceeds the boundaries
2360 in both directions, the value of
<code>vertical
</code> is used.
</p>
2361 <h4 id=
"allowflip-string"><code>allowFlip: string
</code><a class=
"headerlink" href=
"#allowflip-string" title=
"Permanent link">#
</a></h4>
2362 <div class=
"admonition info">
2363 <p class=
"admonition-title">The value for
<code>horizontal
</code> is automatically flipped for RTL (right-to-left) languages,
<code>left
</code> is changed into
<code>right
</code> and vice versa. This setting only controls the behavior when violating space constraints, therefore the aforementioned transformation is always applied.
</p>
2365 <p><em>Defaults to
<code>"both"</code>.
</em></p>
2366 <p>Restricts the automatic alignment flipping if the element exceeds the window
2367 boundaries in the instructed direction.
</p>
2369 <li><code>both
</code> - No restrictions.
</li>
2370 <li><code>horizontal
</code> - Element can be aligned with the left
<em>or
</em> the right boundary of
2371 the reference element, but the vertical position is fixed.
</li>
2372 <li><code>vertical
</code> - Element can be aligned below
<em>or
</em> above the reference element,
2373 but the vertical position is fixed.
</li>
2374 <li><code>none
</code> - No flipping can occur, the element will be aligned regardless of
2375 any space constraints.
</li>
2377 <h2 id=
"uicloseoverlay"><code>Ui/CloseOverlay
</code><a class=
"headerlink" href=
"#uicloseoverlay" title=
"Permanent link">#
</a></h2>
2378 <p>Register elements that should be closed when the user clicks anywhere else, such
2379 as drop-down menus or tooltips.
</p>
2380 <div class=
"highlight"><pre><span></span><code><span class=
"nx">require
</span><span class=
"p">([
</span><span class=
"s2">"Ui/CloseOverlay
"</span><span class=
"p">],
</span> <span class=
"kd">function
</span><span class=
"p">(
</span><span class=
"nx">UiCloseOverlay
</span><span class=
"p">)
</span> <span class=
"p">{
</span>
2381 <span class=
"nx">UiCloseOverlay
</span><span class=
"p">.
</span><span class=
"nx">add
</span><span class=
"p">(
</span><span class=
"s2">"App/Foo
"</span><span class=
"p">,
</span> <span class=
"kd">function
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2382 <span class=
"c1">// invoked, close something
</span>
2383 <span class=
"p">});
</span>
2384 <span class=
"p">});
</span>
2386 <h3 id=
"addidentifier-string-callback-void"><code>add(identifier: string, callback: () =
> void)
</code><a class=
"headerlink" href=
"#addidentifier-string-callback-void" title=
"Permanent link">#
</a></h3>
2387 <p>Adds a callback that will be invoked when the user clicks anywhere else.
</p>
2388 <h2 id=
"uiconfirmation"><code>Ui/Confirmation
</code><a class=
"headerlink" href=
"#uiconfirmation" title=
"Permanent link">#
</a></h2>
2389 <p>Prompt the user to make a decision before carrying out an action, such as a safety
2390 warning before permanently deleting content.
</p>
2391 <div class=
"highlight"><pre><span></span><code><span class=
"nx">require
</span><span class=
"p">([
</span><span class=
"s2">"Ui/Confirmation
"</span><span class=
"p">],
</span> <span class=
"kd">function
</span><span class=
"p">(
</span><span class=
"nx">UiConfirmation
</span><span class=
"p">)
</span> <span class=
"p">{
</span>
2392 <span class=
"nx">UiConfirmation
</span><span class=
"p">.
</span><span class=
"nx">show
</span><span class=
"p">({
</span>
2393 <span class=
"nx">confirm
</span><span class=
"o">:
</span> <span class=
"kd">function
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2394 <span class=
"c1">// the user has confirmed the dialog
</span>
2395 <span class=
"p">},
</span>
2396 <span class=
"nx">message
</span><span class=
"o">:
</span> <span class=
"s2">"Do you really want to continue?
"</span>
2397 <span class=
"p">});
</span>
2398 <span class=
"p">});
</span>
2400 <h3 id=
"showoptions-object"><code>show(options: Object)
</code><a class=
"headerlink" href=
"#showoptions-object" title=
"Permanent link">#
</a></h3>
2401 <p>Displays a dialog overlay with actions buttons to confirm or reject the dialog.
</p>
2402 <h4 id=
"cancel-parameters-object-void"><code>cancel: (parameters: Object) =
> void
</code><a class=
"headerlink" href=
"#cancel-parameters-object-void" title=
"Permanent link">#
</a></h4>
2403 <p><em>Defaults to
<code>null
</code>.
</em></p>
2404 <p>Callback that is invoked when the dialog was rejected.
</p>
2405 <h4 id=
"confirm-parameters-object-void"><code>confirm: (parameters: Object) =
> void
</code><a class=
"headerlink" href=
"#confirm-parameters-object-void" title=
"Permanent link">#
</a></h4>
2406 <p><em>Defaults to
<code>null
</code>.
</em></p>
2407 <p>Callback that is invoked when the user has confirmed the dialog.
</p>
2408 <h4 id=
"message-string"><code>message: string
</code><a class=
"headerlink" href=
"#message-string" title=
"Permanent link">#
</a></h4>
2409 <p><em>Defaults to '
""'.
</em></p>
2410 <p>Text that is displayed in the content area of the dialog, optionally this can
2411 be HTML, but this requires
<code>messageIsHtml
</code> to be enabled.
</p>
2412 <h4 id=
"messageishtml"><code>messageIsHtml
</code><a class=
"headerlink" href=
"#messageishtml" title=
"Permanent link">#
</a></h4>
2413 <p><em>Defaults to
<code>false
</code>.
</em></p>
2414 <p>The
<code>message
</code> option is interpreted as text-only, setting this option to
<code>true
</code>
2415 will cause the
<code>message
</code> to be evaluated as HTML.
</p>
2416 <h4 id=
"parameters-object"><code>parameters: Object
</code><a class=
"headerlink" href=
"#parameters-object" title=
"Permanent link">#
</a></h4>
2417 <p>Optional list of parameter options that will be passed to the
<code>cancel()
</code> and
2418 <code>confirm()
</code> callbacks.
</p>
2419 <h4 id=
"template-string"><code>template: string
</code><a class=
"headerlink" href=
"#template-string" title=
"Permanent link">#
</a></h4>
2420 <p>An optional HTML template that will be inserted into the dialog content area,
2421 but after the
<code>message
</code> section.
</p>
2422 <h2 id=
"uinotification"><code>Ui/Notification
</code><a class=
"headerlink" href=
"#uinotification" title=
"Permanent link">#
</a></h2>
2423 <p>Displays a simple notification at the very top of the window, such as a success
2424 message for Ajax based actions.
</p>
2425 <div class=
"highlight"><pre><span></span><code><span class=
"nx">require
</span><span class=
"p">([
</span><span class=
"s2">"Ui/Notification
"</span><span class=
"p">],
</span> <span class=
"kd">function
</span><span class=
"p">(
</span><span class=
"nx">UiNotification
</span><span class=
"p">)
</span> <span class=
"p">{
</span>
2426 <span class=
"nx">UiNotification
</span><span class=
"p">.
</span><span class=
"nx">show
</span><span class=
"p">(
</span>
2427 <span class=
"s2">"Your changes have been saved.
"</span><span class=
"p">,
</span>
2428 <span class=
"kd">function
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2429 <span class=
"c1">// this callback will be invoked after
2 seconds
</span>
2430 <span class=
"p">},
</span>
2431 <span class=
"s2">"success
"</span>
2432 <span class=
"p">);
</span>
2433 <span class=
"p">});
</span>
2435 <h3 id=
"showmessage-string-callback-void-cssclassname-string"><code>show(message: string, callback?: () =
> void, cssClassName?: string)
</code><a class=
"headerlink" href=
"#showmessage-string-callback-void-cssclassname-string" title=
"Permanent link">#
</a></h3>
2436 <p>Shows the notification and executes the callback after
2 seconds.
</p>
2442 <div class=
"md-source-date">
2445 Last update:
2021-
01-
08
2464 <footer class=
"md-footer">
2466 <nav class=
"md-footer__inner md-grid" aria-label=
"Footer">
2468 <a href=
"../new-api_browser/" class=
"md-footer__link md-footer__link--prev" rel=
"prev">
2469 <div class=
"md-footer__button md-icon">
2470 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
2472 <div class=
"md-footer__title">
2473 <div class=
"md-ellipsis">
2474 <span class=
"md-footer__direction">
2477 Browser and Screen Sizes
2483 <a href=
"../legacy-api/" class=
"md-footer__link md-footer__link--next" rel=
"next">
2484 <div class=
"md-footer__title">
2485 <div class=
"md-ellipsis">
2486 <span class=
"md-footer__direction">
2492 <div class=
"md-footer__button md-icon">
2493 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
2499 <div class=
"md-footer-meta md-typeset">
2500 <div class=
"md-footer-meta__inner md-grid">
2501 <div class=
"md-footer-copyright">
2503 <div class=
"md-footer-copyright__highlight">
2504 Copyright ©
2020 WoltLab GmbH
2508 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
2513 <div class=
"md-footer-copyright">
2514 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
2515 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
2522 <div class=
"md-dialog" data-md-component=
"dialog">
2523 <div class=
"md-dialog__inner md-typeset"></div>
2525 <script id=
"__config" type=
"application/json">{
"base":
"../..",
"features": [],
"translations": {
"clipboard.copy":
"Copy to clipboard",
"clipboard.copied":
"Copied to clipboard",
"search.config.lang":
"en",
"search.config.pipeline":
"trimmer, stopWordFilter",
"search.config.separator":
"[\\s\\-]+",
"search.placeholder":
"Search",
"search.result.placeholder":
"Type to start searching",
"search.result.none":
"No matching documents",
"search.result.one":
"1 matching document",
"search.result.other":
"# matching documents",
"search.result.more.one":
"1 more on this page",
"search.result.more.other":
"# more on this page",
"search.result.term.missing":
"Missing"},
"search":
"../../assets/javascripts/workers/search.fe42c31b.min.js",
"version": {
"provider":
"mike"}}
</script>
2528 <script src=
"../../assets/javascripts/bundle.d892486b.min.js"></script>