Commit 6808660f6d96d17efc992d08b9a81db0e318f35b
1 parent
725f1d75
not working in a case but working now
Showing
4 changed files
with
94 additions
and
141 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -70,7 +70,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -70,7 +70,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
70 | $rootScope.shapestyleFillBorderColor = "black"; | 70 | $rootScope.shapestyleFillBorderColor = "black"; |
71 | $rootScope.shapestyleborderWidth = 2; | 71 | $rootScope.shapestyleborderWidth = 2; |
72 | $rootScope.shapestyleborderStyles = "solid"; | 72 | $rootScope.shapestyleborderStyles = "solid"; |
73 | - | 73 | + $rootScope.errorMassage = ''; |
74 | 74 | ||
75 | $rootScope.userInfo = { | 75 | $rootScope.userInfo = { |
76 | username: null, | 76 | username: null, |
@@ -98,8 +98,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -98,8 +98,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
98 | $rootScope.AuthenticateUser = function (userInfo) { | 98 | $rootScope.AuthenticateUser = function (userInfo) { |
99 | if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { | 99 | if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { |
100 | 100 | ||
101 | - alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); | ||
102 | - | 101 | + // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); |
102 | + $rootScope.errorMassage = LoginMessageConstants.USER_CREDENTIALS_MISSING; | ||
103 | + $("#messageModal").modal('show'); | ||
103 | } | 104 | } |
104 | else { | 105 | else { |
105 | 106 | ||
@@ -115,12 +116,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -115,12 +116,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
115 | { | 116 | { |
116 | if (result == LoginConstants.USER_NOT_FOUND) { | 117 | if (result == LoginConstants.USER_NOT_FOUND) { |
117 | $rootScope.isVisibleLogin = true; | 118 | $rootScope.isVisibleLogin = true; |
118 | - alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); | 119 | + // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); |
120 | + $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; | ||
121 | + $("#messageModal").modal('show'); | ||
119 | 122 | ||
120 | } | 123 | } |
121 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { | 124 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { |
122 | - alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | 125 | + //alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
123 | $rootScope.isVisibleLogin = true; | 126 | $rootScope.isVisibleLogin = true; |
127 | + $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | ||
128 | + $("#messageModal").modal('show'); | ||
124 | } | 129 | } |
125 | else { | 130 | else { |
126 | if (result.loginId != undefined || result.loginId != "" || result.loginId != null) { | 131 | if (result.loginId != undefined || result.loginId != "" || result.loginId != null) { |
@@ -136,8 +141,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -136,8 +141,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
136 | }, | 141 | }, |
137 | function (error) { | 142 | function (error) { |
138 | console.log(' Error in authentication = ' + error.statusText); | 143 | console.log(' Error in authentication = ' + error.statusText); |
139 | - alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | 144 | + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
140 | $rootScope.isVisibleLogin = true; | 145 | $rootScope.isVisibleLogin = true; |
146 | + $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | ||
147 | + $("#messageModal").modal('show'); | ||
141 | }); | 148 | }); |
142 | } | 149 | } |
143 | 150 | ||
@@ -194,13 +201,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -194,13 +201,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
194 | AuthenticationService.SendMailToUser(userInfo) | 201 | AuthenticationService.SendMailToUser(userInfo) |
195 | .then(function (result) { | 202 | .then(function (result) { |
196 | if (result == LoginConstants.USER_NOT_FOUND) { | 203 | if (result == LoginConstants.USER_NOT_FOUND) { |
197 | - alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); | 204 | + // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); |
205 | + $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; | ||
206 | + $("#messageModal").modal('show'); | ||
198 | } | 207 | } |
199 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { | 208 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { |
200 | - alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | 209 | + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
210 | + $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | ||
211 | + $("#messageModal").modal('show'); | ||
201 | } | 212 | } |
202 | else if (result == LoginConstants.MAIL_NOT_SENT) { | 213 | else if (result == LoginConstants.MAIL_NOT_SENT) { |
203 | - alert(LoginMessageConstants.MAIL_NOT_SENT); | 214 | + // alert(LoginMessageConstants.MAIL_NOT_SENT); |
215 | + $rootScope.errorMassage = LoginMessageConstants.MAIL_NOT_SENT; | ||
216 | + $("#messageModal").modal('show'); | ||
204 | } | 217 | } |
205 | else { | 218 | else { |
206 | if (result.loginId != undefined || result.loginId != "" || result.loginId != null) { | 219 | if (result.loginId != undefined || result.loginId != "" || result.loginId != null) { |
@@ -217,8 +230,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -217,8 +230,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
217 | message = LoginMessageConstants.RESET_PASSWORD; | 230 | message = LoginMessageConstants.RESET_PASSWORD; |
218 | else | 231 | else |
219 | message = LoginMessageConstants.USERID_SENT_IN_EMAIL | 232 | message = LoginMessageConstants.USERID_SENT_IN_EMAIL |
220 | - alert(message); | ||
221 | - | 233 | + //alert(message); |
234 | + $rootScope.errorMassage = message; | ||
235 | + $("#messageModal").modal('show'); | ||
236 | + | ||
222 | 237 | ||
223 | } | 238 | } |
224 | } | 239 | } |
@@ -226,15 +241,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -226,15 +241,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
226 | }, | 241 | }, |
227 | function (error) { | 242 | function (error) { |
228 | console.log(' Error in authentication = ' + error.statusText); | 243 | console.log(' Error in authentication = ' + error.statusText); |
229 | - alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); | 244 | + // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); |
245 | + $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; | ||
246 | + $("#messageModal").modal('show'); | ||
230 | }); | 247 | }); |
231 | } | 248 | } |
232 | else { | 249 | else { |
233 | - alert(LoginMessageConstants.INCORRECT_EMAIL_ID); | 250 | + // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); |
251 | + $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; | ||
252 | + $("#messageModal").modal('show'); | ||
234 | } | 253 | } |
235 | } | 254 | } |
236 | else { | 255 | else { |
237 | - alert(LoginMessageConstants.BLANK_EMAIL_ID); | 256 | + //alert(LoginMessageConstants.BLANK_EMAIL_ID); |
257 | + $rootScope.errorMassage = LoginMessageConstants.BLANK_EMAIL_ID; | ||
258 | + $("#messageModal").modal('show'); | ||
259 | + | ||
238 | } | 260 | } |
239 | }; | 261 | }; |
240 | 262 | ||
@@ -266,14 +288,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -266,14 +288,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
266 | .then( | 288 | .then( |
267 | function (result) { | 289 | function (result) { |
268 | if (result == LoginConstants.USER_NOT_FOUND) { | 290 | if (result == LoginConstants.USER_NOT_FOUND) { |
269 | - alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); | 291 | + // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); |
292 | + $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; | ||
293 | + $("#messageModal").modal('show'); | ||
294 | + | ||
270 | } | 295 | } |
271 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { | 296 | else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { |
272 | - alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | 297 | + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
298 | + $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; | ||
299 | + $("#messageModal").modal('show'); | ||
300 | + | ||
273 | } | 301 | } |
274 | else { | 302 | else { |
275 | if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) { | 303 | if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) { |
276 | - alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE); | 304 | + // alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE); |
305 | + $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | ||
306 | + $("#messageModal").modal('show'); | ||
277 | $rootScope.isVisibleLogin = true; | 307 | $rootScope.isVisibleLogin = true; |
278 | $rootScope.isVisibleResetPass = false; | 308 | $rootScope.isVisibleResetPass = false; |
279 | $location.url("/") ; | 309 | $location.url("/") ; |
@@ -282,11 +312,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -282,11 +312,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
282 | }, | 312 | }, |
283 | function (error) { | 313 | function (error) { |
284 | console.log(' Error in authentication = ' + error.statusText); | 314 | console.log(' Error in authentication = ' + error.statusText); |
285 | - alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | 315 | + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
316 | + $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | ||
317 | + $("#messageModal").modal('show'); | ||
318 | + | ||
286 | }); | 319 | }); |
287 | } | 320 | } |
288 | else { | 321 | else { |
289 | $rootScope.errorMesaage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH; | 322 | $rootScope.errorMesaage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH; |
323 | + $("#messageModal").modal('show'); | ||
290 | } | 324 | } |
291 | } | 325 | } |
292 | 326 |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -293,11 +293,14 @@ AIA.constant("LoginMessageConstants", { | @@ -293,11 +293,14 @@ AIA.constant("LoginMessageConstants", { | ||
293 | "USERID_SENT_IN_EMAIL": "Please check you email, sent UserId in your email.", | 293 | "USERID_SENT_IN_EMAIL": "Please check you email, sent UserId in your email.", |
294 | "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", | 294 | "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", |
295 | "MAIL_NOT_SENT": "We are facing some issue in sending email. Please try after sometime.", | 295 | "MAIL_NOT_SENT": "We are facing some issue in sending email. Please try after sometime.", |
296 | - "INCORRECT_EMAIL_ID": "Please enter correct email id", | ||
297 | - "BLANK_EMAIL_ID": "Please enter your email id", | 296 | + "INCORRECT_EMAIL_ID": "Please enter correct email id.", |
297 | + "BLANK_EMAIL_ID": "Please enter your email id.", | ||
298 | "PASSWORD_RESET_MESSAGE": "Your password has been reset.", | 298 | "PASSWORD_RESET_MESSAGE": "Your password has been reset.", |
299 | "NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!", | 299 | "NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!", |
300 | - "USER_CREDENTIALS_MISSING":"Please Enter your credentials" | 300 | + "USER_CREDENTIALS_MISSING": "Please Enter your credentials.", |
301 | + "USER_NOT_FOUND": "User not found.", | ||
302 | + //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", | ||
303 | + //"MAIL_NOT_SENT": "Mail not sent." | ||
301 | 304 | ||
302 | }) | 305 | }) |
303 | AIA.constant("UserModules", [ | 306 | AIA.constant("UserModules", [ |
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1144,129 +1144,20 @@ | @@ -1144,129 +1144,20 @@ | ||
1144 | </tbody> | 1144 | </tbody> |
1145 | </table> | 1145 | </table> |
1146 | </div> | 1146 | </div> |
1147 | - <!--<div class="modal fade" id="editshapestyle" tabindex="-1" role="dialog" aria-labelledby="myModalLabel33" style="z-index:1000000000;width:302px;margin-left:auto;margin-right:auto;overflow:hidden;height:460px;"> | ||
1148 | - <div class="modal-dialog modal-sm" role="document"> | ||
1149 | - <div class="modal-content"> | ||
1150 | - <div class="modal-header annotation-modal-header"> | ||
1151 | - <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> | ||
1152 | - </div> | ||
1153 | - <div class="modal-body"> | ||
1154 | - <div class="marginTopBtm10"> | ||
1155 | - <div class="well well-sm no-margin-btm"> | ||
1156 | - <div class="row"> | ||
1157 | - <div class="col-sm-12"> | ||
1158 | - <div class="checkbox no-margin"> | ||
1159 | - <label> | ||
1160 | - <input id="fill-option" type="checkbox" checked onclick="enableDisableFillOption()"> Fill Option | ||
1161 | - </label> | ||
1162 | - </div> | ||
1163 | - </div> | ||
1164 | - <div class="col-sm-6 enableDisableOpacity"> | ||
1165 | - <div class="radio"> | ||
1166 | - <label> | ||
1167 | - <input type="radio" name="filloption" id="filloption1" value="filloption1"> | ||
1168 | - <span class="">Texture</span> | ||
1169 | - <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern"> | ||
1170 | - </label> | ||
1171 | - </div> | ||
1172 | - <div class="radio"> | ||
1173 | - <label> | ||
1174 | - <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;"> | ||
1175 | - | ||
1176 | - | ||
1177 | - <div id="editstylebackgroundcolor" class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> | ||
1178 | - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span> | ||
1179 | - <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc"> | ||
1180 | - </div> | ||
1181 | - | ||
1182 | - | ||
1183 | - | ||
1184 | - </label> | ||
1185 | - </div> | ||
1186 | - </div> | ||
1187 | - <div class="col-sm-6 no-padding marginTop10 enableDisableOpacity"> | ||
1188 | - <div class="row"> | ||
1189 | - <label class="pull-left" style="font-weight:normal;">Scale</label> | ||
1190 | - <div id="edit-slider-3" class="pull-left" style="width:62%; margin-left:3%; margin-top:2%;"> | ||
1191 | - <div id="slider-range-min-3"></div> | ||
1192 | - | ||
1193 | - </div> | ||
1194 | - </div> | ||
1195 | - | ||
1196 | - <div class="row"> | ||
1197 | - <label class="pull-left" style="font-weight:normal;">Opacity</label> | ||
1198 | - <div id="edit-slider-4" class="pull-left" style="width:53%; margin-left:3%; margin-top:2%;"> | ||
1199 | - <div id="slider-range-min-4"></div> | ||
1200 | - </div> | ||
1201 | - </div> | ||
1202 | - | ||
1203 | - <div class="clearfix"></div> | ||
1204 | - | ||
1205 | - | ||
1206 | - </div> | ||
1207 | - </div> | ||
1208 | - | ||
1209 | - </div> | ||
1210 | - </div> | ||
1211 | - <div class="marginTopBtm10"> | ||
1212 | - <div class="well well-sm no-margin-btm"> | ||
1213 | - <div class="row"> | ||
1214 | - <div class="col-sm-12"> | ||
1215 | - <div class="checkbox no-margin"> | ||
1216 | - <label> | ||
1217 | - <input id="Outline-Option" onclick="enableDisableOutline()" type="checkbox" checked> Outline Option | ||
1218 | - </label> | ||
1219 | - </div> | ||
1220 | - </div> | ||
1221 | - <div class="col-sm-6 setEnableDisableForEditShapeStyle"> | ||
1222 | - <label class="marginTop5"> | ||
1223 | - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span> | ||
1224 | - <div class="form-group" id="outlineColor" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> | ||
1225 | - | ||
1226 | - <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc"> | ||
1227 | - </div> | 1147 | + |
1148 | + <div class="modal fade" id="messageModal" role="dialog" style="z-index:10;"> | ||
1149 | + <div class="modal-dialog"> | ||
1228 | 1150 | ||
1229 | - | ||
1230 | - </label> | ||
1231 | - </div> | ||
1232 | - | ||
1233 | - <div class="col-sm-6 setEnableDisableForEditShapeStyle"> | ||
1234 | - <div class="form-horizontal"> | ||
1235 | - <div class="form-group"> | ||
1236 | - <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label> | ||
1237 | - <div class="col-sm-9 marginTop5"> | ||
1238 | - <select id="borderWidthCanvasElement" class="form-control input-sm"> | ||
1239 | - <option value="1">1</option> | ||
1240 | - <option value="2">2</option> | ||
1241 | - <option value="3">3</option> | ||
1242 | - <option value="4">4</option> | ||
1243 | - <option value="5">5</option> | ||
1244 | - </select> | ||
1245 | - </div> | ||
1246 | - </div> | ||
1247 | - </div> | ||
1248 | - </div> | ||
1249 | - | ||
1250 | - </div> | ||
1251 | - </div> | ||
1252 | - </div> | ||
1253 | - | ||
1254 | - <div class="marginTopBtm10"> | ||
1255 | - <div class="well well-sm no-margin-btm"> | ||
1256 | - <img id="imgOpacity" class="img-rounded img-responsive imgopacity" alt="..." src="content/images/blank-shape.jpg"> | ||
1257 | - </div> | ||
1258 | - </div> | ||
1259 | - </div> | ||
1260 | - <div class="modal-footer"> | ||
1261 | - <button type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')"> | ||
1262 | - | ||
1263 | - OK | ||
1264 | - </button> | ||
1265 | - <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> | 1151 | + <div class="modal-content"> |
1152 | + <div class="modal-header"> | ||
1153 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
1266 | </div> | 1154 | </div> |
1155 | + <div class="modal-title"></div> | ||
1156 | + <div class="modal-body">{{errorMassage}}</div> | ||
1157 | + <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div> | ||
1267 | </div> | 1158 | </div> |
1268 | </div> | 1159 | </div> |
1269 | - </div>--> | 1160 | + </div> |
1270 | 1161 | ||
1271 | <script> | 1162 | <script> |
1272 | 1163 |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
@@ -957,4 +957,29 @@ background-size:cover; | @@ -957,4 +957,29 @@ background-size:cover; | ||
957 | { | 957 | { |
958 | color: #fff; | 958 | color: #fff; |
959 | } | 959 | } |
960 | - | ||
961 | \ No newline at end of file | 960 | \ No newline at end of file |
961 | + | ||
962 | + #messageModal .modal-dialog | ||
963 | + { | ||
964 | + width:300px | ||
965 | + } | ||
966 | + #messageModal .modal-content | ||
967 | + { | ||
968 | + | ||
969 | + box-shadow: 0 0 40px rgba(0,0,0,.5); | ||
970 | + border: rgba(0,0,0,0); | ||
971 | + } | ||
972 | + #messageModal .modal-body | ||
973 | + { | ||
974 | + text-align:center; | ||
975 | + } | ||
976 | + #messageModal .modal-header | ||
977 | + { | ||
978 | + padding: 6px; | ||
979 | + border-bottom: none; | ||
980 | + } | ||
981 | + #messageModal .modal-footer | ||
982 | + { | ||
983 | + border-top: none; | ||
984 | + padding: 20px 10px; | ||
985 | + text-align:center; | ||
986 | + } | ||
962 | \ No newline at end of file | 987 | \ No newline at end of file |