Commits

Lukasz Balcerzak committed dee3ffb

Fixed some css issues with restructuredtext widget

Comments (0)

Files changed (4)

example_project/examples/templates/examples/contact.html

 
 {% block col-main-title %}Contact form{% endblock %}
 {% block col-main-content %}
-
-<style>
-    #id_content_preview {
-        clear: both;
-        border: 1px solid #3C769D;
-        min-height: 20px;
-        margin-left: 20px;
-        padding: 5px;
-    }
-    div.ReST {
-        margin-left: 20px;
-    }
-    div.markItUp {
-        border: 0;
-    }
-    .markItUpContainer textarea {
-        float: none !important;
-        max-width: none !important;
-        padding-bottom: 5px;
-        margin-left: 0 !important;
-    }
-</style>
 <form action="." method="post">
     {% csrf_token %}
     <table class="form-table">

richtemplates/media/css/rst.css

 }
 .richtemplates-rst table.docutils tbody tr.ui-selected td { background: #ffc; }
 
+.richtemplates-rst-preview {
+    clear: both;
+    border: 1px solid #3C769D;
+    min-height: 20px;
+    margin-left: 20px;
+    padding: 5px;
+}
+div.ReST {
+    margin-left: 20px;
+}
+div.markItUp {
+    border: 0;
+}
+.markItUpContainer textarea {
+    float: none !important;
+    max-width: none !important;
+    padding-bottom: 5px;
+    margin-left: 0 !important;
+}
+

richtemplates/media/css/style.css

 .float-right { float: right }
 .clearboth { clear: both; }
 
+

richtemplates/widgets.py

         output = [
             '<h3 id="${preview_title_id}" class="markItUp-preview" '
                 'style="display:none;">Preview</h3>',
-            '<div id="${preview_id}" class="richtemplates-rst" '
-                'style="display:none;"></div>',
+            '<div id="${preview_id}" class="richtemplates-rst-preview '
+                'richtemplates-rst" style="display:none;"></div>',
             '<script type="text/javascript">',
             '(function($) {',
             '  $(document).ready(function(){',