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
......@@ -150,9 +150,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
};
$scope.cancel = function() {
$mdDialog.hide();
};
$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() {
$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');
}
};
function updateGrid(action, record){
if($scope.alertMsg == ""){
if($scope.result == "Success"){
......
......@@ -256,7 +256,19 @@ myApp.controller("domainController",
};
$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.deliveryHeads = function() {
......
......@@ -702,12 +702,23 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$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.cancelDialog = function() {
$scope.cancelDialog = function() {
$mdDialog.hide('Cancelled');
};
};
$scope.cancelTab = function() {
removeTab("cancel");
......
......@@ -188,7 +188,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
});
};
$scope.cancel = function() {
$mdDialog.hide();
$mdDialog.hide();
};
$scope.viewTeamDetail = function(action, userData){
$('#home').addClass('md-scroll-mask');
......@@ -234,9 +234,8 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
};
$scope.cancel = function() {
$mdDialog.hide();
};
$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() {
$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');
}
};
function updateGrid(action, record){
......
......@@ -176,8 +176,8 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
});
};
$scope.cancel = function() {
$mdDialog.hide();
};
$mdDialog.hide();
};
$scope.viewTeamDetail = function(action, userData){
$('#home').addClass('md-scroll-mask');
userData.action = action;
......@@ -222,9 +222,8 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
};
$scope.cancel = function() {
$mdDialog.hide();
$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() {
$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');
}
};
function updateGrid(action, record){
......
......@@ -168,8 +168,8 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
});
};
$scope.cancel = function() {
$mdDialog.hide();
};
$mdDialog.hide();
};
$scope.viewTeamDetail = function(action, userData){
$('#home').addClass('md-scroll-mask');
userData.action = action;
......@@ -214,9 +214,8 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
};
$scope.cancel = function() {
$mdDialog.hide();
};
$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() {
$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');
}
};
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