dolibarr 21.0.0-alpha
dropdown.inc.php
1<?php
2if (!defined('ISLOADEDBYSTEELSHEET')) {
3 die('Must be call by steelsheet');
4}
5
6// When no photo, we show the login name, so we need an offset to output picto at a fixed position.
7$atoploginusername = empty($user->photo) ? 52 : 0;
8
9?>
10/* <style type="text/css" > don't remove this line it's an ide hack */
11/*
12 * Dropdown of user popup
13 */
14
15.bookmark-footer a.top-menu-dropdown-link {
16 white-space: normal;
17 word-break: break-word;
18}
19
20button.dropdown-item.global-search-item {
21 outline: none;
22}
23
24.open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-menu, .dropdown dd ul.open {
25 display: block;
26}
27
28
29#topmenu-global-search-dropdown a.login-dropdown-a, #topmenu-quickadd-dropdown a.login-dropdown-a, #topmenu-bookmark-dropdown a.login-dropdown-a {
30 color: var(--colortextbackhmenu);
31}
32
33div#topmenu-global-search-dropdown {
34 position: fixed;
35 <?php echo $right; ?>: <?php echo (125 + $atoploginusername); ?>px;
36 top: 0px;
37}
38div#topmenu-quickadd-dropdown {
39 position: fixed;
40 <?php echo $right; ?>: <?php echo (90 + $atoploginusername); ?>px;
41 top: 0px;
42}
43div#topmenu-bookmark-dropdown {
44 position: fixed;
45 <?php echo $right; ?>: <?php print !getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? (55 + $atoploginusername) : 85; ?>px;
46 top: 0px;
47}
48div#topmenu-login-dropdown {
49 position: fixed;
50 <?php echo $right; ?>: 20px;
51 top: 0px;
52}
53
54#topmenu-login-dropdown .dropdown-toggle:after {
55 display: none;
56}
57
58#topmenu-global-search-dropdown .dropdown-menu, #topmenu-quickadd-dropdown .dropdown-menu, #topmenu-bookmark-dropdown .dropdown-menu, #topmenu-login-dropdown .dropdown-menu {
59 min-width: 370px;
60 max-width: 400px;
61}
62
63button.dropdown-item.global-search-item {
64 outline: none;
65}
66
67.open>.dropdown-search, .open>.dropdown-quickadd, .open>.dropdown-bookmark, .open>.dropdown-menu{
68 display: block !important;
69}
70
71.dropdown-search {
72 border-color: #eee;
73
74 position: absolute;
75 top: 100%;
76 left: 0;
77 z-index: 1000;
78 display: none;
79 float: left;
80 min-width: 160px;
81 margin: 2px 0 0;
82 font-size: 14px;
83 text-align: left;
84 list-style: none;
85 background-color: #fff;
86 -webkit-background-clip: padding-box;
87 background-clip: padding-box;
88 border: 1px solid #ccc;
89 border: 1px solid rgba(0,0,0,.15);
90 border-radius: 4px;
91 -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
92 box-shadow: 0 6px 12px rgba(0,0,0,.175);
93}
94.dropdown-bookmark {
95 border-color: #eee;
96
97 position: absolute;
98 top: 100%;
99 left: 0;
100 z-index: 1000;
101 display: none;
102 float: left;
103 min-width: 160px;
104 margin: 2px 0 0;
105 font-size: 14px;
106 text-align: left;
107 list-style: none;
108 background-color: #fff;
109 -webkit-background-clip: padding-box;
110 background-clip: padding-box;
111 border: 1px solid #ccc;
112 border: 1px solid rgba(0,0,0,.15);
113 border-radius: 4px;
114 -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
115 box-shadow: 0 6px 12px rgba(0,0,0,.175);
116}
117.dropdown-menu {
118 border-color: #eee;
119
120 position: absolute;
121 top: 100%;
122 left: 0;
123 z-index: 1000;
124 display: none;
125 float: left;
126 min-width: 160px;
127 margin: 2px 0 0;
128 font-size: 14px;
129 text-align: left;
130 list-style: none;
131 background-color: #fff;
132 -webkit-background-clip: padding-box;
133 background-clip: padding-box;
134 border: 1px solid #ccc;
135 border: 1px solid rgba(0,0,0,.15);
136 border-radius: 4px;
137 -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
138 box-shadow: 0 6px 12px rgba(0,0,0,.175);
139}
140
141
142/* CSS to hide the arrow to show open/close */
143div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
144 padding-right: 2px;
145}
146div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::after, div#topmenu-bookmark-dropdown a::after {
147 display: none;
148}
149
150
151.dropdown-toggle{
152 text-decoration: none !important;
153}
154
155.dropdown-toggle::after {
156 /* font part */
157 font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
158 font-size: 0.7em;
159 line-height: 1.7em;
160 font-weight: 900;
161 font-style: normal;
162 font-variant: normal;
163 text-rendering: auto;
164 -webkit-font-smoothing: antialiased;
165 text-align:center;
166 text-decoration:none;
167 margin: auto 3px;
168 display: inline-block;
169 content: "\f078";
170
171 -webkit-transition: -webkit-transform .2s ease-in-out;
172 -ms-transition: -ms-transform .2s ease-in-out;
173 transition: transform .2s ease-in-out;
174}
175
176.open>.dropdown-toggle::after {
177 transform: rotate(180deg);
178}
179
180/*
181 * MENU Dropdown
182 */
183
184.login_block.usedropdown .logout-btn{
185 /* display: none; */
186}
187
188.tmenu .open.dropdown, .tmenu .open.dropdown {
189 background: rgba(0, 0, 0, 0.1);
190}
191.tmenu .dropdown-menu, .login_block .dropdown-menu {
192 position: absolute;
193 right: 0;
194 <?php echo $left; ?>: auto;
195 line-height:1.3em;
196}
197.tmenu .dropdown-menu, .login_block .dropdown-menu .user-body {
198 border-bottom-right-radius: 4px;
199 border-bottom-left-radius: 4px;
200}
201.user-body {
202 color: #333;
203}
204.side-nav-vert .user-menu .dropdown-menu {
205 border-top-right-radius: 0;
206 border-top-left-radius: 0;
207 padding: 1px 0 0 0;
208 border-top-width: 0;
209 width: 300px;
210}
211.side-nav-vert .user-menu .dropdown-menu {
212 margin-top: 0;
213 border-top-left-radius: 0;
214 border-top-right-radius: 0;
215}
216
217.side-nav-vert .user-menu .dropdown-menu > .user-header {
218 min-height: 100px;
219 padding: 10px;
220 text-align: center;
221 white-space: normal;
222}
223
224#topmenu-global-search-dropdown .dropdown-menu{
225 width: 300px;
226 max-width: 100%;
227}
228
229div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-login-dropdown {
230 <?php if ($disableimages) { ?>
231 line-height: 35px;
232 <?php } else { ?>
233 line-height: 46px;
234 <?php } ?>
235}
236a.top-menu-dropdown-link {
237 padding: 8px;
238}
239
240.dropdown-user-image {
241 border-radius: 50%;
242 vertical-align: middle;
243 z-index: 5;
244 height: 90px;
245 width: 90px;
246 border: 3px solid;
247 border-color: transparent;
248 border-color: rgba(255, 255, 255, 0.2);
249 max-width: 100%;
250 max-height :100%;
251}
252
253.dropdown-menu > .user-header{
254 background: rgb(--colorbackhmenu1);
255}
256
257
258
259.dropdown-menu .dropdown-header{
260 padding: 8px 10px 10px 10px;
261}
262
263.dropdown-menu > .user-footer {
264 background-color: #f9f9f9;
265 padding: 10px;
266}
267
268.user-footer:after {
269 clear: both;
270}
271
272
273.dropdown-menu > .bookmark-footer{
274 border-top: 1px solid #f0f0f0;
275 background-color: #f9f9f9;
276 padding: 10px;
277 text-align: start;
278}
279
280
281.dropdown-menu > .user-body, .dropdown-body{
282 padding: 15px;
283 border-bottom: 1px solid #f4f4f4;
284 border-top: 1px solid #f0f0f0;
285 white-space: normal;
286}
287
288.dropdown-menu > .bookmark-body, .dropdown-body{
289 padding: 10px 0;
290 overflow-y: auto;
291 max-height: 60vh ; /* fallback for browsers without support for calc() */
292 max-height: calc(90vh - 110px) ;
293 white-space: normal;
294}
295#topmenu-quickadd-dropdown .dropdown-menu > .bookmark-body, #topmenu-quickadd-dropdown .dropdown-body,
296#topmenu-bookmark-dropdown .dropdown-menu > .bookmark-body, #topmenu-bookmark-dropdown .dropdown-body {
297 max-height: 60vh ; /* fallback for browsers without support for calc() */
298 max-height: calc(90vh - 200px) ;
299}
300
301
302.dropdown-body::-webkit-scrollbar {
303 width: 8px;
304 }
305.dropdown-body::-webkit-scrollbar-thumb {
306 -webkit-border-radius: 0;
307 border-radius: 0;
308 /* background: rgb(<?php echo $colorbackhmenu1 ?>); */
309 background: #aaa;
310}
311.dropdown-body::-webkit-scrollbar-track {
312 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
313 -webkit-border-radius: 0;
314 border-radius: 0;
315}
316
317
318#topmenu-login-dropdown, #topmenu-quickadd-dropdown, #topmenu-bookmark-dropdown, #topmenu-global-search-dropdown {
319 padding: 0 5px 0 5px;
320}
321#topmenu-login-dropdown a:hover{
322 text-decoration: none;
323}
324
325#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn {
326 display: block;
327 text-align: start;
328 color:#666;
329 cursor: pointer;
330}
331
332#topmenuloginmoreinfo, #topmenulogincompanyinfo {
333 display: none;
334 clear: both;
335 font-size: 0.95em;
336}
337
338a.dropdown-item {
339 text-align: start;
340}
341.dropdown-item.bookmark-item {
342 padding-left: 14px;
343 padding-right: 14px;
344}
345.dropdown-item.bookmark-item:before {
346 width: 20px;
347 padding-left: 2px;
348}
349
350.button-top-menu-dropdown {
351 display: inline-block;
352 padding: 6px 12px;
353 margin-bottom: 0;
354 font-size: 14px;
355 font-weight: 400;
356 line-height: 1.42857143;
357 text-align: center;
358 white-space: nowrap;
359 vertical-align: middle;
360 -ms-touch-action: manipulation;
361 touch-action: manipulation;
362 cursor: pointer;
363 -webkit-user-select: none;
364 -moz-user-select: none;
365 -ms-user-select: none;
366 user-select: none;
367 background-image: none;
368 border: 1px solid transparent;
369 border-radius: 4px;
370}
371
372.user-footer .button-top-menu-dropdown {
373 color: #666666;
374 border-radius: 0;
375 -webkit-box-shadow: none;
376 -moz-box-shadow: none;
377 box-shadow: none;
378 border-width: 1px;
379 background-color: #f4f4f4;
380 border-color: #ddd;
381}
382
383.dropdown-menu a.top-menu-dropdown-link {
384 color: rgb(<?php print $colortextlink; ?>) !important;
385 -webkit-box-shadow: none;
386 -moz-box-shadow: none;
387 box-shadow: none;
388 display: block;
389 margin: 5px 0px;
390}
391
392.dropdown-item {
393 display: block !important;
394 box-sizing: border-box;
395 width: 100%;
396 padding: .3em 1.5em .4em 1em;
397 clear: both;
398 font-weight: 400;
399 color: #212529 !important;
400 text-align: inherit;
401 background-color: transparent;
402 border: 0;
403
404 -webkit-box-shadow: none;
405 -moz-box-shadow: none;
406 box-shadow: none;
407}
408
409.dropdown-item::before {
410 /* font part */
411 font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
412 font-weight: 900;
413 font-style: normal;
414 font-variant: normal;
415 text-rendering: auto;
416 -webkit-font-smoothing: antialiased;
417 text-align:center;
418 text-decoration:none;
419 margin-<?php echo $right; ?>: 5px;
420 display: inline-block;
421 content: "\f0da";
422 color: rgba(0,0,0,0.3);
423}
424.multicompany-item::before {
425 content: none !important;
426}
427
428.dropdown-item.bookmark-item-external::before {
429 content: "\f35d";
430}
431
432.dropdown-item.active, .dropdown-item:hover, .dropdown-item:hover::before, .dropdown-item:hover span::before, .dropdown-item:focus, .dropdown-item:focus span::before {
433 color: #<?php echo $colortextbackhmenu; ?> !important;
434 text-decoration: none;
435 background: rgb(<?php echo $colorbackhmenu1 ?>);
436}
437
438/*
439 * SEARCH
440 */
441
442.dropdown-search-input {
443 width: 100%;
444 padding: 10px 35px 10px 20px;
445
446 background-color: transparent;
447 font-size: 14px;
448 line-height: 16px;
449 box-sizing: border-box;
450
451
452 color: #575756;
453 background-color: transparent;
454 background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
455 background-repeat: no-repeat;
456 background-size: 16px 16px;
457 background-position: 95% center;
458 border-radius: 50px;
459 border: 1px solid #c4c4c2 !important;
460 transition: all 250ms ease-in-out;
461 backface-visibility: hidden;
462 transform-style: preserve-3d;
463
464}
465
466.search-dropdown-body {
467 padding: unset;
468}
469
470.global-search-item {
471 font-size: 1em;
472 padding-top: 6px;
473 padding-bottom: 6px;
474}
475
476.global-search-item:before {
477 content: none;
478}
479
480.global-search-header {
481 color: #444 !important;
482}
483
484
485/*
486 * QUICK ADD
487 */
488
489#topmenu-quickadd-dropdown .dropdown-menu {
490 width: 310px !important;
491 color: #444;
492}
493
494.quickadd-body.dropdown-body {
495 padding: unset;
496}
497
498.quickadd-item {
499 font-size: 1.1em;
500 padding-top: 8px;
501 padding-bottom: 8px;
502}
503
504.quickadd-item:before {
505 content: none;
506}
507
508.quickadd-header {
509 color: #444 !important;
510}
511
512div.quickadd {
513 display: -ms-flexbox;
514 display: -webkit-flex;
515 display: flex;
516 -webkit-flex-direction: row;
517 -ms-flex-direction: row;
518 flex-direction: row;
519 -webkit-flex-wrap: wrap;
520 -ms-flex-wrap: wrap;
521 flex-wrap: wrap;
522 -webkit-justify-content: center;
523 -ms-flex-pack: center;
524 justify-content: center;
525 -webkit-align-content: center;
526 -ms-flex-line-pack: center;
527 align-content: center;
528 -webkit-align-items: flex-start;
529 -ms-flex-align: start;
530 align-items: flex-start;
531}
532
533div.quickadd a {
534 color: #444;
535}
536
537div.quickadd a:hover, div.quickadd a:active {
538 color: #000000;
539}
540
541div.quickaddblock {
542 width: 95px;
543 height: 80px;
544}
545
546div.quickaddblock:hover,
547div.quickaddblock:active,
548div.quickaddblock:focus {
549 background: <?php print $colorbacklinepair1; ?>;
550}
551
552
553/* for the dropdown on action buttons */
554.dropdown-holder {
555 position: relative;
556 display: inline-block;
557}
558
559.dropdown-content {
560 display: none;
561 position: absolute;
562 z-index: 1;
563 width: 300px;
564 right:0;
565 bottom: 0;
566 transform: translateY(100%);
567
568 background: #fff;
569 border: 1px solid #bbb;
570 text-align: <?php echo $left; ?>;
571 -webkit-box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
572 box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
573}
574
575/* dropdown --up variant */
576.dropdown-holder.--up .dropdown-content{
577 bottom: auto;
578 top: 0;
579 transform: translateY(-100%);
580}
581
582/* dropdown --left variant */
583.dropdown-holder.--left .dropdown-content{
584 right: auto;
585 left: 12px;
586}
587
588
589.dropdown-content a {
590 margin-right: auto !important;
591 margin-left: auto !important;
592}
593.dropdown-content .butAction {
594 background: none;
595 color: #000 !important;
596}
597.dropdown-content a:is(.butAction,.butActionDelete,.butActionRefused) {
598 display: flex;
599 border-radius: 0;
600}
601.dropdown-content .butAction:hover {
602 box-shadow: none;
603 background-color: var(--butactionbg);
604 color: var(--textbutaction) !important;
605 text-decoration: none;
606}
607
608.dropdown-content .butActionDelete{
609 background-color: transparent !important;
610 color: #633 !important;
611}
612.dropdown-content .butActionDelete:hover {
613 box-shadow: none;
614 background-color: var(--butactiondeletebg) !important;
615 color: #633 !important;
616 text-decoration: none;
617}
618
619.dropdown-content .butActionRefused {
620 margin-left: 0;
621 margin-right: 0;
622 border: none;
623}
624
625.dropdown-holder.open .dropdown-content {
626 display: block;
627}
628
629
631.dropdown-holder.open .dropdown-content::before {
632 --triangleBorderSize : 5px;
633 position: absolute;
634 content: "";
635 top: calc(var(--triangleBorderSize) * -1);
636 right: 12px;
637 width: 0px;
638 height: 0px;
639 border-style: solid;
640 border-width: 0 var(--triangleBorderSize) var(--triangleBorderSize) var(--triangleBorderSize);
641 border-color: transparent transparent #ffff transparent;
642 transform: rotate(0deg);
643}
644
645/* dropdown --up variant*/
646.dropdown-holder.--up.open .dropdown-content::before{
647 top: auto;
648 bottom: calc(var(--triangleBorderSize) * -1);
649 border-width: 0 var(--triangleBorderSize) var(--triangleBorderSize) var(--triangleBorderSize);
650 transform: rotate(180deg);
651}
652
653/* dropdown --left variant*/
654.dropdown-holder.--left.open .dropdown-content::before{
655 right: auto;
656 left: 12px;
657}
658
659
660/* smartphone */
661@media only screen and (max-width: 767px)
662{
663 #topmenu-quickadd-dropdown .dropdown-menu {
664 min-width: 220px;
665 max-width: 235px;
666 }
667 #topmenu-bookmark-dropdown .dropdown-menu {
668 min-width: 220px;
669 max-width: 360px;
670 }
671 #topmenu-login-dropdown .dropdown-menu {
672 min-width: 220px;
673 max-width: 360px;
674 }
675
676 #topmenu-quickadd-dropdown a.login-dropdown-a,
677 #topmenu-bookmark-dropdown a.login-dropdown-a,
678 #topmenu-login-dropdown a.login-dropdown-a {
679 color: #000;
680 }
681 #topmenu-quickadd-dropdown .dropdown-menu,
682 #topmenu-bookmark-dropdown .dropdown-menu,
683 #topmenu-login-dropdown .dropdown-menu {
684 width: 230px;
685 }
686
687 div#topmenu-global-search-dropdown,
688 div#topmenu-quickadd-dropdown,
689 div#topmenu-bookmark-dropdown,
690 div#topmenu-login-dropdown {
691 position: unset;
692 }
693
694 div#topmenu-global-search-dropdown,
695 div#topmenu-quickadd-dropdown,
696 div#topmenu-bookmark-dropdown {
697 line-height: unset;
698 }
699
700 ul.tmenu {
701 margin-right: 2px;
702 }
703}
704
705@media only screen and (max-width: 320px)
706{
707 .dropdown dd ul {
708 max-width: 270px; /* must always be 50 slower than width */
709 }
710}
711@media only screen and (max-width: 300px)
712{
713 .dropdown dd ul {
714 max-width: 250px;
715 }
716}
717@media only screen and (max-width: 280px)
718{
719 .dropdown dd ul {
720 max-width: 230px;
721 }
722}
723
724
725.dropdown-search-input::placeholder {
726 color: color(#575756);
727 letter-spacing: 1.5px;
728}
729
730.hidden-search-result{
731 display: none !important;
732}
print $object position
Definition edit.php:195
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
ui state ui widget content ui state ui widget header ui state a ui button
0 = Do not include form tag and submit button -1 = Do not include form tag but include submit button
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:141