mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
fixed up the playlist and the auto refresh with jquery
This commit is contained in:
parent
de35a43d54
commit
6b40e833ea
4 changed files with 34 additions and 22 deletions
|
@ -17,6 +17,9 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
$(document).ready(function () {
|
||||
$('.default_hidden').hide();
|
||||
});
|
||||
|
||||
// flipField
|
||||
// Toggles the disabled property on the specifed field
|
||||
|
@ -39,10 +42,10 @@ function updateText(field, value) {
|
|||
// Toggles display type between block and none. Used for ajax loading div.
|
||||
function toggleVisible(element) {
|
||||
var target = $('#' + element);
|
||||
if (target.is(':visible')) {
|
||||
target.hide();
|
||||
} else {
|
||||
target.show();
|
||||
if (target.is(':visible')) {
|
||||
target.hide();
|
||||
} else {
|
||||
target.show();
|
||||
}
|
||||
} // toggleVisible
|
||||
|
||||
|
@ -67,16 +70,7 @@ function delayRun(element, time, method, page, source) {
|
|||
// IE issue fixed by Spocky, we have to use the iframe for Democratic Play &
|
||||
// Localplay, which don't actually prompt for a new file
|
||||
function reloadUtil(target) {
|
||||
|
||||
if (navigator.appName == 'Opera') {
|
||||
$('util_iframe').contentWindow.location.reload(true);
|
||||
}
|
||||
else if (navigator.appName == 'Konqueror') {
|
||||
$('util_iframe').contentDocument.location.reload(true);
|
||||
}
|
||||
else {
|
||||
$('util_iframe').src = $('util_iframe').src;
|
||||
}
|
||||
$('#util_iframe').prop('src', target);
|
||||
} // reloadUtil
|
||||
|
||||
// reloadRedirect
|
||||
|
@ -102,10 +96,21 @@ function check_inline_song_edit(type, song) {
|
|||
|
||||
// really should be using jquery ui and have something nice looking
|
||||
function showAddTagDialog(id, type, path) {
|
||||
var tagName = window.prompt('Enter Tag:', '');
|
||||
var url = path + '/server/ajax.server.php?page=tag&action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName;
|
||||
if (tagName != null || tagName != '') {
|
||||
ajaxPut(url);
|
||||
}
|
||||
$('#dialog_tag_item').dialog({
|
||||
modal: true,
|
||||
buttons: [
|
||||
{
|
||||
text: 'ok',
|
||||
click: function () {
|
||||
var tagName = $('#dialog_tag_item_tag_name').val();
|
||||
if (tagName != null || tagName != '') {
|
||||
ajaxPut(path + '/server/ajax.server.php?page=tag&action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName);
|
||||
}
|
||||
$('#dialog_tag_item_tag_name').val('');
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
]
|
||||
}).show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue