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:11 UTC

[05/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/90396cfe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90396cfe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90396cfe

Branch: refs/heads/sf-plugins
Commit: 90396cfe89320f11b71aa00fb5d8124434964187
Parents: cc64dc1
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 23:37:51 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600

----------------------------------------------------------------------
 ui/plugins/sfSharedVolume/sfSharedVolume.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90396cfe/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index f8f3aaf..d935b04 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -108,12 +108,19 @@
                   validation: {
                     required: true
                   },
+                  isHidden: true,
                   select: function(args) {
                     $.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({