Commit 27627f50 authored by ssathu-nisum-com's avatar ssathu-nisum-com Committed by rbonthala-nisum-com

Errormessage_or_Warningmessage_is_not_displayed (#75)

parent 88eb83a8
......@@ -409,7 +409,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
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) {
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined) {
console.log("Came here!");
showConfirmDialog = true;
}
......
......@@ -235,9 +235,9 @@ myApp.controller("domainController",
var allAccounts = myFactory.getAccounts();
function getActiveAccounts(){
var activeAccounts = [];
for ( i in allAccounts){
for (var i in allAccounts){
console.log(allAccounts[i]);
if(allAccounts[i].status == "Y"){
if(allAccounts[i].status == "Active" || allAccounts[i].status == "Y"){
activeAccounts.push(allAccounts[i]);
}
}
......
......@@ -716,7 +716,16 @@ myApp.controller("projectTeamController",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) {
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