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