ui: improve render_optional_namespace slighly
it maybe should still simple get dropped and replaced with (empty)Text 'Root' or 'Root Namespace' Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
dc193e8197
commit
ed289736cf
@ -686,7 +686,7 @@ Ext.define('PBS.Utils', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render_optional_namespace: function(value, metadata, record) {
|
render_optional_namespace: function(value, metadata, record) {
|
||||||
if (!value) return '-'; // FIXME ??
|
if (!value) return `- (${gettext('Root')})`;
|
||||||
return Ext.String.htmlEncode(value);
|
return Ext.String.htmlEncode(value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ Ext.define('PBS.form.RemoteNamespaceSelector', {
|
|||||||
|
|
||||||
valueField: 'ns',
|
valueField: 'ns',
|
||||||
displayField: 'ns',
|
displayField: 'ns',
|
||||||
emptyText: PBS.Utils.render_optional_namespace(''),
|
emptyText: gettext('Root'),
|
||||||
notFoundIsValid: true,
|
notFoundIsValid: true,
|
||||||
|
|
||||||
matchFieldWidth: false,
|
matchFieldWidth: false,
|
||||||
@ -103,7 +103,7 @@ Ext.define('PBS.form.RemoteNamespaceSelector', {
|
|||||||
header: gettext('Namespace'),
|
header: gettext('Namespace'),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
dataIndex: 'ns',
|
dataIndex: 'ns',
|
||||||
renderer: PBS.Utils.render_optional_namespace, // FIXME proper root-aware renderer
|
renderer: PBS.Utils.render_optional_namespace,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user