From 63c9e15e5949ccbdb5cd83b9ef73d95470192539 Mon Sep 17 00:00:00 2001 From: Eliseo Soto Date: Wed, 7 Mar 2012 16:32:37 -0800 Subject: [PATCH] Handle the case where the script is changed and a non-Chrome browser is selected. --- .../ui/script-detail-view.reel/script-detail-view.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/control-room/ui/script-detail-view.reel/script-detail-view.js b/public/control-room/ui/script-detail-view.reel/script-detail-view.js index 5195520..6381dc1 100755 --- a/public/control-room/ui/script-detail-view.reel/script-detail-view.js +++ b/public/control-room/ui/script-detail-view.reel/script-detail-view.js @@ -11,6 +11,10 @@ var Montage = require("montage/core/core").Montage, Alert = require ("montage/ui/popup/alert.reel").Alert; exports.ScriptDetailView = Montage.create(Component, { + selectedAgent: { + value: null + }, + activeAgents: { value: null }, @@ -165,7 +169,10 @@ exports.ScriptDetailView = Montage.create(Component, { self.addEventListener("change@scriptSource", function (event) { if (self.scriptSource) { - self.recordButton.disabled = false; + // Only enable recording is the selected browser is Chrome + if (self.selectedAgent && self.selectedAgent.info.capabilities.browserName === "chrome") { + self.recordButton.disabled = false; + } self.runButton.disabled = false; self.saveButton.disabled = false; self.deleteButton.disabled = false;