From 10164ba56d1192c381305e1f48a22e01952a2270 Mon Sep 17 00:00:00 2001 From: Mikhail Korotin Date: Mon, 21 Mar 2016 13:48:43 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BE?= =?UTF-8?q?=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=B1=D1=80=D0=B0=D1=83=D0=B7=D0=B5=D1=80=D0=B0?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://yadi.sk/i/MSyq-7E1qMWSu --- lib/client/controller.js | 7 +++++++ lib/views/main.hbs | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib/client/controller.js b/lib/client/controller.js index 57a4226..c88f3dd 100644 --- a/lib/client/controller.js +++ b/lib/client/controller.js @@ -15,6 +15,7 @@ function Controller() { this._sections = new SectionList(this); this._runButton = byId('run'); this._runFailedButton = byId('runFailed'); + this._showBrowser = byId('showBrowser'); this.state = RunStates.PENDING; @@ -66,6 +67,12 @@ Controller.prototype = { byId('collapseAll').addEventListener('click', sections.collapseAll.bind(sections)); byId('expandErrors').addEventListener('click', sections.expandErrors.bind(sections)); + this._showBrowser.addEventLestener('change', function(e) { + var value = e.target.value; + byId('stylesoHideBrowsers').innerText = !value ? '' : + '.section[data-browser-id]:not([data-browser-id="' + value + '"]){display:none}'; + }); + this._runButton.addEventListener('click', function() { _this._run(); }); diff --git a/lib/views/main.hbs b/lib/views/main.hbs index 8ec95a6..b6769b6 100644 --- a/lib/views/main.hbs +++ b/lib/views/main.hbs @@ -21,6 +21,16 @@ + + {{#each suites}} {{> suite}} {{/each}} From 821f6bd3af744186200114a6c97202c6fc2eedfc Mon Sep 17 00:00:00 2001 From: Mikhail Korotin Date: Tue, 22 Mar 2016 13:11:37 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=20=D0=B2=20showBrowser=20=D0=B2=20=D1=88=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/views/main.hbs | 11 +---------- lib/views/partials/show-browser.hbs | 11 +++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 lib/views/partials/show-browser.hbs diff --git a/lib/views/main.hbs b/lib/views/main.hbs index b6769b6..40fa5c9 100644 --- a/lib/views/main.hbs +++ b/lib/views/main.hbs @@ -21,16 +21,7 @@ - - + {{> show-browser }} {{#each suites}} {{> suite}} {{/each}} diff --git a/lib/views/partials/show-browser.hbs b/lib/views/partials/show-browser.hbs new file mode 100644 index 0000000..2079719 --- /dev/null +++ b/lib/views/partials/show-browser.hbs @@ -0,0 +1,11 @@ + + From dd87da7478948bfef4bf03d0deccc11db24ecaba Mon Sep 17 00:00:00 2001 From: Mikhail Korotin Date: Tue, 22 Mar 2016 13:14:31 +0300 Subject: [PATCH 3/3] fix class name of style control --- lib/client/controller.js | 2 +- lib/views/partials/show-browser.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/controller.js b/lib/client/controller.js index c88f3dd..85944a5 100644 --- a/lib/client/controller.js +++ b/lib/client/controller.js @@ -69,7 +69,7 @@ Controller.prototype = { this._showBrowser.addEventLestener('change', function(e) { var value = e.target.value; - byId('stylesoHideBrowsers').innerText = !value ? '' : + byId('stylesToHideBrowsers').innerText = !value ? '' : '.section[data-browser-id]:not([data-browser-id="' + value + '"]){display:none}'; }); diff --git a/lib/views/partials/show-browser.hbs b/lib/views/partials/show-browser.hbs index 2079719..3e1f68d 100644 --- a/lib/views/partials/show-browser.hbs +++ b/lib/views/partials/show-browser.hbs @@ -8,4 +8,4 @@ - +