Merge branch 'origin' into 'japanese'

Update 4.0.2

See merge request harukin/core!51
This commit is contained in:
harukin 2019-04-18 06:40:08 +09:00
commit d55f691ec0
165 changed files with 27573 additions and 230 deletions

View File

@ -1,3 +1,27 @@
Hubzilla 4.0.2 (2019-04-08)
- Port cdav calendar to fullcalendar version 4
- Fix perms_pending not evaluated correctly
- Fix return wrong profile photo modification date by plugin
- Fix suggestion widget using feature_enabled still
- Fix check service class limits when syncing files
- Remove xchan_instance_url from notifier query - it is not used anymore
- Implement remove cover photo functionality
- Fix z6_discover() and create a zot6 hubloc on import if applicable
- Add backend support for connections ordering
- Deduplicate items in item_store() by uuid if we got one otherwise by mid
- Add ITEM_TYPE_CUSTOM support to mod display
- Fix mod subthread on sys channel items
- Fix "recipient not found" dreport spaming with own xchan
- Fix wrong variables in dirsearch
- Fix 48 hours timeframe check in mod changeaddr
- Fix wrong variable in Libsync
- Pubcrawl: revert adding additional receivers to comments
- Diaspora: fix intro received when being banned
- Pubcrawl: add diaspora:guid from friendica AP posts for deduplication
- Diaspora: fix friendica plink
- Photocache: fix issue with spaces and quotes in original filenames
Hubzilla 4.0.1 (2019-03-21)
- Fix permissions not getting decrypted on follow
- Add option to add a poster to the video bbcode

View File

