Add confirmation dialogs

Confirmation dialogs are provided by this module
http://schlogen.github.io/angular-confirm/

Closes-Bug: #1487060
Change-Id: If69652bca0b084e9c2335d9ccf256788f97dbee1
This commit is contained in:
sslypushenko 2015-08-27 16:11:42 +03:00 committed by Paul Van Eck
parent 9ec72d2b93
commit e504c11623
6 changed files with 8 additions and 5 deletions

View File

@ -8,6 +8,7 @@
"angular-resource": "1.3.15",
"angular-bootstrap": "0.12.1",
"angular-busy": "4.1.3",
"angular-confirm-modal": "1.1.0",
"bootstrap": "3.3.2"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
/** Main app module where application dependencies are listed. */
var refstackApp = angular.module('refstackApp', [
'ui.router', 'ui.bootstrap', 'cgBusy', 'ngResource']);
'ui.router', 'ui.bootstrap', 'cgBusy', 'ngResource', 'angular-confirm']);
/**
* Handle application routing. Specific templates and controllers will be

View File

@ -5,6 +5,7 @@
<textarea type="text" rows="10" cols="67" readonly="readonly">{{::rawKey}}</textarea>
<div class="modal-footer">
<button class="btn btn-warning" ng-click="cancel()">Cancel</button>
<button type="button" class="btn btn-danger btn-sm" ng-click="deletePubKey()">Delete</button>
<button type="button" class="btn btn-danger btn-sm" ng-click="deletePubKey() "
confirm="Are you sure you want to delete this public key? You will lose management access to any test results signed with this key.">Delete</button>
</div>
</div>

View File

@ -17,9 +17,9 @@
</div>
<div class="pull-right">
<div ng-show="isEditingAllowed()">
<button class="btn btn-warning" ng-hide="isShared()" ng-click="shareTestRun(true)">Share</button>
<button class="btn btn-warning" ng-hide="isShared()" ng-click="shareTestRun(true)" confirm="Are you sure you want to share these test run results with the community?">Share</button>
<button class="btn btn-success" ng-show="isShared()" ng-click="shareTestRun(false)">Unshare</button>
<button type="button" class="btn btn-danger" ng-click="deleteTestRun()">Delete</button>
<button type="button" class="btn btn-danger" ng-click="deleteTestRun()" confirm="Are you sure you want to delete these test run results?">Delete</button>
</div>
</div>
</div>

View File

@ -33,6 +33,7 @@
<script src="assets/lib/angular-bootstrap/ui-bootstrap.min.js"></script>
<script src="assets/lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="assets/lib/angular-busy/dist/angular-busy.min.js"></script>
<script src="assets/lib/angular-confirm-modal/angular-confirm.js"></script>
<script src="app.js"></script>
<script src="assets/js/refstack.js"></script>

View File

@ -14,7 +14,7 @@ module.exports = function (config) {
'app/assets/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
'app/assets/lib/angular-busy/dist/angular-busy.min.js',
'app/assets/lib/angular-resource/angular-resource.min.js',
'app/assets/lib/angular-confirm-modal/angular-confirm.js',
// JS files.
'app/app.js',
'app/components/**/*.js',