summaryrefslogtreecommitdiffstats
path: root/lib/javascript/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/javascript/base.js')
-rw-r--r--lib/javascript/base.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/javascript/base.js b/lib/javascript/base.js
index 3e6e7e6d..9d56f4f4 100644
--- a/lib/javascript/base.js
+++ b/lib/javascript/base.js
@@ -1,4 +1,4 @@
-// vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab:
+// vim:set softtabstop=4 shiftwidth=4 expandtab:
//
// Copyright 2001 - 2013 Ampache.org
// All rights reserved.
@@ -32,34 +32,34 @@ function flipField(field) {
// updateText
// Changes the specified elements innards. Used for the catalog mojo fluff.
function updateText(field, value) {
- $(field).innerHTML = value;
+ $(field).innerHTML = 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';
- }
- else {
- $(element).style.display = 'block';
- }
+ if ($(element).style.display == 'block') {
+ $(element).style.display = 'none';
+ }
+ else {
+ $(element).style.display = 'block';
+ }
} // toggleVisible
// delayRun
// This function delays the run of another function by X milliseconds
function delayRun(element, time, method, page, source) {
- var function_string = method + '(\'' + page + '\',\'' + source + '\')';
+ var function_string = method + '(\'' + page + '\',\'' + source + '\')';
- var action = function () { eval(function_string); };
+ var action = function () { eval(function_string); };
- if (element.zid) {
- clearTimeout(element.zid);
- }
+ if (element.zid) {
+ clearTimeout(element.zid);
+ }
- element.zid = setTimeout(action, time);
+ element.zid = setTimeout(action, time);
} // delayRun
@@ -69,21 +69,21 @@ function delayRun(element, time, method, page, source) {
// 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;
- }
+ 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;
+ }
} // reloadUtil
// reloadRedirect
// Send them elsewhere
function reloadRedirect(target) {
- window.location = target;
+ window.location = target;
} // reloadRedirect
// popupWindow
@@ -96,10 +96,10 @@ 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 + '" />';
- } else {
- $(target).innerHTML = '';
- }
+ if ($(target).options[$(target).selectedIndex].value == -1) {
+ $(target).innerHTML = '<input type="textbox" name="' + type + '_name" value="New ' + type + '" />';
+ } else {
+ $(target).innerHTML = '';
+ }
}