mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
parent
af24ab2b23
commit
141b203178
@ -44,7 +44,7 @@ define(function(require) {
|
||||
} else {
|
||||
action = OpenNebulaHelper.action(method);
|
||||
request = OpenNebulaHelper.request(resource, method, id);
|
||||
};
|
||||
}
|
||||
|
||||
var reqPath = path ? path : resource.toLowerCase();
|
||||
var cache_name = params.cache_name ? params.cache_name : resource;
|
||||
|
@ -608,7 +608,10 @@ define(function(require) {
|
||||
|
||||
// Button to return to the list view from the detailed view
|
||||
$(document).on("click", "button[href='back']", function(e) {
|
||||
window.history.back();
|
||||
if(window.sunstoneNoMultipleRedirects){
|
||||
window.history.back();
|
||||
window.sunstoneNoMultipleRedirects = false;
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
};
|
||||
@ -1263,20 +1266,22 @@ define(function(require) {
|
||||
|
||||
var _setupNavigoRoutes = function() {
|
||||
router = new Navigo(null, true);
|
||||
|
||||
for (var tabName in SunstoneCfg["tabs"]) {
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/form"), function(){
|
||||
if(_getTab() == undefined){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
// This will happen if the user opens sunstone directly in a /form url
|
||||
_showTab(this);
|
||||
}
|
||||
}.bind(tabName));
|
||||
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/(\\w+)"), function(id){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowElement(this, id);
|
||||
}.bind(tabName));
|
||||
|
||||
router.on(new RegExp("(?:#|/)"+tabName), function(){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowTab(this);
|
||||
}.bind(tabName));
|
||||
}
|
||||
|
@ -158,9 +158,11 @@ define(function(require) {
|
||||
Sunstone.hideFormPanel();
|
||||
OpenNebulaAction.clear_cache("VM");
|
||||
|
||||
Notifier.notifyCustom(Locale.tr("VM created"),
|
||||
Notifier.notifyCustom(
|
||||
Locale.tr("VM created"),
|
||||
Navigation.link(" ID: " + response, "vms-tab", response),
|
||||
false);
|
||||
false
|
||||
);
|
||||
},
|
||||
elements: function(opts) {
|
||||
return Sunstone.getDataTable(TAB_ID).elements(opts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user