From 4dd6c8e4b17a65c7df48d8afbcd1a50f06e9dd70 Mon Sep 17 00:00:00 2001 From: Abhishek Rai Date: Feb 18 2017 11:25:54 +0000 Subject: Change name of Preview Button when showing Preview --- diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index 3836e49..b05d671 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -912,7 +912,8 @@ $( document ).ready(function() { $( "#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 @@ $( document ).ready(function() { $( "#previewinmarkdown" ).removeClass("active"); $( "#comment" ).show(); $( "#preview" ).hide(); + $('#previewinmarkdown').html("Preview"); + } } );