Repository: cloudstack
Updated Branches:
  refs/heads/master 0dc5cb428 -> 4e5dc5921


Support a new control for storage tags on the Add Compute Offering and Add Disk 
Offering windows


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

Branch: refs/heads/master
Commit: 4e5dc59218be4a48910fbb6a77f1c419cb7924c0
Parents: 0dc5cb4
Author: seif <seifje...@gmail.com>
Authored: Tue Aug 19 13:59:00 2014 -0600
Committer: Mike Tutkowski <mike.tutkow...@solidfire.com>
Committed: Tue Aug 19 18:03:48 2014 -0600

----------------------------------------------------------------------
 ui/css/token-input-facebook.css |   4 +-
 ui/lib/jquery.tokeninput.js     |   2 +-
 ui/scripts/configuration.js     | 102 +++++++++++++++++++++++++++++++++--
 3 files changed, 102 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5dc592/ui/css/token-input-facebook.css
----------------------------------------------------------------------
diff --git a/ui/css/token-input-facebook.css b/ui/css/token-input-facebook.css
index 08fb4ea..bb29276 100644
--- a/ui/css/token-input-facebook.css
+++ b/ui/css/token-input-facebook.css
@@ -19,7 +19,7 @@ ul.token-input-list-facebook {
     font-size: 12px;
     font-family: Verdana;
     min-height: 1px;
-    z-index: 1010;
+    z-index: 2147483647;
     margin: 0;
     padding: 0;
     background-color: #F6F6F6;
@@ -91,7 +91,7 @@ div.token-input-dropdown-facebook {
     cursor: default;
     font-size: 11px;
     font-family: Verdana;
-    z-index: 1010;
+    z-index: 2147483647;
 }
 
 div.token-input-dropdown-facebook p {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5dc592/ui/lib/jquery.tokeninput.js
----------------------------------------------------------------------
diff --git a/ui/lib/jquery.tokeninput.js b/ui/lib/jquery.tokeninput.js
index 182ed05..e4b341c 100644
--- a/ui/lib/jquery.tokeninput.js
+++ b/ui/lib/jquery.tokeninput.js
@@ -686,7 +686,7 @@ $.TokenList = function (input, url_or_data, settings) {
                 position: "absolute",
                 top: $(token_list).offset().top + $(token_list).outerHeight(),
                 left: $(token_list).offset().left,
-                zindex: 1010
+                zindex: 2147483647
             })
             .show();
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5dc592/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 895f8e8..a977f2e 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -305,11 +305,75 @@
                                     },
                                     storageTags: {
                                         label: 'label.storage.tags',
-                                        docID: 'helpComputeOfferingStorageType'
+                                        docID: 
'helpComputeOfferingStorageType',
+                                        isTokenInput: true,
+                                        dataProvider: function(args) {
+                                            $.ajax({
+                                                url: 
createURL("listStorageTags"),
+                                                dataType: "json",
+                                                success: function(json) {
+                                                    var item = 
json.liststoragetagsresponse.storagetag;
+                                                    var tags = [];
+
+                                                    if (item != null)
+                                                    {
+                                                        tags = $.map(item, 
function(tag) {
+                                                            return {
+                                                                       id: 
tag.name,
+                                                                       name: 
tag.name
+                                                                   };
+                                                        });
+                                                    }
+
+                                                    args.response.success({
+                                                        data: tags,
+                                                        hintText: "Type in 
part of a storage tag",
+                                                        noResultsText: "No 
storage tags found"
+                                                    });
+                                                },
+                                                error: 
function(XMLHttpResponse) {
+                                                    var errorMsg = 
parseXMLHttpResponse(XMLHttpResponse);
+
+                                                    
args.response.error(errorMsg);
+                                                }
+                                            });
+                                        }
                                     },
                                     hostTags: {
                                         label: 'label.host.tags',
-                                        docID: 'helpComputeOfferingHostTags'
+                                        docID: 'helpComputeOfferingHostTags',
+                                        isTokenInput: true,
+                                        dataProvider: function(args) {
+                                            $.ajax({
+                                                url: createURL("listHostTags"),
+                                                dataType: "json",
+                                                success: function(json) {
+                                                    var item = 
json.listhosttagsresponse.hosttag;
+                                                    var tags = [];
+
+                                                    if (item != null)
+                                                    {
+                                                        tags = $.map(item, 
function(tag) {
+                                                            return {
+                                                                       id: 
tag.name,
+                                                                       name: 
tag.name
+                                                                   };
+                                                        });
+                                                    }
+
+                                                    args.response.success({
+                                                        data: tags,
+                                                        hintText: "Type in 
part of a host tag",
+                                                        noResultsText: "No 
host tags found"
+                                                    });
+                                                },
+                                                error: 
function(XMLHttpResponse) {
+                                                    var errorMsg = 
parseXMLHttpResponse(XMLHttpResponse);
+
+                                                    
args.response.error(errorMsg);
+                                                }
+                                            });
+                                        }
                                     },
                                     cpuCap: {
                                         label: 'label.CPU.cap',
@@ -1754,7 +1818,39 @@
                                     },
                                     tags: {
                                         label: 'label.storage.tags',
-                                        docID: 'helpDiskOfferingStorageTags'
+                                        docID: 'helpDiskOfferingStorageTags',
+                                        isTokenInput: true,
+                                        dataProvider: function(args) {
+                                            $.ajax({
+                                                url: 
createURL("listStorageTags"),
+                                                dataType: "json",
+                                                success: function(json) {
+                                                    var item = 
json.liststoragetagsresponse.storagetag;
+                                                    var tags = [];
+
+                                                    if (item != null)
+                                                    {
+                                                        tags = $.map(item, 
function(tag) {
+                                                            return {
+                                                                       id: 
tag.name,
+                                                                       name: 
tag.name
+                                                                   };
+                                                        });
+                                                    }
+
+                                                    args.response.success({
+                                                        data: tags,
+                                                        hintText: "Type in 
part of a storage tag",
+                                                        noResultsText: "No 
storage tags found"
+                                                    });
+                                                },
+                                                error: 
function(XMLHttpResponse) {
+                                                    var errorMsg = 
parseXMLHttpResponse(XMLHttpResponse);
+
+                                                    
args.response.error(errorMsg);
+                                                }
+                                            });
+                                        }
                                     },
                                     isPublic: {
                                         label: 'label.public',

Reply via email to