|
59 | 59 | actions: { |
60 | 60 | // Remove multiple events |
61 | 61 | remove: { |
62 | | - label: 'Delete Events', |
| 62 | + label: 'label.delete.events', |
63 | 63 | isHeader: true, |
64 | 64 | addRow: false, |
65 | 65 | messages: { |
66 | 66 | notification: function(args) { |
67 | | - return 'Events Deleted'; |
| 67 | + return 'label.delete.events'; |
68 | 68 | } |
69 | 69 | }, |
70 | 70 | createForm: { |
71 | | - title: 'Delete Events', |
| 71 | + title: 'label.delete.events', |
72 | 72 | desc: '', |
73 | 73 | fields: { |
74 | 74 | type: { |
75 | | - label: 'By event type', |
| 75 | + label: 'label.by.event.type', |
76 | 76 | docID: 'helpEventsDeleteType' |
77 | 77 | }, |
78 | 78 | startdate: { |
79 | | - label: 'By date (start date)', |
| 79 | + label: 'label.by.date.start', |
80 | 80 | docID: 'helpEventsDeleteDate', |
81 | 81 | isDatepicker: true |
82 | 82 | }, |
83 | 83 | enddate: { |
84 | | - label: 'By date (end date)', |
| 84 | + label: 'label.by.date.end', |
85 | 85 | docID: 'helpEventsDeleteDate', |
86 | 86 | isDatepicker: true |
87 | 87 | } |
|
107 | 107 | }); |
108 | 108 |
|
109 | 109 | $.ajax({ |
110 | | - |
111 | 110 | url: createURL("deleteEvents"), |
112 | 111 | data: data, |
113 | | - dataType: 'json', |
114 | | - async: false, |
115 | | - |
116 | 112 | success: function(data) { |
117 | | - |
118 | 113 | args.response.success(); |
119 | | - |
120 | 114 | } |
121 | 115 | }); |
122 | | - // Reloads window with events removed |
123 | | - $(window).trigger('cloudStack.fullRefresh'); |
124 | 116 | } |
125 | 117 | }, |
126 | 118 |
|
127 | 119 | // Archive multiple events |
128 | 120 | archive: { |
129 | | - label: 'Archive Events', |
| 121 | + label: 'label.archive.events', |
130 | 122 | isHeader: true, |
131 | 123 | addRow: false, |
132 | 124 | messages: { |
133 | 125 | notification: function(args) { |
134 | | - return 'Archive events'; |
| 126 | + return 'label.archive.events'; |
135 | 127 | } |
136 | 128 | }, |
137 | 129 | createForm: { |
138 | | - title: 'Archive Events', |
| 130 | + title: 'label.archive.events', |
139 | 131 | desc: '', |
140 | 132 | fields: { |
141 | 133 | type: { |
142 | | - label: 'By event type', |
| 134 | + label: 'label.by.event.type', |
143 | 135 | docID: 'helpEventsArchiveType' |
144 | 136 | }, |
145 | 137 | startdate: { |
146 | | - label: 'By date (start date)', |
| 138 | + label: 'label.by.date.start', |
147 | 139 | docID: 'helpEventsArchiveDate', |
148 | 140 | isDatepicker: true |
149 | 141 | }, |
150 | 142 | enddate: { |
151 | | - label: 'By date (end date)', |
| 143 | + label: 'label.by.date.end', |
152 | 144 | docID: 'helpEventsArchiveDate', |
153 | 145 | isDatepicker: true |
154 | 146 | } |
|
173 | 165 | }); |
174 | 166 |
|
175 | 167 | $.ajax({ |
176 | | - |
177 | 168 | url: createURL("archiveEvents"), |
178 | 169 | data: data, |
179 | 170 | dataType: 'json', |
180 | 171 | async: false, |
181 | 172 |
|
182 | 173 | success: function(data) { |
183 | | - |
184 | 174 | args.response.success(); |
185 | | - |
186 | 175 | } |
187 | 176 | }); |
188 | 177 |
|
189 | | - // Reloads window with events removed |
190 | | - $(window).trigger('cloudStack.fullRefresh'); |
191 | 178 | } |
192 | 179 | } |
193 | 180 |
|
|
269 | 256 | return true; |
270 | 257 | } |
271 | 258 | } |
272 | | - /* |
273 | | - , |
274 | | - startdate: { |
275 | | - label: 'Start Date', |
276 | | - isDatepicker: true |
277 | | - }, |
278 | | - enddate: { |
279 | | - label: 'End Date', |
280 | | - isDatepicker: true |
281 | | - } |
282 | | - */ |
283 | 259 | }, |
284 | 260 |
|
285 | 261 | dataProvider: function(args) { |
|
317 | 293 | $.ajax({ |
318 | 294 | url: createURL("deleteEvents&ids=" + args.context.events[0].id), |
319 | 295 | success: function(json) { |
320 | | - |
321 | 296 | args.response.success(); |
322 | | - |
| 297 | + $(window).trigger('cloudStack.fullRefresh'); |
323 | 298 | } |
324 | 299 |
|
325 | 300 | }); |
|
342 | 317 | $.ajax({ |
343 | 318 | url: createURL("archiveEvents&ids=" + args.context.events[0].id), |
344 | 319 | success: function(json) { |
345 | | - |
346 | 320 | args.response.success(); |
347 | | - |
| 321 | + $(window).trigger('cloudStack.fullRefresh'); |
348 | 322 | } |
349 | | - |
350 | 323 | }); |
351 | | - |
352 | | - |
353 | | - // Reloads window with item archived |
354 | | - $(window).trigger('cloudStack.fullRefresh'); |
355 | 324 | } |
356 | 325 | } |
357 | 326 | }, |
|
428 | 397 | actions: { |
429 | 398 | // Remove multiple Alerts |
430 | 399 | remove: { |
431 | | - label: 'Delete Alerts', |
| 400 | + label: 'label.delete.alerts', |
432 | 401 | isHeader: true, |
433 | 402 | addRow: false, |
434 | 403 | messages: { |
435 | 404 | notification: function(args) { |
436 | | - return 'Alerts Deleted'; |
| 405 | + return 'label.delete.alerts'; |
437 | 406 | } |
438 | 407 | }, |
439 | 408 | createForm: { |
440 | | - title: 'Delete Alerts', |
| 409 | + title: 'label.delete.alerts', |
441 | 410 | desc: '', |
442 | 411 | fields: { |
443 | 412 | type: { |
444 | | - label: 'By Alert type', |
| 413 | + label: 'label.by.alert.type', |
445 | 414 | docID: 'helpAlertsDeleteType' |
446 | 415 | }, |
447 | 416 | startdate: { |
448 | | - label: 'By date (start date)', |
| 417 | + label: 'label.by.date.start', |
449 | 418 | docID: 'helpAlertsDeleteDate', |
450 | 419 | isDatepicker: true |
451 | 420 | }, |
452 | 421 | enddate: { |
453 | | - label: 'By date (end than)', |
| 422 | + label: 'label.by.date.end', |
454 | 423 | docID: 'helpAlertsDeleteDate', |
455 | 424 | isDatepicker: true |
456 | 425 | } |
|
476 | 445 | }); |
477 | 446 |
|
478 | 447 | $.ajax({ |
479 | | - |
480 | 448 | url: createURL("deleteAlerts"), |
481 | 449 | data: data, |
482 | 450 | dataType: 'json', |
483 | 451 | async: false, |
484 | 452 |
|
485 | 453 | success: function(data) { |
486 | | - |
487 | 454 | args.response.success(); |
488 | | - |
489 | 455 | } |
490 | 456 | }); |
491 | | - // Reloads window with events removed |
492 | | - $(window).trigger('cloudStack.fullRefresh'); |
493 | 457 | } |
494 | 458 | }, |
495 | 459 |
|
496 | 460 | // Archive multiple Alerts |
497 | 461 | archive: { |
498 | | - label: 'Archive Alerts', |
| 462 | + label: 'label.archive.alerts', |
499 | 463 | isHeader: true, |
500 | 464 | addRow: false, |
501 | 465 | messages: { |
502 | 466 | notification: function(args) { |
503 | | - return 'Alerts Archived'; |
| 467 | + return 'label.archive.alerts'; |
504 | 468 | } |
505 | 469 | }, |
506 | 470 | createForm: { |
507 | | - title: 'Archive Alerts', |
| 471 | + title: 'label.archive.alerts', |
508 | 472 | desc: '', |
509 | 473 | fields: { |
510 | 474 | type: { |
511 | | - label: 'By Alert type', |
| 475 | + label: 'label.by.alert.type', |
512 | 476 | docID: 'helpAlertsArchiveType' |
513 | 477 | }, |
514 | 478 | startdate: { |
515 | | - label: 'By date (start date)', |
| 479 | + label: 'label.by.date.start', |
516 | 480 | docID: 'helpAlertsArchiveDate', |
517 | 481 | isDatepicker: true |
518 | 482 | }, |
519 | 483 | enddate: { |
520 | | - label: 'By date (end date)', |
| 484 | + label: 'label.by.date.end', |
521 | 485 | docID: 'helpAlertsArchiveDate', |
522 | 486 | isDatepicker: true |
523 | 487 | } |
|
543 | 507 | }); |
544 | 508 |
|
545 | 509 | $.ajax({ |
546 | | - |
547 | 510 | url: createURL("archiveAlerts"), |
548 | 511 | data: data, |
549 | 512 | dataType: 'json', |
550 | 513 | async: false, |
551 | 514 |
|
552 | 515 | success: function(data) { |
553 | | - |
554 | 516 | args.response.success(); |
555 | | - |
556 | 517 | } |
557 | 518 | }); |
558 | | - |
559 | | - // Reloads window with events removed |
560 | | - $(window).trigger('cloudStack.fullRefresh'); |
561 | 519 | } |
562 | 520 | } |
563 | | - |
564 | 521 | }, |
565 | 522 |
|
566 | 523 | dataProvider: function(args) { |
|
599 | 556 | $.ajax({ |
600 | 557 | url: createURL("deleteAlerts&ids=" + args.context.alerts[0].id), |
601 | 558 | success: function(json) { |
602 | | - |
603 | 559 | args.response.success(); |
604 | | - |
| 560 | + $(window).trigger('cloudStack.fullRefresh'); |
605 | 561 | } |
606 | | - |
607 | 562 | }); |
608 | | - $(window).trigger('cloudStack.fullRefresh'); |
609 | 563 |
|
610 | 564 | } |
611 | 565 | }, |
|
625 | 579 | $.ajax({ |
626 | 580 | url: createURL("archiveAlerts&ids=" + args.context.alerts[0].id), |
627 | 581 | success: function(json) { |
628 | | - |
629 | 582 | args.response.success(); |
630 | | - |
| 583 | + $(window).trigger('cloudStack.fullRefresh'); |
631 | 584 | } |
632 | | - |
633 | 585 | }); |
634 | | - |
635 | | - |
636 | | - // Reloads window with item archived |
637 | | - $(window).trigger('cloudStack.fullRefresh'); |
638 | 586 | } |
639 | 587 | } |
640 | 588 |
|
|
0 commit comments