diff --git a/web/app/assets/javascripts/dialog/banner.js b/web/app/assets/javascripts/dialog/banner.js index 2c777c0f0..431152e2d 100644 --- a/web/app/assets/javascripts/dialog/banner.js +++ b/web/app/assets/javascripts/dialog/banner.js @@ -110,7 +110,8 @@ } if(options.type == "yes_no") { - $yesBtn.show().unbind('click').click(function() { + var yesText = options.yes_text || 'YES' + $yesBtn.text(yesText).show().unbind('click').click(function() { if(options.yes) { options.yes(); } diff --git a/web/app/assets/javascripts/react-components/stores/WebcamViewer.js.jsx.coffee b/web/app/assets/javascripts/react-components/stores/WebcamViewer.js.jsx.coffee index 675eac076..ed02057cb 100644 --- a/web/app/assets/javascripts/react-components/stores/WebcamViewer.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/stores/WebcamViewer.js.jsx.coffee @@ -345,7 +345,15 @@ mixins.push(Reflux.listenTo(VideoStore, 'onVideoStateChanged')) $root = $(@getDOMNode()) $select = $root.find('.webcam-select-container select') if Object.keys(@state.deviceNames).length == 0 - VideoActions.testVideo() + + context.JK.Banner.showYesNo({ + yes_text: 'RUN TEST', + title: "Run Video Test?", + html: "A video window will show up with changing colors and shapes for 10 seconds. The test was successful if you were able to see the changing colors. Close the window once the colors and shapes stop changing.", + yes: => + VideoActions.testVideo() + }) + else device = $select.val() #VideoActions.selectDevice(device, {})