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