summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addmedia.php2
-rw-r--r--admin.php47
-rw-r--r--admin_media.php2
-rw-r--r--admin_modules.php2
-rw-r--r--admin_site_access.php2
-rw-r--r--admin_site_change.php2
-rw-r--r--admin_site_logs.php2
-rw-r--r--admin_site_merge.php2
-rw-r--r--admin_trees_config.php203
-rw-r--r--admin_users.php4
-rw-r--r--ancestry.php2
-rw-r--r--assets/js-1.7.0/admin.js57
-rw-r--r--assets/js-1.7.0/autocomplete.js (renamed from js/autocomplete.js)0
-rw-r--r--assets/js-1.7.0/jquery.colorbox-1.5.14.js (renamed from js/jquery.colorbox-1.5.14.js)0
-rw-r--r--assets/js-1.7.0/jquery.colorbox.patch (renamed from js/jquery.colorbox.patch)0
-rw-r--r--assets/js-1.7.0/jquery.cookie-1.4.1.js (renamed from js/jquery.cookie-1.4.1.js)0
-rw-r--r--assets/js-1.7.0/jquery.datatables-1.10.4.js (renamed from js/jquery.datatables-1.10.4.js)0
-rw-r--r--assets/js-1.7.0/jquery.wheelzoom-2.0.0.js (renamed from js/jquery.wheelzoom-2.0.0.js)0
-rw-r--r--assets/js-1.7.0/jquery.wheelzoom.patch (renamed from js/jquery.wheelzoom.patch)0
-rw-r--r--assets/js-1.7.0/webtrees.js (renamed from js/webtrees-1.7.0.js)0
-rw-r--r--branches.php2
-rw-r--r--compact.php2
-rw-r--r--descendancy.php2
-rw-r--r--edit_interface.php2
-rw-r--r--edituser.php2
-rw-r--r--familybook.php2
-rw-r--r--fanchart.php2
-rw-r--r--hourglass.php2
-rw-r--r--includes/functions/functions_print_lists.php18
-rw-r--r--includes/session.php28
-rw-r--r--individual.php2
-rw-r--r--inverselink.php2
-rw-r--r--library/WT/Controller/Page.php4
-rw-r--r--library/WT/Stats.php2
-rw-r--r--lifespan.php2
-rw-r--r--modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php2
-rw-r--r--modules_v3/charts/module.php2
-rw-r--r--modules_v3/clippings/module.php2
-rw-r--r--modules_v3/gedcom_favorites/module.php2
-rw-r--r--modules_v3/googlemap/module.php2
-rw-r--r--modules_v3/stories/module.php6
-rw-r--r--modules_v3/todo/module.php2
-rw-r--r--modules_v3/yahrzeit/module.php2
-rw-r--r--packages/jquery-1.11.2/jquery.min.js (renamed from js/jquery-1.11.2.js)0
-rw-r--r--packages/jquery-ui-1.11.2/js/jquery-ui.min.js (renamed from js/jquery-ui-1.11.2.js)0
-rw-r--r--pedigree.php2
-rw-r--r--relationship.php2
-rw-r--r--reportengine.php2
-rw-r--r--search.php2
-rw-r--r--search_advanced.php2
-rw-r--r--statistics.php2
-rw-r--r--timeline.php2
52 files changed, 245 insertions, 190 deletions
diff --git a/addmedia.php b/addmedia.php
index 6da0700016..31acb305bc 100644
--- a/addmedia.php
+++ b/addmedia.php
@@ -44,7 +44,7 @@ $update_CHAN = !WT_Filter::postBool('preserve_last_changed');
$controller = new WT_Controller_Simple;
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->restrictAccess(Auth::isMember());
diff --git a/admin.php b/admin.php
index 674fd4ae53..18d531c4d2 100644
--- a/admin.php
+++ b/admin.php
@@ -317,7 +317,6 @@ function old_paths() {
WT_ROOT . 'includes/family_nav.php',
WT_ROOT . 'includes/functions/functions_lang.php',
WT_ROOT . 'includes/functions/functions_tools.php',
- WT_ROOT . 'js/conio',
WT_ROOT . 'logs.php',
WT_ROOT . 'manageservers.php',
WT_ROOT . 'media.php',
@@ -350,7 +349,6 @@ function old_paths() {
WT_ROOT . 'wtinfo.php',
// Removed in 1.1.1
// Removed in 1.1.2
- WT_ROOT . 'js/treenav.js',
WT_ROOT . 'library/WT/TreeNav.php',
WT_ROOT . 'treenav.php',
// Removed in 1.2.0
@@ -384,7 +382,6 @@ function old_paths() {
//WT_ROOT.'modules_v2', // Do not delete - users may have stored custom modules/data here
// Removed in 1.2.4
WT_ROOT . 'includes/cssparser.inc.php',
- WT_ROOT . 'js/strings.js',
WT_ROOT . 'modules_v3/gedcom_favorites/help_text.php',
WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_find.php',
WT_ROOT . 'modules_v3/GEDFact_assistant/_MEDIA/media_3_search_add.php',
@@ -411,14 +408,6 @@ function old_paths() {
// Removed in 1.2.5
WT_ROOT . 'includes/media_reorder_count.php',
WT_ROOT . 'includes/media_tab_head.php',
- WT_ROOT . 'js/behaviour.js.htm',
- WT_ROOT . 'js/bennolan',
- WT_ROOT . 'js/bosrup',
- WT_ROOT . 'js/kryogenix',
- WT_ROOT . 'js/overlib.js.htm',
- WT_ROOT . 'js/scriptaculous',
- WT_ROOT . 'js/scriptaculous.js.htm',
- WT_ROOT . 'js/sorttable.js.htm',
WT_ROOT . 'library/WT/JS.php',
WT_ROOT . 'modules_v3/clippings/index.php',
WT_ROOT . 'modules_v3/googlemap/css/googlemap_style.css',
@@ -458,9 +447,6 @@ function old_paths() {
WT_ROOT . 'includes/functions/functions_name.php',
WT_ROOT . 'includes/grampsxml.rng',
WT_ROOT . 'includes/session_spider.php',
- WT_ROOT . 'js/autocomplete.js.htm',
- WT_ROOT . 'js/prototype',
- WT_ROOT . 'js/prototype.js.htm',
WT_ROOT . 'modules_v3/googlemap/admin_editconfig.php',
WT_ROOT . 'modules_v3/googlemap/admin_placecheck.php',
WT_ROOT . 'modules_v3/googlemap/flags.php',
@@ -472,7 +458,6 @@ function old_paths() {
// Removed in 1.3.1
WT_ROOT . 'imageflush.php',
WT_ROOT . 'includes/functions/functions_places.php',
- WT_ROOT . 'js/html5.js',
WT_ROOT . 'modules_v3/googlemap/wt_v3_pedigree_map.js.php',
WT_ROOT . 'modules_v3/lightbox/js/tip_balloon_RTL.js',
// Removed in 1.3.2
@@ -483,10 +468,6 @@ function old_paths() {
// Removed in 1.4.0
WT_ROOT . 'imageview.php',
WT_ROOT . 'includes/functions/functions_media_reorder.php',
- WT_ROOT . 'js/jquery',
- WT_ROOT . 'js/jw_player',
- WT_ROOT . 'js/modernizr.custom-2.6.1.js',
- WT_ROOT . 'js/webtrees.js',
WT_ROOT . 'media/MediaInfo.txt',
WT_ROOT . 'media/thumbs/ThumbsInfo.txt',
WT_ROOT . 'modules_v3/GEDFact_assistant/css/media_0_inverselink.css',
@@ -517,14 +498,10 @@ function old_paths() {
WT_ROOT . 'themes/_administration/jquery',
WT_ROOT . 'themes/webtrees/chrome.css',
// Removed in 1.4.1
- WT_ROOT . 'js/webtrees-1.4.0.js',
WT_ROOT . 'modules_v3/lightbox/images/image_edit.png',
WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
// Removed in 1.4.2
WT_ROOT . 'modules_v3/lightbox/images/image_view.png',
- WT_ROOT . 'js/jquery.colorbox-1.4.3.js',
- WT_ROOT . 'js/jquery-ui-1.10.0.js',
- WT_ROOT . 'js/webtrees-1.4.1.js',
WT_ROOT . 'modules_v3/top10_pageviews/help_text.php',
WT_ROOT . 'themes/_administration/jquery-ui-1.10.0',
WT_ROOT . 'themes/clouds/jquery-ui-1.10.0',
@@ -538,9 +515,6 @@ function old_paths() {
WT_ROOT . 'includes/functions/functions_privacy.php',
WT_ROOT . 'includes/media_reorder.php',
WT_ROOT . 'includes/old_messages.php',
- WT_ROOT . 'js/jquery-1.9.1.js',
- WT_ROOT . 'js/jquery.cookie-1.3.1.js',
- WT_ROOT . 'js/webtrees-1.4.2.js',
WT_ROOT . 'library/WT/Event.php',
WT_ROOT . 'library/WT/Person.php',
WT_ROOT . 'library/phpmailer',
@@ -581,7 +555,6 @@ function old_paths() {
WT_ROOT . 'themes/xenea/msie.css',
WT_ROOT . 'themes/xenea/style.css',
// Removed in 1.5.1
- WT_ROOT . 'js/webtrees-1.5.0.js',
WT_ROOT . 'themes/_administration/css-1.5.0',
WT_ROOT . 'themes/clouds/css-1.5.0',
WT_ROOT . 'themes/colors/css-1.5.0',
@@ -590,7 +563,6 @@ function old_paths() {
WT_ROOT . 'themes/webtrees/css-1.5.0',
WT_ROOT . 'themes/xenea/css-1.5.0',
// Removed in 1.5.2
- WT_ROOT . 'js/webtrees-1.5.1.js',
WT_ROOT . 'themes/_administration/css-1.5.1',
WT_ROOT . 'themes/clouds/css-1.5.1',
WT_ROOT . 'themes/colors/css-1.5.1',
@@ -599,9 +571,6 @@ function old_paths() {
WT_ROOT . 'themes/webtrees/css-1.5.1',
WT_ROOT . 'themes/xenea/css-1.5.1',
// Removed in 1.5.3
- WT_ROOT . 'js/jquery-1.10.2.js',
- WT_ROOT . 'js/jquery-ui-1.10.3.js',
- WT_ROOT . 'js/webtrees-1.5.2.js',
WT_ROOT . 'library/htmlpurifier-4.6.0',
//WT_ROOT.'library/Michelf', On windows, this would delete library/michelf
WT_ROOT . 'library/tcpdf',
@@ -627,13 +596,6 @@ function old_paths() {
// Removed in 1.6.0
WT_ROOT . 'downloadbackup.php',
WT_ROOT . 'includes/functions/functions_utf-8.php',
- WT_ROOT . 'js/jquery.colorbox-1.4.15.js',
- WT_ROOT . 'js/jquery.cookie-1.4.0.js',
- WT_ROOT . 'js/jquery.datatables-1.9.4.js',
- WT_ROOT . 'js/jquery.jeditable-1.7.1.js',
- WT_ROOT . 'js/jquery.wheelzoom-1.1.2.js',
- WT_ROOT . 'js/jquery-1.11.0.js',
- WT_ROOT . 'js/webtrees-1.5.3.js',
WT_ROOT . 'library/WT/Debug.php',
WT_ROOT . 'modules_v3/ckeditor/ckeditor-4.3.2-custom',
WT_ROOT . 'site-php-version.php',
@@ -647,10 +609,6 @@ function old_paths() {
// Removed in 1.6.1
WT_ROOT . 'includes/authentication.php',
// Removed in 1.6.2
- WT_ROOT . 'js/jquery.colorbox-1.5.9.js',
- WT_ROOT . 'js/jquery-ui-1.10.4.js',
- WT_ROOT . 'js/modernizr.custom-2.6.2.js',
- WT_ROOT . 'js/webtrees-1.6.0.js',
WT_ROOT . 'themes/_administration/css-1.6.0',
WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
WT_ROOT . 'themes/clouds/css-1.6.0',
@@ -668,10 +626,7 @@ function old_paths() {
WT_ROOT . 'themes/_administration/css-1.6.0',
WT_ROOT . 'themes/_administration/jquery-ui-1.10.3',
// Removed in 1.7.0
- WT_ROOT . 'js/jquery-1.11.1.js',
- WT_ROOT . 'js/jquery.datatables-1.10.3.js',
- WT_ROOT . 'js/jquery.jeditable-1.7.3.js',
- WT_ROOT . 'js/webtrees-1.6.2.js',
+ WT_ROOT . 'js',
WT_ROOT . 'library/WT/MenuBar.php',
WT_ROOT . 'save.php',
WT_ROOT . 'themes/_administration/css-1.6.2',
diff --git a/admin_media.php b/admin_media.php
index 8a9aa6da79..abeb2f61cd 100644
--- a/admin_media.php
+++ b/admin_media.php
@@ -572,7 +572,7 @@ $controller = new WT_Controller_Page;
$controller
->restrictAccess(Auth::isAdmin())
->setPageTitle(WT_I18N::translate('Media'))
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->pageHeader()
->addInlineJavascript('
diff --git a/admin_modules.php b/admin_modules.php
index 58114d5e43..8ffd89de61 100644
--- a/admin_modules.php
+++ b/admin_modules.php
@@ -98,7 +98,7 @@ foreach ($module_status as $module_name => $status) {
$controller
->pageHeader()
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->addInlineJavascript('
function reindexMods(id) {
diff --git a/admin_site_access.php b/admin_site_access.php
index 9c2895c1c4..a2efd1c700 100644
--- a/admin_site_access.php
+++ b/admin_site_access.php
@@ -33,7 +33,7 @@ $rules = array(
$controller = new WT_Controller_Page;
$controller
->restrictAccess(Auth::isAdmin())
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->setPageTitle(WT_I18N::translate('Site access rules'));
diff --git a/admin_site_change.php b/admin_site_change.php
index beb32d2f0d..fcb5c9fba0 100644
--- a/admin_site_change.php
+++ b/admin_site_change.php
@@ -220,7 +220,7 @@ case 'load_json':
$controller
->pageHeader()
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->addExternalJavascript(WT_MOMENT_JS_URL)
->addExternalJavascript(WT_BOOTSTRAP_DATETIMEPICKER_JS_URL)
diff --git a/admin_site_logs.php b/admin_site_logs.php
index 5d159f11ad..293e1f64bd 100644
--- a/admin_site_logs.php
+++ b/admin_site_logs.php
@@ -190,7 +190,7 @@ case 'load_json':
$controller
->pageHeader()
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->addExternalJavascript(WT_MOMENT_JS_URL)
->addExternalJavascript(WT_BOOTSTRAP_DATETIMEPICKER_JS_URL)
diff --git a/admin_site_merge.php b/admin_site_merge.php
index 86e78285a7..16e20e7089 100644
--- a/admin_site_merge.php
+++ b/admin_site_merge.php
@@ -33,7 +33,7 @@ $controller = new WT_Controller_Page;
$controller
->restrictAccess(Auth::isManager())
->setPageTitle(WT_I18N::translate('Merge records'))
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->pageHeader();
diff --git a/admin_trees_config.php b/admin_trees_config.php
index 8e89e4386a..fe2b2355d4 100644
--- a/admin_trees_config.php
+++ b/admin_trees_config.php
@@ -190,9 +190,10 @@ foreach ($resns as $resn) {
if ($resn->tag_type) {
$resn->tag_label = WT_Gedcom_Tag::getLabel($resn->tag_type);
} else {
- $resn->tag_label = ' ';
+ $resn->tag_label = '';
}
}
+usort($resns, function(\stdClass $x, \stdClass $y) { return WT_I18N::strcasecmp($x->tag_label, $y->tag_label); });
// We have two fields in one
$CALENDAR_FORMATS = explode('_and_', $WT_TREE->getPreference('CALENDAR_FORMAT') . '_and_');
@@ -409,7 +410,8 @@ default:
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_ADMIN_JS_URL)
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
@@ -429,53 +431,99 @@ $controller
<input type="hidden" name="action" value="privacy">
<!-- REQUIRE_AUTHENTICATION -->
- <fieldset class="form-group">
- <legend class="control-label col-sm-3">
- <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Require visitor authentication'); ?>
- </legend>
- <div class="col-sm-9">
- <?php echo radio_buttons('REQUIRE_AUTHENTICATION', $no_yes, $WT_TREE->getPreference('REQUIRE_AUTHENTICATION'), 'class="radio-inline"'); ?>
+ <div class="form-group">
+ <div class="control-label col-sm-4">
+ <label>
+ <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show the family tree'); ?>
+ </label>
+ <div class="hidden-xs">
+ <span class="label visitors"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('visitors'); ?></span>
+ <span class="label members"><i class="fa fa-fw"></i><?php echo WT_I18N::translate('members'); ?></span>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <?php echo select_edit_control('REQUIRE_AUTHENTICATION', array('0' => WT_I18N::translate('Show to visitors'), '1' => WT_I18N::translate('Show to members'), ), null, $WT_TREE->getPreference('REQUIRE_AUTHENTICATION'), 'class="form-control"'); ?>
+ <p class="small text-muted">
+ <?php echo /* I18N: Help text for the “Family tree” configuration setting */ WT_I18N::translate('Enabling this option will force all visitors to login before they can view any data on the site.'); ?>
+ </p>
+ <?php if (WT_Site::getPreference('USE_REGISTRATION_MODULE')): ?>
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Require visitor authentication” configuration setting */ WT_I18N::translate('Enabling this option will force all visitors to login before they can view any data on the site.'); ?>
+ <?php echo WT_I18N::translate('If visitors can not see the family tree, they will not be able to sign up for an account. You will need to add their account manually.'); ?>
</p>
+ <?php endif; ?>
</div>
- </fieldset>
+ </div>
- <!-- HIDE_LIVE_PEOPLE -->
- <fieldset class="form-group">
- <legend class="control-label col-sm-3">
- <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Privacy options'); ?>
- </legend>
- <div class="col-sm-9">
- <?php echo radio_buttons('HIDE_LIVE_PEOPLE', $disable_enable, $WT_TREE->getPreference('HIDE_LIVE_PEOPLE'), 'class="radio-inline"'); ?>
+ <!-- SHOW_DEAD_PEOPLE -->
+ <div class="form-group">
+ <div class="control-label col-sm-4">
+ <label for="SHOW_DEAD_PEOPLE">
+ <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show dead individuals'); ?>
+ </label>
+ <div class="hidden-xs">
+ <span class="label visitors"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('visitors'); ?></span>
+ <span class="label members"><i class="fa fa-fw"></i><?php echo WT_I18N::translate('members'); ?></span>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <?php echo select_edit_control('SHOW_DEAD_PEOPLE', array_slice($privacy, 0, 2, true), null, $WT_TREE->getPreference('SHOW_DEAD_PEOPLE'), 'class="form-control"'); ?>
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Privacy options” configuration setting */ WT_I18N::translate('This option will enable all privacy settings and hide the details of living individuals, as defined or modified on the Privacy tab of each GEDCOM’s configuration page.'); ?>
+ <?php echo /* I18N: Help text for the “Show dead individuals” configuration setting */ WT_I18N::translate('Set the privacy access level for all dead individuals.'); ?>
</p>
</div>
- </fieldset>
+ </div>
- <!-- SHOW_DEAD_PEOPLE -->
+
+ <!-- MAX_ALIVE_AGE -->
<div class="form-group">
- <label class="control-label col-sm-3" for="SHOW_DEAD_PEOPLE">
- <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show dead individuals'); ?>
+ <label class="control-label col-sm-4" for="MAX_ALIVE_AGE">
+ <?php echo WT_I18N::translate('Age at which to assume an individual is dead'); ?>
</label>
- <div class="col-sm-9">
- <?php echo select_edit_control('SHOW_DEAD_PEOPLE', $privacy, null, $WT_TREE->getPreference('SHOW_DEAD_PEOPLE'), 'class="form-control"'); ?>
+ <div class="col-sm-8">
+ <input
+ class="form-control"
+ id="MAX_ALIVE_AGE"
+ maxlength="5"
+ name="MAX_ALIVE_AGE"
+ type="text"
+ value="<?php echo WT_Filter::escapeHtml($WT_TREE->getPreference('MAX_ALIVE_AGE')); ?>"
+ >
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Show dead individuals” configuration setting */ WT_I18N::translate('Set the privacy access level for all dead individuals.'); ?>
+ <?php echo /* I18N: Help text for the “Age at which to assume an individual is dead” configuration setting */ WT_I18N::translate('If this individual has any events other than death, burial, or cremation more recent than this number of years, he is considered to be “alive”. Children’s birth dates are considered to be such events for this purpose.'); ?>
</p>
</div>
</div>
- <!-- KEEP_ALIVE_YEARS_BIRTH / KEEP_ALIVE_YEARS_DEATH -->
+ <!-- HIDE_LIVE_PEOPLE -->
<fieldset class="form-group">
- <legend class="control-label col-sm-3">
- <?php echo /* I18N: A configuration setting. ... [who were] born in the last XX years or died in the last YY years */ WT_I18N::translate('Extend privacy to dead individuals'); ?>
- </legend>
- <div class="col-sm-9">
+ <div class="control-label col-sm-4">
+ <legend>
+ <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show living individuals'); ?>
+ </legend>
+ <div class="hidden-xs">
+ <span class="label visitors"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('visitors'); ?></span>
+ <span class="label members"><i class="fa fa-fw"></i><?php echo WT_I18N::translate('members'); ?></span>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <?php echo select_edit_control('HIDE_LIVE_PEOPLE', array('0' => WT_I18N::translate('Show to visitors'), '1' => WT_I18N::translate('Show to members'), ), null, $WT_TREE->getPreference('HIDE_LIVE_PEOPLE'), 'class="form-control"'); ?>
+ <p class="small text-muted">
+ <?php echo /* I18N: Help text for the “Show living individuals” configuration setting */ WT_I18N::translate('If you show living individuals to visitors, all other privacy restrictions are ignored. Do this only if all the data in your tree is public.'); ?>
+ </p>
+ </div>
+ </fieldset>
+
+ <!-- KEEP_ALIVE_YEARS_BIRTH / KEEP_ALIVE_YEARS_DEATH -->
+ <fieldset class="form-group">
+ <div class="control-label col-sm-4">
+ <legend>
+ <?php echo /* I18N: A configuration setting. ... [who were] born in the last XX years or died in the last YY years */ WT_I18N::translate('Extend privacy to dead individuals'); ?>
+ </legend>
+ </div>
+ <div class="col-sm-8">
<?php
echo
- /* I18N: Extend privacy to dead people [who were] ... */ WT_I18N::translate(
+ /* I18N: Extend privacy to dead individuals [who were] ... */ WT_I18N::translate(
'born in the last %1$s years or died in the last %2$s years',
'<input type="text" name="KEEP_ALIVE_YEARS_BIRTH" value="' . $WT_TREE->getPreference('KEEP_ALIVE_YEARS_BIRTH') . '" size="5" maxlength="3">',
'<input type="text" name="KEEP_ALIVE_YEARS_DEATH" value="' . $WT_TREE->getPreference('KEEP_ALIVE_YEARS_DEATH') . '" size="5" maxlength="3">'
@@ -488,50 +536,42 @@ $controller
<!-- SHOW_LIVING_NAMES -->
<div class="form-group">
- <label class="control-label col-sm-3" for="SHOW_LIVING_NAMES">
- <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Names of private individuals'); ?>
- </label>
- <div class="col-sm-9">
- <?php echo select_edit_control('SHOW_LIVING_NAMES', $privacy, null, $WT_TREE->getPreference('SHOW_LIVING_NAMES'), 'class="form-control"'); ?>
+ <div class="control-label col-sm-4">
+ <label for="SHOW_LIVING_NAMES">
+ <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show names of private individuals'); ?>
+ </label>
+ <div class="hidden-xs">
+ <span class="label visitors"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('visitors'); ?></span>
+ <span class="label members"><i class="fa fa-fw"></i><?php echo WT_I18N::translate('members'); ?></span>
+ <span class="label managers"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('managers'); ?></span>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <?php echo select_edit_control('SHOW_LIVING_NAMES', array_slice($privacy, 0, 3, true), null, $WT_TREE->getPreference('SHOW_LIVING_NAMES'), 'class="form-control"'); ?>
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Names of private individuals” configuration setting */ WT_I18N::translate('This option will show the names (but no other details) of private individuals. Individuals are private if they are still alive or if a privacy restriction has been added to their individual record. To hide a specific name, add a privacy restriction to that name record.'); ?>
+ <?php echo /* I18N: Help text for the “Show names of private individuals” configuration setting */ WT_I18N::translate('This option will show the names (but no other details) of private individuals. Individuals are private if they are still alive or if a privacy restriction has been added to their individual record. To hide a specific name, add a privacy restriction to that name record.'); ?>
</p>
</div>
</div>
<!-- SHOW_PRIVATE_RELATIONSHIPS -->
- <fieldset class="form-group">
- <legend class="control-label col-sm-3">
- <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show private relationships'); ?>
- </legend>
- <div class="col-sm-9">
- <?php echo radio_buttons('SHOW_PRIVATE_RELATIONSHIPS', $disable_enable, $WT_TREE->getPreference('SHOW_PRIVATE_RELATIONSHIPS'), 'class="radio-inline"'); ?>
- <p class="small text-muted">
- <?php echo /* I18N: Help text for the “Show private relationships” configuration setting */ WT_I18N::translate('This option will retain family links in private records. This means that you will see empty “private” boxes on the pedigree chart and on other charts with private individuals.'); ?>
- </p>
- </div>
- </fieldset>
-
- <!-- MAX_ALIVE_AGE -->
<div class="form-group">
- <label class="control-label col-sm-3" for="MAX_ALIVE_AGE">
- <?php echo WT_I18N::translate('Age at which to assume an individual is dead'); ?>
- </label>
- <div class="col-sm-9">
- <input
- class="form-control"
- id="MAX_ALIVE_AGE"
- maxlength="5"
- name="MAX_ALIVE_AGE"
- type="text"
- value="<?php echo WT_Filter::escapeHtml($WT_TREE->getPreference('MAX_ALIVE_AGE')); ?>"
- >
+ <div class="control-label col-sm-4">
+ <div>
+ <?php echo /* I18N: A configuration setting */ WT_I18N::translate('Show private relationships'); ?>
+ </div>
+ <div class="hidden-xs">
+ <span class="label visitors"><i class="fa fa-fw"></i> <?php echo WT_I18N::translate('visitors'); ?></span>
+ <span class="label members"><i class="fa fa-fw"></i><?php echo WT_I18N::translate('members'); ?></span>
+cd js </div>
+ </div>
+ <div class="col-sm-8">
+ <?php echo select_edit_control('SHOW_PRIVATE_RELATIONSHIPS', array('0' => WT_I18N::translate('Show to visitors'), '1' => WT_I18N::translate('Show to members'), ), null, $WT_TREE->getPreference('SHOW_PRIVATE_RELATIONSHIPS'), 'class="form-control"'); ?>
<p class="small text-muted">
- <?php echo /* I18N: Help text for the “Age at which to assume an individual is dead” configuration setting */ WT_I18N::translate('If this individual has any events other than death, burial, or cremation more recent than this number of years, he is considered to be “alive”. Children’s birth dates are considered to be such events for this purpose.'); ?>
+ <?php echo /* I18N: Help text for the “Show private relationships” configuration setting */ WT_I18N::translate('This option will retain family links in private records. This means that you will see empty “private” boxes on the pedigree chart and on other charts with private individuals.'); ?>
</p>
</div>
</div>
-
<h2><?php echo WT_I18N::translate('Privacy restrictions - these apply to records and facts that do not contain a GEDCOM RESN tag'); ?></h2>
<script id="new-resn-template" type="text/html">
@@ -551,7 +591,7 @@ $controller
</tr>
</script>
- <table class="table table-bordered table-hover" id="default-resn">
+ <table class="table table-bordered table-condensed table-hover" id="default-resn">
<caption class="sr-only">
<?php echo WT_I18N::translate('Privacy restrictions - these apply to records and facts that do not contain a GEDCOM RESN tag'); ?>
</caption>
@@ -568,35 +608,36 @@ $controller
</th>
<th>
<button class="btn btn-primary" id="add-resn" type="button">
- <?php echo WT_I18N::translate('Add'); ?>
+ <i class="fa fa-plus"></i>
+ <?php echo /* I18N: button label. Add a new item. */ WT_I18N::translate('Add'); ?>
</button>
</th>
</tr>
</thead>
- <tfoot>
- <tr>
- <td colspan="3">
- &nbsp;
- </td>
- <td>
- <button type="submit" class="btn btn-primary"><?php echo WT_I18N::translate('save'); ?></button>
- </td>
- </tr>
- </tfoot>
<tbody>
<?php foreach ($resns as $resn): ?>
<tr>
<td>
<?php if ($resn->record): ?>
- <a href="<?php echo $resn->record->getHtmlUrl(); ?>"><?php echo $resn->record->getFullName(); ?></a>
+ <a href="<?php echo $resn->record->getHtmlUrl(); ?>"><?php echo $resn->record->getFullName(); ?></a>
<?php elseif ($resn->xref): ?>
+ <div class="bg-danger text-danger">
<?php echo $resn->xref, ' — ', WT_I18N::translate('this record does not exist'); ?>
+ </div>
<?php else: ?>
- &nbsp;
+ <div class="text-muted">
+ <?php echo WT_I18N::translate('All records'); ?>
+ </div>
<?php endif; ?>
</td>
<td>
+ <?php if ($resn->tag_label): ?>
<?php echo $resn->tag_label; ?>
+ <?php else: ?>
+ <div class="text-muted">
+ <?php echo WT_I18N::translate('All facts and events'); ?>
+ </div>
+ <?php endif; ?>
</td>
<td>
<?php echo $PRIVACY_CONSTANTS[$resn->resn]; ?>
@@ -2337,9 +2378,7 @@ $controller
<?php endif; ?>
- <div class="form-group">
- <div class="col-sm-offset-3 col-sm-9">
- <button type="submit" class="btn btn-primary"><?php echo WT_I18N::translate('save'); ?></button>
- </div>
+ <div class="text-center">
+ <button type="submit" class="btn btn-primary"><?php echo WT_I18N::translate('save'); ?></button>
</div>
</form>
diff --git a/admin_users.php b/admin_users.php
index b52ebb7296..84831f0491 100644
--- a/admin_users.php
+++ b/admin_users.php
@@ -256,7 +256,7 @@ case 'edit':
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->addInlineJavascript('
jQuery(".relpath").change(function() {
@@ -678,7 +678,7 @@ case 'cleanup2':
default:
$controller
->setPageTitle(WT_I18N::translate('User administration'))
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->addInlineJavascript('
jQuery(".table-user-list").dataTable({
diff --git a/ancestry.php b/ancestry.php
index dad44a1200..2f4ac808d5 100644
--- a/ancestry.php
+++ b/ancestry.php
@@ -30,7 +30,7 @@ require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Ancestry;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/assets/js-1.7.0/admin.js b/assets/js-1.7.0/admin.js
new file mode 100644
index 0000000000..4e4729558d
--- /dev/null
+++ b/assets/js-1.7.0/admin.js
@@ -0,0 +1,57 @@
+'use strict';
+
+/**
+ * Hide/show the feedback labels for a privacy option.
+ *
+ * @param id the control to change
+ * @param who "visitors", "members" or "managers"
+ * @param access true or false
+ */
+function setPrivacyFeedback(sel, who, access) {
+ var form_group = jQuery(sel).closest(".form-group");
+
+ if (access) {
+ jQuery("." + who, form_group).addClass("label-success").removeClass("label-default");
+ jQuery("." + who + " i", form_group).addClass("fa-check").removeClass("fa-times");
+ } else {
+ jQuery("." + who, form_group).addClass("label-default").removeClass("label-success");
+ jQuery("." + who + " i", form_group).addClass("fa-times").removeClass("fa-check");
+ }
+}
+
+/**
+ * Update all the privacy feedback labels.
+ */
+function updatePrivacyFeedback() {
+ var REQUIRE_AUTHENTICATION = parseInt(jQuery("[name=REQUIRE_AUTHENTICATION]").val(), 10);
+ var SHOW_DEAD_PEOPLE = parseInt(jQuery("[name=SHOW_DEAD_PEOPLE]").val(), 10);
+ var HIDE_LIVE_PEOPLE = parseInt(jQuery("[name=HIDE_LIVE_PEOPLE]").val(), 10);
+ var SHOW_LIVING_NAMES = parseInt(jQuery("[name=SHOW_LIVING_NAMES]").val(), 10);
+ var SHOW_PRIVATE_RELATIONSHIPS = parseInt(jQuery("[name=SHOW_PRIVATE_RELATIONSHIPS]").val(), 10);
+
+ setPrivacyFeedback("[name=REQUIRE_AUTHENTICATION]", "visitors", REQUIRE_AUTHENTICATION === 0);
+ setPrivacyFeedback("[name=REQUIRE_AUTHENTICATION]", "members", true);
+
+ setPrivacyFeedback("[name=SHOW_DEAD_PEOPLE]", "visitors", REQUIRE_AUTHENTICATION === 0 && (SHOW_DEAD_PEOPLE >= 2 || HIDE_LIVE_PEOPLE === 0));
+ setPrivacyFeedback("[name=SHOW_DEAD_PEOPLE]", "members", SHOW_DEAD_PEOPLE >= 1 || HIDE_LIVE_PEOPLE === 0);
+
+ setPrivacyFeedback("[name=HIDE_LIVE_PEOPLE]", "visitors", REQUIRE_AUTHENTICATION === 0 && HIDE_LIVE_PEOPLE === 0);
+ setPrivacyFeedback("[name=HIDE_LIVE_PEOPLE]", "members", true);
+
+ setPrivacyFeedback("[name=SHOW_LIVING_NAMES]", "visitors", REQUIRE_AUTHENTICATION === 0 && SHOW_LIVING_NAMES >= 2);
+ setPrivacyFeedback("[name=SHOW_LIVING_NAMES]", "members", SHOW_LIVING_NAMES >= 1);
+ setPrivacyFeedback("[name=SHOW_LIVING_NAMES]", "managers", SHOW_LIVING_NAMES >= 0);
+
+ setPrivacyFeedback("[name=SHOW_PRIVATE_RELATIONSHIPS]", "visitors", REQUIRE_AUTHENTICATION === 0 && SHOW_PRIVATE_RELATIONSHIPS === 1);
+ setPrivacyFeedback("[name=SHOW_PRIVATE_RELATIONSHIPS]", "members", SHOW_PRIVATE_RELATIONSHIPS === 1);
+}
+
+/**
+ * Activate the privacy feedback labels.
+ */
+jQuery(document).ready(function() {
+ updatePrivacyFeedback();
+ jQuery("[name=REQUIRE_AUTHENTICATION], [name=HIDE_LIVE_PEOPLE], [name=SHOW_DEAD_PEOPLE], [name=SHOW_LIVING_NAMES], [name=SHOW_PRIVATE_RELATIONSHIPS]").on("change", function () {
+ updatePrivacyFeedback();
+ });
+});
diff --git a/js/autocomplete.js b/assets/js-1.7.0/autocomplete.js
index aa9e3765fe..aa9e3765fe 100644
--- a/js/autocomplete.js
+++ b/assets/js-1.7.0/autocomplete.js
diff --git a/js/jquery.colorbox-1.5.14.js b/assets/js-1.7.0/jquery.colorbox-1.5.14.js
index bbd6190f15..bbd6190f15 100644
--- a/js/jquery.colorbox-1.5.14.js
+++ b/assets/js-1.7.0/jquery.colorbox-1.5.14.js
diff --git a/js/jquery.colorbox.patch b/assets/js-1.7.0/jquery.colorbox.patch
index 36ecc4a953..36ecc4a953 100644
--- a/js/jquery.colorbox.patch
+++ b/assets/js-1.7.0/jquery.colorbox.patch
diff --git a/js/jquery.cookie-1.4.1.js b/assets/js-1.7.0/jquery.cookie-1.4.1.js
index c7f3a59b51..c7f3a59b51 100644
--- a/js/jquery.cookie-1.4.1.js
+++ b/assets/js-1.7.0/jquery.cookie-1.4.1.js
diff --git a/js/jquery.datatables-1.10.4.js b/assets/js-1.7.0/jquery.datatables-1.10.4.js
index c39ae8cc79..c39ae8cc79 100644
--- a/js/jquery.datatables-1.10.4.js
+++ b/assets/js-1.7.0/jquery.datatables-1.10.4.js
diff --git a/js/jquery.wheelzoom-2.0.0.js b/assets/js-1.7.0/jquery.wheelzoom-2.0.0.js
index 60de9ddf24..60de9ddf24 100644
--- a/js/jquery.wheelzoom-2.0.0.js
+++ b/assets/js-1.7.0/jquery.wheelzoom-2.0.0.js
diff --git a/js/jquery.wheelzoom.patch b/assets/js-1.7.0/jquery.wheelzoom.patch
index b5bd26a4dc..b5bd26a4dc 100644
--- a/js/jquery.wheelzoom.patch
+++ b/assets/js-1.7.0/jquery.wheelzoom.patch
diff --git a/js/webtrees-1.7.0.js b/assets/js-1.7.0/webtrees.js
index 597cd8c3b2..597cd8c3b2 100644
--- a/js/webtrees-1.7.0.js
+++ b/assets/js-1.7.0/webtrees.js
diff --git a/branches.php b/branches.php
index d6109c11c9..94a471e8c3 100644
--- a/branches.php
+++ b/branches.php
@@ -28,7 +28,7 @@ require './includes/session.php';
$controller = new WT_Controller_Branches;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/compact.php b/compact.php
index 22ea3efbd1..86eadc486a 100644
--- a/compact.php
+++ b/compact.php
@@ -27,7 +27,7 @@ require './includes/session.php';
$controller = new WT_Controller_Compact;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/descendancy.php b/descendancy.php
index dd296f8d47..a53e684827 100644
--- a/descendancy.php
+++ b/descendancy.php
@@ -29,7 +29,7 @@ require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Descendancy;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/edit_interface.php b/edit_interface.php
index 4b3159c7b9..09ee8cde92 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -33,7 +33,7 @@ $action = WT_Filter::post('action', null, WT_Filter::get('action'));
$controller = new WT_Controller_Simple;
$controller
->restrictAccess(Auth::isEditor())
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->addInlineJavascript('
var locale_date_format="' . preg_replace('/[^DMY]/', '', str_replace(array('J', 'F'), array('D', 'M'), strtoupper($DATE_FORMAT))) . '";
diff --git a/edituser.php b/edituser.php
index b2d815b77d..f16c9c1053 100644
--- a/edituser.php
+++ b/edituser.php
@@ -107,7 +107,7 @@ $controller = new WT_Controller_Page;
$controller
->setPageTitle(WT_I18N::translate('My account'))
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
$my_individual_record = WT_Individual::getInstance(WT_USER_GEDCOM_ID);
diff --git a/familybook.php b/familybook.php
index d81719f35a..f80e880dbd 100644
--- a/familybook.php
+++ b/familybook.php
@@ -27,7 +27,7 @@ require './includes/session.php';
$controller = new WT_Controller_Familybook;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/fanchart.php b/fanchart.php
index f530d12931..bc88630871 100644
--- a/fanchart.php
+++ b/fanchart.php
@@ -36,7 +36,7 @@ if (WT_Filter::getBool('img')) {
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('
autocomplete();
var WT_FANCHART = (function() {
diff --git a/hourglass.php b/hourglass.php
index 1b0fa4f0d8..c7705da5df 100644
--- a/hourglass.php
+++ b/hourglass.php
@@ -30,7 +30,7 @@ require_once WT_ROOT . 'includes/functions/functions_edit.php';
$controller = new WT_Controller_Hourglass;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->setupJavascript();
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index 8675530d56..81395ff60c 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -41,7 +41,7 @@ function format_indi_table($datalist, $option = '') {
$SHOW_EST_LIST_DATES = $WT_TREE->getPreference('SHOW_EST_LIST_DATES');
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -529,7 +529,7 @@ function format_fam_table($datalist) {
$table_id = 'table-fam-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1041,7 +1041,7 @@ function format_sour_table($datalist) {
$html = '';
$table_id = 'table-sour-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1181,7 +1181,7 @@ function format_note_table($datalist) {
$html = '';
$table_id = 'table-note-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1296,7 +1296,7 @@ function format_repo_table($repositories) {
$html = '';
$table_id = 'table-repo-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1402,7 +1402,7 @@ function format_media_table($media_objects) {
$html = '';
$table_id = 'table-obje-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1513,7 +1513,7 @@ function format_surname_table($surnames, $script) {
global $controller;
$html = '';
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["num-asc" ]=function(a,b) {a=parseFloat(a); b=parseFloat(b); return (a<b) ? -1 : (a>b ? 1 : 0);};
jQuery.fn.dataTableExt.oSort["num-desc"]=function(a,b) {a=parseFloat(a); b=parseFloat(b); return (a>b) ? -1 : (a<b ? 1 : 0);};
@@ -1796,7 +1796,7 @@ function print_changes_table($change_ids, $sort) {
}
$html = '';
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
@@ -1906,7 +1906,7 @@ function print_events_table($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_
$html = '';
$table_id = 'table-even-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery("#' . $table_id . '").dataTable({
dom: \'t\',
diff --git a/includes/session.php b/includes/session.php
index a4247bd5b2..636da6146d 100644
--- a/includes/session.php
+++ b/includes/session.php
@@ -59,10 +59,10 @@ if (getenv('USE_CDN')) {
define('WT_DATATABLES_BOOTSTRAP_CSS_URL', '//cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.css');
define('WT_DATATABLES_BOOTSTRAP_JS_URL', '//cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.js');
define('WT_FONT_AWESOME_CSS_URL', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css');
- define('WT_JQUERYUI_URL', '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js');
- define('WT_JQUERY_COOKIE_URL', '//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js');
- define('WT_JQUERY_DATATABLES_URL', '//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.4/js/jquery.dataTables.min.js');
- define('WT_JQUERY_URL', '//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js');
+ define('WT_JQUERYUI_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js');
+ define('WT_JQUERY_COOKIE_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js');
+ define('WT_JQUERY_DATATABLES_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.4/js/jquery.dataTables.min.js');
+ define('WT_JQUERY_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js');
define('WT_MODERNIZR_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js');
define('WT_MOMENT_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js');
define('WT_RESPOND_JS_URL', '//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js');
@@ -75,19 +75,23 @@ if (getenv('USE_CDN')) {
define('WT_DATATABLES_BOOTSTRAP_CSS_URL', WT_STATIC_URL . 'packages/datatables-1.10.4/plugins/dataTables.bootstrap.css');
define('WT_DATATABLES_BOOTSTRAP_JS_URL', WT_STATIC_URL . 'packages/datatables-1.10.4/plugins/dataTables.bootstrap.js');
define('WT_FONT_AWESOME_CSS_URL', WT_STATIC_URL . 'packages/font-awesome-4.3.0/css/font-awesome.min.css');
- define('WT_JQUERYUI_URL', WT_STATIC_URL . 'js/jquery-ui-1.11.2.js');
- define('WT_JQUERY_COOKIE_URL', WT_STATIC_URL . 'js/jquery.cookie-1.4.1.js');
- define('WT_JQUERY_DATATABLES_URL', WT_STATIC_URL . 'packages/datatables-1.10.4/js/jquery.dataTables.min.js');
- define('WT_JQUERY_URL', WT_STATIC_URL . 'js/jquery-1.11.2.js');
+ define('WT_JQUERYUI_JS_URL', WT_STATIC_URL . 'packages/jquery-ui-1.11.2/js/jquery-ui.min.js');
+ define('WT_JQUERY_COOKIE_JS_URL', WT_STATIC_URL . 'js/jquery.cookie-1.4.1.js');
+ define('WT_JQUERY_DATATABLES_JS_URL', WT_STATIC_URL . 'packages/datatables-1.10.4/js/jquery.dataTables.min.js');
+ define('WT_JQUERY_JS_URL', WT_STATIC_URL . 'packages/jquery-1.11.2/jquery.min.js');
define('WT_MODERNIZR_JS_URL', WT_STATIC_URL . 'packages/modernizr-2.8.3/modernizr.min.js');
define('WT_MOMENT_JS_URL', WT_STATIC_URL . 'packages/moment-2.9.0/moment-with-locales.min.js');
define('WT_RESPOND_JS_URL', WT_STATIC_URL . 'packages/respond-1.4.2/respond.min.js');
}
-// We can't load these from a CDN, as our local copies have been patched.
-define('WT_JQUERY_COLORBOX_URL', WT_STATIC_URL . 'js/jquery.colorbox-1.5.14.js');
-define('WT_JQUERY_WHEELZOOM_URL', WT_STATIC_URL . 'js/jquery.wheelzoom-2.0.0.js');
-define('WT_WEBTREES_JS_URL', WT_STATIC_URL . 'js/webtrees-1.7.0.js');
+// We can't load these from a CDN, as these have been patched.
+define('WT_JQUERY_COLORBOX_URL', WT_STATIC_URL . 'js-1.7.0/jquery.colorbox-1.5.14.js');
+define('WT_JQUERY_WHEELZOOM_URL', WT_STATIC_URL . 'js-1.7.0/jquery.wheelzoom-2.0.0.js');
+
+// Location of our own scripts
+define('WT_ADMIN_JS_URL', WT_STATIC_URL . 'assets/js-1.7.0/admin.js');
+define('WT_AUTOCOMPLETE_JS_URL', WT_STATIC_URL . 'assets/js-1.7.0/autocomplete.js');
+define('WT_WEBTREES_JS_URL', WT_STATIC_URL . 'assets/js-1.7.0/webtrees.js');
// Location of our modules and themes. These are used as URLs and folder paths.
define('WT_MODULES_DIR', 'modules_v3/'); // Update setup.php and build/Makefile when this changes
diff --git a/individual.php b/individual.php
index 21ace65f85..1cae5b20fa 100644
--- a/individual.php
+++ b/individual.php
@@ -29,7 +29,7 @@ define('WT_SCRIPT_NAME', 'individual.php');
require './includes/session.php';
$controller = new WT_Controller_Individual;
$controller
- ->addExternalJavascript(WT_JQUERY_COOKIE_URL); // We use this to record the sidebar state
+ ->addExternalJavascript(WT_JQUERY_COOKIE_JS_URL); // We use this to record the sidebar state
if ($controller->record && $controller->record->canShow()) {
if (WT_Filter::get('action') == 'ajax') {
diff --git a/inverselink.php b/inverselink.php
index ab7e16881f..e137bc1dc8 100644
--- a/inverselink.php
+++ b/inverselink.php
@@ -33,7 +33,7 @@ $controller = new WT_Controller_Simple;
$controller
->restrictAccess(Auth::isEditor())
->setPageTitle(WT_I18N::translate('Link to an existing media object'))
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->pageHeader();
diff --git a/library/WT/Controller/Page.php b/library/WT/Controller/Page.php
index df81ce3dfc..0357cd2cf1 100644
--- a/library/WT/Controller/Page.php
+++ b/library/WT/Controller/Page.php
@@ -33,8 +33,8 @@ class WT_Controller_Page extends WT_Controller_Base {
parent::__construct();
// Every page uses these scripts
$this
- ->addExternalJavascript(WT_JQUERY_URL)
- ->addExternalJavascript(WT_JQUERYUI_URL)
+ ->addExternalJavascript(WT_JQUERY_JS_URL)
+ ->addExternalJavascript(WT_JQUERYUI_JS_URL)
->addExternalJavascript(WT_WEBTREES_JS_URL);
}
diff --git a/library/WT/Stats.php b/library/WT/Stats.php
index ea931387e8..e6124b65d6 100644
--- a/library/WT/Stats.php
+++ b/library/WT/Stats.php
@@ -5070,7 +5070,7 @@ class WT_Stats {
global $controller;
$table_id = Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery("#' . $table_id . '").dataTable({
dom: \'t\',
diff --git a/lifespan.php b/lifespan.php
index 9ec113f0f0..abf6187b8e 100644
--- a/lifespan.php
+++ b/lifespan.php
@@ -29,7 +29,7 @@ require './includes/session.php';
$controller = new WT_Controller_Lifespan;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->addInlineJavascript('
var timer;
diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php
index 7e238090a5..bfab8d6761 100644
--- a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php
+++ b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php
@@ -34,7 +34,7 @@ $gid = WT_Filter::get('gid', WT_REGEX_XREF);
$update_CHAN = WT_Filter::get('preserve_last_changed');
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
$paramok = true;
diff --git a/modules_v3/charts/module.php b/modules_v3/charts/module.php
index 1ba0e36577..245e8dedad 100644
--- a/modules_v3/charts/module.php
+++ b/modules_v3/charts/module.php
@@ -192,7 +192,7 @@ class charts_WT_Module extends WT_Module implements WT_Module_Block {
$pid = get_block_setting($block_id, 'pid', Auth::check() ? (WT_USER_GEDCOM_ID ? WT_USER_GEDCOM_ID : $PEDIGREE_ROOT_ID) : $PEDIGREE_ROOT_ID);
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
<tr>
diff --git a/modules_v3/clippings/module.php b/modules_v3/clippings/module.php
index ce204e7e41..f4fb498f19 100644
--- a/modules_v3/clippings/module.php
+++ b/modules_v3/clippings/module.php
@@ -59,7 +59,7 @@ class clippings_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module
$controller
->setPageTitle($this->getTitle())
->PageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
echo '<script>';
diff --git a/modules_v3/gedcom_favorites/module.php b/modules_v3/gedcom_favorites/module.php
index 45a0b43410..b1193c73bd 100644
--- a/modules_v3/gedcom_favorites/module.php
+++ b/modules_v3/gedcom_favorites/module.php
@@ -116,7 +116,7 @@ class gedcom_favorites_WT_Module extends WT_Module implements WT_Module_Block {
if (Auth::check()) {
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
}
diff --git a/modules_v3/googlemap/module.php b/modules_v3/googlemap/module.php
index 47dc2bca93..00f5f8de59 100644
--- a/modules_v3/googlemap/module.php
+++ b/modules_v3/googlemap/module.php
@@ -711,7 +711,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$controller
->setPageTitle(/* I18N: %s is an individual’s name */ WT_I18N::translate('Pedigree map of %s', $controller->getPersonName()))
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
echo '<link type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'googlemap/css/wt_v3_googlemap.css" rel="stylesheet">';
diff --git a/modules_v3/stories/module.php b/modules_v3/stories/module.php
index 77c7c71ff3..35bb164484 100644
--- a/modules_v3/stories/module.php
+++ b/modules_v3/stories/module.php
@@ -191,7 +191,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Tab, WT_Module_Co
}
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
if (array_key_exists('ckeditor', WT_Module::getActiveModules())) {
ckeditor_WT_Module::enableEditor($controller);
@@ -284,7 +284,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Tab, WT_Module_Co
->restrictAccess(WT_USER_GEDCOM_ADMIN)
->setPageTitle($this->getTitle())
->pageHeader()
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
->addInlineJavascript('
jQuery("#story_table").dataTable({
@@ -392,7 +392,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Tab, WT_Module_Co
$controller
->setPageTitle($this->getTitle())
->pageHeader()
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery("#story_table").dataTable({
dom: \'<"H"pf<"dt-clear">irl>t<"F"pl>\',
diff --git a/modules_v3/todo/module.php b/modules_v3/todo/module.php
index 111f3f7c6c..f0377ac844 100644
--- a/modules_v3/todo/module.php
+++ b/modules_v3/todo/module.php
@@ -66,7 +66,7 @@ class todo_WT_Module extends WT_Module implements WT_Module_Block {
$table_id = Uuid::uuid4(); // create a unique ID
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery("#' . $table_id . '").dataTable({
dom: \'t\',
diff --git a/modules_v3/yahrzeit/module.php b/modules_v3/yahrzeit/module.php
index aa01d5c630..c99881e32e 100644
--- a/modules_v3/yahrzeit/module.php
+++ b/modules_v3/yahrzeit/module.php
@@ -125,7 +125,7 @@ class yahrzeit_WT_Module extends WT_Module implements WT_Module_Block {
default:
$table_id = Uuid::uuid4(); // table requires a unique ID
$controller
- ->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
+ ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
jQuery("#'.$table_id . '").dataTable({
dom: \'t\',
diff --git a/js/jquery-1.11.2.js b/packages/jquery-1.11.2/jquery.min.js
index 1c3aa8228f..1c3aa8228f 100644
--- a/js/jquery-1.11.2.js
+++ b/packages/jquery-1.11.2/jquery.min.js
diff --git a/js/jquery-ui-1.11.2.js b/packages/jquery-ui-1.11.2/js/jquery-ui.min.js
index 1f7ca63502..1f7ca63502 100644
--- a/js/jquery-ui-1.11.2.js
+++ b/packages/jquery-ui-1.11.2/js/jquery-ui.min.js
diff --git a/pedigree.php b/pedigree.php
index 34854feffe..c1c305154c 100644
--- a/pedigree.php
+++ b/pedigree.php
@@ -33,7 +33,7 @@ define("BOX_WRAPPER", "<div class='shadow' style='%s:%spx; top:%spx; width:%spx;
$controller = new WT_Controller_Pedigree;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/relationship.php b/relationship.php
index 65582002bc..5eaf4bf55b 100644
--- a/relationship.php
+++ b/relationship.php
@@ -54,7 +54,7 @@ $person1 = WT_Individual::getInstance($pid1);
$person2 = WT_Individual::getInstance($pid2);
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
if ($person1 && $person1->canShowName() && $person2 && $person2->canShowName()) {
diff --git a/reportengine.php b/reportengine.php
index b8587f50f4..d49424f037 100644
--- a/reportengine.php
+++ b/reportengine.php
@@ -157,7 +157,7 @@ case 'setup':
$controller
->setPageTitle($report_array['title'])
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
init_calendar_popup();
diff --git a/search.php b/search.php
index 155fab6baf..5e50cd5ee0 100644
--- a/search.php
+++ b/search.php
@@ -28,7 +28,7 @@ require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Search;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>
diff --git a/search_advanced.php b/search_advanced.php
index cf8f81a7e0..ae38ce64de 100644
--- a/search_advanced.php
+++ b/search_advanced.php
@@ -27,7 +27,7 @@ require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_AdvancedSearch;
$controller
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();')
->pageHeader();
diff --git a/statistics.php b/statistics.php
index 1fd333ce8c..cde4b918fe 100644
--- a/statistics.php
+++ b/statistics.php
@@ -36,7 +36,7 @@ $ajax = WT_Filter::getBool('ajax');
if (!$ajax) {
$controller = new WT_Controller_Page;
$controller->setPageTitle(WT_I18N::translate('Statistics'))
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('
jQuery("#statistics_chart").css("visibility", "visible");
jQuery("#statistics_chart").tabs({
diff --git a/timeline.php b/timeline.php
index cda5ba7653..c3bc462dc7 100644
--- a/timeline.php
+++ b/timeline.php
@@ -31,7 +31,7 @@ require './includes/session.php';
$controller = new WT_Controller_Timeline;
$controller
->pageHeader()
- ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
+ ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
->addInlineJavascript('autocomplete();');
?>