couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/9] fauxton commit: updated refs/heads/port-views to 9e7453f
Date Wed, 15 Oct 2014 09:14:40 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/port-views 3bb37dcfa -> 9e7453f2e (forced update)


Polling interval field CSS update
Fixed unit test
Squashing.

Closes COUCHDB-2371


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/36bb0b61
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/36bb0b61
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/36bb0b61

Branch: refs/heads/port-views
Commit: 36bb0b619d78a988ff58948e37bd3ac6b60990b0
Parents: d339a46
Author: Benjamin Keen <ben.keen@gmail.com>
Authored: Thu Oct 9 16:52:20 2014 -0700
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Tue Oct 14 23:19:23 2014 +0200

----------------------------------------------------------------------
 .../activetasks/assets/less/activetasks.less    | 18 ++++++++++
 app/addons/activetasks/templates/tabs.html      | 37 ++++++++------------
 app/addons/activetasks/tests/viewsSpec.js       |  7 ++--
 app/addons/activetasks/views.js                 |  5 +--
 4 files changed, 36 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/36bb0b61/app/addons/activetasks/assets/less/activetasks.less
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/assets/less/activetasks.less b/app/addons/activetasks/assets/less/activetasks.less
index 0f92a77..5acc4bb 100644
--- a/app/addons/activetasks/assets/less/activetasks.less
+++ b/app/addons/activetasks/assets/less/activetasks.less
@@ -44,3 +44,21 @@
     width: 23%;
   }
 }
+
+.sidebar .polling-interval {
+  li.nav-header {
+    padding: 9px 0px 0px 9px;
+  }
+  li {
+    padding: 0px 15px 3px 9px;
+    margin-left: 0px;
+
+    input {
+      width: 100%;
+    }
+
+    label span {
+      font-weight: bold;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/36bb0b61/app/addons/activetasks/templates/tabs.html
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/templates/tabs.html b/app/addons/activetasks/templates/tabs.html
index 624c386..56f6ab2 100644
--- a/app/addons/activetasks/templates/tabs.html
+++ b/app/addons/activetasks/templates/tabs.html
@@ -12,26 +12,17 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-
-
-		<ul class="task-tabs nav nav-list">
-		  <% for (var filter in filters) { %>
-		      <li data-type="<%=filter%>">
-			      <a>
-			      		<%=filters[filter]%>
-			      </a>
-		    </li>
-		  <% } %>
-		</ul>
-		<ul class="nav nav-list views">
-			<li class="nav-header">Polling interval</li>
-			<li>
-				<input id="pollingRange" type="range"
-				       min="1"
-				       max="30"
-				       step="1"
-				       value="5"/>
-				<label for="pollingRange"><span>5</span> second(s)</label>
-			</li>
-		</ul>
-
+<ul class="task-tabs nav nav-list">
+  <% for (var filter in filters) { %>
+    <li data-type="<%=filter%>">
+      <a><%=filters[filter]%></a>
+    </li>
+  <% } %>
+</ul>
+<ul class="nav nav-list views polling-interval">
+  <li class="nav-header">Polling interval</li>
+  <li>
+    <input id="pollingRange" type="range" min="1" max="30" step="1" value="5">
+    <label for="pollingRange"><span>5</span> second(s)</label>
+  </li>
+</ul>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/36bb0b61/app/addons/activetasks/tests/viewsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/tests/viewsSpec.js b/app/addons/activetasks/tests/viewsSpec.js
index e02dfb1..1048095 100644
--- a/app/addons/activetasks/tests/viewsSpec.js
+++ b/app/addons/activetasks/tests/viewsSpec.js
@@ -40,7 +40,7 @@ define([
       it("Should set polling rate", function () {
         var $range = tabMenu.$('#pollingRange');
         $range.val(15);
-        $range.trigger('change');
+        $range.trigger('input');
 
         assert.equal(tabMenu.$('span').text(), 15);
       });
@@ -48,17 +48,16 @@ define([
       it("Should clearInterval", function () {
         var $range = tabMenu.$('#pollingRange');
         var clearIntervalMock = sinon.spy(window,'clearInterval');
-        $range.trigger('change');
+        $range.trigger('input');
 
         assert.ok(clearIntervalMock.calledOnce);
-
       });
 
       it("Should trigger update:poll event", function () {
         var spy = sinon.spy();
         Views.Events.on('update:poll', spy);
         var $range = tabMenu.$('#pollingRange');
-        $range.trigger('change');
+        $range.trigger('input');
 
         assert.ok(spy.calledOnce);
       });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/36bb0b61/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index 28efa36..2f13a21 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -30,9 +30,7 @@ function (app, FauxtonAPI, ActiveTasks) {
 
   Views.View = FauxtonAPI.View.extend({
     tagName: "table",
-
     className: "table table-bordered table-striped active-tasks",
-
     template: "addons/activetasks/templates/table",
 
     events: {
@@ -121,7 +119,7 @@ function (app, FauxtonAPI, ActiveTasks) {
 
     events: {
       "click .task-tabs li": "requestByType",
-      "change #pollingRange": "changePollInterval"
+      "input #pollingRange": "changePollInterval"
     },
 
     serialize: function () {
@@ -165,7 +163,6 @@ function (app, FauxtonAPI, ActiveTasks) {
 
   Views.TableDetail = FauxtonAPI.View.extend({
     tagName: 'tr',
-
     template: "addons/activetasks/templates/tabledetail",
 
     initialize: function(){


Mime
View raw message