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/*
168.butActionDelete#action-delete::before {
169 content: "\f1f8";
170 font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
171 font-weight: 600;
172 width: 20px;
173 visibility: visible;
174}
175.butActionDelete#action-delete span.textbutton {
176 display: none;
177}
178*/
179
180.butActionRefused {
181 text-decoration: none !important;
182 text-transform: uppercase;
183 font-weight: bold !important;
184
185 white-space: nowrap !important;
186 cursor: not-allowed !important;
187 font-family: <?php print $fontlist ?> !important;
188 display: inline-block;
189 text-align: center;
190 cursor: pointer;
191 box-sizing: border-box;
192 -moz-box-sizing: border-box;
193 -webkit-box-sizing: border-box;
194 color: #999 !important;
195
196 border: 1px solid #ccc;
197}
198.butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
199 text-decoration: none !important;
200 text-transform: uppercase;
201 font-weight: normal !important;
202
203 white-space: nowrap !important;
204 cursor: not-allowed !important;
205 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
206 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
207 font-family: <?php print $fontlist ?> !important;
208 display: inline-block;
209 /* text-align: center; New button are on right of screen */
210 cursor: pointer;
211 color: #999 !important;
212 padding-top: 0.2em;
213 box-shadow: none !important;
214 -webkit-box-shadow: none !important;
215}
216
217.butActionTransparent {
218 color: #222 ! important;
219 background-color: transparent ! important;
220}
221
222
223/*
224TITLE BUTTON
225 */
226
227.btnTitle, a.btnTitle {
228 display: inline-block;
229 padding: 6px;
230 font-weight: 400;
231 /* line-height: 1; */
232 text-align: center;
233 white-space: nowrap;
234 vertical-align: middle;
235 -ms-touch-action: manipulation;
236 touch-action: manipulation;
237 cursor: pointer;
238 -webkit-user-select: none;
239 -moz-user-select: none;
240 -ms-user-select: none;
241 user-select: none;
242 box-shadow: var(--btncolorbg);
243 text-decoration: none;
244 position: relative;
245 /* margin: 0 0 0 8px; */
246 min-width: 60px;
247 text-align: center;
248 color: var(--btncolortext);
249 border: none;
250 font-size: 12px;
251 font-weight: 300;
252 /* background-color: var(--btncolorbg); */
253 border: 1px solid var(--btncolorborder);
254}
255
256a.btnTitle.btnTitleSelected {
257 border: 1px solid #ccc;
258 border-radius: 3px;
259}
260
261.btnTitle > .btnTitle-icon{
262
263}
264
265.btnTitle > .btnTitle-label{
266 color: #666666;
267}
268
269.btnTitle:hover, a.btnTitle:hover {
270 border: 1px solid #bbb;
271 border-radius: 3px;
272 position: relative;
273 text-align: center;
274 font-size: 12px;
275 text-decoration: none;
276 box-shadow: none;
277}
278/* The buttonplus isgrowing on hover (don't know why). This is to avoid to have the cellegrowing too */
279.btnTitlePlus:hover {
280 max-width: 24px;
281 max-height: 40px;
282}
283
284.btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
285 color: #8a8a8a;
286 cursor: not-allowed;
287 background-color: #fbfbfb;
288 background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
289}
290
291.btnTitle:hover .btnTitle-label {
292 color: var(--btncolorborderhover);
293}
294.btnTitle.reposition:not(.btnTitleSelected) {
295 background-color: unset;
296 border: unset;
297}
298
299.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label {
300 color: #8a8a8a;
301}
302
303.btnTitle>.fa {
304 font-size: 2em;
305 display: block;
306}
307
308div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle,
309table.table-fiche-title tr.toptitle td.col-center div.nowraponall a.btnTitle,
310table.table-fiche-title tr.titre td.col-center div.nowraponall a.btnTitle,
311table.table-fiche-title tr.toptitle td.col-right a.btnTitle,
312table.table-fiche-title tr.titre td.col-right a.btnTitle {
313 margin-<?php echo $left; ?>: 10px;
314}
315
316.button-title-separator{
317 display: inline-block;
318 clear: both;
319 width: 20px;
320}
321
322.imgforviewmode {
323 color: #aaa;
324}
325
326/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
327@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 */
328{
329 .butAction, .butActionRefused, .butActionDelete {
330 font-size: 0.95em;
331 }
332 .btnTitle, a.btnTitle {
333 display: inline-block;
334 padding: 4px 4px 4px 4px;
335 min-width: unset;
336 }
337}
338
339/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
340@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 */
341{
342 .butAction, .butActionRefused, .butActionDelete {
343 font-size: 0.9em;
344 }
345}
346
347/* smartphone */
348@media only screen and (max-width: 767px)
349{
350 .butAction, .butActionRefused, .butActionDelete {
351 font-size: 0.85em;
352 }
353}
354
355
356<?php if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin)) { ?>
357.butActionRefused, .butActionNewRefused, .btnTitle.refused {
358 display: none !important;
359}
360<?php } ?>
361
362
363/*
364 * BTN LINK (used with <a/> tag in general but not with <button/>)
365 */
366
367.btn-link{
368 margin-right: 5px;
369 border: 1px solid #ddd;
370 color: #333;
371 padding: 5px 10px;
372 border-radius:1em;
373 text-decoration: none !important;
374}
375
376.btn-link:hover{
377 background-color: #ddd;
378 border: 1px solid #ddd;
379}
380
381
382/*
383 * BUTTON With Low emphasis
384 */
385
386button.btn-low-emphasis{
387 text-align: center;
388 display: inline-block;
389 border: none;
390 outline: none;
391 cursor: pointer;
392 margin: 0;
393 padding: 0;
394 width: auto;
395 min-width: 1.5em;
396 min-height: 1.5em;
397 line-height: 1.5em;
398
399 overflow: visible;
400 background: transparent;
401 background-position: center; /* used for hover ripple effect */
402 background-size: 0%;
403 color: var(--colortextlink, inherit);
404 font: inherit;
405 line-height: normal;
406
407 /* Corrects font smoothing for webkit */
408 -webkit-font-smoothing: inherit;
409 -moz-osx-font-smoothing: inherit;
410
411 /* Corrects inability to style clickable input types in iOS */
412 -webkit-appearance: none;
413
414
415 transition: background 0.8s;/* used for hover ripple effect */
416 background: transparent radial-gradient(circle, transparent 1%, hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1) 1%, transparent 10%) center/15000%;
417}
418
419button.btn-low-emphasis.--btn-icon{
420 border-radius: 100%;
421}
422
423button.btn-low-emphasis :is(.fa, .fas){
424 color: var(--colortextlink, inherit);
425 opacity: 0.4;
426}
427
428button.btn-low-emphasis:is(:focus,:hover) :is(.fa, .fas){
429 opacity: 0.8;
430}
431
432button.btn-low-emphasis.--btn-icon:active {
433 background-color: hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1);
434 background-size: 100%;
435 transition: background 0s;/* used for hover ripple effect */
436}
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
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:141