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  /* --butactionbg:rgba(150, 110, 162, 0.95); */
11  --butactionbg:rgb(118, 145, 225);
12  --butactionbg:rgba(150, 110, 162, 0.95);
13  --butactiondeletebg: rgb(234,228,225);
14  /* tertiary color */
15  /* --butactionbg:rgb(218, 235, 225); */
16  /* --butactionbg:rgb(228, 218, 235); */
17 }
18 
19 <?php
20 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
21  print "/* For dark mode */\n";
22  if ($conf->global->THEME_DARKMODEENABLED != 2) {
23  print "@media (prefers-color-scheme: dark) {";
24  }
25  print "
26  :root {
27 
28  --btncolortext: ;
29  --btncolorbg: rgb(26,27,27);
30  --btncolorborderhover: #ffffff;
31  --btncolorborder: #2b2c2e;
32  --butactionbg: rgb(173,140,79);
33  --butactiondeletebg: rgb(252,84,91);
34 
35  }\n";
36  if ($conf->global->THEME_DARKMODEENABLED != 2) {
37  print "}";
38  }
39 }
40 ?>
41 
42 
43 /* ============================================================================== */
44 /* Buttons for actions */
45 /* ============================================================================== */
46 
47 div.divButAction {
48  margin-bottom: 1.4em;
49 }
50 div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
51 div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete {
52  margin-bottom: 1.4em !important;
53 }
54 div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused {
55  margin-bottom: 0 !important;
56 }
57 
58 span.butAction, span.butActionDelete {
59  cursor: pointer;
60 }
61 
62 .butAction {
63  background: var(--butactionbg);
64  color: #FFF !important;
65  border-radius: 3px;
66  /* background: rgb(230, 232, 239); */
67 }
68 .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
69  text-decoration: none;
70  text-transform: uppercase;
71  font-weight: bold;
72 
73  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
74  padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
75  display: inline-block;
76  text-align: center;
77  cursor: pointer;
78  /* color: #fff; */
79  /* background: rgb(<?php echo $colorbackhmenu1 ?>); */
80  color: #444;
81  /* border: 1px solid #aaa; */
82  /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
83 
84  /*border-top-right-radius: 0 !important;
85  border-bottom-right-radius: 0 !important;
86  border-top-left-radius: 0 !important;
87  border-bottom-left-radius: 0 !important;*/
88 }
89 .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
90  text-decoration: none;
91  text-transform: uppercase;
92  font-weight: normal;
93 
94  margin: 0em 0.3em 0 0.3em !important;
95  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em;
96  font-family: <?php print $fontlist ?>;
97  display: inline-block;
98  /* text-align: center; New button are on right of screen */
99  cursor: pointer;
100 }
101 
102 .tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover,
103 .tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover,
104 span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
105 a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
106 span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
107 a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
108 span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
109 a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
110 span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover
111 {
112  font-size: 1em;
113  padding-left: 0px;
114 }
115 
116 a.butActionNew>span.fa, a.butActionNew>span.fa:hover,
117 span.butActionNew>span.fa, span.butActionNew>span.fa:hover,
118 a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover,
119 span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover
120 {
121  padding-<?php echo $left; ?>: 6px;
122  font-size: 1.5em;
123  border: none;
124  box-shadow: none; webkit-box-shadow: none;
125 }
126 
127 .butAction:hover {
128  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
129  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
130 }
131 .butActionNew:hover {
132  text-decoration: underline;
133  box-shadow: unset !important;
134 }
135 
136 .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
137  background: var(--butactiondeletebg);
138  /* border: 1px solid #633; */
139  color: #633;
140 }
141 
142 .butActionDelete:hover {
143  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
144  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
145 }
146 
147 .butActionRefused {
148  text-decoration: none !important;
149  text-transform: uppercase;
150  font-weight: bold !important;
151 
152  white-space: nowrap !important;
153  cursor: not-allowed !important;
154  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em;
155  padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
156  font-family: <?php print $fontlist ?> !important;
157  display: inline-block;
158  text-align: center;
159  cursor: pointer;
160  color: #999 !important;
161  border: 1px solid #ccc;
162  box-sizing: border-box;
163  -moz-box-sizing: border-box;
164  -webkit-box-sizing: border-box;
165 }
166 .butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
167  text-decoration: none !important;
168  text-transform: uppercase;
169  font-weight: normal !important;
170 
171  white-space: nowrap !important;
172  cursor: not-allowed !important;
173  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
174  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
175  font-family: <?php print $fontlist ?> !important;
176  display: inline-block;
177  /* text-align: center; New button are on right of screen */
178  cursor: pointer;
179  color: #999 !important;
180  padding-top: 0.2em;
181  box-shadow: none !important;
182  -webkit-box-shadow: none !important;
183 }
184 
185 .butActionTransparent {
186  color: #222 ! important;
187  background-color: transparent ! important;
188 }
189 
190 
191 /*
192 TITLE BUTTON
193  */
194 
195 .btnTitle, a.btnTitle {
196  display: inline-block;
197  padding: 4px 4px 4px 4px;
198  font-weight: 400;
199  /* line-height: 1; */
200  text-align: center;
201  white-space: nowrap;
202  vertical-align: middle;
203  -ms-touch-action: manipulation;
204  touch-action: manipulation;
205  cursor: pointer;
206  -webkit-user-select: none;
207  -moz-user-select: none;
208  -ms-user-select: none;
209  user-select: none;
210  box-shadow: var(--btncolorbg);
211  text-decoration: none;
212  position: relative;
213  /* margin: 0 0 0 8px; */
214  min-width: 72px;
215  text-align: center;
216  color: var(--btncolortext);
217  border: none;
218  font-size: 12px;
219  font-weight: 300;
220  background-color: var(--btncolorbg);
221  border: 1px solid var(--btncolorborder);
222 }
223 
224 a.btnTitle.btnTitleSelected {
225  border: 1px solid #ccc;
226  border-radius: 3px;
227 }
228 
229 .btnTitle > .btnTitle-icon{
230 
231 }
232 
233 .btnTitle > .btnTitle-label{
234  color: #666666;
235 }
236 
237 .btnTitle:hover, a.btnTitle:hover {
238  border: 1px solid #bbb;
239  border-radius: 3px;
240  position: relative;
241  text-align: center;
242  /* color: #ffffff;
243  background-color: rgb(<?php print $colortextlink; ?>); */
244  font-size: 12px;
245  text-decoration: none;
246  box-shadow: none;
247 }
248 
249 .btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
250  color: #8a8a8a;
251  cursor: not-allowed;
252  background-color: #fbfbfb;
253  background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
254 }
255 
256 .btnTitle:hover .btnTitle-label{
257  color: var(--btncolorborderhover);
258 }
259 
260 .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
261  color: #8a8a8a;
262 }
263 
264 .btnTitle>.fa {
265  font-size: 20px;
266  display: block;
267 }
268 
269 div.pagination li:first-child a.btnTitle{
270  margin-left: 10px;
271 }
272 
273 
274 .imgforviewmode {
275  color: #aaa;
276 }
277 
278 /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
279 @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 */
280 {
281  .butAction, .butActionRefused, .butActionDelete {
282  font-size: 0.95em;
283  }
284  .btnTitle, a.btnTitle {
285  display: inline-block;
286  padding: 4px 4px 4px 4px;
287  min-width: unset;
288  }
289 }
290 
291 <?php if (!empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?>
292 .butActionRefused, .butActionNewRefused, .btnTitle.refused {
293  display: none !important;
294 }
295 <?php } ?>
296 
297 
298 /*
299  * BTN LINK
300  */
301 
302 .btn-link{
303  margin-right: 5px;
304  border: 1px solid #ddd;
305  color: #333;
306  padding: 5px 10px;
307  border-radius:1em;
308  text-decoration: none !important;
309 }
310 
311 .btn-link:hover{
312  background-color: #ddd;
313  border: 1px solid #ddd;
314 }
$conf db user
Definition: repair.php:109
print
Draft customers invoices.
Definition: index.php:89