airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [05/11] airavata-php-gateway git commit: AIRAVATA-2228 No longer need hidden share-settings input
Date Wed, 23 Nov 2016 15:49:41 GMT
AIRAVATA-2228 No longer need hidden share-settings input

share_settings is accessible from other functions in share.js so it no
longer needs to be serialized and deserialized from a hidden form field.
Now when updating via Ajax a hidden form field isn't required.


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

Branch: refs/heads/develop
Commit: 2323494a59017613212324fdac2578bc602eff09
Parents: e6db22e
Author: Marcus Christie <machrist@iu.edu>
Authored: Tue Nov 22 10:40:17 2016 -0500
Committer: Marcus Christie <machrist@iu.edu>
Committed: Tue Nov 22 10:40:17 2016 -0500

----------------------------------------------------------------------
 app/views/partials/experiment-info.blade.php | 3 ---
 public/js/sharing/share.js                   | 7 +++----
 2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2323494a/app/views/partials/experiment-info.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index 659e912..b0278bd 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -267,9 +267,6 @@
         </div>
     </form>
 
-    {{-- This is a placeholder for the sharing modal to write share-settings to. --}}
-    <input id="share-settings" name="share-settings" type="hidden" value="{}" />
-
     <div id="clone-panel" class="panel panel-default">
         <div class="panel-heading">
             <h3 class="panel-title">Clone Experiment</h3>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2323494a/public/js/sharing/share.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/share.js b/public/js/sharing/share.js
index 63262f2..a25b2b9 100755
--- a/public/js/sharing/share.js
+++ b/public/js/sharing/share.js
@@ -7,7 +7,7 @@
 var createThumbnails;
 
 $(function() {
-    var comparator_map, comparator, $original_shared_list, $revoke_list;
+    var comparator_map, comparator, $original_shared_list, $revoke_list, share_settings;
     comparator_map = {
             "username": usernameComparator,
             "firstlast": firstLastComparator,
@@ -19,7 +19,7 @@ $(function() {
     /* Share box functions */
 
     createThumbnails = function () {
-        var $users, $share, $user, share_settings;
+        var $users, $share, $user;
 
         $users = $('#share-box-users');
         $share = $('#shared-users');
@@ -205,14 +205,13 @@ $(function() {
 
     // Save the sharing permissions of each selected user
     $('body').on('click', '#share-box-button', function(e) {
-        var data, resource_id, $share_list, $update_list, share_settings;
+        var data, resource_id, $share_list, $update_list;
         e.stopPropagation();
         e.preventDefault();
         $('#share-box-error-message').empty();
         data = $("#share-box").data();
         $share_list = $("#share-box-share").children();
         $update_list = $('.sharing-to-update');
-        share_settings = JSON.parse($('#share-settings').val());
         // TODO: is this used any longer?  I don't see where resource_id gets
         // set and updateUserPrivileges doesn't seem to be defined
         if (data.hasOwnProperty('resource_id')) {


Mime
View raw message