From 0dc60ea71716c03fa2ebeb488e5f8f48debbf348 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 2 Jul 2021 07:18:08 +0000 Subject: [PATCH] fixed a flaw of not rendering the 'Toggle View' button properly for the .md file --- codepot/src/codepot/views/code_file.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index afe0e832..f6773ee8 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -269,6 +269,11 @@ function render_wiki_wc () function render_wiki_md () { + $("#code_toggle_wc_view_button").button().click(function() { + $("#code_diff_old_code_view").toggle(); + $("#code_diff_new_code_view").toggleClass("code_file_full_width"); + return false; + }); showdown_render_wiki ( "code_file_wiki_text", "code_diff_new_code_view",