dolibarr 19.0.4
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" > dont 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: #fff;
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 echo (55 + $atoploginusername); ?>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 font-weight: 900;
160 font-style: normal;
161 font-variant: normal;
162 text-rendering: auto;
163 -webkit-font-smoothing: antialiased;
164 text-align:center;
165 text-decoration:none;
166 margin: auto 3px;
167 display: inline-block;
168 content: "\f078";
169
170 -webkit-transition: -webkit-transform .2s ease-in-out;
171 -ms-transition: -ms-transform .2s ease-in-out;
172 transition: transform .2s ease-in-out;
173}
174
175.open>.dropdown-toggle::after {
176 transform: rotate(180deg);
177}
178
179/*
180 * MENU Dropdown
181 */
182
183.login_block.usedropdown .logout-btn{
184 /* display: none; */
185}
186
187.tmenu .open.dropdown, .tmenu .open.dropdown {
188 background: rgba(0, 0, 0, 0.1);
189}
190.tmenu .dropdown-menu, .login_block .dropdown-menu {
191 position: absolute;
192 right: 0;
193 <?php echo $left; ?>: auto;
194 line-height:1.3em;
195}
196.tmenu .dropdown-menu, .login_block .dropdown-menu .user-body {
197 border-bottom-right-radius: 4px;
198 border-bottom-left-radius: 4px;
199}
200.user-body {
201 color: #333;
202}
203.side-nav-vert .user-menu .dropdown-menu {
204 border-top-right-radius: 0;
205 border-top-left-radius: 0;
206 padding: 1px 0 0 0;
207 border-top-width: 0;
208 width: 300px;
209}
210.side-nav-vert .user-menu .dropdown-menu {
211 margin-top: 0;
212 border-top-left-radius: 0;
213 border-top-right-radius: 0;
214}
215
216.side-nav-vert .user-menu .dropdown-menu > .user-header {
217 min-height: 100px;
218 padding: 10px;
219 text-align: center;
220 white-space: normal;
221}
222
223#topmenu-global-search-dropdown .dropdown-menu{
224 width: 300px;
225 max-width: 100%;
226}
227
228div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-login-dropdown {
229 line-height: <?php echo(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46'); ?>px;
230}
231a.top-menu-dropdown-link {
232 padding: 8px;
233}
234
235.dropdown-user-image {
236 border-radius: 50%;
237 vertical-align: middle;
238 z-index: 5;
239 height: 90px;
240 width: 90px;
241 border: 3px solid;
242 border-color: transparent;
243 border-color: rgba(255, 255, 255, 0.2);
244 max-width: 100%;
245 max-height :100%;
246}
247
248.dropdown-menu > .user-header{
249 background: rgb(--colorbackhmenu1);
250}
251
252
253
254.dropdown-menu .dropdown-header{
255 padding: 8px 10px 10px 10px;
256}
257
258.dropdown-menu > .user-footer {
259 background-color: #f9f9f9;
260 padding: 10px;
261}
262
263.user-footer:after {
264 clear: both;
265}
266
267
268.dropdown-menu > .bookmark-footer{
269 border-top: 1px solid #f0f0f0;
270 background-color: #f9f9f9;
271 padding: 10px;
272 text-align: start;
273}
274
275
276.dropdown-menu > .user-body, .dropdown-body{
277 padding: 15px;
278 border-bottom: 1px solid #f4f4f4;
279 border-top: 1px solid #f0f0f0;
280 white-space: normal;
281}
282
283.dropdown-menu > .bookmark-body, .dropdown-body{
284 padding: 10px 0;
285 overflow-y: auto;
286 max-height: 60vh ; /* fallback for browsers without support for calc() */
287 max-height: calc(90vh - 110px) ;
288 white-space: normal;
289}
290#topmenu-quickadd-dropdown .dropdown-menu > .bookmark-body, #topmenu-quickadd-dropdown .dropdown-body,
291#topmenu-bookmark-dropdown .dropdown-menu > .bookmark-body, #topmenu-bookmark-dropdown .dropdown-body {
292 max-height: 60vh ; /* fallback for browsers without support for calc() */
293 max-height: calc(90vh - 200px) ;
294}
295
296
297.dropdown-body::-webkit-scrollbar {
298 width: 8px;
299 }
300.dropdown-body::-webkit-scrollbar-thumb {
301 -webkit-border-radius: 0;
302 border-radius: 0;
303 /* background: rgb(<?php echo $colorbackhmenu1 ?>); */
304 background: #aaa;
305}
306.dropdown-body::-webkit-scrollbar-track {
307 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
308 -webkit-border-radius: 0;
309 border-radius: 0;
310}
311
312
313#topmenu-login-dropdown, #topmenu-quickadd-dropdown, #topmenu-bookmark-dropdown, #topmenu-global-search-dropdown {
314 padding: 0 5px 0 5px;
315}
316#topmenu-login-dropdown a:hover{
317 text-decoration: none;
318}
319
320#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn {
321 display: block;
322 text-align: start;
323 color:#666;
324 cursor: pointer;
325}
326
327#topmenuloginmoreinfo, #topmenulogincompanyinfo {
328 display: none;
329 clear: both;
330 font-size: 0.95em;
331}
332
333a.dropdown-item {
334 text-align: start;
335}
336
337.button-top-menu-dropdown {
338 display: inline-block;
339 padding: 6px 12px;
340 margin-bottom: 0;
341 font-size: 14px;
342 font-weight: 400;
343 line-height: 1.42857143;
344 text-align: center;
345 white-space: nowrap;
346 vertical-align: middle;
347 -ms-touch-action: manipulation;
348 touch-action: manipulation;
349 cursor: pointer;
350 -webkit-user-select: none;
351 -moz-user-select: none;
352 -ms-user-select: none;
353 user-select: none;
354 background-image: none;
355 border: 1px solid transparent;
356 border-radius: 4px;
357}
358
359.user-footer .button-top-menu-dropdown {
360 color: #666666;
361 border-radius: 0;
362 -webkit-box-shadow: none;
363 -moz-box-shadow: none;
364 box-shadow: none;
365 border-width: 1px;
366 background-color: #f4f4f4;
367 border-color: #ddd;
368}
369
370.dropdown-menu a.top-menu-dropdown-link {
371 color: rgb(<?php print $colortextlink; ?>) !important;
372 -webkit-box-shadow: none;
373 -moz-box-shadow: none;
374 box-shadow: none;
375 display: block;
376 margin: 5px 0px;
377}
378
379.dropdown-item {
380 display: block !important;
381 box-sizing: border-box;
382 width: 100%;
383 padding: .3em 1.5em .4em 1em;
384 clear: both;
385 font-weight: 400;
386 color: #212529 !important;
387 text-align: inherit;
388 background-color: transparent;
389 border: 0;
390
391 -webkit-box-shadow: none;
392 -moz-box-shadow: none;
393 box-shadow: none;
394}
395
396.dropdown-item::before {
397 /* font part */
398 font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
399 font-weight: 900;
400 font-style: normal;
401 font-variant: normal;
402 text-rendering: auto;
403 -webkit-font-smoothing: antialiased;
404 text-align:center;
405 text-decoration:none;
406 margin-<?php echo $right; ?>: 5px;
407 display: inline-block;
408 content: "\f0da";
409 color: rgba(0,0,0,0.3);
410}
411.multicompany-item::before {
412 content: none !important;
413}
414
415.dropdown-item.bookmark-item-external::before {
416 content: "\f35d";
417}
418
419.dropdown-item.active, .dropdown-item:hover, .dropdown-item:hover::before, .dropdown-item:hover span::before, .dropdown-item:focus, .dropdown-item:focus span::before {
420 color: #<?php echo $colortextbackhmenu; ?> !important;
421 text-decoration: none;
422 background: rgb(<?php echo $colorbackhmenu1 ?>);
423}
424
425/*
426 * SEARCH
427 */
428
429.dropdown-search-input {
430 width: 100%;
431 padding: 10px 35px 10px 20px;
432
433 background-color: transparent;
434 font-size: 14px;
435 line-height: 16px;
436 box-sizing: border-box;
437
438
439 color: #575756;
440 background-color: transparent;
441 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");
442 background-repeat: no-repeat;
443 background-size: 16px 16px;
444 background-position: 95% center;
445 border-radius: 50px;
446 border: 1px solid #c4c4c2 !important;
447 transition: all 250ms ease-in-out;
448 backface-visibility: hidden;
449 transform-style: preserve-3d;
450
451}
452
453.search-dropdown-body {
454 padding: unset;
455}
456
457.global-search-item {
458 font-size: 1em;
459 padding-top: 6px;
460 padding-bottom: 6px;
461}
462
463.global-search-item:before {
464 content: none;
465}
466
467.global-search-header {
468 color: #444 !important;
469}
470
471
472/*
473 * QUICK ADD
474 */
475
476#topmenu-quickadd-dropdown .dropdown-menu {
477 width: 310px !important;
478 color: #444;
479}
480
481.quickadd-body.dropdown-body {
482 padding: unset;
483}
484
485.quickadd-item {
486 font-size: 1em;
487 padding-top: 6px;
488 padding-bottom: 6px;
489}
490
491.quickadd-item:before {
492 content: none;
493}
494
495.quickadd-header {
496 color: #444 !important;
497}
498
499div.quickadd {
500 display: -ms-flexbox;
501 display: -webkit-flex;
502 display: flex;
503 -webkit-flex-direction: row;
504 -ms-flex-direction: row;
505 flex-direction: row;
506 -webkit-flex-wrap: wrap;
507 -ms-flex-wrap: wrap;
508 flex-wrap: wrap;
509 -webkit-justify-content: center;
510 -ms-flex-pack: center;
511 justify-content: center;
512 -webkit-align-content: center;
513 -ms-flex-line-pack: center;
514 align-content: center;
515 -webkit-align-items: flex-start;
516 -ms-flex-align: start;
517 align-items: flex-start;
518}
519
520div.quickadd a {
521 color: #444;
522}
523
524div.quickadd a:hover, div.quickadd a:active {
525 color: #000000;
526}
527
528div.quickaddblock {
529 width: 95px;
530 height: 80px;
531}
532
533div.quickaddblock:hover,
534div.quickaddblock:active,
535div.quickaddblock:focus {
536 background: <?php print $colorbacklinepair1; ?>;
537}
538
539
540/* for the dropdown on action buttons */
541dropdown-holder {
542 position: relative;
543 display: inline-block;
544}
545
546.dropdown-content {
547 display: none;
548 position: absolute;
549 z-index: 1;
550 width: 300px;
551 right:10px; /* will be set with js */
552 background: #fff;
553 border: 1px solid #bbb;
554 text-align: <?php echo $left; ?>
555}
556
557.dropdown-content a {
558 margin-right: auto !important;
559 margin-left: auto !important;
560}
561.dropdown-content .butAction {
562 background: none;
563 color: #000 !important;
564}
565.dropdown-content a.butAction {
566 display: flex;
567}
568.dropdown-content .butAction:hover {
569 box-shadow: none;
570 text-decoration: underline;
571}
572.dropdown-content .butActionRefused {
573 margin-left: 0;
574 margin-right: 0;
575 border: none;
576}
577
578.dropdown-holder.open .dropdown-content {
579 display: block;
580}
581
582
583/* smartphone */
584@media only screen and (max-width: 767px)
585{
586 #topmenu-quickadd-dropdown .dropdown-menu {
587 min-width: 220px;
588 max-width: 235px;
589 }
590 #topmenu-bookmark-dropdown .dropdown-menu {
591 min-width: 220px;
592 max-width: 360px;
593 }
594 #topmenu-login-dropdown .dropdown-menu {
595 min-width: 220px;
596 max-width: 360px;
597 }
598
599 #topmenu-quickadd-dropdown a.login-dropdown-a,
600 #topmenu-bookmark-dropdown a.login-dropdown-a,
601 #topmenu-login-dropdown a.login-dropdown-a {
602 color: #000;
603 }
604 #topmenu-quickadd-dropdown .dropdown-menu,
605 #topmenu-bookmark-dropdown .dropdown-menu,
606 #topmenu-login-dropdown .dropdown-menu {
607 width: 230px;
608 }
609
610 div#topmenu-global-search-dropdown,
611 div#topmenu-quickadd-dropdown,
612 div#topmenu-bookmark-dropdown,
613 div#topmenu-login-dropdown {
614 position: unset;
615 }
616
617 div#topmenu-global-search-dropdown,
618 div#topmenu-quickadd-dropdown,
619 div#topmenu-bookmark-dropdown {
620 line-height: unset;
621 }
622
623 ul.tmenu {
624 margin-right: 2px;
625 }
626}
627
628@media only screen and (max-width: 320px)
629{
630 .dropdown dd ul {
631 max-width: 270px; /* must always be 50 slower than width */
632 }
633}
634@media only screen and (max-width: 300px)
635{
636 .dropdown dd ul {
637 max-width: 250px;
638 }
639}
640@media only screen and (max-width: 280px)
641{
642 .dropdown dd ul {
643 max-width: 230px;
644 }
645}
646
647
648.dropdown-search-input::placeholder {
649 color: color(#575756);
650 letter-spacing: 1.5px;
651}
652
653.hidden-search-result{
654 display: none !important;
655}
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
rtl background position
ui dialog ui datepicker calendar ui widget content ui state ui datepicker calendar ui widget header ui state ui datepicker calendar ui button
0 = Do not include form tag and submit button -1 = Do not include form tag but include submit button
$conf db user
Definition repair.php:125