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