community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1663794 - /comdev/reporter.apache.org/site/addrelease.html
Date Tue, 03 Mar 2015 21:15:04 GMT
Author: humbedooh
Date: Tue Mar  3 21:15:04 2015
New Revision: 1663794

URL: http://svn.apache.org/r1663794
Log:
show which versions have already been registered

Modified:
    comdev/reporter.apache.org/site/addrelease.html

Modified: comdev/reporter.apache.org/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/addrelease.html?rev=1663794&r1=1663793&r2=1663794&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/addrelease.html (original)
+++ comdev/reporter.apache.org/site/addrelease.html Tue Mar  3 21:15:04 2015
@@ -7,10 +7,10 @@
     <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>
    <title>Apache Project Report Helper: Add a release</title>
 </head>
-<body>
+<body onload='GetAsyncJSON("/releases/" + project + ".json?now=" + Math.random(), null,
listReleaseData)'>
 
 <div id="contents" class="row-12" style="text-align: center; margin: 0 auto; width: 1000px;
">
   <h2>Apache Project Report Helper: Add a release</h2>
@@ -29,11 +29,13 @@
    For inquiries, contact <a href="mailto:dev@community.apache.org">dev@community.apache.org</a>.
 </div>
     <script src="js/foundation.min.js"></script>
+    
     <script>
      var project = document.location.search.substr(1);
      document.getElementById('project').value = project;
      var date = new Date();
      var xdate = document.getElementById('xdate');
+     var done = false;
      xdate.value = date.getFullYear() + "-" + ((date.getMonth()+1) < 10? "0"+(date.getMonth()+1)
: (date.getMonth()+1)) + "-" + ((date.getDay()+1) < 10? "0"+(date.getDay()+1) : (date.getDay()+1))
      
      function validate(form) {
@@ -47,6 +49,25 @@
       }
       return true
      }
+     
+     function listReleaseData(json, a,b) {
+      if (done) {
+        return;
+      }
+      done = true
+      var obj = document.getElementById('contents')
+      var x = 0;
+      obj.innerHTML += "<h3>Already registered releases:</h3>"
+      for (version in json) {
+        obj.innerHTML += "- " + version + ": " + new Date(json[version]*1000).toDateString()
+ "<br/>"
+        x++;
+      }
+      if (x == 0) {
+        obj.innerHTML += "No releases registered yet"
+      }
+      document.getElementById('project').value = project;
+     }
+     
     </script>
 </body>
 <html>



Mime
View raw message