summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-24 02:52:01 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-24 02:52:01 +0000
commit62774923211c2e391534d83e6c7d97acae086766 (patch)
treea43d0ce9345df18b0f67b61e044636114ce56aba /lib/ui.lib.php
parent7549180515107d924610a22c5acf1a0e44b4b9f5 (diff)
downloadampache-62774923211c2e391534d83e6c7d97acae086766.tar.gz
ampache-62774923211c2e391534d83e6c7d97acae086766.tar.bz2
ampache-62774923211c2e391534d83e6c7d97acae086766.zip
JavaScript cleanup. Consistently use camelCase for naming JS functions. Use
Prototype functionality where possible (particularly for Ajax). Move our JS into lib/javascript (I dropped kajax as an external module since the new ajax.js is completely different apart from function headers.) Remove unused JS functions from base.js.
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 6c1d56fa..4a5767a9 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -716,13 +716,23 @@ function ajax_include($include) {
*/
function toggle_visible($element) {
- echo "<script type=\"text/javascript\">\n";
- echo "toggle_visible('$element');";
- echo "\n</script>\n";
+ echo '<script type="text/javascript">';
+ echo "toggleVisible('$element');";
+ echo "</script>\n";
} // toggle_visible
/**
+ * update_text
+ * Convenience function
+ */
+function update_text($field, $value) {
+ echo '<script type="text/javascript">';
+ echo "updateText('$field', '$value');";
+ echo "</script>\n";
+}
+
+/**
* print_bool
* This function takes a boolean value and then prints out a friendly text
* message.