From: zuber Date: Wed, 19 Aug 2009 11:52:09 +0000 (+0200) Subject: Zdecydowanie lepsze wyświetlanie toolbara z przyciskami. Dodanie wszystkich przyciskó... X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/d8006182f05f235f38fd7ca1c74a808ffac71a31?ds=sidebyside Zdecydowanie lepsze wyświetlanie toolbara z przyciskami. Dodanie wszystkich przycisków z Quanty (niektóre mogą jeszcze wstawiać złe tagi). Refs #8. --- diff --git a/project/static/css/master.css b/project/static/css/master.css index 66997a93..03bcd210 100644 --- a/project/static/css/master.css +++ b/project/static/css/master.css @@ -136,20 +136,52 @@ p { border-bottom: 1px solid #AAA; } -#toolbar li { +#toolbar { + overflow: hidden; + width: 400%; +} + +#toolbar-tabs li { + font-size: 14px; display: block; float: left; - margin: 0; - padding: 0; + margin: 4px 4px 0 0; + padding: 2px 10px 0 10px; border-left: 1px solid #EEE; border-right: 1px solid #AAA; + margin-bottom: -1px; + border: 1px solid #AAA; + border-radius-topleft: 8px; + border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + -moz-border-radius-topright: 8px; + -webkit-border-top-left-radius: 8px; + -webkit-border-top-right-radius: 8px; +} + +#toolbar-tabs li:hover, #toolbar-tabs li.active { + cursor: default; + background-color: #EEE; + border-bottom: 1px solid #EEE; } -#toolbar li p, #toolbar ol li { - padding: 2px 10px; +#toolbar-buttons { + background-color: #EEE; } -#toolbar li p:hover { - cursor:pointer; - background-color: #EEE; -} \ No newline at end of file +#toolbar-buttons li { + display: block; + font-size: 12px; + padding: 1px 8px; + margin: 4px; + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 8px; + float: left; +} + +#toolbar-buttons li:hover { + background-color: #777; + color: #FFF; + cursor: default; +} diff --git a/project/templates/explorer/file_xml.html b/project/templates/explorer/file_xml.html index 2d502cd9..ee332c33 100644 --- a/project/templates/explorer/file_xml.html +++ b/project/templates/explorer/file_xml.html @@ -48,13 +48,19 @@ $('#images').enableAutoscroll(); }) - $('#toolbar li p').click(function() { - $('#toolbar ol:visible').hide(); - $(this).next('ol').show('fast'); + // Toolbar + $('#toolbar-tabs li').click(function() { + var id = $(this).attr('p:button-list'); + $('#toolbar-tabs li').removeClass('active'); + $(this).addClass('active'); + if (!$('#' + id).is(':visible')) { + $('#toolbar-buttons ol').not('#' + id).hide(); + $('#' + id).show(); + } }) var keys = {}; - $('#toolbar ol li').each(function() { + $('#toolbar-buttons li').each(function() { var tag = $(this).attr('p:tag'); var handler = function() { var text = editor.selection(); @@ -90,20 +96,27 @@ {% block breadcrumbs %}Platforma Redakcyjna ❯ plik {{ hash }}{% endblock breadcrumbs %} {% block maincontent %} -
    -
  1. -

    Nagłówki

    -
      +
      +
        +
      1. Nagłówki
      2. +
      3. Struktr. i mastery
      4. +
      5. Dramat wiersz.
      6. +
      7. Elementy początk.
      8. +
      9. Akapity i dł. cyt.
      10. +
      11. Style znakowe
      12. +
      13. Polecenia
      14. +
      15. Wersy
      16. +
      +
       
      +
      + - -
    1. -

      Struktr. i mastery

      -
        + - -
      1. -

        Dramat wiersz.

        -
          + - -
        1. -

          Elementy początk.

          -
            + - - {#
          1. Akapity i dł. cyt.
          2. #} - {#
          3. Style znakowe
          4. #} - -
             
            -
          + + + + +
           
          +
    2. +