airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [27/50] [abbrv] airavata-php-gateway git commit: project sharing functionality in place
Date Wed, 27 Jul 2016 17:05:35 GMT
project sharing functionality in place


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/f53bcb74
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/f53bcb74
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/f53bcb74

Branch: refs/heads/develop
Commit: f53bcb74cb7c783e2d30495e7b74dd3a743e8e3b
Parents: d24edec
Author: Jeff Kinnison <jeffdkinnison@gmail.com>
Authored: Wed Jul 13 14:24:22 2016 -0400
Committer: Jeff Kinnison <jeffdkinnison@gmail.com>
Committed: Wed Jul 13 14:24:22 2016 -0400

----------------------------------------------------------------------
 app/libraries/ProjectUtilities.php | 6 ++++++
 app/views/project/edit.blade.php   | 2 +-
 public/css/sharing.css             | 4 ++++
 public/js/sharing/share.js         | 6 ++++--
 4 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f53bcb74/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index bc13fcd..ab269db 100644
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -190,6 +190,10 @@ class ProjectUtilities
         $updatedProject->owner = $projectDetails["owner"];
         $updatedProject->name = $projectDetails["name"];
         $updatedProject->description = $projectDetails["description"];
+        $updatedProject->gatewayId = Config::get('pga_config.airavata')['gateway-id'];
+
+        $share = $_POST['share-settings'];
+
         try {
             Airavata::updateProject(Session::get('authz-token'), $projectId, $updatedProject);
 
@@ -203,6 +207,8 @@ class ProjectUtilities
         } catch (AiravataSystemException $ase) {
             CommonUtilities::print_error_message('AiravataSystemException!<br><br>'
. $ase->getMessage());
         }
+
+        ProjectUtilities::share_project($projectId, json_decode($share));
     }
 
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f53bcb74/app/views/project/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/edit.blade.php b/app/views/project/edit.blade.php
index 62a976a..6b3e493 100755
--- a/app/views/project/edit.blade.php
+++ b/app/views/project/edit.blade.php
@@ -43,7 +43,7 @@
         </div>
 
         <div class="btn-toolbar">
-            <input name="save" type="submit" class="btn" value="Save">
+            <input name="save" type="submit" class="btn btn-primary" value="Save">
         </div>
 
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f53bcb74/public/css/sharing.css
----------------------------------------------------------------------
diff --git a/public/css/sharing.css b/public/css/sharing.css
index 426cd20..5153ca3 100755
--- a/public/css/sharing.css
+++ b/public/css/sharing.css
@@ -54,6 +54,10 @@
 	box-shadow: 0 1px 1px rgba(0,0,0,.075);
 }
 
+.share-box-users-item :hover {
+	border-color: #888888;
+}
+
 .sharing-thumbnail-unshare {
 	display: none;
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f53bcb74/public/js/sharing/share.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/share.js b/public/js/sharing/share.js
index e059193..fdd7c9f 100755
--- a/public/js/sharing/share.js
+++ b/public/js/sharing/share.js
@@ -218,13 +218,15 @@ $(function() {
         $('#shared-users').empty();
         if ($original_shared_list.length > 0) {
             $original_shared_list.each(function(index, element) {
-                var $e, data;
+                var $e, data, access;
                 $e = $(element);
                 data = $e.data();
                 if (data.hasOwnProperty('currentaccess')) {
                     data.currentaccess = data.access;
                 }
-                $e.find('select').val(data.access).prop('disabled', true);
+                access = (data.access.write ? access_enum.WRITE : access_enum.READ);
+                $e.find('.sharing-thumbnail-access').val(access).prop('disabled', true).hide();
+                $e.find('.sharing-thumbnail-access-text').text(access_text[access]).show();
                 $e.find('.sharing-thumbnail-unshare').hide();
             });
             $('shared-users').removeClass('text-align-center');


Mime
View raw message