1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Updated source to version 1.0, both core and addons

This commit is contained in:
Andrew Manning 2015-12-05 20:08:25 -05:00
parent ad6dc06f79
commit cc7b2efc73
136 changed files with 55026 additions and 42551 deletions

View file

@ -1,7 +1,9 @@
# YunoHost App for Hubzilla Hub # # YunoHost App for Hubzilla Hub #
Notes ## Hubzilla
-------------- [Hubzilla](http://hubzilla.org) is a powerful platform for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.
## Notes
Before installing, read the [Hubzilla installation instructions](https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt) for important information about Before installing, read the [Hubzilla installation instructions](https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt) for important information about
@ -12,5 +14,5 @@ Before installing, read the [Hubzilla installation instructions](https://github.
Current snapshot in *sources*: Current snapshot in *sources*:
* https://github.com/redmatrix/hubzilla: def5edf93ced1527155053b64d666bf1812cbbca * https://github.com/redmatrix/hubzilla: 1.0
* https://github.com/redmatrix/hubzilla-addons: 7a842e95e538e45041ac5599f693cfd757888b6f * https://github.com/redmatrix/hubzilla-addons: 1.0

View file

@ -28,3 +28,4 @@ AddType audio/ogg .oga
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA] RewriteRule ^(.*)$ index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
</IfModule> </IfModule>

View file

@ -48,6 +48,7 @@ require_once('include/AccessList.php');
define ( 'PLATFORM_NAME', 'hubzilla' ); define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H'); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H');
define ( 'STD_VERSION', '1.0' );
define ( 'ZOT_REVISION', 1 ); define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1160 ); define ( 'DB_UPDATE_VERSION', 1160 );
@ -65,10 +66,10 @@ define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
//define ( 'NULL_DATE', '0000-00-00 00:00:00' ); //define ( 'NULL_DATE', '0000-00-00 00:00:00' );
define ( 'TEMPLATE_BUILD_PATH', 'store/[data]/smarty3' ); define ( 'TEMPLATE_BUILD_PATH', 'store/[data]/smarty3' );
define ( 'DIRECTORY_MODE_NORMAL', 0x0000); // This is technically DIRECTORY_MODE_TERTIARY, but it's the default, hence 0x0000 define ( 'DIRECTORY_MODE_NORMAL', 0x0000); // A directory client
define ( 'DIRECTORY_MODE_PRIMARY', 0x0001); define ( 'DIRECTORY_MODE_PRIMARY', 0x0001); // There can only be *one* primary directory server in a directory_realm.
define ( 'DIRECTORY_MODE_SECONDARY', 0x0002); define ( 'DIRECTORY_MODE_SECONDARY', 0x0002); // All other mirror directory servers
define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); // A detached (off the grid) hub with itself as directory server.
// We will look for upstream directories whenever me make contact // We will look for upstream directories whenever me make contact
// with other sites, but if this is a new installation and isn't // with other sites, but if this is a new installation and isn't
@ -83,6 +84,7 @@ $DIRECTORY_FALLBACK_SERVERS = array(
'https://hubzilla.site', 'https://hubzilla.site',
'https://red.zottel.red', 'https://red.zottel.red',
'https://gravizot.de', 'https://gravizot.de',
'https://blablanet.com',
'https://my.federated.social' 'https://my.federated.social'
); );
@ -422,6 +424,7 @@ define ( 'TERM_SAVEDSEARCH', 6 );
define ( 'TERM_THING', 7 ); define ( 'TERM_THING', 7 );
define ( 'TERM_BOOKMARK', 8 ); define ( 'TERM_BOOKMARK', 8 );
define ( 'TERM_HIERARCHY', 9 ); define ( 'TERM_HIERARCHY', 9 );
define ( 'TERM_COMMUNITYTAG', 10 );
define ( 'TERM_OBJ_POST', 1 ); define ( 'TERM_OBJ_POST', 1 );
define ( 'TERM_OBJ_PHOTO', 2 ); define ( 'TERM_OBJ_PHOTO', 2 );
@ -619,10 +622,10 @@ class App {
public $poi = null; // "person of interest", generally a referenced connection public $poi = null; // "person of interest", generally a referenced connection
private $oauth_key = null; // consumer_id of oauth request, if used private $oauth_key = null; // consumer_id of oauth request, if used
public $layout = array(); // Comanche parsed template public $layout = array(); // Comanche parsed template
public $pdl = null; public $pdl = null; // Comanche page description
private $perms = null; // observer permissions private $perms = null; // observer permissions
private $widgets = array(); // widgets for this page private $widgets = array(); // widgets for this page
//private $widgetlist = null; // widget ordering and inclusion directives
public $groups; public $groups;
public $language; public $language;
@ -1155,7 +1158,7 @@ function z_root() {
} }
/** /**
* @brief Return absolut URL for given $path. * @brief Return absolute URL for given $path.
* *
* @param string $path * @param string $path
* *
@ -1467,12 +1470,6 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
$tpl = get_markup_template("logout.tpl"); $tpl = get_markup_template("logout.tpl");
} }
else { else {
// There's no such thing as login_head.tpl, has never been in Red, removed from Friendica 1 Jun 2013...
// $a->page['htmlhead'] .= replace_macros(get_markup_template("login_head.tpl"), array(
// '$baseurl' => $a->get_baseurl(true)
// ));
$tpl = get_markup_template("login.tpl"); $tpl = get_markup_template("login.tpl");
if(strlen($a->query_string)) if(strlen($a->query_string))
$_SESSION['login_return_url'] = $a->query_string; $_SESSION['login_return_url'] = $a->query_string;

View file

@ -1,44 +1,59 @@
[table] [table]
[tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra
[/th][/tr] [/th][/tr]
[tr][td]xchan_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] [tr][td]xchan_hash[/td][td]calculated hash of this extended channel[/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_guid[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_guid[/td][td]channel_guid of this extended channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_guid_sig[/td][td][/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] [tr][td]xchan_guid_sig[/td][td]base64url encoded signature of the guid[/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_pubkey[/td][td][/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] [tr][td]xchan_pubkey[/td][td]public key for verifying signed data and assertions[/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_photo_mimetype[/td][td][/td][td]char(32)[/td][td]NO[/td][td][/td][td]image/jpeg[/td][td] [tr][td]xchan_photo_mimetype[/td][td]mimetype of the profile photo[/td][td]char(32)[/td][td]NO[/td][td][/td][td]image/jpeg[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_photo_l[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [tr][td]xchan_photo_l[/td][td]photo url 300px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_photo_m[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [tr][td]xchan_photo_m[/td][td]photo url 80 px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_photo_s[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [tr][td]xchan_photo_s[/td][td]photo url 48 px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_addr[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_addr[/td][td]user@host[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_url[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_url[/td][td]url of channel page on primary hub location[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_connurl[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_connurl[/td]poco url[td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_follow[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_follow[/td]url template for following %s[td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_connpage[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [tr][td]xchan_connpage[/td][td]for premium channels url of channel to display when connecting[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_name[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_name[/td][td]human readabl name of channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_network[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_network[/td][td]network of channel for instance 'zot', 'diaspora', 'unknown'[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_instance_url[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan_instance_url[/td][td]no longer used[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_flags[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [tr][td]xchan_flags[/td][td]no longer used[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_photo_date[/td][td][/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] [tr][td]xchan_photo_date[/td][td]timestamp of last photo change in GMT[/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_name_date[/td][td][/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] [tr][td]xchan_name_date[/td][td]timestamp of last name change in GMT[/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan_hidden[/td][td]flag - channel is hidden[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_orphan[/td][td]flag - channel has no known hubloc locations[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_censored[/td][td]flag - channel has been censored[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_selfcensored[/td][td]flag - channel is self censored (adult or nsfw)[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_system[/td][td]flag - this represents a system channel[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_pubforum[/td][td]flag - channel is a public forum[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xchan_deleted[/td][td]flag - channel was deleted[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[/table] [/table]
Return to [zrl=[baseurl]/help/database]database documentation[/zrl] Return to [zrl=[baseurl]/help/database]database documentation[/zrl]

View file

@ -1,11 +1,12 @@
xign - holds xchan information for channels that have been ignored in 'friend suggestions'
[table] [table]
[tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra
[/th][/tr] [/th][/tr]
[tr][td]id[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment [tr][td]id[/td][td]sequential ID[/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment
[/td][/tr] [/td][/tr]
[tr][td]uid[/td][td][/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [tr][td]uid[/td][td]local channel.channel_id[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xchan[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xchan[/td][td]xchan.xchan_hash of ignored channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[/table] [/table]

View file

@ -1,15 +1,21 @@
xlink - used to store social graph and channel ratings
[table] [table]
[tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra
[/th][/tr] [/th][/tr]
[tr][td]xlink_id[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment [tr][td]xlink_id[/td][td]sequential ID[/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment
[/td][/tr] [/td][/tr]
[tr][td]xlink_xchan[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xlink_xchan[/td][td]xchan.xchan_hash of controlling channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xlink_link[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xlink_link[/td][td]xchan.xchan_hash of link target (connection or rating)[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xlink_rating[/td][td][/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [tr][td]xlink_rating[/td][td]int rating[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xlink_updated[/td][td][/td][td]datetime[/td][td]NO[/td][td]MUL[/td][td]0000-00-00 00:00:00[/td][td] [tr][td]xlink_rating_txt[/td][td]rating text[/td][td]mediumtext[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xlink_updated[/td][td]timestamp of update in GMT[/td][td]datetime[/td][td]NO[/td][td]MUL[/td][td]0000-00-00 00:00:00[/td][td]
[tr][td]xlink_static[/td][td]0 for social graph, 1 for ratings[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
[tr][td]xlink_sig[/td][td]base64url encoded signature of rating information[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr] [/td][/tr]
[/table] [/table]

View file

@ -1,9 +1,10 @@
xprof - stores searchable public profile information on directory servers
[table] [table]
[tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra
[/th][/tr] [/th][/tr]
[tr][td]xprof_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] [tr][td]xprof_hash[/td][td]xchan.xchan_hash of this channel[/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xprof_age[/td][td][/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [tr][td]xprof_age[/td][td]current age (updated monthly)[/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr] [/td][/tr]
[tr][td]xprof_desc[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [tr][td]xprof_desc[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr] [/td][/tr]

File diff suppressed because one or more lines are too long

View file

@ -152,7 +152,10 @@ This document assumes you're an administrator.
Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery. Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery.
[b]system > openssl_conf_file[/b] [b]system > openssl_conf_file[/b]
Needed in some Windows installations to locate the openssl configuration file on the system. Needed in some Windows installations to locate the openssl configuration file on the system.
[b]system > hide_help[/b]
Don't display help documentation link in nav bar
[b]system > expire_delivery_reports[/b]
Expiration in days for delivery reports - default 30
[b]Directory config[/b] [b]Directory config[/b]
[b]Directory search defaults[/b] [b]Directory search defaults[/b]

View file

@ -0,0 +1,16 @@
[h2]logger[/h2]
Called when making an entry to the application logfile
Hook data:
array(
'filename' => name of logfile relative to application basedir. String.
'loglevel' => the log level of this log entry, if this is higher than the configured maximum loglevel
this hook will not be called. Integer.
'message' => The formatted log message, ready for logging. String.
'logged' => boolean, default is false. Set to true to prevent the normal logfile entry to be made
(e.g. if the plugin is configured to handle this aspect of the function, or if it is determined
that this log entry should not be made)
)

View file

@ -1 +1,28 @@
[h2]nav[/h2] [h2]nav[/h2]
Called when generating the main navigation bar and menu for a page
Hook data:
array(
'usermenu' => array( 'icon' => photo URL, 'name' => channel name )
'nav' => array(
'usermenu' => usermenu (photo menu) link array
(channel home, profiles, photos, cloud, chats, webapges ...)
'loginmenu' => login menu link array
'network' => grid link and grid-notify
'home' => home link and home-notify
'intros' => intros link and intros-notify
'notifications' => notifications link and notifications-notify
'messages' => PM link and PM-notify
'all_events' => events link and events notfiy
'manage' => manage channels link
'settings' => settings link
'register' => registration link
'help' => help/doc link
'apps' => apps link
'search' => search link and form
'directory' => directory link
)

View file

@ -263,6 +263,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/logged_in]logged_in[/zrl] [zrl=[baseurl]/help/hook/logged_in]logged_in[/zrl]
Called when authentication by any means has succeeeded Called when authentication by any means has succeeeded
[zrl=[baseurl]/help/hook/logger]logger[/zrl]
Called when making an entry to the application logfile
[zrl=[baseurl]/help/hook/logging_out]logging_out[/zrl] [zrl=[baseurl]/help/hook/logging_out]logging_out[/zrl]
Called when logging out Called when logging out

View file

@ -0,0 +1,5 @@
Gebruikersvoorwaarden
================
#include doc/SiteTOS.md;

29
sources/doc/roadmapv4.bb Normal file
View file

@ -0,0 +1,29 @@
[h1]Project Roadmap V4[/h1]
[h2]Hubzilla 2.0 - code name "Universal Thunder"[/h2]
[h3]Project Core Development[/h3]
Goals/Highlights:
Focus on visual website design tools, widgets, and sharing mechanisms
App organisation.
Conversion of core application to a composer format living under the namespace "Zotlabs"
Conversion of Modules to a more general purpose Controllers layout with DB/memory based
controller routing as opposed to filesystem routing.
Conversion of core Zot Protocol to a class library
Abstraction of nomadic identity so that sending/receiving to/from singleton networks to/from any clone works flawlessly - [b]provided[/b] the clone physically connected to that singleton identity is up.
[h3]Community Development[/h3]
CalDAV/CardDAV
E-Commerce
Auto Updater

View file

@ -258,6 +258,15 @@ class Item extends BaseObject {
if ($shareable) if ($shareable)
$share = array( t('Share This'), t('share')); $share = array( t('Share This'), t('share'));
$dreport = '';
$keep_reports = intval(get_config('system','expire_delivery_reports'));
if($keep_reports === 0)
$keep_reports = 30;
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
$dreport = t('Delivery Report');
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$indent .= ' shiny'; $indent .= ' shiny';
@ -277,6 +286,10 @@ class Item extends BaseObject {
$comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); $comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
$list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : ''); $list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : '');
$children = $this->get_children(); $children = $this->get_children();
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false); $has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
@ -309,7 +322,7 @@ class Item extends BaseObject {
'vwall' => t('via Wall-To-Wall:'), 'vwall' => t('via Wall-To-Wall:'),
'profile_url' => $profile_link, 'profile_url' => $profile_link,
'item_photo_menu' => item_photo_menu($item), 'item_photo_menu' => item_photo_menu($item),
'dreport' => t('Delivery Report'), 'dreport' => $dreport,
'name' => $profile_name, 'name' => $profile_name,
'thumb' => $profile_avatar, 'thumb' => $profile_avatar,
'osparkle' => $osparkle, 'osparkle' => $osparkle,
@ -333,6 +346,7 @@ class Item extends BaseObject {
'owner_photo' => $this->get_owner_photo(), 'owner_photo' => $this->get_owner_photo(),
'owner_name' => $this->get_owner_name(), 'owner_name' => $this->get_owner_name(),
'photo' => $body['photo'], 'photo' => $body['photo'],
'event' => $body['event'],
'has_tags' => $has_tags, 'has_tags' => $has_tags,
// Item toolbar buttons // Item toolbar buttons

View file

@ -382,7 +382,6 @@ require_once('include/api_auth.php');
function api_item_get_user(&$a, $item) { function api_item_get_user(&$a, $item) {
global $usercache;
// The author is our direct contact, in a conversation with us. // The author is our direct contact, in a conversation with us.
@ -396,11 +395,11 @@ require_once('include/api_auth.php');
$name = $item['author']['xchan_name']; $name = $item['author']['xchan_name'];
// Generating a random ID // Generating a random ID
if (is_null($usercache[$nick]) or !array_key_exists($nick, $usercache)) if (! $nick)
$usercache[$nick] = mt_rand(2000000, 2100000); $nick = mt_rand(2000000, 2100000);
$ret = array( $ret = array(
'id' => $usercache[$nick], 'id' => $nick,
'name' => $name, 'name' => $name,
'screen_name' => $nick, 'screen_name' => $nick,
'location' => '', //$uinfo[0]['default-location'], 'location' => '', //$uinfo[0]['default-location'],
@ -742,6 +741,8 @@ require_once('include/api_auth.php');
} }
$user_info = api_get_user($a); $user_info = api_get_user($a);
// logger('status_with_media: ' . print_r($_REQUEST,true), LOGGER_DEBUG);
$_REQUEST['type'] = 'wall'; $_REQUEST['type'] = 'wall';
$_REQUEST['profile_uid'] = api_user(); $_REQUEST['profile_uid'] = api_user();
$_REQUEST['api_source'] = true; $_REQUEST['api_source'] = true;
@ -909,7 +910,7 @@ require_once('include/api_auth.php');
function red_item(&$a, $type) { function red_item(&$a, $type) {
if (api_user() === false) { if (api_user() === false) {
logger('api_red_item_new: no user'); logger('api_red_item_full: no user');
return false; return false;
} }
@ -2196,7 +2197,7 @@ require_once('include/api_auth.php');
} }
} }
$id = send_message($recipient['id'], $_POST['text'], $sub, $replyto); $id = send_message(api_user(),$recipient['guid'], $_POST['text'], $sub, $replyto);
if ($id>-1) { if ($id>-1) {
$r = q("SELECT * FROM `mail` WHERE id=%d", intval($id)); $r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));

View file

@ -570,7 +570,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@]'; $urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@]';
if (strpos($Text,'http') !== false) { if (strpos($Text,'http') !== false) {
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_blank" >$2</a>', $Text);
} }
if (strpos($Text,'[/share]') !== false) { if (strpos($Text,'[/share]') !== false) {
@ -582,21 +582,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
} }
} }
if (strpos($Text,'[/url]') !== false) { if (strpos($Text,'[/url]') !== false) {
$Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$2</a>', $Text);
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank" >$2</a>', $Text);
} }
if (strpos($Text,'[/zrl]') !== false) { if (strpos($Text,'[/zrl]') !== false) {
$Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$2</a>', $Text);
$Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$2</a>', $Text);
} }
// Perform MAIL Search // Perform MAIL Search
if (strpos($Text,'[/mail]') !== false) { if (strpos($Text,'[/mail]') !== false) {
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$2</a>', $Text); $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$2</a>', $Text);
} }
@ -886,17 +886,17 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
// if video couldn't be embedded, link to it instead. // if video couldn't be embedded, link to it instead.
if (strpos($Text,'[/video]') !== false) { if (strpos($Text,'[/video]') !== false) {
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_blank" >$1</a>', $Text);
} }
if (strpos($Text,'[/audio]') !== false) { if (strpos($Text,'[/audio]') !== false) {
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_blank" >$1</a>', $Text);
} }
if (strpos($Text,'[/zvideo]') !== false) { if (strpos($Text,'[/zvideo]') !== false) {
$Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text);
} }
if (strpos($Text,'[/zaudio]') !== false) { if (strpos($Text,'[/zaudio]') !== false) {
$Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text);
} }
if ($tryoembed){ if ($tryoembed){
@ -905,7 +905,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
} }
} else { } else {
if (strpos($Text,'[/iframe]') !== false) { if (strpos($Text,'[/iframe]') !== false) {
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text); $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text);
} }
} }

View file

@ -282,15 +282,16 @@ function comanche_widget($name, $text) {
} }
} }
if(file_exists('widget/' . trim($name) . '.php')) $func = 'widget_' . trim($name);
if((! function_exists($func)) && file_exists('widget/' . trim($name) . '.php'))
require_once('widget/' . trim($name) . '.php'); require_once('widget/' . trim($name) . '.php');
else { else {
$theme_widget = 'widget_' . trim($name) . '.php'; $theme_widget = $func . '.php';
if(theme_include($theme_widget)) if((! function_exists($func)) && theme_include($theme_widget))
require_once(theme_include($theme_widget)); require_once(theme_include($theme_widget));
} }
$func = 'widget_' . trim($name);
if (function_exists($func)) if (function_exists($func))
return $func($vars); return $func($vars);
} }

View file

@ -674,7 +674,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
$unverified = ''; $unverified = '';
// $tags=array(); // $tags=array();
// $terms = get_terms_oftype($item['term'],array(TERM_HASHTAG,TERM_MENTION,TERM_UNKNOWN)); // $terms = get_terms_oftype($item['term'],array(TERM_HASHTAG,TERM_MENTION,TERM_UNKNOWN,TERM_COMMUNITYTAG));
// if(count($terms)) // if(count($terms))
// foreach($terms as $tag) // foreach($terms as $tag)
// $tags[] = format_term_for_display($tag); // $tags[] = format_term_for_display($tag);
@ -697,6 +697,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
'thumb' => $profile_avatar, 'thumb' => $profile_avatar,
'title' => $item['title'], 'title' => $item['title'],
'body' => $body['html'], 'body' => $body['html'],
'event' => $body['event'],
'photo' => $body['photo'], 'photo' => $body['photo'],
'tags' => $body['tags'], 'tags' => $body['tags'],
'categories' => $body['categories'], 'categories' => $body['categories'],
@ -944,7 +945,7 @@ function item_photo_menu($item){
$menu = Array( $menu = Array(
t("View Source") => $vsrc_link, t("View Source") => $vsrc_link,
t("Follow Thread") => $sub_link, t("Follow Thread") => $sub_link,
t("Stop Following") => $unsub_link, t("Unfollow Thread") => $unsub_link,
t("View Status") => $status_link, t("View Status") => $status_link,
t("View Profile") => $profile_link, t("View Profile") => $profile_link,
t("View Photos") => $photos_link, t("View Photos") => $photos_link,
@ -1025,7 +1026,7 @@ function builtin_activity_puller($item, &$conv_responses) {
if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) { if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
$name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown')); $name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown'));
$url = (($item['author']['xchan_url'] && $item['author']['xchan_photo_s']) $url = (($item['author']['xchan_url'] && $item['author']['xchan_photo_s'])
? '<a href="' . chanlink_url($item['author']['xchan_url']) . '">' . '<img class="response-photo" src="' . zid($item['author']['xchan_photo_s']) . ' alt="' . urlencode($name) . '" /> ' . $name . '</a>' ? '<a href="' . chanlink_url($item['author']['xchan_url']) . '">' . '<img class="dropdown-menu-img-xs" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" />' . $name . '</a>'
: '<a href="#" class="disabled">' . $name . '</a>' : '<a href="#" class="disabled">' . $name . '</a>'
); );

View file

@ -153,7 +153,7 @@ function dob($dob) {
* id and name of datetimepicker (defaults to "datetimepicker") * id and name of datetimepicker (defaults to "datetimepicker")
*/ */
function datesel($format, $min, $max, $default, $id = 'datepicker') { function datesel($format, $min, $max, $default, $id = 'datepicker') {
return datetimesel($format, $min, $max, $default, $id,true, false, '', ''); return datetimesel($format, $min, $max, $default, '', $id,true, false, '', '');
} }
/** /**
@ -168,7 +168,7 @@ function datesel($format, $min, $max, $default, $id = 'datepicker') {
* id and name of datetimepicker (defaults to "timepicker") * id and name of datetimepicker (defaults to "timepicker")
*/ */
function timesel($format, $h, $m, $id='timepicker') { function timesel($format, $h, $m, $id='timepicker') {
return datetimesel($format,new DateTime(),new DateTime(),new DateTime("$h:$m"),$id,false,true); return datetimesel($format,new DateTime(),new DateTime(),new DateTime("$h:$m"),'', $id,false,true);
} }
/** /**
@ -198,7 +198,7 @@ function timesel($format, $h, $m, $id='timepicker') {
* @todo Once browser support is better this could probably be replaced with * @todo Once browser support is better this could probably be replaced with
* native HTML5 date picker. * native HTML5 date picker.
*/ */
function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) { function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false, $first_day = 0) {
$o = ''; $o = '';
$dateformat = ''; $dateformat = '';
@ -207,11 +207,11 @@ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pic
if($pickdate && $picktime) $dateformat .= ' '; if($pickdate && $picktime) $dateformat .= ' ';
if($picktime) $dateformat .= 'H:i'; if($picktime) $dateformat .= 'H:i';
$minjs = $min ? ",minDate: new Date({$min->getTimestamp()}*1000), yearStart: " . $min->format('Y') : ''; $minjs = $min->getTimestamp() ? ",minDate: new Date({$min->getTimestamp()}*1000), yearStart: " . $min->format('Y') : '';
$maxjs = $max ? ",maxDate: new Date({$max->getTimestamp()}*1000), yearEnd: " . $max->format('Y') : ''; $maxjs = $max->getTimestamp() ? ",maxDate: new Date({$max->getTimestamp()}*1000), yearEnd: " . $max->format('Y') : '';
$input_text = $default ? 'value="' . date($dateformat, $default->getTimestamp()) . '"' : ''; $input_text = $default->getTimestamp() ? date($dateformat, $default->getTimestamp()) : '';
$defaultdatejs = $default ? ",defaultDate: new Date({$default->getTimestamp()}*1000)" : ''; $defaultdatejs = $default->getTimestamp() ? ",defaultDate: new Date({$default->getTimestamp()}*1000)" : '';
$pickers = ''; $pickers = '';
if(!$pickdate) $pickers .= ',datepicker: false'; if(!$pickdate) $pickers .= ',datepicker: false';
@ -219,10 +219,10 @@ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pic
$extra_js = ''; $extra_js = '';
if($minfrom != '') if($minfrom != '')
$extra_js .= "\$('#$minfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#$id').data('xdsoft_datetimepicker').setOptions({minDate: currentDateTime})}})"; $extra_js .= "\$('#id_$minfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#id_$id').data('xdsoft_datetimepicker').setOptions({minDate: currentDateTime})}})";
if($maxfrom != '') if($maxfrom != '')
$extra_js .= "\$('#$maxfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#$id').data('xdsoft_datetimepicker').setOptions({maxDate: currentDateTime})}})"; $extra_js .= "\$('#id_$maxfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#id_$id').data('xdsoft_datetimepicker').setOptions({maxDate: currentDateTime})}})";
$readable_format = $dateformat; $readable_format = $dateformat;
$readable_format = str_replace('Y','yyyy',$readable_format); $readable_format = str_replace('Y','yyyy',$readable_format);
@ -231,10 +231,11 @@ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pic
$readable_format = str_replace('H','HH',$readable_format); $readable_format = str_replace('H','HH',$readable_format);
$readable_format = str_replace('i','MM',$readable_format); $readable_format = str_replace('i','MM',$readable_format);
$o .= "<div class='date'><input type='text' placeholder='$readable_format' name='$id' id='$id' $input_text />"; $tpl = get_markup_template('field_input.tpl');
$o .= (($required) ? '<span class="required" title="' . t('Required') . '" >*</span>' : ''); $o .= replace_macros($tpl,array(
$o .= '</div>'; '$field' => array($id, $label, $input_text, (($required) ? t('Required') : ''), (($required) ? '*' : ''), 'placeholder="' . $readable_format . '"'),
$o .= "<script type='text/javascript'>\$(function () {var picker = \$('#$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs}); $extra_js})</script>"; ));
$o .= "<script>\$(function () {var picker = \$('#id_$id').datetimepicker({step:15,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>";
return $o; return $o;
} }

View file

