1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 18:43:25 +00:00

moved popup utils to utilsService

This commit is contained in:
Kyle Spearrin
2016-09-26 18:41:20 -04:00
parent 107c480913
commit a59f7a4afc
12 changed files with 64 additions and 64 deletions

View File

@@ -1,10 +1,10 @@
angular
.module('bit.accounts')
.controller('accountsHintController', function ($scope, $state, apiService, toastr, $q) {
.controller('accountsHintController', function ($scope, $state, apiService, toastr, $q, utilsService) {
$scope.model = {};
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$('#email').focus();
$scope.submitPromise = null;

View File

@@ -1,8 +1,9 @@
angular
.module('bit.accounts')
.controller('accountsLoginController', function ($scope, $state, $stateParams, loginService, userService, toastr) {
popupUtils.initListSectionItemListeners();
.controller('accountsLoginController', function ($scope, $state, $stateParams, loginService, userService, toastr,
utilsService) {
utilsService.initListSectionItemListeners($(document));
if ($stateParams.email) {
$('#master-password').focus();

View File

@@ -1,9 +1,9 @@
angular
.module('bit.accounts')
.controller('accountsLoginTwoFactorController', function ($scope, $state, loginService, toastr) {
.controller('accountsLoginTwoFactorController', function ($scope, $state, loginService, toastr, utilsService) {
$scope.model = {};
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$('#code').focus();
$scope.loginPromise = null;

View File

@@ -1,9 +1,9 @@
angular
.module('bit.accounts')
.controller('accountsRegisterController', function ($scope, $state, cryptoService, toastr, $q, apiService) {
.controller('accountsRegisterController', function ($scope, $state, cryptoService, toastr, $q, apiService, utilsService) {
$scope.model = {};
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$('#email').focus();
$scope.submitPromise = null;

View File

@@ -1,9 +1,9 @@
angular
.module('bit.settings')
.controller('settingsAddFolderController', function ($scope, $q, folderService, $state, toastr) {
.controller('settingsAddFolderController', function ($scope, $q, folderService, $state, toastr, utilsService) {
$scope.folder = {};
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$('#name').focus();
$scope.savePromise = null;

View File

@@ -1,7 +1,8 @@
angular
.module('bit.settings')
.controller('settingsEditFolderController', function ($scope, $stateParams, folderService, toastr, $q, $state, SweetAlert) {
.controller('settingsEditFolderController', function ($scope, $stateParams, folderService, toastr, $q, $state, SweetAlert,
utilsService) {
$scope.folder = {};
var folderId = $stateParams.folderId;
@@ -11,7 +12,7 @@
});
});
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$scope.savePromise = null;
$scope.save = function (model) {

View File

@@ -2,13 +2,13 @@
.module('bit.tools')
.controller('toolsPasswordGeneratorController', function ($scope, $state, $stateParams, passwordGenerationService,
toastr, $q) {
toastr, $q, utilsService) {
var addState = $stateParams.addState,
editState = $stateParams.editState;
$scope.showSelect = $stateParams.addState || $stateParams.editState;
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$scope.password = '-';
$scope.slider = {

View File

@@ -2,7 +2,7 @@
.module('bit.vault')
.controller('vaultAddSiteController', function ($scope, $state, $stateParams, siteService, folderService,
cryptoService, $q, toastr) {
cryptoService, $q, toastr, utilsService) {
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
var fromCurrent = $stateParams.fromCurrent || $stateParams.uri !== null;
@@ -23,7 +23,7 @@
else {
$('#name').focus();
}
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$q.when(folderService.getAllDecrypted()).then(function (folders) {
$scope.folders = folders;

View File

@@ -2,7 +2,7 @@ angular
.module('bit.vault')
.controller('vaultEditSiteController', function ($scope, $state, $stateParams, siteService, folderService,
cryptoService, $q, toastr, SweetAlert) {
cryptoService, $q, toastr, SweetAlert, utilsService) {
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
var siteId = $stateParams.siteId;
@@ -27,7 +27,7 @@ angular
$scope.folders = folders;
});
popupUtils.initListSectionItemListeners();
utilsService.initListSectionItemListeners($(document));
$scope.savePromise = null;
$scope.save = function (model) {