Calendar et2 bugs:

- Add link styling to grid views
- Don't fail if loading without access
This commit is contained in:
Nathan Gray 2015-09-09 21:35:26 +00:00
parent 84b1eafc24
commit 50b3c77986
3 changed files with 7 additions and 16 deletions

View File

@ -182,7 +182,8 @@ class calendar_ui
function check_owners_access() function check_owners_access()
{ {
$no_access = $no_access_group = array(); $no_access = $no_access_group = array();
foreach(explode(',',$this->owner) as $owner) $owner_array = explode(',',$this->owner);
foreach($owner_array as $idx => $owner)
{ {
$owner = trim($owner); $owner = trim($owner);
if (is_numeric($owner) && $GLOBALS['egw']->accounts->get_type($owner) == 'g') if (is_numeric($owner) && $GLOBALS['egw']->accounts->get_type($owner) == 'g')
@ -199,23 +200,13 @@ class calendar_ui
elseif (!$this->bo->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS|EGW_ACL_FREEBUSY,0,$owner)) elseif (!$this->bo->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS|EGW_ACL_FREEBUSY,0,$owner))
{ {
$no_access[$owner] = $this->bo->participant_name($owner); $no_access[$owner] = $this->bo->participant_name($owner);
unset($owner_array[$idx]);
} }
} }
if (count($no_access)) if (count($no_access))
{ {
$msg = '<p class="message" align="center">'.htmlspecialchars(lang('Access denied to the calendar of %1 !!!',implode(', ',$no_access)))."</p>\n"; egw_framework::message(lang('Access denied to the calendar of %1 !!!',implode(', ',$no_access)),'error');
$this->owner = implode(',',$owner_array);
if ($GLOBALS['egw_info']['flags']['currentapp'] == 'home')
{
return $msg;
}
common::egw_header();
if ($GLOBALS['egw_info']['flags']['nonavbar']) parse_navbar();
echo $msg;
common::egw_footer();
common::egw_exit();
} }
if (count($no_access_group)) if (count($no_access_group))
{ {

View File

@ -293,7 +293,7 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
// Remove all classes // Remove all classes
this.title.removeClass() this.title.removeClass()
// Except this one... // Except this one...
.addClass("et2_clickable calendar_calDayColHeader"); .addClass("et2_clickable calendar_calDayColHeader et2_link");
// Set today class - note +1 when dealing with today, as months in JS are 0-11 // Set today class - note +1 when dealing with today, as months in JS are 0-11
var today = new Date(); var today = new Date();

View File

@ -109,7 +109,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
// Contains times / rows // Contains times / rows
this.gridHeader = $j(document.createElement("div")) this.gridHeader = $j(document.createElement("div"))
.addClass("calendar_calGridHeader") .addClass("calendar_calGridHeader et2_link")
.appendTo(this.div); .appendTo(this.div);
// Contains days / columns // Contains days / columns