You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/06/24 20:32:39 UTC
git commit: updated refs/heads/master-6-17-stable to 81264cd
Updated Branches:
refs/heads/master-6-17-stable ad33e6d47 -> 81264cdd9
BUG-ID: CS-17733 - make detailView widget to pass jsonObj to tagger widget, so dataProvider in tagger widget is able to pass projectid to listTags API.
Reviewed-by: Brian
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/81264cdd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/81264cdd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/81264cdd
Branch: refs/heads/master-6-17-stable
Commit: 81264cdd9e27922dd07a12d6052d81b2e0619b52
Parents: ad33e6d
Author: Jessica Wang <je...@citrix.com>
Authored: Sat Jun 22 16:29:05 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Jun 24 11:32:21 2013 -0700
----------------------------------------------------------------------
ui/scripts/sharedFunctions.js | 4 ++++
ui/scripts/ui/widgets/detailView.js | 3 ++-
ui/scripts/ui/widgets/tagger.js | 2 ++
3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81264cdd/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 86dc68e..dd9a7d6 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -821,6 +821,10 @@ cloudStack.api = {
data.projectid=args.context.projects[0].id;
}
+ if(args.jsonObj != null && args.jsonObj.projectid != null && data.projectid == null) {
+ data.projectid = args.jsonObj.projectid;
+ }
+
$.ajax({
url: createURL('listTags'),
data: data,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81264cdd/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index ab1fe9b..356d9f2 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -1178,7 +1178,8 @@
!$detailView.data('view-args').compact) {
$('<div>').tagger(
$.extend(true, {}, tabs.tags, {
- context: $detailView.data('view-args').context
+ context: $detailView.data('view-args').context,
+ jsonObj: $detailView.data('view-args').jsonObj
})
).appendTo($detailView.find('.main-groups'));
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81264cdd/ui/scripts/ui/widgets/tagger.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/tagger.js b/ui/scripts/ui/widgets/tagger.js
index 0f297eb..9af6fb7 100644
--- a/ui/scripts/ui/widgets/tagger.js
+++ b/ui/scripts/ui/widgets/tagger.js
@@ -115,6 +115,7 @@
$.widget('cloudStack.tagger', {
_init: function(args) {
var context = this.options.context;
+ var jsonObj = this.options.jsonObj;
var dataProvider = this.options.dataProvider;
var actions = this.options.actions;
var $container = this.element.addClass('tagger');
@@ -209,6 +210,7 @@
$loading.appendTo($container);
dataProvider({
context: context,
+ jsonObj: jsonObj,
response: {
success: function(args) {
var data = args.data;