From 2e76bd4e5070875343cf4ac7aa7817294d9ee372 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 9 Apr 2013 01:22:09 +0100 Subject: [PATCH] working but then create a second list, it will be stupid, SIGH --- src/static/css/iframe_editor.css | 16 ++++++++-------- src/static/js/domline.js | 9 +++++++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index 1ae906c4..7ae680dc 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -254,12 +254,12 @@ ol.list-number8:before { counter-increment: eighth 1; } -ol.list-start1:before{ counter-reset: first 0; } -ol.list-start2:before{ counter-reset: second 0; } -ol.list-start3:before{ counter-reset: third 0; } -ol.list-start4:before{ counter-reset: fourth 0; } -ol.list-start5:before{ counter-reset: fifth 0; } -ol.list-start6:before{ counter-reset: sixth 0; } -ol.list-start7:before{ counter-reset: seventh 0; } -ol.list-start8:before{ counter-reset: eighth 0; } +ol.list-start-number1:before{ counter-reset: first 0; } +ol.list-start-number2:before{ counter-reset: second 0; } +ol.list-start-number3:before{ counter-reset: third 0; } +ol.list-start-number4:before{ counter-reset: fourth 0; } +ol.list-start-number5:before{ counter-reset: fifth 0; } +ol.list-start-number6:before{ counter-reset: sixth 0; } +ol.list-start-number7:before{ counter-reset: seventh 0; } +ol.list-start-number8:before{ counter-reset: eighth 0; } diff --git a/src/static/js/domline.js b/src/static/js/domline.js index 43b5f21a..1e700c75 100644 --- a/src/static/js/domline.js +++ b/src/static/js/domline.js @@ -104,7 +104,6 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) if (listType) { listType = listType[1]; - start = start?'start="'+Security.escapeHTMLAttribute(start[1])+'"':''; if (listType) { if(listType.indexOf("number") < 0) @@ -114,7 +113,13 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) } else { - preHtml = '
  1. '; + if(start){ // is it a start of a list with more than one item in? + if(start[1] == 1){ // if its the first one + preHtml = '
    1. '; + }else{ // its the second+ item in this list level + preHtml = '
      1. '; + } + } postHtml = '
      '; } }