You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/12/11 00:52:28 UTC

[48/50] [abbrv] git commit: updated refs/heads/ui-restyle to 326b3a6

Volumes page: Hide add/upload action if instance selected, to reduce confusion.


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

Branch: refs/heads/ui-restyle
Commit: a9258ae807b2be564fd82b95ddcb61cd02d7a294
Parents: 248195f
Author: Brian Federle <br...@citrix.com>
Authored: Tue Dec 10 15:20:33 2013 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Dec 10 15:20:39 2013 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a9258ae8/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index de929b3..86f7aa0 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -70,6 +70,10 @@
                         add: {
                             label: 'label.add.volume',
 
+                            preFilter: function(args) {
+                                return !args.context.instances;
+                            },
+
                             messages: {
                                 confirm: function(args) {
                                     return 'message.add.volume';
@@ -252,6 +256,9 @@
                         uploadVolume: {
                             isHeader: true,
                             label: 'label.upload.volume',
+                            preFilter: function(args) {
+                                return !args.context.instances;
+                            },
                             messages: {
                                 notification: function() {
                                     return 'label.upload.volume';