dolibarr 20.0.0
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), 0px 0px 0px rgba(60,60,60,0.1);
226 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px 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 {
295 margin-left: 10px;
296}
297
298.btnTitle, a.btnTitle {
299 display: inline-block;
300 padding: 4px 12px;
301 font-size: 14px;
302 font-weight: 400;
303 line-height: 1.4;
304 text-align: center;
305 white-space: nowrap;
306 vertical-align: middle;
307 -ms-touch-action: manipulation;
308 touch-action: manipulation;
309 cursor: pointer;
310 -webkit-user-select: none;
311 -moz-user-select: none;
312 -ms-user-select: none;
313 user-select: none;
314 box-shadow: none;
315 text-decoration: none;
316 position: relative;
317 margin: 0 0 0 10px;
318 min-width: 80px;
319 text-align: center;
320 color: var(--btncolortext);
321 border: none;
322 font-size: 12px;
323 font-weight: 300;
324 /* background-color: #fbfbfb; */
325}
326
327a.btnTitle.btnTitleSelected {
328 border: 1px solid #ccc;
329 border-radius: 3px;
330}
331
332.btnTitle > .btnTitle-icon{
333
334}
335
336.btnTitle > .btnTitle-label{
337 color: #666666;
338}
339
340.btnTitle:hover, a.btnTitle:hover {
341 border-radius: 3px;
342 position: relative;
343 margin: 0 0 0 10px;
344 text-align: center;
345 color: #000;
346 background-color: #eee;
347 font-size: 12px;
348 text-decoration: none;
349 box-shadow: none;
350}
351
352.btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
353 color: #8a8a8a;
354 cursor: not-allowed;
355 background-color: #fbfbfb;
356 background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
357}
358
359.btnTitle:hover .btnTitle-label{
360 color:var(--btncolorborderhover);
361}
362div.pagination .btnTitle:hover .btnTitle-label{
363 color: rgb(<?php print $colortextlink; ?>);
364}
365
366.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
367 color: #8a8a8a;
368}
369
370.btnTitle>.fa {
371 font-size: 20px;
372 display: block;
373}
374
375.paginationafterarrows a.btnTitlePlus, .titre_right a.btnTitlePlus {
376 /* border: 1px solid var(--btncolorborder); */
377 border: unset;
378 background-color: unset;
379}
380.paginationafterarrows a.btnTitlePlus:hover, .titre_right a.btnTitlePlus:hover {
381 border-color: #ddd;
382}
383
384/* The buttonplus isgrowing on hover (don't know why). This is to avoid to have the cellegrowing too */
385.btnTitlePlus:hover {
386 max-width: 24px;
387 max-height: 40px;
388}
389
390
391/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
392@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 */
393{
394 .butAction, .butActionRefused, .butActionDelete {
395 font-size: 0.95em;
396 }
397 .btnTitle, a.btnTitle {
398 display: inline-block;
399 padding: 4px 4px 4px 4px;
400 min-width: unset;
401 }
402}
403
404/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
405@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 */
406{
407 .butAction, .butActionRefused, .butActionDelete {
408 font-size: 0.9em;
409 }
410}
411
412/* smartphone */
413@media only screen and (max-width: 767px)
414{
415 .butAction, .butActionRefused, .butActionDelete {
416 font-size: 0.85em;
417 }
418}
419
420
421<?php if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin)) { ?>
422.butActionRefused, .butActionNewRefused, .btnTitle.refused {
423 display: none !important;
424}
425<?php } ?>
426
427
428/*
429 * BTN LINK
430 */
431
432.btn-link{
433 margin-right: 5px;
434 border: 1px solid #ddd;
435 color: #333;
436 padding: 5px 10px;
437 border-radius:1em;
438 text-decoration: none !important;
439}
440
441.btn-link:hover{
442 background-color: #ddd;
443 border: 1px solid #ddd;
444}
print $object position
Definition edit.php:195
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
a disabled
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
table table fiche title col title div col center btnTitle icon
Automatically calls the icon named with the corresponding "object_" prefix.
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:143