You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2015/09/19 03:31:23 UTC

[17/50] git commit: updated refs/heads/sf-plugins to 157efc3

Conditionally show the Account field in the Add Shared Volume window


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15213a3f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15213a3f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15213a3f

Branch: refs/heads/sf-plugins
Commit: 15213a3facd749d1f9698abc2b72affd46240a63
Parents: 90396cf
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 00:21:10 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600

----------------------------------------------------------------------
 ui/plugins/sfSharedVolume/sfSharedVolume.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15213a3f/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index d935b04..90395cc 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -110,17 +110,15 @@
                   },
                   isHidden: true,
                   select: function(args) {
+                    if (isAdmin()) {
+                      args.$form.find('.form-item[rel=account]').show();
+                    }
+
                     $.ajax({
                       url: createURL("listAccounts"),
                       dataType: "json",
                       async: true,
                       success: function(json) {
-                        if (isAdmin()) {
-                          var $form = $(this).closest('form');
-
-                          $form.find('.form-item[rel=account]').show();
-                        }
-
                         var accountObjs = json.listaccountsresponse.account;
 
                         args.response.success({