[60ada4]: / Allura / allura / templates / repo / log.html  Maximize  Restore  History

Download this file

87 lines (78 with data), 3.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{#-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-#}
{% extends 'allura:templates/repo/repo_master.html' %}
{% block title %}{{c.project.name}} / {{ (path and path.lstrip('/')) or c.app.config.options.mount_label }} Commit Log{% endblock %}
{% block header %}{{path or c.app.config.options.mount_label}} Commit Log{% endblock %}
{% block content %}
<br style="clear:both"/>
{% if log %}
{{c.log_widget.display(value=log, limit=limit, count=count, next_commit=next_commit, is_file=is_file)}}
{% else %}
<p><b>No (more) commits</b></p>
{% endif %}
{% endblock %}
{% block extra_css %}
{{ super() }}
<style type="text/css">
.rev.selected {
background-color: #FFFFBE;
}
</style>
{% endblock %}
{% block extra_js %}
{{ super() }}
<script>
function check_revisions(){
$("tr.rev").toggleClass("selected", false);
$("input:checked").toggleClass("selected", true);
$("input:checked").closest("tr").toggleClass("selected", true);
if ($("input:checked").length == 2){
var first_tr = $("input.revision").index($("input:checked:first"));
var last_tr = $("input.revision").index($("input:checked:last"));
$("tr.rev").slice(first_tr,last_tr).toggleClass("selected", true);
};
};
$(function() {
$(document).ready(function(){
check_revisions();
});
$(".revision").click(function(){
if ( $("input:checked").length > 2){
$("tr.selected").toggleClass("selected", false);
$("input.selected").prop("checked", false);
$("input.selected").toggleClass("selected", false);
}
$(this).closest("tr").toggleClass("selected");
$(this).toggleClass("selected");
check_revisions();
});
$(".compare_revision").click(function(){
var n = $("input:checked").length;
if (n==2){
var first_revision = $("input.selected:first").attr("url_commit");
var second_revision = $("input.selected:last").attr("revision");
var path = "{{path}}";
var diff_url = first_revision+"tree/"+path+"?diff="+second_revision;
window.location.href = diff_url;
}
else {
alert("Please select two versions to compare");
};
});
});
</script>
{% endblock %}