1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 02:09:23 +02:00

Fix some info level issues in codacy

This commit is contained in:
Phyks (Lucas Verney) 2016-06-20 14:46:23 +02:00
parent 5ab1ed2e93
commit e6eda3850c
5 changed files with 76 additions and 75 deletions

View file

@ -6,7 +6,7 @@
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License v2
// as published by the Free Software Foundation.
//
//
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -35,7 +35,7 @@ function showFilters(element) {
var closeplaylist;
function showPlaylistDialog(e, item_type, item_ids) {
$("#playlistdialog").dialog("close");
$('#playlistdialog').dialog('close');
var parent = this;
parent.itemType = item_type;
@ -51,7 +51,7 @@ function showPlaylistDialog(e, item_type, item_ids) {
height: 100,
autoOpen: false,
position: {
my: "left+10 top",
my: 'left+10 top',
of: e
},
open: function () {
@ -67,24 +67,24 @@ function showPlaylistDialog(e, item_type, item_ids) {
close: function (e) {
$(document).unbind('click');
$(this).empty();
$(this).dialog("destroy");
$(this).dialog('destroy');
}
});
$("#playlistdialog").dialog("open");
$('#playlistdialog').dialog('open');
closeplaylist = 0;
}
function overlayclickclose() {
if (closeplaylist) {
$("#playlistdialog").dialog("close");
$('#playlistdialog').dialog('close');
}
closeplaylist = 1;
}
function handlePlaylistAction(url, id) {
ajaxPut(url, id);
$("#playlistdialog").dialog("close");
$('#playlistdialog').dialog('close');
}
function createNewPlaylist(title, url, id) {
@ -101,7 +101,7 @@ function createNewPlaylist(title, url, id) {
var closebroadcasts;
function showBroadcastsDialog(e) {
$("#broadcastsdialog").dialog("close");
$('#broadcastsdialog').dialog('close');
var parent = this;
parent.contentUrl = jsAjaxServer + '/ajax.server.php?page=player&action=show_broadcasts';
@ -116,7 +116,7 @@ function showBroadcastsDialog(e) {
height: 70,
autoOpen: false,
position: {
my: "left-180 top",
my: 'left-180 top',
of: e
},
open: function () {
@ -132,24 +132,24 @@ function showBroadcastsDialog(e) {
close: function (e) {
$(document).unbind('click');
$(this).empty();
$(this).dialog("destroy");
$(this).dialog('destroy');
}
});
$("#broadcastsdialog").dialog("open");
$('#broadcastsdialog').dialog('open');
closebroadcasts = 0;
}
function broverlayclickclose() {
if (closebroadcasts) {
$("#broadcastsdialog").dialog("close");
$('#broadcastsdialog').dialog('close');
}
closebroadcasts = 1;
}
function handleBroadcastAction(url, id) {
ajaxPut(url, id);
$("#broadcastsdialog").dialog("close");
$('#broadcastsdialog').dialog('close');
}
/************************************************************/
@ -158,7 +158,7 @@ function handleBroadcastAction(url, id) {
var closeshare;
function showShareDialog(e, object_type, object_id) {
$("#sharedialog").dialog("close");
$('#sharedialog').dialog('close');
var parent = this;
parent.contentUrl = jsAjaxServer + '/ajax.server.php?page=browse&action=get_share_links&object_type=' + object_type + '&object_id=' + object_id;
@ -173,7 +173,7 @@ function showShareDialog(e, object_type, object_id) {
height: 90,
autoOpen: false,
position: {
my: "left+10 top",
my: 'left+10 top',
of: e
},
open: function () {
@ -189,24 +189,24 @@ function showShareDialog(e, object_type, object_id) {
close: function (e) {
$(document).unbind('click');
$(this).empty();
$(this).dialog("destroy");
$(this).dialog('destroy');
}
});
$("#sharedialog").dialog("open");
$('#sharedialog').dialog('open');
closeshare = 0;
}
function shoverlayclickclose(e) {
if (closeshare) {
$("#sharedialog").dialog("close");
$('#sharedialog').dialog('close');
}
closeshare = 1;
}
function handleShareAction(url) {
window.open(url);
$("#sharedialog").dialog("close");
$('#sharedialog').dialog('close');
}
@ -271,7 +271,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
type: 'POST',
data: $(parent.editFormId).serializeArray(),
success: function (resp) {
$("#editdialog").dialog("close");
$('#editdialog').dialog('close');
if (parent.refreshRowPrefix != '') {
var new_id = $.trim(resp.lastChild.textContent);
@ -285,7 +285,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
// Reload only table
$('#' + parent.refreshRowPrefix + parent.editId).load(url, function() {
// Update the current row identifier with new id
$('#' + parent.refreshRowPrefix + parent.editId).attr("id", parent.refreshRowPrefix + new_id);
$('#' + parent.refreshRowPrefix + parent.editId).attr('id', parent.refreshRowPrefix + new_id);
});
} else {
var reloadp = window.location;
@ -297,12 +297,12 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
}
},
error: function(resp) {
$("#editdialog").dialog("close");
$('#editdialog').dialog('close');
}
});
}
this.dialog_buttons[jsCancelTitle] = function() {
$("#editdialog").dialog("close");
$('#editdialog').dialog('close');
}
$(parent.editDialogId).dialog({
@ -312,11 +312,11 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
resizable: false,
width: 666,
autoOpen: false,
show: { effect: "fade", duration: 400 },
show: { effect: 'fade', duration: 400 },
open: function () {
$(this).load(parent.contentUrl, function() {
if ($('#edit_tags').length > 0) {
$("#edit_tags").tagit({
$('#edit_tags').tagit({
allowSpaces: true,
singleField: true,
singleFieldDelimiter: ',',
@ -324,7 +324,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
});
}
if ($('#edit_labels').length > 0) {
$("#edit_labels").tagit({
$('#edit_labels').tagit({
allowSpaces: true,
singleField: true,
singleFieldDelimiter: ',',
@ -335,16 +335,16 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
},
close: function (e) {
$(this).empty();
$(this).dialog("destroy");
$(this).dialog('destroy');
},
buttons: dialog_buttons
});
$("#editdialog").dialog("open");
$('#editdialog').dialog('open');
}
$(window).resize(function() {
$("#editdialog").dialog("option", "position", {my: "center", at: "center", of: window});
$('#editdialog').dialog('option', 'position', {my: 'center', at: 'center', of: window});
});
function check_inline_song_edit(type, song) {
@ -386,7 +386,7 @@ function submitNewItemsOrder(itemId, tableid, rowPrefix, updateUrl, refreshActio
var rowLength = table.rows.length;
var offset = 0;
var finalOrder = '';
if ($('#' + tableid).attr('data-offset')) {
offset = $('#' + tableid).attr('data-offset');
}
@ -395,7 +395,7 @@ function submitNewItemsOrder(itemId, tableid, rowPrefix, updateUrl, refreshActio
var row = table.rows[i];
if (row.id != '') {
var songid = row.id.replace(rowPrefix, '');
finalOrder += songid + ";"
finalOrder += songid + ';'
}
}
@ -434,7 +434,7 @@ function geolocate_user() {
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(geolocate_user_callback);
} else {
console.error("This browser does not support geolocation");
console.error('This browser does not support geolocation');
}
}