diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index b73f7d52e60..879bd1ea0eb 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -2,6 +2,8 @@ require_once('apps/files_sharing/lib_share.php'); +OC_UTIL::addScript("files_sharing", "share"); + OC_APP::addNavigationEntry( array( "id" => "files_sharing_list", "order" => 10, "href" => OC_HELPER::linkTo( "files_sharing", "list.php" ), diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js new file mode 100644 index 00000000000..84449406ab8 --- /dev/null +++ b/apps/files_sharing/js/share.js @@ -0,0 +1,84 @@ +$(document).ready(function() { + $('.share').click(function(event) { + event.preventDefault(); + // TODO Replace with getSelectedFiles() from files.js + var files = ''; + $('td.selection input:checkbox:checked').parent().parent().each(function(i, element) { + files += ', ' + $(element).attr('data-file'); + }); + files = files.substr(1); + var html = "