You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2014/11/27 11:20:36 UTC

svn commit: r1642073 - in /jena/site/trunk: content/js/improve.js templates/skeleton.html

Author: rvesse
Date: Thu Nov 27 10:20:36 2014
New Revision: 1642073

URL: http://svn.apache.org/r1642073
Log:
Encapsulate Improve this Page functionality in Javascript (JENA-819)

Added:
    jena/site/trunk/content/js/improve.js
Modified:
    jena/site/trunk/templates/skeleton.html

Added: jena/site/trunk/content/js/improve.js
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/js/improve.js?rev=1642073&view=auto
==============================================================================
--- jena/site/trunk/content/js/improve.js (added)
+++ jena/site/trunk/content/js/improve.js Thu Nov 27 10:20:36 2014
@@ -0,0 +1,7 @@
+function improveThisPage( url ) {
+  // Inform users how to contributing
+  alert('Thanks for contributing to the Apache Jena website, please use the username anonymous and leave the password blank if prompted for credentials';);
+
+  // Redirect to the CMS
+  location.href = 'https://cms.apache.org/redirect?action=edit;uri=' + escape(url)
+}
\ No newline at end of file

Modified: jena/site/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/jena/site/trunk/templates/skeleton.html?rev=1642073&r1=1642072&r2=1642073&view=diff
==============================================================================
--- jena/site/trunk/templates/skeleton.html (original)
+++ jena/site/trunk/templates/skeleton.html Thu Nov 27 10:20:36 2014
@@ -33,6 +33,8 @@
   <script src="/js/bootstrap.min.js" type="text/javascript"></script>
   <script src="/js/breadcrumbs.js" type="text/javascript"></script>
 
+  <script src="/js/improve.js" type="text/javascript"></script>
+
   
   <!-- Uncomment to enable code coloring <link href="/css/codehilite.css" rel="stylesheet" type="text/css"> -->
 
@@ -129,7 +131,7 @@
                 </ul>
               </li>
 
-              <li id="edit"><a href="javascript:void(alert('Thanks for contributing to the Apache Jena website, please use the username anonymous and leave the password blank if prompted for credentials';);location.href='https://cms.apache.org/redirect?action=edit;uri='+escape(location.href));" title="Improve this Page (Use username anonymous and empty password)"><span class="glyphicon glyphicon-pencil"></span> Improve this Page</a></li>   
+              <li id="edit"><a href="javascript:void(improveThisPage(location.href));" title="Improve this Page (Use username anonymous and empty password)"><span class="glyphicon glyphicon-pencil"></span> Improve this Page</a></li>   
     </ul>
   </div>
 </div>