mirror of https://github.com/apache/cloudstack.git
nwe UI - use shared function getMidmenuId() to get element id
This commit is contained in:
parent
887d179ec6
commit
7313803188
|
|
@ -9,7 +9,7 @@ function afterLoadAccountJSP() {
|
|||
}
|
||||
|
||||
function accountToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ function afterLoadAlertJSP() {
|
|||
}
|
||||
|
||||
function alertToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function afterLoadDiskOfferingJSP() {
|
|||
}
|
||||
|
||||
function diskOfferingToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
//var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ function afterLoadEventJSP() {
|
|||
}
|
||||
|
||||
function eventToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
|
|
@ -1233,23 +1233,14 @@ function doDisableHA($actionLink, selectedItemsInMidMenu) {
|
|||
|
||||
function vmToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
|
||||
var vmName = getVmName(jsonObj.name, jsonObj.displayname);
|
||||
$midmenuItem1.find("#first_row").text(vmName);
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.ipaddress);
|
||||
updateStateInMidMenu(jsonObj, $midmenuItem1);
|
||||
|
||||
$midmenuItem1.data("toRightPanelFn", vmToRightPanel);
|
||||
/*
|
||||
$midmenuItem1.bind("click", function(event) {
|
||||
var $t = $(this);
|
||||
$t.find("#content").addClass("selected");
|
||||
var toRightPanelFn = $t.data("toRightPanelFn");
|
||||
toRightPanelFn($t);
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
$midmenuItem1.data("toRightPanelFn", vmToRightPanel);
|
||||
}
|
||||
|
||||
function vmToRightPanel($midmenuItem) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ function afterLoadRouterJSP() {
|
|||
}
|
||||
|
||||
function routerToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25));
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ function afterLoadServiceOfferingJSP() {
|
|||
}
|
||||
|
||||
function serviceOfferingToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
//var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ function afterLoadSnapshotJSP() {
|
|||
}
|
||||
|
||||
function snapshotToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ function volumeAfterDetailsTabAction(json, id, midmenuItemId) {
|
|||
}
|
||||
|
||||
function volumeToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.attr("id", getMidmenuId(jsonObj));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
|
|
|
|||
Loading…
Reference in New Issue