Commit cd48f6c9 authored by nakavaram-nisum-com's avatar nakavaram-nisum-com Committed by tdutta-nisum-com

MT-92 Error message or Warning message _Defect (#64)

parent 93d1721d
......@@ -371,7 +371,16 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
};
$scope.cancel = function() {
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
......@@ -259,7 +259,16 @@ myApp.controller("domainController",
};
$scope.cancel = function() {
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
......@@ -703,7 +703,16 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope.cancel = function () {
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
......@@ -452,7 +452,16 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
};
$scope.cancel = function() {
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
......@@ -400,7 +400,16 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
};
$scope.cancel = function() {
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
......@@ -167,7 +167,16 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$mdSelect.hide();
}
$scope.cancel = function(){
if(this.myForm.$dirty){
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
......
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