mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +02:00
#136 done. External links improved. Ability to edit artist/album directly from their page.
This commit is contained in:
parent
01691feded
commit
1ef3cdf388
16 changed files with 122 additions and 80 deletions
|
@ -175,20 +175,25 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
|||
type : 'POST',
|
||||
data : $(parent.editFormId).serializeArray(),
|
||||
success : function(resp){
|
||||
var new_id = $.trim(resp.lastChild.textContent);
|
||||
$("#editdialog").dialog("close");
|
||||
|
||||
// resp should contain the new identifier, otherwise we take the same as the edited item
|
||||
if (new_id == '') {
|
||||
new_id = parent.editId;
|
||||
if (parent.refreshAction != '') {
|
||||
var new_id = $.trim(resp.lastChild.textContent);
|
||||
|
||||
// resp should contain the new identifier, otherwise we take the same as the edited item
|
||||
if (new_id == '') {
|
||||
new_id = parent.editId;
|
||||
}
|
||||
|
||||
var url = jsAjaxServer + '/refresh_updated.server.php?action=' + parent.refreshAction + '&id=' + new_id;
|
||||
// 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);
|
||||
});
|
||||
} else {
|
||||
location.reload(true);
|
||||
}
|
||||
|
||||
var url = jsAjaxServer + '/refresh_updated.server.php?action=' + parent.refreshAction + '&id=' + new_id;
|
||||
// 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);
|
||||
});
|
||||
},
|
||||
error : function(resp){
|
||||
$("#editdialog").dialog("close");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue