1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

modified markdown file view for ie8

This commit is contained in:
llj
2012-08-03 17:41:24 +08:00
parent d1a37121de
commit 8f0e431dc2

View File

@@ -183,12 +183,12 @@
{% endif %} {% endif %}
{% if filetype == 'Markdown' %} {% if filetype == 'Markdown' %}
$.ajax({ $.ajax({
url: '{{ raw_path }}', url: url,
dataType: 'text', dataType: 'json',
cache: false, cache: false,
success: function(data) { success: function(data) {
var converter = new Showdown.converter(); var converter = new Showdown.converter();
$('#file-view').html('<div id="md-view">' + converter.makeHtml(data) + '</div>'); $('#file-view').html('<div id="md-view">' + converter.makeHtml(data['content']) + '</div>');
$('#md-view').children(':first').css('margin-top', '0'); $('#md-view').children(':first').css('margin-top', '0');
} }
}); });