_datepicker.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. /**
  2. * Creates the base structure of a date picker.
  3. * @member Ext.picker.Date
  4. */
  5. @mixin extjs-datepicker {
  6. .#{$prefix}datepicker {
  7. border: $datepicker-border;
  8. background-color: $datepicker-background-color;
  9. position: relative;
  10. a {
  11. -moz-outline: 0 none;
  12. outline: 0 none;
  13. color: $datepicker-monthpicker-item-color;
  14. text-decoration: none;
  15. border-width: 0;
  16. }
  17. }
  18. .#{$prefix}datepicker-inner,
  19. .#{$prefix}datepicker-inner td,
  20. .#{$prefix}datepicker-inner th {
  21. border-collapse: separate;
  22. }
  23. .#{$prefix}datepicker-header {
  24. position: relative;
  25. height: 26px;
  26. @if $datepicker-header-background-gradient {
  27. @include background-gradient($datepicker-header-background-color, $datepicker-header-background-gradient);
  28. } @else {
  29. background-color: $datepicker-header-background-color;
  30. }
  31. }
  32. .#{$prefix}datepicker-prev,
  33. .#{$prefix}datepicker-next {
  34. position: absolute;
  35. top: 5px;
  36. width: 18px;
  37. a {
  38. display: block;
  39. width: 16px;
  40. height: 16px;
  41. background-position: top;
  42. background-repeat: no-repeat;
  43. cursor: pointer;
  44. text-decoration: none !important;
  45. @include opacity(.7);
  46. &:hover {
  47. @include opacity(1);
  48. }
  49. }
  50. }
  51. .#{$prefix}datepicker-next {
  52. right: 5px;
  53. a {
  54. background-image: theme-background-image($theme-name, $datepicker-next-image);
  55. }
  56. }
  57. .#{$prefix}datepicker-prev {
  58. left: 5px;
  59. a {
  60. background-image: theme-background-image($theme-name, $datepicker-prev-image);
  61. }
  62. }
  63. .#{$prefix}item-disabled .#{$prefix}datepicker-prev a:hover,
  64. .#{$prefix}item-disabled .#{$prefix}datepicker-next a:hover {
  65. @include opacity(.6);
  66. }
  67. .#{$prefix}datepicker-month {
  68. padding-top: 3px;
  69. .#{$prefix}btn,
  70. button,
  71. .#{$prefix}btn-tc,
  72. .#{$prefix}btn-tl,
  73. .#{$prefix}btn-tr,
  74. .#{$prefix}btn-mc,
  75. .#{$prefix}btn-ml,
  76. .#{$prefix}btn-mr,
  77. .#{$prefix}btn-bc,
  78. .#{$prefix}btn-bl,
  79. .#{$prefix}btn-br {
  80. background: transparent !important;
  81. border-width: 0 !important;
  82. }
  83. span {
  84. color: #fff !important;
  85. }
  86. .#{$prefix}btn-split-right {
  87. background-image: theme-background-image($theme-name, $datepicker-month-arrow-image);
  88. padding-right: 12px;
  89. }
  90. }
  91. .#{$prefix}datepicker-next {
  92. text-align: right;
  93. }
  94. .#{$prefix}datepicker-month {
  95. //width: 120px;
  96. text-align: center;
  97. button {
  98. color: $datepicker-monthpicker-color !important;
  99. }
  100. }
  101. table.#{$prefix}datepicker-inner {
  102. width: 100%;
  103. table-layout: fixed;
  104. th {
  105. width: 25px;
  106. height: 19px;
  107. padding: 0;
  108. color: $datepicker-th-color;
  109. font: $datepicker-th-font;
  110. text-align: $datepicker-th-text-align;
  111. border-bottom: 1px solid $datepicker-th-border-bottom-color;
  112. border-collapse: separate;
  113. @if $datepicker-th-background-gradient {
  114. @include background-gradient($datepicker-th-background-color, $datepicker-th-background-gradient);
  115. } @else {
  116. background-color: $datepicker-th-background-color;
  117. }
  118. cursor: default;
  119. span {
  120. display: block;
  121. padding-right: 7px;
  122. }
  123. }
  124. tr {
  125. height: 20px;
  126. }
  127. td {
  128. border: $datepicker-border-width $datepicker-border-style;
  129. height: $datepicker-td-height;
  130. border-color: $datepicker-background-color;
  131. text-align: right;
  132. padding: 0;
  133. }
  134. a {
  135. padding-right: 4px;
  136. display: block;
  137. zoom: 1;
  138. font: normal ceil($font-size * .9) $font-family;
  139. color: $datepicker-item-color;
  140. text-decoration: none;
  141. text-align: right;
  142. }
  143. .#{$prefix}datepicker-active {
  144. cursor: pointer;
  145. color: black;
  146. }
  147. .#{$prefix}datepicker-selected {
  148. a {
  149. background: repeat-x left top;
  150. background-color: $datepicker-selected-item-background-color;
  151. border: 1px solid $datepicker-selected-item-border-color;
  152. }
  153. span {
  154. font-weight: bold;
  155. }
  156. }
  157. .#{$prefix}datepicker-today {
  158. a {
  159. border: $datepicker-border-width $datepicker-border-style;
  160. border-color: $datepicker-today-item-border-color;
  161. }
  162. }
  163. .#{$prefix}datepicker-prevday,
  164. .#{$prefix}datepicker-nextday {
  165. a {
  166. text-decoration: none !important;
  167. color: #aaa;
  168. }
  169. }
  170. a:hover,
  171. .#{$prefix}datepicker-disabled a:hover {
  172. text-decoration: none !important;
  173. color: #000;
  174. background-color: $datepicker-item-hover-background-color;
  175. }
  176. .#{$prefix}datepicker-disabled a {
  177. cursor: default;
  178. background-color: #eee;
  179. color: #bbb;
  180. }
  181. }
  182. .#{$prefix}datepicker-footer,
  183. .#{$prefix}monthpicker-buttons {
  184. position: relative;
  185. border-top: $datepicker-border-width $datepicker-border-style $datepicker-footer-border-top-color;
  186. @if $datepicker-footer-background-gradient {
  187. @include background-gradient($datepicker-footer-background-color, $datepicker-footer-background-gradient);
  188. } @else {
  189. background-color: $datepicker-footer-background-color;
  190. }
  191. text-align: center;
  192. .#{$prefix}btn {
  193. position: relative;
  194. margin: 4px;
  195. }
  196. }
  197. .#{$prefix}item-disabled .#{$prefix}datepicker-inner a:hover {
  198. background: none;
  199. }
  200. // month picker
  201. .#{$prefix}datepicker .#{$prefix}monthpicker {
  202. position: absolute;
  203. left: 0;
  204. top: 0;
  205. }
  206. .#{$prefix}monthpicker {
  207. border: $datepicker-border;
  208. background-color: $datepicker-background-color;
  209. }
  210. .#{$prefix}monthpicker-months,
  211. .#{$prefix}monthpicker-years {
  212. float: left;
  213. height: $datepicker-monthpicker-height;
  214. width: 88px;
  215. }
  216. .#{$prefix}monthpicker-item {
  217. float: left;
  218. margin: 4px 0 5px 0;
  219. font: normal ceil($font-size * .9) $font-family;
  220. text-align: center;
  221. vertical-align: middle;
  222. height: 18px;
  223. width: 43px;
  224. border: 0 none;
  225. a {
  226. display: block;
  227. margin: 0 5px;
  228. text-decoration: none;
  229. color: $datepicker-monthpicker-item-color;
  230. border: $datepicker-monthpicker-item-border;
  231. line-height: 17px;
  232. &:hover {
  233. background-color: $datepicker-monthpicker-item-hover-background-color;
  234. }
  235. &.#{$prefix}monthpicker-selected {
  236. background-color: $datepicker-monthpicker-item-selected-background-color;
  237. border: $datepicker-monthpicker-item-selected-border;
  238. }
  239. }
  240. }
  241. .#{$prefix}monthpicker-months {
  242. border-right: $datepicker-border;
  243. width: 87px;
  244. }
  245. .#{$prefix}monthpicker-years .#{$prefix}monthpicker-item {
  246. width: 44px;
  247. }
  248. .#{$prefix}monthpicker-yearnav {
  249. height: 28px;
  250. button {
  251. background-image: theme-background-image($theme-name, $datepicker-tool-sprite-image);
  252. height: 15px;
  253. width: 15px;
  254. padding: 0;
  255. margin: 6px 12px 5px 15px;
  256. border: 0;
  257. outline: 0 none;
  258. &::-moz-focus-inner {
  259. border: 0;
  260. padding: 0;
  261. }
  262. }
  263. }
  264. .#{$prefix}monthpicker-yearnav-next {
  265. background-position: 0 -120px;
  266. }
  267. .#{$prefix}monthpicker-yearnav-next-over {
  268. cursor: pointer;
  269. cursor: hand;
  270. background-position: -15px -120px;
  271. }
  272. .#{$prefix}monthpicker-yearnav-prev {
  273. background-position: 0 -105px;
  274. }
  275. .#{$prefix}monthpicker-yearnav-prev-over {
  276. cursor: pointer;
  277. cursor: hand;
  278. background-position: -15px -105px;
  279. }
  280. .#{$prefix}monthpicker-small {
  281. .#{$prefix}monthpicker-item {
  282. margin: 2px 0 2px 0;
  283. }
  284. .#{$prefix}monthpicker-yearnav {
  285. height: 23px;
  286. }
  287. .#{$prefix}monthpicker-months, .#{$prefix}monthpicker-years {
  288. height: 136px;
  289. }
  290. }
  291. @if $include-ie {
  292. .#{$prefix}quirks {
  293. .#{$prefix}ie7,
  294. .#{$prefix}ie8 {
  295. .#{$prefix}monthpicker-buttons {
  296. .#{$prefix}btn {
  297. margin-top: 2px;
  298. }
  299. }
  300. }
  301. .#{$prefix}monthpicker-small .#{$prefix}monthpicker-yearnav button {
  302. margin-top: 3px;
  303. margin-bottom: 3px;
  304. }
  305. }
  306. .#{$prefix}ie6 .#{$prefix}monthpicker-small .#{$prefix}monthpicker-yearnav button {
  307. margin-top: 3px;
  308. margin-bottom: 3px;
  309. }
  310. }
  311. //nlg support
  312. @if not $supports-gradients or $compile-all {
  313. .#{$prefix}nlg {
  314. @if $datepicker-header-background-gradient != null {
  315. .#{$prefix}datepicker-header {
  316. background-image: theme-background-image($theme-name, 'datepicker/datepicker-header-bg.gif');
  317. background-repeat: repeat-x;
  318. background-position: top left;
  319. }
  320. }
  321. @if $datepicker-footer-background-gradient != null {
  322. .#{$prefix}datepicker-footer,
  323. .#{$prefix}monthpicker-buttons {
  324. background-image: theme-background-image($theme-name, 'datepicker/datepicker-footer-bg.gif');
  325. background-repeat: repeat-x;
  326. background-position: top left;
  327. }
  328. }
  329. }
  330. }
  331. }