(01.04.2019, 15:40)myCreedo napisał(a): Sprawdź, czy w konsoli są jakieś błędy i czy w szablonie headerinclude nie jest dwa razy ładowane jquery
A dokładniej o co chodzi z tym jquery ?
Nasz headerinclude:
Headerinclude:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1806"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1806"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1810"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
{$avatarep_script}
<script>
(function($){
var current_popup = '';
var PopupMenu = function(el, close_in_popupmenu)
{
var el = $(el);
var popup = this;
var popup_menu = $("#" + el.attr('id') + "_popup");
if(typeof close_in_popupmenu == 'undefined')
{
var close_in_popupmenu = true;
}
// Opening Popup
this.open = function(e)
{
e.preventDefault();
if(popup_menu.is(':visible'))
{
popup.close();
return;
}
// Setup popup menu
var offset = el.offset();
offset.top += el.outerHeight();
// We only adjust if it goes out of the page (?)
if((el.offset().left + popup_menu.outerWidth()) > $(window).width())
var adjust = popup_menu.outerWidth() - el.outerWidth();
else
var adjust = 0;
popup_menu.css({
position: 'absolute',
});
popup_menu.show();
// Closes the popup if we click outside the button (this doesn't seem to work properly - couldn't find any solutions that actually did - if we click the first item on the menu)
// Credits: http://stackoverflow.com/questions/1160880/detect-click-outside-element
$('body, .popup_item').bind('click.close_popup', function(e) {
if(close_in_popupmenu)
{
if($(e.target).closest("#" + el.attr('id')).length == 0) {
popup.close();
}
}
else
{
if($(e.target).closest("#" + el.attr('id')).length == 0 && $(e.target).closest("#" + el.attr('id') + '_popup').length == 0) {
popup.close();
}
}
});
}
this.close = function(e)
{
popup_menu.hide();
}
}
$.fn.popupMenu = function(close_in_popupmenu)
{
return this.each(function()
{
var popup = new PopupMenu(this, close_in_popupmenu);
$(this).click(popup.open);
});
}
})(jQuery);
</script>
{$stylesheets}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<script type="text/javascript">
<!--
lang.unknown_error = "{$lang->unknown_error}";
lang.select2_match = "{$lang->select2_match}";
lang.select2_matches = "{$lang->select2_matches}";
lang.select2_nomatches = "{$lang->select2_nomatches}";
lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
lang.select2_loadmore = "{$lang->select2_loadmore}";
lang.select2_searching = "{$lang->select2_searching}";
var cookieDomain = "{$mybb->settings['cookiedomain']}";
var cookiePath = "{$mybb->settings['cookiepath']}";
var cookiePrefix = "{$mybb->settings['cookieprefix']}";
var cookieSecureFlag = "{$mybb->settings['cookiesecureflag']}";
var deleteevent_confirm = "{$lang->deleteevent_confirm}";
var removeattach_confirm = "{$lang->removeattach_confirm}";
var loading_text = '{$lang->ajax_loading}';
var saving_changes = '{$lang->saving_changes}';
var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
var my_post_key = "{$mybb->post_code}";
var rootpath = "{$mybb->settings['bburl']}";
var imagepath = "{$theme['imgdir']}";
var yes_confirm = "{$lang->yes}";
var no_confirm = "{$lang->no}";
var MyBBEditor = null;
var spinner_image = "{$theme['imgdir']}/spinner.gif";
var spinner = "<img src='" + spinner_image +"' alt='' />";
var modal_zindex = 9999;
var usermenu = "{$lang->usermenu}";
// -->
</script>
<script src="{$theme['imgdir']}/script.js"></script>{$myalerts_js}