TableHeaderMenu: Set NumberColumn objectType for NumberColumns

For NumberColumns, the objecttype must be set to NumberColumn, so that
it can be sorted by numeric value. In addition, the unformatted number
must also be transferred, because it is required for sorting.

258121

Change-Id: I2b2a0c34bc5a5c7cfb173bd9f5eaa26fb25a6eaa
Signed-off-by: Marcel Wismer <marcel.wismer@bsi-software.com>
Reviewed-on: https://git.eclipse.org/r/153404
Reviewed-by: Claudio Guglielmo <claudio.guglielmo@bsiag.com>
Tested-by: Claudio Guglielmo <claudio.guglielmo@bsiag.com>
Reviewed-on: https://git.eclipse.org/r/154653
Tested-by: CI Bot
diff --git a/org.eclipse.scout.rt.ui.html/src/main/js/scout/table/TableHeaderMenu.js b/org.eclipse.scout.rt.ui.html/src/main/js/scout/table/TableHeaderMenu.js
index 6672224..9047084 100644
--- a/org.eclipse.scout.rt.ui.html/src/main/js/scout/table/TableHeaderMenu.js
+++ b/org.eclipse.scout.rt.ui.html/src/main/js/scout/table/TableHeaderMenu.js
@@ -714,7 +714,8 @@
     tableRow = {
       cells: [
         scout.create('Cell', {
-          value: filterValue.text,
+          text: (this.filter.column.objectType === 'NumberColumn') ? filterValue.text : null,
+          value: (this.filter.column.objectType === 'NumberColumn') ? filterValue.key : filterValue.text,
           iconId: filterValue.iconId,
           htmlEnabled: filterValue.htmlEnabled,
           cssClass: filterValue.cssClass
@@ -740,6 +741,11 @@
 };
 
 scout.TableHeaderMenu.prototype._createFilterTable = function() {
+  var objectType = 'Column';
+  if (this.column.objectType === 'NumberColumn') {
+    objectType = this.column.objectType;
+  }
+
   return scout.create('Table', {
     parent: this,
     headerVisible: false,
@@ -749,11 +755,12 @@
     checkableStyle: scout.Table.CheckableStyle.TABLE_ROW,
     // column-texts are not visible since header is not visible
     columns: [{
-      objectType: 'Column',
+      objectType: objectType,
       text: 'filter-value',
       width: 160,
       sortActive: true,
-      sortIndex: 1
+      sortIndex: 1,
+      horizontalAlignment: -1
     }, {
       objectType: 'NumberColumn',
       text: 'aggregate-count',