From 47b46b44460a8f9f6384bd43da276ae4eb95a935 Mon Sep 17 00:00:00 2001 From: Kálmán Viktor Date: Wed, 19 Feb 2014 11:05:31 +0100 Subject: [PATCH] dashboard: fix console in vm details --- circle/dashboard/static/dashboard/vm-details.js | 4 ++-- circle/dashboard/templates/dashboard/vm-detail.html | 2 +- circle/dashboard/templates/dashboard/vm-detail/console.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/circle/dashboard/static/dashboard/vm-details.js b/circle/dashboard/static/dashboard/vm-details.js index 97f3349..9a500fd 100644 --- a/circle/dashboard/static/dashboard/vm-details.js +++ b/circle/dashboard/static/dashboard/vm-details.js @@ -202,9 +202,9 @@ function checkNewActivity(only_state, runs) { $("#vm-details-state").html(data['state']); if(data['state'] == "RUNNING") { - $("[data-target=#_console]").attr("data-toggle", "pill").parent("li").removeClass("disabled"); + $("[data-target=#_console]").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled"); } else { - $("[data-target=#_console]").attr("data-toggle", "_pill").parent("li").addClass("disabled"); + $("[data-target=#_console]").attr("data-toggle", "_pill").attr("href", "#").parent("li").addClass("disabled"); } if(decideActivityRefresh()) { diff --git a/circle/dashboard/templates/dashboard/vm-detail.html b/circle/dashboard/templates/dashboard/vm-detail.html index 8ecfd24..1f25834 100644 --- a/circle/dashboard/templates/dashboard/vm-detail.html +++ b/circle/dashboard/templates/dashboard/vm-detail.html @@ -103,7 +103,7 @@ {% trans "Resources" %}
  • - +
    {% trans "Console" %}
  • diff --git a/circle/dashboard/templates/dashboard/vm-detail/console.html b/circle/dashboard/templates/dashboard/vm-detail/console.html index e1cb44c..2a9e9af 100644 --- a/circle/dashboard/templates/dashboard/vm-detail/console.html +++ b/circle/dashboard/templates/dashboard/vm-detail/console.html @@ -49,7 +49,7 @@ } return false;}); - $('a[href$="console"]').click(function() { + $("body").on("click", 'a[href$="console"]', function() { var host, port, password, path; $("#vm-info-pane").hide(); -- libgit2 0.26.0