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