CLOUDSTACK-4102: UI > widget > extend dialog widget to have dynamic description.

This commit is contained in:
Jessica Wang 2013-08-22 13:58:56 -07:00
parent 922ef76224
commit 3f4ef406cf
2 changed files with 10 additions and 2 deletions

View File

@ -46,8 +46,14 @@
var createLabel = _l(args.form.createLabel);
// Description text
var formDesc;
if (typeof(args.form.desc) == 'function') {
formDesc = args.form.desc(args);
} else { //typeof(args.form.desc) == 'string' or 'undefined'
formDesc = args.form.desc;
}
$('<span>').addClass('message').prependTo($formContainer).html(
_l(args.form.desc)
_l(formDesc)
);
// Submit button

View File

@ -70,6 +70,7 @@
action.notification : {};
var messages = action.messages;
var id = args.id;
var jsonObj = args.jsonObj;
var context = $.extend(true, {},
args.context ? args.context : $detailView.data('view-args').context);
var _custom = $detailView.data('_custom');
@ -314,7 +315,8 @@
ref: {
id: id
},
context: context
context: context,
jsonObj: jsonObj
});
} else if (action.listView) {
cloudStack.dialog.listView({