From: matt Date: Fri, 20 Aug 2010 20:02:23 +0000 (+0000) Subject: fixed up some english and changed markdown default editor to show markdown instead... X-Git-Tag: live~570 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/2dba0bf4080805a0b712b06bc5c8e1ae67701e04 fixed up some english and changed markdown default editor to show markdown instead of HTML so it mirrored our old functionality. Everything should be put back together now. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@564 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index 487b1db..34d13b3 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -1058,13 +1058,13 @@ $(document).ready( function(){ function yourWorkWillBeLost(e) { if(browserTester('chrome')) { - return "You sure you want to leave? Your work will be lost."; + return "Are you sure you want to leave? Your work will be lost."; } else if(browserTester('safari')) { - return "You sure you want to leave? Your work will be lost."; + return "Are you sure you want to leave? Your work will be lost."; } else { if(!e) e = window.event; e.cancelBubble = true; - e.returnValue = 'If you leave your work will be lost.'; + e.returnValue = 'If you leave, your work will be lost.'; if (e.stopPropagation) { e.stopPropagation(); @@ -1075,6 +1075,5 @@ function yourWorkWillBeLost(e) { } function browserTester(browserString) { - var test = navigator.userAgent; return navigator.userAgent.toLowerCase().indexOf(browserString) > -1; } \ No newline at end of file diff --git a/forum/skins/default/media/js/wmd/wmd.js b/forum/skins/default/media/js/wmd/wmd.js index 5b85976..5f62eca 100644 --- a/forum/skins/default/media/js/wmd/wmd.js +++ b/forum/skins/default/media/js/wmd/wmd.js @@ -1097,6 +1097,14 @@ Attacklab.wmdBase = function(){ var keyCode = key.charCode || key.keyCode; var keyCodeStr = String.fromCharCode(keyCode).toLowerCase(); + // Bugfix for messed up DEL and . + if (keyCode === 46) { + keyCodeStr = ""; + } + if (keyCode === 190) { + keyCodeStr = "."; + } + switch(keyCodeStr) { case "b": doClick(document.getElementById("wmd-bold-button")); @@ -1266,7 +1274,7 @@ Attacklab.wmdBase = function(){ this.text = inputArea.value; } - } + }; // Sets the selected text in the input box after we've performed an // operation. @@ -2323,7 +2331,7 @@ Attacklab.wmdBase = function(){ Attacklab.wmd_env = {}; Attacklab.account_options = {}; -Attacklab.wmd_defaults = {version:1, output:"HTML", lineLength:40, delayLoad:false}; +Attacklab.wmd_defaults = {version:1, output:"Markdown", lineLength:40, delayLoad:false}; if(!Attacklab.wmd) {