dolibarr  13.0.2
btn.inc.php
1 <?php
2 if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
3 /* <style type="text/css" > */
4 
5 :root {
6  --btncolortext:rgb(<?php print $colortextlink; ?>);
7  --btncolorbg: #fbfbfb;
8  --btncolorborderhover: none;
9  --btncolorborder: #FFF;
10  --butactiondeletebg: rgb(234,228,225);
11  /* tertiary color */
12  /* --butactionbg:rgb(218, 235, 225); */
13  /* --butactionbg:rgb(228, 218, 235); */
14  --butactionbg:rgb(118, 145, 225);
15 }
16 
17 <?php
18 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
19  print "/* For dark mode */\n";
20  if ($conf->global->THEME_DARKMODEENABLED != 2) {
21  print "@media (prefers-color-scheme: dark) {";
22  }
23  print "
24  :root {
25 
26  --btncolortext: ;
27  --btncolorbg: rgb(26,27,27);
28  --btncolorborderhover: #ffffff;
29  --btncolorborder: #2b2c2e;
30  --butactionbg:rgb(173,140,79);
31  --butactiondeletebg: rgb(252,84,91);
32 
33  }\n";
34  if ($conf->global->THEME_DARKMODEENABLED != 2) {
35  print "}";
36  }
37 }
38 ?>
39 
40 /* ============================================================================== */
41 /* Buttons for actions */
42 /* ============================================================================== */
43 
44 
45 div.divButAction {
46  margin-bottom: 1.4em;
47 }
48 div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
49 div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete {
50  margin-bottom: 1.4em !important;
51 }
52 div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused {
53  margin-bottom: 0 !important;
54 }
55 
56 span.butAction, span.butActionDelete {
57  cursor: pointer;
58 }
59 
60 .butAction {
61  background: var(--butactionbg);
62  color: #FFF !important;
63  border-radius: 3px;
64  /* background: rgb(230, 232, 239); */
65 }
66 .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
67  text-decoration: none;
68  text-transform: uppercase;
69  font-weight: bold;
70 
71  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
72  padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
73  font-family: <?php print $fontlist ?>;
74  display: inline-block;
75  text-align: center;
76  cursor: pointer;
77  /* color: #fff; */
78  /* background: rgb(<?php echo $colorbackhmenu1 ?>); */
79  color: #444;
80  /* border: 1px solid #aaa; */
81  /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
82 
83  /*border-top-right-radius: 0 !important;
84  border-bottom-right-radius: 0 !important;
85  border-top-left-radius: 0 !important;
86  border-bottom-left-radius: 0 !important;*/
87 }
88 .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
89  text-decoration: none;
90  text-transform: uppercase;
91  font-weight: normal;
92 
93  margin: 0em 0.3em 0 0.3em !important;
94  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em;
95  font-family: <?php print $fontlist ?>;
96  display: inline-block;
97  /* text-align: center; New button are on right of screen */
98  cursor: pointer;
99 }
100 
101 .button {
102  border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
103  display: inline-block;
104  padding: 0.4em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
105  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
106  line-height: 20px;
107  text-align: center;
108  vertical-align: middle;
109  cursor: pointer;
110  color: #333333 !important;
111  text-decoration: none !important;
112  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
113  background-color: #f5f5f5;
114  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
115  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
116  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
117  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
118  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
119  background-repeat: repeat-x;
120  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
121  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
122  border: 1px solid #bbbbbb;
123  border-bottom-color: #a2a2a2;
124  -webkit-border-radius: 2px;
125  border-radius: 2px;
126  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
127  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
128 }
129 .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
130  text-decoration: none;
131  /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
132  display: inline-block;
133  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
134  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
135  line-height: 20px;
136  /* text-align: center; New button are on right of screen */
137  vertical-align: middle;
138  cursor: pointer;
139  /* color: #ffffff !important; */
140  /* text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); */
141  -webkit-border-radius: 2px;
142  border-radius: 2px;
143  /* -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
144  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); */
145  /* background-color: #006dcc;
146  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
147  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
148  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
149  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
150  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
151  background-repeat: repeat-x; */
152 }
153 a.butActionNew>span.fa-plus-circle { padding-left: 6px; font-size: 1.5em; }
154 a.butActionNewRefused>span.fa-plus-circle { padding-left: 6px; font-size: 1.5em; }
155 
156 .tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover,
157 .tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover,
158 span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
159 a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
160 span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
161 a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
162 span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
163 a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
164 span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover
165 {
166  font-size: 1em;
167  padding-left: 0px;
168 }
169 
170 .button {
171  color: #ffffff !important;
172  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
173  background-color: #006dcc;
174  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
175  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
176  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
177  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
178  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
179  background-repeat: repeat-x;
180  border-color: #0044cc #0044cc #002a80;
181  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
182 }
183 .button:disabled {
184  color: #666 !important;
185  text-shadow: none;
186  border-color: #555;
187  cursor: not-allowed;
188 
189  background-color: #f5f5f5;
190  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
191  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
192  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
193  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
194  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
195  background-repeat: repeat-x
196 }
197 
198 button.ui-button {
199  padding-top: 5px;
200 }
201 
202 a.butActionNew>span.fa, a.butActionNew>span.fa:hover,
203 span.butActionNew>span.fa, span.butActionNew>span.fa:hover,
204 a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover,
205 span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover
206 {
207  padding-<?php echo $left; ?>: 6px;
208  font-size: 1.5em;
209  border: none;
210  box-shadow: none; webkit-box-shadow: none;
211 }
212 
213 .butAction:hover {
214  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
215  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
216 }
217 .butActionNew:hover {
218  text-decoration: underline;
219  box-shadow: unset !important;
220 }
221 
222 .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
223  background: var(--butactiondeletebg);
224  /* border: 1px solid #633; */
225  color: #633;
226 }
227 
228 .butActionDelete:hover {
229  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
230  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
231 }
232 
233 .butActionRefused {
234  text-decoration: none !important;
235  text-transform: uppercase;
236  font-weight: bold !important;
237 
238  white-space: nowrap !important;
239  cursor: not-allowed !important;
240  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
241  padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
242  font-family: <?php print $fontlist ?> !important;
243  display: inline-block;
244  text-align: center;
245  cursor: pointer;
246  color: #999 !important;
247  border: 1px solid #ccc;
248  box-sizing: border-box;
249  -moz-box-sizing: border-box;
250  -webkit-box-sizing: border-box;
251 }
252 .butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
253  text-decoration: none !important;
254  text-transform: uppercase;
255  font-weight: normal !important;
256 
257  white-space: nowrap !important;
258  cursor: not-allowed !important;
259  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
260  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
261  font-family: <?php print $fontlist ?> !important;
262  display: inline-block;
263  /* text-align: center; New button are on right of screen */
264  cursor: pointer;
265  color: #999 !important;
266  padding-top: 0.2em;
267  box-shadow: none !important;
268  -webkit-box-shadow: none !important;
269 }
270 
271 .butActionTransparent {
272  color: #222 ! important;
273  background-color: transparent ! important;
274 }
275 
276 
277 /*
278 TITLE BUTTON
279  */
280 
281 div.pagination li:first-child a.btnTitle {
282  margin-left: 10px;
283 }
284 
285 .btnTitle, a.btnTitle {
286  display: inline-block;
287  padding: 6px 12px;
288  font-size: 14px
289  font-weight: 400;
290  line-height: 1.4;
291  text-align: center;
292  white-space: nowrap;
293  vertical-align: middle;
294  -ms-touch-action: manipulation;
295  touch-action: manipulation;
296  cursor: pointer;
297  -webkit-user-select: none;
298  -moz-user-select: none;
299  -ms-user-select: none;
300  user-select: none;
301  box-shadow: none;
302  text-decoration: none;
303  position: relative;
304  margin: 0 0 0 10px;
305  min-width: 80px;
306  text-align: center;
307  color: rgb(<?php print $colortextlink; ?>);
308  border: none;
309  font-size: 12px;
310  font-weight: 300;
311  background-color: #fbfbfb;
312 }
313 
314 a.btnTitle.btnTitleSelected {
315  border: 1px solid #ccc;
316  border-radius: 3px;
317 }
318 
319 .btnTitle > .btnTitle-icon{
320 
321 }
322 
323 .btnTitle > .btnTitle-label{
324  color: #666666;
325 }
326 
327 .btnTitle:hover, a.btnTitle:hover {
328  border-radius: 3px;
329  position: relative;
330  margin: 0 0 0 10px;
331  text-align: center;
332  color: #ffffff;
333  background-color: rgb(<?php print $colortextlink; ?>);
334  font-size: 12px;
335  text-decoration: none;
336  box-shadow: none;
337 }
338 
339 .btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
340  color: #8a8a8a;
341  cursor: not-allowed;
342  background-color: #fbfbfb;
343  background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
344 }
345 
346 .btnTitle:hover .btnTitle-label{
347  color: #ffffff;
348 }
349 div.pagination .btnTitle:hover .btnTitle-label{
350  color: rgb(<?php print $colortextlink; ?>);
351 }
352 
353 .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
354  color: #8a8a8a;
355 }
356 
357 .btnTitle>.fa {
358  font-size: 20px;
359  display: block;
360 }
361 
362 /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
363 @media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */
364 {
365  .butAction, .butActionRefused, .butActionDelete {
366  font-size: 0.95em;
367  }
368  .btnTitle, a.btnTitle {
369  display: inline-block;
370  padding: 4px 4px 4px 4px;
371  min-width: unset;
372  }
373 }
374 
375 <?php if (!empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?>
376 .butActionRefused, .butActionNewRefused, .btnTitle.refused {
377  display: none !important;
378 }
379 <?php } ?>
380 
381 
382 /*
383  * BTN LINK
384  */
385 
386 .btn-link{
387  margin-right: 5px;
388  border: 1px solid #ddd;
389  color: #333;
390  padding: 5px 10px;
391  border-radius:1em;
392  text-decoration: none !important;
393 }
394 
395 .btn-link:hover{
396  background-color: #ddd;
397  border: 1px solid #ddd;
398 }
399 
$conf db user
Definition: repair.php:109
print
Draft customers invoices.
Definition: index.php:89