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

replace prototype.js with jquery, i think everything is working...

This commit is contained in:
John Moore 2013-07-26 23:18:39 -05:00
parent 4a0a737e32
commit de35a43d54
25 changed files with 9638 additions and 7111 deletions

View file

@ -32,19 +32,18 @@ function flipField(field) {
// updateText
// Changes the specified elements innards. Used for the catalog mojo fluff.
function updateText(field, value) {
$(field).innerHTML = value;
$('#'+field).html(value);
} // updateText
// toggleVisible
// Toggles display type between block and none. Used for ajax loading div.
function toggleVisible(element) {
if ($(element).style.display == 'block') {
$(element).style.display = 'none';
var target = $('#' + element);
if (target.is(':visible')) {
target.hide();
} else {
target.show();
}
else {
$(element).style.display = 'block';
}
} // toggleVisible
// delayRun
@ -95,9 +94,9 @@ function popupWindow(url) {
// 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).options[$(target).selectedIndex].value == -1) {
$(target).innerHTML = '<input type="textbox" name="' + type + '_name" value="New ' + type + '" />';
var target = '#' + type + '_select_' + song;
if ($(target + ' option:selected').val() == -1) {
$(target).replaceWith('<input type="textbox" name="' + type + '_name" value="New ' + type + '" />');
}
}