Commit 5090136e authored by nakavaram-nisum-com's avatar nakavaram-nisum-com Committed by rbonthala-nisum-com

MT-92 Error message or Warning message (#51)

parent afdeb36f
......@@ -152,7 +152,6 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope.cancel = function() {
$mdDialog.hide();
};
$scope.deleteRole = function(row){
$('#home').addClass('md-scroll-mask');
var confirm = $mdDialog.confirm()
......@@ -167,7 +166,6 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
console.log("Cancelled dialog");
});
};
function deleteUserRole(empId){
var req = {
method : 'DELETE',
......@@ -373,9 +371,20 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
};
$scope.cancel = function() {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
function updateGrid(action, record){
if($scope.alertMsg == ""){
if($scope.result == "Success"){
......
......@@ -256,7 +256,19 @@ myApp.controller("domainController",
};
$scope.cancel = function() {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
$scope.deliveryHeads = function() {
......
......@@ -702,9 +702,20 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope.cancel = function () {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
$scope.cancelDialog = function() {
$mdDialog.hide('Cancelled');
};
......
......@@ -236,7 +236,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope.cancel = function() {
$mdDialog.hide();
};
$scope.deleteRole = function(row,id){
$('#home').addClass('md-scroll-mask');
var confirm = $mdDialog.confirm()
......@@ -716,7 +715,19 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
};
$scope.cancel = function() {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
function updateGrid(action, record){
......
......@@ -224,7 +224,6 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
$scope.cancel = function() {
$mdDialog.hide();
};
$scope.deleteRole = function(row,id){
$('#home').addClass('md-scroll-mask');
var confirm = $mdDialog.confirm()
......@@ -453,7 +452,19 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
};
$scope.cancel = function() {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
function updateGrid(action, record){
......
......@@ -216,7 +216,6 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
$scope.cancel = function() {
$mdDialog.hide();
};
$scope.deleteRole = function(row,id){
$('#home').addClass('md-scroll-mask');
var confirm = $mdDialog.confirm()
......@@ -401,9 +400,20 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
};
$scope.cancel = function() {
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
};
function updateGrid(action, record){
if($scope.alertMsg == ""){
if($scope.result == "Success"){
......
......@@ -160,7 +160,19 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$mdSelect.hide();
}
$scope.cancel = function(){
$mdDialog.hide("Cancelled");
if(this.myForm.$dirty){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
$mdDialog.hide('Cancelled');
})
}
else{
$mdDialog.hide('Cancelled');
}
}
$scope.updateSearch = function (e) {
e.stopPropagation();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment