Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

fix(client): lint issues for confirm() messages not referencing the window object #1259

Merged
merged 1 commit into from
Mar 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
.module('articles')
.controller('ArticlesController', ArticlesController);

ArticlesController.$inject = ['$scope', '$state', 'articleResolve', 'Authentication'];
ArticlesController.$inject = ['$scope', '$state', 'articleResolve', '$window', 'Authentication'];

function ArticlesController($scope, $state, article, Authentication) {
function ArticlesController($scope, $state, article, $window, Authentication) {
var vm = this;

vm.article = article;
Expand All @@ -19,7 +19,7 @@

// Remove existing Article
function remove() {
if (confirm('Are you sure you want to delete?')) {
if ($window.confirm('Are you sure you want to delete?')) {
vm.article.$remove($state.go('articles.list'));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
.module('users.admin')
.controller('UserController', UserController);

UserController.$inject = ['$scope', '$state', 'Authentication', 'userResolve'];
UserController.$inject = ['$scope', '$state', '$window', 'Authentication', 'userResolve'];

function UserController($scope, $state, Authentication, user) {
function UserController($scope, $state, $window, Authentication, user) {
var vm = this;

vm.authentication = Authentication;
Expand All @@ -16,7 +16,7 @@
vm.update = update;

function remove(user) {
if (confirm('Are you sure you want to delete this user?')) {
if ($window.confirm('Are you sure you want to delete this user?')) {
if (user) {
user.$remove();

Expand Down