PR#1945 Closed Change name of Preview Button when showing Preview

Proposed 7 months ago by indiabhi
Modified 7 months ago
From forks/indiabhi/pagure preview-button-fix  into pagure master
file changed

@@ -912,7 +912,8 @@ 

    $( "#preview" ).hide();

    $( "#previewinmarkdown" ).click(

      function(event, ui) {

-       if ($( "#previewinmarkdown" ).hasClass("inactive")){

+       if ($("#previewinmarkdown").hasClass("inactive")){

+         $('#previewinmarkdown').html("edit");

          var _text = $( "#comment" ).val();

          var _url = "{{ url_for('markdown_preview',

                          repo=repo.name,

@@ -944,6 +945,8 @@

          $( "#previewinmarkdown" ).removeClass("active");

          $( "#comment" ).show();

          $( "#preview" ).hide();

+         $('#previewinmarkdown').html("Preview");

+ 

        }

      }

    );

Hey @indiabhi I have been working on this bug in #1803 . For this pr although preview button is suppose to be changed at multiple locations :)

Also, if you look at the issue carefully, a label saying previewing comment must also appear before the button. Go ahead and add it :)

Edited 7 months ago by rahulbajaj

This is a duplicate of #1803 so let's close this one.

Thanks for working on it though @indiabhi :)

7 months ago

Pull-Request has been closed by pingou

Changes summary
+4 -1
file changed