community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1664068 - in /comdev/reporter.apache.org/site: index.html render.js
Date Wed, 04 Mar 2015 16:42:27 GMT
Author: humbedooh
Date: Wed Mar  4 16:42:27 2015
New Revision: 1664068

URL: http://svn.apache.org/r1664068
Log:
style change

Modified:
    comdev/reporter.apache.org/site/index.html
    comdev/reporter.apache.org/site/render.js

Modified: comdev/reporter.apache.org/site/index.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/index.html?rev=1664068&r1=1664067&r2=1664068&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/index.html (original)
+++ comdev/reporter.apache.org/site/index.html Wed Mar  4 16:42:27 2015
@@ -3,19 +3,93 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <link rel="stylesheet" href="css/foundation.css" />
+  <link rel="stylesheet" href="css/foundation.css" />    
     <script src="js/vendor/modernizr.js"></script>
    <script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="render.js"></script>
    <style type="text/css">
-    .tabs {
-      border-bottom: 1px solid #666 !important;
+    html,body {
+      background: #AAA;
+      height:100%;
+      padding:0;
+      margin:0;
+  }
+    #tabs {
+      overflow: hidden;
+      width: 100%;
+      margin: 0;
+      padding: 0;
+      list-style: none;
     }
-    .tabs .active {
-      border-left: 1px solid #666 !important;
-      border-right: 1px solid #666 !important;
-      border-top: 4px solid #369 !important;
+    
+    #tabs li {
+      float: left;
+      margin: 0 .5em 0 0;
+    }
+    
+    #tabs a {
+      position: relative;
+      background: #ddd;
+      background-image:  linear-gradient(to bottom, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93
100%);
+      padding: .7em 1.5em;
+      float: left;
+      text-decoration: none;
+      color: #444;
+      text-shadow: 0 1px 0 rgba(255,255,255,.8);
+      border-radius: 5px 0 0 0;
+      box-shadow: 0 2px 2px rgba(0,0,0,.4);
+    }
+    
+    #tabs a:hover,
+    #tabs a:hover::after,
+    #tabs a:focus,
+    #tabs a:focus::after {
+      background: linear-gradient(to bottom, #b7deed 0%,#71ceef 50%,#21b4e2 51%,#b7deed 100%);
+    }
+    
+    #tabs a:focus {
+      outline: 0;
+    }
+    
+    #tabs a::after {
+      content:'';
+      position:absolute;
+      z-index: 1;
+      top: 0;
+      right: -.5em;  
+      bottom: 0;
+      width: 1em;
+      background: #ddd;
+      background-image:  linear-gradient(to bottom, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93
100%);
+      box-shadow: 2px 2px 2px rgba(0,0,0,.4);
+      transform: skew(10deg);
+      border-radius: 0 5px 0 0;  
+    }
+    
+    #tabs #current a,
+    #tabs #current a::after, #tabs #current a::before {
+      background: linear-gradient(to bottom, #b7deed 0%,#71ceef 50%,#21b4e2 51%,#b7deed 100%);
+      z-index: 3;
+    }
+    
+    #tabcontents {
+      background: #fff;
+      padding: 2em;
+      height: 220px;
+      position: relative;
+      z-index: 2; 
+      border-radius: 0 5px 5px 5px;
+      box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, .5);
+    }
+    
+    #footer {
+      break-after: always;
+      break-before: always;
+      position:absolute;
+      bottom:20px;
+      text-align: center;
+      width: 100%;
     }
    </style>
    <title>Apache Project Report Helper</title>
@@ -32,7 +106,7 @@
       Please enable it or get a browser that supports it.
    </noscript>
 </div>
-<div id="footer">
+<div id="footer" class="footer">
    Copyright&copy; 2015, the Apache Software Foundation. Licensed under the Apache License
v/2.0<br/>
    For inquiries, contact <a href="mailto:dev@community.apache.org">dev@community.apache.org</a>.
 </div>
@@ -44,9 +118,5 @@
    });
 </script>
 <script src="js/vendor/jquery.js"></script>
-    <script src="js/foundation.min.js"></script>
-    <script>
-      $(document).foundation();
-    </script>
 </body>
 <html>

Modified: comdev/reporter.apache.org/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/render.js?rev=1664068&r1=1664067&r2=1664068&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/render.js (original)
+++ comdev/reporter.apache.org/site/render.js Wed Mar  4 16:42:27 2015
@@ -40,17 +40,6 @@ function GetAsyncJSON(theUrl, xstate, ca
     }
 }
 
-function viewPMC(xpmc) {
-    for (i in jsdata.pmcs) {
-	var pmc = jsdata.pmcs[i]
-	var charts = document.getElementById(pmc)
-	if (xpmc == pmc) {
-	    charts.style.display = "block"
-	} else {
-	    charts.style.display = "none"
-	}
-    }
-}
 
 function getWednesdays(mo, y) {
     var d = new Date();
@@ -119,7 +108,7 @@ function setReportDate(json, x) {
 }
  
 function buildPanel(pmc, title) {
-    var parent = document.getElementById(pmc);
+    var parent = document.getElementById('tab_' + pmc);
     
     var toc = document.getElementById('toc_' + pmc);
     if (!toc) {
@@ -143,7 +132,7 @@ function buildPanel(pmc, title) {
     parent.appendChild(div)
     
     var titlebox = document.createElement('div');
-    titlebox.innerHTML = "<h3 style='background: #666; color: #EEE; border: 1px solid
#66A; margin-top: 30px;'>" + title + " &nbsp; &nbsp; <small> <b>&uarr;</b>
<a href='#" + pmc + "'>Back to top</a></small></h3>"
+    titlebox.innerHTML = "<h3 style='background: #666; color: #EEE; border: 1px solid
#66A; margin-top: 30px;'>" + title + " &nbsp; &nbsp; <small> <b>&uarr;</b>
<a href='#tab_" + pmc + "'>Back to top</a></small></h3>"
     div.appendChild(titlebox);
     return div;
 }
@@ -171,25 +160,26 @@ function addLine(pmc, line) {
 function renderFrontPage(json) {
     jsdata = json
     var container = document.getElementById('contents')
-    container.innerHTML = "<h1>Apache Project Report Helper</h1>Click on a project
name to view statistics:"
+	container.style.height = "calc(100% - 200px)"
+    container.innerHTML = "<h2 style='text-align: center; margin-bottom: 10px;'>Apache
Project Report Helper</h2>Click on a project name to view statistics:"
     var top = document.createElement('div');
     container.appendChild(top)
     
     
     var panellist = document.createElement('ul');
-    panellist.style.background = "#CCCCFF"
+    panellist.style.background = "#AAA"
     panellist.style.textAlign = "center"
     panellist.style.margin = "0 auto"
-    panellist.setAttribute("class", "tabs")
-    panellist.setAttribute("id", "tab");
+	panellist.style.paddingLeft = "5px"
+    //panellist.setAttribute("class", "tabs")
+    panellist.setAttribute("id", "tabs");
     panellist.setAttribute("data-tab", "")
     panellist.setAttribute("role", "tablist")
     container.appendChild(panellist)
     
     var pcontainer = document.createElement('div');
-    pcontainer.setAttribute("class", "tabs-content");
-    pcontainer.setAttribute("id", "pcontainer")
-    pcontainer.style = "text-align: left !important; margin: 0 auto; width: 1000px; border-radius:
5px; border: 2px solid #666; height: 500px; overflow: scroll !important; overflow-y: scroll
!important; "
+    pcontainer.setAttribute("id", "tabcontents")
+    pcontainer.setAttribute("style", "text-align: left !important; margin: 0 auto; width:
1000px; border-radius: 5px; border: 2px solid #666; height: 100%; overflow: scroll !important;
overflow-y: scroll !important; ")
     container.appendChild(pcontainer)
     
     var sproject = document.location.search.substr(1);
@@ -214,12 +204,10 @@ function renderFrontPage(json) {
 	addLine(pmc, " - <font color='red'>TODO - list any issues that require board attention,
\n  or say \"there are no issues requiring board attention at this time\"</font>")
 	addLine(pmc)
     
-	var obj = document.createElement('section');
-	obj.setAttribute("role", "tabpanel")
-	obj.setAttribute("class", "content")
-	obj.style = "padding: 10px; text-align: left !important; "
+	var obj = document.createElement('div');
+	obj.setAttribute("id", "tab_" + pmc)
+	obj.style = "padding: 10px; text-align: left !important;"
 	obj.setAttribute("aria-hidden", "true")
-	obj.setAttribute('id', pmc)
 	var title = document.createElement('h2')
 	title.innerHTML =json.pdata[pmc].name ? json.pdata[pmc].name : pmc
 	obj.appendChild(title)
@@ -462,8 +450,8 @@ function renderFrontPage(json) {
 	    var btn = document.createElement('li');
 	    btn.setAttribute("id", "btn_" + pmc)
 	    btn.setAttribute("class", "tab-title")
-	    btn.setAttribute("onclick", "$('#pcontainer').animate({scrollTop: -99999}, 500)");
-	    btn.innerHTML = "<a href='#" + pmc + "'>" + pmc + "</a>"
+	    btn.setAttribute("onclick", "$('#tabcontents').animate({scrollTop: -99999}, 500)");
+	    btn.innerHTML = "<a href='#' name='tab_" + pmc + "'>" + pmc + "</a>"
 	    panellist.appendChild(btn)
 	    if (sproject && sproject == pmc) {
 		$('#btn_'+pmc).click();
@@ -488,8 +476,29 @@ function renderFrontPage(json) {
 	container.innerHTML = "You are not a member of any top level project PMC, sorry!"
     }
     
-    $(document).foundation();
-    $(document).foundation('tab', 'reflow');
+	$("#tabcontents").find("[id^='tab']").hide();
+    
+    
+    
+    $('#tabs a').click(function(e) {
+        e.preventDefault();
+        if ($(this).closest("li").attr("id") == "current"){
+         return;       
+        }
+        else{             
+          $("#tabcontents").find("[id^='tab_']").hide();
+          $("#tabs li").attr("id","");
+          $(this).parent().attr("id","current");
+          $('#' + $(this).attr('name')).fadeIn();
+        }
+    });
+	
+	var project = document.location.search.substr(1);
+	
+    if (project && project.length > 0) {
+      $("#tabcontents #tab_" + project).fadeIn();
+	  $("#tabs #btn_" + project).attr('id', 'current');
+    }
 }
 
 



Mime
View raw message