Merge pull request #250 from owncloud/notification-about-missing-calendar

Add visual feedback about missing dependency, closes #249
This commit is contained in:
raimund-schluessler 2015-09-05 13:44:13 +02:00
commit 2930e3cda2
2 changed files with 15 additions and 0 deletions

View file

@ -39,5 +39,6 @@ if(\OCP\App::isEnabled('calendar')) {
});
} else {
$msg = 'Can not enable the Tasks app because the Calendar App is disabled.';
\OCP\Util::addScript('tasks', 'calendar-missing');
\OCP\Util::writeLog('tasks', $msg, \OCP\Util::ERROR);
}

14
js/calendar-missing.js Normal file
View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
$(function(){
$(document).ready(function () {
OC.Notification.showTemporary(t('tasks', 'Tasks app is unavailable because the calendar is not installed'));
});
});