Browse Source

Use a more generic name for the editor.

sh4nks 9 years ago
parent
commit
85b4596974

+ 2 - 6
flaskbb/templates/forum/new_post.html

@@ -29,14 +29,9 @@
                         <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="editor-box">
                                 <div class="editor">
-                                    {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'id': 'quickreply-editor'}) }}
+                                    {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                                 </div>
                                 <div class="editor-submit">
-                                    <div class="editor-options pull-left">
-                                        <span class="label label-info">Markdown</span>
-                                        <a class="label label-success" href="#">help</a> <!-- TODO: add markdown cheat sheet -->
-                                        <a class="label label-success" href="#">emojis</a> <!-- TODO: add emoji cheat sheet -->
-                                    </div>
                                     {{ render_submit_field(form.submit, input_class="btn btn-success pull-right") }}
                                 </div>
                             </div>
@@ -45,6 +40,7 @@
                 </div>
             </div>
         </div>
+        {% include theme('editor_help.html') %}
     </form>
 </div>
 

+ 2 - 6
flaskbb/templates/forum/new_topic.html

@@ -31,14 +31,9 @@
                         <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="editor-box">
                                 <div class="editor">
-                                    {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'id': 'quickreply-editor'}) }}
+                                    {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                                 </div>
                                 <div class="editor-submit">
-                                    <div class="editor-options pull-left">
-                                        <span class="label label-info">Markdown</span>
-                                        <a class="label label-success" href="#">help</a> <!-- TODO: add markdown cheat sheet -->
-                                        <a class="label label-success" href="#">emojis</a> <!-- TODO: add emoji cheat sheet -->
-                                    </div>
                                     {{ render_submit_field(form.submit, input_class="btn btn-success pull-right") }}
                                 </div>
                             </div>
@@ -47,6 +42,7 @@
                 </div>
             </div>
         </div>
+        {% include theme('editor_help.html') %}
     </form>
 </div>
 {% endblock %}

+ 2 - 2
flaskbb/templates/forum/topic.html

@@ -152,7 +152,7 @@
             <div class="col-md-offset-2 col-sm-offset-3 col-md-10 col-sm-9 col-xs-12">
                 <div class="editor-box">
                     <div class="editor quickreply">
-                            {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'id': 'quickreply-editor'}) }}
+                            {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                     </div>
                     <div class="editor-submit">
                         {{ render_submit_field(form.submit, input_class="btn btn-success pull-right") }}
@@ -161,7 +161,7 @@
             </div>
         </div>
     </form>
-    {% include theme('markdown_help.html') %}
+    {% include theme('editor_help.html') %}
     {% endif %}
 
 </div>

+ 3 - 1
flaskbb/templates/management/category_form.html

@@ -35,11 +35,13 @@
                     <div class="col-md-12 col-sm-12 col-xs-12">
                         {{ form.hidden_tag() }}
                         {{ render_field(form.title) }}
-                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
+                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
 
                         {{ render_field(form.position) }}
                         {{ render_submit_field(form.submit, div_class="form-group col-sm-5") }}
                     </div>
+
+                    {% include theme('editor_help.html') %}
                 </form>
             </div>
         </div>

+ 3 - 1
flaskbb/templates/management/forum_form.html

@@ -35,7 +35,7 @@
                     <div class="col-md-12 col-sm-12 col-xs-12">
                         {{ form.hidden_tag() }}
                         {{ render_field(form.title) }}
-                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
+                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
                         {{ render_field(form.category) }}
                         {{ render_field(form.position) }}
                         {{ render_field(form.external) }}
@@ -45,6 +45,8 @@
                         {{ render_select_field(form.groups) }}
                         {{ render_submit_field(form.submit, div_class="form-group col-sm-5") }}
                     </div>
+
+                    {% include theme('editor_help.html') %}
                 </form>
             </div>
         </div>

+ 3 - 1
flaskbb/templates/management/group_form.html

@@ -35,7 +35,7 @@
                         {{ form.hidden_tag() }}
                         {{ render_field(form.name) }}
 
-                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
+                        {{ render_field(form.description, div_class="col-sm-10 editor", rows="4", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
                         {{ render_boolean_field(form.admin) }}
                         {{ render_boolean_field(form.super_mod) }}
 
@@ -54,6 +54,8 @@
 
                         {{ render_submit_field(form.submit, div_class="form-group col-sm-5") }}
                     </div>
+
+                    {% include theme('editor_help.html') %}
                 </form>
             </div>
         </div>

+ 4 - 2
flaskbb/templates/management/user_form.html

@@ -46,10 +46,12 @@
                     {{ horizontal_field(form.avatar) }}
                     {{ horizontal_field(form.primary_group) }}
                     {{ horizontal_field(form.secondary_groups) }}
-                    {{ horizontal_field(form.signature, div_class="col-sm-8 editor", rows="5", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
-                    {{ horizontal_field(form.notes, div_class="col-sm-8 editor", rows="12", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
+                    {{ horizontal_field(form.signature, div_class="col-sm-8 editor", rows="5", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
+                    {{ horizontal_field(form.notes, div_class="col-sm-8 editor", rows="12", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
 
                     {{ horizontal_field(form.submit) }}
+
+                    {% include theme('editor_help.html') %}
                 </form>
             </div>
         </div>

+ 3 - 8
flaskbb/templates/message/conversation.html

@@ -122,19 +122,15 @@
         <div class="col-md-12 col-sm-12 col-xs-12">
             <div class="editor-box">
                 <div class="editor">
-                    {{ render_quickreply(form.message, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'id': 'quickreply-editor'}) }}
+                    {{ render_quickreply(form.message, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                 </div>
                 <div class="editor-submit">
-                    <div class="editor-options pull-left">
-                        <span class="label label-info">Markdown</span>
-                        <a class="label label-success" href="#">help</a> <!-- TODO: add markdown cheat sheet -->
-                        <a class="label label-success" href="#">emojis</a> <!-- TODO: add emoji cheat sheet -->
-                    </div>
                     {{ render_submit_field(form.submit, input_class="btn btn-success pull-right") }}
                 </div>
             </div>
         </div>
     </div>
+    {% include theme('editor_help.html') %}
 </form>
 {% endif %}
 
@@ -146,6 +142,5 @@
       $('[data-toggle="tooltip"]').tooltip()
     })
     </script>
-    <script type="text/javascript" src="{{ url_for('static', filename='js/marked.js') }}"></script>
-    <script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap-markdown.js') }}"></script>
+    <script type="text/javascript" src="{{ url_for('static', filename='js/editor.min.js') }}"></script>
 {% endblock %}

+ 2 - 6
flaskbb/templates/message/message_form.html

@@ -22,14 +22,9 @@
                     <div class="col-md-12 col-sm-12 col-xs-12">
                         <div class="editor-box">
                             <div class="editor">
-                                {{ render_quickreply(form.message, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'id': 'quickreply-editor'}) }}
+                                {{ render_quickreply(form.message, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                             </div>
                             <div class="editor-submit">
-                                <div class="editor-options pull-left">
-                                    <span class="label label-info">Markdown</span>
-                                    <a class="label label-success" href="#">help</a> <!-- TODO: add markdown cheat sheet -->
-                                    <a class="label label-success" href="#">emojis</a> <!-- TODO: add emoji cheat sheet -->
-                                </div>
                                 <div class="pull-right">
                                     {{ render_submit_field(form.send_message, input_class="btn btn-success") }}
                                     {{ render_submit_field(form.save_message, input_class="btn btn-info") }}
@@ -41,6 +36,7 @@
             </div>
         </div>
     </div>
+    {% include theme('editor_help.html') %}
 </form>
 {% endblock %}
 

+ 4 - 2
flaskbb/templates/user/change_user_details.html

@@ -15,10 +15,12 @@
             {{ horizontal_field(form.location) }}
             {{ horizontal_field(form.website) }}
             {{ horizontal_field(form.avatar) }}
-            {{ horizontal_field(form.signature, div_class="col-sm-8 editor", rows="5", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
-            {{ horizontal_field(form.notes, div_class="col-sm-8 editor", rows="12", placeholder="", **{'data-provide': 'markdown', 'id': 'quickreply-editor'}) }}
+            {{ horizontal_field(form.signature, div_class="col-sm-8 editor", rows="5", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
+            {{ horizontal_field(form.notes, div_class="col-sm-8 editor", rows="12", placeholder="", **{'data-provide': 'markdown', 'class': 'flaskbb-editor'}) }}
 
             {{ horizontal_field(form.submit) }}
+
+            {% include theme('editor_help.html') %}
         </form>
     </div>
 </div>