diff options
Diffstat (limited to 'phpBB/assets/javascript')
-rw-r--r-- | phpBB/assets/javascript/core.js | 3 | ||||
-rw-r--r-- | phpBB/assets/javascript/editor.js | 2 | ||||
-rw-r--r-- | phpBB/assets/javascript/plupload.js | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 5b8331bdce..4657af90ab 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -994,7 +994,8 @@ phpbb.colorPalette = function(dir, width, height) { numberList[3] = 'BF'; numberList[4] = 'FF'; - html += '<table style="width: auto;">'; + var table_class = (dir == 'h') ? 'horizontal-palette' : 'vertical-palette'; + html += '<table class="not-responsive colour-palette ' + table_class + '" style="width: auto;">'; for (r = 0; r < 5; r++) { if (dir == 'h') { diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js index be3d868f13..dfc7dab525 100644 --- a/phpBB/assets/javascript/editor.js +++ b/phpBB/assets/javascript/editor.js @@ -288,7 +288,7 @@ function mozWrap(txtarea, open, close) { * http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 */ function storeCaret(textEl) { - if (textEl.createTextRange) { + if (textEl.createTextRange && document.selection) { textEl.caretPos = document.selection.createRange().duplicate(); } } diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index a90757d487..3c2fc5c3cb 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -162,7 +162,7 @@ phpbb.plupload.insertRow = function(file) { var row = $(phpbb.plupload.rowTpl); row.attr('id', file.id); - row.find('.file-name').html(file.name); + row.find('.file-name').html(plupload.xmlEncode(file.name)); row.find('.file-size').html(plupload.formatSize(file.size)); if (phpbb.plupload.order == 'desc') { @@ -230,6 +230,9 @@ phpbb.plupload.updateHiddenData = function(row, attach, index) { phpbb.plupload.deleteFile = function(row, attachId) { // If there's no attach id, then the file hasn't been uploaded. Simply delete the row. if (typeof attachId === 'undefined') { + var file = uploader.getFile(row.attr('id')); + uploader.removeFile(file); + row.slideUp(100, function() { row.remove(); phpbb.plupload.hideEmptyList(); @@ -496,6 +499,8 @@ $('#file-list').on('click', '.file-error', function(e) { * Fires when an error occurs. */ uploader.bind('Error', function(up, error) { + error.file.name = plupload.xmlEncode(error.file.name); + // The error message that Plupload provides for these is vague, so we'll be more specific. if (error.code === plupload.FILE_EXTENSION_ERROR) { error.message = plupload.translate('Invalid file extension:') + ' ' + error.file.name; |