Sidebox calendar buttons

- change button colors
- change tooltip for added buttons to match jqueryui buttons
- finally found (& removed) that 1px wiggle
This commit is contained in:
Nathan Gray 2016-02-03 16:52:28 +00:00
parent 0261dd0b82
commit cd30a70a96
6 changed files with 43 additions and 14 deletions

View File

@ -3115,7 +3115,7 @@ app.classes.calendar = AppJS.extend(
{
var temp_date = new Date(year, month-1, 1,0,0,0);
//temp_date.setUTCMinutes(temp_date.getUTCMinutes() + temp_date.getTimezoneOffset());
go_button.set_statustext(egw.lang(date('F',temp_date)));
go_button.btn.attr('title',egw.lang(date('F',temp_date)));
// Store current _displayed_ date in date button for clicking
temp_date.setUTCMinutes(temp_date.getUTCMinutes() - temp_date.getTimezoneOffset());
@ -3194,6 +3194,7 @@ app.classes.calendar = AppJS.extend(
// Set today button
var today = $j('#calendar-sidebox_header_today');
today.attr('title',egw.lang('today'));
// Set go button
var go_button = date_widget.getRoot().getWidgetById('header_go');
@ -3204,9 +3205,11 @@ app.classes.calendar = AppJS.extend(
temp_date.setUTCDate(1);
temp_date.setUTCMinutes(temp_date.getUTCMinutes() + temp_date.getTimezoneOffset());
go_button.attr('title', egw.lang(date('F',temp_date)));
// Store current _displayed_ date in date button for clicking
temp_date.setUTCMinutes(temp_date.getUTCMinutes() - temp_date.getTimezoneOffset());
go_button.attr('data-date', temp_date.toJSON());
}
// Dynamic resize of sidebox calendar to fill sidebox

View File

@ -306,9 +306,6 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
// Header
var title = !event.is_private ? event['title'] : egw.lang('private');
// Height specific section
this._small_size();
this.title
.html('<span class="calendar_calTimespan">'+this._get_timespan(event) + '<br /></span>')
.append('<span class="calendar_calEventTitle">'+title+'</span>')
@ -350,6 +347,9 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
.append('<p>'+this.options.value.description+'</p>');
}
}
// Height specific section
this._small_size();
},
/**

View File

@ -555,12 +555,13 @@ Hide subsequent headers in week view with non-consolidated owners
.calendar_calTimeGrid:not(.calendar_calTimeGridList) *:not(.calendar_calDayColAllDay) > .calendar_calEvent::after {
width: 100%;
background-color: rgba(255,255,255,0.9);
height: 0.9em;
height: 5px;
content: "\02026";
left: 0px;
float: right;
padding-bottom: 5em;
text-indent: 5px;
line-height: 5px;
}
/**
* User has not accepted the invitation

View File

@ -15,13 +15,13 @@ Egroupware
<template id="calendar.sidebox">
<vbox parent_node="calendar-et2_target">
<textbox id="keywords" class="et2_fullWidth" blur="Search" onchange="app.calendar.update_state({view: 'listview',keywords: widget.getValue()});return false;"/>
<buttononly id="header_today" label="•" icon="nope" statustext="Today" onclick="
<buttononly id="header_today" label="•" icon="nope" onclick="
var tempDate = new Date();
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
var change = {date: today.toJSON()};
if(app.calendar.state.view == 'planner') { change.planner_days = Math.ceil((new Date(app.calendar.state.last) - new Date(app.calendar.state.first)) / (24*3600000));}
app.calendar.update_state(change);return false;"/>
<buttononly id="header_go" label="&#8629;" icon="nope" statustext="Go" class="ui-corner-all" onclick="var change = {date: widget.btn.attr('data-date')}; if(app.calendar.state.view == 'planner') { change.planner_days = 0;change.first=change.date;var d = new Date(change.date);d = new Date(d.getFullYear(),d.getUTCMonth() + 1, 0);change.last=d.toJSON();} else if ( app.calendar.state.view == 'listview') {change.filter='month';} else {change.view = 'month';}app.calendar.update_state(change);" />
<buttononly id="header_go" label="&#8629;" icon="nope" class="ui-corner-all" onclick="var change = {date: widget.btn.attr('data-date')}; if(app.calendar.state.view == 'planner') { change.planner_days = 0;change.first=change.date;var d = new Date(change.date);d = new Date(d.getFullYear(),d.getUTCMonth() + 1, 0);change.last=d.toJSON();} else if ( app.calendar.state.view == 'listview') {change.filter='month';} else {change.view = 'month';}app.calendar.update_state(change);" />
<date id="date" class="et2_fullWidth" inline="true" onchange="var view_change = app.calendar.sidebox_changes_views.indexOf(app.calendar.state.view);
var update = {date:widget.getValue()};
if(view_change >= 0) {update.view = app.calendar.sidebox_changes_views[view_change ? view_change - 1 : view_change];} else if (app.calendar.state.view == 'listview') {update.filter = 'after';} else if (app.calendar.state.view =='planner') { update.planner_days = 1; } app.calendar.update_state(update);"/>

View File

@ -11,7 +11,7 @@
* @package calendar
* @version $Id$
*/
/* $Id: app.css 54904 2016-02-02 21:12:44Z nathangray $ */
/* $Id: app.css 54905 2016-02-02 22:59:13Z nathangray $ */
/*Media print classes*/
@media print {
.th td,
@ -560,12 +560,13 @@ Hide subsequent headers in week view with non-consolidated owners
.calendar_calTimeGrid:not(.calendar_calTimeGridList) *:not(.calendar_calDayColAllDay) > .calendar_calEvent::after {
width: 100%;
background-color: rgba(255, 255, 255, 0.9);
height: 0.9em;
height: 5px;
content: "\02026";
left: 0px;
float: right;
padding-bottom: 5em;
text-indent: 5px;
line-height: 5px;
}
/**
* User has not accepted the invitation
@ -2545,8 +2546,19 @@ div#calendar-container div.calendar table tbody tr.rowhilite td {
#calendar-sidebox_date .ui-datepicker-year {
padding-right: 15px !important;
}
#calendar-sidebox_date #calendar-sidebox_header_today {
background-image: url(images/today.png);
#calendar-sidebox_date .ui-datepicker-header a span {
background-image: url('../../../phpgwapi/js/jquery/jquery-ui/redmond/images/ui-icons_217bc0_256x240.png');
}
#calendar-sidebox_date .ui-datepicker-header a.ui-state-hover {
top: 3px;
}
#calendar-sidebox_date .ui-datepicker-header a.ui-state-hover span {
background-image: url('../../../pixelegg/images/ui-icons_egw_color_2_256x240_0C5DA5.png');
transition: none;
}
#calendar-sidebox_header_go,
#calendar-sidebox_header_today {
background-color: #0c5da5;
}
#calendar_cat_id,
#calendar_filter,

View File

@ -13,6 +13,7 @@
*/
@import (reference) "../../../pixelegg/less/definitions.less";
@import (less) "../default/app.css";
@ -1369,9 +1370,21 @@ div#calendar-container {
.ui-datepicker-year {
padding-right: 15px !important;
}
#calendar-sidebox_header_today {
background-image: url(images/today.png);
}
.ui-datepicker-header a span {
background-image: url('../../../phpgwapi/js/jquery/jquery-ui/redmond/images/ui-icons_217bc0_256x240.png')
}
.ui-datepicker-header a.ui-state-hover {
top: 3px;
span {
background-image: url('../../../pixelegg/images/ui-icons_egw_color_2_256x240_0C5DA5.png');
transition: none;
}
}
}
#calendar-sidebox_header_go,
#calendar-sidebox_header_today {
background-color: #0c5da5;
}
// Select Fields in Sidemenu
#calendar_cat_id,