airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [2/4] airavata-php-gateway git commit: fixed typos
Date Wed, 13 Jul 2016 19:38:31 GMT
fixed typos


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

Branch: refs/heads/grouper-integration
Commit: d24edec2cf90e75c9f106b58996a0d4cec4a754d
Parents: 0478572
Author: Jeff Kinnison <jeffdkinnison@gmail.com>
Authored: Wed Jul 13 13:07:48 2016 -0400
Committer: Jeff Kinnison <jeffdkinnison@gmail.com>
Committed: Wed Jul 13 13:07:48 2016 -0400

----------------------------------------------------------------------
 public/js/sharing/share.js         |  9 +++------
 public/js/sharing/sharing_utils.js | 10 +++++-----
 2 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d24edec2/public/js/sharing/share.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/share.js b/public/js/sharing/share.js
index 8b3c9bc..e059193 100755
--- a/public/js/sharing/share.js
+++ b/public/js/sharing/share.js
@@ -87,10 +87,6 @@ $(function() {
         var $share_list;
         e.stopPropagation();
         e.preventDefault();
-        if ($('#share-box').length === 0) {
-            $('body').append(createShareBox());
-            createTestData();
-        }
 
         $share_list = $('#shared-users').children();
 
@@ -175,7 +171,7 @@ $(function() {
 
     // Save the sharing permissions of each selected user
     $('body').on('click', '#share-box-button', function(e) {
-        var data, resource_id, $share_list, share_settings;
+        var data, resource_id, $share_list, share_settings, access;
         e.stopPropagation();
         e.preventDefault();
         data = $("#share-box").data()
@@ -198,7 +194,8 @@ $(function() {
                         $e.data(data);
                     }
                     share_settings[data.username] = data.access;
-                    $e.find('.sharing-thumbnail-access').prop('disabled', true);
+                    access = parseInt($e.find('.sharing-thumbnail-access').prop('disabled',
true).hide().val(), 10);
+                    $e.find('.sharing-thumbnail-access-text').text(access_text[access]).show();
                     $e.find('.sharing-thumbnail-unshare').hide();
                 });
                 $('#share-settings').val(JSON.stringify(share_settings));

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d24edec2/public/js/sharing/sharing_utils.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/sharing_utils.js b/public/js/sharing/sharing_utils.js
index 22bc138..fcd120b 100644
--- a/public/js/sharing/sharing_utils.js
+++ b/public/js/sharing/sharing_utils.js
@@ -7,7 +7,7 @@ var access_enum = {
 var access_text = [
   'Cannot access',
   'Can read',
-  'can write'
+  'Can write'
 ];
 
 var createThumbnail = function(username, firstname, lastname, email, access = access_enum.NONE,
share = true) {
@@ -47,8 +47,8 @@ var createThumbnail = function(username, firstname, lastname, email, access
= ac
 
       options = '';
       options += '<option value="' + access_enum.NONE + '"' + (access === access_enum.NONE
? "selected" : "") + ' style="display: none;">No Permissions</option>';
-      options += '<option value="' + access_enum.READ + '"' + (access === access_enum.VIEW
? "selected" : "") + '>Can Read</option>';
-      options += '<option value="' + access_enum.WRITE + '"' + (access === access_enum.RUN
? "selected" : "") + '>Can Write</option>';
+      options += '<option value="' + access_enum.READ + '"' + (access === access_enum.READ
? "selected" : "") + '>Can Read</option>';
+      options += '<option value="' + access_enum.WRITE + '"' + (access === access_enum.WRITE
? "selected" : "") + '>Can Write</option>';
 
       select += options;
       select += '</select>';
@@ -82,7 +82,7 @@ var changeShareState = function($target) {
     data = $target.data();
     if ($target.hasClass('share-box-users-item')) {
         $target.find('.sharing-thumbnail-access').val('1').prop("disabled", false).show();
-        $target.find('.sharing-thumbnail-access-text').val(access_text[access_enum.READ]).hide();
+        $target.find('.sharing-thumbnail-access-text').text(access_text[access_enum.READ]).hide();
         data.currentaccess.read = true;
         $target.data(data);
         $target.find('.sharing-thumbnail-unshare').show();
@@ -90,7 +90,7 @@ var changeShareState = function($target) {
     }
     else if ($target.hasClass('share-box-share-item')) {
         $target.find('.sharing-thumbnail-access').val('0').prop("disabled", true).hide();
-        $target.find('.sharing-thumbnail-access-text').val(access_text[access_enum.NONE]).show();
+        $target.find('.sharing-thumbnail-access-text').text(access_text[access_enum.NONE]).show();
         data.currentaccess.read = false;
         data.currentaccess.write = false;
         $target.data(data);


Mime
View raw message