mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Remove javascript from guest pages
This commit is contained in:
parent
86215c34be
commit
36a3cae9c2
6 changed files with 21 additions and 4 deletions
|
@ -315,10 +315,11 @@ ${next.headerIncludes()}
|
|||
<script src="${http_root}js/bootstrap-hover-dropdown.min.js"></script>
|
||||
<script src="${http_root}js/pnotify.custom.min.js"></script>
|
||||
<script src="${http_root}js/script.js"></script>
|
||||
% if plexpy.CONFIG.BROWSER_ENABLED:
|
||||
% if _session['user_group'] == 'admin' and plexpy.CONFIG.BROWSER_ENABLED:
|
||||
<script src="${http_root}js/ajaxNotifications.js"></script>
|
||||
% endif
|
||||
<script>
|
||||
% if _session['user_group'] == 'admin':
|
||||
$('#updateDismiss').click(function() {
|
||||
$('#updatebar').slideUp('slow');
|
||||
// Set cookie to remember dismiss decision for 1 hour.
|
||||
|
@ -351,6 +352,7 @@ ${next.headerIncludes()}
|
|||
$(this).html('<i class="fa fa-spin fa-refresh"></i> Checking');
|
||||
window.location.href = "checkGithub";
|
||||
});
|
||||
% endif
|
||||
|
||||
$('.dropdown-toggle').click(function (e) {
|
||||
if (!(('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0))) {
|
||||
|
|
|
@ -159,6 +159,7 @@
|
|||
var selected_user_id = "${_session['user_id']}" == "None" ? null : "${_session['user_id']}"
|
||||
loadHistoryTable(media_type, selected_user_id);
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$('#row-edit-mode').on('click', function() {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
|
||||
|
@ -195,6 +196,7 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
% endif
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
|
||||
clearSearchButton('libraries_list_table', libraries_list_table);
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$('#row-edit-mode').on('click', function () {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
$('#libraries-to-delete').html('');
|
||||
|
@ -186,8 +187,10 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
% endif
|
||||
});
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$("#refresh-libraries-list").click(function () {
|
||||
if ("${config['update_section_ids']}" == "1") {
|
||||
$('#update_section_ids_message').html(
|
||||
|
@ -212,5 +215,6 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
% endif
|
||||
</script>
|
||||
</%def>
|
||||
|
|
|
@ -401,6 +401,11 @@ DOCUMENTATION :: END
|
|||
clearSearchButton('history_table-SID-${data["section_id"]}', history_table);
|
||||
}
|
||||
|
||||
$( "#history-tab-btn" ).one( "click", function() {
|
||||
loadHistoryTable();
|
||||
});
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
function loadMediaInfoTable() {
|
||||
// Build media info table
|
||||
media_info_table_options.ajax = {
|
||||
|
@ -422,9 +427,6 @@ DOCUMENTATION :: END
|
|||
clearSearchButton('media_info_table-SID-${data["section_id"]}', media_info_table);
|
||||
}
|
||||
|
||||
$( "#history-tab-btn" ).one( "click", function() {
|
||||
loadHistoryTable();
|
||||
});
|
||||
$( "#media-info-tab-btn" ).one( "click", function() {
|
||||
loadMediaInfoTable();
|
||||
});
|
||||
|
@ -487,6 +489,7 @@ DOCUMENTATION :: END
|
|||
});
|
||||
}
|
||||
});
|
||||
% endif
|
||||
|
||||
function recentlyWatched() {
|
||||
// Populate recently watched
|
||||
|
|
|
@ -433,6 +433,7 @@ DOCUMENTATION :: END
|
|||
clearSearchButton('sync_table-UID-${data["user_id"]}', sync_table);
|
||||
});
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
// Load edit user modal
|
||||
$("#toggle-edit-user-modal").click(function() {
|
||||
$("#edit-user-tooltip").tooltip('hide');
|
||||
|
@ -483,6 +484,7 @@ DOCUMENTATION :: END
|
|||
});
|
||||
}
|
||||
});
|
||||
% endif
|
||||
|
||||
function recentlyWatched() {
|
||||
// Populate recently watched
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
|
||||
clearSearchButton('users_list_table', users_list_table);
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$('#row-edit-mode').on('click', function () {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
$('#users-to-delete').html('');
|
||||
|
@ -173,8 +174,10 @@
|
|||
toggleEditNames();
|
||||
}
|
||||
});
|
||||
% endif
|
||||
});
|
||||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$("#refresh-users-list").click(function() {
|
||||
$.ajax({
|
||||
url: 'refresh_users_list',
|
||||
|
@ -191,5 +194,6 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
% endif
|
||||
</script>
|
||||
</%def>
|
Loading…
Add table
Add a link
Reference in a new issue