1. Luke Plant
  2. semanticeditor
Issue #17 resolved

It would be nice to be able to reorder the list of styles

evildmp
created an issue

... so that related styles can be kept together,

Comments (3)

  1. Luke Plant repo owner

    This needs an ordering parameter on the CssClass model, or, if we implement #18, the ordering could go on the many-to-many table that links CssClass to templates. In the latter case, ordering could be specified differently for the different templates (but on the other hand, this might be a disadvantage -- you would have to specify the order for each template, even if it was identical).

    In terms of UI, a simple integer field on CssClass would work, but would be very inconvenient. Really you would want something on the list view that allowed drag and drop re-ordering, a bit like the django-cms page list.

  2. evildmp reporter
    • changed status to open

    Another alternative occurs to me.

    Much as it is a shame to abandon functionality that has already been created (the ability to create and manage classes in the Django admin) it's worth noting:

    • in order to implement a new class, changes will need to be made to the stylesheet too, so anyone wanting to do that will probably need access to server files anyway
    • presentation.py already contains a list of classes; managing classes using just one mechanism rather than two is simpler
    • presentation.py could also be where the classes' order (and the elements and templates they apply to) are managed, obviating the need for additional Admin functionality
  3. evildmp reporter

    I don't think this is required - sensible naming helps keep them in a sensible order, e.g.

    • Background colour: blue
    • Background colour: red
    • Column width: double
    • Column width: triple
  4. Log in to comment