[issue #195] Added missed js. Some changes.

This commit is contained in:
George Vinogradov 2012-03-01 05:07:31 +04:00
parent bc96fcdcc3
commit fe5ad9ebf3
5 changed files with 20 additions and 4 deletions

View File

@ -16,8 +16,18 @@ $(document).ready(function() {
if ((dl2 == "block")&&(dl == "91px")) {
dropbox.slideUp("slow");
}
});
$('.data-expander').live('click', function(e) {
var $button = $(e.target);
var id = "#content-" + $button.attr('id');
var $slider = $(id);
$slider.slideToggle("slow", function(){
$button.toggleClass('expanded collapsed');
});
});
function showActivity(elem) {
$("#activity-bottom"+elem).slideToggle("slow");
var img = document.getElementById("expand" + elem).className;

View File

@ -107,6 +107,11 @@ div.activity .data-expander.expanded {
background-position: 0 2px;
}
div.activity .fulltext p {
margin: 5px;
line-height: 1.3em;
}
table.blob td.lines pre {
background-color: #ECECEC;
border-right: 1px solid #DDDDDD;

View File

@ -5,7 +5,7 @@ module CommitHelper
res = ["<table class='commit_stats'>"]
stats.files.each do |filename, adds, deletes, total|
res << "<tr>"
res << "<td><a href='##{h(filename)}'>#{h(filename)}</a></td>"
res << "<td><a href='##{h(filename)}'>#{h(filename)}</a></td>".encode_to_default
res << "<td class='diffstat'>"
res << I18n.t("layout.projects.inline_changes_count", :count => total).strip +
" (" +

View File

@ -67,6 +67,7 @@ class GitPresenters::CommitAsMessagePresenter < ApplicationPresenter
@content = (@content.present?) ? tmp + @content : tmp
@caption = @caption[0..68] + '...'
end
@content = @content.gsub("\n", "<br />").html_safe if @content
# @content = @content.gsub("\n", "<br />").html_safe if @content
@content = simple_format(@content, {}, :sanitize => true).html_safe if @content
end
end

View File

@ -1,6 +1,6 @@
en:
layout:
comments:
has_commented: "adds a note"
has_commented: "adds a note"
notifications_are: "Notifications for new comments are"
comments_header: "Comments"
comments_header: "Comments"