mirror of https://github.com/apache/cloudstack.git
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
This commit is contained in:
parent
f7b1d3d8d5
commit
0b4e0b307f
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue