diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js index 0a1d093743f..b9382542424 100644 --- a/ui/scripts/ui/widgets/listView.js +++ b/ui/scripts/ui/widgets/listView.js @@ -66,7 +66,26 @@ listViewArgs.activeSection ] = [$instanceRow.data('jsonObj')]; - if (action.custom && !action.noAdd) { + var externalLinkAction = action.externalLink; + if (externalLinkAction) { + // Show popup immediately, do not proceed through normal action process + window.open( + // URL + externalLinkAction.url({ + context: context + }), + + // Title + externalLinkAction.title({ + context: context + }), + + // Window options + 'menubar=0,resizable=0,' + + 'width=' + externalLinkAction.width + ',' + + 'height=' + externalLinkAction.height + ); + } else if (action.custom && !action.noAdd) { action.custom({ data: data, ref: options.ref, @@ -254,7 +273,8 @@ listViewArgs.activeSection ] = [$instanceRow.data('jsonObj')]; - if (!args.action.createForm && + if (!args.action.action.externalLink && + !args.action.createForm && args.action.addRow != 'true' && !action.custom && !action.uiCustom) cloudStack.dialog.confirm({ @@ -274,7 +294,26 @@ var isHeader = args.action.isHeader; var createFormContext = $.extend({}, context); - if (args.action.createForm) { + var externalLinkAction = action.externalLink; + if (externalLinkAction) { + // Show popup immediately, do not proceed through normal action process + window.open( + // URL + externalLinkAction.url({ + context: context + }), + + // Title + externalLinkAction.title({ + context: context + }), + + // Window options + 'menubar=0,resizable=0,' + + 'width=' + externalLinkAction.width + ',' + + 'height=' + externalLinkAction.height + ); + } else if (args.action.createForm) { cloudStack.dialog.createForm({ form: args.action.createForm, after: function(args) {