|
|
@@ -148,7 +148,7 @@ define(['base'], function(App) {
|
|
|
|
|
|
const validate = function() {
|
|
|
const { name } = $scope.inputs
|
|
|
- return ($scope.state.valid = name != null && name.length > 0)
|
|
|
+ $scope.state.valid = name != null && name.length > 0
|
|
|
}
|
|
|
$scope.$watch('inputs.name', validate)
|
|
|
|
|
|
@@ -169,7 +169,7 @@ define(['base'], function(App) {
|
|
|
.catch(function(response) {
|
|
|
const { data } = response
|
|
|
$scope.error = data
|
|
|
- return ($scope.state.inflight = false)
|
|
|
+ $scope.state.inflight = false
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
@@ -338,7 +338,7 @@ define(['base'], function(App) {
|
|
|
}
|
|
|
const fileName = newVal.split('/').reverse()[0]
|
|
|
if (fileName) {
|
|
|
- return ($scope.data.name = fileName)
|
|
|
+ $scope.data.name = fileName
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -352,14 +352,14 @@ define(['base'], function(App) {
|
|
|
$scope.data.projects,
|
|
|
p => p._id === $scope.data.selectedProjectId
|
|
|
)
|
|
|
- return ($scope.data.name =
|
|
|
+ $scope.data.name =
|
|
|
(project != null ? project.name : undefined) != null
|
|
|
? `${project.name}.pdf`
|
|
|
- : 'output.pdf')
|
|
|
+ : 'output.pdf'
|
|
|
} else {
|
|
|
const fileName = newVal.split('/').reverse()[0]
|
|
|
if (fileName) {
|
|
|
- return ($scope.data.name = fileName)
|
|
|
+ $scope.data.name = fileName
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -418,7 +418,7 @@ define(['base'], function(App) {
|
|
|
const validate = function() {
|
|
|
const { state } = $scope
|
|
|
const { data } = $scope
|
|
|
- return ($scope.state.valid =
|
|
|
+ $scope.state.valid =
|
|
|
!state.inFlight.projects &&
|
|
|
!state.inFlight.entities &&
|
|
|
data.projects &&
|
|
|
@@ -429,7 +429,7 @@ define(['base'], function(App) {
|
|
|
($scope.state.isOutputFilesMode &&
|
|
|
data.projectOutputFiles &&
|
|
|
data.selectedProjectOutputFile)) &&
|
|
|
- data.name)
|
|
|
+ data.name
|
|
|
}
|
|
|
$scope.$watch('state', validate, true)
|
|
|
$scope.$watch('data', validate, true)
|
|
|
@@ -519,7 +519,7 @@ define(['base'], function(App) {
|
|
|
}
|
|
|
}
|
|
|
_setInFlight('create')
|
|
|
- return ide.fileTreeManager
|
|
|
+ ide.fileTreeManager
|
|
|
.createLinkedFile(name, $scope.parent_folder, provider, payload)
|
|
|
.then(function() {
|
|
|
_reset({ err: false })
|
|
|
@@ -527,7 +527,7 @@ define(['base'], function(App) {
|
|
|
})
|
|
|
.catch(function(response) {
|
|
|
const { data } = response
|
|
|
- return _reset({ err: true })
|
|
|
+ $scope.error = data
|
|
|
})
|
|
|
})
|
|
|
}
|