Commits

Luke Plant  committed 210517f

Added 'innerrow' and 'innercol' to help text about allowed_elements.

For UI consistency, this required changing newinnerrow -> innerrow
and newinnercol -> innercol in tests and in command definition.

  • Participants
  • Parent commits 60517bc

Comments (0)

Files changed (4)

File semanticeditor/media/semanticeditor/wymeditor/iframe/default/wymiframe.css

       content:" New column";
   }
 
-  p.newinnerrow:after {
+  p.innerrow:after {
       content:" Inner row";
   }
 
-  p.newinnercol:after {
+  p.innercol:after {
       content:" Inner column";
   }
 
-  p.newrow, p.newcol, p.newinnerrow, p.newinnercol {
+  p.newrow, p.newcol, p.innerrow, p.innercol {
       background-color: #ffffff;
       color: #adc8ad;
       font-weight: bold;

File semanticeditor/models.py

 
     allowed_elements = models.CharField("Allowed HTML elements", max_length=255,
                                         help_text="A space separated list of HTML "
-                                        "element names.  Use 'newrow' or 'newcol' to indicate "
+                                        "element names.  Use 'newrow'/'newcol'/"
+                                        "'innerrow'/'innercol' to indicate "
                                         "it can be applied to layout rows or columns ",
                                         default="h1 h2 h3 h4 h5 h6 p blockquote ul ol li newrow newcol")
 

File semanticeditor/tests.py

         #   - 2 columns
         pres = {'newrow_h1_1':[NEWROW],
                 'newcol_h1_2':[NEWCOL],
-                'newinnerrow_h1_3':[NEWINNERROW],
-                'newinnercol_h1_4':[NEWINNERCOL],
+                'innerrow_h1_3':[NEWINNERROW],
+                'innercol_h1_4':[NEWINNERCOL],
                 'newcol_h1_5':[NEWCOL],
                 'newrow_h1_6':[NEWROW],
                 'newcol_h1_7':[NEWCOL],
         #     - 2 columns
         pres = {'newrow_h1_1':[NEWROW],
                 'newcol_h1_2':[NEWCOL],
-                'newinnerrow_h1_3':[NEWINNERROW],
-                'newinnercol_h1_4':[NEWINNERCOL],
+                'innerrow_h1_3':[NEWINNERROW],
+                'innercol_h1_4':[NEWINNERCOL],
                 }
         outh = ('<div class="row columns2">'
                   '<div class="column firstcolumn">'
         self.assertRaises(TooManyColumns, format_html, html,
                           {'newrow_h1_1':[NEWROW],
                            'newcol_h1_1':[NEWCOL],
-                           'newinnerrow_h1_1':[NEWINNERROW],
-                           'newinnercol_h1_2':[NEWINNERCOL],
+                           'innerrow_h1_1':[NEWINNERROW],
+                           'innercol_h1_2':[NEWINNERCOL],
                            'newcol_h1_3':[NEWCOL],
                            'newcol_h1_4':[NEWCOL],
                            'newcol_h1_5':[NEWCOL],
         pres = {'newrow_h1_1':set([NEWROW]),
                 'newcol_h1_1':set([NEWCOL]),
                 'newcol_h1_2':set([NEWCOL]),
-                'newinnerrow_h1_3':set([NEWINNERROW]),
-                'newinnercol_h1_3':set([NEWINNERCOL]),
-                'newinnercol_h1_4':set([NEWINNERCOL]),
+                'innerrow_h1_3':set([NEWINNERROW]),
+                'innercol_h1_3':set([NEWINNERCOL]),
+                'innercol_h1_4':set([NEWINNERCOL]),
                 'newcol_h1_5':set([NEWCOL]),
                 'newrow_h1_6':set([NEWROW]),
                 'newcol_h1_6':set([NEWCOL]),

File semanticeditor/utils/presentation.py

 
 """)
 
-NEWINNERROW = PresentationCommand('newinnerrow',
+NEWINNERROW = PresentationCommand('innerrow',
                                   verbose_name="Inner row",
                                   description="""
 <p>Use this command to start a nested, inner row within an existing column
 """
                                   )
 
-NEWINNERCOL = PresentationCommand('newinnercol',
+NEWINNERCOL = PresentationCommand('innercol',
                                   verbose_name="Inner column",
                                   description="""
 <p>Use this command to start a new inner column, after an 'Inner row' command