Commit c82f4317 by Barnabás Czémán

fix jquery errors

parent 9f296bee
...@@ -144,13 +144,13 @@ $(function() { ...@@ -144,13 +144,13 @@ $(function() {
if(data.connect_uri) { if(data.connect_uri) {
$("#dashboard-vm-details-connect-button").removeClass('disabled'); $("#dashboard-vm-details-connect-button").removeClass('disabled');
} }
$("[data-target=#_console]").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled"); $("[data-target='#_console']").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled");
$("#getScreenshotButton").prop("disabled", false); $("#getScreenshotButton").prop("disabled", false);
} else { } else {
if(data.connect_uri) { if(data.connect_uri) {
$("#dashboard-vm-details-connect-button").addClass('disabled'); $("#dashboard-vm-details-connect-button").addClass('disabled');
} }
$("[data-target=#_console]").attr("data-toggle", "_pill").attr("href", "#").parent("li").addClass("disabled"); $("[data-target='#_console]'").attr("data-toggle", "_pill").attr("href", "#").parent("li").addClass("disabled");
$("#getScreenshotButton").prop("disabled", true); $("#getScreenshotButton").prop("disabled", true);
} }
...@@ -237,4 +237,3 @@ String.prototype.hashCode = function() { ...@@ -237,4 +237,3 @@ String.prototype.hashCode = function() {
} }
return hash; return hash;
}; };
...@@ -193,7 +193,7 @@ $(function() { ...@@ -193,7 +193,7 @@ $(function() {
// note: this should not work if the image is cached, but it's not // note: this should not work if the image is cached, but it's not
// see: http://stackoverflow.com/a/3877079/1112653 // see: http://stackoverflow.com/a/3877079/1112653
// note #2: it actually gets cached, so a random number is appended // note #2: it actually gets cached, so a random number is appended
$("#vm-console-screenshot img").load(function(e) { $("#vm-console-screenshot img").on('load', function(e) {
$("#getScreenshotButton").prop("disabled", false) $("#getScreenshotButton").prop("disabled", false)
.find("i").removeClass("fa-spinner fa-spin"); .find("i").removeClass("fa-spinner fa-spin");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment