diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-01-02 23:13:47 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-01-05 19:21:50 +0100 |
commit | 8fe5d887ae420e95017b2b32ba2519543fd84e9c (patch) | |
tree | 821d0273876677829e309a202034c93631570050 /templates | |
parent | 4e6d048ba10981dd3443e3f9e373ee0821fe01ed (diff) | |
download | gitea-8fe5d887ae420e95017b2b32ba2519543fd84e9c.tar.gz gitea-8fe5d887ae420e95017b2b32ba2519543fd84e9c.zip |
Changed name from inline to unified
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/diff_box.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff_box_split.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/diff_box_unified.tmpl (renamed from templates/repo/diff_box_inline.tmpl) | 9 |
3 files changed, 3 insertions, 16 deletions
diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl index 179e1cb3cf..63c57a19d1 100644 --- a/templates/repo/diff_box.tmpl +++ b/templates/repo/diff_box.tmpl @@ -6,7 +6,7 @@ <i class="fa fa-retweet"></i> {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} <div class="ui right"> - <a class="ui tiny basic toggle button" href="?style={{if .Style}}inline{{else}}split{{end}}">{{ if .Style }}{{.i18n.Tr "repo.diff.show_inline_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a> + <a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a> <a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> </div> </div> @@ -33,9 +33,9 @@ </ol> </div> - {{if .Style}} + {{if .IsSplitStyle}} {{ template "repo/diff_box_split" . }} {{else}} - {{ template "repo/diff_box_inline" . }} + {{ template "repo/diff_box_unified" . }} {{end}} {{end}} diff --git a/templates/repo/diff_box_split.tmpl b/templates/repo/diff_box_split.tmpl index 0234fd1301..4187a7e72a 100644 --- a/templates/repo/diff_box_split.tmpl +++ b/templates/repo/diff_box_split.tmpl @@ -81,10 +81,6 @@ prev.children().eq(2).html($(this).children().eq(2).html()); prev.children().eq(3).addClass('add-code'); prev.children().eq(2).addClass('add-code'); -// prev.children().eq(2).attr('style', 'background-color: #eaffea !important'); -// prev.children().eq(2).children().eq(0).attr('style', 'background-color: #eaffea !important'); -// prev.children().eq(3).attr('style', 'background-color: #eaffea !important'); -// prev.children().eq(3).children().eq(0).attr('style', 'background-color: #eaffea !important'); $(this).remove(); } }); diff --git a/templates/repo/diff_box_inline.tmpl b/templates/repo/diff_box_unified.tmpl index 2dea013838..82c6ff8d66 100644 --- a/templates/repo/diff_box_inline.tmpl +++ b/templates/repo/diff_box_unified.tmpl @@ -57,15 +57,6 @@ </tbody> </table> </div> - <script> - (function() { - $('tr.del-code').each(function() { - if($(this).next().hasClass('add-code')) { - // $($(this).children()[3]).replaceWith($(this).next().children()[3]); - } - }); - }()); - </script> {{end}} {{end}} </div> |