From d3b5c4cddaa1227b4950c7c41ad7a428d593e2cf Mon Sep 17 00:00:00 2001 From: tenstormavi Date: Nov 05 2015 09:57:12 +0000 Subject: [PATCH 1/3] remove the highlighting part when user clicks on 'Commits' or 'Diff', in viewing a PR --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index f31ac29..c049540 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -523,12 +523,6 @@ "background", "linear-gradient(to bottom, #ededed 0%, #fff 100%)" ); }; - cur_hash = _hash; - if ( _hash ) { - $( _hash ).css( - "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" - ); - }; return false; }; From 3c13a4abb70b47f2d9540fa313abbea00b2cf4a5 Mon Sep 17 00:00:00 2001 From: tenstormavi Date: Nov 05 2015 09:57:12 +0000 Subject: [PATCH 2/3] remove the highlighting part when user clicks on 'Commits' or 'Diff', in viewing a PR --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index c049540..17f2c3d 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -214,7 +214,7 @@
{% for commit in diff_commits %} - + {% else %} - + {% endfor %}
{{ commit.oid.hex|short }} {% if pull_request and pull_request.status and pull_request.project_from.is_fork %} @@ -241,7 +241,7 @@ {{ commit.commit_time|humanize }}
No commits found
No commits found
@@ -256,7 +256,7 @@ {% if diff %} {% for patch in diff %}
-
+

{%- if patch.new_file_path == patch.old_file_path -%} {{ patch.new_file_path }} @@ -518,11 +518,23 @@ highlight_comment = function() { var _hash = window.location.hash; + var _hash_dup = window.location.hash.substring(1); if (_hash != cur_hash) { $( cur_hash ).css( "background", "linear-gradient(to bottom, #ededed 0%, #fff 100%)" ); }; + cur_hash = _hash; + if ( _hash_dup == "request_diff" ) { + $( #highlight_diff ).css( + "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" + ); + }; + if ( _hash_dup == "commit_list" ) { + $( #highlight_commit ).css( + "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" + ); + }; return false; }; From f7ac4ef0fc3f241c03fb81bdaeb53a7225d0afcf Mon Sep 17 00:00:00 2001 From: tenstormavi Date: Nov 05 2015 09:57:12 +0000 Subject: [PATCH 3/3] remove the highlighting part when user clicks on 'Commits' or 'Diff', in viewing a PR --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 17f2c3d..7492d9e 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -525,12 +525,12 @@ ); }; cur_hash = _hash; - if ( _hash_dup == "request_diff" ) { + if ( _hash_dup == 'request_diff' ) { $( #highlight_diff ).css( "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" ); }; - if ( _hash_dup == "commit_list" ) { + if ( _hash_dup == 'commit_list' ) { $( #highlight_commit ).css( "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" );