@ -452,7 +452,7 @@ class Notifier {
$env_recips = (($private) ? array() : null);
$details = q("select xchan_hash, xchan_instance_url, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . protect_sprintf(implode(',',$recipients)) . ")");
$details = q("select xchan_hash, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . protect_sprintf(implode(',',$recipients)) . ")");
$recip_list = array();

View File

@ -118,7 +118,7 @@ class DReport {
// So if a remote site says they can't find us, that's no big surprise
// and just creates a lot of extra report noise
if(($dr['location'] !== z_root()) && ($dr['sender'] === $rxchan) && ($dr['status'] === 'recipient_not_found'))
if(($dr['location'] !== z_root()) && ($dr['sender'] === $rxchan) && ($dr['status'] === 'recipient not found'))
return false;
// If you have a private post with a recipient list, every single site is going to report

View File

@ -336,7 +336,7 @@ class Libsync {
$disallowed = array('abook_id','abook_account','abook_channel','abook_rating','abook_rating_text','abook_not_here');
$fields = db_columns($abook);
$fields = db_columns('abook');
foreach($arr['abook'] as $abook) {

View File

@ -307,7 +307,7 @@ class Libzotdir {
if ($ud['ud_addr'] && (! ($ud['ud_flags'] & UPDATE_FLAGS_DELETED))) {
$success = false;
$href = \Zotlabs\Lib\Webfinger::zot_url(punify($url));
$href = \Zotlabs\Lib\Webfinger::zot_url(punify($ud['ud_addr']));
if($href) {
$zf = \Zotlabs\Lib\Zotfinger::exec($href);
}
@ -651,4 +651,4 @@ class Libzotdir {
}
}

View File

@ -66,7 +66,7 @@ class ZotURL {
}
static public function is_zoturl($s) {
static public function is_zoturl($url) {
if(strpos($url,'x-zot:') === 0) {
return true;

View File

@ -166,7 +166,7 @@ class Acl extends \Zotlabs\Web\Controller {
if($extra_channels) {
foreach($extra_channels as $channel) {
if(perm_is_allowed(intval($channel), get_observer_hash(),'view_contacts')) {
if($extra_channel_sql)
if($extra_channels_sql)
$extra_channels_sql .= ',';
$extra_channels_sql .= intval($channel);
}

View File

@ -280,9 +280,12 @@ class Cdav extends Controller {
return;
$title = $_REQUEST['title'];
$dtstart = new \DateTime($_REQUEST['dtstart']);
if($_REQUEST['dtend'])
$dtend = new \DateTime($_REQUEST['dtend']);
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
$location = $_REQUEST['location'];
@ -306,13 +309,17 @@ class Cdav extends Controller {
'DTSTART' => $dtstart
]
]);
if($dtend)
if($dtend) {
$vcalendar->VEVENT->add('DTEND', $dtend);
$vcalendar->VEVENT->DTEND['TZID'] = App::$timezone;
}
if($description)
$vcalendar->VEVENT->add('DESCRIPTION', $description);
if($location)
$vcalendar->VEVENT->add('LOCATION', $location);
$vcalendar->VEVENT->DTSTART['TZID'] = App::$timezone;
$calendarData = $vcalendar->serialize();
$caldavBackend->createCalendarObject($id, $objectUri, $calendarData);
@ -351,8 +358,12 @@ class Cdav extends Controller {
$uri = $_REQUEST['uri'];
$title = $_REQUEST['title'];
$dtstart = new \DateTime($_REQUEST['dtstart']);
$dtend = $_REQUEST['dtend'] ? new \DateTime($_REQUEST['dtend']) : '';
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
$location = $_REQUEST['location'];
@ -404,8 +415,12 @@ class Cdav extends Controller {
return;
$uri = $_REQUEST['uri'];
$dtstart = new \DateTime($_REQUEST['dtstart']);
$dtend = $_REQUEST['dtend'] ? new \DateTime($_REQUEST['dtend']) : '';
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$object = $caldavBackend->getCalendarObject($id, $uri);
@ -877,12 +892,19 @@ class Cdav extends Controller {
//Display calendar(s) here
if(argc() == 2 && argv(1) === 'calendar') {
head_add_css('/library/fullcalendar/fullcalendar.css');
head_add_css('/library/fullcalendar/packages/core/main.min.css');
head_add_css('/library/fullcalendar/packages/daygrid/main.min.css');
head_add_css('/library/fullcalendar/packages/timegrid/main.min.css');
head_add_css('/library/fullcalendar/packages/list/main.min.css');
head_add_css('cdav_calendar.css');
head_add_js('/library/moment/moment.min.js', 1);
head_add_js('/library/fullcalendar/fullcalendar.min.js', 1);
head_add_js('/library/fullcalendar/locale-all.js', 1);
head_add_js('/library/fullcalendar/packages/core/main.min.js');
head_add_js('/library/fullcalendar/packages/interaction/main.min.js');
head_add_js('/library/fullcalendar/packages/daygrid/main.min.js');
head_add_js('/library/fullcalendar/packages/timegrid/main.min.js');
head_add_js('/library/fullcalendar/packages/list/main.min.js');
$sources = '';
foreach($calendars as $calendar) {
$editable = (($calendar['share-access'] == 2) ? 'false' : 'true'); // false/true must be string since we're passing it to javascript
@ -891,6 +913,7 @@ class Cdav extends Controller {
$switch = get_pconfig(local_channel(), 'cdav_calendar', $calendar['id'][0]);
if($switch) {
$sources .= '{
id: ' . $calendar['id'][0] . ',
url: \'/cdav/calendar/json/' . $calendar['id'][0] . '/' . $calendar['id'][1] . '\',
color: \'' . $color . '\'
}, ';
@ -911,8 +934,8 @@ class Cdav extends Controller {
$first_day = (($first_day) ? $first_day : 0);
$title = ['title', t('Event title')];
$dtstart = ['dtstart', t('Start date and time'), '', t('Example: YYYY-MM-DD HH:mm')];
$dtend = ['dtend', t('End date and time'), '', t('Example: YYYY-MM-DD HH:mm')];
$dtstart = ['dtstart', t('Start date and time')];
$dtend = ['dtend', t('End date and time')];
$description = ['description', t('Description')];
$location = ['location', t('Location')];
@ -920,6 +943,7 @@ class Cdav extends Controller {
'$sources' => $sources,
'$color' => $color,
'$lang' => App::$language,
'$timezone' => App::$timezone,
'$first_day' => $first_day,
'$prev' => t('Previous'),
'$next' => t('Next'),
@ -952,10 +976,12 @@ class Cdav extends Controller {
//Provide json data for calendar
if(argc() == 5 && argv(1) === 'calendar' && argv(2) === 'json' && intval(argv(3)) && intval(argv(4))) {
$events = [];
$id = [argv(3), argv(4)];
if(! cdav_perms($id[0],$calendars))
killme();
json_return_and_die($events);
if (x($_GET,'start'))
$start = new \DateTime($_GET['start']);
@ -969,16 +995,19 @@ class Cdav extends Controller {
$filters['comp-filters'][0]['time-range']['end'] = $end;
$uris = $caldavBackend->calendarQuery($id, $filters);
if($uris) {
$objects = $caldavBackend->getMultipleCalendarObjects($id, $uris);
foreach($objects as $object) {
$vcalendar = \Sabre\VObject\Reader::read($object['calendardata']);
if(isset($vcalendar->VEVENT->RRULE))
if(isset($vcalendar->VEVENT->RRULE)) {
// expanding recurrent events seems to loose timezone info
// save it here so we can add it later
$recurrent_timezone = (string)$vcalendar->VEVENT->DTSTART['TZID'];
$vcalendar = $vcalendar->expand($start, $end);
}
foreach($vcalendar->VEVENT as $vevent) {
$title = (string)$vevent->SUMMARY;
@ -986,14 +1015,15 @@ class Cdav extends Controller {
$dtend = (string)$vevent->DTEND;
$description = (string)$vevent->DESCRIPTION;
$location = (string)$vevent->LOCATION;
$timezone = (string)$vevent->DTSTART['TZID'];
$rw = ((cdav_perms($id[0],$calendars,true)) ? true : false);
$editable = $rw ? true : false;
$recurrent = ((isset($vevent->{'RECURRENCE-ID'})) ? true : false);
$editable = $rw ? true : false;
if($recurrent)
if($recurrent) {
$editable = false;
$timezone = $recurrent_timezone;
}
$allDay = false;
@ -1007,8 +1037,8 @@ class Cdav extends Controller {
'calendar_id' => $id,
'uri' => $object['uri'],
'title' => $title,
'start' => $dtstart,
'end' => $dtend,
'start' => datetime_convert($timezone, $timezone, $dtstart, 'c'),
'end' => (($dtend) ? datetime_convert($timezone, $timezone, $dtend, 'c') : ''),
'description' => $description,
'location' => $location,
'allDay' => $allDay,
@ -1018,11 +1048,8 @@ class Cdav extends Controller {
];
}
}
json_return_and_die($events);
}
else {
killme();
}
json_return_and_die($events);
}
//enable/disable calendars

View File

@ -31,7 +31,7 @@ class Changeaddr extends \Zotlabs\Web\Controller {
if($account['account_password_changed'] > NULL_DATE) {
$d1 = datetime_convert('UTC','UTC','now - 48 hours');
if($account['account_password_changed'] > d1) {
if($account['account_password_changed'] > $d1) {
notice( t('Channel name changes are not allowed within 48 hours of changing the account password.') . EOL);
return;
}
@ -49,7 +49,7 @@ class Changeaddr extends \Zotlabs\Web\Controller {
if(check_webbie(array($new_address)) !== $new_address) {
notice( t('Nickname has unsupported characters or is already being used on this site.') . EOL);
return $ret;
return;
}
channel_change_address($channel,$new_address);

View File

@ -127,6 +127,20 @@ class Connections extends \Zotlabs\Web\Controller {
$unblocked = true;
}
switch($_REQUEST['order']) {
case 'name_desc':
$sql_order = 'xchan_name DESC';
break;
case 'connected':
$sql_order = 'abook_created';
break;
case 'connected_desc':
$sql_order = 'abook_created DESC';
break;
default:
$sql_order = 'xchan_name';
}
$search = ((x($_REQUEST,'search')) ? notags(trim($_REQUEST['search'])) : '');
$tabs = array(
@ -233,7 +247,7 @@ class Connections extends \Zotlabs\Web\Controller {
}
$r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash
WHERE abook_channel = %d and abook_self = 0 and xchan_deleted = 0 and xchan_orphan = 0 $sql_extra $sql_extra2 ORDER BY xchan_name LIMIT %d OFFSET %d ",
WHERE abook_channel = %d and abook_self = 0 and xchan_deleted = 0 and xchan_orphan = 0 $sql_extra $sql_extra2 ORDER BY $sql_order LIMIT %d OFFSET %d ",
intval(local_channel()),
intval(App::$pager['itemspage']),
intval(App::$pager['start'])
@ -307,7 +321,7 @@ class Connections extends \Zotlabs\Web\Controller {
'ignore_hover' => t('Ignore connection'),
'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false),
'recent_label' => t('Recent activity'),
'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']),
'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']) . '&name=' . $rr['xchan_name'],
'oneway' => $oneway
);
}

View File

@ -48,6 +48,29 @@ class Cover_photo extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo');
// Remove cover photo
if(isset($_POST['remove'])) {
$r = q("SELECT resource_id FROM photo WHERE photo_usage = %d AND uid = %d LIMIT 1",
intval(PHOTO_COVER),
intval(local_channel())
);
if($r) {
q("update photo set photo_usage = %d where photo_usage = %d and uid = %d",
intval(PHOTO_NORMAL),
intval(PHOTO_COVER),
intval(local_channel())
);
$sync = attach_export_data($channel,$r[0]['resource_id']);
if($sync)
build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
goaway(z_root() . '/cover_photo');
}
if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) {
@ -195,10 +218,12 @@ logger('gis: ' . print_r($gis,true));
);
return;
}
$channel = \App::get_channel();
$this->send_cover_photo_activity($channel,$base_image,$profile);
$sync = attach_export_data($channel,$base_image['resource_id']);
if($sync)
build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
else
@ -215,7 +240,7 @@ logger('gis: ' . print_r($gis,true));
require_once('include/attach.php');
$res = attach_store(\App::get_channel(), get_observer_hash(), '', array('album' => t('Cover Photos'), 'hash' => $hash));
$res = attach_store(\App::get_channel(), get_observer_hash(), '', array('album' => t('Cover Photos'), 'hash' => $hash, 'nosync' => true));
logger('attach_store: ' . print_r($res,true));
@ -393,6 +418,7 @@ logger('gis: ' . print_r($gis,true));
'$lbl_profiles' => t('Select a profile:'),
'$title' => t('Change Cover Photo'),
'$submit' => t('Upload'),
'$remove' => t('Remove'),
'$profiles' => $profiles,
'$embedPhotos' => t('Use a photo from your albums'),
'$embedPhotosModalTitle' => t('Use a photo from your albums'),

View File

@ -116,12 +116,12 @@ class Dirsearch extends \Zotlabs\Web\Controller {
$sql_extra .= $this->dir_query_build($joiner,'xchan_name',$name);
if($address)
$sql_extra .= $this->dir_query_build($joiner,'xchan_addr',$address);
if($city)
$sql_extra .= $this->dir_query_build($joiner,'xprof_locale',$city);
if($locale)
$sql_extra .= $this->dir_query_build($joiner,'xprof_locale',$locale);
if($region)
$sql_extra .= $this->dir_query_build($joiner,'xprof_region',$region);
if($post)
$sql_extra .= $this->dir_query_build($joiner,'xprof_postcode',$post);
if($postcode)
$sql_extra .= $this->dir_query_build($joiner,'xprof_postcode',$postcode);
if($country)
$sql_extra .= $this->dir_query_build($joiner,'xprof_country',$country);
if($gender)

View File

@ -175,6 +175,11 @@ class Display extends \Zotlabs\Web\Controller {
return '';
}
}
if ($target_item['item_type'] == ITEM_TYPE_CUSTOM) {
call_hooks('item_custom_display',$target_item);
notice( t('Page not found.') . EOL);
return '';
}
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);

View File

@ -8,6 +8,8 @@ require_once('include/import.php');
require_once('include/perm_upgrade.php');
require_once('library/urlify/URLify.php');
use Zotlabs\Lib\Libzot;
/**
* @brief Module for channel import.
@ -228,13 +230,45 @@ class Import extends \Zotlabs\Web\Controller {
);
// reset the original primary hubloc if it is being seized
if($seize) {
$r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
dbesc($channel['channel_hash']),
dbesc(z_root())
);
}
// create a new zot6 hubloc if we have got a channel_portable_id
if($channel['channel_portable_id']) {
$r = hubloc_store_lowlevel(
[
'hubloc_guid' => $channel['channel_guid'],
'hubloc_guid_sig' => 'sha256.' . $channel['channel_guid_sig'],
'hubloc_hash' => $channel['channel_portable_id'],
'hubloc_addr' => channel_reddress($channel),
'hubloc_network' => 'zot6',
'hubloc_primary' => (($seize) ? 1 : 0),
'hubloc_url' => z_root(),
'hubloc_url_sig' => 'sha256.' . base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey'])),
'hubloc_host' => \App::get_hostname(),
'hubloc_callback' => z_root() . '/zot',
'hubloc_sitekey' => get_config('system','pubkey'),
'hubloc_updated' => datetime_convert(),
'hubloc_id_url' => channel_url($channel),
'hubloc_site_id' => Libzot::make_xchan_hash(z_root(),get_config('system','pubkey'))
]
);
// reset the original primary hubloc if it is being seized
if($seize) {
$r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
dbesc($channel['channel_portable_id']),
dbesc(z_root())
);
}
}
}
logger('import step 5');

View File

@ -166,7 +166,7 @@ class Item extends Controller {
if(! perm_is_allowed($chan['channel_id'],get_observer_hash(),'view_stream'))
http_status_exit(403, 'Forbidden');
$i = Activity::encode_item_collection($nitems,'conversation/' . $item_id,'OrderedCollection',( defined('NOMADIC') ? false : true));
$i = Activity::encode_item_collection($nitems,'conversation/' . $item_id,'OrderedCollection');
if($portable_id) {
ThreadListener::store(z_root() . '/item/' . $item_id,$portable_id);
}

View File

@ -71,29 +71,32 @@ class Photo extends \Zotlabs\Web\Controller {
$modified = filemtime($default);
$default = z_root() . '/' . $default;
$uid = $person;
$data = '';
$d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ];
call_hooks('get_profile_photo',$d);
$resolution = $d['imgscale'];
$uid = $d['channel_id'];
$default = $d['default'];
$data = $d['data'];
$mimetype = $d['mimetype'];
$r = q("SELECT * FROM photo WHERE imgscale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
intval($resolution),
intval($uid),
intval(PHOTO_PROFILE)
);
if($r) {
$modified = strtotime($r[0]['edited'] . "Z");
$mimetype = $r[0]['mimetype'];
if(intval($r[0]['os_storage']))
$data = file_get_contents($data);
else
$data = dbunescbin($r[0]['content']);
}
if(! $data) {
$r = q("SELECT * FROM photo WHERE imgscale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
intval($resolution),
intval($uid),
intval(PHOTO_PROFILE)
);
if($r) {
$modified = strtotime($r[0]['edited'] . "Z");
$data = dbunescbin($r[0]['content']);
$mimetype = $r[0]['mimetype'];
}
if(intval($r[0]['os_storage']))
$data = file_get_contents($data);
$d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ];
call_hooks('get_profile_photo',$d);
$resolution = $d['imgscale'];
$uid = $d['channel_id'];
$default = $d['default'];
$data = $d['data'];
$mimetype = $d['mimetype'];
}
if(! $data) {

View File

@ -33,7 +33,7 @@ class Subthread extends \Zotlabs\Web\Controller {
if(! $i) {
$i = q("select * from item where id = %d and uid = %d",
intval($postid),
intval($item_id),
intval($sys['channel_id'])
);

View File

@ -69,7 +69,7 @@ class Tagger extends \Zotlabs\Web\Controller {
$post_type = t('photo');
break;
case 'event':
$targgettype = ACTIVITY_OBJ_EVENT;
$targettype = ACTIVITY_OBJ_EVENT;
$post_type = t('event');
break;
default:

View File

@ -2,6 +2,8 @@
namespace Zotlabs\Widget;
use Zotlabs\Lib\Apps;
require_once('include/socgraph.php');
@ -9,9 +11,9 @@ class Suggestions {
function widget($arr) {
if((! local_channel()) || (! feature_enabled(local_channel(),'suggest')))
return '';
if((! local_channel()) || (! Apps::system_app_installed(local_channel(), 'Suggest Channels')))
return EMPTY_STR;
$r = suggestion_query(local_channel(),get_observer_hash(),0,20);

View File

@ -50,7 +50,7 @@ require_once('include/attach.php');
require_once('include/bbcode.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '4.0.1' );
define ( 'STD_VERSION', '4.0.2' );
define ( 'ZOT_REVISION', '6.0a' );
define ( 'DB_UPDATE_VERSION', 1231 );

View File

@ -360,14 +360,6 @@ function get_features($filtered = true, $level = (-1)) {
get_config('feature_lock','personal_tab')
],
[
'suggest',
t('Suggest Channels'),
t('Show friend and connection suggestions'),
false,
get_config('feature_lock','suggest')
],
[
'network_list_mode',
t('Use blog/list mode'),

View File

@ -311,7 +311,9 @@ function z6_discover() {
// find unregistered zot6 clone hublocs
$c = q("select channel_hash, portable_id from channel where channel_deleted = 0");
$c = q("select channel_hash, channel_portable_id from channel where channel_deleted = '%s'",
dbesc(NULL_DATE)
);
if ($c) {
foreach ($c as $entry) {
$q1 = q("select * from hubloc left join site on hubloc_url = site_url where hubloc_deleted = 0 and site_dead = 0 and hubloc_hash = '%s' and hubloc_url != '%s'",
@ -325,19 +327,19 @@ function z6_discover() {
// does this particular server have a zot6 clone registered on our site for this channel?
foreach ($q1 as $q) {
$q2 = q("select * from hubloc left join site on hubloc_url = site_url where hubloc_deleted = 0 and site_dead = 0 and hubloc_hash = '%s' and hubloc_url = '%s'",
dbesc($entry['portable_id']),
dbesc($entry['channel_portable_id']),
dbesc($q['hubloc_url'])
);
if ($q2) {
continue;
}
// zot6 hubloc not found.
if(strpos($entry['site_project'],'hubzilla') !== false && version_compare($entry['site_version'],'4.0') >= 0) {
if(strpos($q['site_project'],'hubzilla') !== false && version_compare($q['site_version'],'4.0') >= 0) {
// probe and store results - only for zot6 (over-ride the zot default)
discover_by_webbie($entry['hubloc_addr'],'zot6');
discover_by_webbie($q['hubloc_addr'],'zot6');
}
}
}
}
}
}

View File

@ -1155,6 +1155,9 @@ function sync_files($channel, $files) {
require_once('include/attach.php');
if($channel && $files) {
$limit = service_class_fetch($channel['channel_id'], 'attach_upload_limit');
foreach($files as $f) {
if(! $f)
continue;
@ -1275,6 +1278,17 @@ function sync_files($channel, $files) {
}
else {
logger('sync_files attach does not exists: ' . print_r($att,true), LOGGER_DEBUG);
if($limit !== false) {
$r = q("select sum(filesize) as total from attach where aid = %d ",
intval($channel['channel_account_id'])
);
if(($r) && (($r[0]['total'] + $att['filesize']) > $limit)) {
logger('service class limit exceeded');
continue;
}
}
create_table_from_array('attach',$att);
}

View File

@ -1930,11 +1930,21 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
if($parent_deleted)
$arr['item_deleted'] = 1;
$r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d and revision = %d LIMIT 1",
dbesc($arr['mid']),
intval($arr['uid']),
intval($arr['revision'])
);
if($arr['uuid']) {
$r = q("SELECT id FROM item WHERE uuid = '%s' AND uid = %d and revision = %d LIMIT 1",
dbesc($arr['uuid']),
intval($arr['uid']),
intval($arr['revision'])
);
}
else {
$r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d and revision = %d LIMIT 1",
dbesc($arr['mid']),
intval($arr['uid']),
intval($arr['revision'])
);
}
if($r) {
logger('duplicate item ignored. ' . print_r($arr,true));
$ret['message'] = 'duplicate post.';

View File

@ -220,8 +220,8 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
foreach($images as $image) {
if(! stristr($image,z_root() . '/photo/'))
continue;
$image_uri = substr($image,strrpos($image,'/') + 1);
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
$image_uri = substr($image, strrpos($image, '/') + 1);
$image_uri = substr($image_uri, 0, strpos($image_uri, '.') - 2);
$r = q("UPDATE photo SET allow_cid = '%s' WHERE resource_id = '%s' AND uid = %d and allow_cid = '%s'",
dbesc('<' . $recipient . '>'),
dbesc($image_uri),

View File

@ -192,7 +192,7 @@ function get_all_perms($uid, $observer_xchan, $check_siteblock = true, $default_
// They are in your address book, but haven't been approved
if($channel_perm & PERMS_PENDING) {
if($channel_perm & PERMS_PENDING && (! intval($x[0]['abook_pseudo']))) {
$ret[$perm_name] = true;
continue;
}
@ -316,6 +316,7 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
if(! $x) {
// not in address book and no guest token, see if they've got an xchan
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
dbesc($observer_xchan)
);
@ -327,7 +328,6 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
}
$abperms = load_abconfig($uid,$observer_xchan,'my_perms');
}
// system is blocked to anybody who is not authenticated
@ -382,7 +382,7 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
// They are in your address book, but haven't been approved
if($channel_perm & PERMS_PENDING) {
if($channel_perm & PERMS_PENDING && (! intval($x[0]['abook_pseudo']))) {
return true;
}

View File

@ -0,0 +1,20 @@
Copyright (c) 2015 Adam Shaw
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 Adam Shaw
Copyright (c) 2019 Adam Shaw
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
businessHours: true, // display business hours
editable: true,
events: [
{
title: 'Business Lunch',
start: '2019-04-03T13:00:00',
constraint: 'businessHours'
},
{
title: 'Meeting',
start: '2019-04-13T11:00:00',
constraint: 'availableForMeeting', // defined below
color: '#257e4a'
},
{
title: 'Conference',
start: '2019-04-18',
end: '2019-04-20'
},
{
title: 'Party',
start: '2019-04-29T20:00:00'
},
// areas where "Meeting" must be dropped
{
groupId: 'availableForMeeting',
start: '2019-04-11T10:00:00',
end: '2019-04-11T16:00:00',
rendering: 'background'
},
{
groupId: 'availableForMeeting',
start: '2019-04-13T10:00:00',
end: '2019-04-13T16:00:00',
rendering: 'background'
},
// red areas where no events can be dropped
{
start: '2019-04-24',
end: '2019-04-28',
overlap: false,
rendering: 'background',
color: '#ff9f89'
},
{
start: '2019-04-06',
end: '2019-04-08',
overlap: false,
rendering: 'background',
color: '#ff9f89'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid' ],
header: {
left: 'prevYear,prev,next,nextYear today',
center: 'title',
right: 'dayGridMonth,dayGridWeek,dayGridDay'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid' ],
defaultDate: '2019-04-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var srcCalendarEl = document.getElementById('source-calendar');
var destCalendarEl = document.getElementById('destination-calendar');
var srcCalendar = new FullCalendar.Calendar(srcCalendarEl, {
plugins: [ 'interaction', 'dayGrid' ],
editable: true,
defaultDate: '2019-04-12',
events: [
{
title: 'event1',
start: '2019-04-11T10:00:00',
end: '2019-04-11T16:00:00'
},
{
title: 'event2',
start: '2019-04-13T10:00:00',
end: '2019-04-13T16:00:00'
}
],
eventLeave: function(info) {
console.log('event left!', info.event);
}
});
var destCalendar = new FullCalendar.Calendar(destCalendarEl, {
plugins: [ 'interaction', 'dayGrid' ],
defaultDate: '2019-04-12',
editable: true,
droppable: true, // will let it receive events!
eventReceive: function(info) {
console.log('event received!', info.event);
}
});
srcCalendar.render();
destCalendar.render();
});
</script>
<style>
body {
margin: 20px 0 0 20px;
font-size: 14px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#source-calendar,
#destination-calendar {
float: left;
width: 600px;
margin: 0 20px 20px 0;
}
</style>
</head>
<body>
<div id='source-calendar'></div>
<div id='destination-calendar'></div>
</body>
</html>

View File

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var Calendar = FullCalendar.Calendar;
var Draggable = FullCalendarInteraction.Draggable
/* initialize the external events
-----------------------------------------------------------------*/
var containerEl = document.getElementById('external-events-list');
new Draggable(containerEl, {
itemSelector: '.fc-event',
eventData: function(eventEl) {
return {
title: eventEl.innerText.trim()
}
}
});
//// the individual way to do it
// var containerEl = document.getElementById('external-events-list');
// var eventEls = Array.prototype.slice.call(
// containerEl.querySelectorAll('.fc-event')
// );
// eventEls.forEach(function(eventEl) {
// new Draggable(eventEl, {
// eventData: {
// title: eventEl.innerText.trim(),
// }
// });
// });
/* initialize the calendar
-----------------------------------------------------------------*/
var calendarEl = document.getElementById('calendar');
var calendar = new Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
editable: true,
droppable: true, // this allows things to be dropped onto the calendar
drop: function(arg) {
// is the "remove after drop" checkbox checked?
if (document.getElementById('drop-remove').checked) {
// if so, remove the element from the "Draggable Events" list
arg.draggedEl.parentNode.removeChild(arg.draggedEl);
}
}
});
calendar.render();
});
</script>
<style>
body {
margin-top: 40px;
font-size: 14px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#wrap {
width: 1100px;
margin: 0 auto;
}
#external-events {
float: left;
width: 150px;
padding: 0 10px;
border: 1px solid #ccc;
background: #eee;
text-align: left;
}
#external-events h4 {
font-size: 16px;
margin-top: 0;
padding-top: 1em;
}
#external-events .fc-event {
margin: 10px 0;
cursor: pointer;
}
#external-events p {
margin: 1.5em 0;
font-size: 11px;
color: #666;
}
#external-events p input {
margin: 0;
vertical-align: middle;
}
#calendar {
float: right;
width: 900px;
}
</style>
</head>
<body>
<div id='wrap'>
<div id='external-events'>
<h4>Draggable Events</h4>
<div id='external-events-list'>
<div class='fc-event'>My Event 1</div>
<div class='fc-event'>My Event 2</div>
<div class='fc-event'>My Event 3</div>
<div class='fc-event'>My Event 4</div>
<div class='fc-event'>My Event 5</div>
</div>
<p>
<input type='checkbox' id='drop-remove' />
<label for='drop-remove'>remove after drop</label>
</p>
</div>
<div id='calendar'></div>
<div style='clear:both'></div>
</div>
</body>
</html>

View File

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
height: 'parent',
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
defaultView: 'dayGridMonth',
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01',
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
html, body {
overflow: hidden; /* don't do scrollbars */
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fc-header-toolbar {
/*
the calendar will be butting up against the edges,
but let's scoot in the header's buttons
*/
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
}
</style>
</head>
<body>
<div id='calendar-container'>
<div id='calendar'></div>
</div>
</body>
</html>

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script src='../packages/google-calendar/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'list', 'googleCalendar' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,listYear'
},
displayEventTime: false, // don't show the time column in list view
// THIS KEY WON'T WORK IN PRODUCTION!!!
// To make your own Google API key, follow the directions here:
// http://fullcalendar.io/docs/google_calendar/
googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE',
// US Holidays
events: 'en.usa#holiday@group.v.calendar.google.com',
eventClick: function(arg) {
// opens events in a popup window
window.open(arg.event.url, 'google-calendar-event', 'width=700,height=600');
arg.jsEvent.preventDefault() // don't navigate in main tab
},
loading: function(bool) {
document.getElementById('loading').style.display =
bool ? 'block' : 'none';
}
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='loading'>loading...</div>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,141 @@
function initThemeChooser(settings) {
var isInitialized = false;
var currentThemeSystem; // don't set this directly. use setThemeSystem
var currentStylesheetEl;
var loadingEl = document.getElementById('loading');
var systemSelectEl = document.querySelector('#theme-system-selector select');
var themeSelectWrapEls = Array.prototype.slice.call( // convert to real array
document.querySelectorAll('.selector[data-theme-system]')
);
systemSelectEl.addEventListener('change', function() {
setThemeSystem(this.value);
});
setThemeSystem(systemSelectEl.value);
themeSelectWrapEls.forEach(function(themeSelectWrapEl) {
var themeSelectEl = themeSelectWrapEl.querySelector('select');
themeSelectWrapEl.addEventListener('change', function() {
setTheme(
currentThemeSystem,
themeSelectEl.options[themeSelectEl.selectedIndex].value
);
});
});
function setThemeSystem(themeSystem) {
var selectedTheme;
currentThemeSystem = themeSystem;
themeSelectWrapEls.forEach(function(themeSelectWrapEl) {
var themeSelectEl = themeSelectWrapEl.querySelector('select');
if (themeSelectWrapEl.getAttribute('data-theme-system') === themeSystem) {
selectedTheme = themeSelectEl.options[themeSelectEl.selectedIndex].value;
themeSelectWrapEl.style.display = 'inline-block';
} else {
themeSelectWrapEl.style.display = 'none';
}
});
setTheme(themeSystem, selectedTheme);
}
function setTheme(themeSystem, themeName) {
var stylesheetUrl = generateStylesheetUrl(themeSystem, themeName);
var stylesheetEl;
function done() {
if (!isInitialized) {
isInitialized = true;
settings.init(themeSystem);
}
else {
settings.change(themeSystem);
}
showCredits(themeSystem, themeName);
}
if (stylesheetUrl) {
stylesheetEl = document.createElement('link');
stylesheetEl.setAttribute('rel', 'stylesheet');
stylesheetEl.setAttribute('href', stylesheetUrl);
document.querySelector('head').appendChild(stylesheetEl);
loadingEl.style.display = 'inline';
whenStylesheetLoaded(stylesheetEl, function() {
if (currentStylesheetEl) {
currentStylesheetEl.parentNode.removeChild(currentStylesheetEl);
}
currentStylesheetEl = stylesheetEl;
loadingEl.style.display = 'none';
done();
});
} else {
if (currentStylesheetEl) {
currentStylesheetEl.parentNode.removeChild(currentStylesheetEl);
currentStylesheetEl = null
}
done();
}
}
function generateStylesheetUrl(themeSystem, themeName) {
if (themeSystem === 'bootstrap') {
if (themeName) {
return 'https://bootswatch.com/4/' + themeName + '/bootstrap.min.css';
}
else { // the default bootstrap theme
return 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css';
}
}
}
function showCredits(themeSystem, themeName) {
var creditId;
if (themeSystem.match('bootstrap')) {
if (themeName) {
creditId = 'bootstrap-custom';
}
else {
creditId = 'bootstrap-standard';
}
}
Array.prototype.slice.call( // convert to real array
document.querySelectorAll('.credits')
).forEach(function(creditEl) {
if (creditEl.getAttribute('data-credit-id') === creditId) {
creditEl.style.display = 'block';
} else {
creditEl.style.display = 'none';
}
})
}
function whenStylesheetLoaded(linkNode, callback) {
var isReady = false;
function ready() {
if (!isReady) { // avoid double-call
isReady = true;
callback();
}
}
linkNode.onload = ready; // does not work cross-browser
setTimeout(ready, 2000); // max wait. also handles browsers that don't support onload
}
}

View File

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
defaultDate: '2019-04-12',
editable: true,
navLinks: true, // can click day/week names to navigate views
eventLimit: true, // allow "more" link when too many events
events: {
url: 'php/get-events.php',
failure: function() {
document.getElementById('script-warning').style.display = 'block'
}
},
loading: function(bool) {
document.getElementById('loading').style.display =
bool ? 'block' : 'none';
}
});
calendar.render();
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#script-warning {
display: none;
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: red;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='script-warning'>
<code>php/get-events.php</code> must be running.
</div>
<div id='loading'>loading...</div>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,56 @@
[
{
"title": "All Day Event",
"start": "2019-04-01"
},
{
"title": "Long Event",
"start": "2019-04-07",
"end": "2019-04-10"
},
{
"id": "999",
"title": "Repeating Event",
"start": "2019-04-09T16:00:00-05:00"
},
{
"id": "999",
"title": "Repeating Event",
"start": "2019-04-16T16:00:00-05:00"
},
{
"title": "Conference",
"start": "2019-04-11",
"end": "2019-04-13"
},
{
"title": "Meeting",
"start": "2019-04-12T10:30:00-05:00",
"end": "2019-04-12T12:30:00-05:00"
},
{
"title": "Lunch",
"start": "2019-04-12T12:00:00-05:00"
},
{
"title": "Meeting",
"start": "2019-04-12T14:30:00-05:00"
},
{
"title": "Happy Hour",
"start": "2019-04-12T17:30:00-05:00"
},
{
"title": "Dinner",
"start": "2019-04-12T20:00:00"
},
{
"title": "Birthday Party",
"start": "2019-04-13T07:00:00-05:00"
},
{
"title": "Click for Google",
"url": "http://google.com/",
"start": "2019-04-28"
}
]

View File

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'listDay,listWeek,dayGridMonth'
},
// customize the button names,
// otherwise they'd all just say "list"
views: {
listDay: { buttonText: 'list day' },
listWeek: { buttonText: 'list week' }
},
defaultView: 'listWeek',
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/core/locales-all.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var initialLocaleCode = 'en';
var localeSelectorEl = document.getElementById('locale-selector');
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
defaultDate: '2019-04-12',
locale: initialLocaleCode,
buttonIcons: false, // show the prev/next text
weekNumbers: true,
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
// build the locale selector's options
calendar.getAvailableLocaleCodes().forEach(function(localeCode) {
var optionEl = document.createElement('option');
optionEl.value = localeCode;
optionEl.selected = localeCode == initialLocaleCode;
optionEl.innerText = localeCode;
localeSelectorEl.appendChild(optionEl);
});
// when the selected option changes, dynamically change the calendar option
localeSelectorEl.addEventListener('change', function() {
if (this.value) {
calendar.setOption('locale', this.value);
}
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
}
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='top'>
Locales:
<select id='locale-selector'></select>
</div>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,50 @@
<?php
//--------------------------------------------------------------------------------------------------
// This script reads event data from a JSON file and outputs those events which are within the range
// supplied by the "start" and "end" GET parameters.
//
// An optional "timeZone" GET parameter will force all ISO8601 date stings to a given timeZone.
//
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------
// Require our Event class and datetime utilities
require dirname(__FILE__) . '/utils.php';
// Short-circuit if the client did not give us a date range.
if (!isset($_GET['start']) || !isset($_GET['end'])) {
die("Please provide a date range.");
}
// Parse the start/end parameters.
// These are assumed to be ISO8601 strings with no time nor timeZone, like "2013-12-29".
// Since no timeZone will be present, they will parsed as UTC.
$range_start = parseDateTime($_GET['start']);
$range_end = parseDateTime($_GET['end']);
// Parse the timeZone parameter if it is present.
$timeZone = null;
if (isset($_GET['timeZone'])) {
$timeZone = new DateTimeZone($_GET['timeZone']);
}
// Read and parse our events JSON file into an array of event data arrays.
$json = file_get_contents(dirname(__FILE__) . '/../json/events.json');
$input_arrays = json_decode($json, true);
// Accumulate an output array of event data arrays.
$output_arrays = array();
foreach ($input_arrays as $array) {
// Convert the input array into a useful Event object
$event = new Event($array, $timeZone);
// If the event is in-bounds, add it to the output
if ($event->isWithinDayRange($range_start, $range_end)) {
$output_arrays[] = $event->toArray();
}
}
// Send JSON to the client.
echo json_encode($output_arrays);

View File

@ -0,0 +1,9 @@
<?php
//--------------------------------------------------------------------------------------------------
// This script outputs a JSON array of all timezones (like "America/Chicago") that PHP supports.
//
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------
echo json_encode(DateTimeZone::listIdentifiers());

View File

@ -0,0 +1,130 @@
<?php
//--------------------------------------------------------------------------------------------------
// Utilities for our event-fetching scripts.
//
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------
// PHP will fatal error if we attempt to use the DateTime class without this being set.
date_default_timezone_set('UTC');
class Event {
// Tests whether the given ISO8601 string has a time-of-day or not
const ALL_DAY_REGEX = '/^\d{4}-\d\d-\d\d$/'; // matches strings like "2013-12-29"
public $title;
public $allDay; // a boolean
public $start; // a DateTime
public $end; // a DateTime, or null
public $properties = array(); // an array of other misc properties
// Constructs an Event object from the given array of key=>values.
// You can optionally force the timeZone of the parsed dates.
public function __construct($array, $timeZone=null) {
$this->title = $array['title'];
if (isset($array['allDay'])) {
// allDay has been explicitly specified
$this->allDay = (bool)$array['allDay'];
}
else {
// Guess allDay based off of ISO8601 date strings
$this->allDay = preg_match(self::ALL_DAY_REGEX, $array['start']) &&
(!isset($array['end']) || preg_match(self::ALL_DAY_REGEX, $array['end']));
}
if ($this->allDay) {
// If dates are allDay, we want to parse them in UTC to avoid DST issues.
$timeZone = null;
}
// Parse dates
$this->start = parseDateTime($array['start'], $timeZone);
$this->end = isset($array['end']) ? parseDateTime($array['end'], $timeZone) : null;
// Record misc properties
foreach ($array as $name => $value) {
if (!in_array($name, array('title', 'allDay', 'start', 'end'))) {
$this->properties[$name] = $value;
}
}
}
// Returns whether the date range of our event intersects with the given all-day range.
// $rangeStart and $rangeEnd are assumed to be dates in UTC with 00:00:00 time.
public function isWithinDayRange($rangeStart, $rangeEnd) {
// Normalize our event's dates for comparison with the all-day range.
$eventStart = stripTime($this->start);
if (isset($this->end)) {
$eventEnd = stripTime($this->end); // normalize
}
else {
$eventEnd = $eventStart; // consider this a zero-duration event
}
// Check if the two whole-day ranges intersect.
return $eventStart < $rangeEnd && $eventEnd >= $rangeStart;
}
// Converts this Event object back to a plain data array, to be used for generating JSON
public function toArray() {
// Start with the misc properties (don't worry, PHP won't affect the original array)
$array = $this->properties;
$array['title'] = $this->title;
// Figure out the date format. This essentially encodes allDay into the date string.
if ($this->allDay) {
$format = 'Y-m-d'; // output like "2013-12-29"
}
else {
$format = 'c'; // full ISO8601 output, like "2013-12-29T09:00:00+08:00"
}
// Serialize dates into strings
$array['start'] = $this->start->format($format);
if (isset($this->end)) {
$array['end'] = $this->end->format($format);
}
return $array;
}
}
// Date Utilities
//----------------------------------------------------------------------------------------------
// Parses a string into a DateTime object, optionally forced into the given timeZone.
function parseDateTime($string, $timeZone=null) {
$date = new DateTime(
$string,
$timeZone ? $timeZone : new DateTimeZone('UTC')
// Used only when the string is ambiguous.
// Ignored if string has a timeZone offset in it.
);
if ($timeZone) {
// If our timeZone was ignored above, force it.
$date->setTimezone($timeZone);
}
return $date;
}
// Takes the year/month/date values of the given DateTime and converts them to a new DateTime,
// but in UTC.
function stripTime($datetime) {
return new DateTime($datetime->format('Y-m-d'));
}

View File

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../vendor/rrule.js'></script>
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script src='../packages/rrule/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list', 'rrule' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
defaultDate: '2019-04-12',
editable: true,
events: [
{
title: 'rrule event',
rrule: {
dtstart: '2019-04-09T13:00:00',
// until: '2019-04-01',
freq: 'weekly'
},
duration: '02:00'
}
],
eventClick: function(arg) {
if (confirm('delete event?')) {
arg.event.remove()
}
}
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,125 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectMirror: true,
select: function(arg) {
var title = prompt('Event Title:');
if (title) {
calendar.addEvent({
title: title,
start: arg.start,
end: arg.end,
allDay: arg.allDay
})
}
calendar.unselect()
},
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,215 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='https://use.fontawesome.com/releases/v5.0.6/css/all.css' rel='stylesheet'>
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/bootstrap/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/bootstrap/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script src='js/theme-chooser.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar;
initThemeChooser({
init: function(themeSystem) {
calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'bootstrap', 'interaction', 'dayGrid', 'timeGrid', 'list' ],
themeSystem: themeSystem,
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
defaultDate: '2019-04-12',
weekNumbers: true,
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
},
change: function(themeSystem) {
calendar.setOption('themeSystem', themeSystem);
}
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-size: 14px;
}
#top,
#calendar.fc-unthemed {
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
color: #000;
}
#top .selector {
display: inline-block;
margin-right: 10px;
}
#top select {
font: inherit; /* mock what Boostrap does, don't compete */
}
.left { float: left }
.right { float: right }
.clear { clear: both }
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='top'>
<div class='left'>
<div id='theme-system-selector' class='selector'>
Theme System:
<select>
<option value='bootstrap' selected>Bootstrap 4</option>
<option value='standard'>unthemed</option>
</select>
</div>
<div data-theme-system="bootstrap" class='selector' style='display:none'>
Theme Name:
<select>
<option value='' selected>Default</option>
<option value='cerulean'>Cerulean</option>
<option value='cosmo'>Cosmo</option>
<option value='cyborg'>Cyborg</option>
<option value='darkly'>Darkly</option>
<option value='flatly'>Flatly</option>
<option value='journal'>Journal</option>
<option value='litera'>Litera</option>
<option value='lumen'>Lumen</option>
<option value='lux'>Lux</option>
<option value='materia'>Materia</option>
<option value='minty'>Minty</option>
<option value='pulse'>Pulse</option>
<option value='sandstone'>Sandstone</option>
<option value='simplex'>Simplex</option>
<option value='sketchy'>Sketchy</option>
<option value='slate'>Slate</option>
<option value='solar'>Solar</option>
<option value='spacelab'>Spacelab</option>
<option value='superhero'>Superhero</option>
<option value='united'>United</option>
<option value='yeti'>Yeti</option>
</select>
</div>
<span id='loading' style='display:none'>loading theme...</span>
</div>
<div class='right'>
<span class='credits' data-credit-id='bootstrap-standard' style='display:none'>
<a href='https://getbootstrap.com/docs/3.3/' target='_blank'>Theme by Bootstrap</a>
</span>
<span class='credits' data-credit-id='bootstrap-custom' style='display:none'>
<a href='https://bootswatch.com/' target='_blank'>Theme by Bootswatch</a>
</span>
</div>
<div class='clear'></div>
</div>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var initialTimeZone = 'local';
var timeZoneSelectorEl = document.getElementById('time-zone-selector');
var loadingEl = document.getElementById('loading');
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
timeZone: initialTimeZone,
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
eventLimit: true, // allow "more" link when too many events
events: {
url: 'php/get-events.php',
failure: function() {
document.getElementById('script-warning').style.display = 'inline'; // show
}
},
loading: function(bool) {
if (bool) {
loadingEl.style.display = 'inline'; // show
} else {
loadingEl.style.display = 'none'; // hide
}
},
eventTimeFormat: { hour: 'numeric', minute: '2-digit', timeZoneName: 'short' },
dateClick: function(arg) {
console.log('dateClick', calendar.formatIso(arg.date));
},
select: function(arg) {
console.log('select', calendar.formatIso(arg.start), calendar.formatIso(arg.end));
}
});
calendar.render();
// load the list of available timezones, build the <select> options
// it's HIGHLY recommended to use a different library for network requests, not this internal util func
FullCalendar.requestJson('GET', 'php/get-time-zones.php', {}, function(timeZones) {
timeZones.forEach(function(timeZone) {
var optionEl;
if (timeZone !== 'UTC') { // UTC is already in the list
optionEl = document.createElement('option');
optionEl.value = timeZone;
optionEl.innerText = timeZone;
timeZoneSelectorEl.appendChild(optionEl);
}
});
}, function() {
// TODO: handle error
});
// when the timezone selector changes, dynamically change the calendar option
timeZoneSelectorEl.addEventListener('change', function() {
calendar.setOption('timeZone', this.value);
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
}
.left { float: left }
.right { float: right }
.clear { clear: both }
#script-warning, #loading { display: none }
#script-warning { font-weight: bold; color: red }
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
.tzo {
color: #000;
}
</style>
</head>
<body>
<div id='top'>
<div class='left'>
Timezone:
<select id='time-zone-selector'>
<option value='local' selected>local</option>
<option value='UTC'>UTC</option>
</select>
</div>
<div class='right'>
<span id='loading'>loading...</span>
<span id='script-warning'><code>php/get-events.php</code> must be running.</span>
</div>
<div class='clear'></div>
</div>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'dayGrid', 'timeGrid', 'list', 'interaction' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01',
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages/core/main.css' rel='stylesheet' />
<link href='../packages/daygrid/main.css' rel='stylesheet' />
<link href='../packages/timegrid/main.css' rel='stylesheet' />
<link href='../packages/list/main.css' rel='stylesheet' />
<script src='../packages/core/main.js'></script>
<script src='../packages/interaction/main.js'></script>
<script src='../packages/daygrid/main.js'></script>
<script src='../packages/timegrid/main.js'></script>
<script src='../packages/list/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
defaultDate: '2019-04-12',
navLinks: true, // can click day/week names to navigate views
weekNumbers: true,
weekNumbersWithinDays: true,
weekNumberCalculation: 'ISO',
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2019-04-01'
},
{
title: 'Long Event',
start: '2019-04-07',
end: '2019-04-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2019-04-16T16:00:00'
},
{
title: 'Conference',
start: '2019-04-11',
end: '2019-04-13'
},
{
title: 'Meeting',
start: '2019-04-12T10:30:00',
end: '2019-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2019-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2019-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2019-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2019-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2019-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2019-04-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View File

@ -0,0 +1,33 @@
/*!
FullCalendar Bootstrap Plugin v4.0.2
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/
.fc.fc-bootstrap a {
text-decoration: none; }
.fc.fc-bootstrap a[data-goto]:hover {
text-decoration: underline; }
.fc-bootstrap hr.fc-divider {
border-color: inherit; }
.fc-bootstrap .fc-today.alert {
border-radius: 0; }
.fc-bootstrap a.fc-event:not([href]):not([tabindex]) {
color: #fff; }
.fc-bootstrap .fc-popover.card {
position: absolute; }
/* Popover
--------------------------------------------------------------------------------------------------*/
.fc-bootstrap .fc-popover .card-body {
padding: 0; }
/* TimeGrid Slats (lines that run horizontally)
--------------------------------------------------------------------------------------------------*/
.fc-bootstrap .fc-time-grid .fc-slats table {
/* some themes have background color. see through to slats */
background: none; }

View File

@ -0,0 +1,90 @@
/*!
FullCalendar Bootstrap Plugin v4.0.2
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/core')) :
typeof define === 'function' && define.amd ? define(['exports', '@fullcalendar/core'], factory) :
(global = global || self, factory(global.FullCalendarBootstrap = {}, global.FullCalendar));
}(this, function (exports, core) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var BootstrapTheme = /** @class */ (function (_super) {
__extends(BootstrapTheme, _super);
function BootstrapTheme() {
return _super !== null && _super.apply(this, arguments) || this;
}
return BootstrapTheme;
}(core.Theme));
BootstrapTheme.prototype.classes = {
widget: 'fc-bootstrap',
tableGrid: 'table-bordered',
tableList: 'table',
tableListHeading: 'table-active',
buttonGroup: 'btn-group',
button: 'btn btn-primary',
buttonActive: 'active',
today: 'alert alert-info',
popover: 'card card-primary',
popoverHeader: 'card-header',
popoverContent: 'card-body',
// day grid
// for left/right border color when border is inset from edges (all-day in timeGrid view)
// avoid `table` class b/c don't want margins/padding/structure. only border color.
headerRow: 'table-bordered',
dayRow: 'table-bordered',
// list view
listView: 'card card-primary'
};
BootstrapTheme.prototype.baseIconClass = 'fa';
BootstrapTheme.prototype.iconClasses = {
close: 'fa-times',
prev: 'fa-chevron-left',
next: 'fa-chevron-right',
prevYear: 'fa-angle-double-left',
nextYear: 'fa-angle-double-right'
};
BootstrapTheme.prototype.iconOverrideOption = 'bootstrapFontAwesome';
BootstrapTheme.prototype.iconOverrideCustomButtonOption = 'bootstrapFontAwesome';
BootstrapTheme.prototype.iconOverridePrefix = 'fa-';
var main = core.createPlugin({
themeClasses: {
bootstrap: BootstrapTheme
}
});
exports.BootstrapTheme = BootstrapTheme;
exports.default = main;
Object.defineProperty(exports, '__esModule', { value: true });
}));

View File

@ -0,0 +1,5 @@
/*!
FullCalendar Bootstrap Plugin v4.0.2
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/.fc.fc-bootstrap a{text-decoration:none}.fc.fc-bootstrap a[data-goto]:hover{text-decoration:underline}.fc-bootstrap hr.fc-divider{border-color:inherit}.fc-bootstrap .fc-today.alert{border-radius:0}.fc-bootstrap a.fc-event:not([href]):not([tabindex]){color:#fff}.fc-bootstrap .fc-popover.card{position:absolute}.fc-bootstrap .fc-popover .card-body{padding:0}.fc-bootstrap .fc-time-grid .fc-slats table{background:0 0}

View File

@ -0,0 +1,20 @@
/*!
FullCalendar Bootstrap Plugin v4.0.2
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):(e=e||self,t(e.FullCalendarBootstrap={},e.FullCalendar))}(this,function(e,t){"use strict";function o(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t.Theme);a.prototype.classes={widget:"fc-bootstrap",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},a.prototype.baseIconClass="fa",a.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},a.prototype.iconOverrideOption="bootstrapFontAwesome",a.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",a.prototype.iconOverridePrefix="fa-";var n=t.createPlugin({themeClasses:{bootstrap:a}});e.BootstrapTheme=a,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.af = factory()));
}(this, function () { 'use strict';
var af = {
code: "af",
week: {
dow: 1,
doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
},
buttonText: {
prev: "Vorige",
next: "Volgende",
today: "Vandag",
year: "Jaar",
month: "Maand",
week: "Week",
day: "Dag",
list: "Agenda"
},
allDayHtml: "Heeldag",
eventLimitText: "Addisionele",
noEventsMessage: "Daar is geen gebeurtenisse nie"
};
return af;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-dz'] = factory()));
}(this, function () { 'use strict';
var arDz = {
code: "ar-dz",
week: {
dow: 0,
doy: 4 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arDz;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-kw'] = factory()));
}(this, function () { 'use strict';
var arKw = {
code: "ar-kw",
week: {
dow: 0,
doy: 12 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arKw;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-ly'] = factory()));
}(this, function () { 'use strict';
var arLy = {
code: "ar-ly",
week: {
dow: 6,
doy: 12 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arLy;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-ma'] = factory()));
}(this, function () { 'use strict';
var arMa = {
code: "ar-ma",
week: {
dow: 6,
doy: 12 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arMa;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-sa'] = factory()));
}(this, function () { 'use strict';
var arSa = {
code: "ar-sa",
week: {
dow: 0,
doy: 6 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arSa;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['ar-tn'] = factory()));
}(this, function () { 'use strict';
var arTn = {
code: "ar-tn",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return arTn;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.ar = factory()));
}(this, function () { 'use strict';
var ar = {
code: "ar",
week: {
dow: 6,
doy: 12 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
},
weekLabel: "أسبوع",
allDayText: "اليوم كله",
eventLimitText: "أخرى",
noEventsMessage: "أي أحداث لعرض"
};
return ar;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.bg = factory()));
}(this, function () { 'use strict';
var bg = {
code: "bg",
week: {
dow: 1,
doy: 7 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "назад",
next: "напред",
today: "днес",
month: "Месец",
week: "Седмица",
day: "Ден",
list: "График"
},
allDayText: "Цял ден",
eventLimitText: function (n) {
return "+още " + n;
},
noEventsMessage: "Няма събития за показване"
};
return bg;
}));

View File

@ -0,0 +1,32 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.bs = factory()));
}(this, function () { 'use strict';
var bs = {
code: "bs",
week: {
dow: 1,
doy: 7 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "Prošli",
next: "Sljedeći",
today: "Danas",
month: "Mjesec",
week: "Sedmica",
day: "Dan",
list: "Raspored"
},
weekLabel: "Sed",
allDayText: "Cijeli dan",
eventLimitText: function (n) {
return "+ još " + n;
},
noEventsMessage: "Nema događaja za prikazivanje"
};
return bs;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.ca = factory()));
}(this, function () { 'use strict';
var ca = {
code: "ca",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Anterior",
next: "Següent",
today: "Avui",
month: "Mes",
week: "Setmana",
day: "Dia",
list: "Agenda"
},
weekLabel: "Set",
allDayText: "Tot el dia",
eventLimitText: "més",
noEventsMessage: "No hi ha esdeveniments per mostrar"
};
return ca;
}));

View File

@ -0,0 +1,32 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.cs = factory()));
}(this, function () { 'use strict';
var cs = {
code: "cs",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Dříve",
next: "Později",
today: "Nyní",
month: "Měsíc",
week: "Týden",
day: "Den",
list: "Agenda"
},
weekLabel: "Týd",
allDayText: "Celý den",
eventLimitText: function (n) {
return "+další: " + n;
},
noEventsMessage: "Žádné akce k zobrazení"
};
return cs;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.da = factory()));
}(this, function () { 'use strict';
var da = {
code: "da",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Forrige",
next: "Næste",
today: "Idag",
month: "Måned",
week: "Uge",
day: "Dag",
list: "Agenda"
},
weekLabel: "Uge",
allDayText: "Hele dagen",
eventLimitText: "flere",
noEventsMessage: "Ingen arrangementer at vise"
};
return da;
}));

View File

@ -0,0 +1,33 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.de = factory()));
}(this, function () { 'use strict';
var de = {
code: "de",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Zurück",
next: "Vor",
today: "Heute",
year: "Jahr",
month: "Monat",
week: "Woche",
day: "Tag",
list: "Terminübersicht"
},
weekLabel: "KW",
allDayText: "Ganztägig",
eventLimitText: function (n) {
return "+ weitere " + n;
},
noEventsMessage: "Keine Ereignisse anzuzeigen"
};
return de;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.el = factory()));
}(this, function () { 'use strict';
var el = {
code: "el",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4st is the first week of the year.
},
buttonText: {
prev: "Προηγούμενος",
next: "Επόμενος",
today: "Σήμερα",
month: "Μήνας",
week: "Εβδομάδα",
day: "Ημέρα",
list: "Ατζέντα"
},
weekLabel: "Εβδ",
allDayText: "Ολοήμερο",
eventLimitText: "περισσότερα",
noEventsMessage: "Δεν υπάρχουν γεγονότα για να εμφανιστεί"
};
return el;
}));

View File

@ -0,0 +1,17 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['en-au'] = factory()));
}(this, function () { 'use strict';
var enAu = {
code: "en-au",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
};
return enAu;
}));

View File

@ -0,0 +1,17 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['en-gb'] = factory()));
}(this, function () { 'use strict';
var enGb = {
code: "en-gb",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
};
return enGb;
}));

View File

@ -0,0 +1,17 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['en-nz'] = factory()));
}(this, function () { 'use strict';
var enNz = {
code: "en-nz",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
};
return enNz;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['es-us'] = factory()));
}(this, function () { 'use strict';
var esUs = {
code: "es",
week: {
dow: 0,
doy: 6 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "Ant",
next: "Sig",
today: "Hoy",
month: "Mes",
week: "Semana",
day: "Día",
list: "Agenda"
},
weekLabel: "Sm",
allDayHtml: "Todo<br/>el día",
eventLimitText: "más",
noEventsMessage: "No hay eventos para mostrar"
};
return esUs;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.es = factory()));
}(this, function () { 'use strict';
var es = {
code: "es",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Ant",
next: "Sig",
today: "Hoy",
month: "Mes",
week: "Semana",
day: "Día",
list: "Agenda"
},
weekLabel: "Sm",
allDayHtml: "Todo<br/>el día",
eventLimitText: "más",
noEventsMessage: "No hay eventos para mostrar"
};
return es;
}));

View File

@ -0,0 +1,32 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.et = factory()));
}(this, function () { 'use strict';
var et = {
code: "et",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Eelnev",
next: "Järgnev",
today: "Täna",
month: "Kuu",
week: "Nädal",
day: "Päev",
list: "Päevakord"
},
weekLabel: "näd",
allDayText: "Kogu päev",
eventLimitText: function (n) {
return "+ veel " + n;
},
noEventsMessage: "Kuvamiseks puuduvad sündmused"
};
return et;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.eu = factory()));
}(this, function () { 'use strict';
var eu = {
code: "eu",
week: {
dow: 1,
doy: 7 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "Aur",
next: "Hur",
today: "Gaur",
month: "Hilabetea",
week: "Astea",
day: "Eguna",
list: "Agenda"
},
weekLabel: "As",
allDayHtml: "Egun<br/>osoa",
eventLimitText: "gehiago",
noEventsMessage: "Ez dago ekitaldirik erakusteko"
};
return eu;
}));

View File

@ -0,0 +1,33 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.fa = factory()));
}(this, function () { 'use strict';
var fa = {
code: "fa",
week: {
dow: 6,
doy: 12 // The week that contains Jan 1st is the first week of the year.
},
dir: 'rtl',
buttonText: {
prev: "قبلی",
next: "بعدی",
today: "امروز",
month: "ماه",
week: "هفته",
day: "روز",
list: "برنامه"
},
weekLabel: "هف",
allDayText: "تمام روز",
eventLimitText: function (n) {
return "بیش از " + n;
},
noEventsMessage: "هیچ رویدادی به نمایش"
};
return fa;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.fi = factory()));
}(this, function () { 'use strict';
var fi = {
code: "fi",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Edellinen",
next: "Seuraava",
today: "Tänään",
month: "Kuukausi",
week: "Viikko",
day: "Päivä",
list: "Tapahtumat"
},
weekLabel: "Vk",
allDayText: "Koko päivä",
eventLimitText: "lisää",
noEventsMessage: "Ei näytettäviä tapahtumia"
};
return fi;
}));

View File

@ -0,0 +1,27 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['fr-ca'] = factory()));
}(this, function () { 'use strict';
var frCa = {
code: "fr",
buttonText: {
prev: "Précédent",
next: "Suivant",
today: "Aujourd'hui",
year: "Année",
month: "Mois",
week: "Semaine",
day: "Jour",
list: "Mon planning"
},
weekLabel: "Sem.",
allDayHtml: "Toute la<br/>journée",
eventLimitText: "en plus",
noEventsMessage: "Aucun événement à afficher"
};
return frCa;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales['fr-ch'] = factory()));
}(this, function () { 'use strict';
var frCh = {
code: "fr-ch",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Précédent",
next: "Suivant",
today: "Courant",
year: "Année",
month: "Mois",
week: "Semaine",
day: "Jour",
list: "Mon planning"
},
weekLabel: "Sm",
allDayHtml: "Toute la<br/>journée",
eventLimitText: "en plus",
noEventsMessage: "Aucun événement à afficher"
};
return frCh;
}));

View File

@ -0,0 +1,31 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.fr = factory()));
}(this, function () { 'use strict';
var fr = {
code: "fr",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Précédent",
next: "Suivant",
today: "Aujourd'hui",
year: "Année",
month: "Mois",
week: "Semaine",
day: "Jour",
list: "Mon planning"
},
weekLabel: "Sem.",
allDayHtml: "Toute la<br/>journée",
eventLimitText: "en plus",
noEventsMessage: "Aucun événement à afficher"
};
return fr;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.gl = factory()));
}(this, function () { 'use strict';
var gl = {
code: "gl",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "Ant",
next: "Seg",
today: "Hoxe",
month: "Mes",
week: "Semana",
day: "Día",
list: "Axenda"
},
weekLabel: "Sm",
allDayHtml: "Todo<br/>o día",
eventLimitText: "máis",
noEventsMessage: "Non hai eventos para amosar"
};
return gl;
}));

View File

@ -0,0 +1,27 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.he = factory()));
}(this, function () { 'use strict';
var he = {
code: "he",
dir: 'rtl',
buttonText: {
prev: "הקודם",
next: "הבא",
today: "היום",
month: "חודש",
week: "שבוע",
day: "יום",
list: "סדר יום"
},
allDayText: "כל היום",
eventLimitText: "אחר",
noEventsMessage: "אין אירועים להצגה",
weekLabel: "שבוע"
};
return he;
}));

View File

@ -0,0 +1,32 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.hi = factory()));
}(this, function () { 'use strict';
var hi = {
code: "hi",
week: {
dow: 0,
doy: 6 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "पिछला",
next: "अगला",
today: "आज",
month: "महीना",
week: "सप्ताह",
day: "दिन",
list: "कार्यसूची"
},
weekLabel: "हफ्ता",
allDayText: "सभी दिन",
eventLimitText: function (n) {
return "+अधिक " + n;
},
noEventsMessage: "कोई घटनाओं को प्रदर्शित करने के लिए"
};
return hi;
}));

View File

@ -0,0 +1,32 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.hr = factory()));
}(this, function () { 'use strict';
var hr = {
code: "hr",
week: {
dow: 1,
doy: 7 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "Prijašnji",
next: "Sljedeći",
today: "Danas",
month: "Mjesec",
week: "Tjedan",
day: "Dan",
list: "Raspored"
},
weekLabel: "Tje",
allDayText: "Cijeli dan",
eventLimitText: function (n) {
return "+ još " + n;
},
noEventsMessage: "Nema događaja za prikaz"
};
return hr;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.hu = factory()));
}(this, function () { 'use strict';
var hu = {
code: "hu",
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: "vissza",
next: "előre",
today: "ma",
month: "Hónap",
week: "Hét",
day: "Nap",
list: "Napló"
},
weekLabel: "Hét",
allDayText: "Egész nap",
eventLimitText: "további",
noEventsMessage: "Nincs megjeleníthető esemény"
};
return hu;
}));

View File

@ -0,0 +1,30 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (global.FullCalendarLocales = global.FullCalendarLocales || {}, global.FullCalendarLocales.id = factory()));
}(this, function () { 'use strict';
var id = {
code: "id",
week: {
dow: 1,
doy: 7 // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: "mundur",
next: "maju",
today: "hari ini",
month: "Bulan",
week: "Minggu",
day: "Hari",
list: "Agenda"
},
weekLabel: "Mg",
allDayHtml: "Sehari<br/>penuh",
eventLimitText: "lebih",
noEventsMessage: "Tidak ada acara untuk ditampilkan"
};
return id;
}));

Some files were not shown because too many files have changed in this diff Show More