Pavel Loginov 2020-08-07 19:51:35 +02:00
parent d2a6676fb0
commit b610c47e2a
2 changed files with 12 additions and 6 deletions

View File

@ -557,11 +557,18 @@ function viewLogs() {
} }
$( function() { $( function() {
$('a').click(function(e) { $('a').click(function(e) {
var cur_path = window.location.pathname; try {
$('title').text($(this).attr('title')); var cur_path = window.location.pathname;
history.pushState({}, '', $(this).attr('href')); var attr = $(this).attr('href');
if ($(this).attr('href').split('#')[0] && $(this).attr('href').split('#')[0] != cur_path) { if (typeof attr !== typeof undefined && attr !== false) {
window.history.go() $('title').text($(this).attr('title'));
history.pushState({}, '', $(this).attr('href'));
if ($(this).attr('href').split('#')[0] && $(this).attr('href').split('#')[0] != cur_path) {
window.history.go()
}
}
} catch (err) {
console.log(err);
} }
}); });
toastr.options.closeButton = true; toastr.options.closeButton = true;

View File

@ -759,7 +759,6 @@ $( function() {
function common_ajax_action_after_success(dialog_id, new_group, ajax_append_id, data) { function common_ajax_action_after_success(dialog_id, new_group, ajax_append_id, data) {
toastr.clear(); toastr.clear();
$("#"+ajax_append_id).append(data); $("#"+ajax_append_id).append(data);
console.log(new_group);
$( "."+new_group ).addClass( "update", 1000); $( "."+new_group ).addClass( "update", 1000);
$.getScript(awesome); $.getScript(awesome);
clearTips(); clearTips();