couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [01/13] git commit: updated refs/heads/master to a9c390e
Date Thu, 08 Aug 2013 13:26:09 GMT
Updated Branches:
  refs/heads/master 365f7b950 -> a9c390e43


Fauxton:
Spin.js added. Removed loader from the main container
Added Spin.js opts
Css fixes, Active state, nav icon set up for active tasks
More active task cleanup
Burger time
Active task clean up function


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

Branch: refs/heads/master
Commit: 508f1aa45146efbd53e567d19b87d01f2d33905d
Parents: 23a87ba
Author: suelockwood <deathbearbrown@gmail.com>
Authored: Tue Jul 30 16:09:49 2013 -0400
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Thu Aug 8 15:21:26 2013 +0200

----------------------------------------------------------------------
 .../activetasks/assets/less/activetasks.less    |  4 +-
 src/fauxton/app/addons/activetasks/base.js      |  2 +-
 src/fauxton/app/addons/activetasks/routes.js    |  5 ++-
 .../app/addons/activetasks/templates/tabs.html  | 46 ++++++++++++++------
 src/fauxton/app/addons/activetasks/views.js     |  5 +++
 src/fauxton/app/api.js                          | 36 +++++++++++----
 src/fauxton/app/config.js                       |  1 +
 src/fauxton/app/templates/fauxton/nav_bar.html  | 10 ++++-
 src/fauxton/assets/js/libs/spin.min.js          |  1 +
 src/fauxton/assets/less/fauxton.less            |  9 +++-
 10 files changed, 90 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/assets/less/activetasks.less b/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
