dolibarr 19.0.3
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/* ============================================================================== */
43/* Buttons for actions */
44/* ============================================================================== */
45
46/*div.divButAction {
47 margin-bottom: 1.4em;
48}*/
49div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
50div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete,
51div.tabsAction > div.divButAction > span.butAction,
52div.tabsAction > div.divButAction > span.butActionDelete,
53div.tabsAction > div.divButAction > span.butActionRefused,
54div.tabsAction > div.divButAction > a.butAction,
55div.tabsAction > div.divButAction > a.butActionDelete,
56div.tabsAction > div.divButAction > a.butActionRefused {
57 margin-bottom: 1.4em !important;
58 margin-right: 0px !important;
59}
60div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused {
61 margin-bottom: 0 !important;
62}
63
64span.butAction, span.butActionDelete {
65 cursor: pointer;
66}
67.paginationafterarrows .butAction {
68 font-size: 0.9em;
69}
70.butAction {
71 background: var(--butactionbg);
72 color: var(--textbutaction) !important;
73 /* background: rgb(230, 232, 239); */
74}
75.butActionRefused, .butAction, .butActionDelete {
76 border-radius: 3px;
77}
78:not(.center) > .butActionRefused:last-child, :not(.center) > .butAction:last-child, :not(.center) > .butActionDelete:last-child {
79 margin-<?php echo $right; ?>: 0px !important;
80}
81.butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
82 text-decoration: none;
83 text-transform: uppercase;
84 font-weight: bold;
85
86 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.6' : '1'); ?>em;
87 padding: 0.6em <?php echo($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
88 display: inline-block;
89 text-align: center;
90 cursor: pointer;
91 color: #444;
92 border: 1px solid transparent; /* So for buttonRefused with a border, it will not have any flash effect */
93
94 /* border: 1px solid #aaa; */
95 /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
96
97 /*border-top-right-radius: 0 !important;
98 border-bottom-right-radius: 0 !important;
99 border-top-left-radius: 0 !important;
100 border-bottom-left-radius: 0 !important;*/
101}
102.butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
103 text-decoration: none;
104 text-transform: uppercase;
105 font-weight: normal;
106
107 margin: 0em 0.3em 0 0.3em !important;
108 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em;
109 font-family: <?php print $fontlist ?>;
110 display: inline-block;
111 /* text-align: center; New button are on right of screen */
112 cursor: pointer;
113}
114
115.tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover,
116.tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover,
117span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
118a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
119span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
120a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
121span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
122a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
123span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover
124{
125 font-size: 1em;
126 padding-left: 0px;
127}
128
129a.butActionNew>span.fa, a.butActionNew>span.fa:hover,
130span.butActionNew>span.fa, span.butActionNew>span.fa:hover,
131a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover,
132span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover
133{
134 padding-<?php echo $left; ?>: 6px;
135 font-size: 1.5em;
136 border: none;
137 box-shadow: none; webkit-box-shadow: none;
138}
139
140.butAction:hover {
141 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
142 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
143}
144.butActionNew:hover {
145 text-decoration: underline;
146 box-shadow: unset !important;
147}
148
149.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
150 background: var(--butactiondeletebg) !important;
151 /* border: 1px solid #633; */
152 color: #633 !important;
153}
154
155.butActionDelete:hover {
156 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
157 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
158}
159
160.butActionRefused {
161 text-decoration: none !important;
162 text-transform: uppercase;
163 font-weight: bold !important;
164
165 white-space: nowrap !important;
166 cursor: not-allowed !important;
167 font-family: <?php print $fontlist ?> !important;
168 display: inline-block;
169 text-align: center;
170 cursor: pointer;
171 box-sizing: border-box;
172 -moz-box-sizing: border-box;
173 -webkit-box-sizing: border-box;
174 color: #999 !important;
175
176 border: 1px solid #ccc;
177}
178.butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
179 text-decoration: none !important;
180 text-transform: uppercase;
181 font-weight: normal !important;
182
183 white-space: nowrap !important;
184 cursor: not-allowed !important;
185 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
186 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
187 font-family: <?php print $fontlist ?> !important;
188 display: inline-block;
189 /* text-align: center; New button are on right of screen */
190 cursor: pointer;
191 color: #999 !important;
192 padding-top: 0.2em;
193 box-shadow: none !important;
194 -webkit-box-shadow: none !important;
195}
196
197.butActionTransparent {
198 color: #222 ! important;
199 background-color: transparent ! important;
200}
201
202
203/*
204TITLE BUTTON
205 */
206
207.btnTitle, a.btnTitle {
208 display: inline-block;
209 padding: 4px 4px 4px 4px;
210 font-weight: 400;
211 /* line-height: 1; */
212 text-align: center;
213 white-space: nowrap;
214 vertical-align: middle;
215 -ms-touch-action: manipulation;
216 touch-action: manipulation;
217 cursor: pointer;
218 -webkit-user-select: none;
219 -moz-user-select: none;
220 -ms-user-select: none;
221 user-select: none;
222 box-shadow: var(--btncolorbg);
223 text-decoration: none;
224 position: relative;
225 /* margin: 0 0 0 8px; */
226 min-width: 72px;
227 text-align: center;
228 color: var(--btncolortext);
229 border: none;
230 font-size: 12px;
231 font-weight: 300;
232 background-color: var(--btncolorbg);
233 border: 1px solid var(--btncolorborder);
234}
235
236a.btnTitle.btnTitleSelected {
237 border: 1px solid #ccc;
238 border-radius: 3px;
239}
240
241.btnTitle > .btnTitle-icon{
242
243}
244
245.btnTitle > .btnTitle-label{
246 color: #666666;
247}
248
249.btnTitle:hover, a.btnTitle:hover {
250 border: 1px solid #bbb;
251 border-radius: 3px;
252 position: relative;
253 text-align: center;
254 font-size: 12px;
255 text-decoration: none;
256 box-shadow: none;
257}
258/* The buttonplus isgrowing on hover (dont know why). This is to avoid to have the cellegrowing too */
259.btnTitlePlus:hover {
260 max-width: 24px;
261 max-height: 40px;
262}
263
264.btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
265 color: #8a8a8a;
266 cursor: not-allowed;
267 background-color: #fbfbfb;
268 background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
269}
270
271.btnTitle:hover .btnTitle-label{
272 color: var(--btncolorborderhover);
273}
274
275.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
276 color: #8a8a8a;
277}
278
279.btnTitle>.fa {
280 font-size: 2em;
281 display: block;
282}
283
284div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle {
285 margin-<?php echo $left; ?>: 10px;
286}
287
288.button-title-separator{
289 display: inline-block;
290 clear: both;
291 width: 20px;
292}
293
294.imgforviewmode {
295 color: #aaa;
296}
297
298/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
299@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 */
300{
301 .butAction, .butActionRefused, .butActionDelete {
302 font-size: 0.95em;
303 }
304 .btnTitle, a.btnTitle {
305 display: inline-block;
306 padding: 4px 4px 4px 4px;
307 min-width: unset;
308 }
309}
310
311/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
312@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 */
313{
314 .butAction, .butActionRefused, .butActionDelete {
315 font-size: 0.9em;
316 }
317}
318
319/* smartphone */
320@media only screen and (max-width: 767px)
321{
322 .butAction, .butActionRefused, .butActionDelete {
323 font-size: 0.85em;
324 }
325}
326
327
328<?php if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin)) { ?>
329.butActionRefused, .butActionNewRefused, .btnTitle.refused {
330 display: none !important;
331}
332<?php } ?>
333
334
335/*
336 * BTN LINK
337 */
338
339.btn-link{
340 margin-right: 5px;
341 border: 1px solid #ddd;
342 color: #333;
343 padding: 5px 10px;
344 border-radius:1em;
345 text-decoration: none !important;
346}
347
348.btn-link:hover{
349 background-color: #ddd;
350 border: 1px solid #ddd;
351}
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
rtl background position
$conf db user
Definition repair.php:125