You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by ad...@apache.org on 2013/12/09 02:34:10 UTC

svn commit: r1549366 - in /steve/site/trunk: content/resources/js/main.js templates/doc.html templates/skeleton.html

Author: adc
Date: Mon Dec  9 01:34:10 2013
New Revision: 1549366

URL: http://svn.apache.org/r1549366
Log:
Fix page editing.

Added:
    steve/site/trunk/content/resources/js/main.js
Modified:
    steve/site/trunk/templates/doc.html
    steve/site/trunk/templates/skeleton.html

Added: steve/site/trunk/content/resources/js/main.js
URL: http://svn.apache.org/viewvc/steve/site/trunk/content/resources/js/main.js?rev=1549366&view=auto
==============================================================================
--- steve/site/trunk/content/resources/js/main.js (added)
+++ steve/site/trunk/content/resources/js/main.js Mon Dec  9 01:34:10 2013
@@ -0,0 +1,5 @@
+$(document).ready(function() {
+    var location = escape(window.localtion.href).replace("+", "%2B").replace("/", "%2F");
+    $('fb_share_link').attr('share_url', location);
+    $('fb_share_link').attr('share_url', 'http://twitter.com/share?url=' + location + "&via=STeVe");
+}

Modified: steve/site/trunk/templates/doc.html
URL: http://svn.apache.org/viewvc/steve/site/trunk/templates/doc.html?rev=1549366&r1=1549365&r2=1549366&view=diff
==============================================================================
--- steve/site/trunk/templates/doc.html (original)
+++ steve/site/trunk/templates/doc.html Mon Dec  9 01:34:10 2013
@@ -10,7 +10,7 @@
             <a onclick="javascript:gpshare()" class="gp-share sprite" title="share on Google+">share [gp]</a>
             <a onclick="javascript:fbshare()" class="fb-share sprite" title="share on Facebook">share [fb]</a>
             <a onclick="javascript:twshare()" class="tw-share sprite" title="share on Twitter">share [tw]</a>
-            <a data-toggle="modal" href="#edit" class="edit-page" title="Contribute to this Page">contribute</a>
+            <a data-toggle="modal" data-target="#edit" href="#edit" class="edit-page" title="Contribute to this Page">contribute</a>
         </div>
     </h1>
 </div>

Modified: steve/site/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/steve/site/trunk/templates/skeleton.html?rev=1549366&r1=1549365&r2=1549366&view=diff
==============================================================================
--- steve/site/trunk/templates/skeleton.html (original)
+++ steve/site/trunk/templates/skeleton.html Mon Dec  9 01:34:10 2013
@@ -23,6 +23,8 @@
   <link rel="apple-touch-icon" sizes="72x72" href="{{base}}resources/images/apple-touch-icon-72x72.png">
   <link rel="apple-touch-icon" sizes="114x114" href="{{base}}resources/images/apple-touch-icon-114x114.png">
 
+  <script src="{{base}}resources/js/main.js"></script>
+
   <script type="text/javascript">
 
     var _gaq = _gaq || [];
@@ -41,6 +43,27 @@
     })();
 
   </script>
+
+  <script type="text/javascript">
+    function fbshare () {
+      window.open(
+          "http://www.facebook.com/sharer/sharer.php?u="+document.URL,
+          'Share on Facebook',
+          'width=640,height=426');
+    };
+    function gpshare () {
+      window.open(
+          "https://plus.google.com/share?url="+document.URL,
+          'Share on Google+',
+          'width=584,height=385');
+    };
+    function twshare () {
+      window.open(
+          "https://twitter.com/intent/tweet?url="+document.URL+"&text={{ headers.title }}",
+          'Share on Twitter',
+          'width=800,height=526');
+    };
+  </script>
 </head>
 
 <body class="steve">
@@ -91,27 +114,31 @@
 
     {% block content %}{{ content|markdown }}{% endblock %}
 
-    <div id="edit" class="modal hide fade in" style="display: none; ">
-      <div class="modal-header">
-        <a class="close" data-dismiss="modal">x</a>
+    <div id="edit" class="modal fade"  tabindex="-1" role="dialog">
+      <div class="modal-dialog">
+        <div class="modal-content">
+          <div class="modal-header">
+            <a class="close" data-dismiss="modal">x</a>
 
-        <h3>Thank you for contributing to the documention!</h3>
-      </div>
-      <div class="modal-body">
-        <h4>Any help with the documentation is greatly appreciated.</h4>
+            <h3>Thank you for contributing to the documention!</h3>
+          </div>
+          <div class="modal-body">
+            <h4>Any help with the documentation is greatly appreciated.</h4>
 
-        <p>All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)</p>
-        <small>NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.</small>
-        <!--[if gt IE 6]>
-        <h4>Internet Explorer Users</h4>
-        <p>If you are not an Apache committer, click the Yes link and enter a <i>anonymous</i> for the username and leave the password empty</p>
-        <![endif]-->
+            <p>All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)</p>
+            <small>NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.</small>
+            <!--[if gt IE 6]>
+            <h4>Internet Explorer Users</h4>
+            <p>If you are not an Apache committer, click the Yes link and enter a <i>anonymous</i> for the username and leave the password empty</p>
+            <![endif]-->
 
-      </div>
-      <div class="modal-footer">
-        Do you have an Apache ID?
-        <a href="javascript:void(location.href='https://cms.apache.org/redirect?uri='+escape(location.href))" class="btn">Yes</a>
-        <a href="javascript:void(location.href='https://anonymous:@cms.apache.org/redirect?uri='+escape(location.href))" class="btn">No</a>
+          </div>
+          <div class="modal-footer">
+            Do you have an Apache ID?
+            <a href="javascript:void(location.href='https://cms.apache.org/redirect?uri='+escape(location.href))" class="btn">Yes</a>
+            <a href="javascript:void(location.href='https://anonymous:@cms.apache.org/redirect?uri='+escape(location.href))" class="btn">No</a>
+          </div>
+        </div>
       </div>
     </div>