index 5cb9d47..5ba394f 100644
--- a/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
+++ b/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
@@ -1,4 +1,6 @@
 .task-tabs li {
   cursor: pointer;
-  padding: 5px 0;
+}
+table.active-tasks{
+	font-size: 12px;
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/addons/activetasks/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/base.js b/src/fauxton/app/addons/activetasks/base.js
index c7b8fb0..647add0 100644
--- a/src/fauxton/app/addons/activetasks/base.js
+++ b/src/fauxton/app/addons/activetasks/base.js
@@ -19,7 +19,7 @@ define([
 function (app, FauxtonAPI, Activetasks) {
 
   Activetasks.initialize = function() {
-    FauxtonAPI.addHeaderLink({title: "Active Tasks", href: "#/activetasks"});
+    FauxtonAPI.addHeaderLink({title: "Active Tasks", icon: "fonticon-activetasks", href:
"#/activetasks"});
   };
  
   return Activetasks;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/addons/activetasks/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/routes.js b/src/fauxton/app/addons/activetasks/routes.js
index 027beee..46041eb 100644
--- a/src/fauxton/app/addons/activetasks/routes.js
+++ b/src/fauxton/app/addons/activetasks/routes.js
@@ -25,7 +25,10 @@ function (app, FauxtonAPI, Activetasks, Views) {
       "activetasks/:id": "defaultView",
       "activetasks": "defaultView"
     },
-    crumbs: [],
+    selectedHeader: 'Active Tasks',
+    crumbs: [
+    {"name": "Active tasks", "link": "activetasks"}
+    ],
     apiUrl: function(){
       return app.host+"/_active_tasks";
     }, 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/addons/activetasks/templates/tabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/templates/tabs.html b/src/fauxton/app/addons/activetasks/templates/tabs.html
index 47c5843..5869748 100644
--- a/src/fauxton/app/addons/activetasks/templates/tabs.html
+++ b/src/fauxton/app/addons/activetasks/templates/tabs.html
@@ -12,17 +12,35 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<h3>Filter by: </h3>
-<ul class="task-tabs nav nav-tabs nav-stacked">
-  <% for (var filter in filters) { %>
-      <li data-type="<%=filter%>"><%=filters[filter]%></li>
-  <% } %>
-</ul>
-
-<h4>Polling interval</h4>
-<input id="pollingRange" type="range"
-       min="1"
-       max="30"
-       step="1"
-       value="5"/>
-<label for="pollingRange"><span>5</span> second(s)</label>
+
+
+
+
+<div id="sidenav">
+  <header class="row-fluid">
+    <h3>Filter by: </h3>
+  </header>
+
+  <nav>
+		<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>
+  </nav>
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/views.js b/src/fauxton/app/addons/activetasks/views.js
index f38aea2..7305367 100644
--- a/src/fauxton/app/addons/activetasks/views.js
+++ b/src/fauxton/app/addons/activetasks/views.js
@@ -87,10 +87,15 @@ function (app, FauxtonAPI, activetasks) {
 		},
 		setPolling: function(){
 			var that = this;
+			clearInterval(pollingInfo.intervalId);
 			pollingInfo.intervalId = setInterval(function() {
+				console.log('hit me once');
 				that.establish();
 			}, pollingInfo.rate*1000);
 		},
+		cleanup: function(){
+			clearInterval(pollingInfo.intervalId);
+		},
 		afterRender: function(){
 			this.listenTo(this.model, "change", this.showData);
 			Events.bind('update:poll', this.setPolling, this);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index a57c68b..f441bbf 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -14,7 +14,8 @@ define([
        "app",
 
        // Modules
-       "modules/fauxton/base"
+       "modules/fauxton/base",
+       "spin"
 ],
 
 function(app, Fauxton) {
@@ -265,9 +266,9 @@ function(app, Fauxton) {
       }
 
       //add page loader. "app-container" shouldn't be overwritten. Even if a new index.underscore
is provided in settings.json
-      if (!this.disableLoader) {
-        $('#app-container').addClass(this.loaderClassname);
-      }
+      // if (!this.disableLoader) {
+      //   $('#app-container').addClass(this.loaderClassname);
+      // }
 
       masterLayout.clearBreadcrumbs();
       var crumbs = this.get('crumbs');
@@ -279,16 +280,33 @@ function(app, Fauxton) {
       }
 
       FauxtonAPI.when(this.establish()).done(function(resp) {
-        if (!this.disableLoader) {
-          $('#app-container').removeClass(this.loaderClassname);
-        }
+        // if (!this.disableLoader) {
+        //   $('#app-container').removeClass(this.loaderClassname);
+        // }
         _.each(routeObject.getViews(), function(view, selector) {
           if(view.hasRendered()) { return; }
-          if (!view.disableLoader){ $(selector).addClass(view.loaderClassname);}
+          if (!view.disableLoader){ 
+            var opts = {
+              lines: 16, // The number of lines to draw
+              length: 8, // The length of each line
+              width: 4, // The line thickness
+              radius: 12, // The radius of the inner circle
+              color: '#ccc', // #rbg or #rrggbb
+              speed: 1, // Rounds per second
+              trail: 10, // Afterglow percentage
+              shadow: false // Whether to render a shadow
+            };
+            $('<div class="spinner"></div>').appendTo(selector);
+            var spinner = new Spinner(opts).spin();
+            $('.spinner').append(spinner.el);
+          }
           
           FauxtonAPI.when(view.establish()).then(function(resp) {
             masterLayout.setView(selector, view);
-            if (!view.disableLoader) $(selector).removeClass(view.loaderClassname);
+            if (!view.disableLoader){
+              spinner.stop();
+                }
+            // } $(selector).removeClass(view.loaderClassname);
             masterLayout.renderView(selector);
             }, function(resp) {
             view.establishError = {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/config.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index d7d3b40..6b9ac8a 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -16,6 +16,7 @@ require.config({
     bootstrap: "../assets/js/libs/bootstrap",
     codemirror: "../assets/js/libs/codemirror",
     jshint: "../assets/js/libs/jshint",
+    spin: "../assets/js/libs/spin.min",
     d3: "../assets/js/libs/d3",
     "nv.d3": "../assets/js/libs/nv.d3"
   },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/app/templates/fauxton/nav_bar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/fauxton/nav_bar.html b/src/fauxton/app/templates/fauxton/nav_bar.html
index b8ef4ba..3733775 100644
--- a/src/fauxton/app/templates/fauxton/nav_bar.html
+++ b/src/fauxton/app/templates/fauxton/nav_bar.html
@@ -12,7 +12,15 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<a class="brand" href="#"><div class="icon">Apache Fauxton</div></a>
+<div class="brand">
+  <div class="burger">
+    <div><!-- * --></div>
+    <div><!-- * --></div>
+    <div><!-- * --></div>
+  </div>
+  <div class="icon">Apache Fauxton</div>
+</div>
+
 <nav id="main_navigation">
   <ul id="nav-links" class="nav pull-right">
     <% _.each(navLinks, function(link) { %>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/assets/js/libs/spin.min.js
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/js/libs/spin.min.js b/src/fauxton/assets/js/libs/spin.min.js
new file mode 100644
index 0000000..9e61502
--- /dev/null
+++ b/src/fauxton/assets/js/libs/spin.min.js
@@ -0,0 +1 @@
+(function(a,b,c){function O(a){H(arguments,function(b,d){a[b]===c&&(a[b]=d)});return
a}function N(a){H(arguments,function(b,c){a[m][M(a,b)||b]=c});return a}function M(a,b){var
d=a[m],f,g;if(d[b]!==c){return b}b=b.charAt(0).toUpperCase()+b.slice(1);for(g=0;g<E[e];g++){f=E[g]+b;if(d[f]!==c){return
f}}}function L(a,b){var c=[j,b,~~(a*100)].join("-"),d="{"+j+":"+a+"}",f;if(!F[c]){for(f=0;f<E[e];f++){try{K.insertRule("@"+(E[f]&&"-"+E[f].toLowerCase()+"-"||"")+"keyframes
"+c+"{0%{"+j+":1}"+b+"%"+d+"to"+d+"}",K.cssRules[e])}catch(g){}}F[c]=1}return c}function J(a,b,c){c&&!c[t]&&J(a,c),a.insertBefore(b,c||null);return
a}function I(a){var c=b.createElement(a||"div");H(arguments,function(a,b){c[a]=b});return
c}function H(a,b){var c=~~((a[e]-1)/2);for(var d=1;d<=c;d++){b(a[d*2-1],a[d*2])}}var d="width",e="length",f="radius",g="lines",h="trail",i="color",j="opacity",k="speed",l="shadow",m="style",n="height",o="left",p="top",q="px",r="childNodes",s="firstChild",t="parentNode",u="position",v="rel
 ative",w="absolute",x="animation",y="transform",z="Origin",A="Timeout",B="coord",C="#000",D=m+"Sheets",E="webkit0Moz0ms0O".split(0),F={},G;J(b.getElementsByTagName("head")[0],I(m));var
K=b[D][b[D][e]-1],P=function(a){this.opts=O(a||{},g,12,h,100,e,7,d,5,f,10,i,C,j,0.25,k,1)},Q=P.prototype={spin:function(b){var
c=this,d=c.el=c[g](c.opts);b&&J(b,N(d,o,~~(b.offsetWidth/2)+q,p,~~(b.offsetHeight/2)+q),b[s]);if(!G){var
e=c.opts,f=0,i=20/e[k],l=(1-e[j])/(i*e[h]/100),m=i/e[g];(function n(){f++;for(var b=e[g];b;b--){var
h=Math.max(1-(f+b*m)%i*l,e[j]);c[j](d,e[g]-b,h,e)}c[A]=c.el&&a["set"+A](n,50)})()}return
c},stop:function(){var b=this,d=b.el;a["clear"+A](b[A]),d&&d[t]&&d[t].removeChild(d),b.el=c;return
b}};Q[g]=function(a){function s(b,c){return N(I(),u,w,d,a[e]+a[d]+q,n,a[d]+q,"background",b,"boxShadow",c,y+z,o,y,"rotate("+~~(360/a[g]*m)+"deg)
translate("+a[f]+q+",0)","borderRadius","100em")}var b=N(I(),u,v),c=L(a[j],a[h]),m=0,r;for(;m<a[g];m++){r=N(I(),u,w,p,1+~(a[d]/2)+q,y,"translate3d(
 0,0,0)",x,c+" "+1/a[k]+"s linear infinite "+(1/a[g]/a[k]*m-1/a[k])+"s"),a[l]&&J(r,N(s(C,"0
0 4px "+C),p,2+q)),J(b,J(r,s(a[i],"0 0 1px rgba(0,0,0,.1)")))}return b},Q[j]=function(a,b,c){a[r][b][m][j]=c};var
R="behavior",S="url(#default#VML)",T="group0roundrect0fill0stroke".split(0);(function(){var
a=N(I(T[0]),R,S),b;if(!M(a,y)&&a.adj){for(b=0;b<T[e];b++){K.addRule(T[b],R+":"+S)}Q[g]=function(){function
s(c,e,l){J(k,J(N(h(),"rotation",360/a[g]*c+"deg",o,~~e),J(N(I(T[1],"arcsize",1),d,b,n,a[d],o,a[f],p,-a[d]/2,"filter",l),I(T[2],i,a[i],j,a[j]),I(T[3],j,0))))}function
h(){return N(I(T[0],B+"size",c+" "+c,B+z,-b+" "+-b),d,c,n,c)}var a=this.opts,b=a[e]+a[d],c=2*b,k=h(),m=~(a[e]+a[f]+a[d])+q,r;if(a[l]){for(r=1;r<=a[g];r++){s(r,-2,"progid:DXImage"+y+".Microsoft.Blur(pixel"+f+"=2,make"+l+"=1,"+l+j+"=.3)")}}for(r=1;r<=a[g];r++){s(r)}return
J(N(I(),"margin",m+" 0 0 "+m,u,v),k)},Q[j]=function(a,b,c,d){d=d[l]&&d[g]||0,a[s][r][b+d][s][s][j]=c}}else{G=M(a,x)}})(),a.Spinner=P})(window,document);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/508f1aa4/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 56e9036..49c939a 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -195,7 +195,7 @@ a:hover{
   }
 
   .navbar {
-    a.brand {
+    div.brand {
       .hide-text;
       .customTransition(left, 1s, 0.805, 0.005, 0.165, 0.985);
       margin: 10px 0 6px;
@@ -237,7 +237,7 @@ a:hover{
         margin: 0;
         li{
           .transition(all @transitionSpeed @transitionEaseType);
-          padding: 15px 0px 15px 60px;
+          padding: 15px 0px 15px 62px;
           font-size: 19px;
           width: @navWidth;
           font-weight: normal;
@@ -672,3 +672,8 @@ tr.all-docs-item{
 }
 
 
+div.spinner {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+}


Mime
View raw message