mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-8040: UI: register template dialog, register ISO dialog - fix a bug that hidden fields fail to be generated before cloudStack.preFilter.createTemplate() is called. Thus, cloudStack.preFilter.createTemplate() is unable to change hidden fields's css display property from none to inline-block for admin users.
This commit is contained in:
parent
4f748e6e30
commit
3ddf553d16
@ -408,20 +408,18 @@
|
||||
osTypeId: {
|
||||
label: 'label.os.type',
|
||||
docID: 'helpRegisterTemplateOSType',
|
||||
select: function(args) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
args.response.success({
|
||||
data: ostypeObjs
|
||||
});
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var ostypeObjs = json.listostypesresponse.ostype;
|
||||
args.response.success({
|
||||
data: ostypeObjs
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -845,16 +843,16 @@
|
||||
}
|
||||
|
||||
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var ostypeObjs;
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
|
||||
if (ostypeObjs != undefined) {
|
||||
var ostypeName;
|
||||
for (var i = 0; i < ostypeObjs.length; i++) {
|
||||
@ -959,16 +957,16 @@
|
||||
label: 'label.os.type',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var ostypeObjs;
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
|
||||
var items = [];
|
||||
$(ostypeObjs).each(function() {
|
||||
items.push({
|
||||
@ -1226,16 +1224,16 @@
|
||||
}
|
||||
|
||||
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var ostypeObjs;
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
|
||||
if (ostypeObjs != undefined) {
|
||||
var ostypeName;
|
||||
for (var i = 0; i < ostypeObjs.length; i++) {
|
||||
@ -1357,16 +1355,16 @@
|
||||
label: 'label.os.type',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var ostypeObjs;
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
|
||||
var items = [];
|
||||
$(ostypeObjs).each(function() {
|
||||
items.push({
|
||||
@ -1560,27 +1558,25 @@
|
||||
required: true
|
||||
},
|
||||
select: function(args) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var items = [];
|
||||
//items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked
|
||||
$(ostypeObjs).each(function() {
|
||||
items.push({
|
||||
id: this.id,
|
||||
description: this.description
|
||||
});
|
||||
});
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var ostypeObjs = json.listostypesresponse.ostype;
|
||||
var items = [];
|
||||
//items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked
|
||||
$(ostypeObjs).each(function() {
|
||||
items.push({
|
||||
id: this.id,
|
||||
description: this.description
|
||||
});
|
||||
});
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -2277,16 +2273,16 @@
|
||||
label: 'label.os.type',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
if (ostypeObjs == undefined) {
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
}
|
||||
var ostypeObjs;
|
||||
$.ajax({
|
||||
url: createURL("listOsTypes"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
ostypeObjs = json.listostypesresponse.ostype;
|
||||
}
|
||||
});
|
||||
|
||||
var items = [];
|
||||
$(ostypeObjs).each(function() {
|
||||
items.push({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user