From d13ba0ee2d93080ba56776442b9d39a53e2b6321 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sat, 30 Jul 2011 16:03:32 -0400 Subject: [PATCH] Revise permissions system to support read, write, and delete --- apps/files_sharing/appinfo/database.xml | 2 +- apps/files_sharing/js/share.js | 21 +++---- apps/files_sharing/lib_share.php | 52 +++++++++-------- apps/files_sharing/sharedstorage.php | 78 ++++++++++++++++--------- 4 files changed, 90 insertions(+), 63 deletions(-) diff --git a/apps/files_sharing/appinfo/database.xml b/apps/files_sharing/appinfo/database.xml index 7ddaca21ae..3378b6b09e 100644 --- a/apps/files_sharing/appinfo/database.xml +++ b/apps/files_sharing/appinfo/database.xml @@ -32,7 +32,7 @@ 128 - is_writeable + permissions integer true 1 diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index a519ec6d5c..c688007ddb 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -32,10 +32,6 @@ $(document).ready(function() { alert("remove"); // TODO Remove corresponding row }); - $('#toggle-private-advanced').live('click', function(event) { - event.preventDefault(); - $('#private-advanced').toggle(); - }); $('#expire').datepicker({ dateFormat:'MM d, yy', altField: "#expire_time", @@ -69,8 +65,8 @@ $(document).ready(function() { }); }); -function createShareDialog(files) { - var html = "
"; +function createShareDialog(fileNames) { + var html = "
"; html += ""; html += ""; html += "
"; @@ -78,13 +74,12 @@ function createShareDialog(files) { html += ""; html += ""; html += "
"; - html += "Advanced"; + html += "
"; + html += "Permissions" html += "
"; - html += ""; html += "
"; html += "