@ -185,6 +185,9 @@ function setSpeedAlert() {
if ( speedAlertValue == null || speedAlertValue === undefined || speedAlertValue == "" ) {
if ( speedAlertValue == null || speedAlertValue === undefined || speedAlertValue == "" ) {
var message = "Speed cannot be empty." ;
var message = "Speed cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
} else if ( areaName . indexOf ( " " ) > - 1 ) {
var message = "Area Name cannot contain spaces." ;
noty ( { text : message , type : 'error' } ) ;
} else {
} else {
data = {
data = {
'parseData' : JSON . stringify ( { 'speedAlertValue' : speedAlertValue , 'deviceId' : deviceId } ) , // parseKey : parseValue pair , this key pair is replace with the key in the template file
'parseData' : JSON . stringify ( { 'speedAlertValue' : speedAlertValue , 'deviceId' : deviceId } ) , // parseKey : parseValue pair , this key pair is replace with the key in the template file
@ -235,6 +238,9 @@ function setWithinAlert(leafletId) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
var message = "Area Name cannot be empty." ;
var message = "Area Name cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
} else if ( areaName . indexOf ( " " ) > - 1 ) {
var message = "Area Name cannot contain spaces." ;
noty ( { text : message , type : 'error' } ) ;
} else {
} else {
var data = {
var data = {
'parseData' : JSON . stringify ( {
'parseData' : JSON . stringify ( {
@ -288,6 +294,9 @@ function setExitAlert(leafletId) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
var message = "Area Name cannot be empty." ;
var message = "Area Name cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
} else if ( areaName . indexOf ( " " ) > - 1 ) {
var message = "Area Name cannot contain spaces." ;
noty ( { text : message , type : 'error' } ) ;
} else {
} else {
var data = {
var data = {
'parseData' : JSON . stringify ( {
'parseData' : JSON . stringify ( {
@ -348,6 +357,9 @@ function setStationeryAlert(leafletId) {
if ( stationeryName == null || stationeryName === undefined || stationeryName == "" ) {
if ( stationeryName == null || stationeryName === undefined || stationeryName == "" ) {
var message = "Stationery Name cannot be empty." ;
var message = "Stationery Name cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
} else if ( stationeryName . indexOf ( " " ) > - 1 ) {
var message = "Stationery Name cannot contain spaces." ;
noty ( { text : message , type : 'error' } ) ;
} else if ( fluctuationRadius == null || fluctuationRadius === undefined || fluctuationRadius == "" ) {
} else if ( fluctuationRadius == null || fluctuationRadius === undefined || fluctuationRadius == "" ) {
var message = "Fluctuation Radius cannot be empty." ;
var message = "Fluctuation Radius cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
@ -462,6 +474,9 @@ function setTrafficAlert(leafletId) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
if ( areaName == null || areaName === undefined || areaName == "" ) {
var message = "Area Name cannot be empty." ;
var message = "Area Name cannot be empty." ;
noty ( { text : message , type : 'error' } ) ;
noty ( { text : message , type : 'error' } ) ;
} else if ( areaName . indexOf ( " " ) > - 1 ) {
var message = "Area Name cannot contain spaces." ;
noty ( { text : message , type : 'error' } ) ;
} else {
} else {
var data = {
var data = {
'parseData' : JSON . stringify ( {
'parseData' : JSON . stringify ( {