allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [50/50] git commit: [#5561] Fixed commit browser not working in Allura theme
Date Fri, 04 Oct 2013 16:31:18 GMT
[#5561] Fixed commit browser not working in Allura theme

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/85491581
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/85491581
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/85491581

Branch: refs/heads/cj/5561
Commit: 854915816608f4e9a85a825b9a549b5c4eb58667
Parents: 1aee610
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Fri Oct 4 16:29:50 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Fri Oct 4 16:29:50 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/jinja_master/master.html |  2 ++
 Allura/allura/templates/repo/commit.html         | 17 ++++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/85491581/Allura/allura/templates/jinja_master/master.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html
index 8060240..e297b03 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -71,9 +71,11 @@
   </head>
 
   <body{% block body_attrs %}{% endblock %} id="forge">
+    {% block body_top_js %}
     {% for blob in g.resource_manager.emit('body_top_js') %}
       {{ blob }}
     {% endfor %}
+    {% endblock %}
     {{theme_macros.header(g.login_url, '/auth/logout')}}
     {% set flash = tg.flash_obj.render('flash', use_js=False) %}
     <section id="page-body" class="{{g.document_class(neighborhood)}}">

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/85491581/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index d420d47..a43ae6e 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -36,14 +36,19 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
 </a>
 {% endblock %}
 
-{% block extra_js %}
+{% block body_top_js %}
 {{ super() }}
   <script type="text/javascript">
     var MAX_REQUESTS = 5; // max simultaneous load requests
     var WAIT_FOR = 500;   // wait for 100ms when requests queue is full and try again
     var diff_queue = [];  // queue of diffs waiting for load
     var called_count = 0; // count of running load requests
+  </script>
+{% endblock %}
 
+{% block extra_js %}
+{{ super() }}
+  <script type="text/javascript">
     function ld(diff, callback) {
       $(diff.selector).load(encodeURI(diff.url), callback);
     }
@@ -150,12 +155,10 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
                 {% else %}
                     <img src="{{g.forge_static('images/spinner.gif')}}" class="loading_icon"
alt="Loading..."/>
                     <script type="text/javascript">
-                        $(document).ready(function() {
-                          diff_queue.push({
-                            selector: '#diff-{{loop.index}}',
-                            url: '{{commit.url()}}tree/{{h.really_unicode(file)}}?barediff={{prev[0]._id
if prev else ''}}'
-                          });
-                        });
+                      diff_queue.push({
+                        selector: '#diff-{{loop.index}}',
+                        url: '{{commit.url()}}tree/{{h.really_unicode(file)}}?barediff={{prev[0]._id
if prev else ''}}'
+                      });
                     </script>
                 {% endif %}
             </div>


Mime
View raw message