Procházet zdrojové kódy

토론에도 미리보기 추가

Surplus_Up (2DU) před 6 roky
rodič
revize
a6b2d97be6
2 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 1 1
      route/edit.py
  2. 4 1
      route/topic.py

+ 1 - 1
route/edit.py

@@ -117,7 +117,7 @@ def edit_2(conn, name):
                 <form method="post">
                     <script>do_stop_exit()</script>
                     ''' + edit_button() + '''
-                    <textarea id="content" rows="25" id="content" name="content">''' + html.escape(re.sub('\n$', '', data)) + '''</textarea>
+                    <textarea rows="25" id="content" name="content">''' + html.escape(re.sub('\n$', '', data)) + '''</textarea>
                     <textarea style="display: none;" name="otent">''' + html.escape(re.sub('\n$', '', data_old)) + '''</textarea>
                     <hr class=\"main_hr\">
                     <input placeholder="''' + load_lang('why') + '''" name="send" type="text">

+ 4 - 1
route/topic.py

@@ -93,11 +93,14 @@ def topic_2(conn, name, sub):
             <a href="/topic/''' + url_pas(name) + '''/sub/''' + url_pas(sub) + '''/tool">(''' + load_lang('topic_tool') + ''')</a>
             <hr class=\"main_hr\">
             <form style="''' + display + '''" method="post">
-                <textarea style="height: 100px;" name="content"></textarea>
+                <textarea id="content" style="height: 100px;" name="content"></textarea>
                 <hr class=\"main_hr\">
                 ''' + captcha_get() + (ip_warring() if display == '' else '') + '''
                 <button type="submit">''' + load_lang('send') + '''</button>
+                <button id="preview" type="button" onclick="load_preview(\'''' + url_pas(name) + '\')">' + load_lang('preview') + '''</button>
             </form>
+            <hr class=\"main_hr\">
+            <div id="see_preview"></div>
         '''
 
         return easy_minify(flask.render_template(skin_check(),