Use ngBootbox.

This commit is contained in:
Alexis Lahouze 2016-02-08 22:25:47 +01:00
parent 7f4f4b3724
commit 41d8a202fa
5 changed files with 15 additions and 13 deletions

View File

@ -48,8 +48,8 @@ angular.module('accountant')
.controller(
'AccountController', [
'$scope', 'Account', 'Notification',
function($scope, Account, Notification) {
'$scope', '$ngBootbox', 'Account', 'Notification',
function($scope, $ngBootbox, Account, Notification) {
/*
* Return the class for an account current value compared to authorized
@ -146,7 +146,7 @@ angular.module('accountant')
$scope.delete = function(account, $index) {
var id = account.id;
bootbox.confirm(
$ngBootbox.confirm(
'Voulez-vous supprimer le compte \\\'' + account.name + '\\\' ?',
function(result) {
if(result) {

View File

@ -24,7 +24,8 @@ angular.module('accountant', [
'http-auth-interceptor',
'ui-notification',
'Storage.Service',
'xeditable'
'xeditable',
'ngBootbox'
])
.factory('sessionInjector', ['$storage', function($storage) {
@ -103,8 +104,8 @@ angular.module('accountant', [
})
.controller('MainController', [
'$scope', '$rootScope', '$http', 'authService', '$storage',
function($scope, $rootScope, $http, authService, $storage) {
'$scope', '$rootScope', '$http', 'authService', '$storage', '$ngBootbox',
function($scope, $rootScope, $http, authService, $storage, $ngBootbox) {
$scope.dialogShown = false;
$scope.showLoginForm = function() {
@ -117,7 +118,7 @@ angular.module('accountant', [
$storage.clear();
bootbox.dialog({
$ngBootbox.customDialog({
title: 'Authentification requise',
message: '<form class=\'form-horizontal\'>' +
' <div class=\'form-group\'>' +

View File

@ -335,8 +335,8 @@ angular.module('accountant')
*/
.controller(
'OperationController', [
'$scope', '$rootScope', '$routeParams', 'Notification', 'Account', 'Operation',
function($scope, $rootScope, $routeParams, Notification, Account, Operation) {
'$scope', '$rootScope', '$routeParams', '$ngBootbox', 'Notification', 'Account', 'Operation',
function($scope, $rootScope, $routeParams, $ngBootbox, Notification, Account, Operation) {
// List of operations.
$scope.operations = [];
@ -423,7 +423,7 @@ angular.module('accountant')
$scope.delete = function(operation, $index) {
var id = operation.id;
bootbox.confirm(
$ngBootbox.confirm(
'Voulez-vous supprimer l\'opération \\\'' + operation.label + '\\\' ?',
function(result) {
if(result) {

View File

@ -29,8 +29,8 @@ angular.module('accountant')
.controller(
'SchedulerController', [
'$scope', '$rootScope', '$routeParams', 'Notification', 'ScheduledOperation',
function($scope, $rootScope, $routeParams, Notification, ScheduledOperation) {
'$scope', '$rootScope', '$routeParams', '$ngBootbox', 'Notification', 'ScheduledOperation',
function($scope, $rootScope, $routeParams, $ngBootbox, Notification, ScheduledOperation) {
// Operation store.
$scope.operations = [];
@ -90,7 +90,7 @@ angular.module('accountant')
$scope.delete = function(operation, $index) {
var id = operation.id;
bootbox.confirm(
$ngBootbox.confirm(
'Voulez-vous supprimer l\'operation planifiée \\\'' + operation.label + '\\\' ?',
function(result) {
if(result) {

View File

@ -75,6 +75,7 @@
<script src="static/bower_components/meanie-angular-storage/release/meanie-angular-storage.js"></script>
<script src="static/bower_components/bootbox/bootbox.js"></script>
<script src="static/bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="static/bower_components/ngBootbox/dist/ngBootbox.js"></script>
<!-- endbower -->
<!-- Custom Javascript libraries -->