dolibarr  19.0.0-dev
btn.inc.php
1 <?php
2 if (!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
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) {"; // 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 }*/
49 div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
50 div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete,
51 div.tabsAction > div.divButAction > span.butAction,
52 div.tabsAction > div.divButAction > span.butActionDelete,
53 div.tabsAction > div.divButAction > span.butActionRefused,
54 div.tabsAction > div.divButAction > a.butAction,
55 div.tabsAction > div.divButAction > a.butActionDelete,
56 div.tabsAction > div.divButAction > a.butActionRefused {
57  margin-bottom: 1.4em !important;
58  margin-right: 0px !important;
59 }
60 div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused {
61  margin-bottom: 0 !important;
62 }
63 
64 span.butAction, span.butActionDelete {
65  cursor: pointer;
66 }
67 .paginationafterarrows .butAction {
68  font-size: 0.9em;
69 }
70 .butAction {
71  background: var(--butactionbg);
72  color: var(--textbutaction) !important;
73  /* background: rgb(230, 232, 239); */
74 }
75 .butActionRefused, .butAction, .butActionDelete {
76  border-radius: 3px;
77 }
78 :not(.center) > .butActionRefused:last-child, :not(.center) > .butAction:last-child, :not(.center) > .butActionDelete:last-child {
79  margin-<?php echo $right; ?>: 0px !important;
80 }
81 .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
82  text-decoration: none;
83  text-transform: uppercase;
84  font-weight: bold;
85 
86  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '1'); ?>em;
87  padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em;
88  display: inline-block;
89  text-align: center;
90  cursor: pointer;
91  color: #444;
92  border: 1px solid transparent; /* So for buttonRefused with a border, it will not have any flash effect */
93 
94  /* border: 1px solid #aaa; */
95  /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
96 
97  /*border-top-right-radius: 0 !important;
98  border-bottom-right-radius: 0 !important;
99  border-top-left-radius: 0 !important;
100  border-bottom-left-radius: 0 !important;*/
101 }
102 .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
103  text-decoration: none;
104  text-transform: uppercase;
105  font-weight: normal;
106 
107  margin: 0em 0.3em 0 0.3em !important;
108  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em;
109  font-family: <?php print $fontlist ?>;
110  display: inline-block;
111  /* text-align: center; New button are on right of screen */
112  cursor: pointer;
113 }
114 
115 .tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover,
116 .tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover,
117 span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
118 a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
119 span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
120 a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
121 span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
122 a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
123 span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover
124 {
125  font-size: 1em;
126  padding-left: 0px;
127 }
128 
129 a.butActionNew>span.fa, a.butActionNew>span.fa:hover,
130 span.butActionNew>span.fa, span.butActionNew>span.fa:hover,
131 a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover,
132 span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover
133 {
134  padding-<?php echo $left; ?>: 6px;
135  font-size: 1.5em;
136  border: none;
137  box-shadow: none; webkit-box-shadow: none;
138 }
139 
140 .butAction:hover {
141  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
142  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
143 }
144 .butActionNew:hover {
145  text-decoration: underline;
146  box-shadow: unset !important;
147 }
148 
149 .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
150  background: var(--butactiondeletebg) !important;
151  /* border: 1px solid #633; */
152  color: #633 !important;
153 }
154 
155 .butActionDelete:hover {
156  -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
157  box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
158 }
159 
160 .butActionRefused {
161  text-decoration: none !important;
162  text-transform: uppercase;
163  font-weight: bold !important;
164 
165  white-space: nowrap !important;
166  cursor: not-allowed !important;
167  font-family: <?php print $fontlist ?> !important;
168  display: inline-block;
169  text-align: center;
170  cursor: pointer;
171  box-sizing: border-box;
172  -moz-box-sizing: border-box;
173  -webkit-box-sizing: border-box;
174  color: #999 !important;
175 
176  border: 1px solid #ccc;
177 }
178 .butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active {
179  text-decoration: none !important;
180  text-transform: uppercase;
181  font-weight: normal !important;
182 
183  white-space: nowrap !important;
184  cursor: not-allowed !important;
185  margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em;
186  padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em;
187  font-family: <?php print $fontlist ?> !important;
188  display: inline-block;
189  /* text-align: center; New button are on right of screen */
190  cursor: pointer;
191  color: #999 !important;
192  padding-top: 0.2em;
193  box-shadow: none !important;
194  -webkit-box-shadow: none !important;
195 }
196 
197 .butActionTransparent {
198  color: #222 ! important;
199  background-color: transparent ! important;
200 }
201 
202 
203 /*
204 TITLE BUTTON
205  */
206 
207 .btnTitle, a.btnTitle {
208  display: inline-block;
209  padding: 4px 4px 4px 4px;
210  font-weight: 400;
211  /* line-height: 1; */
212  text-align: center;
213  white-space: nowrap;
214  vertical-align: middle;
215  -ms-touch-action: manipulation;
216  touch-action: manipulation;
217  cursor: pointer;
218  -webkit-user-select: none;
219  -moz-user-select: none;
220  -ms-user-select: none;
221  user-select: none;
222  box-shadow: var(--btncolorbg);
223  text-decoration: none;
224  position: relative;
225  /* margin: 0 0 0 8px; */
226  min-width: 72px;
227  text-align: center;
228  color: var(--btncolortext);
229  border: none;
230  font-size: 12px;
231  font-weight: 300;
232  background-color: var(--btncolorbg);
233  border: 1px solid var(--btncolorborder);
234 }
235 
236 a.btnTitle.btnTitleSelected {
237  border: 1px solid #ccc;
238  border-radius: 3px;
239 }
240 
241 .btnTitle > .btnTitle-icon{
242 
243 }
244 
245 .btnTitle > .btnTitle-label{
246  color: #666666;
247 }
248 
249 .btnTitle:hover, a.btnTitle:hover {
250  border: 1px solid #bbb;
251  border-radius: 3px;
252  position: relative;
253  text-align: center;
254  /* color: #ffffff;
255  background-color: rgb(<?php print $colortextlink; ?>); */
256  font-size: 12px;
257  text-decoration: none;
258  box-shadow: none;
259 }
260 
261 .btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover {
262  color: #8a8a8a;
263  cursor: not-allowed;
264  background-color: #fbfbfb;
265  background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px );
266 }
267 
268 .btnTitle:hover .btnTitle-label{
269  color: var(--btncolorborderhover);
270 }
271 
272 .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
273  color: #8a8a8a;
274 }
275 
276 .btnTitle>.fa {
277  font-size: 2em;
278  display: block;
279 }
280 
281 div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle {
282  margin-<?php echo $left; ?>: 10px;
283 }
284 
285 .button-title-separator{
286  display: inline-block;
287  clear: both;
288  width: 20px;
289 }
290 
291 .imgforviewmode {
292  color: #aaa;
293 }
294 
295 /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
296 @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 */
297 {
298  .butAction, .butActionRefused, .butActionDelete {
299  font-size: 0.95em;
300  }
301  .btnTitle, a.btnTitle {
302  display: inline-block;
303  padding: 4px 4px 4px 4px;
304  min-width: unset;
305  }
306 }
307 
308 /* rule to reduce top menu - 3rd reduction: The menu for user is on left */
309 @media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */
310 {
311  .butAction, .butActionRefused, .butActionDelete {
312  font-size: 0.9em;
313  }
314 }
315 
316 /* smartphone */
317 @media only screen and (max-width: 767px)
318 {
319  .butAction, .butActionRefused, .butActionDelete {
320  font-size: 0.85em;
321  }
322 }
323 
324 
325 <?php if (!empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?>
326 .butActionRefused, .butActionNewRefused, .btnTitle.refused {
327  display: none !important;
328 }
329 <?php } ?>
330 
331 
332 /*
333  * BTN LINK
334  */
335 
336 .btn-link{
337  margin-right: 5px;
338  border: 1px solid #ddd;
339  color: #333;
340  padding: 5px 10px;
341  border-radius:1em;
342  text-decoration: none !important;
343 }
344 
345 .btn-link:hover{
346  background-color: #ddd;
347  border: 1px solid #ddd;
348 }
rtl background position
$conf db user
Definition: repair.php:124