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