From cb5374e293c8be8c958a3f96ea408c7e46b32ff5 Mon Sep 17 00:00:00 2001 From: Lucas Dohmen Date: Fri, 12 Dec 2014 23:37:17 +0100 Subject: [PATCH] Disable open button when there's nothing to open --- .../aardvark/frontend/js/templates/applicationDetailView.ejs | 2 +- .../aardvark/frontend/js/views/applicationDetailView.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/frontend/js/templates/applicationDetailView.ejs b/js/apps/system/aardvark/frontend/js/templates/applicationDetailView.ejs index 8a70eff7d9..8ed6d4812f 100644 --- a/js/apps/system/aardvark/frontend/js/templates/applicationDetailView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/applicationDetailView.ejs @@ -13,7 +13,7 @@
Icon for App - +
diff --git a/js/apps/system/aardvark/frontend/js/views/applicationDetailView.js b/js/apps/system/aardvark/frontend/js/views/applicationDetailView.js index b6afc4ac88..d1b2bad19e 100644 --- a/js/apps/system/aardvark/frontend/js/views/applicationDetailView.js +++ b/js/apps/system/aardvark/frontend/js/views/applicationDetailView.js @@ -14,6 +14,11 @@ window.ApplicationDetailView = Backbone.View.extend({ render: function() { $(this.el).html(this.template.render(this.model)); + + $.get(this.appUrl()).success(function () { + $('.open', this.el).prop('disabled', false); + }, this); + return $(this.el); },