Commit 02f3c7eb authored by Sacred Seven's avatar Sacred Seven

Fixing email and markdown RTL

closes #1
parent 2bfeb280
...@@ -183,9 +183,6 @@ $ -> ...@@ -183,9 +183,6 @@ $ ->
$(@).closest(".diff-file").find(".notes_holder").toggle() $(@).closest(".diff-file").find(".notes_holder").toggle()
e.preventDefault() e.preventDefault()
# RTL Support in wiki pages
$('.wiki').find('*').not('li').attr('dir', 'auto');
$(document).on "click", '.js-confirm-danger', (e) -> $(document).on "click", '.js-confirm-danger', (e) ->
e.preventDefault() e.preventDefault()
btn = $(e.target) btn = $(e.target)
......
...@@ -48,7 +48,9 @@ module GitlabMarkdownHelper ...@@ -48,7 +48,9 @@ module GitlabMarkdownHelper
space_after_headers: true, space_after_headers: true,
superscript: true) superscript: true)
end end
@markdown.render(text).html_safe html_doc = Nokogiri::HTML(@markdown.render(text))
html_doc.css(':not(li)').each { |dom| dom[:dir] = :auto }
html_doc.to_html.html_safe
end end
# Return the first line of +text+, up to +max_chars+, after parsing the line # Return the first line of +text+, up to +max_chars+, after parsing the line
......
%div %div
= markdown(@note.note) = markdown(@note.note)
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
...@@ -5,11 +5,3 @@ ...@@ -5,11 +5,3 @@
%p %p
Assignee: Assignee:
%span= @issue.assignee_name %span= @issue.assignee_name
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
...@@ -10,11 +10,3 @@ ...@@ -10,11 +10,3 @@
-if @merge_request.description -if @merge_request.description
= markdown(@merge_request.description) = markdown(@merge_request.description)
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
...@@ -26,11 +26,3 @@ ...@@ -26,11 +26,3 @@
- if @compare.timeout - if @compare.timeout
%h5 Huge diff. To prevent performance issues changes are hidden %h5 Huge diff. To prevent performance issues changes are hidden
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment