(options)
| 297 | } |
| 298 | |
| 299 | function jQueryDialogAlert(options) { |
| 300 | let title = (options.title !== undefined) ? options.title : ""; |
| 301 | switch (options.icon) { |
| 302 | case "error": |
| 303 | options.title = `❌ ${title}`; |
| 304 | break; |
| 305 | case "warning": |
| 306 | options.title = `⚠️ ${title}`; |
| 307 | break; |
| 308 | case "success": |
| 309 | options.title = `✔️ ${title}`; |
| 310 | break; |
| 311 | default: |
| 312 | options.title = `📘 ${title}`; |
| 313 | break; |
| 314 | } |
| 315 | $("#jquery_alert").html(options.message).dialog({ |
| 316 | show: { |
| 317 | effect: "scale", |
| 318 | duration: 300 |
| 319 | }, |
| 320 | hide: { |
| 321 | effect: "scale", |
| 322 | duration: 300 |
| 323 | }, |
| 324 | width: 600, |
| 325 | resizable: false, |
| 326 | modal: true, |
| 327 | title: title, |
| 328 | buttons: { |
| 329 | 'Ok': function() { |
| 330 | $(this).dialog('close'); |
| 331 | } |
| 332 | }, |
| 333 | ...options |
| 334 | }); |
| 335 | } |
| 336 | |
| 337 | // jQuery ready |
| 338 | $(function() { |
no test coverage detected