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

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

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

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

 3     $( "#previewinmarkdown" ).click(

 4       function(event, ui) {

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

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

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

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

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

10                           repo=repo.name,

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

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

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

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

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

16 + 

17         }

18       }

19     );

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 5 months ago by rahulbajaj

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

Thanks for working on it though @indiabhi :)

5 months ago

Pull-Request has been closed by pingou

Changes summary
+4 -1
file changed