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: 300px;
60 max-width: 360px;
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
342.button-top-menu-dropdown {
343 display: inline-block;
344 padding: 6px 12px;
345 margin-bottom: 0;
346 font-size: 14px;
347 font-weight: 400;
348 line-height: 1.42857143;
349 text-align: center;
350 white-space: nowrap;
351 vertical-align: middle;
352 -ms-touch-action: manipulation;
353 touch-action: manipulation;
354 cursor: pointer;
355 -webkit-user-select: none;
356 -moz-user-select: none;
357 -ms-user-select: none;
358 user-select: none;
359 background-image: none;
360 border: 1px solid transparent;
361 border-radius: 4px;
362}
363
364.user-footer .button-top-menu-dropdown {
365 color: #666666;
366 border-radius: 0;
367 -webkit-box-shadow: none;
368 -moz-box-shadow: none;
369 box-shadow: none;
370 border-width: 1px;
371 background-color: #f4f4f4;
372 border-color: #ddd;
373}
374
375.dropdown-menu a.top-menu-dropdown-link {
376 color: rgb(<?php print $colortextlink; ?>) !important;
377 -webkit-box-shadow: none;
378 -moz-box-shadow: none;
379 box-shadow: none;
380 display: block;
381 margin: 5px 0px;
382}
383
384.dropdown-item {
385 display: block !important;
386 box-sizing: border-box;
387 width: 100%;
388 padding: .3em 1.5em .4em 1em;
389 clear: both;
390 font-weight: 400;
391 color: #212529 !important;
392 text-align: inherit;
393 background-color: transparent;
394 border: 0;
395
396 -webkit-box-shadow: none;
397 -moz-box-shadow: none;
398 box-shadow: none;
399}
400
401.dropdown-item::before {
402 /* font part */
403 font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
404 font-weight: 900;
405 font-style: normal;
406 font-variant: normal;
407 text-rendering: auto;
408 -webkit-font-smoothing: antialiased;
409 text-align:center;
410 text-decoration:none;
411 margin-<?php echo $right; ?>: 5px;
412 display: inline-block;
413 content: "\f0da";
414 color: rgba(0,0,0,0.3);
415}
416.multicompany-item::before {
417 content: none !important;
418}
419
420.dropdown-item.bookmark-item-external::before {
421 content: "\f35d";
422}
423
424.dropdown-item.active, .dropdown-item:hover, .dropdown-item:hover::before, .dropdown-item:hover span::before, .dropdown-item:focus, .dropdown-item:focus span::before {
425 color: #<?php echo $colortextbackhmenu; ?> !important;
426 text-decoration: none;
427 background: rgb(<?php echo $colorbackhmenu1 ?>);
428}
429
430/*
431 * SEARCH
432 */
433
434.dropdown-search-input {
435 width: 100%;
436 padding: 10px 35px 10px 20px;
437
438 background-color: transparent;
439 font-size: 14px;
440 line-height: 16px;
441 box-sizing: border-box;
442
443
444 color: #575756;
445 background-color: transparent;
446 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");
447 background-repeat: no-repeat;
448 background-size: 16px 16px;
449 background-position: 95% center;
450 border-radius: 50px;
451 border: 1px solid #c4c4c2 !important;
452 transition: all 250ms ease-in-out;
453 backface-visibility: hidden;
454 transform-style: preserve-3d;
455
456}
457
458.search-dropdown-body {
459 padding: unset;
460}
461
462.global-search-item {
463 font-size: 1em;
464 padding-top: 6px;
465 padding-bottom: 6px;
466}
467
468.global-search-item:before {
469 content: none;
470}
471
472.global-search-header {
473 color: #444 !important;
474}
475
476
477/*
478 * QUICK ADD
479 */
480
481#topmenu-quickadd-dropdown .dropdown-menu {
482 width: 310px !important;
483 color: #444;
484}
485
486.quickadd-body.dropdown-body {
487 padding: unset;
488}
489
490.quickadd-item {
491 font-size: 1em;
492 padding-top: 6px;
493 padding-bottom: 6px;
494}
495
496.quickadd-item:before {
497 content: none;
498}
499
500.quickadd-header {
501 color: #444 !important;
502}
503
504div.quickadd {
505 display: -ms-flexbox;
506 display: -webkit-flex;
507 display: flex;
508 -webkit-flex-direction: row;
509 -ms-flex-direction: row;
510 flex-direction: row;
511 -webkit-flex-wrap: wrap;
512 -ms-flex-wrap: wrap;
513 flex-wrap: wrap;
514 -webkit-justify-content: center;
515 -ms-flex-pack: center;
516 justify-content: center;
517 -webkit-align-content: center;
518 -ms-flex-line-pack: center;
519 align-content: center;
520 -webkit-align-items: flex-start;
521 -ms-flex-align: start;
522 align-items: flex-start;
523}
524
525div.quickadd a {
526 color: #444;
527}
528
529div.quickadd a:hover, div.quickadd a:active {
530 color: #000000;
531}
532
533div.quickaddblock {
534 width: 95px;
535 height: 80px;
536}
537
538div.quickaddblock:hover,
539div.quickaddblock:active,
540div.quickaddblock:focus {
541 background: <?php print $colorbacklinepair1; ?>;
542}
543
544
545/* for the dropdown on action buttons */
546dropdown-holder {
547 position: relative;
548 display: inline-block;
549}
550
551.dropdown-content {
552 display: none;
553 position: absolute;
554 z-index: 1;
555 width: 300px;
556 right:10px; /* will be set with js */
557 background: #fff;
558 border: 1px solid #bbb;
559 text-align: <?php echo $left; ?>
560}
561
562.dropdown-content a {
563 margin-right: auto !important;
564 margin-left: auto !important;
565}
566.dropdown-content .butAction {
567 background: none;
568 color: #000 !important;
569}
570.dropdown-content a.butAction {
571 display: flex;
572}
573.dropdown-content .butAction:hover {
574 box-shadow: none;
575 text-decoration: underline;
576}
577.dropdown-content .butActionRefused {
578 margin-left: 0;
579 margin-right: 0;
580 border: none;
581}
582
583.dropdown-holder.open .dropdown-content {
584 display: block;
585}
586
587
589.dropdown-holder.open .dropdown-content::before {
590 --triangleBorderSize : 5px;
591 position: absolute;
592 content: "";
593 top: calc(var(--triangleBorderSize) * -1);
594 right: 12px;
595 width: 0px;
596 height: 0px;
597 border-style: solid;
598 border-width: 0 var(--triangleBorderSize) var(--triangleBorderSize) var(--triangleBorderSize);
599 border-color: transparent transparent #ffff transparent;
600 transform: rotate(0deg);
601}
602
603/* smartphone */
604@media only screen and (max-width: 767px)
605{
606 #topmenu-quickadd-dropdown .dropdown-menu {
607 min-width: 220px;
608 max-width: 235px;
609 }
610 #topmenu-bookmark-dropdown .dropdown-menu {
611 min-width: 220px;
612 max-width: 360px;
613 }
614 #topmenu-login-dropdown .dropdown-menu {
615 min-width: 220px;
616 max-width: 360px;
617 }
618
619 #topmenu-quickadd-dropdown a.login-dropdown-a,
620 #topmenu-bookmark-dropdown a.login-dropdown-a,
621 #topmenu-login-dropdown a.login-dropdown-a {
622 color: #000;
623 }
624 #topmenu-quickadd-dropdown .dropdown-menu,
625 #topmenu-bookmark-dropdown .dropdown-menu,
626 #topmenu-login-dropdown .dropdown-menu {
627 width: 230px;
628 }
629
630 div#topmenu-global-search-dropdown,
631 div#topmenu-quickadd-dropdown,
632 div#topmenu-bookmark-dropdown,
633 div#topmenu-login-dropdown {
634 position: unset;
635 }
636
637 div#topmenu-global-search-dropdown,
638 div#topmenu-quickadd-dropdown,
639 div#topmenu-bookmark-dropdown {
640 line-height: unset;
641 }
642
643 ul.tmenu {
644 margin-right: 2px;
645 }
646}
647
648@media only screen and (max-width: 320px)
649{
650 .dropdown dd ul {
651 max-width: 270px; /* must always be 50 slower than width */
652 }
653}
654@media only screen and (max-width: 300px)
655{
656 .dropdown dd ul {
657 max-width: 250px;
658 }
659}
660@media only screen and (max-width: 280px)
661{
662 .dropdown dd ul {
663 max-width: 230px;
664 }
665}
666
667
668.dropdown-search-input::placeholder {
669 color: color(#575756);
670 letter-spacing: 1.5px;
671}
672
673.hidden-search-result{
674 display: none !important;
675}
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:143