Как оформить календарь SmartGwt - PullRequest
       17

Как оформить календарь SmartGwt

0 голосов
/ 08 сентября 2011

Как я могу изменить поведение интеллектуального календаря GWT, чтобы при щелчке по дневной ячейке она оставалась выделенной (выделенной)

Я знаю, что нужно каким-то образом изменить CSS для дневной ячейкив течение дняBodyClickedHandler

но я не могу понять, как.У кого-нибудь есть пример этого?

1 Ответ

0 голосов
/ 08 сентября 2011

Соответствующее css, вероятно, равно .calendarCellSelected {}

Вы можете установить имя стиля CSS: calendar.setSelectedCellStyle(selectedCellStyle)

Вы можете найти стандартный CSS для Календаря в своей теме.Например, в BlackOps:

/*============================================================
    Calendar

============================================================*/
.calendar,
.calendarDisabled,
.calendarWorkday,
.calendarDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#ffffff;
}

.calendarDisabled {
    background-color:gainsboro;    
}

.calendarWorkday {
    background-color:#ffffcc; 
}

.calendarOver,
.calendarOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#c0ffc0;
}
.calendarCellSelected {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#CCCCCC; 
}
.labelColumn {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:gainsboro;
}
/* ----month---- */
/* calMonthDayHeader and Body */

.calMonthDayHeader,
.calMonthDayHeaderDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color: gainsboro;
}

.calMonthDayHeaderOver,
.calMonthDayHeaderOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color: #c0ffc0;
}
.calMonthDayBody,
.calMonthDayBodyDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#ffffff;
}
.calMonthDayBodyOver,
.calMonthDayBodyOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#c0ffc0;
}

.calMonthDayBodyDisabled,
.calMonthDayBodyDisabledOver {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#E6E6E6;
}
/* calMonthOtherDayHeader and Body */

.calMonthOtherDayHeader,
.calMonthOtherDayHeaderDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:#444444;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color: #aaaaaa;
}
.calMonthOtherDayHeaderOver,
.calMonthOtherDayHeaderOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:#444444;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color: #c0ffc0;
}
.calMonthOtherDayBody,
.calMonthOtherDayBodyDark, 
.calMonthOtherDayBodyDisabled, 
.calMonthOtherDayBodyDisabledOver {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#E6E6E6;
}
.calMonthOtherDayBodyOver,
.calMonthOtherDayBodyOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:black;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color:#c0ffc0;
}
/* calMonthOtherDayBlank */

.calMonthOtherDayBlank,
.calMonthOtherDayBlankDark, 
.calMonthOtherDayBlankOver,
.calMonthOtherDayBlankOverDark {
    font-family:Arial,sans-serif; font-size:11px;
    color:#444444;
    border-bottom:1px solid #a0a0a0; border-right:1px solid #a0a0a0;
    background-color: #E6E6E6;
}

/* calMonthEventLink */

a.calMonthEventLink:link {color:blue; text-decoration:none}
a.calMonthEventLink:visited {color:blue; text-decoration:none}
a.calMonthEventLink:hover {color:blue; text-decoration:underline}
a.calMonthEventLink:active {color:blue; text-decoration:none}

/* ----event window---- */

.eventWindow {
    font-family:Verdana,Bitstream Vera Sans,sans-serif; font-size: 9px;
    background-color:#649ED8;
    border: 1px solid #004D99;
}

.eventWindowHeader {
    font-family:Verdana,Bitstream Vera Sans,sans-serif; font-size: 9px;
    color:white;
    background-color:#004D99;
}

.eventWindowBody {
    font-family:Verdana,Bitstream Vera Sans,sans-serif; font-size: 9px;
    color:black;
    background-color: #649ED8;
    padding: 3px;
}

.eventWindowResizer{
    border-top:1px solid white;
    border-bottom: 1px solid white;
}
...