Skip to content
Permalink
Browse files

Improved selectedCalendar handling

  • Loading branch information...
lars-sh committed Jul 27, 2017
1 parent a9f48a9 commit 696d630792d78aff0ee9895abae34590c96f38ac
@@ -439,8 +439,12 @@ function eyeCalendar_on_mainResize($params){
function eyeCalendar_on_addNote($params="") {
//Creating the noteTime
$id = $params['id'][0];
if(!is_numeric($id)){
//TODO: send a remove command
if (!is_numeric($id)) {
eyeX('messageBox', array('content' => 'Failed technically. ID is not given or not numeric.'));
return false;
}
if (eyeCalendar('getCalendarName', array($params['calendar'][0])) === false) {
eyeX('messageBox', array('content' => 'Failed. You need to select a calendar first.'));
return false;
}
$date = getDate($GLOBALS['weekPlanner']->date);
@@ -298,6 +298,7 @@ function lib_eyeCalendar_getCalendarName($params){
return $calendarInfo['name'][0];
}
}
return false;
}
function lib_eyeCalendar_getCalendarRemote($params){
$num = $params[0];
@@ -456,6 +457,11 @@ function lib_eyeCalendar_getCurrentCalendar(){
return $calendarInfo['num'][0];
}
}
foreach ($myCalendars['calendars'][0]['calendarInfo'] as $calendarInfo) {
if (is_array($calendarInfo)) {
return $calendarInfo['num'][0];
}
}
return false;
}
function lib_eyeCalendar_setCurrentCalendar($params){
@@ -79,7 +79,7 @@ class weekPlanner {
isset($params['startMonday']) ? $this->startMonday = $params['startMonday'] : $this->startMonday = 1;
isset($params['parts']) ? $this->parts = $params['parts'] : $this->parts = 4;
isset($params['date']) ? $this->date = $params['date'] : $this->date = time();
isset($params['selectedCalendar']) ? $this->selectedCalendar = $params['selectedCalendar'] : $this->selectedCalendar = 'noCalendar';
isset($params['selectedCalendar']) && is_numeric($params['selectedCalendar']) ? $this->selectedCalendar = $params['selectedCalendar'] : $this->selectedCalendar = 'noCalendar';
isset($params['defaultEvenText']) ? $this->defaultEvenText = $params['defaultEvenText'] : $this->defaultEvenText = 'Add your event!';
isset($params['calendarsText']) ? $this->calendarsText = $params['calendarsText'] : $this->calendarsText = 'Calendars';
/*if($this->dayEven == $this->dayFrom+1 && $this->startMonday == 1 && $this->dayFrom != 0){

0 comments on commit 696d630

Please sign in to comment.
You can’t perform that action at this time.