This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,6 @@ <h4 style="color: {{ statusMessageColour }};" data-cy="statusmsg"> {{ statu
198198 if ( arrIdx > - 1 ) {
199199 $http . get ( "/x/execdel/[[ .DB.Info.Owner ]]/[[ .DB.Info.Database ]]?sqlname=" + name ) . then (
200200 function success ( response ) {
201- $scope . statusMessageColour = "green" ;
202- $scope . statusMessage = nowString ( ) + "SQL statement '" + name + "' deleted" ;
203-
204201 // Remove the SQL statement from the drop-down list
205202 $scope . execNames . splice ( arrIdx , 1 ) ;
206203
@@ -211,8 +208,17 @@ <h4 style="color: {{ statusMessageColour }};" data-cy="statusmsg"> {{ statu
211208 $scope . selectedName = newSelected ;
212209 document . getElementById ( "savename" ) . value = newSelected ;
213210 $scope . changeExec ( newSelected ) ;
211+
212+ // We need to set the status message here too, otherwise the ~async changeExec() above
213+ // can overwrite it
214+ $scope . statusMessageColour = "green" ;
215+ $scope . statusMessage = nowString ( ) + "SQL statement '" + name + "' deleted" ;
214216 }
215217 }
218+
219+ // Display a success message
220+ $scope . statusMessageColour = "green" ;
221+ $scope . statusMessage = nowString ( ) + "SQL statement '" + name + "' deleted" ;
216222 } , function failure ( response ) {
217223 // The deletion failed, so display the returned error message
218224 $scope . statusMessageColour = "red" ;
You can’t perform that action at this time.
0 commit comments