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/* ============================================================================== */
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 {
147 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
148 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
149}
150.butActionNew:hover {
151 text-decoration: underline;
152 box-shadow: unset !important;
153}
154
155.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
156 background: var(--butactiondeletebg) !important;
157 /* border: 1px solid #633; */
158 color: #633 !important;
159}
160
161.butActionDelete:hover {
162 -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
163 box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
164}
165
166.butActionRefused {
167 text-decoration: none !important;
168 text-transform: uppercase;
169 font-weight: bold !important;
170
171 white-space: nowrap !important;
172 cursor: not-allowed !important;
173 font-family: <?php print $fontlist ?> !important;
174 display: inline-block;
175 text-align: center;
176 cursor: pointer;
177 box-sizing: border-box;
178 -moz-box-sizing: border-box;
179 -webkit-box-sizing: border-box;
180 color: #999 !important;
181
182 border: 1px solid #ccc;
183}
184.butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
185 text-decoration: none !important;
186 text-transform: uppercase;
187 font-weight: normal !important;
188
189 white-space: nowrap !important;
190 cursor: not-allowed !important;
191 margin: 0em <?php echo($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
192 padding: 0.2em <?php echo($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
193 font-family: <?php print $fontlist ?> !important;
194 display: inline-block;
195 /* text-align: center; New button are on right of screen */
196 cursor: pointer;
197 color: #999 !important;
198 padding-top: 0.2em;
199 box-shadow: none !important;
200 -webkit-box-shadow: none !important;
201}
202
203.butActionTransparent {
204 color: #222 ! important;
205 background-color: transparent ! important;
206}
207
208
209/*
210TITLE BUTTON
211 */
212
213.btnTitle, a.btnTitle {
214 display: inline-block;
215 padding: 4px 4px 4px 4px;
216 font-weight: 400;
217 /* line-height: 1; */
218 text-align: center;
219 white-space: nowrap;
220 vertical-align: middle;
221 -ms-touch-action: manipulation;
222 touch-action: manipulation;
223 cursor: pointer;
224 -webkit-user-select: none;
225 -moz-user-select: none;
226 -ms-user-select: none;
227 user-select: none;
228 box-shadow: var(--btncolorbg);
229 text-decoration: none;
230 position: relative;
231 /* margin: 0 0 0 8px; */
232 min-width: 72px;
233 text-align: center;
234 color: var(--btncolortext);
235 border: none;
236 font-size: 12px;
237 font-weight: 300;
238 background-color: var(--btncolorbg);
239 border: 1px solid var(--btncolorborder);
240}
241
242a.btnTitle.btnTitleSelected {
243 border: 1px solid #ccc;
244 border-radius: 3px;
245}
246
247.btnTitle > .btnTitle-icon{
248
249}
250
251.btnTitle > .btnTitle-label{
252 color: #666666;
253}
254
255.btnTitle:hover, a.btnTitle:hover {
256 border: 1px solid #bbb;
257 border-radius: 3px;
258 position: relative;
259 text-align: center;
260 font-size: 12px;
261 text-decoration: none;
262 box-shadow: none;
263}
264/* The buttonplus isgrowing on hover (don't know why). This is to avoid to have the cellegrowing too */
265.btnTitlePlus:hover {
266 max-width: 24px;
267 max-height: 40px;
268}
269
270.btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
271 color: #8a8a8a;
272 cursor: not-allowed;
273 background-color: #fbfbfb;
274 background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
275}
276
277.btnTitle:hover .btnTitle-label {
278 color: var(--btncolorborderhover);
279}
280.btnTitle.reposition:not(.btnTitleSelected) {
281 background-color: unset;
282 border: unset;
283}
284
285.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label {
286 color: #8a8a8a;
287}
288
289.btnTitle>.fa {
290 font-size: 2em;
291 display: block;
292}
293
294div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle {
295 margin-<?php echo $left; ?>: 10px;
296}
297
298.button-title-separator{
299 display: inline-block;
300 clear: both;
301 width: 20px;
302}
303
304.imgforviewmode {
305 color: #aaa;
306}
307
308/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
309@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 */
310{
311 .butAction, .butActionRefused, .butActionDelete {
312 font-size: 0.95em;
313 }
314 .btnTitle, a.btnTitle {
315 display: inline-block;
316 padding: 4px 4px 4px 4px;
317 min-width: unset;
318 }
319}
320
321/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
322@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 */
323{
324 .butAction, .butActionRefused, .butActionDelete {
325 font-size: 0.9em;
326 }
327}
328
329/* smartphone */
330@media only screen and (max-width: 767px)
331{
332 .butAction, .butActionRefused, .butActionDelete {
333 font-size: 0.85em;
334 }
335}
336
337
338<?php if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin)) { ?>
339.butActionRefused, .butActionNewRefused, .btnTitle.refused {
340 display: none !important;
341}
342<?php } ?>
343
344
345/*
346 * BTN LINK
347 */
348
349.btn-link{
350 margin-right: 5px;
351 border: 1px solid #ddd;
352 color: #333;
353 padding: 5px 10px;
354 border-radius:1em;
355 text-decoration: none !important;
356}
357
358.btn-link:hover{
359 background-color: #ddd;
360 border: 1px solid #ddd;
361}
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.
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