@ -137,7 +137,7 @@ abstract class dba_driver {
} }
if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) { if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) {
if(! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) { if((! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) && (! filter_var($server, FILTER_VALIDATE_IP))) {
$this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server); $this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server);
$this->connected = false; $this->connected = false;
$this->db = null; $this->db = null;

View file

@ -107,15 +107,10 @@ function deliver_run($argv, $argc) {
$notify = json_decode($r[0]['outq_notify'],true); $notify = json_decode($r[0]['outq_notify'],true);
// Check if this is a conversation request packet. It won't have outq_msg // Messages without an outq_msg will need to go via the web, even if it's a
// but will be an encrypted packet - so will need to be handed off to // local delivery. This includes conversation requests and refresh packets.
// web delivery rather than processed inline.
$sendtoweb = false; if(($r[0]['outq_posturl'] === z_root() . '/post') && ($r[0]['outq_msg'])) {
if(array_key_exists('iv',$notify) && (! $r[0]['outq_msg']))
$sendtoweb = true;
if(($r[0]['outq_posturl'] === z_root() . '/post') && (! $sendtoweb)) {
logger('deliver: local delivery', LOGGER_DEBUG); logger('deliver: local delivery', LOGGER_DEBUG);
// local delivery // local delivery
// we should probably batch these and save a few delivery processes // we should probably batch these and save a few delivery processes
@ -166,6 +161,7 @@ function deliver_run($argv, $argc) {
} }
else { else {
logger('deliver: remote zot delivery failed to ' . $r[0]['outq_posturl']); logger('deliver: remote zot delivery failed to ' . $r[0]['outq_posturl']);
logger('deliver: remote zot delivery fail data: ' . print_r($result,true), LOGGER_DATA);
$y = q("update outq set outq_updated = '%s' where outq_hash = '%s'", $y = q("update outq set outq_updated = '%s' where outq_hash = '%s'",
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc($argv[$x]) dbesc($argv[$x])

View file

@ -22,7 +22,7 @@ function find_upstream_directory($dirmode) {
$r = q("select * from site where site_url = '%s' limit 1", $r = q("select * from site where site_url = '%s' limit 1",
dbesc($preferred) dbesc($preferred)
); );
if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STADALONE)) { if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STANDALONE)) {
$preferred = ''; $preferred = '';
} }
} }

View file

@ -21,35 +21,37 @@ function format_event_html($ev) {
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM
//todo: move this to template
$o = '<div class="vevent">' . "\r\n"; $o = '<div class="vevent">' . "\r\n";
$o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n"; $o .= '<div class="event-title"><h3><i class="icon-calendar"></i>&nbsp;' . bbcode($ev['summary']) . '</h3></div>' . "\r\n";
$o .= '<p class="description event-description">' . bbcode($ev['description']) . '</p>' . "\r\n"; $o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span>&nbsp;<span class="dtstart" title="'
$o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="'
. datetime_convert('UTC', 'UTC', $ev['start'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) . datetime_convert('UTC', 'UTC', $ev['start'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >' . '" >'
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
$ev['start'] , $bd_format )) $ev['start'] , $bd_format ))
: day_translate(datetime_convert('UTC', 'UTC', : day_translate(datetime_convert('UTC', 'UTC',
$ev['start'] , $bd_format))) $ev['start'] , $bd_format)))
. '</abbr></p>' . "\r\n"; . '</span></div>' . "\r\n";
if(! $ev['nofinish']) if(! $ev['nofinish'])
$o .= '<p class="event-end" >' . t('Finishes:') . ' <abbr class="dtend" title="' $o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span>&nbsp;<span class="dtend" title="'
. datetime_convert('UTC','UTC',$ev['finish'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) . datetime_convert('UTC','UTC',$ev['finish'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >' . '" >'
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
$ev['finish'] , $bd_format )) $ev['finish'] , $bd_format ))
: day_translate(datetime_convert('UTC', 'UTC', : day_translate(datetime_convert('UTC', 'UTC',
$ev['finish'] , $bd_format ))) $ev['finish'] , $bd_format )))
. '</abbr></p>' . "\r\n"; . '</span></div>' . "\r\n";
$o .= '<div class="event-description">' . bbcode($ev['description']) . '</div>' . "\r\n";
if(strlen($ev['location'])) if(strlen($ev['location']))
$o .= '<p class="event-location"> ' . t('Location:') . ' <span class="location">' $o .= '<div class="event-location"><span class="event-label"> ' . t('Location:') . '</span>&nbsp;<span class="location">'
. bbcode($ev['location']) . bbcode($ev['location'])
. '</span></p>' . "\r\n"; . '</span></div>' . "\r\n";
$o .= '</div>' . "\r\n"; $o .= '</div>' . "\r\n";
@ -785,6 +787,12 @@ function event_store_item($arr, $event) {
'type' => ACTIVITY_OBJ_EVENT, 'type' => ACTIVITY_OBJ_EVENT,
'id' => z_root() . '/event/' . $r[0]['resource_id'], 'id' => z_root() . '/event/' . $r[0]['resource_id'],
'title' => $arr['summary'], 'title' => $arr['summary'],
'start' => $arr['start'],
'finish' => $arr['finish'],
'nofinish' => $arr['nofinish'],
'description' => $arr['description'],
'location' => $arr['location'],
'adjust' => $arr['adjust'],
'content' => format_event_bbcode($arr), 'content' => format_event_bbcode($arr),
'author' => array( 'author' => array(
'name' => $r[0]['xchan_name'], 'name' => $r[0]['xchan_name'],
@ -887,7 +895,7 @@ function event_store_item($arr, $event) {
$item_arr['verb'] = ACTIVITY_POST; $item_arr['verb'] = ACTIVITY_POST;
$item_arr['item_wall'] = $item_wall; $item_arr['item_wall'] = $item_wall;
$item_arr['item_origin'] = $item_origin; $item_arr['item_origin'] = $item_origin;
$item_arr['item_thread_top'] = $item_thread_top;; $item_arr['item_thread_top'] = $item_thread_top;
$attach = array(array( $attach = array(array(
'href' => z_root() . '/events/ical/' . urlencode($event['event_hash']), 'href' => z_root() . '/events/ical/' . urlencode($event['event_hash']),
@ -924,6 +932,12 @@ function event_store_item($arr, $event) {
'type' => ACTIVITY_OBJ_EVENT, 'type' => ACTIVITY_OBJ_EVENT,
'id' => z_root() . '/event/' . $event['event_hash'], 'id' => z_root() . '/event/' . $event['event_hash'],
'title' => $arr['summary'], 'title' => $arr['summary'],
'start' => $arr['start'],
'finish' => $arr['finish'],
'nofinish' => $arr['nofinish'],
'description' => $arr['description'],
'location' => $arr['location'],
'adjust' => $arr['adjust'],
'content' => format_event_bbcode($arr), 'content' => format_event_bbcode($arr),
'author' => array( 'author' => array(
'name' => $x[0]['xchan_name'], 'name' => $x[0]['xchan_name'],

View file

@ -28,7 +28,10 @@ function externals_run($argv, $argc){
} }
else { else {
$randfunc = db_getfunc('RAND'); $randfunc = db_getfunc('RAND');
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d order by $randfunc limit 1",
// fixme this query does not deal with directory realms.
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d and site_dead = 0 order by $randfunc limit 1",
dbesc(z_root()), dbesc(z_root()),
intval(DIRECTORY_MODE_STANDALONE), intval(DIRECTORY_MODE_STANDALONE),
intval(SITE_TYPE_ZOT) intval(SITE_TYPE_ZOT)
@ -37,19 +40,11 @@ function externals_run($argv, $argc){
$url = $r[0]['site_url']; $url = $r[0]['site_url'];
} }
// Note: blacklisted sites must be stored in the config as an array.
// No simple way to turn this into a personal config because we have no identity here.
// For that we probably need a variant of superblock.
$blacklisted = false; $blacklisted = false;
$bl1 = get_config('system','blacklisted_sites');
if(is_array($bl1) && $bl1) { if(! check_siteallowed($url)) {
foreach($bl1 as $bl) { logger('blacklisted site: ' . $url);
if($bl && strpos($url,$bl) !== false) {
$blacklisted = true; $blacklisted = true;
break;
}
}
} }
$attempts ++; $attempts ++;

View file

@ -60,6 +60,7 @@ function get_features() {
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false), array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false),
array('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false), array('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false),
array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false), array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false),
array('suppress_duplicates', t('Suppress Duplicate Posts/Comments'), t('Prevent posts with identical content to be published with less than two minutes in between submissions.'),true),
), ),

View file

@ -710,7 +710,8 @@ function identity_export_year($channel_id,$year,$month = 0) {
else else
$maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00'); $maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00');
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created", $r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created",
intval(ITEM_TYPE_POST),
intval($channel_id), intval($channel_id),
dbesc($mindate), dbesc($mindate),
dbesc($maxdate) dbesc($maxdate)
@ -1689,3 +1690,14 @@ function get_channel_default_perms($uid) {
return 0; return 0;
} }
function profiles_build_sync($channel_id) {
$r = q("select * from profile where uid = %d",
intval($channel_id)
);
if($r) {
build_sync_packet($channel_id,array('profile' => $r));
}
}

View file

@ -2,7 +2,7 @@
require_once('include/menu.php'); require_once('include/menu.php');
function import_channel($channel) { function import_channel($channel, $account_id) {
if(! array_key_exists('channel_system',$channel)) { if(! array_key_exists('channel_system',$channel)) {
$channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0); $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
@ -48,7 +48,7 @@ function import_channel($channel) {
} }
unset($channel['channel_id']); unset($channel['channel_id']);
$channel['channel_account_id'] = get_account_id(); $channel['channel_account_id'] = $account_id;
$channel['channel_primary'] = (($seize) ? 1 : 0); $channel['channel_primary'] = (($seize) ? 1 : 0);
if($channel['channel_pageflags'] & PAGE_ALLOWCODE) { if($channel['channel_pageflags'] & PAGE_ALLOWCODE) {
@ -72,7 +72,7 @@ function import_channel($channel) {
} }
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1", $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
intval(get_account_id()), intval($account_id),
$channel['channel_guid'] // Already dbesc'd $channel['channel_guid'] // Already dbesc'd
); );
if(! $r) { if(! $r) {
@ -83,7 +83,7 @@ function import_channel($channel) {
// reset // reset
$channel = $r[0]; $channel = $r[0];
set_default_login_identity(get_account_id(),$channel['channel_id'],false); set_default_login_identity($account_id,$channel['channel_id'],false);
logger('import step 1'); logger('import step 1');
$_SESSION['import_step'] = 1; $_SESSION['import_step'] = 1;
ref_session_write(session_id(), serialize($_SESSION)); ref_session_write(session_id(), serialize($_SESSION));

View file

@ -550,6 +550,7 @@ function get_public_feed($channel, $params) {
$params['direction'] = ((x($params,'direction')) ? $params['direction'] : 'desc'); $params['direction'] = ((x($params,'direction')) ? $params['direction'] : 'desc');
$params['pages'] = ((x($params,'pages')) ? intval($params['pages']) : 0); $params['pages'] = ((x($params,'pages')) ? intval($params['pages']) : 0);
$params['top'] = ((x($params,'top')) ? intval($params['top']) : 0); $params['top'] = ((x($params,'top')) ? intval($params['top']) : 0);
$params['cat'] = ((x($params,'cat')) ? $params['cat'] : '');
switch($params['type']) { switch($params['type']) {
case 'json': case 'json':
@ -593,7 +594,8 @@ function get_feed_for($channel, $observer_hash, $params) {
'direction' => $params['direction'], // FIXME 'direction' => $params['direction'], // FIXME
'pages' => $params['pages'], 'pages' => $params['pages'],
'order' => 'post', 'order' => 'post',
'top' => $params['top'] 'top' => $params['top'],
'cat' => $params['cat']
), $channel, $observer_hash, CLIENT_MODE_NORMAL, get_app()->module); ), $channel, $observer_hash, CLIENT_MODE_NORMAL, get_app()->module);
@ -1408,7 +1410,7 @@ function encode_item_xchan($xchan) {
function encode_item_terms($terms,$mirror = false) { function encode_item_terms($terms,$mirror = false) {
$ret = array(); $ret = array();
$allowed_export_terms = array( TERM_UNKNOWN, TERM_HASHTAG, TERM_MENTION, TERM_CATEGORY, TERM_BOOKMARK ); $allowed_export_terms = array( TERM_UNKNOWN, TERM_HASHTAG, TERM_MENTION, TERM_CATEGORY, TERM_BOOKMARK, TERM_COMMUNITYTAG );
if($mirror) { if($mirror) {
$allowed_export_terms[] = TERM_PCATEGORY; $allowed_export_terms[] = TERM_PCATEGORY;
@ -1432,7 +1434,7 @@ function encode_item_terms($terms,$mirror = false) {
* @return string * @return string
*/ */
function termtype($t) { function termtype($t) {
$types = array('unknown','hashtag','mention','category','private_category','file','search','thing','bookmark'); $types = array('unknown','hashtag','mention','category','private_category','file','search','thing','bookmark', 'hierarchy', 'communitytag');
return(($types[$t]) ? $types[$t] : 'unknown'); return(($types[$t]) ? $types[$t] : 'unknown');
} }
@ -1478,6 +1480,9 @@ function decode_tags($t) {
case 'bookmark': case 'bookmark':
$tag['type'] = TERM_BOOKMARK; $tag['type'] = TERM_BOOKMARK;
break; break;
case 'communitytag':
$tag['type'] = TERM_COMMUNITYTAG;
break;
default: default:
case 'unknown': case 'unknown':
$tag['type'] = TERM_UNKNOWN; $tag['type'] = TERM_UNKNOWN;
@ -2962,9 +2967,12 @@ function tag_deliver($uid, $item_id) {
if(($item['source_xchan']) && intval($item['item_uplink']) if(($item['source_xchan']) && intval($item['item_uplink'])
&& intval($item['item_thread_top']) && ($item['edited'] != $item['created'])) { && intval($item['item_thread_top']) && ($item['edited'] != $item['created'])) {
// this is an update (edit) to a post which was already processed by us and has a second delivery chain // this is an update (edit) to a post which was already processed by us and has a second delivery chain
// Just start the second delivery chain to deliver the updated post // Just start the second delivery chain to deliver the updated post
proc_run('php','include/notifier.php','tgroup',$item['id']); // after resetting ownership and permission bits
start_delivery_chain($u[0], $item, $item_id, 0);
return; return;
} }
@ -3029,7 +3037,7 @@ function tag_deliver($uid, $item_id) {
if(is_array($j_obj['link'])) if(is_array($j_obj['link']))
$taglink = get_rel_link($j_obj['link'],'alternate'); $taglink = get_rel_link($j_obj['link'],'alternate');
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j_obj['id']); store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$j_obj['title'],$j_obj['id']);
$x = q("update item set edited = '%s', received = '%s', changed = '%s' where mid = '%s' and uid = %d", $x = q("update item set edited = '%s', received = '%s', changed = '%s' where mid = '%s' and uid = %d",
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc(datetime_convert()), dbesc(datetime_convert()),
@ -3181,7 +3189,7 @@ function tag_deliver($uid, $item_id) {
} }
if((! $mention) && (! $union)) { if((! $mention) && (! $union)) {
logger('tag_deliver: no mention and no union.'); logger('tag_deliver: no mention for ' . $u[0]['channel_name'] . ' and no union.');
return; return;
} }
@ -3434,7 +3442,7 @@ function check_item_source($uid, $item) {
foreach($words as $word) { foreach($words as $word) {
if(substr($word,0,1) === '#' && $tags) { if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t) foreach($tags as $t)
if(($t['type'] == TERM_HASHTAG) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*'))) if((($t['type'] == TERM_HASHTAG) || ($t['type'] == TERM_COMMUNITYTAG)) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return true; return true;
} }
elseif((strpos($word,'/') === 0) && preg_match($word,$text)) elseif((strpos($word,'/') === 0) && preg_match($word,$text))
@ -3466,7 +3474,7 @@ function post_is_importable($item,$abook) {
unobscure($item); unobscure($item);
$text = prepare_text($item['body'],$item['mimetype']); $text = prepare_text($item['body'],$item['mimetype']);
$text = html2plain($text); $text = html2plain(($item['title']) ? $item['title'] . ' ' . $text : $text);
$lang = null; $lang = null;
@ -3487,7 +3495,7 @@ function post_is_importable($item,$abook) {
continue; continue;
if(substr($word,0,1) === '#' && $tags) { if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t) foreach($tags as $t)
if(($t['type'] == TERM_HASHTAG) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*'))) if((($t['type'] == TERM_HASHTAG) || ($t['type'] == TERM_COMMUNITYTAG)) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return false; return false;
} }
elseif((strpos($word,'/') === 0) && preg_match($word,$text)) elseif((strpos($word,'/') === 0) && preg_match($word,$text))
@ -3508,7 +3516,7 @@ function post_is_importable($item,$abook) {
continue; continue;
if(substr($word,0,1) === '#' && $tags) { if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t) foreach($tags as $t)
if(($t['type'] == TERM_HASHTAG) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*'))) if((($t['type'] == TERM_HASHTAG) || ($t['type'] == TERM_COMMUNITYTAG)) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
return true; return true;
} }
elseif((strpos($word,'/') === 0) && preg_match($word,$text)) elseif((strpos($word,'/') === 0) && preg_match($word,$text))
@ -4159,12 +4167,12 @@ function enumerate_permissions($obj) {
function item_getfeedtags($item) { function item_getfeedtags($item) {
$terms = get_terms_oftype($item['term'],array(TERM_HASHTAG,TERM_MENTION)); $terms = get_terms_oftype($item['term'],array(TERM_HASHTAG,TERM_MENTION,TERM_COMMUNITYTAG));
$ret = array(); $ret = array();
if(count($terms)) { if(count($terms)) {
foreach($terms as $term) { foreach($terms as $term) {
if($term['type'] == TERM_HASHTAG) if(($term['type'] == TERM_HASHTAG) || ($term['type'] == TERM_COMMUNITYTAG))
$ret[] = array('#',$term['url'],$term['term']); $ret[] = array('#',$term['url'],$term['term']);
else else
$ret[] = array('@',$term['url'],$term['term']); $ret[] = array('@',$term['url'],$term['term']);
@ -4811,6 +4819,9 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if($arr['since_id']) if($arr['since_id'])
$sql_extra .= " and item.id > " . $since_id . " "; $sql_extra .= " and item.id > " . $since_id . " ";
if($arr['cat'])
$sql_extra .= protect_sprintf(term_query('item', $arr['cat'], TERM_CATEGORY));
if($arr['gid'] && $uid) { if($arr['gid'] && $uid) {
$r = q("SELECT * FROM `groups` WHERE id = %d AND uid = %d LIMIT 1", $r = q("SELECT * FROM `groups` WHERE id = %d AND uid = %d LIMIT 1",
intval($arr['group']), intval($arr['group']),
@ -4872,7 +4883,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if($arr['search']) { if($arr['search']) {
if(strpos($arr['search'],'#') === 0) if(strpos($arr['search'],'#') === 0)
$sql_extra .= term_query('item',substr($arr['search'],1),TERM_HASHTAG); $sql_extra .= term_query('item',substr($arr['search'],1),TERM_HASHTAG,TERM_COMMUNITYTAG);
else else
$sql_extra .= sprintf(" AND item.body like '%s' ", $sql_extra .= sprintf(" AND item.body like '%s' ",
dbesc(protect_sprintf('%' . $arr['search'] . '%')) dbesc(protect_sprintf('%' . $arr['search'] . '%'))

View file

@ -22,6 +22,7 @@ function js_strings() {
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$linkurl' => t('Please enter a link URL'), '$linkurl' => t('Please enter a link URL'),
'$leavethispage' => t('Unsaved changes. Are you sure you wish to leave this page?'), '$leavethispage' => t('Unsaved changes. Are you sure you wish to leave this page?'),
'$location' => t('Location'),
'$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''), '$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''),
'$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''), '$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''),

View file

@ -13,6 +13,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$ret = array('success' => false); $ret = array('success' => false);
$a = get_app(); $a = get_app();
$observer_hash = get_observer_hash();
if(! $recipient) { if(! $recipient) {
$ret['message'] = t('No recipient provided.'); $ret['message'] = t('No recipient provided.');
@ -148,8 +149,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$match = null; $match = null;
$images = null; $images = null;
if(preg_match_all("/\[zmg\](.*?)\[\/zmg\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match)) if(preg_match_all("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match))
$images = $match[1]; $images = $match[3];
$match = false; $match = false;
@ -173,7 +174,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
'revision' => $r['data']['revision'] 'revision' => $r['data']['revision']
); );
} }
$body = str_replace($match[1],'',$body); $body = trim(str_replace($match[1],'',$body));
} }
} }

View file

@ -320,6 +320,29 @@ function xml_status($st, $message = '') {
killme(); killme();
} }
/**
* @brief Send HTTP status header
*
* @param int $val
* integer HTTP status result value
* @param string $msg
* optional message
* @returns nil
*/
function http_status($val, $msg = '') {
if ($val >= 400)
$msg = (($msg) ? $msg : 'Error');
if ($val >= 200 && $val < 300)
$msg = (($msg) ? $msg : 'OK');
logger('http_status_exit ' . $val . ' ' . $msg);
header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg);
}
/** /**
* @brief Send HTTP status header and exit. * @brief Send HTTP status header and exit.
* *
@ -330,18 +353,12 @@ function xml_status($st, $message = '') {
* @returns (does not return, process is terminated) * @returns (does not return, process is terminated)
*/ */
function http_status_exit($val, $msg = '') { function http_status_exit($val, $msg = '') {
http_status($val, $msg);
if ($val >= 400)
$msg = (($msg) ? $msg : 'Error');
if ($val >= 200 && $val < 300)
$msg = (($msg) ? $msg : 'OK');
logger('http_status_exit ' . $val . ' ' . $msg);
header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg);
killme(); killme();
} }
// convert an XML document to a normalised, case-corrected array // convert an XML document to a normalised, case-corrected array
// used by webfinger // used by webfinger
@ -1692,3 +1709,162 @@ function do_delivery($deliveries) {
} }
function get_site_info() {
global $db;
global $a;
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
$directory_mode = Array('DIRECTORY_MODE_NORMAL', 'DIRECTORY_MODE_SECONDARY','DIRECTORY_MODE_PRIMARY', 256 => 'DIRECTORY_MODE_STANDALONE');
$sql_extra = '';
$r = q("select * from channel left join account on account_id = channel_account_id where ( account_roles & 4096 )>0 and account_default_channel = channel_id");
if($r) {
$admin = array();
foreach($r as $rr) {
if($rr['channel_pageflags'] & PAGE_HUBADMIN)
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
if(! $admin) {
foreach($r as $rr) {
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
}
}
else {
$admin = false;
}
$def_service_class = get_config('system','default_service_class');
if($def_service_class)
$service_class = get_config('service_class',$def_service_class);
else
$service_class = false;
$visible_plugins = array();
if(is_array($a->plugins) && count($a->plugins)) {
$r = q("select * from addon where hidden = 0");
if(count($r))
foreach($r as $rr)
$visible_plugins[] = $rr['name'];
}
sort($visible_plugins);
if(@is_dir('.git') && function_exists('shell_exec'))
$commit = trim(@shell_exec('git log -1 --format="%h"'));
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
$site_info = get_config('system','info');
$site_name = get_config('system','sitename');
if(! get_config('system','hidden_version_siteinfo')) {
$version = RED_VERSION;
if(@is_dir('.git') && function_exists('shell_exec')) {
$commit = trim( @shell_exec('git log -1 --format="%h"'));
if(! get_config('system','hidden_tag_siteinfo'))
$tag = trim( @shell_exec('git describe --tags --abbrev=0'));
else
$tag = '';
}
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
}
else {
$version = $commit = '';
}
//Statistics
$channels_total_stat = intval(get_config('system','channels_total_stat'));
$channels_active_halfyear_stat = intval(get_config('system','channels_active_halfyear_stat'));
$channels_active_monthly_stat = intval(get_config('system','channels_active_monthly_stat'));
$local_posts_stat = intval(get_config('system','local_posts_stat'));
$hide_in_statistics = intval(get_config('system','hide_in_statistics'));
$site_expire = intval(get_config('system', 'default_expire_days'));
$data = Array(
'version' => $version,
'version_tag' => $tag,
'commit' => $commit,
'url' => z_root(),
'plugins' => $visible_plugins,
'register_policy' => $register_policy[get_config('system','register_policy')],
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
'language' => get_config('system','language'),
'rss_connections' => get_config('system','feed_contacts'),
'expiration' => $site_expire,
'default_service_restrictions' => $service_class,
'admin' => $admin,
'site_name' => (($site_name) ? $site_name : ''),
'platform' => PLATFORM_NAME,
'dbdriver' => $db->getdriver(),
'lastpoll' => get_config('system','lastpoll'),
'info' => (($site_info) ? $site_info : ''),
'channels_total' => $channels_total_stat,
'channels_active_halfyear' => $channels_active_halfyear_stat,
'channels_active_monthly' => $channels_active_monthly_stat,
'local_posts' => $local_posts_stat,
'hide_in_statistics' => $hide_in_statistics
);
return $data;
}
function check_siteallowed($url) {
$retvalue = true;
$bl1 = get_config('system','whitelisted_sites');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
if($bl1 === '*')
$retvalue = true;
if($bl && strpos($url,$bl) !== false)
return true;
}
}
$bl1 = get_config('system','blacklisted_sites');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
if($bl1 === '*')
$retvalue = false;
if($bl && strpos($url,$bl) !== false) {
return false;
}
}
}
return $retvalue;
}
function check_channelallowed($hash) {
$retvalue = true;
$bl1 = get_config('system','whitelisted_channels');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
if($bl1 === '*')
$retvalue = true;
if($bl && strpos($hash,$bl) !== false)
return true;
}
}
$bl1 = get_config('system','blacklisted_channels');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
if($bl1 === '*')
$retvalue = false;
if($bl && strpos($hash,$bl) !== false) {
return false;
}
}
}
return $retvalue;
}

View file

@ -101,7 +101,7 @@ function notifier_run($argv, $argc){
$dead_hubs = array(); $dead_hubs = array();
$dh = q("select site_url from site where site_dead = 1"); $dh = q("select site_url from site where site_dead = 1");
if(dh) { if($dh) {
foreach($dh as $dead) { foreach($dh as $dead) {
$dead_hubs[] = $dead['site_url']; $dead_hubs[] = $dead['site_url'];
} }

View file

@ -616,3 +616,14 @@ function get_markup_template($s, $root = '') {
$template = $t->get_markup_template($s, $root); $template = $t->get_markup_template($s, $root);
return $template; return $template;
} }
// return the standardised version. Since we can't easily compare
// before the STD_VERSION definition was applied, we have to treat
// all prior release versions the same. You can dig through them
// with other means (such as RED_VERSION) if necessary.
function get_std_version() {
if(defined('STD_VERSION'))
return STD_VERSION;
return '0.0.0';
}

View file

@ -1,6 +1,9 @@
<?php /** @file */ <?php /** @file */
require_once("include/network.php");
function system_down() { function system_down() {
http_status(503, 'Service Unavailable');
echo <<< EOT echo <<< EOT
<html> <html>
<head><title>System Unavailable</title></head> <head><title>System Unavailable</title></head>

View file

@ -26,13 +26,22 @@ function file_tag_file_query($table,$s,$type = 'file') {
); );
} }
function term_query($table,$s,$type = TERM_UNKNOWN) { function term_query($table,$s,$type = TERM_UNKNOWN, $type2 = '') {
if($type2) {
return sprintf(" AND " . (($table) ? dbesc($table) . '.' : '') . "id in (select term.oid from term where term.type in (%d, %d) and term.term = '%s' and term.uid = " . (($table) ? dbesc($table) . '.' : '') . "uid ) ",
intval($type),
intval($type2),
protect_sprintf(dbesc($s))
);
}
else {
return sprintf(" AND " . (($table) ? dbesc($table) . '.' : '') . "id in (select term.oid from term where term.type = %d and term.term = '%s' and term.uid = " . (($table) ? dbesc($table) . '.' : '') . "uid ) ", return sprintf(" AND " . (($table) ? dbesc($table) . '.' : '') . "id in (select term.oid from term where term.type = %d and term.term = '%s' and term.uid = " . (($table) ? dbesc($table) . '.' : '') . "uid ) ",
intval($type), intval($type),
protect_sprintf(dbesc($s)) protect_sprintf(dbesc($s))
); );
} }
}
function store_item_tag($uid,$iid,$otype,$type,$term,$url = '') { function store_item_tag($uid,$iid,$otype,$type,$term,$url = '') {
@ -84,7 +93,7 @@ function get_terms_oftype($arr,$type) {
function format_term_for_display($term) { function format_term_for_display($term) {
$s = ''; $s = '';
if($term['type'] == TERM_HASHTAG) if(($term['type'] == TERM_HASHTAG) || ($term['type'] == TERM_COMMUNITYTAG))
$s .= '#'; $s .= '#';
elseif($term['type'] == TERM_MENTION) elseif($term['type'] == TERM_MENTION)
$s .= '@'; $s .= '@';
@ -108,6 +117,8 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $re
if(! perm_is_allowed($uid,get_observer_hash(),'view_stream')) if(! perm_is_allowed($uid,get_observer_hash(),'view_stream'))
return array(); return array();
$item_normal = item_normal();
$sql_options = item_permissions_sql($uid); $sql_options = item_permissions_sql($uid);
$count = intval($count); $count = intval($count);
@ -133,7 +144,7 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $re
$r = q("select term, count(term) as total from term left join item on term.oid = item.id $r = q("select term, count(term) as total from term left join item on term.oid = item.id
where term.uid = %d and term.type = %d where term.uid = %d and term.type = %d
and otype = %d and item_type = %d and item_private = 0 and otype = %d and item_type = %d and item_private = 0
$sql_options $sql_options $item_normal
group by term order by total desc %s", group by term order by total desc %s",
intval($uid), intval($uid),
intval($type), intval($type),

View file

@ -5,6 +5,7 @@
require_once("include/template_processor.php"); require_once("include/template_processor.php");
require_once("include/smarty.php"); require_once("include/smarty.php");
require_once("include/bbcode.php");
// random string, there are 86 characters max in text mode, 128 for hex // random string, there are 86 characters max in text mode, 128 for hex
// output is urlsafe // output is urlsafe
@ -531,11 +532,12 @@ function attribute_contains($attr, $s) {
* LOGGER_DATA and LOGGER_ALL. * LOGGER_DATA and LOGGER_ALL.
* *
* Since PHP5.4 we get the file, function and line automatically where the logger * Since PHP5.4 we get the file, function and line automatically where the logger
* was caleld, so no need to add it to the message anymore. * was called, so no need to add it to the message anymore.
* *
* @param string $msg Message to log * @param string $msg Message to log
* @param int $level A log level. * @param int $level A log level.
*/ */
function logger($msg, $level = 0) { function logger($msg, $level = 0) {
// turn off logger in install mode // turn off logger in install mode
global $a; global $a;
@ -557,7 +559,13 @@ function logger($msg, $level = 0) {
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': '; $where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
} }
@file_put_contents($logfile, datetime_convert() . ':' . session_id() . ' ' . $where . $msg . PHP_EOL, FILE_APPEND); $s = datetime_convert() . ':' . session_id() . ' ' . $where . $msg . PHP_EOL;
$pluginfo = array('filename' => $logfile, 'loglevel' => $level, 'message' => $s,'logged' => false);
call_hooks('logger',$pluginfo);
if(! $pluginfo['logged'])
@file_put_contents($pluginfo['filename'], $pluginfo['message'], FILE_APPEND);
} }
/** /**
@ -1291,7 +1299,7 @@ function format_categories(&$item,$writeable) {
function format_hashtags(&$item) { function format_hashtags(&$item) {
$s = ''; $s = '';
$terms = get_terms_oftype($item['term'], TERM_HASHTAG); $terms = get_terms_oftype($item['term'], array(TERM_HASHTAG,TERM_COMMUNITYTAG));
if($terms) { if($terms) {
foreach($terms as $t) { foreach($terms as $t) {
$term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ; $term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ;
@ -1373,7 +1381,37 @@ function generate_named_map($location) {
return (($arr['html']) ? $arr['html'] : $location); return (($arr['html']) ? $arr['html'] : $location);
} }
function format_event($jobject) {
$event = array();
$object = json_decode($jobject,true);
//ensure compatibility with older items - this check can be removed at a later point
if(array_key_exists('description', $object)) {
$bd_format = t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM
$event['header'] = replace_macros(get_markup_template('event_item_header.tpl'),array(
'$title' => bbcode($object['title']),
'$dtstart_label' => t('Starts:'),
'$dtstart_title' => datetime_convert('UTC', 'UTC', $object['start'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
'$dtstart_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['start'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['start'] , $bd_format))),
'$finish' => (($object['nofinish']) ? false : true),
'$dtend_label' => t('Finishes:'),
'$dtend_title' => datetime_convert('UTC','UTC',$object['finish'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
'$dtend_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['finish'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['finish'] , $bd_format )))
));
$event['content'] = replace_macros(get_markup_template('event_item_content.tpl'),array(
'$description' => bbcode($object['description']),
'$location_label' => t('Location:'),
'$location' => bbcode($object['location'])
));
}
return $event;
}
function prepare_body(&$item,$attach = false) { function prepare_body(&$item,$attach = false) {
require_once('include/identity.php'); require_once('include/identity.php');
@ -1396,19 +1434,22 @@ function prepare_body(&$item,$attach = false) {
// if original photo width is <= 640px prepend it to item body // if original photo width is <= 640px prepend it to item body
if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) { if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) {
$s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s; $s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s;
} }
// if original photo width is > 640px make it a cover photo // if original photo width is > 640px make it a cover photo
if($object['link'][0]['width'] && $object['link'][0]['width'] > 640) { if($object['link'][0]['width'] && $object['link'][0]['width'] > 640) {
$scale = ((($object['link'][1]['width'] == 1024) || ($object['link'][1]['height'] == 1024)) ? 1 : 0); $scale = ((($object['link'][1]['width'] == 1024) || ($object['link'][1]['height'] == 1024)) ? 1 : 0);
$photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>'; $photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>';
} }
} }
$event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event($item['object']) : false);
$prep_arr = array( $prep_arr = array(
'item' => $item, 'item' => $item,
'html' => $s, 'html' => $event ? $event['content'] : $s,
'event' => $event['header'],
'photo' => $photo 'photo' => $photo
); );
@ -1416,6 +1457,7 @@ function prepare_body(&$item,$attach = false) {
$s = $prep_arr['html']; $s = $prep_arr['html'];
$photo = $prep_arr['photo']; $photo = $prep_arr['photo'];
$event = $prep_arr['event'];
// q("update item set html = '%s' where id = %d", // q("update item set html = '%s' where id = %d",
// dbesc($s), // dbesc($s),
@ -1482,6 +1524,7 @@ function prepare_body(&$item,$attach = false) {
'item' => $item, 'item' => $item,
'photo' => $photo, 'photo' => $photo,
'html' => $s, 'html' => $s,
'event' => $event,
'categories' => $categories, 'categories' => $categories,
'folders' => $filer, 'folders' => $filer,
'tags' => $tags, 'tags' => $tags,

View file

@ -7,6 +7,7 @@
require_once('include/dir_fns.php'); require_once('include/dir_fns.php');
require_once('include/contact_widgets.php'); require_once('include/contact_widgets.php');
require_once('include/attach.php');
function widget_profile($args) { function widget_profile($args) {
@ -661,6 +662,32 @@ function widget_conversations($arr) {
return $o; return $o;
} }
function widget_eventsmenu($arr) {
if (! local_channel())
return;
return replace_macros(get_markup_template('events_menu_side.tpl'), array(
'$title' => t('Events Menu'),
'$day' => t('Day View'),
'$week' => t('Week View'),
'$month' => t('Month View'),
'$export' => t('Export'),
'$upload' => t('Import'),
'$submit' => t('Submit')
));
}
function widget_eventstools($arr) {
if (! local_channel())
return;
return replace_macros(get_markup_template('events_tools_side.tpl'), array(
'$title' => t('Events Tools'),
'$export' => t('Export Calendar'),
'$import' => t('Import Calendar'),
'$submit' => t('Submit')
));
}
function widget_design_tools($arr) { function widget_design_tools($arr) {
$a = get_app(); $a = get_app();
@ -1132,6 +1159,8 @@ function widget_forums($arr) {
function widget_tasklist($arr) { function widget_tasklist($arr) {
if (! local_channel())
return;
require_once('include/event.php'); require_once('include/event.php');
$o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>'; $o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
@ -1229,11 +1258,32 @@ function widget_album($args) {
$owner_uid = get_app()->profile_uid; $owner_uid = get_app()->profile_uid;
$sql_extra = permissions_sql($owner_uid); $sql_extra = permissions_sql($owner_uid);
if(! perm_is_allowed($owner_uid,get_observer_hash(),'view_storage'))
return '';
if($args['album']) if($args['album'])
$album = $args['album']; $album = $args['album'];
if($args['title']) if($args['title'])
$title = $args['title']; $title = $args['title'];
/**
* This may return incorrect permissions if you have multiple directories of the same name.
* It is a limitation of the photo table using a name for a photo album instead of a folder hash
*/
if($album) {
$x = q("select hash from attach where filename = '%s' and uid = %d limit 1",
dbesc($album),
intval($owner_uid)
);
if($x) {
$y = attach_can_view_folder($owner_uid,get_observer_hash(),$x[0]['hash']);
if(! $y)
return '';
}
}
$order = 'DESC'; $order = 'DESC';
$r = q("SELECT p.resource_id, p.id, p.filename, p.type, p.scale, p.description, p.created FROM photo p INNER JOIN $r = q("SELECT p.resource_id, p.id, p.filename, p.type, p.scale, p.description, p.created FROM photo p INNER JOIN

View file

@ -554,18 +554,8 @@ function zot_gethub($arr,$multiple = false) {
if($arr['guid'] && $arr['guid_sig'] && $arr['url'] && $arr['url_sig']) { if($arr['guid'] && $arr['guid_sig'] && $arr['url'] && $arr['url_sig']) {
$blacklisted = false; if(! check_siteallowed($arr['url'])) {
$bl1 = get_config('system','blacklisted_sites'); logger('blacklisted site: ' . $arr['url']);
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
if($bl && strpos($arr['url'],$bl) !== false) {
$blacklisted = true;
break;
}
}
}
if($blacklisted) {
logger('zot_gethub: blacklisted site: ' . $arr['url']);
return null; return null;
} }
@ -745,8 +735,8 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|| ($r[0]['xchan_follow'] != $arr['follow_url']) || ($r[0]['xchan_follow'] != $arr['follow_url'])
|| ($r[0]['xchan_connpage'] != $arr['connect_url']) || ($r[0]['xchan_connpage'] != $arr['connect_url'])
|| ($r[0]['xchan_url'] != $arr['url']) || ($r[0]['xchan_url'] != $arr['url'])
|| $hidden_changed || adult_changed || deleted_changed || $pubforum_changed ) { || $hidden_changed || $adult_changed || $deleted_changed || $pubforum_changed ) {
$r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_follow = '%s', $rup = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_follow = '%s',
xchan_connpage = '%s', xchan_hidden = %d, xchan_selfcensored = %d, xchan_deleted = %d, xchan_pubforum = %d, xchan_connpage = '%s', xchan_hidden = %d, xchan_selfcensored = %d, xchan_deleted = %d, xchan_pubforum = %d,
xchan_addr = '%s', xchan_url = '%s' where xchan_hash = '%s'", xchan_addr = '%s', xchan_url = '%s' where xchan_hash = '%s'",
dbesc(($arr['name']) ? $arr['name'] : '-'), dbesc(($arr['name']) ? $arr['name'] : '-'),
@ -763,8 +753,8 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
dbesc($xchan_hash) dbesc($xchan_hash)
); );
logger('import_xchan: existing: ' . print_r($r[0],true), LOGGER_DATA); logger('import_xchan: update: existing: ' . print_r($r[0],true), LOGGER_DATA);
logger('import_xchan: new: ' . print_r($arr,true), LOGGER_DATA); logger('import_xchan: update: new: ' . print_r($arr,true), LOGGER_DATA);
$what .= 'xchan '; $what .= 'xchan ';
$changed = true; $changed = true;
} }
@ -1246,6 +1236,10 @@ function zot_import($arr, $sender_url) {
$no_dups = array(); $no_dups = array();
if($deliveries) { if($deliveries) {
foreach($deliveries as $d) { foreach($deliveries as $d) {
if(! is_array($d)) {
logger('Delivery hash array is not an array: ' . print_r($d,true));
continue;
}
if(! in_array($d['hash'],$no_dups)) if(! in_array($d['hash'],$no_dups))
$no_dups[] = $d['hash']; $no_dups[] = $d['hash'];
} }
@ -1933,11 +1927,12 @@ function remove_community_tag($sender, $arr, $uid) {
return; return;
} }
q("delete from term where uid = %d and oid = %d and otype = %d and type = %d and term = '%s' and url = '%s'", q("delete from term where uid = %d and oid = %d and otype = %d and type in ( %d, %d ) and term = '%s' and url = '%s'",
intval($uid), intval($uid),
intval($r[0]['id']), intval($r[0]['id']),
intval(TERM_OBJ_POST), intval(TERM_OBJ_POST),
intval(TERM_HASHTAG), intval(TERM_HASHTAG),
intval(TERM_COMMUNITYTAG),
dbesc($i['object']['title']), dbesc($i['object']['title']),
dbesc(get_rel_link($i['object']['link'],'alternate')) dbesc(get_rel_link($i['object']['link'],'alternate'))
); );
@ -3949,6 +3944,7 @@ function delivery_report_is_storable($dr) {
if(! $c) if(! $c)
return false; return false;
// is the recipient one of our connections, or do we want to store every report? // is the recipient one of our connections, or do we want to store every report?
$r = explode(' ', $dr['recipient']); $r = explode(' ', $dr['recipient']);
@ -3957,6 +3953,14 @@ function delivery_report_is_storable($dr) {
if($pcf) if($pcf)
return true; return true;
// We always add ourself as a recipient to private and relayed posts
// 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'))
return false;
$r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1", $r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($rxchan), dbesc($rxchan),
intval($c[0]['channel_id']) intval($c[0]['channel_id'])

View file

@ -36,6 +36,10 @@ require_once('include/dba/dba_driver.php');
if(! $a->install) { if(! $a->install) {
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install); $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install);
if(! $db->connected) {
system_unavailable();
}
unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
/** /**

View file

@ -341,3 +341,44 @@ This is obvious as soon as you notice that the cron uses proc_open to
execute php-scripts that also use proc_open, but it took me quite some time to execute php-scripts that also use proc_open, but it took me quite some time to
find that out. I hope this saves some time for other people using suhosin with find that out. I hope this saves some time for other people using suhosin with
function blacklists. function blacklists.
#####################################################################
- Apache processes hanging, using as much CPU as they can
#####################################################################
This seems to happen sometimes if you use mpm_prefork and the PHP process
started by Apache cannot get database access.
Consider the following settings:
In /etc/apache2/mods-enabled/mpm_prefork.conf (Debian, path and file name
may vary depending on your OS and distribution), set
GracefulShutdownTimeout 300
This makes sure that Apache processes that are running wild will not do so
forever, but will be killed if they didn't stop five minutes after a
shutdown command was sent to the process.
If you expect high load on your server (public servers, e.g.), also make
sure that Apache will not spawn more processes than MySQL will accept
connections.
In the default Debian configuration, in
/etc/apache2/mods-enabled/mpm_prefork.conf the maximum number of workers
is set to 150:
MaxRequestWorkers 150
However, in /etc/mysql/my.cnf the maximum number of connection is set to
100:
max_connections = 100
150 workers are a lot and probably too much for small servers. However you
set those values, make sure that the number of Apache workers is smaller
than the number of connections MySQL accepts, leaving some room for other
stuff on your server that might access MySQL, and Hubzilla's poller which
needs MySQL access, too. A good setting for a medium-sized hub might be to
keep MySQL's max_connections at 100 and set mpm_prefork's
MaxRequestWorkers to 70.

View file

@ -1,9 +1,8 @@
/*! /*!
* Bootstrap v3.3.4 (http://getbootstrap.com) * Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
.btn-default, .btn-default,
.btn-primary, .btn-primary,
.btn-success, .btn-success,
@ -29,6 +28,27 @@
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
} }
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge, .btn-default .badge,
.btn-primary .badge, .btn-primary .badge,
.btn-success .badge, .btn-success .badge,
@ -64,8 +84,23 @@
border-color: #dbdbdb; border-color: #dbdbdb;
} }
.btn-default.disabled, .btn-default.disabled,
.btn-default:disabled, .btn-default[disabled],
.btn-default[disabled] { fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0; background-color: #e0e0e0;
background-image: none; background-image: none;
} }
@ -90,8 +125,23 @@
border-color: #245580; border-color: #245580;
} }
.btn-primary.disabled, .btn-primary.disabled,
.btn-primary:disabled, .btn-primary[disabled],
.btn-primary[disabled] { fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88; background-color: #265a88;
background-image: none; background-image: none;
} }
@ -116,8 +166,23 @@
border-color: #3e8f3e; border-color: #3e8f3e;
} }
.btn-success.disabled, .btn-success.disabled,
.btn-success:disabled, .btn-success[disabled],
.btn-success[disabled] { fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641; background-color: #419641;
background-image: none; background-image: none;
} }
@ -142,8 +207,23 @@
border-color: #28a4c9; border-color: #28a4c9;
} }
.btn-info.disabled, .btn-info.disabled,
.btn-info:disabled, .btn-info[disabled],
.btn-info[disabled] { fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2; background-color: #2aabd2;
background-image: none; background-image: none;
} }
@ -168,8 +248,23 @@
border-color: #e38d13; border-color: #e38d13;
} }
.btn-warning.disabled, .btn-warning.disabled,
.btn-warning:disabled, .btn-warning[disabled],
.btn-warning[disabled] { fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316; background-color: #eb9316;
background-image: none; background-image: none;
} }
@ -194,8 +289,23 @@
border-color: #b92c28; border-color: #b92c28;
} }
.btn-danger.disabled, .btn-danger.disabled,
.btn-danger:disabled, .btn-danger[disabled],
.btn-danger[disabled] { fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a; background-color: #c12e2a;
background-image: none; background-image: none;
} }
@ -260,6 +370,7 @@
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x; background-repeat: repeat-x;
border-radius: 4px;
} }
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a { .navbar-inverse .navbar-nav > .active > a {

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,9 @@
/*! /*!
* Bootstrap v3.3.4 (http://getbootstrap.com) * Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
html { html {
font-family: sans-serif; font-family: sans-serif;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
@ -239,9 +238,6 @@ th {
h3 { h3 {
page-break-after: avoid; page-break-after: avoid;
} }
select {
background: #fff !important;
}
.navbar { .navbar {
display: none; display: none;
} }
@ -1344,62 +1340,72 @@ mark,
.text-primary { .text-primary {
color: #337ab7; color: #337ab7;
} }
a.text-primary:hover { a.text-primary:hover,
a.text-primary:focus {
color: #286090; color: #286090;
} }
.text-success { .text-success {
color: #3c763d; color: #3c763d;
} }
a.text-success:hover { a.text-success:hover,
a.text-success:focus {
color: #2b542c; color: #2b542c;
} }
.text-info { .text-info {
color: #31708f; color: #31708f;
} }
a.text-info:hover { a.text-info:hover,
a.text-info:focus {
color: #245269; color: #245269;
} }
.text-warning { .text-warning {
color: #8a6d3b; color: #8a6d3b;
} }
a.text-warning:hover { a.text-warning:hover,
a.text-warning:focus {
color: #66512c; color: #66512c;
} }
.text-danger { .text-danger {
color: #a94442; color: #a94442;
} }
a.text-danger:hover { a.text-danger:hover,
a.text-danger:focus {
color: #843534; color: #843534;
} }
.bg-primary { .bg-primary {
color: #fff; color: #fff;
background-color: #337ab7; background-color: #337ab7;
} }
a.bg-primary:hover { a.bg-primary:hover,
a.bg-primary:focus {
background-color: #286090; background-color: #286090;
} }
.bg-success { .bg-success {
background-color: #dff0d8; background-color: #dff0d8;
} }
a.bg-success:hover { a.bg-success:hover,
a.bg-success:focus {
background-color: #c1e2b3; background-color: #c1e2b3;
} }
.bg-info { .bg-info {
background-color: #d9edf7; background-color: #d9edf7;
} }
a.bg-info:hover { a.bg-info:hover,
a.bg-info:focus {
background-color: #afd9ee; background-color: #afd9ee;
} }
.bg-warning { .bg-warning {
background-color: #fcf8e3; background-color: #fcf8e3;
} }
a.bg-warning:hover { a.bg-warning:hover,
a.bg-warning:focus {
background-color: #f7ecb5; background-color: #f7ecb5;
} }
.bg-danger { .bg-danger {
background-color: #f2dede; background-color: #f2dede;
} }
a.bg-danger:hover { a.bg-danger:hover,
a.bg-danger:focus {
background-color: #e4b9b9; background-color: #e4b9b9;
} }
.page-header { .page-header {
@ -2593,10 +2599,10 @@ input[type="search"] {
-webkit-appearance: none; -webkit-appearance: none;
} }
@media screen and (-webkit-min-device-pixel-ratio: 0) { @media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"], input[type="date"].form-control,
input[type="time"], input[type="time"].form-control,
input[type="datetime-local"], input[type="datetime-local"].form-control,
input[type="month"] { input[type="month"].form-control {
line-height: 34px; line-height: 34px;
} }
input[type="date"].input-sm, input[type="date"].input-sm,
@ -2718,18 +2724,18 @@ select[multiple].input-sm {
line-height: 1.5; line-height: 1.5;
border-radius: 3px; border-radius: 3px;
} }
select.form-group-sm .form-control { .form-group-sm select.form-control {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
textarea.form-group-sm .form-control, .form-group-sm textarea.form-control,
select[multiple].form-group-sm .form-control { .form-group-sm select[multiple].form-control {
height: auto; height: auto;
} }
.form-group-sm .form-control-static { .form-group-sm .form-control-static {
height: 30px; height: 30px;
min-height: 32px; min-height: 32px;
padding: 5px 10px; padding: 6px 10px;
font-size: 12px; font-size: 12px;
line-height: 1.5; line-height: 1.5;
} }
@ -2755,18 +2761,18 @@ select[multiple].input-lg {
line-height: 1.3333333; line-height: 1.3333333;
border-radius: 6px; border-radius: 6px;
} }
select.form-group-lg .form-control { .form-group-lg select.form-control {
height: 46px; height: 46px;
line-height: 46px; line-height: 46px;
} }
textarea.form-group-lg .form-control, .form-group-lg textarea.form-control,
select[multiple].form-group-lg .form-control { .form-group-lg select[multiple].form-control {
height: auto; height: auto;
} }
.form-group-lg .form-control-static { .form-group-lg .form-control-static {
height: 46px; height: 46px;
min-height: 38px; min-height: 38px;
padding: 10px 16px; padding: 11px 16px;
font-size: 18px; font-size: 18px;
line-height: 1.3333333; line-height: 1.3333333;
} }
@ -2788,12 +2794,16 @@ select[multiple].form-group-lg .form-control {
text-align: center; text-align: center;
pointer-events: none; pointer-events: none;
} }
.input-lg + .form-control-feedback { .input-lg + .form-control-feedback,
.input-group-lg + .form-control-feedback,
.form-group-lg .form-control + .form-control-feedback {
width: 46px; width: 46px;
height: 46px; height: 46px;
line-height: 46px; line-height: 46px;
} }
.input-sm + .form-control-feedback { .input-sm + .form-control-feedback,
.input-group-sm + .form-control-feedback,
.form-group-sm .form-control + .form-control-feedback {
width: 30px; width: 30px;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
@ -2979,11 +2989,13 @@ select[multiple].form-group-lg .form-control {
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label { .form-horizontal .form-group-lg .control-label {
padding-top: 14.333333px; padding-top: 14.333333px;
font-size: 18px;
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label { .form-horizontal .form-group-sm .control-label {
padding-top: 6px; padding-top: 6px;
font-size: 12px;
} }
} }
.btn { .btn {
@ -3033,21 +3045,32 @@ select[multiple].form-group-lg .form-control {
.btn.disabled, .btn.disabled,
.btn[disabled], .btn[disabled],
fieldset[disabled] .btn { fieldset[disabled] .btn {
pointer-events: none;
cursor: not-allowed; cursor: not-allowed;
filter: alpha(opacity=65); filter: alpha(opacity=65);
-webkit-box-shadow: none; -webkit-box-shadow: none;
box-shadow: none; box-shadow: none;
opacity: .65; opacity: .65;
} }
a.btn.disabled,
fieldset[disabled] a.btn {
pointer-events: none;
}
.btn-default { .btn-default {
color: #333; color: #333;
background-color: #fff; background-color: #fff;
border-color: #ccc; border-color: #ccc;
} }
.btn-default:hover,
.btn-default:focus, .btn-default:focus,
.btn-default.focus, .btn-default.focus {
color: #333;
background-color: #e6e6e6;
border-color: #8c8c8c;
}
.btn-default:hover {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.btn-default:active, .btn-default:active,
.btn-default.active, .btn-default.active,
.open > .dropdown-toggle.btn-default { .open > .dropdown-toggle.btn-default {
@ -3055,6 +3078,19 @@ fieldset[disabled] .btn {
background-color: #e6e6e6; background-color: #e6e6e6;
border-color: #adadad; border-color: #adadad;
} }
.btn-default:active:hover,
.btn-default.active:hover,
.open > .dropdown-toggle.btn-default:hover,
.btn-default:active:focus,
.btn-default.active:focus,
.open > .dropdown-toggle.btn-default:focus,
.btn-default:active.focus,
.btn-default.active.focus,
.open > .dropdown-toggle.btn-default.focus {
color: #333;
background-color: #d4d4d4;
border-color: #8c8c8c;
}
.btn-default:active, .btn-default:active,
.btn-default.active, .btn-default.active,
.open > .dropdown-toggle.btn-default { .open > .dropdown-toggle.btn-default {
@ -3090,9 +3126,17 @@ fieldset[disabled] .btn-default.active {
background-color: #337ab7; background-color: #337ab7;
border-color: #2e6da4; border-color: #2e6da4;
} }
.btn-primary:hover,
.btn-primary:focus, .btn-primary:focus,
.btn-primary.focus, .btn-primary.focus {
color: #fff;
background-color: #286090;
border-color: #122b40;
}
.btn-primary:hover {
color: #fff;
background-color: #286090;
border-color: #204d74;
}
.btn-primary:active, .btn-primary:active,
.btn-primary.active, .btn-primary.active,
.open > .dropdown-toggle.btn-primary { .open > .dropdown-toggle.btn-primary {
@ -3100,6 +3144,19 @@ fieldset[disabled] .btn-default.active {
background-color: #286090; background-color: #286090;
border-color: #204d74; border-color: #204d74;
} }
.btn-primary:active:hover,
.btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary:hover,
.btn-primary:active:focus,
.btn-primary.active:focus,
.open > .dropdown-toggle.btn-primary:focus,
.btn-primary:active.focus,
.btn-primary.active.focus,
.open > .dropdown-toggle.btn-primary.focus {
color: #fff;
background-color: #204d74;
border-color: #122b40;
}
.btn-primary:active, .btn-primary:active,
.btn-primary.active, .btn-primary.active,
.open > .dropdown-toggle.btn-primary { .open > .dropdown-toggle.btn-primary {
@ -3135,9 +3192,17 @@ fieldset[disabled] .btn-primary.active {
background-color: #5cb85c; background-color: #5cb85c;
border-color: #4cae4c; border-color: #4cae4c;
} }
.btn-success:hover,
.btn-success:focus, .btn-success:focus,
.btn-success.focus, .btn-success.focus {
color: #fff;
background-color: #449d44;
border-color: #255625;
}
.btn-success:hover {
color: #fff;
background-color: #449d44;
border-color: #398439;
}
.btn-success:active, .btn-success:active,
.btn-success.active, .btn-success.active,
.open > .dropdown-toggle.btn-success { .open > .dropdown-toggle.btn-success {
@ -3145,6 +3210,19 @@ fieldset[disabled] .btn-primary.active {
background-color: #449d44; background-color: #449d44;
border-color: #398439; border-color: #398439;
} }
.btn-success:active:hover,
.btn-success.active:hover,
.open > .dropdown-toggle.btn-success:hover,
.btn-success:active:focus,
.btn-success.active:focus,
.open > .dropdown-toggle.btn-success:focus,
.btn-success:active.focus,
.btn-success.active.focus,
.open > .dropdown-toggle.btn-success.focus {
color: #fff;
background-color: #398439;
border-color: #255625;
}
.btn-success:active, .btn-success:active,
.btn-success.active, .btn-success.active,
.open > .dropdown-toggle.btn-success { .open > .dropdown-toggle.btn-success {
@ -3180,9 +3258,17 @@ fieldset[disabled] .btn-success.active {
background-color: #5bc0de; background-color: #5bc0de;
border-color: #46b8da; border-color: #46b8da;
} }
.btn-info:hover,
.btn-info:focus, .btn-info:focus,
.btn-info.focus, .btn-info.focus {
color: #fff;
background-color: #31b0d5;
border-color: #1b6d85;
}
.btn-info:hover {
color: #fff;
background-color: #31b0d5;
border-color: #269abc;
}
.btn-info:active, .btn-info:active,
.btn-info.active, .btn-info.active,
.open > .dropdown-toggle.btn-info { .open > .dropdown-toggle.btn-info {
@ -3190,6 +3276,19 @@ fieldset[disabled] .btn-success.active {
background-color: #31b0d5; background-color: #31b0d5;
border-color: #269abc; border-color: #269abc;
} }
.btn-info:active:hover,
.btn-info.active:hover,
.open > .dropdown-toggle.btn-info:hover,
.btn-info:active:focus,
.btn-info.active:focus,
.open > .dropdown-toggle.btn-info:focus,
.btn-info:active.focus,
.btn-info.active.focus,
.open > .dropdown-toggle.btn-info.focus {
color: #fff;
background-color: #269abc;
border-color: #1b6d85;
}
.btn-info:active, .btn-info:active,
.btn-info.active, .btn-info.active,
.open > .dropdown-toggle.btn-info { .open > .dropdown-toggle.btn-info {
@ -3225,9 +3324,17 @@ fieldset[disabled] .btn-info.active {
background-color: #f0ad4e; background-color: #f0ad4e;
border-color: #eea236; border-color: #eea236;
} }
.btn-warning:hover,
.btn-warning:focus, .btn-warning:focus,
.btn-warning.focus, .btn-warning.focus {
color: #fff;
background-color: #ec971f;
border-color: #985f0d;
}
.btn-warning:hover {
color: #fff;
background-color: #ec971f;
border-color: #d58512;
}
.btn-warning:active, .btn-warning:active,
.btn-warning.active, .btn-warning.active,
.open > .dropdown-toggle.btn-warning { .open > .dropdown-toggle.btn-warning {
@ -3235,6 +3342,19 @@ fieldset[disabled] .btn-info.active {
background-color: #ec971f; background-color: #ec971f;
border-color: #d58512; border-color: #d58512;
} }
.btn-warning:active:hover,
.btn-warning.active:hover,
.open > .dropdown-toggle.btn-warning:hover,
.btn-warning:active:focus,
.btn-warning.active:focus,
.open > .dropdown-toggle.btn-warning:focus,
.btn-warning:active.focus,
.btn-warning.active.focus,
.open > .dropdown-toggle.btn-warning.focus {
color: #fff;
background-color: #d58512;
border-color: #985f0d;
}
.btn-warning:active, .btn-warning:active,
.btn-warning.active, .btn-warning.active,
.open > .dropdown-toggle.btn-warning { .open > .dropdown-toggle.btn-warning {
@ -3270,9 +3390,17 @@ fieldset[disabled] .btn-warning.active {
background-color: #d9534f; background-color: #d9534f;
border-color: #d43f3a; border-color: #d43f3a;
} }
.btn-danger:hover,
.btn-danger:focus, .btn-danger:focus,
.btn-danger.focus, .btn-danger.focus {
color: #fff;
background-color: #c9302c;
border-color: #761c19;
}
.btn-danger:hover {
color: #fff;
background-color: #c9302c;
border-color: #ac2925;
}
.btn-danger:active, .btn-danger:active,
.btn-danger.active, .btn-danger.active,
.open > .dropdown-toggle.btn-danger { .open > .dropdown-toggle.btn-danger {
@ -3280,6 +3408,19 @@ fieldset[disabled] .btn-warning.active {
background-color: #c9302c; background-color: #c9302c;
border-color: #ac2925; border-color: #ac2925;
} }
.btn-danger:active:hover,
.btn-danger.active:hover,
.open > .dropdown-toggle.btn-danger:hover,
.btn-danger:active:focus,
.btn-danger.active:focus,
.open > .dropdown-toggle.btn-danger:focus,
.btn-danger:active.focus,
.btn-danger.active.focus,
.open > .dropdown-toggle.btn-danger.focus {
color: #fff;
background-color: #ac2925;
border-color: #761c19;
}
.btn-danger:active, .btn-danger:active,
.btn-danger.active, .btn-danger.active,
.open > .dropdown-toggle.btn-danger { .open > .dropdown-toggle.btn-danger {
@ -3418,6 +3559,7 @@ tbody.collapse.in {
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: 4px dashed; border-top: 4px dashed;
border-top: 4px solid \9;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-left: 4px solid transparent; border-left: 4px solid transparent;
} }
@ -3534,7 +3676,8 @@ tbody.collapse.in {
.navbar-fixed-bottom .dropdown .caret { .navbar-fixed-bottom .dropdown .caret {
content: ""; content: "";
border-top: 0; border-top: 0;
border-bottom: 4px solid; border-bottom: 4px dashed;
border-bottom: 4px solid \9;
} }
.dropup .dropdown-menu, .dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu { .navbar-fixed-bottom .dropdown .dropdown-menu {
@ -3582,6 +3725,7 @@ tbody.collapse.in {
.btn-toolbar { .btn-toolbar {
margin-left: -5px; margin-left: -5px;
} }
.btn-toolbar .btn,
.btn-toolbar .btn-group, .btn-toolbar .btn-group,
.btn-toolbar .input-group { .btn-toolbar .input-group {
float: left; float: left;
@ -3872,6 +4016,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
} }
.input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group { .input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -1px; margin-left: -1px;
} }
.nav { .nav {
@ -4647,6 +4792,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination > li > span:hover, .pagination > li > span:hover,
.pagination > li > a:focus, .pagination > li > a:focus,
.pagination > li > span:focus { .pagination > li > span:focus {
z-index: 3;
color: #23527c; color: #23527c;
background-color: #eee; background-color: #eee;
border-color: #ddd; border-color: #ddd;
@ -4678,6 +4824,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination-lg > li > span { .pagination-lg > li > span {
padding: 10px 16px; padding: 10px 16px;
font-size: 18px; font-size: 18px;
line-height: 1.3333333;
} }
.pagination-lg > li:first-child > a, .pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span { .pagination-lg > li:first-child > span {
@ -4693,6 +4840,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination-sm > li > span { .pagination-sm > li > span {
padding: 5px 10px; padding: 5px 10px;
font-size: 12px; font-size: 12px;
line-height: 1.5;
} }
.pagination-sm > li:first-child > a, .pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span { .pagination-sm > li:first-child > span {
@ -4819,7 +4967,7 @@ a.label:focus {
color: #fff; color: #fff;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: middle;
background-color: #777; background-color: #777;
border-radius: 10px; border-radius: 10px;
} }
@ -4856,7 +5004,8 @@ a.badge:focus {
margin-left: 3px; margin-left: 3px;
} }
.jumbotron { .jumbotron {
padding: 30px 15px; padding-top: 30px;
padding-bottom: 30px;
margin-bottom: 30px; margin-bottom: 30px;
color: inherit; color: inherit;
background-color: #eee; background-color: #eee;
@ -4882,7 +5031,8 @@ a.badge:focus {
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.jumbotron { .jumbotron {
padding: 48px 0; padding-top: 48px;
padding-bottom: 48px;
} }
.container .jumbotron, .container .jumbotron,
.container-fluid .jumbotron { .container-fluid .jumbotron {
@ -5106,6 +5256,9 @@ a.thumbnail.active {
.media-object { .media-object {
display: block; display: block;
} }
.media-object.img-thumbnail {
max-width: none;
}
.media-right, .media-right,
.media > .pull-right { .media > .pull-right {
padding-left: 10px; padding-left: 10px;
@ -5155,18 +5308,26 @@ a.thumbnail.active {
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
} }
a.list-group-item { a.list-group-item,
button.list-group-item {
color: #555; color: #555;
} }
a.list-group-item .list-group-item-heading { a.list-group-item .list-group-item-heading,
button.list-group-item .list-group-item-heading {
color: #333; color: #333;
} }
a.list-group-item:hover, a.list-group-item:hover,
a.list-group-item:focus { button.list-group-item:hover,
a.list-group-item:focus,
button.list-group-item:focus {
color: #555; color: #555;
text-decoration: none; text-decoration: none;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
button.list-group-item {
width: 100%;
text-align: left;
}
.list-group-item.disabled, .list-group-item.disabled,
.list-group-item.disabled:hover, .list-group-item.disabled:hover,
.list-group-item.disabled:focus { .list-group-item.disabled:focus {
@ -5212,20 +5373,27 @@ a.list-group-item:focus {
color: #3c763d; color: #3c763d;
background-color: #dff0d8; background-color: #dff0d8;
} }
a.list-group-item-success { a.list-group-item-success,
button.list-group-item-success {
color: #3c763d; color: #3c763d;
} }
a.list-group-item-success .list-group-item-heading { a.list-group-item-success .list-group-item-heading,
button.list-group-item-success .list-group-item-heading {
color: inherit; color: inherit;
} }
a.list-group-item-success:hover, a.list-group-item-success:hover,
a.list-group-item-success:focus { button.list-group-item-success:hover,
a.list-group-item-success:focus,
button.list-group-item-success:focus {
color: #3c763d; color: #3c763d;
background-color: #d0e9c6; background-color: #d0e9c6;
} }
a.list-group-item-success.active, a.list-group-item-success.active,
button.list-group-item-success.active,
a.list-group-item-success.active:hover, a.list-group-item-success.active:hover,
a.list-group-item-success.active:focus { button.list-group-item-success.active:hover,
a.list-group-item-success.active:focus,
button.list-group-item-success.active:focus {
color: #fff; color: #fff;
background-color: #3c763d; background-color: #3c763d;
border-color: #3c763d; border-color: #3c763d;
@ -5234,20 +5402,27 @@ a.list-group-item-success.active:focus {
color: #31708f; color: #31708f;
background-color: #d9edf7; background-color: #d9edf7;
} }
a.list-group-item-info { a.list-group-item-info,
button.list-group-item-info {
color: #31708f; color: #31708f;
} }
a.list-group-item-info .list-group-item-heading { a.list-group-item-info .list-group-item-heading,
button.list-group-item-info .list-group-item-heading {
color: inherit; color: inherit;
} }
a.list-group-item-info:hover, a.list-group-item-info:hover,
a.list-group-item-info:focus { button.list-group-item-info:hover,
a.list-group-item-info:focus,
button.list-group-item-info:focus {
color: #31708f; color: #31708f;
background-color: #c4e3f3; background-color: #c4e3f3;
} }
a.list-group-item-info.active, a.list-group-item-info.active,
button.list-group-item-info.active,
a.list-group-item-info.active:hover, a.list-group-item-info.active:hover,
a.list-group-item-info.active:focus { button.list-group-item-info.active:hover,
a.list-group-item-info.active:focus,
button.list-group-item-info.active:focus {
color: #fff; color: #fff;
background-color: #31708f; background-color: #31708f;
border-color: #31708f; border-color: #31708f;
@ -5256,20 +5431,27 @@ a.list-group-item-info.active:focus {
color: #8a6d3b; color: #8a6d3b;
background-color: #fcf8e3; background-color: #fcf8e3;
} }
a.list-group-item-warning { a.list-group-item-warning,
button.list-group-item-warning {
color: #8a6d3b; color: #8a6d3b;
} }
a.list-group-item-warning .list-group-item-heading { a.list-group-item-warning .list-group-item-heading,
button.list-group-item-warning .list-group-item-heading {
color: inherit; color: inherit;
} }
a.list-group-item-warning:hover, a.list-group-item-warning:hover,
a.list-group-item-warning:focus { button.list-group-item-warning:hover,
a.list-group-item-warning:focus,
button.list-group-item-warning:focus {
color: #8a6d3b; color: #8a6d3b;
background-color: #faf2cc; background-color: #faf2cc;
} }
a.list-group-item-warning.active, a.list-group-item-warning.active,
button.list-group-item-warning.active,
a.list-group-item-warning.active:hover, a.list-group-item-warning.active:hover,
a.list-group-item-warning.active:focus { button.list-group-item-warning.active:hover,
a.list-group-item-warning.active:focus,
button.list-group-item-warning.active:focus {
color: #fff; color: #fff;
background-color: #8a6d3b; background-color: #8a6d3b;
border-color: #8a6d3b; border-color: #8a6d3b;
@ -5278,20 +5460,27 @@ a.list-group-item-warning.active:focus {
color: #a94442; color: #a94442;
background-color: #f2dede; background-color: #f2dede;
} }
a.list-group-item-danger { a.list-group-item-danger,
button.list-group-item-danger {
color: #a94442; color: #a94442;
} }
a.list-group-item-danger .list-group-item-heading { a.list-group-item-danger .list-group-item-heading,
button.list-group-item-danger .list-group-item-heading {
color: inherit; color: inherit;
} }
a.list-group-item-danger:hover, a.list-group-item-danger:hover,
a.list-group-item-danger:focus { button.list-group-item-danger:hover,
a.list-group-item-danger:focus,
button.list-group-item-danger:focus {
color: #a94442; color: #a94442;
background-color: #ebcccc; background-color: #ebcccc;
} }
a.list-group-item-danger.active, a.list-group-item-danger.active,
button.list-group-item-danger.active,
a.list-group-item-danger.active:hover, a.list-group-item-danger.active:hover,
a.list-group-item-danger.active:focus { button.list-group-item-danger.active:hover,
a.list-group-item-danger.active:focus,
button.list-group-item-danger.active:focus {
color: #fff; color: #fff;
background-color: #a94442; background-color: #a94442;
border-color: #a94442; border-color: #a94442;
@ -5365,6 +5554,10 @@ a.list-group-item-danger.active:focus {
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.panel-heading + .list-group .list-group-item:first-child { .panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0; border-top-width: 0;
} }
@ -5846,10 +6039,23 @@ button.close {
display: block; display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
font-style: normal;
font-weight: normal; font-weight: normal;
line-height: 1.4; line-height: 1.42857143;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal;
filter: alpha(opacity=0); filter: alpha(opacity=0);
opacity: 0; opacity: 0;
line-break: auto;
} }
.tooltip.in { .tooltip.in {
filter: alpha(opacity=90); filter: alpha(opacity=90);
@ -5876,7 +6082,6 @@ button.close {
padding: 3px 8px; padding: 3px 8px;
color: #fff; color: #fff;
text-align: center; text-align: center;
text-decoration: none;
background-color: #000; background-color: #000;
border-radius: 4px; border-radius: 4px;
} }
@ -5953,9 +6158,18 @@ button.close {
padding: 1px; padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
font-style: normal;
font-weight: normal; font-weight: normal;
line-height: 1.42857143; line-height: 1.42857143;
text-align: left; text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal; white-space: normal;
background-color: #fff; background-color: #fff;
-webkit-background-clip: padding-box; -webkit-background-clip: padding-box;
@ -5965,6 +6179,8 @@ button.close {
border-radius: 6px; border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2); box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
line-break: auto;
} }
.popover.top { .popover.top {
margin-top: -10px; margin-top: -10px;
@ -6092,8 +6308,8 @@ button.close {
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
backface-visibility: hidden; backface-visibility: hidden;
-webkit-perspective: 1000; -webkit-perspective: 1000px;
perspective: 1000; perspective: 1000px;
} }
.carousel-inner > .item.next, .carousel-inner > .item.next,
.carousel-inner > .item.active.right { .carousel-inner > .item.active.right {
@ -6192,6 +6408,7 @@ button.close {
top: 50%; top: 50%;
z-index: 5; z-index: 5;
display: inline-block; display: inline-block;
margin-top: -10px;
} }
.carousel-control .icon-prev, .carousel-control .icon-prev,
.carousel-control .glyphicon-chevron-left { .carousel-control .glyphicon-chevron-left {
@ -6207,7 +6424,6 @@ button.close {
.carousel-control .icon-next { .carousel-control .icon-next {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: -10px;
font-family: serif; font-family: serif;
line-height: 1; line-height: 1;
} }
@ -6399,7 +6615,7 @@ button.close {
display: block !important; display: block !important;
} }
table.visible-xs { table.visible-xs {
display: table; display: table !important;
} }
tr.visible-xs { tr.visible-xs {
display: table-row !important; display: table-row !important;
@ -6429,7 +6645,7 @@ button.close {
display: block !important; display: block !important;
} }
table.visible-sm { table.visible-sm {
display: table; display: table !important;
} }
tr.visible-sm { tr.visible-sm {
display: table-row !important; display: table-row !important;
@ -6459,7 +6675,7 @@ button.close {
display: block !important; display: block !important;
} }
table.visible-md { table.visible-md {
display: table; display: table !important;
} }
tr.visible-md { tr.visible-md {
display: table-row !important; display: table-row !important;
@ -6489,7 +6705,7 @@ button.close {
display: block !important; display: block !important;
} }
table.visible-lg { table.visible-lg {
display: table; display: table !important;
} }
tr.visible-lg { tr.visible-lg {
display: table-row !important; display: table-row !important;
@ -6542,7 +6758,7 @@ button.close {
display: block !important; display: block !important;
} }
table.visible-print { table.visible-print {
display: table; display: table !important;
} }
tr.visible-print { tr.visible-print {
display: table-row !important; display: table-row !important;

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
/*! /*!
* Bootstrap v3.3.4 (http://getbootstrap.com) * Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under the MIT license
*/ */
if (typeof jQuery === 'undefined') { if (typeof jQuery === 'undefined') {
@ -17,7 +17,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: transition.js v3.3.4 * Bootstrap: transition.js v3.3.5
* http://getbootstrap.com/javascript/#transitions * http://getbootstrap.com/javascript/#transitions
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -77,7 +77,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: alert.js v3.3.4 * Bootstrap: alert.js v3.3.5
* http://getbootstrap.com/javascript/#alerts * http://getbootstrap.com/javascript/#alerts
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close) $(el).on('click', dismiss, this.close)
} }
Alert.VERSION = '3.3.4' Alert.VERSION = '3.3.5'
Alert.TRANSITION_DURATION = 150 Alert.TRANSITION_DURATION = 150
@ -172,7 +172,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: button.js v3.3.4 * Bootstrap: button.js v3.3.5
* http://getbootstrap.com/javascript/#buttons * http://getbootstrap.com/javascript/#buttons
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false this.isLoading = false
} }
Button.VERSION = '3.3.4' Button.VERSION = '3.3.5'
Button.DEFAULTS = { Button.DEFAULTS = {
loadingText: 'loading...' loadingText: 'loading...'
@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') {
var val = $el.is('input') ? 'val' : 'html' var val = $el.is('input') ? 'val' : 'html'
var data = $el.data() var data = $el.data()
state = state + 'Text' state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]()) if (data.resetText == null) $el.data('resetText', $el[val]())
@ -229,15 +229,19 @@ if (typeof jQuery === 'undefined') {
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') $parent.find('.active').removeClass('active')
this.$element.addClass('active')
} else if ($input.prop('type') == 'checkbox') {
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
this.$element.toggleClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') $input.prop('checked', this.$element.hasClass('active'))
if (changed) $input.trigger('change')
} else { } else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active')) this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
this.$element.toggleClass('active')
} }
if (changed) this.$element.toggleClass('active')
} }
@ -280,7 +284,7 @@ if (typeof jQuery === 'undefined') {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') Plugin.call($btn, 'toggle')
e.preventDefault() if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
}) })
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@ -289,7 +293,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: carousel.js v3.3.4 * Bootstrap: carousel.js v3.3.5
* http://getbootstrap.com/javascript/#carousel * http://getbootstrap.com/javascript/#carousel
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -320,7 +324,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
} }
Carousel.VERSION = '3.3.4' Carousel.VERSION = '3.3.5'
Carousel.TRANSITION_DURATION = 600 Carousel.TRANSITION_DURATION = 600
@ -527,7 +531,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: collapse.js v3.3.4 * Bootstrap: collapse.js v3.3.5
* http://getbootstrap.com/javascript/#collapse * http://getbootstrap.com/javascript/#collapse
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -557,7 +561,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle() if (this.options.toggle) this.toggle()
} }
Collapse.VERSION = '3.3.4' Collapse.VERSION = '3.3.5'
Collapse.TRANSITION_DURATION = 350 Collapse.TRANSITION_DURATION = 350
@ -739,7 +743,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: dropdown.js v3.3.4 * Bootstrap: dropdown.js v3.3.5
* http://getbootstrap.com/javascript/#dropdowns * http://getbootstrap.com/javascript/#dropdowns
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -759,7 +763,41 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle) $(element).on('click.bs.dropdown', this.toggle)
} }
Dropdown.VERSION = '3.3.4' Dropdown.VERSION = '3.3.5'
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
Dropdown.prototype.toggle = function (e) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
@ -774,7 +812,10 @@ if (typeof jQuery === 'undefined') {
if (!isActive) { if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) $(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
} }
var relatedTarget = { relatedTarget: this } var relatedTarget = { relatedTarget: this }
@ -807,13 +848,13 @@ if (typeof jQuery === 'undefined') {
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') var isActive = $parent.hasClass('open')
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) { if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus') if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click') return $this.trigger('click')
} }
var desc = ' li:not(.disabled):visible a' var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) var $items = $parent.find('.dropdown-menu' + desc)
if (!$items.length) return if (!$items.length) return
@ -826,38 +867,6 @@ if (typeof jQuery === 'undefined') {
$items.eq(index).trigger('focus') $items.eq(index).trigger('focus')
} }
function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
// DROPDOWN PLUGIN DEFINITION // DROPDOWN PLUGIN DEFINITION
// ========================== // ==========================
@ -895,13 +904,12 @@ if (typeof jQuery === 'undefined') {
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: modal.js v3.3.4 * Bootstrap: modal.js v3.3.5
* http://getbootstrap.com/javascript/#modals * http://getbootstrap.com/javascript/#modals
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -935,7 +943,7 @@ if (typeof jQuery === 'undefined') {
} }
} }
Modal.VERSION = '3.3.4' Modal.VERSION = '3.3.5'
Modal.TRANSITION_DURATION = 300 Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150 Modal.BACKDROP_TRANSITION_DURATION = 150
@ -992,9 +1000,7 @@ if (typeof jQuery === 'undefined') {
that.$element[0].offsetWidth // force reflow that.$element[0].offsetWidth // force reflow
} }
that.$element that.$element.addClass('in')
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus() that.enforceFocus()
@ -1028,7 +1034,6 @@ if (typeof jQuery === 'undefined') {
this.$element this.$element
.removeClass('in') .removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal') .off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal') .off('mouseup.dismiss.bs.modal')
@ -1092,7 +1097,8 @@ if (typeof jQuery === 'undefined') {
if (this.isShown && this.options.backdrop) { if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') this.$backdrop = $(document.createElement('div'))
.addClass('modal-backdrop ' + animate)
.appendTo(this.$body) .appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
@ -1241,7 +1247,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: tooltip.js v3.3.4 * Bootstrap: tooltip.js v3.3.5
* http://getbootstrap.com/javascript/#tooltip * http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
* ======================================================================== * ========================================================================
@ -1263,11 +1269,12 @@ if (typeof jQuery === 'undefined') {
this.timeout = null this.timeout = null
this.hoverState = null this.hoverState = null
this.$element = null this.$element = null
this.inState = null
this.init('tooltip', element, options) this.init('tooltip', element, options)
} }
Tooltip.VERSION = '3.3.4' Tooltip.VERSION = '3.3.5'
Tooltip.TRANSITION_DURATION = 150 Tooltip.TRANSITION_DURATION = 150
@ -1292,7 +1299,8 @@ if (typeof jQuery === 'undefined') {
this.type = type this.type = type
this.$element = $(element) this.$element = $(element)
this.options = this.getOptions(options) this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }
if (this.$element[0] instanceof document.constructor && !this.options.selector) { if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
@ -1351,16 +1359,20 @@ if (typeof jQuery === 'undefined') {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)
if (self && self.$tip && self.$tip.is(':visible')) {
self.hoverState = 'in'
return
}
if (!self) { if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self) $(obj.currentTarget).data('bs.' + this.type, self)
} }
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
}
if (self.tip().hasClass('in') || self.hoverState == 'in') {
self.hoverState = 'in'
return
}
clearTimeout(self.timeout) clearTimeout(self.timeout)
self.hoverState = 'in' self.hoverState = 'in'
@ -1372,6 +1384,14 @@ if (typeof jQuery === 'undefined') {
}, self.options.delay.show) }, self.options.delay.show)
} }
Tooltip.prototype.isInStateTrue = function () {
for (var key in this.inState) {
if (this.inState[key]) return true
}
return false
}
Tooltip.prototype.leave = function (obj) { Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)
@ -1381,6 +1401,12 @@ if (typeof jQuery === 'undefined') {
$(obj.currentTarget).data('bs.' + this.type, self) $(obj.currentTarget).data('bs.' + this.type, self)
} }
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
}
if (self.isInStateTrue()) return
clearTimeout(self.timeout) clearTimeout(self.timeout)
self.hoverState = 'out' self.hoverState = 'out'
@ -1427,6 +1453,7 @@ if (typeof jQuery === 'undefined') {
.data('bs.' + this.type, this) .data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition() var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
@ -1434,13 +1461,12 @@ if (typeof jQuery === 'undefined') {
if (autoPlace) { if (autoPlace) {
var orgPlacement = placement var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent() var viewportDim = this.getPosition(this.$viewport)
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement placement
$tip $tip
@ -1481,8 +1507,8 @@ if (typeof jQuery === 'undefined') {
if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0 if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop offset.top += marginTop
offset.left = offset.left + marginLeft offset.left += marginLeft
// $.fn.offset doesn't round pixel values // $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0 // so we use setOffset directly with our own function B-0
@ -1564,7 +1590,7 @@ if (typeof jQuery === 'undefined') {
Tooltip.prototype.fixTitle = function () { Tooltip.prototype.fixTitle = function () {
var $e = this.$element var $e = this.$element
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') { if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '') $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
} }
} }
@ -1619,7 +1645,7 @@ if (typeof jQuery === 'undefined') {
var rightEdgeOffset = pos.left + viewportPadding + actualWidth var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset delta.left = viewportDimensions.left - leftEdgeOffset
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
} }
} }
@ -1645,7 +1671,13 @@ if (typeof jQuery === 'undefined') {
} }
Tooltip.prototype.tip = function () { Tooltip.prototype.tip = function () {
return (this.$tip = this.$tip || $(this.options.template)) if (!this.$tip) {
this.$tip = $(this.options.template)
if (this.$tip.length != 1) {
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
}
}
return this.$tip
} }
Tooltip.prototype.arrow = function () { Tooltip.prototype.arrow = function () {
@ -1674,14 +1706,26 @@ if (typeof jQuery === 'undefined') {
} }
} }
if (e) {
self.inState.click = !self.inState.click
if (self.isInStateTrue()) self.enter(self)
else self.leave(self)
} else {
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
} }
}
Tooltip.prototype.destroy = function () { Tooltip.prototype.destroy = function () {
var that = this var that = this
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
}) })
} }
@ -1718,7 +1762,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: popover.js v3.3.4 * Bootstrap: popover.js v3.3.5
* http://getbootstrap.com/javascript/#popovers * http://getbootstrap.com/javascript/#popovers
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -1738,7 +1782,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.4' Popover.VERSION = '3.3.5'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right', placement: 'right',
@ -1827,7 +1871,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: scrollspy.js v3.3.4 * Bootstrap: scrollspy.js v3.3.5
* http://getbootstrap.com/javascript/#scrollspy * http://getbootstrap.com/javascript/#scrollspy
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -1856,7 +1900,7 @@ if (typeof jQuery === 'undefined') {
this.process() this.process()
} }
ScrollSpy.VERSION = '3.3.4' ScrollSpy.VERSION = '3.3.5'
ScrollSpy.DEFAULTS = { ScrollSpy.DEFAULTS = {
offset: 10 offset: 10
@ -2000,7 +2044,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: tab.js v3.3.4 * Bootstrap: tab.js v3.3.5
* http://getbootstrap.com/javascript/#tabs * http://getbootstrap.com/javascript/#tabs
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -2015,10 +2059,12 @@ if (typeof jQuery === 'undefined') {
// ==================== // ====================
var Tab = function (element) { var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element) this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
} }
Tab.VERSION = '3.3.4' Tab.VERSION = '3.3.5'
Tab.TRANSITION_DURATION = 150 Tab.TRANSITION_DURATION = 150
@ -2066,7 +2112,7 @@ if (typeof jQuery === 'undefined') {
var $active = container.find('> .active') var $active = container.find('> .active')
var transition = callback var transition = callback
&& $.support.transition && $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() { function next() {
$active $active
@ -2154,7 +2200,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery); }(jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: affix.js v3.3.4 * Bootstrap: affix.js v3.3.5
* http://getbootstrap.com/javascript/#affix * http://getbootstrap.com/javascript/#affix
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
@ -2183,7 +2229,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition() this.checkPosition()
} }
Affix.VERSION = '3.3.4' Affix.VERSION = '3.3.5'
Affix.RESET = 'affix affix-top affix-bottom' Affix.RESET = 'affix affix-top affix-bottom'
@ -2233,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
var offsetBottom = offset.bottom var offsetBottom = offset.bottom
var scrollHeight = $(document.body).height() var scrollHeight = Math.max($(document).height(), $(document.body).height())
if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)

