diff --git a/css/main.css b/css/main.css index 89228096..604f7bc0 100644 --- a/css/main.css +++ b/css/main.css @@ -27,23 +27,18 @@ body { } .wmd-button-row { - margin: 10px 30px; - top: 10px; - left: 30px; - padding: 0px; + margin: 10px; height: 20px; } .wmd-spacer { - width: 1px; - height: 20px; margin: 0 7px; - background-color: Silver; display: inline-block; - list-style: none; } +/* .wmd-button { + width: 20px; height: 20px; padding-left: 2px; @@ -52,7 +47,7 @@ body { list-style: none; cursor: pointer; } - +*/ .wmd-button>span { background-image: url(../img/wmd-buttons.png); background-repeat: no-repeat; @@ -60,7 +55,7 @@ body { width: 20px; height: 20px; display: inline-block; - border: 1px solid #e3e3e3; + border: 1px solid #f2f2f2; } .wmd-prompt-background { @@ -87,4 +82,21 @@ body { font-family: trebuchet MS, helvetica, sans-serif; font-size: 0.8em; font-weight: bold; -} \ No newline at end of file +} + +.icon-code { + background-position: -384px -168px; +} + +.icon-numbered-list { + background-position: -408px -168px; +} + +.icon-hr { + background-position: -432px -168px; +} + +.icon-undo { + background-position: -456px -168px; +} + diff --git a/img/glyphicons-halflings-white.png b/img/glyphicons-halflings-white.png index 3bf6484a..ad3866a2 100644 Binary files a/img/glyphicons-halflings-white.png and b/img/glyphicons-halflings-white.png differ diff --git a/img/glyphicons-halflings.png b/img/glyphicons-halflings.png index a9969993..84d1e328 100644 Binary files a/img/glyphicons-halflings.png and b/img/glyphicons-halflings.png differ diff --git a/index.html b/index.html index 8bb4001a..56a2e919 100644 --- a/index.html +++ b/index.html @@ -39,29 +39,33 @@ diff --git a/js/Markdown.Editor.js b/js/Markdown.Editor.js index 67c66c80..537b3642 100644 --- a/js/Markdown.Editor.js +++ b/js/Markdown.Editor.js @@ -1412,10 +1412,12 @@ return false; } } + button.className = button.className.replace(/ disabled/g, ""); } else { image.style.backgroundPosition = button.XShift + " " + disabledYShift; button.onmouseover = button.onmouseout = button.onclick = function () { }; + button.className += " disabled"; } } diff --git a/js/main.js b/js/main.js index c7b51f78..e9df7fbf 100644 --- a/js/main.js +++ b/js/main.js @@ -58,13 +58,13 @@ var fileManager = (function($) { // Update the editor and the file title var fileIndex = localStorage["file.current"]; $("#wmd-input").val(localStorage[fileIndex + ".content"]); - editor.refreshPreview(); + createEditor(); this.updateFileTitleUI(); }; fileManager.createFile = function(title) { if(!title) { - title = "New file"; + title = "Filename"; } var fileIndex = "file." + parseInt(localStorage["file.count"]); localStorage[fileIndex + ".title"] = title; @@ -90,7 +90,7 @@ var fileManager = (function($) { // Update the editor and the file title var fileIndex = localStorage["file.current"]; var title = localStorage[fileIndex + ".title"]; - $("#file-title").text(title); + $("#file-title > span").text(title); $("#file-title-input").val(title); $("#file-selector").empty(); for(var i=0; i").addClass("icon-bold")); + $("#wmd-italic-button").append($("").addClass("icon-italic")); + $("#wmd-link-button").append($("").addClass("icon-globe")); + $("#wmd-quote-button").append($("").addClass("icon-indent-left")); + $("#wmd-code-button").append($("").addClass("icon-code")); + $("#wmd-image-button").append($("").addClass("icon-picture")); + $("#wmd-olist-button").append($("").addClass("icon-numbered-list")); + $("#wmd-ulist-button").append($("").addClass("icon-list")); + $("#wmd-heading-button").append($("").addClass("icon-text-height")); + $("#wmd-hr-button").append($("").addClass("icon-hr")); + $("#wmd-undo-button").append($("").addClass("icon-undo")); + $("#wmd-redo-button").append($("").addClass("icon-share-alt")); + +} (function($) { $(function() { - converter = Markdown.getSanitizingConverter(); - editor = new Markdown.Editor(converter); - editor.run(); $(window).resize(resize); resize();