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 2014/08/18 23:08:19 UTC
git commit: updated refs/heads/master to c319c0b
Repository: cloudstack
Updated Branches:
refs/heads/master f2781a5ce -> c319c0b3e
Make using a hint (or no results) text more flexible
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c319c0b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c319c0b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c319c0b3
Branch: refs/heads/master
Commit: c319c0b3e002f35523baec7df4d07b9d975dde7b
Parents: f2781a5
Author: seif <se...@gmail.com>
Authored: Mon Aug 18 15:04:49 2014 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Mon Aug 18 15:07:03 2014 -0600
----------------------------------------------------------------------
ui/lib/jquery.tokeninput.js | 4 ++--
ui/scripts/system.js | 16 ++++++++++++----
ui/scripts/ui/dialog.js | 18 ++----------------
ui/scripts/ui/widgets/detailView.js | 26 ++++++--------------------
4 files changed, 22 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c319c0b3/ui/lib/jquery.tokeninput.js
----------------------------------------------------------------------
diff --git a/ui/lib/jquery.tokeninput.js b/ui/lib/jquery.tokeninput.js
index 638ce68..182ed05 100644
--- a/ui/lib/jquery.tokeninput.js
+++ b/ui/lib/jquery.tokeninput.js
@@ -21,8 +21,8 @@ var DEFAULT_SETTINGS = {
jsonContainer: null,
// Display settings
- hintText: "Type in part of a storage tag",
- noResultsText: "No storage tags found",
+ hintText: "Type in a search term",
+ noResultsText: "No results",
searchingText: "Searching...",
deleteText: "×",
animateDropdown: true,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c319c0b3/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f0e97e5..fe51acb 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -15197,7 +15197,9 @@
}
args.response.success({
- data: tags
+ data: tags,
+ hintText: "Type in part of a host tag",
+ noResultsText: "No host tags found"
});
},
error: function(XMLHttpResponse) {
@@ -15790,7 +15792,9 @@
}
args.response.success({
- data: tags
+ data: tags,
+ hintText: "Type in part of a host tag",
+ noResultsText: "No host tags found"
});
},
error: function(XMLHttpResponse) {
@@ -16970,7 +16974,9 @@
}
args.response.success({
- data: tags
+ data: tags,
+ hintText: "Type in part of a storage tag",
+ noResultsText: "No storage tags found"
});
},
error: function(XMLHttpResponse) {
@@ -17329,7 +17335,9 @@
}
args.response.success({
- data: tags
+ data: tags,
+ hintText: "Type in part of a storage tag",
+ noResultsText: "No storage tags found"
});
},
error: function(XMLHttpResponse) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c319c0b3/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 41cbef0..6c77924 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -467,20 +467,6 @@
} else if (field.isTokenInput) { // jquery.tokeninput.js
isAsync = true;
- var hint= "Type in a search term";
- var noResults= "No results";
-
- if (field.label === 'label.storage.tags')
- {
- hint = "Type in part of a storage tag";
- noResults = "No storage tags found";
- }
- else if (field.label === 'label.host.tags')
- {
- hint = "Type in part of a host tag";
- noResults = "No host tags found";
- }
-
selectArgs = {
context: args.context,
response: {
@@ -489,8 +475,8 @@
{
theme: "facebook",
preventDuplicates: true,
- hintText: hint,
- noResultsText: noResults
+ hintText: args.hintText,
+ noResultsText: args.noResultsText
});
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c319c0b3/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 2d61977..a2daa7e 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -672,7 +672,7 @@
// Turn into form field
var selectData = $value.data('detail-view-editable-select');
var isBoolean = $value.data('detail-view-editable-boolean');
- var isTokenInput = $value.data('detail-view-is-TokenInput');
+ var isTokenInput = $value.data('detail-view-is-token-input');
var data = !isBoolean ? cloudStack.sanitizeReverse($value.html()) : $value.data('detail-view-boolean-value');
var rules = $value.data('validation-rules') ? $value.data('validation-rules') : {};
var isPassword = $value.data('detail-view-is-password');
@@ -734,20 +734,6 @@
isAsync = true;
- var hint = "Type in a search term";
- var noResults = "No results";
-
- if ($value.data('value_token').label === 'label.storage.tags')
- {
- hint = "Type in part of a storage tag";
- noResults= "No storage tags found";
- }
- else if ($value.data('value_token').label === 'label.host.tags')
- {
- hint = "Type in part of a host tag";
- noResults = "No host tags found";
- }
-
selectArgs = {
context: $detailView.data('view-args').context,
response: {
@@ -758,8 +744,8 @@
preventDuplicates: true,
prePopulate: existing_tags,
processPrePopulate: true,
- hintText: hint,
- noResultsText: noResults
+ hintText: args.hintText,
+ noResultsText: args.noResultsText
});
}
}
@@ -773,7 +759,7 @@
$value.append($input);
token_value = data;
- $value.data('value_token').dataProvider(selectArgs);
+ $value.data('value-token').dataProvider(selectArgs);
} else {
// Text input
$value.append(
@@ -1129,8 +1115,8 @@
if (value.isTokenInput)
{
- $value.data('detail-view-is-TokenInput', true);
- $value.data('value_token', value);
+ $value.data('detail-view-is-token-input', true);
+ $value.data('value-token', value);
}
}