diff --git a/copyparty/web/util.js b/copyparty/web/util.js index a1d7d1a2..908fe469 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -8,7 +8,8 @@ if (!window['console']) var is_touch = 'ontouchstart' in window, IPHONE = /iPhone|iPad|iPod/i.test(navigator.userAgent), - ANDROID = /android/i.test(navigator.userAgent); + ANDROID = /android/i.test(navigator.userAgent), + WINDOWS = navigator.platform ? navigator.platform == 'Win32' : /Windows/.test(navigator.userAgent); var ebi = document.getElementById.bind(document), @@ -838,8 +839,12 @@ var modal = (function () { var r = {}, q = [], o = null, + cb_up = null, cb_ok = null, - cb_ng = null; + cb_ng = null, + prim = 'OK', + sec = 'Cancel', + ok_cancel = WINDOWS ? prim + sec : sec + prim; r.busy = false; @@ -942,7 +947,7 @@ var modal = (function () { function _confirm(html, cok, cng) { cb_ok = cok; cb_ng = cng === undefined ? cok : null; - html += '
'; + html += '