diff --git a/docs/en_US/release_notes_4_15.rst b/docs/en_US/release_notes_4_15.rst index 5139b724e..b8ac1e855 100644 --- a/docs/en_US/release_notes_4_15.rst +++ b/docs/en_US/release_notes_4_15.rst @@ -32,6 +32,7 @@ Bug fixes | `Issue #4483 `_ - Ensure the number of jobs can be specified when backing up in directory format. | `Issue #4564 `_ - Ensure Javascript errors during Query Tool execution are reported as such and not as Ajax errors. | `Issue #4610 `_ - Suppress Enter key presses in Alertify dialogues when the come from Select2 controls to allow item selection with Enter. +| `Issue #4647 `_ - Ensure that units are respected when sorting by file size in the File dialog. | `Issue #4730 `_ - Ensure all messages are retained in the Query Tool from long running queries. | `Issue #4734 `_ - Updated documentation for the delete row button that only strikeout the row instead of deleting it. | `Issue #4779 `_ - Updated documentation for the query tool toolbar buttons. diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py index ec956ea57..160f3466f 100644 --- a/web/pgadmin/misc/file_manager/__init__.py +++ b/web/pgadmin/misc/file_manager/__init__.py @@ -62,7 +62,7 @@ encode_json = json.JSONEncoder().encode # utility functions # convert bytes type to human readable format def sizeof_fmt(num, suffix='B'): - for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']: + for unit in ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']: if abs(num) < 1024.0: return "%3.1f %s%s" % (num, unit, suffix) num /= 1024.0 diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js index 77acc5be7..e3fc81a9f 100644 --- a/web/pgadmin/misc/file_manager/static/js/utility.js +++ b/web/pgadmin/misc/file_manager/static/js/utility.js @@ -20,7 +20,7 @@ define([ 'jquery', 'underscore', 'pgadmin.alertifyjs', 'sources/gettext', 'sources/url_for', 'dropzone', 'sources/pgadmin', - 'sources/csrf', 'tablesorter', + 'sources/csrf', 'tablesorter', 'tablesorter-metric', ], function($, _, Alertify, gettext, url_for, Dropzone, pgAdmin, csrfToken) { /*--------------------------------------------------------- @@ -588,8 +588,8 @@ define([ result += ''; result += ''; - result += ''; + result += ''; + result += ''; result += ''; Object.keys(data).sort(function keyOrder(x, y) { @@ -675,8 +675,8 @@ define([ */ result += '
'; result += '' + lg.name + '' + lg.size + ''; - result += '' + lg.modified + '
' + lg.size + '' + lg.modified + '
'; result += '' + - '' + - '' + + '' + + '' + '' + ''; result += '
' + lg.name + '' + lg.size + '' + lg.modified + '' + lg.size + '' + lg.modified + '
'; @@ -690,13 +690,7 @@ define([ // Add the new markup to the DOM. $('.fileinfo .file_listing').html(result); - $('.fileinfo .file_listing #contents').tablesorter({ - headers: { - 2: { - sorter: 'shortDate', - }, - }, - }); + $('.fileinfo .file_listing #contents').tablesorter(); // rename file/folder $('.file_manager button.rename').off().on('click', function(e) { diff --git a/web/webpack.shim.js b/web/webpack.shim.js index b4d3b8591..2e2b7ed41 100644 --- a/web/webpack.shim.js +++ b/web/webpack.shim.js @@ -155,6 +155,7 @@ var webpackShimConfig = { 'snap.svg': path.join(__dirname, './node_modules/snapsvg/dist/snap.svg-min'), 'spectrum': path.join(__dirname, './node_modules/spectrum-colorpicker/spectrum'), 'mousetrap': path.join(__dirname, './node_modules/mousetrap'), + 'tablesorter-metric': path.join(__dirname, './node_modules/tablesorter/dist/js/parsers/parser-metric.min'), // AciTree 'jquery.acitree': path.join(__dirname, './node_modules/acitree/js/jquery.aciTree.min'),