File diff suppressed because one or more lines are too long

View file

@ -1,14 +1,14 @@
.xdsoft_datetimepicker { .xdsoft_datetimepicker {
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.506); box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
background: #FFFFFF; background: #fff;
border-bottom: 1px solid #BBBBBB; border-bottom: 1px solid #bbb;
border-left: 1px solid #CCCCCC; border-left: 1px solid #ccc;
border-right: 1px solid #CCCCCC; border-right: 1px solid #ccc;
border-top: 1px solid #CCCCCC; border-top: 1px solid #ccc;
color: #333333; color: #333;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 8px; padding: 8px;
padding-left: 0px; padding-left: 0;
padding-top: 2px; padding-top: 2px;
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
@ -26,6 +26,7 @@
background: transparent; background: transparent;
border: none; border: none;
} }
/*For IE8 or lower*/ /*For IE8 or lower*/
.xdsoft_datetimepicker button { .xdsoft_datetimepicker button {
border: none !important; border: none !important;
@ -40,44 +41,54 @@
-o-user-select: none; -o-user-select: none;
user-select: none; user-select: none;
} }
.xdsoft_noselect::selection { background: transparent; }
.xdsoft_noselect::-moz-selection { background: transparent; } .xdsoft_noselect::selection { background: transparent }
.xdsoft_noselect::-moz-selection { background: transparent }
.xdsoft_datetimepicker.xdsoft_inline { .xdsoft_datetimepicker.xdsoft_inline {
display: inline-block; display: inline-block;
position: static; position: static;
box-shadow: none; box-shadow: none;
} }
.xdsoft_datetimepicker * { .xdsoft_datetimepicker * {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
padding:0px; padding: 0;
margin:0px; margin: 0;
} }
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker { .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
display: none; display: none;
} }
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active { .xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
display: block; display: block;
} }
.xdsoft_datetimepicker .xdsoft_datepicker { .xdsoft_datetimepicker .xdsoft_datepicker {
width: 224px; width: 224px;
float: left; float: left;
margin-left: 8px; margin-left: 8px;
} }
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker { .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
width: 256px; width: 256px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker { .xdsoft_datetimepicker .xdsoft_timepicker {
width: 58px; width: 58px;
float: left; float: left;
text-align: center; text-align: center;
margin-left: 8px; margin-left: 8px;
margin-top:0px; margin-top: 0;
} }
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker { .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
margin-top: 8px; margin-top: 8px;
margin-bottom: 3px margin-bottom: 3px
} }
.xdsoft_datetimepicker .xdsoft_mounthpicker { .xdsoft_datetimepicker .xdsoft_mounthpicker {
position: relative; position: relative;
text-align: center; text-align: center;
@ -101,17 +112,17 @@
.xdsoft_datetimepicker .xdsoft_prev { .xdsoft_datetimepicker .xdsoft_prev {
float: left; float: left;
background-position:-20px 0px; background-position: -20px 0;
} }
.xdsoft_datetimepicker .xdsoft_today_button { .xdsoft_datetimepicker .xdsoft_today_button {
float: left; float: left;
background-position:-70px 0px; background-position: -70px 0;
margin-left: 5px; margin-left: 5px;
} }
.xdsoft_datetimepicker .xdsoft_next { .xdsoft_datetimepicker .xdsoft_next {
float: right; float: right;
background-position:0px 0px; background-position: 0 0;
} }
.xdsoft_datetimepicker .xdsoft_next, .xdsoft_datetimepicker .xdsoft_next,
@ -119,20 +130,22 @@
.xdsoft_datetimepicker .xdsoft_today_button { .xdsoft_datetimepicker .xdsoft_today_button {
background-color: transparent; background-color: transparent;
background-repeat: no-repeat; background-repeat: no-repeat;
border: 0px none currentColor; border: 0 none;
cursor: pointer; cursor: pointer;
display: block; display: block;
height: 30px; height: 30px;
opacity: 0.5; opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
outline: medium none currentColor; outline: medium none;
overflow: hidden; overflow: hidden;
padding: 0px; padding: 0;
position: relative; position: relative;
text-indent: 100%; text-indent: 100%;
white-space: nowrap; white-space: nowrap;
width: 20px; width: 20px;
min-width: 0;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev, .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
float: none; float: none;
@ -143,38 +156,43 @@
margin-left: 14px; margin-left: 14px;
margin-top: 7px; margin-top: 7px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
background-position:-40px 0px; background-position: -40px 0;
margin-bottom: 7px; margin-bottom: 7px;
margin-top:0px; margin-top: 0;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
height: 151px; height: 151px;
overflow: hidden; overflow: hidden;
border-bottom:1px solid #DDDDDD; border-bottom: 1px solid #ddd;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #F5F5F5; background: #f5f5f5;
border-top:1px solid #DDDDDD; border-top: 1px solid #ddd;
color: #666666; color: #666;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
border-collapse: collapse; border-collapse: collapse;
cursor: pointer; cursor: pointer;
border-bottom-width:0px; border-bottom-width: 0;
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
border-top-width:0px; border-top-width: 0;
} }
.xdsoft_datetimepicker .xdsoft_today_button:hover, .xdsoft_datetimepicker .xdsoft_today_button:hover,
.xdsoft_datetimepicker .xdsoft_next:hover, .xdsoft_datetimepicker .xdsoft_next:hover,
.xdsoft_datetimepicker .xdsoft_prev:hover { .xdsoft_datetimepicker .xdsoft_prev:hover {
opacity: 1; opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
} }
.xdsoft_datetimepicker .xdsoft_label { .xdsoft_datetimepicker .xdsoft_label {
display: inline; display: inline;
position: relative; position: relative;
@ -190,16 +208,19 @@
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
.xdsoft_datetimepicker .xdsoft_label:hover>span { .xdsoft_datetimepicker .xdsoft_label:hover>span {
text-decoration: underline; text-decoration: underline;
} }
.xdsoft_datetimepicker .xdsoft_label:hover i { .xdsoft_datetimepicker .xdsoft_label:hover i {
opacity: 1.0; opacity: 1.0;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select { .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
border: 1px solid #ccc; border: 1px solid #ccc;
position: absolute; position: absolute;
right:0px; right: 0;
top: 30px; top: 30px;
z-index: 101; z-index: 101;
display: none; display: none;
@ -207,53 +228,63 @@
max-height: 160px; max-height: 160px;
overflow-y: hidden; overflow-y: hidden;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;} .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover { .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
color: #fff; color: #fff;
background: #ff8000; background: #ff8000;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option { .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
padding: 2px 10px 2px 5px; padding: 2px 10px 2px 5px;
text-decoration: none !important; text-decoration: none !important;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current { .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
background: #33AAFF; background: #33aaff;
box-shadow: #178FE5 0px 1px 3px 0px inset; box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff; color: #fff;
font-weight: 700; font-weight: 700;
} }
.xdsoft_datetimepicker .xdsoft_month { .xdsoft_datetimepicker .xdsoft_month {
width: 100px; width: 100px;
text-align: right; text-align: right;
} }
.xdsoft_datetimepicker .xdsoft_calendar { .xdsoft_datetimepicker .xdsoft_calendar {
clear: both; clear: both;
} }
.xdsoft_datetimepicker .xdsoft_year{ .xdsoft_datetimepicker .xdsoft_year{
width: 48px; width: 48px;
margin-left: 5px; margin-left: 5px;
} }
.xdsoft_datetimepicker .xdsoft_calendar table { .xdsoft_datetimepicker .xdsoft_calendar table {
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
} }
.xdsoft_datetimepicker .xdsoft_calendar td > div { .xdsoft_datetimepicker .xdsoft_calendar td > div {
padding-right: 5px; padding-right: 5px;
} }
.xdsoft_datetimepicker .xdsoft_calendar th { .xdsoft_datetimepicker .xdsoft_calendar th {
height: 25px; height: 25px;
} }
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th { .xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
width: 14.2857142%; width: 14.2857142%;
background: #F5F5F5; background: #f5f5f5;
border:1px solid #DDDDDD; border: 1px solid #ddd;
color: #666666; color: #666;
font-size: 12px; font-size: 12px;
text-align: right; text-align: right;
vertical-align: middle; vertical-align: middle;
padding:0px; padding: 0;
border-collapse: collapse; border-collapse: collapse;
cursor: pointer; cursor: pointer;
height: 25px; height: 25px;
@ -261,52 +292,86 @@
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th { .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
width: 12.5%; width: 12.5%;
} }
.xdsoft_datetimepicker .xdsoft_calendar th { .xdsoft_datetimepicker .xdsoft_calendar th {
background: #F1F1F1; background: #f1f1f1;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today { .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
color:#33AAFF; color: #33aaff;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
background: #ffe9d2;
box-shadow: #ffb871 0 1px 4px 0 inset;
color: #000;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
background: #c1ffc9;
box-shadow: #00dd1c 0 1px 4px 0 inset;
color: #000;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
background: #33AAFF; background: #33aaff;
box-shadow: #178FE5 0px 1px 3px 0px inset; box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff; color: #fff;
font-weight: 700; font-weight: 700;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled { .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
opacity: 0.5; opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
cursor: default;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled { .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
opacity: 0.2; opacity: 0.2;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
} }
.xdsoft_datetimepicker .xdsoft_calendar td:hover, .xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
color: #fff !important; color: #fff !important;
background: #ff8000 !important; background: #ff8000 !important;
box-shadow: none !important; box-shadow: none !important;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
background: #33aaff !important;
box-shadow: #178fe5 0 1px 3px 0 inset !important;
color: #fff !important;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover { .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
color: inherit !important; color: inherit !important;
background: inherit !important; background: inherit !important;
box-shadow: inherit !important; box-shadow: inherit !important;
} }
.xdsoft_datetimepicker .xdsoft_calendar th { .xdsoft_datetimepicker .xdsoft_calendar th {
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
color: #999; color: #999;
cursor: default; cursor: default;
} }
.xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;}
.xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;}
.xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;}
.xdsoft_datetimepicker .xdsoft_copyright {
color: #ccc !important;
font-size: 10px;
clear: both;
float: none;
margin-left: 8px;
}
.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
.xdsoft_time_box { .xdsoft_time_box {
position: relative; position: relative;
@ -320,33 +385,32 @@
.xdsoft_scrollbar { .xdsoft_scrollbar {
position: absolute; position: absolute;
width: 7px; width: 7px;
right:0px; right: 0;
top:0px; top: 0;
bottom:0px; bottom: 0;
cursor: pointer; cursor: pointer;
} }
.xdsoft_scroller_box { .xdsoft_scroller_box {
position: relative; position: relative;
} }
.xdsoft_datetimepicker.xdsoft_dark { .xdsoft_datetimepicker.xdsoft_dark {
box-shadow: 0px 5px 15px -5px rgba(255, 255, 255, 0.506); box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
background: #000000; background: #000;
border-bottom: 1px solid #444444; border-bottom: 1px solid #444;
border-left: 1px solid #333333; border-left: 1px solid #333;
border-right: 1px solid #333333; border-right: 1px solid #333;
border-top: 1px solid #333333; border-top: 1px solid #333;
color: #cccccc; color: #ccc;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
border-bottom:1px solid #222222; border-bottom: 1px solid #222;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #0a0a0a; background: #0a0a0a;
border-top:1px solid #222222; border-top: 1px solid #222;
color: #999999; color: #999;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
@ -364,7 +428,7 @@ position:relative;
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
background: #cc5500; background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset; box-shadow: #b03e00 0 1px 3px 0 inset;
color: #000; color: #000;
} }
@ -378,21 +442,34 @@ position:relative;
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0a0a0a; background: #0a0a0a;
border:1px solid #222222; border: 1px solid #222;
color: #999999; color: #999;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0e0e0e; background: #0e0e0e;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
color: #cc5500; color: #cc5500;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
background: #ffe9d2;
box-shadow: #ffb871 0 1px 4px 0 inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
background: #c1ffc9;
box-shadow: #00dd1c 0 1px 4px 0 inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
background: #cc5500; background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset; box-shadow: #b03e00 0 1px 3px 0 inset;
color: #000; color: #000;
} }
@ -405,14 +482,64 @@ position:relative;
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th { .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
color: #666; color: #666;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
.xdsoft_dark .xdsoft_time_box { .xdsoft_dark .xdsoft_time_box {
border: 1px solid #333; border: 1px solid #333;
} }
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller { .xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
background: #333 !important; background: #333 !important;
} }
.xdsoft_datetimepicker .xdsoft_save_selected {
display: block;
border: 1px solid #dddddd !important;
margin-top: 5px;
width: 100%;
color: #454551;
font-size: 13px;
}
.xdsoft_datetimepicker .blue-gradient-button {
font-family: "museo-sans", "Book Antiqua", sans-serif;
font-size: 12px;
font-weight: 300;
color: #82878c;
height: 28px;
position: relative;
padding: 4px 17px 4px 33px;
border: 1px solid #d7d8da;
background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* IE10+ */
background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
/* IE6-9 */
}
.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
color: #454551;
background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* IE10+ */
background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
/* IE6-9 */
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,128 @@
## Reporting Bugs
Each bug report MUST have a [JSFiddle/JSBin] recreation before any work can begin. [further instructions &raquo;](http://fullcalendar.io/wiki/Reporting-Bugs/)
## Requesting Features
Please search the [Issue Tracker] to see if your feature has already been requested, and if so, subscribe to it. Otherwise, read these [further instructions &raquo;](http://fullcalendar.io/wiki/Requesting-Features/)
## Contributing Features
The FullCalendar project welcomes [Pull Requests][Using Pull Requests] for new features, but because there are so many feature requests (over 100), and because every new feature requires refinement and maintenance, each PR will be prioritized against the project's other demands and might take a while to make it to an official release.
Furthermore, each new feature should be designed as robustly as possible and be useful beyond the immediate usecase it was initially designed for. Feel free to start a ticket discussing the feature's specs before coding.
## Contributing Bugfixes
In the description of your [Pull Request][Using Pull Requests], please include recreation steps for the bug as well as a [JSFiddle/JSBin] demo. Communicating the buggy behavior is a requirement before a merge can happen.
## Contributing Languages
Please edit the original files in the `lang/` directory. DO NOT edit anything in the `dist/` directory. The build system will responsible for merging FullCalendar's `lang/` data with the [MomentJS locale data].
## Other Ways to Contribute
[Read about other ways to contribute &raquo;](http://fullcalendar.io/wiki/Contributing/)
## Getting Set Up
You will need [Git][git], [Node][node], and NPM installed. For clarification, please view the [jQuery readme][jq-readme], which requires a similar setup.
Also, you will need the [grunt-cli][grunt-cli] and [bower][bower] packages installed globally (`-g`) on your system:
npm install -g grunt-cli bower
Then, clone FullCalendar's git repo:
git clone git://github.com/arshaw/fullcalendar.git
Enter the directory and install FullCalendar's development dependencies:
cd fullcalendar
./build/init.sh
## What to edit
When modifying files, please do not edit the generated or minified files in the `dist/` directory. Please edit the original `src/` files.
## Development Workflow
After you make code changes, you'll want to compile the JS/CSS so that it can be previewed from the tests and demos. You can either manually rebuild each time you make a change:
grunt dev
Or, you can run a script that automatically rebuilds whenever you save a source file:
./build/watch.sh
When you are finished, run the following command to write the distributable files into the `./dist/` directory:
grunt
If you want to clean up the generated files, run:
grunt clean
## Style Guide
Please follow the [Google JavaScript Style Guide] as closely as possible. With the following exceptions:
```js
if (true) {
}
else { // please put else, else if, and catch on a separate line
}
// please write one-line array literals with a one-space padding inside
var a = [ 1, 2, 3 ];
// please write one-line object literals with a one-space padding inside
var o = { a: 1, b: 2, c: 3 };
```
Other exceptions:
- please ignore anything about Google Closure Compiler or the `goog` library
- please do not write JSDoc comments
Notes about whitespace:
- **use *tabs* instead of spaces**
- separate functions with *2* blank lines
- separate logical blocks within functions with *1* blank line
Run the command line tool to automatically check your style:
grunt check
## Before Submitting your Code
If you have edited code (including **tests** and **translations**) and would like to submit a pull request, please make sure you have done the following:
1. Conformed to the style guide (successfully run `grunt check`)
2. Written automated tests. View the [Automated Test Readme]
[JSFiddle/JSBin]: http://fullcalendar.io/wiki/Reporting-Bugs/
[Issue Tracker]: https://github.com/fullcalendar/fullcalendar/issues
[Using Pull Requests]: https://help.github.com/articles/using-pull-requests/
[MomentJS locale data]: https://github.com/moment/moment/tree/develop/locale
[git]: http://git-scm.com/
[node]: http://nodejs.org/
[grunt-cli]: http://gruntjs.com/getting-started#installing-the-cli
[bower]: http://bower.io/
[jq-readme]: https://github.com/jquery/jquery/blob/master/README.md#what-you-need-to-build-your-own-jquery
[Google JavaScript Style Guide]: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
[Automated Test Readme]: https://github.com/fullcalendar/fullcalendar/wiki/Automated-Tests

View file

@ -1,278 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

View file

@ -1,20 +0,0 @@
Copyright (c) 2009 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.

View file

@ -1,51 +1,524 @@
version 1.6.0 (3/18/13) v2.5.0-beta (2015-11-15)
------------------------
internal refactor of the "grid" system, providing increased flexbility for plugins like
[fullcalendar-scheduler](https://github.com/fullcalendar/fullcalendar-scheduler/releases)
v2.4.0 (2015-08-16)
-------------------
- add new buttons to the header via `customButtons` ([225])
- control stacking order of events via `eventOrder` ([364])
- control frequency of slot text via `slotLabelInterval` ([946])
- `displayEventTime` ([1904])
- `on` and `off` methods ([1910])
- renamed `axisFormat` to `slotLabelFormat`
[225]: https://code.google.com/p/fullcalendar/issues/detail?id=225
[364]: https://code.google.com/p/fullcalendar/issues/detail?id=364
[946]: https://code.google.com/p/fullcalendar/issues/detail?id=946
[1904]: https://code.google.com/p/fullcalendar/issues/detail?id=1904
[1910]: https://code.google.com/p/fullcalendar/issues/detail?id=1910
v2.3.2 (2015-06-14)
-------------------
- minor code adjustment in preparation for plugins
v2.3.1 (2015-03-08)
-------------------
- Fix week view column title for en-gb ([PR220])
- Publish to NPM ([2447])
- Detangle bower from npm package ([PR179])
[PR220]: https://github.com/arshaw/fullcalendar/pull/220
[2447]: https://code.google.com/p/fullcalendar/issues/detail?id=2447
[PR179]: https://github.com/arshaw/fullcalendar/pull/179
v2.3.0 (2015-02-21)
-------------------
- internal refactoring in preparation for other views
- businessHours now renders on whole-days in addition to timed areas
- events in "more" popover not sorted by time ([2385])
- avoid using moment's deprecated zone method ([2443])
- destroying the calendar sometimes causes all window resize handlers to be unbound ([2432])
- multiple calendars on one page, can't accept external elements after navigating ([2433])
- accept external events from jqui sortable ([1698])
- external jqui drop processed before reverting ([1661])
- IE8 fix: month view renders incorrectly ([2428])
- IE8 fix: eventLimit:true wouldn't activate "more" link ([2330])
- IE8 fix: dragging an event with an href
- IE8 fix: invisible element while dragging agenda view events
- IE8 fix: erratic external element dragging
[2385]: https://code.google.com/p/fullcalendar/issues/detail?id=2385
[2443]: https://code.google.com/p/fullcalendar/issues/detail?id=2443
[2432]: https://code.google.com/p/fullcalendar/issues/detail?id=2432
[2433]: https://code.google.com/p/fullcalendar/issues/detail?id=2433
[1698]: https://code.google.com/p/fullcalendar/issues/detail?id=1698
[1661]: https://code.google.com/p/fullcalendar/issues/detail?id=1661
[2428]: https://code.google.com/p/fullcalendar/issues/detail?id=2428
[2330]: https://code.google.com/p/fullcalendar/issues/detail?id=2330
v2.2.7 (2015-02-10)
-------------------
- view.title wasn't defined in viewRender callback ([2407])
- FullCalendar versions >= 2.2.5 brokenness with Moment versions <= 2.8.3 ([2417])
- Support Bokmal Norwegian language specifically ([2427])
[2407]: https://code.google.com/p/fullcalendar/issues/detail?id=2407
[2417]: https://code.google.com/p/fullcalendar/issues/detail?id=2417
[2427]: https://code.google.com/p/fullcalendar/issues/detail?id=2427
v2.2.6 (2015-01-11)
-------------------
- Compatibility with Moment v2.9. Was breaking GCal plugin ([2408])
- View object's `title` property mistakenly omitted ([2407])
- Single-day views with hiddens days could cause prev/next misbehavior ([2406])
- Don't let the current date ever be a hidden day (solves [2395])
- Hebrew locale ([2157])
[2408]: https://code.google.com/p/fullcalendar/issues/detail?id=2408
[2407]: https://code.google.com/p/fullcalendar/issues/detail?id=2407
[2406]: https://code.google.com/p/fullcalendar/issues/detail?id=2406
[2395]: https://code.google.com/p/fullcalendar/issues/detail?id=2395
[2157]: https://code.google.com/p/fullcalendar/issues/detail?id=2157
v2.2.5 (2014-12-30)
-------------------
- `buttonText` specified for custom views via the `views` option
- bugfix: wrong default value, couldn't override default
- feature: default value taken from locale
v2.2.4 (2014-12-29)
-------------------
- Arbitrary durations for basic/agenda views with the `views` option ([692])
- Specify view-specific options using the `views` option. fixes [2283]
- Deprecate view-option-hashes
- Formalize and expose View API ([1055])
- updateEvent method, more intuitive behavior. fixes [2194]
[692]: https://code.google.com/p/fullcalendar/issues/detail?id=692
[2283]: https://code.google.com/p/fullcalendar/issues/detail?id=2283
[1055]: https://code.google.com/p/fullcalendar/issues/detail?id=1055
[2194]: https://code.google.com/p/fullcalendar/issues/detail?id=2194
v2.2.3 (2014-11-26)
-------------------
- removeEventSource with Google Calendar object source, would not remove ([2368])
- Events with invalid end dates are still accepted and rendered ([2350], [2237], [2296])
- Bug when rendering business hours and navigating away from original view ([2365])
- Links to Google Calendar events will use current timezone ([2122])
- Google Calendar plugin works with timezone names that have spaces
- Google Calendar plugin accepts person email addresses as calendar IDs
- Internally use numeric sort instead of alphanumeric sort ([2370])
[2368]: https://code.google.com/p/fullcalendar/issues/detail?id=2368
[2350]: https://code.google.com/p/fullcalendar/issues/detail?id=2350
[2237]: https://code.google.com/p/fullcalendar/issues/detail?id=2237
[2296]: https://code.google.com/p/fullcalendar/issues/detail?id=2296
[2365]: https://code.google.com/p/fullcalendar/issues/detail?id=2365
[2122]: https://code.google.com/p/fullcalendar/issues/detail?id=2122
[2370]: https://code.google.com/p/fullcalendar/issues/detail?id=2370
v2.2.2 (2014-11-19)
-------------------
- Fixes to Google Calendar API V3 code
- wouldn't recognize a lone-string Google Calendar ID if periods before the @ symbol
- removeEventSource wouldn't work when given a Google Calendar ID
v2.2.1 (2014-11-19)
-------------------
- Migrate Google Calendar plugin to use V3 of the API ([1526])
[1526]: https://code.google.com/p/fullcalendar/issues/detail?id=1526
v2.2.0 (2014-11-14)
-------------------
- Background events. Event object's `rendering` property ([144], [1286])
- `businessHours` option ([144])
- Controlling where events can be dragged/resized and selections can go ([396], [1286], [2253])
- `eventOverlap`, `selectOverlap`, and similar
- `eventConstraint`, `selectConstraint`, and similar
- Improvements to dragging and dropping external events ([2004])
- Associating with real event data. used with `eventReceive`
- Associating a `duration`
- Performance boost for moment creation
- Be aware, FullCalendar-specific methods now attached directly to global moment.fn
- Helps with [issue 2259][2259]
- Reintroduced forgotten `dropAccept` option ([2312])
[144]: https://code.google.com/p/fullcalendar/issues/detail?id=144
[396]: https://code.google.com/p/fullcalendar/issues/detail?id=396
[1286]: https://code.google.com/p/fullcalendar/issues/detail?id=1286
[2004]: https://code.google.com/p/fullcalendar/issues/detail?id=2004
[2253]: https://code.google.com/p/fullcalendar/issues/detail?id=2253
[2259]: https://code.google.com/p/fullcalendar/issues/detail?id=2259
[2312]: https://code.google.com/p/fullcalendar/issues/detail?id=2312
v2.1.1 (2014-08-29)
-------------------
- removeEventSource not working with array ([2203])
- mouseout not triggered after mouseover+updateEvent ([829])
- agenda event's render with no <a> href, not clickable ([2263])
[2203]: https://code.google.com/p/fullcalendar/issues/detail?id=2203
[829]: https://code.google.com/p/fullcalendar/issues/detail?id=829
[2263]: https://code.google.com/p/fullcalendar/issues/detail?id=2263
v2.1.0 (2014-08-25)
-------------------
Large code refactor with better OOP, better code reuse, and more comments.
**No more reliance on jQuery UI** for event dragging, resizing, or anything else.
Significant changes to HTML/CSS skeleton:
- Leverages tables for liquid rendering of days and events. No costly manual repositioning ([809])
- **Backwards-incompatibilities**:
- **Many classNames have changed. Custom CSS will likely need to be adjusted.**
- IE7 definitely not supported anymore
- In `eventRender` callback, `element` will not be attached to DOM yet
- Events are styled to be one line by default ([1992]). Can be undone through custom CSS,
but not recommended (might get gaps [like this][111] in certain situations).
A "more..." link when there are too many events on a day ([304]). Works with month and basic views
as well as the all-day section of the agenda views. New options:
- `eventLimit`. a number or `true`
- `eventLimitClick`. the `"popover`" value will reveal all events in a raised panel (the default)
- `eventLimitText`
- `dayPopoverFormat`
Changes related to height and scrollbars:
- `aspectRatio`/`height`/`contentHeight` values will be honored *no matter what*
- If too many events causing too much vertical space, scrollbars will be used ([728]).
This is default behavior for month view (**backwards-incompatibility**)
- If too few slots in agenda view, view will stretch to be the correct height ([2196])
- `'auto'` value for `height`/`contentHeight` options. If content is too tall, the view will
vertically stretch to accomodate and no scrollbars will be used ([521]).
- Tall weeks in month view will borrow height from other weeks ([243])
- Automatically scroll the view then dragging/resizing an event ([1025], [2078])
- New `fixedWeekCount` option to determines the number of weeks in month view
- Supersedes `weekMode` (**deprecated**). Instead, use a combination of `fixedWeekCount` and
one of the height options, possibly with an `'auto'` value
Much nicer, glitch-free rendering of calendar *for printers* ([35]). Things you might not expect:
- Buttons will become hidden
- Agenda views display a flat list of events where the time slots would be
Other issues resolved along the way:
- Space on right side of agenda events configurable through CSS ([204])
- Problem with window resize ([259])
- Events sorting stays consistent across weeks ([510])
- Agenda's columns misaligned on wide screens ([511])
- Run `selectHelper` through `eventRender` callbacks ([629])
- Keyboard access, tabbing ([637])
- Run resizing events through `eventRender` ([714])
- Resize an event to a different day in agenda views ([736])
- Allow selection across days in agenda views ([778])
- Mouseenter delegated event not working on event elements ([936])
- Agenda event dragging, snapping to different columns is erratic ([1101])
- Android browser cuts off Day view at 8 PM with no scroll bar ([1203])
- Don't fire `eventMouseover`/`eventMouseout` while dragging/resizing ([1297])
- Customize the resize handle text ("=") ([1326])
- If agenda event is too short, don't overwrite `.fc-event-time` ([1700])
- Zooming calendar causes events to misalign ([1996])
- Event destroy callback on event removal ([2017])
- Agenda views, when RTL, should have axis on right ([2132])
- Make header buttons more accessibile ([2151])
- daySelectionMousedown should interpret OSX ctrl+click as a right mouse click ([2169])
- Best way to display time text on multi-day events *with times* ([2172])
- Eliminate table use for header layout ([2186])
- Event delegation used for event-related callbacks (like `eventClick`). Speedier.
[35]: https://code.google.com/p/fullcalendar/issues/detail?id=35
[204]: https://code.google.com/p/fullcalendar/issues/detail?id=204
[243]: https://code.google.com/p/fullcalendar/issues/detail?id=243
[259]: https://code.google.com/p/fullcalendar/issues/detail?id=259
[304]: https://code.google.com/p/fullcalendar/issues/detail?id=304
[510]: https://code.google.com/p/fullcalendar/issues/detail?id=510
[511]: https://code.google.com/p/fullcalendar/issues/detail?id=511
[521]: https://code.google.com/p/fullcalendar/issues/detail?id=521
[629]: https://code.google.com/p/fullcalendar/issues/detail?id=629
[637]: https://code.google.com/p/fullcalendar/issues/detail?id=637
[714]: https://code.google.com/p/fullcalendar/issues/detail?id=714
[728]: https://code.google.com/p/fullcalendar/issues/detail?id=728
[736]: https://code.google.com/p/fullcalendar/issues/detail?id=736
[778]: https://code.google.com/p/fullcalendar/issues/detail?id=778
[809]: https://code.google.com/p/fullcalendar/issues/detail?id=809
[936]: https://code.google.com/p/fullcalendar/issues/detail?id=936
[1025]: https://code.google.com/p/fullcalendar/issues/detail?id=1025
[1101]: https://code.google.com/p/fullcalendar/issues/detail?id=1101
[1203]: https://code.google.com/p/fullcalendar/issues/detail?id=1203
[1297]: https://code.google.com/p/fullcalendar/issues/detail?id=1297
[1326]: https://code.google.com/p/fullcalendar/issues/detail?id=1326
[1700]: https://code.google.com/p/fullcalendar/issues/detail?id=1700
[1992]: https://code.google.com/p/fullcalendar/issues/detail?id=1992
[1996]: https://code.google.com/p/fullcalendar/issues/detail?id=1996
[2017]: https://code.google.com/p/fullcalendar/issues/detail?id=2017
[2078]: https://code.google.com/p/fullcalendar/issues/detail?id=2078
[2132]: https://code.google.com/p/fullcalendar/issues/detail?id=2132
[2151]: https://code.google.com/p/fullcalendar/issues/detail?id=2151
[2169]: https://code.google.com/p/fullcalendar/issues/detail?id=2169
[2172]: https://code.google.com/p/fullcalendar/issues/detail?id=2172
[2186]: https://code.google.com/p/fullcalendar/issues/detail?id=2186
[2196]: https://code.google.com/p/fullcalendar/issues/detail?id=2196
[111]: https://code.google.com/p/fullcalendar/issues/detail?id=111
v2.0.3 (2014-08-15)
-------------------
- moment-2.8.1 compatibility ([2221])
- relative path in bower.json ([PR 117])
- upgraded jquery-ui and misc dev dependencies
[2221]: https://code.google.com/p/fullcalendar/issues/detail?id=2221
[PR 117]: https://github.com/arshaw/fullcalendar/pull/177
v2.0.2 (2014-06-24)
-------------------
- bug with persisting addEventSource calls ([2191])
- bug with persisting removeEvents calls with an array source ([2187])
- bug with removeEvents method when called with 0 removes all events ([2082])
[2191]: https://code.google.com/p/fullcalendar/issues/detail?id=2191
[2187]: https://code.google.com/p/fullcalendar/issues/detail?id=2187
[2082]: https://code.google.com/p/fullcalendar/issues/detail?id=2082
v2.0.1 (2014-06-15)
-------------------
- `delta` parameters reintroduced in `eventDrop` and `eventResize` handlers ([2156])
- **Note**: this changes the argument order for `revertFunc`
- wrongfully triggering a windowResize when resizing an agenda view event ([1116])
- `this` values in event drag-n-drop/resize handlers consistently the DOM node ([1177])
- `displayEventEnd` - v2 workaround to force display of an end time ([2090])
- don't modify passed-in eventSource items ([954])
- destroy method now removes fc-ltr class ([2033])
- weeks of last/next month still visible when weekends are hidden ([2095])
- fixed memory leak when destroying calendar with selectable/droppable ([2137])
- Icelandic language ([2180])
- Bahasa Indonesia language ([PR 172])
[1116]: https://code.google.com/p/fullcalendar/issues/detail?id=1116
[1177]: https://code.google.com/p/fullcalendar/issues/detail?id=1177
[2090]: https://code.google.com/p/fullcalendar/issues/detail?id=2090
[954]: https://code.google.com/p/fullcalendar/issues/detail?id=954
[2033]: https://code.google.com/p/fullcalendar/issues/detail?id=2033
[2095]: https://code.google.com/p/fullcalendar/issues/detail?id=2095
[2137]: https://code.google.com/p/fullcalendar/issues/detail?id=2137
[2156]: https://code.google.com/p/fullcalendar/issues/detail?id=2156
[2180]: https://code.google.com/p/fullcalendar/issues/detail?id=2180
[PR 172]: https://github.com/arshaw/fullcalendar/pull/172
v2.0.0 (2014-06-01)
-------------------
Internationalization support, timezone support, and [MomentJS] integration. Extensive changes, many
of which are backwards incompatible.
[Full list of changes][Upgrading-to-v2] | [Affected Issues][Date-Milestone]
An automated testing framework has been set up ([Karma] + [Jasmine]) and tests have been written
which cover about half of FullCalendar's functionality. Special thanks to @incre-d, @vidbina, and
@sirrocco for the help.
In addition, the main development repo has been repurposed to also include the built distributable
JS/CSS for the project and will serve as the new [Bower] endpoint.
[MomentJS]: http://momentjs.com/
[Upgrading-to-v2]: http://arshaw.com/fullcalendar/wiki/Upgrading-to-v2/
[Date-Milestone]: https://code.google.com/p/fullcalendar/issues/list?can=1&q=milestone%3Ddate
[Karma]: http://karma-runner.github.io/
[Jasmine]: http://jasmine.github.io/
[Bower]: http://bower.io/
v1.6.4 (2013-09-01)
-------------------
- better algorithm for positioning timed agenda events ([1115])
- `slotEventOverlap` option to tweak timed agenda event overlapping ([218])
- selection bug when slot height is customized ([1035])
- supply view argument in `loading` callback ([1018])
- fixed week number not displaying in agenda views ([1951])
- fixed fullCalendar not initializing with no options ([1356])
- NPM's `package.json`, no more warnings or errors ([1762])
- building the bower component should output `bower.json` instead of `component.json` ([PR 125])
- use bower internally for fetching new versions of jQuery and jQuery UI
[1115]: https://code.google.com/p/fullcalendar/issues/detail?id=1115
[218]: https://code.google.com/p/fullcalendar/issues/detail?id=218
[1035]: https://code.google.com/p/fullcalendar/issues/detail?id=1035
[1018]: https://code.google.com/p/fullcalendar/issues/detail?id=1018
[1951]: https://code.google.com/p/fullcalendar/issues/detail?id=1951
[1356]: https://code.google.com/p/fullcalendar/issues/detail?id=1356
[1762]: https://code.google.com/p/fullcalendar/issues/detail?id=1762
[PR 125]: https://github.com/arshaw/fullcalendar/pull/125
v1.6.3 (2013-08-10)
-------------------
- `viewRender` callback ([PR 15])
- `viewDestroy` callback ([PR 15])
- `eventDestroy` callback ([PR 111])
- `handleWindowResize` option ([PR 54])
- `eventStartEditable`/`startEditable` options ([PR 49])
- `eventDurationEditable`/`durationEditable` options ([PR 49])
- specify function for `$.ajax` `data` parameter for JSON event sources ([PR 59])
- fixed bug with agenda event dropping in wrong column ([PR 55])
- easier event element z-index customization ([PR 58])
- classNames on past/future days ([PR 88])
- allow `null`/`undefined` event titles ([PR 84])
- small optimize for agenda event rendering ([PR 56])
- deprecated:
- `viewDisplay`
- `disableDragging`
- `disableResizing`
- bundled with latest jQuery (1.10.2) and jQuery UI (1.10.3)
[PR 15]: https://github.com/arshaw/fullcalendar/pull/15
[PR 111]: https://github.com/arshaw/fullcalendar/pull/111
[PR 54]: https://github.com/arshaw/fullcalendar/pull/54
[PR 49]: https://github.com/arshaw/fullcalendar/pull/49
[PR 59]: https://github.com/arshaw/fullcalendar/pull/59
[PR 55]: https://github.com/arshaw/fullcalendar/pull/55
[PR 58]: https://github.com/arshaw/fullcalendar/pull/58
[PR 88]: https://github.com/arshaw/fullcalendar/pull/88
[PR 84]: https://github.com/arshaw/fullcalendar/pull/84
[PR 56]: https://github.com/arshaw/fullcalendar/pull/56
v1.6.2 (2013-07-18)
-------------------
- `hiddenDays` option ([686])
- bugfix: when `eventRender` returns `false`, incorrect stacking of events ([762])
- bugfix: couldn't change `event.backgroundImage` when calling `updateEvent` (thx @stephenharris)
[686]: https://code.google.com/p/fullcalendar/issues/detail?id=686
[762]: https://code.google.com/p/fullcalendar/issues/detail?id=762
v1.6.1 (2013-04-14)
-------------------
- fixed event inner content overflow bug ([1783])
- fixed table header className bug [1772]
- removed text-shadow on events (better for general use, thx @tkrotoff)
[1783]: https://code.google.com/p/fullcalendar/issues/detail?id=1783
[1772]: https://code.google.com/p/fullcalendar/issues/detail?id=1772
v1.6.0 (2013-03-18)
-------------------
- visual facelift, with bootstrap-inspired buttons and colors - visual facelift, with bootstrap-inspired buttons and colors
- simplified HTML/CSS for events and buttons - simplified HTML/CSS for events and buttons
- dayRender, for modifying a day cell (issue 191, thx althaus) - `dayRender`, for modifying a day cell ([191], thx @althaus)
- week numbers on side of calendar (issue 295) - week numbers on side of calendar ([295])
- weekNumber - `weekNumber`
- weekNumberCalculation - `weekNumberCalculation`
- weekNumberTitle - `weekNumberTitle`
- "W" formatting variable - `W` formatting variable
- finer snapping granularity for agenda view events (issue 495, thx ms-doodle-com) - finer snapping granularity for agenda view events ([495], thx @ms-doodle-com)
- eventAfterAllRender (issue 753, thx pdrakeweb) - `eventAfterAllRender` ([753], thx @pdrakeweb)
- eventDataTransform (thx joeyspo) - `eventDataTransform` (thx @joeyspo)
- data-date attributes on cells (thx Jae) - `data-date` attributes on cells (thx @Jae)
- expose $.fullCalendar.dateFormatters - expose `$.fullCalendar.dateFormatters`
- when clicking fast on buttons, prevent text selection - when clicking fast on buttons, prevent text selection
- bundled with latest jQuery (1.9.1) and jQuery UI (1.10.2) - bundled with latest jQuery (1.9.1) and jQuery UI (1.10.2)
- Grunt/Lumbar build system for internal development - Grunt/Lumbar build system for internal development
- build for Bower package manager - build for Bower package manager
- build for jQuery plugin site - build for jQuery plugin site
version 1.5.4 (9/5/12) [191]: https://code.google.com/p/fullcalendar/issues/detail?id=191
- made compatible with jQuery 1.8.* (thx archaeron) [295]: https://code.google.com/p/fullcalendar/issues/detail?id=295
[495]: https://code.google.com/p/fullcalendar/issues/detail?id=495
[753]: https://code.google.com/p/fullcalendar/issues/detail?id=753
v1.5.4 (2012-09-05)
-------------------
- made compatible with jQuery 1.8.* (thx @archaeron)
- bundled with jQuery 1.8.1 and jQuery UI 1.8.23 - bundled with jQuery 1.8.1 and jQuery UI 1.8.23
version 1.5.3 (2/6/12)
- fixed dragging issue with jQuery UI 1.8.16 (issue 1168) v1.5.3 (2012-02-06)
-------------------
- fixed dragging issue with jQuery UI 1.8.16 ([1168])
- bundled with jQuery 1.7.1 and jQuery UI 1.8.17 - bundled with jQuery 1.7.1 and jQuery UI 1.8.17
version 1.5.2 (8/21/11) [1168]: https://code.google.com/p/fullcalendar/issues/detail?id=1168
- correctly process UTC "Z" ISO8601 date strings (issue 750)
version 1.5.1 (4/9/11)
- more flexible ISO8601 date parsing (issue 814) v1.5.2 (2011-08-21)
- more flexible parsing of UNIX timestamps (issue 826) -------------------
- FullCalendar now buildable from source on a Mac (issue 795)
- FullCalendar QA'd in FF4 (issue 883) - correctly process UTC "Z" ISO8601 date strings ([750])
[750]: https://code.google.com/p/fullcalendar/issues/detail?id=750
v1.5.1 (2011-04-09)
-------------------
- more flexible ISO8601 date parsing ([814])
- more flexible parsing of UNIX timestamps ([826])
- FullCalendar now buildable from source on a Mac ([795])
- FullCalendar QA'd in FF4 ([883])
- upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11 - upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11
version 1.5 (3/19/11) [814]: https://code.google.com/p/fullcalendar/issues/detail?id=814
[826]: https://code.google.com/p/fullcalendar/issues/detail?id=826
[795]: https://code.google.com/p/fullcalendar/issues/detail?id=795
[883]: https://code.google.com/p/fullcalendar/issues/detail?id=883
v1.5 (2011-03-19)
-----------------
- slicker default styling for buttons - slicker default styling for buttons
- reworked a lot of the calendar's HTML and accompanying CSS - reworked a lot of the calendar's HTML and accompanying CSS (solves [327] and [395])
(solves issues 327 and 395)
- more printer-friendly (fullcalendar-print.css) - more printer-friendly (fullcalendar-print.css)
- fullcalendar now inherits styles from jquery-ui themes differently. - fullcalendar now inherits styles from jquery-ui themes differently.
styles for buttons are distinct from styles for calendar cells. styles for buttons are distinct from styles for calendar cells.
(solves issue 299) (solves [299])
- can now color events through FullCalendar options and Event-Object properties (issue 117) - can now color events through FullCalendar options and Event-Object properties ([117])
THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS) THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS)
- FullCalendar options: - FullCalendar options:
- eventColor (changes both background and border) - eventColor (changes both background and border)
@ -71,61 +544,112 @@ version 1.5 (3/19/11)
- startParam (for a feed) - startParam (for a feed)
- endParam (for a feed) - endParam (for a feed)
- ANY OF THE JQUERY $.ajax OPTIONS - ANY OF THE JQUERY $.ajax OPTIONS
allows for easily changing from GET to POST and sending additional parameters (issue 386) allows for easily changing from GET to POST and sending additional parameters ([386])
allows for easily attaching ajax handlers such as `error` (issue 754) allows for easily attaching ajax handlers such as `error` ([754])
allows for turning caching on (issue 355) allows for turning caching on ([355])
- Google Calendar feeds are now specified differently: - Google Calendar feeds are now specified differently:
- specify a simple string of your feed's URL - specify a simple string of your feed's URL
- specify an *object* with a `url` property of your feed's URL. - specify an *object* with a `url` property of your feed's URL.
you can include any of the new Event-Source options in this object. you can include any of the new Event-Source options in this object.
- the old `$.fullCalendar.gcalFeed` method still works - the old `$.fullCalendar.gcalFeed` method still works
- no more IE7 SSL popup (issue 504) - no more IE7 SSL popup ([504])
- remove `cacheParam` - use json event source `cache` option instead - remove `cacheParam` - use json event source `cache` option instead
- latest jquery/jquery-ui - latest jquery/jquery-ui
version 1.4.11 (2/22/11) [327]: https://code.google.com/p/fullcalendar/issues/detail?id=327
- fixed rerenderEvents bug (issue 790) [395]: https://code.google.com/p/fullcalendar/issues/detail?id=395
[299]: https://code.google.com/p/fullcalendar/issues/detail?id=299
[117]: https://code.google.com/p/fullcalendar/issues/detail?id=117
[386]: https://code.google.com/p/fullcalendar/issues/detail?id=386
[754]: https://code.google.com/p/fullcalendar/issues/detail?id=754
[355]: https://code.google.com/p/fullcalendar/issues/detail?id=355
[504]: https://code.google.com/p/fullcalendar/issues/detail?id=504
v1.4.11 (2011-02-22)
--------------------
- fixed rerenderEvents bug ([790])
- fixed bug with faulty dragging of events from all-day slot in agenda views - fixed bug with faulty dragging of events from all-day slot in agenda views
- bundled with jquery 1.5 and jquery-ui 1.8.9 - bundled with jquery 1.5 and jquery-ui 1.8.9
version 1.4.10 (1/2/11) [790]: https://code.google.com/p/fullcalendar/issues/detail?id=790
- fixed bug with resizing event to different week in 5-day month view (issue 740)
- fixed bug with events not sticking after a removeEvents call (issue 757)
- fixed bug with underlying parseTime method, and other uses of parseInt (issue 688)
version 1.4.9 (11/16/10)
- new algorithm for vertically stacking events (issue 111)
- resizing an event to a different week (issue 306)
- bug: some events not rendered with consecutive calls to addEventSource (issue 679)
version 1.4.8 (10/16/10) v1.4.10 (2011-01-02)
--------------------
- fixed bug with resizing event to different week in 5-day month view ([740])
- fixed bug with events not sticking after a removeEvents call ([757])
- fixed bug with underlying parseTime method, and other uses of parseInt ([688])
[740]: https://code.google.com/p/fullcalendar/issues/detail?id=740
[757]: https://code.google.com/p/fullcalendar/issues/detail?id=757
[688]: https://code.google.com/p/fullcalendar/issues/detail?id=688
v1.4.9 (2010-11-16)
-------------------
- new algorithm for vertically stacking events ([111])
- resizing an event to a different week ([306])
- bug: some events not rendered with consecutive calls to addEventSource ([679])
[111]: https://code.google.com/p/fullcalendar/issues/detail?id=111
[306]: https://code.google.com/p/fullcalendar/issues/detail?id=306
[679]: https://code.google.com/p/fullcalendar/issues/detail?id=679
v1.4.8 (2010-10-16)
-------------------
- ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates) - ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates)
- bugfixes - bugfixes
- event refetching not being called under certain conditions (issues 417, 554) - event refetching not being called under certain conditions ([417], [554])
- event refetching being called multiple times under certain conditions (issues 586, 616) - event refetching being called multiple times under certain conditions ([586], [616])
- selection cannot be triggered by right mouse button (issue 558) - selection cannot be triggered by right mouse button ([558])
- agenda view left axis sized incorrectly (issue 465) - agenda view left axis sized incorrectly ([465])
- IE js error when calendar is too narrow (issue 517) - IE js error when calendar is too narrow ([517])
- agenda view looks strange when no scrollbars (issue 235) - agenda view looks strange when no scrollbars ([235])
- improved parsing of ISO8601 dates with UTC offsets - improved parsing of ISO8601 dates with UTC offsets
- $.fullCalendar.version - $.fullCalendar.version
- an internal refactor of the code, for easier future development and modularity - an internal refactor of the code, for easier future development and modularity
version 1.4.7 (7/5/10) [417]: https://code.google.com/p/fullcalendar/issues/detail?id=417
[554]: https://code.google.com/p/fullcalendar/issues/detail?id=554
[586]: https://code.google.com/p/fullcalendar/issues/detail?id=586
[616]: https://code.google.com/p/fullcalendar/issues/detail?id=616
[558]: https://code.google.com/p/fullcalendar/issues/detail?id=558
[465]: https://code.google.com/p/fullcalendar/issues/detail?id=465
[517]: https://code.google.com/p/fullcalendar/issues/detail?id=517
[235]: https://code.google.com/p/fullcalendar/issues/detail?id=235
v1.4.7 (2010-07-05)
-------------------
- "dropping" external objects onto the calendar - "dropping" external objects onto the calendar
- droppable (boolean, to turn on/off) - droppable (boolean, to turn on/off)
- dropAccept (to filter which events the calendar will accept) - dropAccept (to filter which events the calendar will accept)
- drop (trigger) - drop (trigger)
- selectable options can now be specified with a View Option Hash - selectable options can now be specified with a View Option Hash
- bugfixes - bugfixes
- dragged & reverted events having wrong time text (issue 406) - dragged & reverted events having wrong time text ([406])
- bug rendering events that have an endtime with seconds, but no hours/minutes (issue 477) - bug rendering events that have an endtime with seconds, but no hours/minutes ([477])
- gotoDate date overflow bug (issue 429) - gotoDate date overflow bug ([429])
- wrong date reported when clicking on edge of last column in agenda views (412) - wrong date reported when clicking on edge of last column in agenda views [412]
- support newlines in event titles - support newlines in event titles
- select/unselect callbacks now passes native js event - select/unselect callbacks now passes native js event
version 1.4.6 (5/31/10) [406]: https://code.google.com/p/fullcalendar/issues/detail?id=406
[477]: https://code.google.com/p/fullcalendar/issues/detail?id=477
[429]: https://code.google.com/p/fullcalendar/issues/detail?id=429
[412]: https://code.google.com/p/fullcalendar/issues/detail?id=412
v1.4.6 (2010-05-31)
-------------------
- "selecting" days or timeslots - "selecting" days or timeslots
- options: selectable, selectHelper, unselectAuto, unselectCancel - options: selectable, selectHelper, unselectAuto, unselectCancel
- callbacks: select, unselect - callbacks: select, unselect
@ -134,24 +658,38 @@ version 1.4.6 (5/31/10)
- code compressing by Google Closure Compiler - code compressing by Google Closure Compiler
- bundled with jQuery 1.4.2 and jQuery UI 1.8.1 - bundled with jQuery 1.4.2 and jQuery UI 1.8.1
version 1.4.5 (2/21/10)
v1.4.5 (2010-02-21)
-------------------
- lazyFetching option, which can force the calendar to fetch events on every view/date change - lazyFetching option, which can force the calendar to fetch events on every view/date change
- scroll state of agenda views are preserved when switching back to view - scroll state of agenda views are preserved when switching back to view
- bugfixes - bugfixes
- calling methods on an uninitialized fullcalendar throws error - calling methods on an uninitialized fullcalendar throws error
- IE6/7 bug where an entire view becomes invisible (issue 320) - IE6/7 bug where an entire view becomes invisible ([320])
- error when rendering a hidden calendar (in jquery ui tabs for example) in IE (issue 340) - error when rendering a hidden calendar (in jquery ui tabs for example) in IE ([340])
- interconnected bugs related to calendar resizing and scrollbars - interconnected bugs related to calendar resizing and scrollbars
- when switching views or clicking prev/next, calendar would "blink" (issue 333) - when switching views or clicking prev/next, calendar would "blink" ([333])
- liquid-width calendar's events shifted (depending on initial height of browser) (issue 341) - liquid-width calendar's events shifted (depending on initial height of browser) ([341])
- more robust underlying algorithm for calendar resizing - more robust underlying algorithm for calendar resizing
version 1.4.4 (2/3/10) [320]: https://code.google.com/p/fullcalendar/issues/detail?id=320
[340]: https://code.google.com/p/fullcalendar/issues/detail?id=340
[333]: https://code.google.com/p/fullcalendar/issues/detail?id=333
[341]: https://code.google.com/p/fullcalendar/issues/detail?id=341
v1.4.4 (2010-02-03)
-------------------
- optimized event rendering in all views (events render in 1/10 the time) - optimized event rendering in all views (events render in 1/10 the time)
- gotoDate() does not force the calendar to unnecessarily rerender - gotoDate() does not force the calendar to unnecessarily rerender
- render() method now correctly readjusts height - render() method now correctly readjusts height
version 1.4.3 (12/22/09)
v1.4.3 (2009-12-22)
-------------------
- added destroy method - added destroy method
- Google Calendar event pages respect currentTimezone - Google Calendar event pages respect currentTimezone
- caching now handled by jQuery's ajax - caching now handled by jQuery's ajax
@ -163,7 +701,10 @@ version 1.4.3 (12/22/09)
- event not displayed when end is an empty string - event not displayed when end is an empty string
- dynamically setting calendar height when no events have been fetched, throws error - dynamically setting calendar height when no events have been fetched, throws error
version 1.4.2 (12/02/09)
v1.4.2 (2009-12-02)
-------------------
- eventAfterRender trigger - eventAfterRender trigger
- getDate & getView methods - getDate & getView methods
- height & contentHeight options (explicitly sets the pixel height) - height & contentHeight options (explicitly sets the pixel height)
@ -176,7 +717,10 @@ version 1.4.2 (12/02/09)
- guaranteed space on right side of agenda events (even when stacked) - guaranteed space on right side of agenda events (even when stacked)
- accepts ISO8601 dates with a space (instead of 'T') - accepts ISO8601 dates with a space (instead of 'T')
version 1.4.1 (10/31/09)
v1.4.1 (2009-10-31)
-------------------
- can exclude weekends with new 'weekends' option - can exclude weekends with new 'weekends' option
- gcal feed 'currentTimezone' option - gcal feed 'currentTimezone' option
- bugfixes - bugfixes
@ -184,7 +728,10 @@ version 1.4.1 (10/31/09)
- daylight savings issue caused agenda views to start at 1am (for BST users) - daylight savings issue caused agenda views to start at 1am (for BST users)
- cleanup of gcal.js code - cleanup of gcal.js code
version 1.4 (10/19/09)
v1.4 (2009-10-19)
-----------------
- agendaWeek and agendaDay views - agendaWeek and agendaDay views
- added some options for agenda views: - added some options for agenda views:
- allDaySlot - allDaySlot
@ -203,7 +750,10 @@ version 1.4 (10/19/09)
- added event-color-changing example in docs - added event-color-changing example in docs
- better defaults for right-to-left themed button icons - better defaults for right-to-left themed button icons
version 1.3.2 (10/13/09)
v1.3.2 (2009-10-13)
-------------------
- Bugfixes (please upgrade from 1.3.1!) - Bugfixes (please upgrade from 1.3.1!)
- squashed potential infinite loop when addMonths and addDays - squashed potential infinite loop when addMonths and addDays
is called with an invalid date is called with an invalid date
@ -212,7 +762,10 @@ version 1.3.2 (10/13/09)
- gotoDate now can accept a single Date argument - gotoDate now can accept a single Date argument
- documentation for changes in 1.3.1 and 1.3.2 now on website - documentation for changes in 1.3.1 and 1.3.2 now on website
version 1.3.1 (9/30/09)
v1.3.1 (2009-09-30)
-------------------
- Important Bugfixes (please upgrade from 1.3!) - Important Bugfixes (please upgrade from 1.3!)
- When current date was late in the month, for long months, and prev/next buttons - When current date was late in the month, for long months, and prev/next buttons
were clicked in month-view, some months would be skipped/repeated were clicked in month-view, some months would be skipped/repeated
@ -222,7 +775,10 @@ version 1.3.1 (9/30/09)
- Added 'allDayDefault' option - Added 'allDayDefault' option
- Added 'changeView' and 'render' methods - Added 'changeView' and 'render' methods
version 1.3 (9/21/09)
v1.3 (2009-09-21)
-----------------
- different 'views': month/basicWeek/basicDay - different 'views': month/basicWeek/basicDay
- more flexible 'header' system for buttons - more flexible 'header' system for buttons
- themable by jQuery UI themes - themable by jQuery UI themes
@ -235,62 +791,68 @@ version 1.3 (9/21/09)
- new test suite for new features, uses firebug-lite - new test suite for new features, uses firebug-lite
- refactored docs - refactored docs
- Options - Options
+ date - + date
+ defaultView - + defaultView
+ aspectRatio - + aspectRatio
+ disableResizing - + disableResizing
+ monthNames (use instead of $.fullCalendar.monthNames) - + monthNames (use instead of $.fullCalendar.monthNames)
+ monthNamesShort (use instead of $.fullCalendar.monthAbbrevs) - + monthNamesShort (use instead of $.fullCalendar.monthAbbrevs)
+ dayNames (use instead of $.fullCalendar.dayNames) - + dayNames (use instead of $.fullCalendar.dayNames)
+ dayNamesShort (use instead of $.fullCalendar.dayAbbrevs) - + dayNamesShort (use instead of $.fullCalendar.dayAbbrevs)
+ theme - + theme
+ buttonText - + buttonText
+ buttonIcons - + buttonIcons
x draggable -> editable/disableDragging - x draggable -> editable/disableDragging
x fixedWeeks -> weekMode - x fixedWeeks -> weekMode
x abbrevDayHeadings -> columnFormat - x abbrevDayHeadings -> columnFormat
x buttons/title -> header - x buttons/title -> header
x eventDragOpacity -> dragOpacity - x eventDragOpacity -> dragOpacity
x eventRevertDuration -> dragRevertDuration - x eventRevertDuration -> dragRevertDuration
x weekStart -> firstDay - x weekStart -> firstDay
x rightToLeft -> isRTL - x rightToLeft -> isRTL
x showTime (use 'allDay' CalEvent property instead) - x showTime (use 'allDay' CalEvent property instead)
- Triggered Actions - Triggered Actions
+ eventResizeStart - + eventResizeStart
+ eventResizeStop - + eventResizeStop
+ eventResize - + eventResize
x monthDisplay -> viewDisplay - x monthDisplay -> viewDisplay
x resize -> windowResize - x resize -> windowResize
'eventDrop' params changed, can revert if ajax cuts out - 'eventDrop' params changed, can revert if ajax cuts out
- CalEvent Properties - CalEvent Properties
x showTime -> allDay - x showTime -> allDay
x draggable -> editable - x draggable -> editable
'end' is now INCLUSIVE when allDay=true - 'end' is now INCLUSIVE when allDay=true
'url' now produces a real <a> tag, more native clicking/tab behavior - 'url' now produces a real <a> tag, more native clicking/tab behavior
- Methods: - Methods:
+ renderEvent - + renderEvent
x prevMonth -> prev - x prevMonth -> prev
x nextMonth -> next - x nextMonth -> next
x prevYear/nextYear -> moveDate - x prevYear/nextYear -> moveDate
x refresh -> rerenderEvents/refetchEvents - x refresh -> rerenderEvents/refetchEvents
x removeEvent -> removeEvents - x removeEvent -> removeEvents
x getEventsByID -> clientEvents - x getEventsByID -> clientEvents
- Utilities: - Utilities:
'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs) - 'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs)
'formatDates' added to support date-ranges - 'formatDates' added to support date-ranges
- Google Calendar Options: - Google Calendar Options:
x draggable -> editable - x draggable -> editable
- Bugfixes - Bugfixes
- gcal extension fetched 25 results max, now fetches all - gcal extension fetched 25 results max, now fetches all
version 1.2.1 (6/29/09)
v1.2.1 (2009-06-29)
-------------------
- bugfixes - bugfixes
- allows and corrects invalid end dates for events - allows and corrects invalid end dates for events
- doesn't throw an error in IE while rendering when display:none - doesn't throw an error in IE while rendering when display:none
- fixed 'loading' callback when used w/ multiple addEventSource calls - fixed 'loading' callback when used w/ multiple addEventSource calls
- gcal className can now be an array - gcal className can now be an array
version 1.2 (5/31/09)
v1.2 (2009-05-31)
-----------------
- expanded API - expanded API
- 'className' CalEvent attribute - 'className' CalEvent attribute
- 'source' CalEvent attribute - 'source' CalEvent attribute
@ -313,11 +875,14 @@ version 1.2 (5/31/09)
- more documentation in source code - more documentation in source code
- minified version of fullcalendar.js - minified version of fullcalendar.js
- test suit (available from svn) - test suit (available from svn)
- top buttons now use <button> w/ an inner <span> for better css cusomization - top buttons now use `<button>` w/ an inner `<span>` for better css cusomization
- thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS, - thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS,
UPGRADE YOUR FULLCALENDAR.CSS FILE!!! UPGRADE YOUR FULLCALENDAR.CSS FILE
v1.1 (2009-05-10)
-----------------
version 1.1 (5/10/09)
- Added the following options: - Added the following options:
- weekStart - weekStart
- rightToLeft - rightToLeft
@ -338,5 +903,3 @@ version 1.1 (5/10/09)
- for IE6 resizing bug - for IE6 resizing bug
- for THEAD and TBODY (in 1.0, just used TBODY, restructured in 1.1) - for THEAD and TBODY (in 1.0, just used TBODY, restructured in 1.1)
- IF UPGRADING FROM FULLCALENDAR 1.0, YOU MUST UPGRADE FULLCALENDAR.CSS - IF UPGRADING FROM FULLCALENDAR 1.0, YOU MUST UPGRADE FULLCALENDAR.CSS
!!!!!!!!!!!

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
/*! /*!
* FullCalendar v1.6.0 Print Stylesheet * FullCalendar v2.5.0-beta Print Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/ * Docs & License: http://fullcalendar.io/
* (c) 2013 Adam Shaw * (c) 2015 Adam Shaw
*/ */
/* /*
@ -10,23 +10,193 @@
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*/ */
.fc {
max-width: 100% !important;
}
/* Events
-----------------------------------------------------*/ /* Global Event Restyling
--------------------------------------------------------------------------------------------------*/
.fc-event { .fc-event {
background: #fff !important; background: #fff !important;
color: #000 !important; color: #000 !important;
page-break-inside: avoid;
} }
/* for vertical events */ .fc-event .fc-resizer {
display: none;
}
.fc-event-bg {
/* Table & Day-Row Restyling
--------------------------------------------------------------------------------------------------*/
th,
td,
hr,
thead,
tbody,
.fc-row {
border-color: #ccc !important;
background: #fff !important;
}
/* kill the overlaid, absolutely-positioned common components */
.fc-bg,
.fc-bgevent-skeleton,
.fc-highlight-skeleton,
.fc-helper-skeleton {
display: none;
}
/* don't force a min-height on rows (for DayGrid) */
.fc tbody .fc-row {
height: auto !important; /* undo height that JS set in distributeHeight */
min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
}
.fc tbody .fc-row .fc-content-skeleton {
position: static; /* undo .fc-rigid */
padding-bottom: 0 !important; /* use a more border-friendly method for this... */
}
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
}
.fc tbody .fc-row .fc-content-skeleton table {
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em;
}
/* Undo month-view event limiting. Display all events and hide the "more" links
--------------------------------------------------------------------------------------------------*/
.fc-more-cell,
.fc-more {
display: none !important; display: none !important;
} }
.fc-event .ui-resizable-handle { .fc tr.fc-limited {
display: none !important; display: table-row !important;
}
.fc td.fc-limited {
display: table-cell !important;
}
.fc-popover {
display: none; /* never display the "more.." popover in print mode */
} }
/* TimeGrid Restyling
--------------------------------------------------------------------------------------------------*/
/* undo the min-height 100% trick used to fill the container's height */
.fc-time-grid {
min-height: 0 !important;
}
/* don't display the side axis at all ("all-day" and time cells) */
.fc-agenda-view .fc-axis {
display: none;
}
/* don't display the horizontal lines */
.fc-slats,
.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
display: none !important; /* important overrides inline declaration */
}
/* let the container that holds the events be naturally positioned and create real height */
.fc-time-grid .fc-content-skeleton {
position: static;
}
/* in case there are no events, we still want some height */
.fc-time-grid .fc-content-skeleton table {
height: 4em;
}
/* kill the horizontal spacing made by the event container. event margins will be done below */
.fc-time-grid .fc-event-container {
margin: 0 !important;
}
/* TimeGrid *Event* Restyling
--------------------------------------------------------------------------------------------------*/
/* naturally position events, vertically stacking them */
.fc-time-grid .fc-event {
position: static !important;
margin: 3px 2px !important;
}
/* for events that continue to a future day, give the bottom border back */
.fc-time-grid .fc-event.fc-not-end {
border-bottom-width: 1px !important;
}
/* indicate the event continues via "..." text */
.fc-time-grid .fc-event.fc-not-end:after {
content: "...";
}
/* for events that are continuations from previous days, give the top border back */
.fc-time-grid .fc-event.fc-not-start {
border-top-width: 1px !important;
}
/* indicate the event is a continuation via "..." text */
.fc-time-grid .fc-event.fc-not-start:before {
content: "...";
}
/* time */
/* undo a previous declaration and let the time text span to a second line */
.fc-time-grid .fc-event .fc-time {
white-space: normal !important;
}
/* hide the the time that is normally displayed... */
.fc-time-grid .fc-event .fc-time span {
display: none;
}
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
.fc-time-grid .fc-event .fc-time:after {
content: attr(data-full);
}
/* Vertical Scroller & Containers
--------------------------------------------------------------------------------------------------*/
/* kill the scrollbars and allow natural height */
.fc-scroller,
.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
.fc-time-grid-container { /* */
overflow: visible !important;
height: auto !important;
}
/* kill the horizontal border/padding used to compensate for scrollbars */
.fc-row {
border: 0 !important;
margin: 0 !important;
}
/* Button Controls
--------------------------------------------------------------------------------------------------*/
.fc-button-group,
.fc button {
display: none; /* don't display any button-related controls */
}

