mirror of https://github.com/apache/cloudstack.git
new UI - fix a bug that disable multiple selection was not working.
This commit is contained in:
parent
3f538e3c5a
commit
15e4366c9e
|
|
@ -51,7 +51,7 @@ $(document).ready(function() {
|
|||
});
|
||||
$("#leftmenu_account").bind("click", function(event) {
|
||||
selectLeftMenu($(this));
|
||||
listMidMenuItems("listAccounts", "listaccountsresponse", "account", "jsp/account.jsp", afterLoadAccountJSP, accountToMidmenu, accountToRigntPanel, getMidmenuId);
|
||||
listMidMenuItems("listAccounts", "listaccountsresponse", "account", "jsp/account.jsp", afterLoadAccountJSP, accountToMidmenu, accountToRigntPanel, getMidmenuId, false);
|
||||
return false;
|
||||
});
|
||||
$("#leftmenu_events").bind("click", function(event) {
|
||||
|
|
@ -82,13 +82,14 @@ $(document).ready(function() {
|
|||
|
||||
bindAndListMidMenuItems($("#leftmenu_service_offering"), "listServiceOfferings", "listserviceofferingsresponse", "serviceoffering", "jsp/serviceoffering.jsp", afterLoadServiceOfferingJSP, serviceOfferingToMidmenu, serviceOfferingToRigntPanel, getMidmenuId, false);
|
||||
bindAndListMidMenuItems($("#leftmenu_disk_offering"), "listDiskOfferings", "listdiskofferingsresponse", "diskoffering", "jsp/diskoffering.jsp", afterLoadDiskOfferingJSP, diskOfferingToMidmenu, diskOfferingToRigntPanel, getMidmenuId, false);
|
||||
bindAndListMidMenuItems($("#leftmenu_global_setting"), "listConfigurations", "listconfigurationsresponse", "configuration", "jsp/globalsetting.jsp", afterLoadGlobalSettingJSP, globalSettingToMidmenu, globalSettingToRigntPanel, globalSettingGetMidmenuId, getMidmenuId, false);
|
||||
bindAndListMidMenuItems($("#leftmenu_global_setting"), "listConfigurations", "listconfigurationsresponse", "configuration", "jsp/globalsetting.jsp", afterLoadGlobalSettingJSP, globalSettingToMidmenu, globalSettingToRigntPanel, globalSettingGetMidmenuId, false);
|
||||
|
||||
$("#leftmenu_instances").bind("click", function(event) {
|
||||
selectLeftMenu($(this), true);
|
||||
instanceBuildSubMenu();
|
||||
return false;
|
||||
});
|
||||
/*
|
||||
$("#leftmenu_instance_group_header").bind("click", function(event) {
|
||||
showMiddleMenu();
|
||||
clearMiddleMenu();
|
||||
|
|
@ -97,6 +98,7 @@ $(document).ready(function() {
|
|||
clickInstanceGroupHeader($arrowIcon);
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
|
||||
$("#leftmenu_domain").bind("click", function(event) {
|
||||
selectLeftMenu($(this), true);
|
||||
|
|
|
|||
|
|
@ -766,7 +766,12 @@ function getMidmenuId(jsonObj) {
|
|||
return "midmenuItem_" + jsonObj.id;
|
||||
}
|
||||
|
||||
function listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, clickFirstItem, isMultipleSelectionInMidMenu) {
|
||||
function listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, clickFirstItem) {
|
||||
if(isMultipleSelectionInMidMenu == true)
|
||||
enableMultipleSelectionInMidMenu();
|
||||
else
|
||||
disableMultipleSelectionInMidMenu();
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
data: createURL("command="+commandString+"&pagesize="+midmenuItemCount),
|
||||
|
|
@ -810,19 +815,14 @@ function listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPane
|
|||
});
|
||||
|
||||
afterLoadRightPanelJSPFn();
|
||||
listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, true, isMultipleSelectionInMidMenu);
|
||||
listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, true);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function bindAndListMidMenuItems($leftmenu, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu) {
|
||||
if(isMultipleSelectionInMidMenu == true)
|
||||
enableMultipleSelectionInMidMenu();
|
||||
else
|
||||
disableMultipleSelectionInMidMenu();
|
||||
|
||||
$leftmenu.bind("click", function(event) {
|
||||
selectLeftSubMenu($(this));
|
||||
selectLeftSubMenu($(this));
|
||||
listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu);
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -276,8 +276,8 @@ function showPage2($pageToShow, jsonObj) {
|
|||
|
||||
var podId = jsonObj.id;
|
||||
$("#midmenu_container").empty();
|
||||
listMidMenuItems2(("listHosts&type=Routing&podid="+podId), "listhostsresponse", "host", hostToMidmenu, hostToRigntPanel, hostGetMidmenuId, false);
|
||||
listMidMenuItems2(("listStoragePools&podid="+podId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRigntPanel, primarystorageGetMidmenuId, false);
|
||||
listMidMenuItems2(("listHosts&type=Routing&podid="+podId), "listhostsresponse", "host", hostToMidmenu, hostToRigntPanel, hostGetMidmenuId, false, false);
|
||||
listMidMenuItems2(("listStoragePools&podid="+podId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRigntPanel, primarystorageGetMidmenuId, false, false);
|
||||
}
|
||||
else if($pageToShow.attr("id") == "cluster_page") {
|
||||
$("#midmenu_add_link").unbind("click").hide();
|
||||
|
|
@ -288,8 +288,8 @@ function showPage2($pageToShow, jsonObj) {
|
|||
|
||||
var clusterId = jsonObj.id;
|
||||
$("#midmenu_container").empty();
|
||||
listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRigntPanel, hostGetMidmenuId, true);
|
||||
listMidMenuItems2(("listStoragePools&clusterid="+clusterId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRigntPanel, primarystorageGetMidmenuId, false);
|
||||
listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRigntPanel, hostGetMidmenuId, false, true);
|
||||
listMidMenuItems2(("listStoragePools&clusterid="+clusterId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRigntPanel, primarystorageGetMidmenuId, false, false);
|
||||
}
|
||||
else if($pageToShow.attr("id") == "host_page") {
|
||||
$("#midmenu_add_link").unbind("click").hide();
|
||||
|
|
|
|||
Loading…
Reference in New Issue