Skip to content

Commit d50b5a3

Browse files
authored
Merge pull request #79 from RRZE-Webteam/dev
1.12.18
2 parents c45e0fc + cf0d9ea commit d50b5a3

File tree

13 files changed

+2391
-313
lines changed

13 files changed

+2391
-313
lines changed

css/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/editor-style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/gutenberg.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
require_once( get_template_directory() . '/functions/embeddings.php');
2525

2626
require_once( get_template_directory() . '/functions/shortcodes.php');
27-
require_once( get_template_directory() . '/functions/shortcode-accordion.php');
2827

2928
require_once( get_template_directory() . '/functions/menu.php');
3029
require_once( get_template_directory() . '/functions/custom-fields.php' );

functions/comments.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function fau_comment( $comment, $args, $depth ) {
1515

1616
switch ( $comment->comment_type ) :
1717
case '' :
18+
case 'comment' :
1819
?>
1920
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
2021
<div id="comment-<?php comment_ID(); ?>">

functions/gallery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function fau_post_gallery($output, $attr) {
137137
}
138138

139139
$linkalt = $imgmeta['alt'];
140-
if ('none' !== $attr['link']) {
140+
if (isset($attr['link']) && ('none' !== $attr['link'])) {
141141
// Bei Bildern, die als Link fungieren beschreibt der alt das Linkziel, nicht das Bild.
142142
if (!fau_empty($imgmeta['title'])) {
143143
$linkalt = __('Bild ','fau').$imgmeta['title'].' '.__('aufrufen','fau');
@@ -166,7 +166,7 @@ function fau_post_gallery($output, $attr) {
166166
} else {
167167
$output .= '<figure>';
168168
}
169-
if ('none' !== $attr['link']) {
169+
if (isset($attr['link']) && ('none' !== $attr['link'])) {
170170
if ($attr['link']=='post') {
171171
// Anhang Seite
172172
$output .= '<a href="'.get_attachment_link( $id ).'">';

js/admin.js

Lines changed: 1 addition & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/admin.min.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/scripts.js

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jQuery(document).ready(function ($) {
1010
var sliderFade = $body.hasClass('slider-fade');
1111
var sliderAutostart = $body.hasClass('slider-autoplay');
1212
var sliderAdaptiveHeight = $body.hasClass('slider-adaptiveHeight');
13-
var useThemeAccordion = $body.hasClass('theme-accordion');
1413
var forceClick = $body.hasClass('mainnav-forceclick');
1514
var hasLogo = !$body.hasClass('nologo');
1615
var swapLogo = !$body.hasClass('md-showsitelogo');
@@ -25,21 +24,7 @@ jQuery(document).ready(function ($) {
2524
var metaBar = 42;
2625
*/
2726

28-
// Smooth scrolling for anchor-links (excluding accordion-toggles)
29-
if (useThemeAccordion) {
30-
$('a[href*="#"]:not([href="#"]):not([href="#nav"]):not([href="#hauptnav-anchor"]):not(.accordion-toggle):not(.accordion-tabs-nav-toggle)').click(function () {
31-
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
32-
var target = $(this.hash);
33-
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
34-
if (target.length) {
35-
$('html,body').animate({
36-
scrollTop: target.offset().top - 185
37-
}, 1000);
38-
return false;
39-
}
40-
}
41-
});
42-
}
27+
4328

4429
// Slider
4530
var autostart = !!sliderAutostart;
@@ -116,84 +101,6 @@ jQuery(document).ready(function ($) {
116101
}
117102
});
118103

119-
120-
// Accordions
121-
if (useThemeAccordion) {
122-
// Close Accordions on start, except first
123-
$('.accordion-body').not(".accordion-body.open").not('.accordion-body.stayopen').hide();
124-
$('.accordion-toggle').bind('click', function (event) {
125-
event.preventDefault();
126-
var accordion = $(this).attr('href');
127-
$(this).closest('.accordion').find('.accordion-toggle').not($(this)).removeClass('active');
128-
$(this).closest('.accordion').find('.accordion-body').not(accordion).not('.accordion-body.stayopen').slideUp();
129-
$(this).toggleClass('active');
130-
$(accordion).slideToggle();
131-
if ( $('div').hasClass( 'slick-slider' ) ) {
132-
$('.slick-slider').slick('setPosition');
133-
}
134-
});
135-
136-
// Keyboard navigation for accordions
137-
$('.accordion-toggle').keydown(function (event) {
138-
if (event.keyCode == 32) {
139-
var accordion = $(this).attr('href');
140-
$(this).closest('.accordion').find('.accordion-toggle').not($(this)).removeClass('active');
141-
$(this).closest('.accordion').find('.accordion-body').not(accordion).not('.accordion-body.stayopen').slideUp();
142-
$(this).toggleClass('active');
143-
$(accordion).slideToggle();
144-
}
145-
});
146-
147-
function openAnchorAccordion() {
148-
if (window.location.hash && (window.location.hash !== '#nav')) {
149-
var identifier = window.location.hash.split('_')[0];
150-
var inpagenum = window.location.hash.split('_')[1];
151-
if (identifier == '#collapse') {
152-
if ($.isNumeric(inpagenum)) {
153-
var $findid = 'collapse_' + inpagenum;
154-
var $target = $body.find('#' + $findid);
155-
156-
if ($target.closest('.accordion').parent().closest('.accordion-group')) {
157-
$upper = $target.closest('.accordion').parent().closest('.accordion-group');
158-
159-
$upper.find('.accordion-toggle').addClass('active');
160-
$upper.find('.accordion-body').show();
161-
162-
$upper.find('.accordion-toggle').children().find('.accordion-toggle').removeClass('active');
163-
$upper.find('.accordion-body').children().find('.accordion-body').hide();
164-
165-
}
166-
$target.find('.accordion-toggle').addClass('active');
167-
$target.show();
168-
169-
var offset = $target.offset();
170-
var $scrolloffset = offset.top - 220;
171-
$('html,body').animate({ scrollTop: $scrolloffset }, 'slow');
172-
}
173-
174-
} else {
175-
var identifier = window.location.hash.split('#')[1];
176-
var anchor = encodeURIComponent(identifier);
177-
var $target = $('a[name="' + anchor + '"]');
178-
if ($target.closest('.accordion').parent().closest('.accordion-group')) {
179-
$upper = $target.closest('.accordion-group');
180-
$upper.find('.accordion-toggle').addClass('active');
181-
$upper.find('.accordion-body').show();
182-
$upper.find('.accordion-toggle').children().find('.accordion-toggle').removeClass('active');
183-
$upper.find('.accordion-body').children().find('.accordion-body').hide();
184-
$target.addClass('active');
185-
$target.show();
186-
var offset = $target.offset();
187-
var $scrolloffset = offset.top - 220;
188-
$('html,body').animate({ scrollTop: $scrolloffset }, 'slow');
189-
}
190-
}
191-
}
192-
}
193-
194-
openAnchorAccordion();
195-
}
196-
197104
// Set environmental parameters
198105
var windowWidth = window.screen.width < window.outerWidth ? window.screen.width : window.outerWidth;
199106
var isMobile = function () {

0 commit comments

Comments
 (0)