mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Edit library items in a more generic way
Use real large image on Google gather arts
This commit is contained in:
parent
4454696f29
commit
b5f92aa25c
119 changed files with 1147 additions and 1036 deletions
|
@ -39,7 +39,7 @@ function showPlaylistDialog(e, item_type, item_ids) {
|
|||
|
||||
var parent = this;
|
||||
parent.itemType = item_type;
|
||||
parent.contentUrl = jsAjaxServer + '/show_edit_playlist.server.php?action=show_edit_object&item_type=' + item_type + '&item_id=' + item_ids;
|
||||
parent.contentUrl = jsAjaxServer + '/edit.server.php?action=show_edit_playlist&object_type=' + item_type + '&id=' + item_ids;
|
||||
parent.editDialogId = '<div id="playlistdialog"></div>';
|
||||
|
||||
$(parent.editDialogId).dialog({
|
||||
|
@ -144,14 +144,14 @@ function handleBroadcastAction(url, id) {
|
|||
|
||||
var tag_choices = undefined;
|
||||
|
||||
function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix, refresh_action) {
|
||||
function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix) {
|
||||
var parent = this;
|
||||
parent.editFormId = 'form#' + edit_form_id;
|
||||
parent.contentUrl = jsAjaxServer + '/show_edit.server.php?action=show_edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||
parent.saveUrl = jsAjaxUrl + '?action=edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||
parent.contentUrl = jsAjaxServer + '/edit.server.php?action=show_edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||
parent.saveUrl = jsAjaxServer + '/edit.server.php?action=edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||
parent.editDialogId = '<div id="editdialog"></div>';
|
||||
parent.refreshRowPrefix = refresh_row_prefix;
|
||||
parent.refreshAction = refresh_action;
|
||||
parent.editType = edit_type;
|
||||
parent.editId = edit_id;
|
||||
|
||||
// Convert choices string ("tag0,tag1,tag2,...") to choices array
|
||||
|
@ -161,7 +161,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
|||
$.ajax(jsAjaxServer + '/ajax.server.php?page=tag&action=get_tag_map', { success: function(data) {
|
||||
tag_choices = $(data).find('content').text();
|
||||
if (tag_choices != '') {
|
||||
showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix, refresh_action);
|
||||
showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix);
|
||||
}
|
||||
}, type: 'post', dataType: 'xml' });
|
||||
return;
|
||||
|
@ -181,7 +181,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
|||
success : function(resp){
|
||||
$("#editdialog").dialog("close");
|
||||
|
||||
if (parent.refreshAction != '') {
|
||||
if (parent.refreshRowPrefix != '') {
|
||||
var new_id = $.trim(resp.lastChild.textContent);
|
||||
|
||||
// resp should contain the new identifier, otherwise we take the same as the edited item
|
||||
|
@ -189,7 +189,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
|||
new_id = parent.editId;
|
||||
}
|
||||
|
||||
var url = jsAjaxServer + '/refresh_updated.server.php?action=' + parent.refreshAction + '&id=' + new_id;
|
||||
var url = jsAjaxServer + '/edit.server.php?action=refresh_updated&type=' + parent.editType + '&id=' + new_id;
|
||||
// Reload only table
|
||||
$('#' + parent.refreshRowPrefix + parent.editId).load(url, function() {
|
||||
// Update the current row identifier with new id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue