btn.inc.php 9.9 KB

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