mirror of https://github.com/apache/cloudstack.git
new UI - Instance page - actions - pop up an alert if user click action but no VM is selected in middle menu.
This commit is contained in:
parent
1ecfdae8f0
commit
983f5c5609
|
|
@ -578,7 +578,7 @@ long milliseconds = new Date().getTime();
|
|||
</div>
|
||||
|
||||
<!-- Dialogs 2 -->
|
||||
<div id="dialog_info_please_select_one_item_in_middle_menu" title="Info" style="display:none">
|
||||
<div id="dialog_info_please_select_one_item_in_middle_menu" title="Alert" style="display:none">
|
||||
<p>
|
||||
<%=t.t("please.select.at.least.one.item.in.middle.menu")%>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -932,11 +932,7 @@ function doChangeService($t, selectedItemsInMidMenu, vmListAPIMap) {
|
|||
}
|
||||
|
||||
var apiText;
|
||||
if(itemCounts == 0) {
|
||||
$("#dialog_info_please_select_one_item_in_middle_menu").dialog("open");
|
||||
return;
|
||||
}
|
||||
else if(itemCounts == 1){
|
||||
if(itemCounts == 1){
|
||||
var firstItemId;
|
||||
for(var id in selectedItemsInMidMenu) {
|
||||
firstItemId = id;
|
||||
|
|
|
|||
|
|
@ -205,6 +205,16 @@ function buildActionLinkForMidMenu(label, actionMap, $actionMenu, listAPIMap) {
|
|||
$link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn);
|
||||
$link.bind("click", function(event) {
|
||||
$actionMenu.hide();
|
||||
|
||||
var itemCounts = 0;
|
||||
for(var id in selectedItemsInMidMenu) {
|
||||
itemCounts ++;
|
||||
}
|
||||
if(itemCounts == 0) {
|
||||
$("#dialog_info_please_select_one_item_in_middle_menu").dialog("open");
|
||||
return;
|
||||
}
|
||||
|
||||
var $actionLink = $(this);
|
||||
var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn");
|
||||
if(dialogBeforeActionFn == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue