Revision 738a9b18 snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js | ||
---|---|---|
315 | 315 |
}, |
316 | 316 |
|
317 | 317 |
connect_to_console: function(vm) { |
318 |
// It seems that Safari allows popup windows only if the window.open |
|
319 |
// call is made within an html element click event context. |
|
320 |
// Otherwise its behaviour is based on "Block Pop-Up Windows" |
|
321 |
// setting, which when enabled no notification appears for the user. |
|
322 |
// Since there is no easy way to check for the setting value we use |
|
323 |
// async:false for the action call so that action success handler |
|
324 |
// which opens the new window is called inside the click event |
|
325 |
// context. |
|
326 |
var use_async = true; |
|
327 |
if ($.client.browser == "Safari") { |
|
328 |
use_async = false; |
|
329 |
} |
|
330 |
|
|
318 | 331 |
vm.call("console", function(console_data) { |
319 | 332 |
var url = vm.get_console_url(console_data); |
320 | 333 |
snf.util.open_window(url, "VM_" + vm.get("id") + "_CONSOLE", {}); |
321 |
})
|
|
334 |
}, undefined, {async: use_async});
|
|
322 | 335 |
} |
323 | 336 |
|
324 | 337 |
}); |
Also available in: Unified diff