mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Feature #3748: Vnet AR panel saves the state on refresh
This commit is contained in:
parent
ca5987271f
commit
3f653edcf2
@ -47,6 +47,8 @@ define(function(require) {
|
||||
Panel.PANEL_ID = PANEL_ID;
|
||||
Panel.prototype.html = _html;
|
||||
Panel.prototype.setup = _setup;
|
||||
Panel.prototype.getState = _getState;
|
||||
Panel.prototype.setState = _setState;
|
||||
|
||||
return Panel;
|
||||
|
||||
@ -214,6 +216,23 @@ define(function(require) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function _getState(context) {
|
||||
var state = {};
|
||||
|
||||
if(this.last_selected_row_ar){
|
||||
state["ar"] = this.last_selected_row_ar.attr("ar");
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
function _setState(state, context) {
|
||||
var that = this;
|
||||
|
||||
if(state.ar){
|
||||
$('#ar_list_datatable tr[ar="'+state.ar+'"]',context).click();
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user