View file

@ -1,107 +1,180 @@
/*! /*!
* FullCalendar v1.6.0 Google Calendar Plugin * FullCalendar v2.5.0-beta Google Calendar Plugin
* Docs & License: http://arshaw.com/fullcalendar/ * Docs & License: http://fullcalendar.io/
* (c) 2013 Adam Shaw * (c) 2015 Adam Shaw
*/ */
(function($) { (function(factory) {
if (typeof define === 'function' && define.amd) {
define([ 'jquery' ], factory);
}
else if (typeof exports === 'object') { // Node/CommonJS
module.exports = factory(require('jquery'));
}
else {
factory(jQuery);
}
})(function($) {
var fc = $.fullCalendar; var API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
var formatDate = fc.formatDate; var FC = $.fullCalendar;
var parseISO8601 = fc.parseISO8601; var applyAll = FC.applyAll;
var addDays = fc.addDays;
var applyAll = fc.applyAll;
fc.sourceNormalizers.push(function(sourceOptions) { FC.sourceNormalizers.push(function(sourceOptions) {
if (sourceOptions.dataType == 'gcal' || var googleCalendarId = sourceOptions.googleCalendarId;
sourceOptions.dataType === undefined && var url = sourceOptions.url;
(sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) { var match;
sourceOptions.dataType = 'gcal';
if (sourceOptions.editable === undefined) { // if the Google Calendar ID hasn't been explicitly defined
if (!googleCalendarId && url) {
// detect if the ID was specified as a single string.
// will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
googleCalendarId = url;
}
// try to scrape it out of a V1 or V3 API feed URL
else if (
(match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
(match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))
) {
googleCalendarId = decodeURIComponent(match[1]);
}
if (googleCalendarId) {
sourceOptions.googleCalendarId = googleCalendarId;
}
}
if (googleCalendarId) { // is this a Google Calendar?
// make each Google Calendar source uneditable by default
if (sourceOptions.editable == null) {
sourceOptions.editable = false; sourceOptions.editable = false;
} }
// We want removeEventSource to work, but it won't know about the googleCalendarId primitive.
// Shoehorn it into the url, which will function as the unique primitive. Won't cause side effects.
// This hack is obsolete since 2.2.3, but keep it so this plugin file is compatible with old versions.
sourceOptions.url = googleCalendarId;
} }
}); });
fc.sourceFetchers.push(function(sourceOptions, start, end) { FC.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
if (sourceOptions.dataType == 'gcal') { if (sourceOptions.googleCalendarId) {
return transformOptions(sourceOptions, start, end); return transformOptions(sourceOptions, start, end, timezone, this); // `this` is the calendar
} }
}); });
function transformOptions(sourceOptions, start, end) { function transformOptions(sourceOptions, start, end, timezone, calendar) {
var url = API_BASE + '/' + encodeURIComponent(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp
var apiKey = sourceOptions.googleCalendarApiKey || calendar.options.googleCalendarApiKey;
var success = sourceOptions.success; var success = sourceOptions.success;
var data = $.extend({}, sourceOptions.data || {}, { var data;
'start-min': formatDate(start, 'u'), var timezoneArg; // populated when a specific timezone. escaped to Google's liking
'start-max': formatDate(end, 'u'),
'singleevents': true,
'max-results': 9999
});
var ctz = sourceOptions.currentTimezone; function reportError(message, apiErrorObjs) {
if (ctz) { var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
data.ctz = ctz = ctz.replace(' ', '_');
// call error handlers
(sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
(calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);
// print error to debug console
FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
} }
if (!apiKey) {
reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/");
return {}; // an empty source to use instead. won't fetch anything.
}
// The API expects an ISO8601 datetime with a time and timezone part.
// Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
// side, guaranteeing we will receive all events in the desired range, albeit a superset.
// .utc() will set a zone and give it a 00:00:00 time.
if (!start.hasZone()) {
start = start.clone().utc().add(-1, 'day');
}
if (!end.hasZone()) {
end = end.clone().utc().add(1, 'day');
}
// when sending timezone names to Google, only accepts underscores, not spaces
if (timezone && timezone != 'local') {
timezoneArg = timezone.replace(' ', '_');
}
data = $.extend({}, sourceOptions.data || {}, {
key: apiKey,
timeMin: start.format(),
timeMax: end.format(),
timeZone: timezoneArg,
singleEvents: true,
maxResults: 9999
});
return $.extend({}, sourceOptions, { return $.extend({}, sourceOptions, {
url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?', googleCalendarId: null, // prevents source-normalizing from happening again
dataType: 'jsonp', url: url,
data: data, data: data,
startParam: false, startParam: false, // `false` omits this parameter. we already included it above
endParam: false, endParam: false, // same
timezoneParam: false, // same
success: function(data) { success: function(data) {
var events = []; var events = [];
if (data.feed.entry) { var successArgs;
$.each(data.feed.entry, function(i, entry) { var successRes;
var startStr = entry['gd$when'][0]['startTime'];
var start = parseISO8601(startStr, true); if (data.error) {
var end = parseISO8601(entry['gd$when'][0]['endTime'], true); reportError('Google Calendar API: ' + data.error.message, data.error.errors);
var allDay = startStr.indexOf('T') == -1;
var url;
$.each(entry.link, function(i, link) {
if (link.type == 'text/html') {
url = link.href;
if (ctz) {
url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
} }
else if (data.items) {
$.each(data.items, function(i, entry) {
var url = entry.htmlLink;
// make the URLs for each event show times in the correct timezone
if (timezoneArg) {
url = injectQsComponent(url, 'ctz=' + timezoneArg);
} }
});
if (allDay) {
addDays(end, -1); // make inclusive
}
events.push({ events.push({
id: entry['gCal$uid']['value'], id: entry.id,
title: entry['title']['$t'], title: entry.summary,
start: entry.start.dateTime || entry.start.date, // try timed. will fall back to all-day
end: entry.end.dateTime || entry.end.date, // same
url: url, url: url,
start: start, location: entry.location,
end: end, description: entry.description
allDay: allDay,
location: entry['gd$where'][0]['valueString'],
description: entry['content']['$t']
}); });
}); });
// call the success handler(s) and allow it to return a new events array
successArgs = [ events ].concat(Array.prototype.slice.call(arguments, 1)); // forward other jq args
successRes = applyAll(success, this, successArgs);
if ($.isArray(successRes)) {
return successRes;
} }
var args = [events].concat(Array.prototype.slice.call(arguments, 1));
var res = applyAll(success, this, args);
if ($.isArray(res)) {
return res;
} }
return events; return events;
} }
}); });
} }
// legacy // Injects a string like "arg=value" into the querystring of a URL
fc.gcalFeed = function(url, sourceOptions) { function injectQsComponent(url, component) {
return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' }); // inject it after the querystring but before the fragment
}; return url.replace(/(\?.*?)?(#|$)/, function(whole, qs, hash) {
return (qs ? qs + '&' : '?') + component + hash;
});
}
})(jQuery); });

