mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Feature #3748: VM network panel saves the state on refresh
This commit is contained in:
parent
874436b556
commit
ca5987271f
@ -41,6 +41,8 @@ define(function(require) {
|
||||
Panel.prototype.html = _html;
|
||||
Panel.prototype.setup = _setup;
|
||||
Panel.prototype.onShow = _onShow;
|
||||
Panel.prototype.getState = _getState;
|
||||
Panel.prototype.setState = _setState;
|
||||
|
||||
return Panel;
|
||||
|
||||
@ -410,4 +412,24 @@ define(function(require) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _getState(context) {
|
||||
var state = {
|
||||
openNicsDetails : []
|
||||
};
|
||||
|
||||
$.each($("#tab_network_form .nics_table .fa-chevron-up", context), function(){
|
||||
state.openNicsDetails.push($(this).closest("tr").attr("nic_id"));
|
||||
});
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
function _setState(state, context) {
|
||||
var that = this;
|
||||
|
||||
$.each(state["openNicsDetails"], function(){
|
||||
$('#tab_network_form .nics_table tr[nic_id="'+this+'"] td.open-control', context).click();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user