Skip to content

Commit

Permalink
Merge pull request #24 from OpenOlitor/fix/OO-773_use_oo_service
Browse files Browse the repository at this point in the history
Fix/oo 773 use oo service
  • Loading branch information
rawyler committed Oct 9, 2017
2 parents 46f5eb5 + 16b1dab commit b54ac29
Show file tree
Hide file tree
Showing 7 changed files with 11,652 additions and 11 deletions.
5 changes: 4 additions & 1 deletion app/scripts/common/components/oo-dialogokabort.directive.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
'use strict';

angular.module('openolitor-core').controller('ooDialogOkAbortModalInstanceCtrl', function ($scope, $uibModalInstance, message) {
angular.module('openolitor-core').controller('ooDialogOkAbortModalInstanceCtrl', function ($scope, $uibModalInstance, message, title, dismissOnly, dismissButtonTitle) {

$scope.title = title;
$scope.message = message;
$scope.dismissOnly = dismissOnly;
$scope.dismissButtonTitle = dismissButtonTitle;

$scope.ok = function () {
$uibModalInstance.close();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="modal-header">
<h3 translate>Bestätigung</h3>
</div>'
<h3 ng-if="title" translate>{{title | translate}}</h3>
<h3 ng-if="!title" translate>Bestätigung</h3>
</div>
<div class="modal-body">
<div>
<span ng-if="message">{{message}}</span>
Expand All @@ -9,6 +10,7 @@ <h3 translate>Bestätigung</h3>

</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-show="true" ng-click="ok()" translate>Ok</button>
<button type="button" class="btn btn-primary" ng-click="cancel()" translate>Abbrechen</button>
<button ng-if="!dismissOnly" type="button" class="btn btn-danger" ng-show="true" ng-click="ok()" translate>Ok</button>
<button ng-if="dismissButtonTitle" type="button" class="btn btn-primary" ng-click="cancel()">{{dismissButtonTitle | translate}}</button>
<button ng-if="!dismissButtonTitle" type="button" class="btn btn-primary" ng-click="cancel()" translate>Abbrechen</button>
</div>
14 changes: 13 additions & 1 deletion app/scripts/common/services/oo-dialog.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@
angular.module('openolitor-core').factory('dialogService', ['$uibModal', function($uibModal) {

return {
displayDialogOkAbort: function(msg, okFct) {
displayDialogOkAbort: function(msg, okFct, title, dismissOnly, dismissButtonTitle) {
var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'scripts/common/components/oo-dialogokabort.directive.modal.html',
controller: 'ooDialogOkAbortModalInstanceCtrl',
resolve: {
message: function() {
return msg;
},

title: function() {
return title;
},

dismissOnly: function() {
return dismissOnly;
},

dismissButtonTitle: function() {
return dismissButtonTitle;
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openolitor-core",
"version": "1.0.46",
"version": "1.0.47",
"ignore": [],
"private": false,
"main": [
Expand Down
6 changes: 3 additions & 3 deletions dist/scripts/openolitor-core.js

Large diffs are not rendered by default.

0 comments on commit b54ac29

Please sign in to comment.