File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import ImportExportHLSDialog from './dialogs/ImportExportHLS';
2020import ImportCellParamsDialog from './dialogs/ImportCellParams' ;
2121import UploadDownloadFilesDialog from './dialogs/UploadDownloadFiles' ;
2222
23- import { TOPBAR_CONSTANTS , MODEL_STATE } from '../../constants' ;
23+ import { TOPBAR_CONSTANTS , MODEL_STATE , DEFAULT_CONFIRMATION_DIALOG_MESSAGE } from '../../constants' ;
2424import { LOAD_TUTORIAL } from '../../redux/actions/general' ;
2525
2626const styles = ( ) => ( {
@@ -91,8 +91,7 @@ class Topbar extends Component {
9191 if ( this . props . modelState === MODEL_STATE . INSTANTIATED || this . props . modelState === MODEL_STATE . SIMULATED ) {
9292 this . props . openConfirmationDialog ( {
9393 title : 'Warning' ,
94- message : 'A NetPyNE model has already been instantiated or simulated.'
95- + ' Continuing with this action will use the old value of netParams and simConfig for the new model. Do you want to continue?' ,
94+ message : DEFAULT_CONFIRMATION_DIALOG_MESSAGE ,
9695 onConfirm : {
9796 type : LOAD_TUTORIAL ,
9897 action,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import Box from '@material-ui/core/Box';
77import { withStyles } from '@material-ui/core/styles' ;
88
99import { ActionDialog , Tooltip } from 'netpyne/components' ;
10- import { NETPYNE_COMMANDS , MODEL_STATE } from '../../../constants' ;
10+ import { NETPYNE_COMMANDS , MODEL_STATE , DEFAULT_CONFIRMATION_DIALOG_MESSAGE } from '../../../constants' ;
1111import { PYTHON_CALL } from '../../../redux/actions/general' ;
1212import FileBrowser from '../../general/FileBrowser' ;
1313import Checkbox from '../../general/Checkbox' ;
@@ -183,8 +183,7 @@ class ImportExportHLS extends React.Component {
183183 handleConfirmation ( command , args ) {
184184 this . props . openConfirmationDialog ( {
185185 title : 'Warning' ,
186- message : 'A NetPyNE model has already been instantiated or simulated.'
187- + ' Continuing with this import action will use the old value of netParams and simConfig for the new model. Do you want to continue?' ,
186+ message : DEFAULT_CONFIRMATION_DIALOG_MESSAGE ,
188187 onConfirm : {
189188 type : PYTHON_CALL ,
190189 cmd : command ,
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ export const MINIMIZED_PANEL = 'border_bottom';
44export { WidgetStatus } ;
55export const TOP_PANEL = 'hlsPanel' ;
66export const TOOLS_LIST = 'tools' ;
7+
8+ export const DEFAULT_CONFIRMATION_DIALOG_MESSAGE = 'A NetPyNE model has already been instantiated or simulated.'
9+ + ' Continuing with this action will use the old value of netParams and simConfig for the new model. Do you want to continue?' ;
10+
711export const THEMES = {
812 DARK : 'gui' ,
913 BLACK : 'guiBlack' ,
You can’t perform that action at this time.
0 commit comments