From: Calin Crisan Date: Sun, 19 Jul 2015 12:53:14 +0000 (+0300) Subject: add camera dialog: clear the camera select box each time the camera type X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=9e00806f6da1b180eaee77250299273edb12b0a4;p=motioneye-debian add camera dialog: clear the camera select box each time the camera type is changed --- diff --git a/static/js/main.js b/static/js/main.js index 656951f..beabd44 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -2859,8 +2859,6 @@ function runAddCameraDialog() { return; } - addCameraSelect.html(''); - if (data.error || !data.cameras) { return; } @@ -2878,12 +2876,16 @@ function runAddCameraDialog() { }); } + typeSelect.change(function () { + addCameraSelect.html(''); + }); + typeSelect.change(updateUi); urlEntry.change(updateUi); usernameEntry.change(updateUi); passwordEntry.change(updateUi); updateUi(); - + runModalDialog({ title: 'Add Camera...', closeButton: true,