#1945 Change name of Preview Button when showing Preview
Closed 7 years ago by pingou. Opened 7 years ago by indiabhi.
indiabhi/pagure preview-button-fix  into  master

file modified
+4 -1
@@ -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");

+ 

        }

      }

    );

no initial comment

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

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

Thanks for working on it though @indiabhi :)

Pull-Request has been closed by pingou

7 years ago