mirror of
https://github.com/nasa/openmct.git
synced 2025-05-07 11:08:34 +00:00
Merge branch 'master' into switching-type-error
This commit is contained in:
commit
dd13efe065
@ -24,14 +24,14 @@ import uuid from 'uuid';
|
|||||||
|
|
||||||
export default class NewFolderAction {
|
export default class NewFolderAction {
|
||||||
constructor(openmct) {
|
constructor(openmct) {
|
||||||
this.name = 'New Folder';
|
this.name = 'Add New Folder';
|
||||||
this.key = 'newFolder';
|
this.key = 'newFolder';
|
||||||
this.description = 'Create a new folder';
|
this.description = 'Create a new folder';
|
||||||
this.cssClass = 'icon-folder';
|
this.cssClass = 'icon-folder-new';
|
||||||
|
|
||||||
this._openmct = openmct;
|
this._openmct = openmct;
|
||||||
this._dialogForm = {
|
this._dialogForm = {
|
||||||
name: "New Folder Name",
|
name: "Add New Folder",
|
||||||
sections: [
|
sections: [
|
||||||
{
|
{
|
||||||
rows: [
|
rows: [
|
||||||
@ -39,7 +39,9 @@ export default class NewFolderAction {
|
|||||||
key: "name",
|
key: "name",
|
||||||
control: "textfield",
|
control: "textfield",
|
||||||
name: "Folder Name",
|
name: "Folder Name",
|
||||||
required: false
|
pattern: "\\S+",
|
||||||
|
required: true,
|
||||||
|
cssClass: "l-input-lg"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -53,7 +55,7 @@ export default class NewFolderAction {
|
|||||||
dialogService = this._openmct.$injector.get('dialogService'),
|
dialogService = this._openmct.$injector.get('dialogService'),
|
||||||
folderType = this._openmct.types.get('folder');
|
folderType = this._openmct.types.get('folder');
|
||||||
|
|
||||||
dialogService.getUserInput(this._dialogForm, {}).then((userInput) => {
|
dialogService.getUserInput(this._dialogForm, {name: 'Unnamed Folder'}).then((userInput) => {
|
||||||
let name = userInput.name,
|
let name = userInput.name,
|
||||||
identifier = {
|
identifier = {
|
||||||
key: uuid(),
|
key: uuid(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user