X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/de421bfc33978f3d11fdbe247d6c34ff205e39eb..c07bef148aa59e35fe84e0c0cc8acff2cb5c6ee5:/forum/skins/default/media/js/osqa.main.js diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index 487b1db..79cda45 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -688,11 +688,11 @@ function pickedTags(){ multipleSeparator: " "*/ formatItem: function(row, i, max, value) { - return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")"; + return row[1] + " (" + row[2] + ")"; }, formatResult: function(row, i, max, value){ - return row[0]; + return row[1]; } }); @@ -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,24 @@ function yourWorkWillBeLost(e) { } function browserTester(browserString) { - var test = navigator.userAgent; return navigator.userAgent.toLowerCase().indexOf(browserString) > -1; +} + +// Add missing IE functionality +if (!window.addEventListener) { + if (window.attachEvent) { + window.addEventListener = function (type, listener, useCapture) { + window.attachEvent('on' + type, listener); + }; + window.removeEventListener = function (type, listener, useCapture) { + window.detachEvent('on' + type, listener); + }; + } else { + window.addEventListener = function (type, listener, useCapture) { + window['on' + type] = listener; + }; + window.removeEventListener = function (type, listener, useCapture) { + window['on' + type] = null; + }; + } } \ No newline at end of file