airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [08/10] airavata-php-gateway git commit: fixed typos and formatting
Date Wed, 13 Jul 2016 16:36:58 GMT
fixed typos and formatting


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/fffba479
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/fffba479
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/fffba479

Branch: refs/heads/grouper-integration
Commit: fffba479e7db8bea16cc184c4bbfeb7df9439db9
Parents: 83e15a5
Author: Jeff Kinnison <jeffdkinnison@gmail.com>
Authored: Tue Jul 12 17:30:02 2016 -0400
Committer: Jeff Kinnison <jeffdkinnison@gmail.com>
Committed: Tue Jul 12 17:30:02 2016 -0400

----------------------------------------------------------------------
 app/views/partials/sharing-display-body.blade.php |  4 +---
 app/views/project/summary.blade.php               |  1 +
 public/js/sharing/share.js                        | 18 +++++++++++-------
 3 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fffba479/app/views/partials/sharing-display-body.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/sharing-display-body.blade.php b/app/views/partials/sharing-display-body.blade.php
index 1b4a340..8fdda20 100644
--- a/app/views/partials/sharing-display-body.blade.php
+++ b/app/views/partials/sharing-display-body.blade.php
@@ -16,9 +16,7 @@
     <option value="lastfirst">Last, First Name</option>
     <option value="email">Email</option>
 </select>
-<div id="shared-users" class="text-align-center">
-    <p>This project has not been shared</p>
-</div>
+<div id="shared-users"></div>
 @if($form)
 <input id="share-settings" name="share-settings" type="hidden" value="" />
 @endif

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fffba479/app/views/project/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/summary.blade.php b/app/views/project/summary.blade.php
index e411891..1b59d28 100755
--- a/app/views/project/summary.blade.php
+++ b/app/views/project/summary.blade.php
@@ -110,6 +110,7 @@
 {{ HTML::script('js/time-conversion.js')}}
 <script>
     var users = {{ $users }};
+    console.log(users);
 </script>
 {{ HTML::script('js/sharing/sharing_utils.js') }}
 {{ HTML::script('js/sharing/share.js') }}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fffba479/public/js/sharing/share.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/share.js b/public/js/sharing/share.js
index 0686ced..ac37181 100755
--- a/public/js/sharing/share.js
+++ b/public/js/sharing/share.js
@@ -99,31 +99,33 @@ $(function() {
     /* Share box functions */
 
     var createTestData = function () {
-        var $users, $share, $user, data, access;
+        var $users, $share, $user;
 
         $users = $('#share-box-users');
         $share = $('#shared-users');
 
         for (var user in users) {
             if (users.hasOwnProperty(user)) {
-                data = users[user];
-                access = access_enum.NONE;
-                if (data.hasOwnProperty(access)) {
+                var data = users[user];
+                var access = access_enum.NONE;
+                if (data.hasOwnProperty("access")) {
+                    console.log("Found access parameter");
                     if (data.access.write) {
                         access = access_enum.WRITE;
                     }
                     else if (data.access.read) {
-                        access = access_enu.READ;
+                        access = access_enum.READ;
                     }
                 }
                 $user = createThumbnail(user, data.firstname, data.lastname, data.email,
access);
 
                 $user.addClass('user-thumbnail');
-                if (access == access_enum.NONE) {
+                if (access === access_enum.NONE) {
                     $user.addClass('share-box-users-item');
                     $users.append($user);
                 }
                 else {
+                    console.log("adding shared user");
                     $user.addClass('share-box-share-item');
                     $share.append($user);
                 }
@@ -147,7 +149,9 @@ $(function() {
         //         }
         //     }
         // }
-
+        if ($share.children.length === 0) {
+            $share.append($('<p>This project has not been shared</p>')).addClass('text-align-center');
+        }
         $('.user-thumbnail').show();
         //$('.group-thumbnail').show();
     }


Mime
View raw message