new features for ui list
This commit is contained in:
@@ -33,14 +33,16 @@ namespace zero.Core.Utils
|
||||
length = 12;
|
||||
}
|
||||
|
||||
return CreateRandom(length);
|
||||
|
||||
//if (length > 0)
|
||||
//{
|
||||
return Convert.ToBase64String(Guid.NewGuid().ToByteArray())
|
||||
.Replace("/", String.Empty)
|
||||
.Replace("+", String.Empty)
|
||||
.Replace("-", String.Empty)
|
||||
.ToLowerInvariant()
|
||||
.Substring(0, length);
|
||||
//return Convert.ToBase64String(Guid.NewGuid().ToByteArray())
|
||||
// .Replace("/", String.Empty)
|
||||
// .Replace("+", String.Empty)
|
||||
// .Replace("-", String.Empty)
|
||||
// .ToLowerInvariant()
|
||||
// .Substring(0, length);
|
||||
//}
|
||||
|
||||
//return Guid.NewGuid().ToString();
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
.ui-box + .ui-box.is-connected,
|
||||
.ui-tabs + .ui-box.is-connected
|
||||
{
|
||||
margin-top: -31px;
|
||||
margin-top: -32px;
|
||||
border-top: 1px solid var(--color-line-onbg);
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ class List
|
||||
* @param {object} [options] - Custom options
|
||||
* @param {string} [options.label] - A custom label for this column (otherwise it's generated via `templateLabel`)
|
||||
* @param {boolean} [options.hideLabel=false] - Hide the column label
|
||||
* @param {number} [options.index] - Custom position for this column
|
||||
* @param {number} [options.width] - Custom width of the column in px
|
||||
* @param {boolean} [options.canSort=true] - Disable/enable sorting within this column
|
||||
* @param {string} [options.class] - Append HTML class to the generated cells
|
||||
@@ -162,7 +163,14 @@ class List
|
||||
if (!column)
|
||||
{
|
||||
column = new ListColumn(path, options);
|
||||
this.columns.push(column);
|
||||
if (options && options.index > -1)
|
||||
{
|
||||
this.columns.splice(options.index, 0, column);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.columns.push(column);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -173,6 +181,20 @@ class List
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes a list column
|
||||
* @param {string} path - Model path
|
||||
*/
|
||||
removeColumn(path)
|
||||
{
|
||||
let column = this.columns.find(x => x.path === path);
|
||||
if (column != null)
|
||||
{
|
||||
this.columns.splice(this.columns.indexOf(column), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add an action to the list header (only used when it is attached to <ui-table-filter />)
|
||||
* @param {string} key - Alias to refer to
|
||||
|
||||
Reference in New Issue
Block a user