diff options
Diffstat (limited to 'phpBB/assets/javascript')
-rw-r--r-- | phpBB/assets/javascript/core.js | 12 | ||||
-rw-r--r-- | phpBB/assets/javascript/jquery.min.js (renamed from phpBB/assets/javascript/jquery.js) | 0 |
2 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index cd633ed2ae..296c5b0ef9 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -15,7 +15,7 @@ var dark = $('#darkenwrapper'); var loadingIndicator = $('#loading_indicator'); var phpbbAlertTimer = null; -var isTouch = (window && typeof window.ontouchstart !== 'undefined'); +phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined'); /** * Display a loading screen @@ -84,8 +84,8 @@ phpbb.alert = function(title, msg, fadedark) { e.stopPropagation(); }); - $(document).bind('keydown', function(e) { - if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) { + $(document).keydown(function(e) { + if ((e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) && dark.is(':visible')) { dark.trigger('click'); e.preventDefault(); @@ -333,7 +333,9 @@ phpbb.ajaxify = function(options) { // Hide the alert even if we refresh the page, in case the user // presses the back button. dark.fadeOut(phpbb.alertTime, function() { - alert.hide(); + if (typeof alert !== 'undefined') { + alert.hide(); + } }); }, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds } @@ -1009,7 +1011,7 @@ phpbb.resizeTextArea = function(items, options) { resetCallback: function(item) { } }; - if (isTouch) return; + if (phpbb.isTouch) return; if (arguments.length > 1) { configuration = $.extend(configuration, options); diff --git a/phpBB/assets/javascript/jquery.js b/phpBB/assets/javascript/jquery.min.js index 73f33fb3aa..73f33fb3aa 100644 --- a/phpBB/assets/javascript/jquery.js +++ b/phpBB/assets/javascript/jquery.min.js |