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

Artist/Album/Song edition working.

Tag are now editable through the same dialog.
This commit is contained in:
SUTJael 2013-11-22 18:58:06 +01:00
parent cb690e5eee
commit 3134e3ca8e
19 changed files with 258 additions and 90 deletions

View file

@ -46,13 +46,13 @@ function flipField(field) {
else {
$(field).disabled = false;
}
} // flipField
}
// updateText
// Changes the specified elements innards. Used for the catalog mojo fluff.
function updateText(field, value) {
$('#'+field).html(value);
} // updateText
}
// toggleVisible
// Toggles display type between block and none. Used for ajax loading div.
@ -63,7 +63,7 @@ function toggleVisible(element) {
} else {
target.show();
}
} // toggleVisible
}
// delayRun
// This function delays the run of another function by X milliseconds
@ -79,7 +79,7 @@ function delayRun(element, time, method, page, source) {
element.zid = setTimeout(action, time);
} // delayRun
}
// reloadUtil
// Reload our util frame
@ -87,19 +87,23 @@ function delayRun(element, time, method, page, source) {
// Localplay, which don't actually prompt for a new file
function reloadUtil(target) {
$('#util_iframe').prop('src', target);
} // reloadUtil
}
// reloadRedirect
// Send them elsewhere
function reloadRedirect(target) {
window.location = target;
} // reloadRedirect
}
// This is kind of ugly. Let's not mess with it too much.
function check_inline_song_edit(type, song) {
var target = '#' + type + '_select_' + song;
if ($(target + ' option:selected').val() == -1) {
$(target).replaceWith('<input type="textbox" name="' + type + '_name" value="New ' + type + '" />');
var source = '#' + type + '_select_' + song;
if ($(source + ' option:selected').val() == -1) {
$(source).replaceWith('<input type="text" name="' + type + '_name" value="New ' + type + '" onclick="this.select();" />');
if (type == 'album') {
$(source).replaceWith('<label for="year">Year</label><input type="text" name="year" id="year" size="5" /><label for="disk">Disk #</label><input type="text" name="disk" id="disk" size="3" />');
}
}
}