dolibarr 21.0.0-beta
btn.inc.php
1<?php
2/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
3 */
4if (!defined('ISLOADEDBYSTEELSHEET')) {
5 die('Must be call by steelsheet');
6}
15?>
16/* <style type="text/css" > */
17
18:root {
19 --btncolortext:rgb(<?php print $colortextlink; ?>);
20 --btncolorbg: #fbfbfb;
21 --btncolorborderhover: none;
22 --btncolorborder: #FFF;
23 --butactiondeletebg: rgb(234,228,225);
24 --butactionbg: rgb(<?php print $butactionbg; ?>);
25 --textbutaction: rgb(<?php print $textbutaction; ?>);
26}
27
28<?php
29if (getDolGlobalString('THEME_DARKMODEENABLED')) {
30 print "/* For dark mode */\n";
31 if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
32 print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
33 } else {
34 print "@media not print {";
35 }
36 print "
37 :root {
38
39 --btncolortext: ;
40 --btncolorbg: rgb(26,27,27);
41 --btncolorborderhover: #ffffff;
42 --btncolorborder: #2b2c2e;
43 --butactiondeletebg: rgb(252,84,91);
44 --butactionbg: rgb(173,140,79);
45 --textbutaction: rgb(255,255,255);
46
47 }\n";
48 print "}";
49}
50?>
51
52/* ============================================================================== */
53/* Buttons for actions */
54/* ============================================================================== */
55
56
57div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
58div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete,
59div.tabsAction > div.divButAction > span.butAction,
60div.tabsAction > div.divButAction > span.butActionDelete,
61div.tabsAction > div.divButAction > span.butActionRefused,
62div.tabsAction > div.divButAction > a.butAction,
63div.tabsAction > div.divButAction > a.butActionDelete,
64div.tabsAction > div.divButAction > a.butActionRefused {
65 margin-bottom: 1.4em !important;
66 margin-right: 0px !important;
67}
68div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused {
69 margin-bottom: 0 !important;
70}
71
72span.butAction, span.butActionDelete {
73 cursor: pointer;
74}
75
76.butAction {
77 background: var(--butactionbg);
78 color: var(--textbutaction) !important;
79 /* background: rgb(230, 232, 239); */
80}
81.butActionRefused, .butAction, .butActionDelete {
82 border-radius: 3px;
83}
84:not(.center) > .butActionRefused:last-child, :not(.center) > .butAction:last-child, :not(.center) > .butActionDelete:last-child {
85 margin-<?php echo $right; ?>: 0px !important;
86}
87.butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
88 text-decoration: none;
89 text-transform: uppercase;
90 font-weight: bold;
91 line-height: 1.8em;
92
93 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
94 padding: 0.6em <?php echo($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
95 font-family: <?php print $fontlist ?>;
96 display: inline-block;
97 text-align: center;
98 cursor: pointer;
99 color: #444;
100
101 /* border: 1px solid #aaa; */
102 /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
103
104 /*border-top-right-radius: 0 !important;
105 border-bottom-right-radius: 0 !important;
106 border-top-left-radius: 0 !important;
107 border-bottom-left-radius: 0 !important;*/
108}
109.butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
110 text-decoration: none;
111 text-transform: uppercase;
112 font-weight: normal;
113
114 margin: 0em 0.3em 0 0.3em !important;
115 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em;
116 font-family: <?php print $fontlist ?>;
117 display: inline-block;
118 /* text-align: center; New button are on right of screen */
119 cursor: pointer;
120}
121
122.button {
123 border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
124 display: inline-block;
125 padding: 0.4em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
126 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
127 line-height: 20px;
128 text-align: center;
129 vertical-align: middle;
130 cursor: pointer;
131 color: #333333 !important;
132 text-decoration: none !important;
133 text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
134 background-color: #f5f5f5;
135 background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
136 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
137 background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
138 background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
139 background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
140 background-repeat: repeat-x;
141 border-color: #e6e6e6 #e6e6e6 #bfbfbf;
142 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
143 border: 1px solid #bbbbbb;
144 border-bottom-color: #a2a2a2;
145 -webkit-border-radius: 2px;
146 border-radius: 2px;
147 -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
148 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
149}
150.butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
151 text-decoration: none;
152 /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
153 display: inline-block;
154 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
155 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
156 line-height: 20px;
157 /* text-align: center; New button are on right of screen */
158 vertical-align: middle;
159 cursor: pointer;
160 /* color: #ffffff !important; */
161 /* text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); */
162 -webkit-border-radius: 2px;
163 border-radius: 2px;
164 /* -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
165 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); */
166 /* background-color: #006dcc;
167 background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
168 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
169 background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
170 background-image: -o-linear-gradient(top, #0088cc, #0044cc);
171 background-image: linear-gradient(to bottom, #0088cc, #0044cc);
172 background-repeat: repeat-x; */
173}
174a.butActionNew>span.fa-plus-circle { padding-left: 6px; font-size: 1.5em; }
175a.butActionNewRefused>span.fa-plus-circle { padding-left: 6px; font-size: 1.5em; }
176
177.tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover,
178.tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover,
179span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
180a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
181span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
182a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
183span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
184a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
185span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover
186{
187 font-size: 1em;
188 padding-left: 0px;
189}
190
191.button {
192 color: #ffffff !important;
193 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
194 background-color: #006dcc;
195 background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
196 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
197 background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
198 background-image: -o-linear-gradient(top, #0088cc, #0044cc);
199 background-image: linear-gradient(to bottom, #0088cc, #0044cc);
200 background-repeat: repeat-x;
201 border-color: #0044cc #0044cc #002a80;
202 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
203}
205 color: #666 !important;
206 text-shadow: none;
207 border-color: #555;
208 cursor: not-allowed;
209
210 background-color: #f5f5f5;
211 background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
212 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
213 background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
214 background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
215 background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
216 background-repeat: repeat-x
217}
218
219button.ui-button {
220 padding-top: 5px;
221}
222
223a.butActionNew>span.fa, a.butActionNew>span.fa:hover,
224span.butActionNew>span.fa, span.butActionNew>span.fa:hover,
225a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover,
226span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover
227{
228 padding-<?php echo $left; ?>: 6px;
229 font-size: 1.5em;
230 border: none;
231 box-shadow: none;
232 -webkit-box-shadow: none;
233}
234
235.butAction:hover {
236 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), inset 0px 0px 200px rgba(60,60,60,0.1);
237 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), inset 0px 0px 200px rgba(60,60,60,0.1);
238}
239.butActionNew:hover {
240 text-decoration: underline;
241 box-shadow: unset !important;
242}
243
244.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
245 background: var(--butactiondeletebg);
246 /* border: 1px solid #633; */
247 color: #633;
248 /* vertical-align: middle; */
249}
250
251.butActionDelete:hover {
252 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
253 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
254}
255
256.butActionRefused {
257 text-decoration: none !important;
258 text-transform: uppercase;
259 font-weight: bold !important;
260
261 white-space: nowrap !important;
262 cursor: not-allowed !important;
263 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
264 padding: 0.6em <?php echo($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
265 font-family: <?php print $fontlist ?> !important;
266 display: inline-block;
267 text-align: center;
268 cursor: pointer;
269 color: #999 !important;
270
271 border: 1px solid #ccc;
272 box-sizing: border-box;
273 -moz-box-sizing: border-box;
274 -webkit-box-sizing: border-box;
275}
276.butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
277 text-decoration: none !important;
278 text-transform: uppercase;
279 font-weight: normal !important;
280
281 white-space: nowrap !important;
282 cursor: not-allowed !important;
283 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
284 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
285 font-family: <?php print $fontlist ?> !important;
286 display: inline-block;
287 /* text-align: center; New button are on right of screen */
288 cursor: pointer;
289 color: #999 !important;
290 padding-top: 0.2em;
291 box-shadow: none !important;
292 -webkit-box-shadow: none !important;
293}
294
295.butActionTransparent {
296 color: #222 ! important;
297 background-color: transparent ! important;
298}
299
300
301/*
302TITLE BUTTON
303 */
304
305div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle,
306table.table-fiche-title tr.titre td.col-center div.nowraponall a.btnTitle,
307table.table-fiche-title tr.titre td.col-right a.btnTitle {
308 margin-<?php echo $left; ?>: 10px;
309}
310
311.btnTitle, a.btnTitle {
312 display: inline-block;
313 padding: 4px 12px;
314 font-size: 14px;
315 font-weight: 400;
316 line-height: 1.4;
317 text-align: center;
318 white-space: nowrap;
319 vertical-align: middle;
320 -ms-touch-action: manipulation;
321 touch-action: manipulation;
322 cursor: pointer;
323 -webkit-user-select: none;
324 -moz-user-select: none;
325 -ms-user-select: none;
326 user-select: none;
327 box-shadow: none;
328 text-decoration: none;
329 position: relative;
330 margin: 0 0 0 10px;
331 text-align: center;
332 color: var(--btncolortext);
333 border: none;
334 font-size: 12px;
335 font-weight: 300;
336 /* background-color: #fbfbfb; */
337}
338/* *:not(.paginationafterarrows) > .btnTitle, *:not(.paginationafterarrows) > a.btnTitle { */
339.btnTitle, a.btnTitle {
340 min-width: 60px;
341}
342
343a.btnTitle.btnTitleSelected {
344 border: 1px solid #ccc;
345 border-radius: 3px;
346}
347
348.btnTitle > .btnTitle-icon{
349
350}
351
352.btnTitle > .btnTitle-label{
353 color: #666666;
354}
355
356.btnTitle:hover, a.btnTitle:hover {
357 border-radius: 3px;
358 position: relative;
359 margin: 0 0 0 10px;
360 text-align: center;
361 color: #000;
362 background-color: #eee;
363 font-size: 12px;
364 text-decoration: none;
365 box-shadow: none;
366}
367
368.btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
369 color: #8a8a8a;
370 cursor: not-allowed;
371 background-color: #fbfbfb;
372 background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
373}
374
375.btnTitle:hover .btnTitle-label{
376 color:var(--btncolorborderhover);
377}
378div.pagination .btnTitle:hover .btnTitle-label{
379 color: rgb(<?php print $colortextlink; ?>);
380}
381
382.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
383 color: #8a8a8a;
384}
385
386.btnTitle>.fa {
387 font-size: 2em;
388 display: block;
389}
390
391.paginationafterarrows a.btnTitlePlus, .titre_right a.btnTitlePlus {
392 /* border: 1px solid var(--btncolorborder); */
393 border: unset;
394 background-color: unset;
395}
396.paginationafterarrows a.btnTitlePlus:hover, .titre_right a.btnTitlePlus:hover {
397 border-color: #ddd;
398}
399
400/* The buttonplus isgrowing on hover (don't know why). This is to avoid to have the cellegrowing too */
401.btnTitlePlus:hover {
402 max-width: 24px;
403 max-height: 40px;
404}
405
406
407/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
408@media only screen and (max-width: <?php echo !getDolGlobalString('THEME_ELDY_WITDHOFFSET_FOR_REDUC2') ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */
409{
410 .butAction, .butActionRefused, .butActionDelete {
411 font-size: 0.95em;
412 }
413 .btnTitle, a.btnTitle {
414 display: inline-block;
415 padding: 4px 4px 4px 4px;
416 min-width: unset;
417 }
418}
419
420/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
421@media only screen and (max-width: <?php echo !getDolGlobalString('THEME_ELDY_WITDHOFFSET_FOR_REDUC3') ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */
422{
423 .butAction, .butActionRefused, .butActionDelete {
424 font-size: 0.9em;
425 }
426}
427
428/* smartphone */
429@media only screen and (max-width: 767px)
430{
431 .butAction, .butActionRefused, .butActionDelete {
432 font-size: 0.85em;
433 }
434}
435
436
437<?php if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin)) { ?>
438.butActionRefused, .butActionNewRefused, .btnTitle.refused {
439 display: none !important;
440}
441<?php } ?>
442
443
444/*
445 * BTN LINK
446 */
447
448.btn-link{
449 margin-right: 5px;
450 border: 1px solid #ddd;
451 color: #333;
452 padding: 5px 10px;
453 border-radius:1em;
454 text-decoration: none !important;
455}
456
457.btn-link:hover{
458 background-color: #ddd;
459 border: 1px solid #ddd;
460}
461
462
463
464/*
465 * BUTTON With Low emphasis
466 */
467
468button.btn-low-emphasis{
469 text-align: center;
470 display: inline-block;
471 border: none;
472 outline: none;
473 cursor: pointer;
474 margin: 0;
475 padding: 0;
476 width: auto;
477 min-width: 1.5em;
478 min-height: 1.5em;
479 line-height: 1.5em;
480
481 overflow: visible;
482 background: transparent;
483 background-position: center; /* used for hover ripple effect */
484 background-size: 0%;
485 color: var(--colortextlink, inherit);
486 font: inherit;
487 line-height: normal;
488
489 /* Corrects font smoothing for webkit */
490 -webkit-font-smoothing: inherit;
491 -moz-osx-font-smoothing: inherit;
492
493 /* Corrects inability to style clickable input types in iOS */
494 -webkit-appearance: none;
495
496
497 transition: background 0.8s;/* used for hover ripple effect */
498 background: transparent radial-gradient(circle, transparent 1%, hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1) 1%, transparent 10%) center/15000%;
499}
500
501button.btn-low-emphasis.--btn-icon{
502 border-radius: 100%;
503}
504
505button.btn-low-emphasis :is(.fa, .fas){
506 color: var(--colortextlink, inherit);
507 opacity: 0.4;
508}
509
510button.btn-low-emphasis:is(:focus,:hover) :is(.fa, .fas){
511 opacity: 0.8;
512}
513
514button.btn-low-emphasis.--btn-icon:active {
515 background-color: hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1);
516 background-size: 100%;
517 transition: background 0s;/* used for hover ripple effect */
518}
print $object position
Definition edit.php:204
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
a disabled
treeview li table
No Email.
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
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:153