File diff suppressed because one or more lines are too long

View file

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

View file

@ -0,0 +1,459 @@
Changelog
=========
### 2.10.6
[#2515](https://github.com/moment/moment/pull/2515) Fix regression introduced
in `2.10.5` related to `moment.ISO_8601` parsing.
### 2.10.5 [See full changelog](https://gist.github.com/ichernev/6ec13ac7efc396da44b2)
Important changes:
* [#2357](https://github.com/moment/moment/pull/2357) Improve unit bubbling for ISO dates
this fixes day to year conversions to work around end-of-year (~365 days). As
a side effect 365 days is 11 months and 30 days, and 366 days is one year.
* [#2438](https://github.com/moment/moment/pull/2438) Fix inconsistent moment.min and moment.max results
Return invalid result if any of the inputs is invalid
* [#2494](https://github.com/moment/moment/pull/2494) Fix two digit year parsing with YYYY format
This brings the benefits of YY to YYYY
* [#2368](https://github.com/moment/moment/pull/2368) perf: use faster form of copying dates, across the board improvement
### 2.10.3 [See full changelog](https://gist.github.com/ichernev/f264b9bed5b00f8b1b7f)
* add `moment.fn.to` and `moment.fn.toNow` (similar to `from` and `fromNow`)
* new locales (Sinhalese (si), Montenegrin (me), Javanese (ja))
* performance improvements
### 2.10.2
* fixed moment-with-locales in browser env caused by esperanto change
### 2.10.1
* regression: Add moment.duration.fn back
### 2.10.0
Ported code to es6 modules.
### 2.9.0 [See full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
languages:
* [2104](https://github.com/moment/moment/issues/2104) Frisian (fy) language file with unit test
* [2097](https://github.com/moment/moment/issues/2097) add ar-tn locale
deprecations:
* [2074](https://github.com/moment/moment/issues/2074) Implement `moment.fn.utcOffset`, deprecate `momen.fn.zone`
features:
* [2088](https://github.com/moment/moment/issues/2088) add moment.fn.isBetween
* [2054](https://github.com/moment/moment/issues/2054) Call updateOffset when creating moment (needed for default timezone in
moment-timezone)
* [1893](https://github.com/moment/moment/issues/1893) Add moment.isDate method
* [1825](https://github.com/moment/moment/issues/1825) Implement toJSON function on Duration
* [1809](https://github.com/moment/moment/issues/1809) Allowing moment.set() to accept a hash of units
* [2128](https://github.com/moment/moment/issues/2128) Add firstDayOfWeek, firstDayOfYear locale getters
* [2131](https://github.com/moment/moment/issues/2131) Add quarter diff support
Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
### 2.8.4 [See full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
Features:
* [#2000](https://github.com/moment/moment/issues/2000) Add LTS localised format that includes seconds
* [#1960](https://github.com/moment/moment/issues/1960) added formatToken 'x' for unix offset in milliseconds #1938
* [#1965](https://github.com/moment/moment/issues/1965) Support 24:00:00.000 to mean next day, at midnight.
* [#2002](https://github.com/moment/moment/issues/2002) Accept 'date' key when creating moment with object
* [#2009](https://github.com/moment/moment/issues/2009) Use native toISOString when we can
Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
### 2.8.3
Bugfixes:
* [#1801](https://github.com/moment/moment/issues/1801) proper pluralization for Arabic
* [#1833](https://github.com/moment/moment/issues/1833) improve spm integration
* [#1871](https://github.com/moment/moment/issues/1871) fix zone bug caused by Firefox 24
* [#1882](https://github.com/moment/moment/issues/1882) Use hh:mm in Czech
* [#1883](https://github.com/moment/moment/issues/1883) Fix 2.8.0 regression in duration as conversions
* [#1890](https://github.com/moment/moment/issues/1890) Faster travis builds
* [#1892](https://github.com/moment/moment/issues/1892) Faster isBefore/After/Same
* [#1848](https://github.com/moment/moment/issues/1848) Fix flaky month diffs
* [#1895](https://github.com/moment/moment/issues/1895) Fix 2.8.0 regression in moment.utc with format array
* [#1896](https://github.com/moment/moment/issues/1896) Support setting invalid instance locale (noop)
* [#1897](https://github.com/moment/moment/issues/1897) Support moment([str]) in addition to moment([int])
### 2.8.2
Minor bugfixes:
* [#1874](https://github.com/moment/moment/issues/1874) use `Object.prototype.hasOwnProperty`
instead of `obj.hasOwnProperty` (ie8 bug)
* [#1873](https://github.com/moment/moment/issues/1873) add `duration#toString()`
* [#1859](https://github.com/moment/moment/issues/1859) better month/weekday names in norwegian
* [#1812](https://github.com/moment/moment/issues/1812) meridiem parsing for greek
* [#1804](https://github.com/moment/moment/issues/1804) spanish del -> de
* [#1800](https://github.com/moment/moment/issues/1800) korean LT improvement
### 2.8.1
* bugfix [#1813](https://github.com/moment/moment/issues/1813): fix moment().lang([key]) incompatibility
### 2.8.0 [See changelog](https://gist.github.com/ichernev/ac3899324a5fa6c8c9b4)
* incompatible changes
* [#1761](https://github.com/moment/moment/issues/1761): moments created without a language are no longer following the global language, in case it changes. Only newly created moments take the global language by default. In case you're affected by this, wait, comment on [#1797](https://github.com/moment/moment/issues/1797) and wait for a proper reimplementation
* [#1642](https://github.com/moment/moment/issues/1642): 45 days is no longer "a month" according to humanize, cutoffs for month, and year have changed. Hopefully your code does not depend on a particular answer from humanize (which it shouldn't anyway)
* [#1784](https://github.com/moment/moment/issues/1784): if you use the human readable English datetime format in a weird way (like storing them in a database) that would break when the format changes you're at risk.
* deprecations (old behavior will be dropped in 3.0)
* [#1761](https://github.com/moment/moment/issues/1761) `lang` is renamed to `locale`, `langData` -> `localeData`. Also there is now `defineLocale` that should be used when creating new locales
* [#1763](https://github.com/moment/moment/issues/1763) `add(unit, value)` and `subtract(unit, value)` are now deprecated. Use `add(value, unit)` and `subtract(value, unit)` instead.
* [#1759](https://github.com/moment/moment/issues/1759) rename `duration.toIsoString` to `duration.toISOString`. The js standard library and moment's `toISOString` follow that convention.
* new locales
* [#1789](https://github.com/moment/moment/issues/1789) Tibetan (bo)
* [#1786](https://github.com/moment/moment/issues/1786) Africaans (af)
* [#1778](https://github.com/moment/moment/issues/1778) Burmese (my)
* [#1727](https://github.com/moment/moment/issues/1727) Belarusian (be)
* bugfixes, locale bugfixes, performance improvements, features
### 2.7.0 [See changelog](https://gist.github.com/ichernev/b0a3d456d5a84c9901d7)
* new languages
* [#1678](https://github.com/moment/moment/issues/1678) Bengali (bn)
* [#1628](https://github.com/moment/moment/issues/1628) Azerbaijani (az)
* [#1633](https://github.com/moment/moment/issues/1633) Arabic, Saudi Arabia (ar-sa)
* [#1648](https://github.com/moment/moment/issues/1648) Austrian German (de-at)
* features
* [#1663](https://github.com/moment/moment/issues/1663) configurable relative time thresholds
* [#1554](https://github.com/moment/moment/issues/1554) support anchor time in moment.calendar
* [#1693](https://github.com/moment/moment/issues/1693) support moment.ISO_8601 as parsing format
* [#1637](https://github.com/moment/moment/issues/1637) add moment.min and moment.max and deprecate min/max instance methods
* [#1704](https://github.com/moment/moment/issues/1704) support string value in add/subtract
* [#1647](https://github.com/moment/moment/issues/1647) add spm support (package manager)
* bugfixes
### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682)
* languages
* [#1529](https://github.com/moment/moment/issues/1529) Serbian-Cyrillic (sr-cyr)
* [#1544](https://github.com/moment/moment/issues/1544), [#1546](https://github.com/moment/moment/issues/1546) Khmer Cambodia (km)
* features
* [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST
* [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear
* [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing
* [#1499](https://github.com/moment/moment/issues/1499) composer support
* [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future
* [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten
* [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment
* [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway)
* [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing
* 18 bugs fixed
### 2.5.1
* languages
* [#1392](https://github.com/moment/moment/issues/1392) Armenian (hy-am)
* bugfixes
* [#1429](https://github.com/moment/moment/issues/1429) fixes [#1423](https://github.com/moment/moment/issues/1423) weird chrome-32 bug with js object creation
* [#1421](https://github.com/moment/moment/issues/1421) remove html entities from Welsh
* [#1418](https://github.com/moment/moment/issues/1418) fixes [#1401](https://github.com/moment/moment/issues/1401) improved non-padded tokens in strict matching
* [#1417](https://github.com/moment/moment/issues/1417) fixes [#1404](https://github.com/moment/moment/issues/1404) handle buggy moment object created by property cloning
* [#1398](https://github.com/moment/moment/issues/1398) fixes [#1397](https://github.com/moment/moment/issues/1397) fix Arabic-like week number parsing
* [#1396](https://github.com/moment/moment/issues/1396) add leftZeroFill(4) to GGGG and gggg formats
* [#1373](https://github.com/moment/moment/issues/1373) use lowercase for months and days in Catalan
* testing
* [#1374](https://github.com/moment/moment/issues/1374) run tests on multiple browser/os combos via SauceLabs and Travis
### 2.5.0 [See changelog](https://gist.github.com/ichernev/8104451)
* New languages
* Luxemburish (lb) [1247](https://github.com/moment/moment/issues/1247)
* Serbian (rs) [1319](https://github.com/moment/moment/issues/1319)
* Tamil (ta) [1324](https://github.com/moment/moment/issues/1324)
* Macedonian (mk) [1337](https://github.com/moment/moment/issues/1337)
* Features
* [1311](https://github.com/moment/moment/issues/1311) Add quarter getter and format token `Q`
* [1303](https://github.com/moment/moment/issues/1303) strict parsing now respects number of digits per token (fix [1196](https://github.com/moment/moment/issues/1196))
* 0d30bb7 add jspm support
* [1347](https://github.com/moment/moment/issues/1347) improve zone parsing
* [1362](https://github.com/moment/moment/issues/1362) support merideam parsing in Korean
* 22 bugfixes
### 2.4.0
* **Deprecate** globally exported moment, will be removed in next major
* New languages
* Farose (fo) [#1206](https://github.com/moment/moment/issues/1206)
* Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197)
* Welsh (cy) [#1215](https://github.com/moment/moment/issues/1215)
* Bugfixes
* properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187)
* chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076)
* fix language tests [#1177](https://github.com/moment/moment/issues/1177)
* remove some failing tests (that should have never existed :))
[#1185](https://github.com/moment/moment/issues/1185)
[#1183](https://github.com/moment/moment/issues/1183)
* handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195)
### 2.3.1
Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [#1171](https://github.com/moment/moment/issues/1171).
### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354)
Changed isValid, added strict parsing.
Week tokens parsing.
### 2.2.1
Fixed bug in string prototype test.
Updated authors and contributors.
### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4)
Added bower support.
Language files now use UMD.
Creating moment defaults to current date/month/year.
Added a bundle of moment and all language files.
### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5)
Added better week support.
Added ability to set offset with `moment#zone`.
Added ability to set month or weekday from a string.
Added `moment#min` and `moment#max`
### 2.0.0 [See changelog](https://gist.github.com/timrwood/e72f2eef320ed9e37c51)
Added short form localized tokens.
Added ability to define language a string should be parsed in.
Added support for reversed add/subtract arguments.
Added support for `endOf('week')` and `startOf('week')`.
Fixed the logic for `moment#diff(Moment, 'months')` and `moment#diff(Moment, 'years')`
`moment#diff` now floors instead of rounds.
Normalized `moment#toString`.
Added `isSame`, `isAfter`, and `isBefore` methods.
Added better week support.
Added `moment#toJSON`
Bugfix: Fixed parsing of first century dates
Bugfix: Parsing 10Sep2001 should work as expected
Bugfix: Fixed wierdness with `moment.utc()` parsing.
Changed language ordinal method to return the number + ordinal instead of just the ordinal.
Changed two digit year parsing cutoff to match strptime.
Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
Removed the lang data objects from the top level namespace.
Duplicate `Date` passed to `moment()` instead of referencing it.
### 1.7.2 [See discussion](https://github.com/timrwood/moment/issues/456)
Bugfixes
### 1.7.1 [See discussion](https://github.com/timrwood/moment/issues/384)
Bugfixes
### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)
Added `moment.fn.endOf()` and `moment.fn.startOf()`.
Added validation via `moment.fn.isValid()`.
Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
Add support for month/weekday callbacks in `moment.fn.format()`
Added instance specific languages.
Added two letter weekday abbreviations with the formatting token `dd`.
Various language updates.
Various bugfixes.
### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)
Added Durations.
Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
Added support for millisecond parsing and formatting tokens (S SS SSS)
Added a getter for `moment.lang()`
Various bugfixes.
There are a few things deprecated in the 1.6.0 release.
1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.
2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.
3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).
### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)
Added UTC mode.
Added automatic ISO8601 parsing.
Various bugfixes.
### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)
Added `moment.fn.toDate` as a replacement for `moment.fn.native`.
Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.
Various bugfixes.
### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)
Added support for parsing month names in the current language.
Added escape blocks for parsing tokens.
Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.
Added `moment.fn.day` as a setter.
Various bugfixes
### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)
Added timezones to parser and formatter.
Added `moment.fn.isDST`.
Added `moment.fn.zone` to get the timezone offset in minutes.
### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)
Various bugfixes
### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)
Added time specific diffs (months, days, hours, etc)
### 1.1.0
Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)
Fixed [issue 31](https://github.com/timrwood/moment/pull/31).
### 1.0.1
Added `moment.version` to get the current version.
Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)
### 1.0.0
Added convenience methods for getting and setting date parts.
Added better support for `moment.add()`.
Added better lang support in NodeJS.
Renamed library from underscore.date to Moment.js
### 0.6.1
Added Portuguese, Italian, and French language support
### 0.6.0
Added _date.lang() support.
Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]);
Made parse from string and single format 25% faster.
### 0.5.2
Bugfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).
### 0.5.1
Bugfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).
### 0.5.0
Dropped the redundant `_date.date()` in favor of `_date()`.
Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters.
Removed `_date.isLeapYear(yearNumber)`. Use `_date([yearNumber]).isLeapYear()` instead.
Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.
### 0.4.1
Added date input formats for input strings.
### 0.4.0
Added underscore.date to npm. Removed dependencies on underscore.
### 0.3.2
Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.
### 0.3.1
Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object.
### 0.3.0
Switched to the Underscore methodology of not mucking with the native objects' prototypes.
Made chaining possible.
### 0.2.1
Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.
Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.
### 0.2.0
Changed function names to be more concise.
Changed date format from php date format to custom format.
### 0.1.0
Initial release

View file

@ -0,0 +1,22 @@
Copyright (c) 2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors
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.

View file

@ -0,0 +1,58 @@
[![Join the chat at https://gitter.im/moment/moment](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]
[![Coverage Status](https://coveralls.io/repos/moment/moment/badge.svg?branch=master)](https://coveralls.io/r/moment/moment?branch=master)
A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
## [Documentation](http://momentjs.com/docs/)
## Port to ES6 (version 2.10.0)
Moment 2.10.0 does not bring any new features, but the code is now written in
es6 modules and placed inside `src/`. Previously `moment.js`, `locale/*.js` and
`test/moment/*.js`, `test/locale/*.js` contained the source of the project. Now
the source is in `src/`, temporary build (es5) files are placed under
`build/umd/` (for running tests during development), and the `moment.js` and
`locale/*.js` files are updated only on release.
If you want to use a particular revision of the code, make sure to run
`grunt transpile update-index`, so `moment.js` and `locales/*.js` are synced
with `src/*`. We might place that in a commit hook in the future.
## Upgrading to 2.0.0
There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes)
* Changed language ordinal method to return the number + ordinal instead of just the ordinal.
* Changed two digit year parsing cutoff to match strptime.
* Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
* Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
* Removed the lang data objects from the top level namespace.
* Duplicate `Date` passed to `moment()` instead of referencing it.
## [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md)
We're looking for co-maintainers! If you want to become a master of time please
write to [ichernev](https://github.com/ichernev).
## License
Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE).
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE
[npm-url]: https://npmjs.org/package/moment
[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat
[travis-url]: http://travis-ci.org/moment/moment
[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat

File diff suppressed because it is too large Load diff

7
sources/library/moment/moment.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
<?php <?php
/* ACL selector json backend */
/* ACL selector json backend */
require_once("include/acl_selectors.php"); require_once("include/acl_selectors.php");
function acl_init(&$a){ function acl_init(&$a){

View file

@ -395,9 +395,10 @@ function admin_page_site(&$a) {
} }
/* Banner */ /* Banner */
$banner = get_config('system', 'banner'); $banner = get_config('system', 'banner');
if($banner == false) if($banner === false)
$banner = 'red'; $banner = get_config('system','sitename');
$banner = htmlspecialchars($banner); $banner = htmlspecialchars($banner);
@ -1042,7 +1043,12 @@ function admin_page_plugins(&$a){
} }
$admin_form = ''; $admin_form = '';
if (is_array($a->plugins_admin) && in_array($plugin, $a->plugins_admin)){
$r = q("select * from addon where plugin_admin = 1 and name = '%s' limit 1",
dbesc($plugin)
);
if($r) {
@require_once("addon/$plugin/$plugin.php"); @require_once("addon/$plugin/$plugin.php");
if(function_exists($plugin.'_plugin_admin')) { if(function_exists($plugin.'_plugin_admin')) {
$func = $plugin.'_plugin_admin'; $func = $plugin.'_plugin_admin';

View file

@ -189,7 +189,7 @@ function channel_content(&$a, $update = 0, $load = false) {
$sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY)); $sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
} }
if(x($hashtags)) { if(x($hashtags)) {
$sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG)); $sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG));
} }
if($datequery) { if($datequery) {

View file

@ -26,8 +26,8 @@ function dirsearch_content(&$a) {
$token = get_config('system','realm_token'); $token = get_config('system','realm_token');
if($token && $access_token != $token) { if($token && $access_token != $token) {
$result['message'] = t('This directory server requires an access token'); $ret['message'] = t('This directory server requires an access token');
return; json_return_and_die($ret);
} }
@ -124,8 +124,6 @@ function dirsearch_content(&$a) {
if($keywords) if($keywords)
$sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords); $sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords);
if($forums)
$safesql .= dir_flag_build(' AND ','xchan_flags',XCHAN_FLAGS_PUBFORUM, $forums);
// we only support an age range currently. You must set both agege // we only support an age range currently. You must set both agege
// (greater than or equal) and agele (less than or equal) // (greater than or equal) and agele (less than or equal)
@ -173,6 +171,9 @@ function dirsearch_content(&$a) {
if($safe < 0) if($safe < 0)
$safesql = " and ( xchan_censored = 1 OR xchan_selfcensored = 1 ) "; $safesql = " and ( xchan_censored = 1 OR xchan_selfcensored = 1 ) ";
if($forums)
$safesql .= " and xchan_pubforum = " . ((intval($forums)) ? '1 ' : '0 ');
if($limit) if($limit)
$qlimit = " LIMIT $limit "; $qlimit = " LIMIT $limit ";
else { else {
@ -185,7 +186,6 @@ function dirsearch_content(&$a) {
} }
} }
if($sort_order == 'normal') { if($sort_order == 'normal') {
$order = " order by xchan_name asc "; $order = " order by xchan_name asc ";
@ -202,6 +202,7 @@ function dirsearch_content(&$a) {
else else
$order = " order by xchan_name_date desc "; $order = " order by xchan_name_date desc ";
if($sync) { if($sync) {
$spkt = array('transactions' => array()); $spkt = array('transactions' => array());
$r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc", $r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc",
@ -245,15 +246,20 @@ function dirsearch_content(&$a) {
json_return_and_die($spkt); json_return_and_die($spkt);
} }
else { else {
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash
where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0 where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0
$safesql $order $qlimit " $safesql $order $qlimit "
); );
$ret['page'] = $page + 1; $ret['page'] = $page + 1;
$ret['records'] = count($r); $ret['records'] = count($r);
} }
if($r) { if($r) {
$entries = array(); $entries = array();

View file

@ -21,9 +21,9 @@ function editpost_content(&$a) {
return; return;
} }
$itm = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d and author_xchan = '%s' LIMIT 1", $itm = q("SELECT * FROM `item` WHERE `id` = %d AND ( owner_xchan = '%s' OR author_xchan = '%s' ) LIMIT 1",
intval($post_id), intval($post_id),
intval(local_channel()), dbesc(get_observer_hash()),
dbesc(get_observer_hash()) dbesc(get_observer_hash())
); );
@ -33,10 +33,12 @@ function editpost_content(&$a) {
} }
if($itm[0]['resource_type'] === 'event' && $itm[0]['resource_id']) { if($itm[0]['resource_type'] === 'event' && $itm[0]['resource_id']) {
goaway(z_root() . '/events/event/' . $itm[0]['resource_id']); goaway(z_root() . '/events/' . $itm[0]['resource_id'] . '?expandform=1');
} }
$owner_uid = $itm[0]['uid'];
$plaintext = true; $plaintext = true;
// if(feature_enabled(local_channel(),'richtext')) // if(feature_enabled(local_channel(),'richtext'))
@ -71,14 +73,12 @@ function editpost_content(&$a) {
call_hooks('jot_tool', $jotplugins); call_hooks('jot_tool', $jotplugins);
call_hooks('jot_networks', $jotnets); call_hooks('jot_networks', $jotnets);
$channel = $a->get_channel();
//$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); //$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
$voting = feature_enabled(local_channel(),'consensus_tools'); $voting = feature_enabled($owner_uid,'consensus_tools');
$category = ''; $category = '';
$catsenabled = ((feature_enabled(local_channel(),'categories')) ? 'categories' : ''); $catsenabled = ((feature_enabled($owner_uid,'categories')) ? 'categories' : '');
if ($catsenabled){ if ($catsenabled){
$itm = fetch_post_tags($itm); $itm = fetch_post_tags($itm);
@ -145,7 +145,7 @@ function editpost_content(&$a) {
'$lockstate' => $lockstate, '$lockstate' => $lockstate,
'$acl' => '', '$acl' => '',
'$bang' => '', '$bang' => '',
'$profile_uid' => local_channel(), '$profile_uid' => $owner_uid,
'$preview' => t('Preview'), '$preview' => t('Preview'),
'$jotplugins' => $jotplugins, '$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename), '$sourceapp' => t($a->sourcename),

View file

@ -90,8 +90,12 @@ function events_post(&$a) {
linkify_tags($a, $desc, local_channel()); linkify_tags($a, $desc, local_channel());
linkify_tags($a, $location, local_channel()); linkify_tags($a, $location, local_channel());
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash; //$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
//fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location)
//$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
$onerror_url = $a->get_baseurl() . "/events";
if(strcmp($finish,$start) < 0 && !$nofinish) { if(strcmp($finish,$start) < 0 && !$nofinish) {
notice( t('Event can not end before it has started.') . EOL); notice( t('Event can not end before it has started.') . EOL);
if(intval($_REQUEST['preview'])) { if(intval($_REQUEST['preview'])) {
@ -273,39 +277,26 @@ function events_content(&$a) {
); );
} }
$first_day = get_pconfig(local_channel(),'system','cal_first_day');
$plaintext = true; $first_day = (($first_day) ? $first_day : 0);
// if(feature_enabled(local_channel(),'richtext'))
// $plaintext = false;
$htpl = get_markup_template('event_head.tpl'); $htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array( $a->page['htmlhead'] .= replace_macros($htpl,array(
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : 'textareas') '$lang' => $a->language,
'$first_day' => $first_day
)); ));
$o =""; $o = '';
// tabs
$channel = $a->get_channel(); $channel = $a->get_channel();
$tabs = profile_tabs($a, True, $channel['channel_address']);
$mode = 'view'; $mode = 'view';
$y = 0; $y = 0;
$m = 0; $m = 0;
$ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : ''); $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : '');
if(argc() > 1) { if(argc() > 1) {
if(argc() > 2 && argv(1) == 'event') {
$mode = 'edit';
$event_id = argv(2);
}
if(argc() > 2 && argv(1) === 'add') { if(argc() > 2 && argv(1) === 'add') {
$mode = 'add'; $mode = 'add';
$item_id = intval(argv(2)); $item_id = intval(argv(2));
@ -314,15 +305,15 @@ function events_content(&$a) {
$mode = 'drop'; $mode = 'drop';
$event_id = argv(2); $event_id = argv(2);
} }
if(argv(1) === 'new') {
$mode = 'new';
$event_id = '';
}
if(argc() > 2 && intval(argv(1)) && intval(argv(2))) { if(argc() > 2 && intval(argv(1)) && intval(argv(2))) {
$mode = 'view'; $mode = 'view';
$y = intval(argv(1)); $y = intval(argv(1));
$m = intval(argv(2)); $m = intval(argv(2));
} }
if(argc() <= 2) {
$mode = 'view';
$event_id = argv(1);
}
} }
if($mode === 'add') { if($mode === 'add') {
@ -330,12 +321,148 @@ function events_content(&$a) {
killme(); killme();
} }
if($mode == 'view') { if($mode == 'view') {
/* edit/create form */
if($event_id) {
$r = q("SELECT * FROM `event` WHERE event_hash = '%s' AND `uid` = %d LIMIT 1",
dbesc($event_id),
intval(local_channel())
);
if(count($r))
$orig_event = $r[0];
}
$channel = $a->get_channel();
// Passed parameters overrides anything found in the DB
if(!x($orig_event))
$orig_event = array();
// In case of an error the browser is redirected back here, with these parameters filled in with the previous values
/*
if(x($_REQUEST,'nofinish')) $orig_event['nofinish'] = $_REQUEST['nofinish'];
if(x($_REQUEST,'adjust')) $orig_event['adjust'] = $_REQUEST['adjust'];
if(x($_REQUEST,'summary')) $orig_event['summary'] = $_REQUEST['summary'];
if(x($_REQUEST,'description')) $orig_event['description'] = $_REQUEST['description'];
if(x($_REQUEST,'location')) $orig_event['location'] = $_REQUEST['location'];
if(x($_REQUEST,'start')) $orig_event['start'] = $_REQUEST['start'];
if(x($_REQUEST,'finish')) $orig_event['finish'] = $_REQUEST['finish'];
if(x($_REQUEST,'type')) $orig_event['type'] = $_REQUEST['type'];
*/
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
$a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
$t_orig = ((x($orig_event)) ? $orig_event['summary'] : '');
$d_orig = ((x($orig_event)) ? $orig_event['description'] : '');
$l_orig = ((x($orig_event)) ? $orig_event['location'] : '');
$eid = ((x($orig_event)) ? $orig_event['id'] : 0);
$event_xchan = ((x($orig_event)) ? $orig_event['event_xchan'] : $channel['channel_hash']);
$mid = ((x($orig_event)) ? $orig_event['mid'] : '');
if(! x($orig_event))
$sh_checked = '';
else
$sh_checked = ((($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' || (! $orig_event['allow_cid'])) && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' );
if($orig_event['event_xchan'])
$sh_checked .= ' disabled="disabled" ';
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
$fdt = ((x($orig_event)) ? $orig_event['finish'] : '+1 hour');
$tz = date_default_timezone_get();
if(x($orig_event))
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
$shour = datetime_convert('UTC', $tz, $sdt, 'H');
$sminute = datetime_convert('UTC', $tz, $sdt, 'i');
$stext = datetime_convert('UTC',$tz,$sdt);
$stext = substr($stext,0,14) . "00:00";
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
$fhour = datetime_convert('UTC', $tz, $fdt, 'H');
$fminute = datetime_convert('UTC', $tz, $fdt, 'i');
$ftext = datetime_convert('UTC',$tz,$fdt);
$ftext = substr($ftext,0,14) . "00:00";
$type = ((x($orig_event)) ? $orig_event['type'] : 'event');
$f = get_config('system','event_input_format');
if(! $f)
$f = 'ymd';
$catsenabled = feature_enabled(local_channel(),'categories');
$category = '';
if($catsenabled && x($orig_event)){
$itm = q("select * from item where resource_type = 'event' and resource_id = '%s' and uid = %d limit 1",
dbesc($orig_event['event_hash']),
intval(local_channel())
);
$itm = fetch_post_tags($itm);
if($itm) {
$cats = get_terms_oftype($itm[0]['term'], TERM_CATEGORY);
foreach ($cats as $cat) {
if(strlen($category))
$category .= ', ';
$category .= $cat['term'];
}
}
}
require_once('include/acl_selectors.php');
$acl = new AccessList($channel);
$perm_defaults = $acl->get();
$tpl = get_markup_template('event_form.tpl');
$form = replace_macros($tpl,array(
'$post' => $a->get_baseurl() . '/events',
'$eid' => $eid,
'$type' => $type,
'$xchan' => $event_xchan,
'$mid' => $mid,
'$event_hash' => $event_id,
'$summary' => array('summary', (($event_id) ? t('Edit event titel') : t('Event titel')), $t_orig, t('Required'), '*'),
'$catsenabled' => $catsenabled,
'$placeholdercategory' => t('Categories (comma-separated list)'),
'$c_text' => (($event_id) ? t('Edit Category') : t('Category')),
'$category' => $category,
'$required' => '<span class="required" title="' . t('Required') . '">*</span>',
'$s_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$syear+5),DateTime::createFromFormat('Y-m-d H:i',"$syear-$smonth-$sday $shour:$sminute"), (($event_id) ? t('Edit start date and time') : t('Start date and time')), 'start_text',true,true,'','',true,$first_day),
'$n_text' => t('Finish date and time are not known or not relevant'),
'$n_checked' => $n_checked,
'$f_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$fyear+5),DateTime::createFromFormat('Y-m-d H:i',"$fyear-$fmonth-$fday $fhour:$fminute"), (($event_id) ? t('Edit finish date and time') : t('Finish date and time')),'finish_text',true,true,'start_text','',false,$first_day),
'$nofinish' => array('nofinish', t('Finish date and time are not known or not relevant'), $n_checked, '', array(t('No'),t('Yes')), 'onclick="enableDisableFinishDate();"'),
'$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked, t('Important for events that happen in a particular place. Not practical for global holidays.'), array(t('No'),t('Yes'))),
'$a_text' => t('Adjust for viewer timezone'),
'$d_text' => (($event_id) ? t('Edit Description') : t('Description')),
'$d_orig' => $d_orig,
'$l_text' => (($event_id) ? t('Edit Location') : t('Location')),
'$l_orig' => $l_orig,
'$t_orig' => $t_orig,
'$sh_text' => t('Share this event'),
'$sh_checked' => $sh_checked,
'$share' => array('share', t('Share this event'), $sh_checked, '', array(t('No'),t('Yes'))),
'$preview' => t('Preview'),
'$permissions' => t('Permission settings'),
'$acl' => (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults),false)),
'$submit' => t('Submit'),
'$advanced' => t('Advanced Options')
));
/* end edit/create form */
$thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y'); $thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
$thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m'); $thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m');
@ -348,7 +475,6 @@ function events_content(&$a) {
if(argc() === 4 && argv(3) === 'export') if(argc() === 4 && argv(3) === 'export')
$export = true; $export = true;
// Put some limits on dates. The PHP date functions don't seem to do so well before 1900. // Put some limits on dates. The PHP date functions don't seem to do so well before 1900.
// An upper limit was chosen to keep search engines from exploring links millions of years in the future. // An upper limit was chosen to keep search engines from exploring links millions of years in the future.
@ -378,8 +504,8 @@ function events_content(&$a) {
if (argv(1) === 'json'){ if (argv(1) === 'json'){
if (x($_GET,'start')) $start = date("Y-m-d h:i:s", $_GET['start']); if (x($_GET,'start')) $start = $_GET['start'];
if (x($_GET,'end')) $finish = date("Y-m-d h:i:s", $_GET['end']); if (x($_GET,'end')) $finish = $_GET['end'];
} }
$start = datetime_convert('UTC','UTC',$start); $start = datetime_convert('UTC','UTC',$start);
@ -414,16 +540,16 @@ function events_content(&$a) {
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan $r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
from event left join item on event_hash = resource_id from event left join item on event_hash = resource_id
where resource_type = 'event' and event.uid = %d $ignored where resource_type = 'event' and event.uid = %d $ignored
AND (( `adjust` = 0 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' ) AND (( adjust = 0 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )
OR ( `adjust` = 1 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )) ", OR ( adjust = 1 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )) ",
intval(local_channel()), intval(local_channel()),
dbesc($start), dbesc($start),
dbesc($finish), dbesc($finish),
dbesc($adjust_start), dbesc($adjust_start),
dbesc($adjust_finish) dbesc($adjust_finish)
); );
}
}
$links = array(); $links = array();
@ -467,7 +593,7 @@ function events_content(&$a) {
$last_date = $d; $last_date = $d;
$edit = (intval($rr['item_wall']) ? array($a->get_baseurl().'/events/event/'.$rr['event_hash'],t('Edit event'),'','') : null); $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false);
$drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); $drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
@ -522,22 +648,24 @@ function events_content(&$a) {
$o = replace_macros($tpl, array( $o = replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$tabs' => $tabs, '$new_event' => array($a->get_baseurl().'/events',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
'$title' => t('Events'),
'$new_event'=> array($a->get_baseurl().'/events/new',t('Create New Event'),'',''),
'$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''), '$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
'$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''), '$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
'$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''), '$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'), '$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events, '$events' => $events,
'$upload' => t('Import'), '$upload' => t('Import'),
'$submit' => t('Submit') '$submit' => t('Submit'),
'$prev' => t('Previous'),
'$next' => t('Next'),
'$today' => t('Today'),
'$form' => $form,
'$expandform' => ((x($_GET,'expandform')) ? true : false),
)); ));
if (x($_GET,'id')){ echo $o; killme(); } if (x($_GET,'id')){ echo $o; killme(); }
return $o; return $o;
} }
if($mode === 'drop' && $event_id) { if($mode === 'drop' && $event_id) {
@ -570,147 +698,4 @@ function events_content(&$a) {
} }
} }
if($mode === 'edit' && $event_id) {
$r = q("SELECT * FROM `event` WHERE event_hash = '%s' AND `uid` = %d LIMIT 1",
dbesc($event_id),
intval(local_channel())
);
if(count($r))
$orig_event = $r[0];
}
$channel = $a->get_channel();
// Passed parameters overrides anything found in the DB
if($mode === 'edit' || $mode === 'new') {
if(!x($orig_event)) $orig_event = array();
// In case of an error the browser is redirected back here, with these parameters filled in with the previous values
if(x($_REQUEST,'nofinish')) $orig_event['nofinish'] = $_REQUEST['nofinish'];
if(x($_REQUEST,'adjust')) $orig_event['adjust'] = $_REQUEST['adjust'];
if(x($_REQUEST,'summary')) $orig_event['summary'] = $_REQUEST['summary'];
if(x($_REQUEST,'description')) $orig_event['description'] = $_REQUEST['description'];
if(x($_REQUEST,'location')) $orig_event['location'] = $_REQUEST['location'];
if(x($_REQUEST,'start')) $orig_event['start'] = $_REQUEST['start'];
if(x($_REQUEST,'finish')) $orig_event['finish'] = $_REQUEST['finish'];
if(x($_REQUEST,'type')) $orig_event['type'] = $_REQUEST['type'];
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
$a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
$t_orig = ((x($orig_event)) ? $orig_event['summary'] : '');
$d_orig = ((x($orig_event)) ? $orig_event['description'] : '');
$l_orig = ((x($orig_event)) ? $orig_event['location'] : '');
$eid = ((x($orig_event)) ? $orig_event['id'] : 0);
$event_xchan = ((x($orig_event)) ? $orig_event['event_xchan'] : $channel['channel_hash']);
$mid = ((x($orig_event)) ? $orig_event['mid'] : '');
if(! x($orig_event))
$sh_checked = '';
else
$sh_checked = ((($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' || (! $orig_event['allow_cid'])) && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' );
if($orig_event['event_xchan'])
$sh_checked .= ' disabled="disabled" ';
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
$tz = date_default_timezone_get();
if(x($orig_event))
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
$shour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'H') : 0);
$sminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'i') : 0);
$stext = datetime_convert('UTC',$tz,$sdt);
$stext = substr($stext,0,14) . "00:00";
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
$fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : 0);
$fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : 0);
$ftext = datetime_convert('UTC',$tz,$fdt);
$ftext = substr($ftext,0,14) . "00:00";
$type = ((x($orig_event)) ? $orig_event['type'] : 'event');
$f = get_config('system','event_input_format');
if(! $f)
$f = 'ymd';
$catsenabled = feature_enabled(local_channel(),'categories');
$category = '';
if($catsenabled && x($orig_event)){
$itm = q("select * from item where resource_type = 'event' and resource_id = '%s' and uid = %d limit 1",
dbesc($orig_event['event_hash']),
intval(local_channel())
);
$itm = fetch_post_tags($itm);
if($itm) {
$cats = get_terms_oftype($itm[0]['term'], TERM_CATEGORY);
foreach ($cats as $cat) {
if(strlen($category))
$category .= ', ';
$category .= $cat['term'];
}
}
}
require_once('include/acl_selectors.php');
$acl = new AccessList($channel);
$perm_defaults = $acl->get();
$tpl = get_markup_template('event_form.tpl');
$o .= replace_macros($tpl,array(
'$post' => $a->get_baseurl() . '/events',
'$eid' => $eid,
'$type' => $type,
'$xchan' => $event_xchan,
'$mid' => $mid,
'$event_hash' => $event_id,
'$title' => t('Event details'),
'$desc' => t('Starting date and Title are required.'),
'$catsenabled' => $catsenabled,
'$placeholdercategory' => t('Categories (comma-separated list)'),
'$category' => $category,
'$s_text' => t('Event Starts:'),
'$stext' => $stext,
'$ftext' => $ftext,
'$required' => '<span class="required" title="' . t('Required') . '">*</span>',
'$ModalCANCEL' => t('Cancel'),
'$ModalOK' => t('OK'),
'$s_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$syear+5),DateTime::createFromFormat('Y-m-d H:i',"$syear-$smonth-$sday $shour:$sminute"),'start_text',true,true,'','',true),
'$n_text' => t('Finish date/time is not known or not relevant'),
'$n_checked' => $n_checked,
'$f_text' => t('Event Finishes:'),
'$f_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$fyear+5),DateTime::createFromFormat('Y-m-d H:i',"$fyear-$fmonth-$fday $fhour:$fminute"),'finish_text',true,true,'start_text'),
'$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked, t('Important for events that happen in a particular place. Not practical for global holidays.'),),
'$a_text' => t('Adjust for viewer timezone'),
'$d_text' => t('Description:'),
'$d_orig' => $d_orig,
'$l_text' => t('Location:'),
'$l_orig' => $l_orig,
'$t_text' => t('Title:'),
'$t_orig' => $t_orig,
'$sh_text' => t('Share this event'),
'$sh_checked' => $sh_checked,
'$preview' => t('Preview'),
'$permissions' => t('Permissions'),
'$acl' => (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults),false)),
'$submit' => t('Submit')
));
return $o;
}
} }

View file

@ -15,6 +15,7 @@ function feed_init(&$a) {
$params['start'] = ((x($params,'start')) ? intval($params['start']) : 0); $params['start'] = ((x($params,'start')) ? intval($params['start']) : 0);
$params['records'] = ((x($params,'records')) ? intval($params['records']) : 40); $params['records'] = ((x($params,'records')) ? intval($params['records']) : 40);
$params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc'); $params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc');
$params['cat'] = ((x($_REQUEST,'cat')) ? escape_tags($_REQUEST['cat']) : '');
$channel = ''; $channel = '';
if(argc() > 1) { if(argc() > 1) {

View file

@ -123,12 +123,12 @@ function import_account(&$a, $account_id) {
if(array_key_exists('channel',$data)) { if(array_key_exists('channel',$data)) {
if($completed < 1) { if($completed < 1) {
$channel = import_channel($data['channel']); $channel = import_channel($data['channel'], $account_id);
} }
else { else {
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1", $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
intval(get_account_id()), intval($account_id),
dbesc($channel['channel_guid']) dbesc($channel['channel_guid'])
); );
if($r) if($r)
@ -166,7 +166,7 @@ function import_account(&$a, $account_id) {
if($data['photo']) { if($data['photo']) {
require_once('include/photo/photo_driver.php'); require_once('include/photo/photo_driver.php');
import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']); import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],$account_id,$channel['channel_id']);
} }
if(is_array($data['profile'])) if(is_array($data['profile']))
@ -335,7 +335,7 @@ function import_account(&$a, $account_id) {
unset($abook['abook_id']); unset($abook['abook_id']);
unset($abook['abook_rating']); unset($abook['abook_rating']);
unset($abook['abook_rating_text']); unset($abook['abook_rating_text']);
$abook['abook_account'] = get_account_id(); $abook['abook_account'] = $account_id;
$abook['abook_channel'] = $channel['channel_id']; $abook['abook_channel'] = $channel['channel_id'];
if(! array_key_exists('abook_blocked',$abook)) { if(! array_key_exists('abook_blocked',$abook)) {
$abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0); $abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0);

View file

@ -473,8 +473,8 @@ function item_post(&$a) {
require_once('include/text.php'); require_once('include/text.php');
if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) { if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) {
require_once('include/bb2diaspora.php'); require_once('include/bb2diaspora.php');
$body = escape_tags(trim($body));
$body = str_replace("\n",'<br />', $body); $body = str_replace("\n",'<br />', $body);
$body = purify_html($body);
$body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body); $body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body);
$body = diaspora2bb($body,true); $body = diaspora2bb($body,true);
@ -651,6 +651,29 @@ function item_post(&$a) {
} }
} }
if($orig_post) {
// preserve original tags
$t = q("select * from term where oid = %d and otype = %d and uid = %d and type in ( %d, %d, %d )",
intval($orig_post['id']),
intval(TERM_OBJ_POST),
intval($profile_uid),
intval(TERM_UNKNOWN),
intval(TERM_FILE),
intval(TERM_COMMUNITYTAG)
);
if($t) {
foreach($t as $t1) {
$post_tags[] = array(
'uid' => $profile_uid,
'type' => $t1['type'],
'otype' => TERM_OBJ_POST,
'term' => $t1['term'],
'url' => $t1['url'],
);
}
}
}
$item_unseen = ((local_channel() != $profile_uid) ? 1 : 0); $item_unseen = ((local_channel() != $profile_uid) ? 1 : 0);
$item_wall = (($post_type === 'wall' || $post_type === 'wall-comment') ? 1 : 0); $item_wall = (($post_type === 'wall' || $post_type === 'wall-comment') ? 1 : 0);
@ -703,6 +726,10 @@ function item_post(&$a) {
$plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid; $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
} }
$datarray['aid'] = $channel['channel_account_id']; $datarray['aid'] = $channel['channel_account_id'];
$datarray['uid'] = $profile_uid; $datarray['uid'] = $profile_uid;
@ -781,6 +808,22 @@ function item_post(&$a) {
if($orig_post) if($orig_post)
$datarray['edit'] = true; $datarray['edit'] = true;
if(feature_enabled($profile_uid,'suppress_duplicates') && (! $orig_post)) {
$z = q("select created from item where uid = %d and body = '%s'",
intval($profile_uid),
dbesc($body)
);
if($z && $z[0]['created'] > datetime_convert('UTC','UTC', 'now - 2 minutes')) {
$datarray['cancel'] = 1;
notice( t('Duplicate post suppressed.') . EOL);
logger('Duplicate post. Faking plugin cancel.');
}
}
call_hooks('post_local',$datarray); call_hooks('post_local',$datarray);
if(x($datarray,'cancel')) { if(x($datarray,'cancel')) {

View file

@ -329,7 +329,8 @@ function mail_content(&$a) {
'to_url' => chanlink_hash($message['to_xchan']), 'to_url' => chanlink_hash($message['to_xchan']),
'to_photo' => $message['to']['xchan_photo_s'], 'to_photo' => $message['to']['xchan_photo_s'],
'subject' => $message['title'], 'subject' => $message['title'],
'body' => smilies(bbcode($message['body']) . $s), 'body' => smilies(bbcode($message['body'])),
'attachments' => $s,
'delete' => t('Delete message'), 'delete' => t('Delete message'),
'dreport' => t('Delivery report'), 'dreport' => t('Delivery report'),
'recall' => t('Recall message'), 'recall' => t('Recall message'),

View file

@ -248,7 +248,7 @@ function network_content(&$a, $update = 0, $load = false) {
$sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY)); $sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
} }
if(x($hashtags)) { if(x($hashtags)) {
$sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG)); $sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG));
} }
if(! $update) { if(! $update) {
@ -313,7 +313,7 @@ function network_content(&$a, $update = 0, $load = false) {
if(x($_GET,'search')) { if(x($_GET,'search')) {
$search = escape_tags($_GET['search']); $search = escape_tags($_GET['search']);
if(strpos($search,'#') === 0) { if(strpos($search,'#') === 0) {
$sql_extra .= term_query('item',substr($search,1),TERM_HASHTAG); $sql_extra .= term_query('item',substr($search,1),TERM_HASHTAG,TERM_COMMUNITYTAG);
} }
else { else {
$sql_extra .= sprintf(" AND item.body like '%s' ", $sql_extra .= sprintf(" AND item.body like '%s' ",

View file

@ -6,6 +6,7 @@
*/ */
require_once('include/photo/photo_driver.php'); require_once('include/photo/photo_driver.php');
require_once('include/identity.php');
/* @brief Function for sync'ing permissions of profile-photos and their profile /* @brief Function for sync'ing permissions of profile-photos and their profile
* *
@ -195,6 +196,8 @@ function profile_photo_post(&$a) {
); );
} }
profiles_build_sync(local_channel());
// We'll set the updated profile-photo timestamp even if it isn't the default profile, // We'll set the updated profile-photo timestamp even if it isn't the default profile,
// so that browsers will do a cache update unconditionally // so that browsers will do a cache update unconditionally

View file

@ -1,5 +1,6 @@
<?php <?php
require_once('include/identity.php');
function profiles_init(&$a) { function profiles_init(&$a) {
@ -37,6 +38,12 @@ function profiles_init(&$a) {
if($r) if($r)
info( t('Profile deleted.') . EOL); info( t('Profile deleted.') . EOL);
// @fixme this is a much more complicated sync - add any changed abook entries and
// also add deleted flag to profile structure
// profiles_build_sync is just here as a placeholder - it doesn't work at all here
// profiles_build_sync(local_channel());
goaway($a->get_baseurl(true) . '/profiles'); goaway($a->get_baseurl(true) . '/profiles');
return; // NOTREACHED return; // NOTREACHED
} }
@ -118,7 +125,10 @@ function profiles_init(&$a) {
dbesc($name) dbesc($name)
); );
info( t('New profile created.') . EOL); info( t('New profile created.') . EOL);
if(count($r3) == 1)
profiles_build_sync(local_channel());
if(($r3) && (count($r3) == 1))
goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']); goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
goaway($a->get_baseurl(true) . '/profiles'); goaway($a->get_baseurl(true) . '/profiles');
@ -193,7 +203,6 @@ function profiles_post(&$a) {
$namechanged = false; $namechanged = false;
call_hooks('profile_post', $_POST);
// import from json export file. // import from json export file.
// Only import fields that are allowed on this hub // Only import fields that are allowed on this hub
@ -220,6 +229,7 @@ function profiles_post(&$a) {
} }
} }
call_hooks('profile_post', $_POST);
if((argc() > 1) && (argv(1) !== "new") && intval(argv(1))) { if((argc() > 1) && (argv(1) !== "new") && intval(argv(1))) {
@ -564,8 +574,6 @@ function profiles_post(&$a) {
} }
function profiles_content(&$a) { function profiles_content(&$a) {
$o = ''; $o = '';

View file

@ -75,9 +75,10 @@ function search_content(&$a,$update = 0, $load = false) {
return $o; return $o;
if($tag) { if($tag) {
$sql_extra = sprintf(" AND `item`.`id` IN (select `oid` from term where otype = %d and type = %d and term = '%s') ", $sql_extra = sprintf(" AND `item`.`id` IN (select `oid` from term where otype = %d and type in ( %d , %d) and term = '%s') ",
intval(TERM_OBJ_POST), intval(TERM_OBJ_POST),
intval(TERM_HASHTAG), intval(TERM_HASHTAG),
intval(TERM_COMMUNITYTAG),
dbesc(protect_sprintf($search)) dbesc(protect_sprintf($search))
); );
} }

View file

@ -42,8 +42,9 @@ function search_ac_init(&$a){
} }
} }
$r = q("select distinct term, tid, url from term where type = %d $tag_sql_extra group by term order by term asc", $r = q("select distinct term, tid, url from term where type in ( %d, %d ) $tag_sql_extra group by term order by term asc",
intval(TERM_HASHTAG) intval(TERM_HASHTAG),
intval(TERM_COMMUNITYTAG)
); );
if(count($r)) { if(count($r)) {

View file

@ -405,7 +405,6 @@ function settings_post(&$a) {
$allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); $allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0);
$blocktags = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted! $blocktags = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted!
$unkmail = (((x($_POST,'unkmail')) && (intval($_POST['unkmail']) == 1)) ? 1: 0); $unkmail = (((x($_POST,'unkmail')) && (intval($_POST['unkmail']) == 1)) ? 1: 0);
$cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0); $cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0);
@ -416,6 +415,8 @@ function settings_post(&$a) {
$post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0); $post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0);
$adult = (($_POST['adult'] == 1) ? 1 : 0); $adult = (($_POST['adult'] == 1) ? 1 : 0);
$cal_first_day = (((x($_POST,'first_day')) && (intval($_POST['first_day']) == 1)) ? 1: 0);
$channel = $a->get_channel(); $channel = $a->get_channel();
$pageflags = $channel['channel_pageflags']; $pageflags = $channel['channel_pageflags'];
$existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0); $existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0);
@ -503,6 +504,7 @@ function settings_post(&$a) {
set_pconfig(local_channel(),'system','evdays',$evdays); set_pconfig(local_channel(),'system','evdays',$evdays);
set_pconfig(local_channel(),'system','photo_path',$photo_path); set_pconfig(local_channel(),'system','photo_path',$photo_path);
set_pconfig(local_channel(),'system','attach_path',$attach_path); set_pconfig(local_channel(),'system','attach_path',$attach_path);
set_pconfig(local_channel(),'system','cal_first_day',$cal_first_day);
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d", $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d",
dbesc($username), dbesc($username),
@ -1110,6 +1112,7 @@ function settings_content(&$a) {
'$removeme' => t('Remove Channel'), '$removeme' => t('Remove Channel'),
'$removechannel' => t('Remove this channel.'), '$removechannel' => t('Remove this channel.'),
'$firefoxshare' => t('Firefox Share $Projectname provider'), '$firefoxshare' => t('Firefox Share $Projectname provider'),
'$cal_first_day' => array('first_day', t('Start calendar week on monday'), ((get_pconfig(local_channel(),'system','cal_first_day')) ? 1 : ''), '', $yes_no),
)); ));
call_hooks('settings_form',$o); call_hooks('settings_form',$o);

View file

@ -1,104 +1,10 @@
<?php <?php
function siteinfo_init(&$a) { function siteinfo_init(&$a) {
global $db;
if ($a->argv[1]=="json"){
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
$directory_mode = Array('DIRECTORY_MODE_NORMAL', 'DIRECTORY_MODE_SECONDARY','DIRECTORY_MODE_PRIMARY', 'DIRECTORY_MODE_STANDALONE');
$sql_extra = '';
$r = q("select * from channel left join account on account_id = channel_account_id where ( account_roles & 4096 )>0 and account_default_channel = channel_id");
if($r) { if (argv(1) === 'json') {
$admin = array(); $data = get_site_info();
foreach($r as $rr) {
if($rr['channel_pageflags'] & PAGE_HUBADMIN)
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
if(! $admin) {
foreach($r as $rr) {
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
}
}
else {
$admin = false;
}
$def_service_class = get_config('system','default_service_class');
if($def_service_class)
$service_class = get_config('service_class',$def_service_class);
else
$service_class = false;
$visible_plugins = array();
if(is_array($a->plugins) && count($a->plugins)) {
$r = q("select * from addon where hidden = 0");
if(count($r))
foreach($r as $rr)
$visible_plugins[] = $rr['name'];
}
sort($visible_plugins);
if(@is_dir('.git') && function_exists('shell_exec'))
$commit = trim(@shell_exec('git log -1 --format="%h"'));
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
$site_info = get_config('system','info');
$site_name = get_config('system','sitename');
if(! get_config('system','hidden_version_siteinfo')) {
$version = RED_VERSION;
if(@is_dir('.git') && function_exists('shell_exec')) {
$commit = trim( @shell_exec('git log -1 --format="%h"'));
if(! get_config('system','hidden_tag_siteinfo'))
$tag = trim( @shell_exec('git describe --tags --abbrev=0'));
else
$tag = '';
}
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
}
else {
$version = $commit = '';
}
//Statistics
$channels_total_stat = intval(get_config('system','channels_total_stat'));
$channels_active_halfyear_stat = intval(get_config('system','channels_active_halfyear_stat'));
$channels_active_monthly_stat = intval(get_config('system','channels_active_monthly_stat'));
$local_posts_stat = intval(get_config('system','local_posts_stat'));
$hide_in_statistics = intval(get_config('system','hide_in_statistics'));
$site_expire = intval(get_config('system', 'default_expire_days'));
$data = Array(
'version' => $version,
'version_tag' => $tag,
'commit' => $commit,
'url' => z_root(),
'plugins' => $visible_plugins,
'register_policy' => $register_policy[get_config('system','register_policy')],
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
'language' => get_config('system','language'),
'rss_connections' => get_config('system','feed_contacts'),
'expiration' => $site_expire,
'default_service_restrictions' => $service_class,
'admin' => $admin,
'site_name' => (($site_name) ? $site_name : ''),
'platform' => PLATFORM_NAME,
'dbdriver' => $db->getdriver(),
'lastpoll' => get_config('system','lastpoll'),
'info' => (($site_info) ? $site_info : ''),
'channels_total' => $channels_total_stat,
'channels_active_halfyear' => $channels_active_halfyear_stat,
'channels_active_monthly' => $channels_active_monthly_stat,
'local_posts' => $local_posts_stat,
'hide_in_statistics' => $hide_in_statistics
);
json_return_and_die($data); json_return_and_die($data);
} }
} }

View file

@ -0,0 +1,8 @@
<?php
function siteinfo_json_init(&$a) {
$data = get_site_info();
json_return_and_die($data);
}

View file

@ -11,18 +11,24 @@ function subthread_content(&$a) {
return; return;
} }
$item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0);
if(argv(1) === 'sub') if(argv(1) === 'sub')
$activity = ACTIVITY_FOLLOW; $activity = ACTIVITY_FOLLOW;
elseif(argv(1) === 'unsub') elseif(argv(1) === 'unsub')
$activity = ACTIVITY_UNFOLLOW; $activity = ACTIVITY_UNFOLLOW;
$item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0);
$r = q("SELECT * FROM `item` WHERE `parent` = '%s' OR `parent_mid` = '%s' and parent = id LIMIT 1", $r = q("SELECT parent FROM item WHERE id = '%s'",
dbesc($item_id),
dbesc($item_id) dbesc($item_id)
); );
if($r) {
$r = q("select * from item where id = parent and id = %d limit 1",
dbesc($r[0]['parent'])
);
}
if((! $item_id) || (! $r)) { if((! $item_id) || (! $r)) {
logger('subthread: no item ' . $item_id); logger('subthread: no item ' . $item_id);
return; return;

View file

@ -123,7 +123,7 @@ function tagger_content(&$a) {
$arr['object'] = $obj; $arr['object'] = $obj;
$arr['parent_mid'] = $item['mid']; $arr['parent_mid'] = $item['mid'];
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_HASHTAG,$term,$tagid); store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$term,$tagid);
$ret = post_activity_item($arr); $ret = post_activity_item($arr);
if($ret['success']) if($ret['success'])

View file

@ -39,6 +39,7 @@ function update_channel_content(&$a) {
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -50,6 +51,7 @@ function update_channel_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
/** /**
* reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well * reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well

View file

@ -20,7 +20,7 @@ function update_display_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -32,7 +32,7 @@ function update_display_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
echo str_replace("\t",' ',$text); echo str_replace("\t",' ',$text);
echo (($_GET['msie'] == 1) ? '</div>' : '</section>'); echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n"; echo "</body></html>\r\n";

View file

@ -16,7 +16,7 @@ function update_home_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -28,7 +28,7 @@ function update_home_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
echo str_replace("\t",' ',$text); echo str_replace("\t",' ',$text);
echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>'); echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n"; echo "</body></html>\r\n";

View file

@ -18,7 +18,7 @@ function update_network_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -30,7 +30,7 @@ function update_network_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
echo str_replace("\t",' ',$text); echo str_replace("\t",' ',$text);
echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>'); echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n"; echo "</body></html>\r\n";

View file

@ -16,7 +16,7 @@ function update_public_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -28,7 +28,7 @@ function update_public_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
echo str_replace("\t",' ',$text); echo str_replace("\t",' ',$text);
echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>'); echo ((array_key_exists('msie',$_GET) && $_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n"; echo "</body></html>\r\n";

View file

@ -41,7 +41,7 @@ function update_search_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
// $text = preg_replace($pattern, $replace, $text); // $text = preg_replace($pattern, $replace, $text);
/*
if(! $load) { if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
@ -53,7 +53,7 @@ function update_search_content(&$a) {
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
} }
*/
/** /**
* reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well * reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well
*/ */

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,12 @@ if [ $# -ne 1 ]; then
exit 1 exit 1
fi fi
if [ -d extend/addon/$1 ] ; then
cd extend/addon/$1 cd extend/addon/$1
else
echo "$1 not found. Aborting..."
exit 1
fi
if [ -d .git ] ; then if [ -d .git ] ; then
git pull git pull

View file

@ -1 +1 @@
2015-11-13.1215 2015-12-03.1235

View file

@ -29,7 +29,7 @@ nav ul li {
max-height: 50px; max-height: 50px;
} }
nav img { nav .navbar-header img {
height: 49px; height: 49px;
width: 49px; width: 49px;
margin-top: 1px; margin-top: 1px;
@ -57,22 +57,14 @@ nav .navbar-toggle {
/* nav overrides end */ /* nav overrides end */
aside .nav-pills > li > a { aside .nav-pills > li > a,
.response-list .nav-pills > li > a {
padding: 6px 10px; padding: 6px 10px;
} }
.dropdown-menu img {
float: left;
width: 32px;
height: 32px;
margin-right: 5px;
}
.dropdown-menu li a { .dropdown-menu li a {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: 1em;
padding: 5px 10px;
} }
.nav-tabs.nav-justified > li { .nav-tabs.nav-justified > li {

View file

@ -178,7 +178,6 @@ a.wall-item-name-link {
/* comment_item */ /* comment_item */
.comment-edit-text-empty, .comment-edit-text-full { .comment-edit-text-empty, .comment-edit-text-full {
float: left;
width: 100%; width: 100%;
} }
@ -247,8 +246,37 @@ a.wall-item-name-link {
font-size: 1em !important; font-size: 1em !important;
} }
.response-photo { /* event item */
height: 18px !important;
width: 18px !important; .event-item-title h3 {
margin: 0px 0px 10px 0px;
font-weight: bold;
} }
.event-item-description {
padding-bottom: 10px;
}
.event-item-label {
font-weight: bold;
}
/* vevent */
.event-title h3 {
margin: 0px 0px 10px 0px;
font-weight: bold;
}
.vevent {
padding-top: 10px;
}
.event-description {
padding-top: 10px;
padding-bottom: 10px;
}
.event-label {
font-weight: bold;
}

View file

@ -1,55 +1,44 @@
/* fix borders */
#event-desc-textarea, #event-location-textarea { #events-calendar {
width: 400px; margin-left: -1px;
margin-bottom: -1px;
} }
#event-summary-text, #event-start-text, #event-finish-text { .fc-unthemed th,
width: 200px; .fc-unthemed td,
float: left; .fc-unthemed thead,
.fc-unthemed tbody,
.fc-unthemed .fc-divider,
.fc-unthemed .fc-row,
.fc-unthemed .fc-popover {
border-color: #ccc !important;
} }
#event-summary, #start_text { #events-spinner .spinner {
width: 95%; margin-top: 9px;
float: left; margin-bottom: -9px;
}
#finish_text {
width: 100%;
float: left;
}
#event-category-wrap {
margin-top: 15px;
}
.event-cats {
margin-top: 15px;
} }
.bootstrap-tagsinput { .bootstrap-tagsinput {
width: 100%; width: 100%;
padding: 6px 12px;
} }
.event-wrapper,
.required { .vevent {
float: left; max-width: 700px;
cursor: default;
} }
#event-datetime-break { .event-owner {
clear: both; padding: 10px;
} }
#event-nofinish-break { .event-owner img {
margin-bottom: 10px; margin-right: 5px;
} }
#event-desc-text, #event-location-text, .event-form-location-end { .vevent,
margin-top: 15px; .event-buttons {
} padding: 10px;
#event-edit-preview-btn {
margin-right: 15px;
} }

View file

@ -24,3 +24,7 @@
#prvmail-rotator { #prvmail-rotator {
margin: 15px; margin: 15px;
} }
.mail-conv-outside-wrapper {
margin-bottom: 20px;
}

View file

@ -124,3 +124,12 @@ li:hover .group-edit-icon {
width: 250px; width: 250px;
} }
/* events tools */
#event-upload-form {
margin-top: 10px;
}
#event-upload-choose {
width: 100%;
}

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