#472 remove the highlighting part when user clicks on 'Commits' or 'Diff', in viewing a PR
Closed 8 years ago by pingou. Opened 8 years ago by tenstormavi.
tenstormavi/pagure development  into  master

@@ -214,7 +214,7 @@ 

  <div class="commit_list" id="commit_list">

    <table>

        {% for commit in diff_commits %}

-       <tr>

+       <tr class="highlight_commit" id="highlight_commit">

          <td class="commitid">{{ commit.oid.hex|short }}</td>

          <td>

            {% if pull_request and pull_request.status and pull_request.project_from.is_fork %}
@@ -241,7 +241,7 @@ 

            {{ commit.commit_time|humanize }}</td>

        </tr>

        {% else %}

-       <tr><td class="error"> No commits found </td></tr>

+       <tr class="highlight_commit" id="highlight_commit"><td class="error"> No commits found </td></tr>

        {% endfor %}

    </table>

  </div>
@@ -256,7 +256,7 @@ 

  {% if diff %}

  {% for patch in diff %}

  <section class="commit_diff">

- <header>

+ <header class="highlight_diff" id="highlight_diff">

      <h3>

          {%- if patch.new_file_path == patch.old_file_path -%}

          {{ patch.new_file_path }}
@@ -518,14 +518,20 @@ 

  

    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 ) {

-       $( _hash ).css(

+     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%)"

        );

      };

no initial comment

idea: if we check the content of the hash before setting the highlight, could we solve our problem this way?

Here also we are checking the hash content before highlighting and according to that, the code table and commit messages are getting highlighted.

the code table and commit messages are getting highlighted.

Which is also the current behavior and what we do not want :)

Hi there,

Is there anything I can do to help? :)

If so, please let me know :)

Hello

Sorry for not working from last few days as i had my sister's marriage and I returned college today only. Now i have my semester exams from 4th December so can i resume the work after my exams?

This actually got fixed during the work on the new UI.

Metadata