diff options
Diffstat (limited to 'src/usr/local/www/filebrowser')
-rw-r--r-- | src/usr/local/www/filebrowser/browser.js | 28 | ||||
-rw-r--r-- | src/usr/local/www/filebrowser/browser.php | 8 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/usr/local/www/filebrowser/browser.js b/src/usr/local/www/filebrowser/browser.js index 54e07ee..6e75272 100644 --- a/src/usr/local/www/filebrowser/browser.js +++ b/src/usr/local/www/filebrowser/browser.js @@ -1,22 +1,22 @@ -jQuery(document).ready( +$(document).ready( function() { - jQuery("#fbOpen").click( + $("#fbOpen").click( function() { - jQuery("#fbBrowser").fadeIn(750); - fbBrowse(jQuery("#fbTarget").val()); + $("#fbBrowser").fadeIn(750); + fbBrowse($("#fbTarget").val()); } ); } ); function fbBrowse(path) { - jQuery("#fileContent").fadeOut(); + $("#fileContent").fadeOut(); - if (jQuery("#fbCurrentDir")) { - jQuery("#fbCurrentDir").html("Loading ..."); + if ($("#fbCurrentDir")) { + $("#fbCurrentDir").html("Loading ..."); } - jQuery.ajax( + $.ajax( "/filebrowser/browser.php?path=" + encodeURI(path ? path : "/"), { type: "get", complete: fbComplete } ); @@ -24,20 +24,20 @@ function fbBrowse(path) { } function fbComplete(req) { - jQuery("#fbBrowser").html(req.responseText); + $("#fbBrowser").html(req.responseText); var actions = { fbHome: function() { fbBrowse("/"); }, - fbClose: function() { jQuery("#fbBrowser").fadeOut(750); }, + fbClose: function() { $("#fbBrowser").fadeOut(750); }, fbDir: function() { fbBrowse(this.id); }, - fbFile: function() { jQuery("#fbTarget").val(this.id); } + fbFile: function() { $("#fbTarget").val(this.id); } } for (var type in actions) { - jQuery("#fbBrowser ." + type).each( + $("#fbBrowser ." + type).each( function() { - jQuery(this).click(actions[type]); - jQuery(this).css("cursor","pointer"); + $(this).click(actions[type]); + $(this).css("cursor","pointer"); } ); } diff --git a/src/usr/local/www/filebrowser/browser.php b/src/usr/local/www/filebrowser/browser.php index 30876aa..c048187 100644 --- a/src/usr/local/www/filebrowser/browser.php +++ b/src/usr/local/www/filebrowser/browser.php @@ -46,11 +46,11 @@ if (is_file($path)) { <table width="100%"> <tr> <td class="fbHome text-left" width="25px"> - <img onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" /> + <img onClick="$('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" /> </td> <td><b><?=$path;?></b></td> <td class="fbClose text-right"> - <img onClick="jQuery('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" /> + <img onClick="$('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" /> </td> </tr> <tr> @@ -82,7 +82,7 @@ foreach ($dirs as $dir): <tr> <td></td> <td class="fbDir vexpl text-left" id="<?=$realDir;?>"> - <div onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');"> + <div onClick="$('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');"> <img src="/filebrowser/images/folder_generic.gif" /> <?=$dir;?> </div> @@ -149,7 +149,7 @@ foreach ($files as $file): <td></td> <td class="fbFile vexpl text-left" id="<?=$fqpn;?>"> <?php $filename = str_replace("//","/", "{$path}/{$file}"); ?> - <div onClick="jQuery('#fbTarget').val('<?=$filename?>'); loadFile(); jQuery('#fbBrowser').fadeOut();"> + <div onClick="$('#fbTarget').val('<?=$filename?>'); loadFile(); $('#fbBrowser').fadeOut();"> <img src="/filebrowser/images/file_<?=$type;?>.gif" alt="" title=""> <?=$file;?> </div> |