Skip to content

Commit

Permalink
bug fix: display login failed message for use on specific error status
Browse files Browse the repository at this point in the history
  • Loading branch information
hplahar committed Mar 30, 2020
1 parent e2c7d7a commit 905d309
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/webapp/scripts/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,16 +803,15 @@ iceControllers.controller('LoginController', function ($scope, $location, $cooki
}
$scope.login.processing = false;
}, null, function (error) {
$scope.login.errMsg = error.statusText;
if (error.status === 401)
$scope.login.errMsg = "Login failed";
});
};
});

// turning out to be pretty specific to the permissions
iceControllers.controller('GenericTabsController', function ($scope, $cookies) {
console.log("GenericTabsController");
var panes = $scope.panes = [];
var sessionId = $cookies.get("sessionId");
iceControllers.controller('GenericTabsController', function ($scope) {
const panes = $scope.panes = [];

$scope.activateTab = function (pane) {
angular.forEach(panes, function (pane) {
Expand All @@ -823,7 +822,7 @@ iceControllers.controller('GenericTabsController', function ($scope, $cookies) {

this.addPane = function (pane) {
// activate the first pane that is added
if (panes.length == 0)
if (panes.length === 0)
$scope.activateTab(pane);
panes.push(pane);
};
Expand All @@ -841,7 +840,7 @@ iceControllers.controller('PermanentEntryDeletionConfirmationModalController', f
// retrieve sub folders for selected collection
$rootScope.$broadcast("RefreshAfterDeletion");
$scope.closeModal();
var word = allEntries.length == 1 ? 'Entry' : allEntries.length + " entries";
const word = allEntries.length === 1 ? 'Entry' : allEntries.length + " entries";
Util.setFeedback(word + ' successfully deleted', 'success');
$rootScope.$emit("CollectionSelection", "deleted");
});
Expand Down

0 comments on commit 905d309

Please sign in to comment.