gicristhie

Untitled

Feb 26th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. confirm_delete: function (params) {
  2. var title = null;
  3. if(params.title){title = params.title;} else{title = "confirm?";}
  4.  
  5. iziToast.show({
  6. timeout: 20000,
  7. close: false,
  8. overlay: true,
  9. toastOnce: true,
  10. id: 'question',
  11. zindex: 9999,
  12. title: title,
  13. message: '',
  14. position: 'center',
  15. buttons: [
  16. ['<button class="ml-5" style="background-color: #3875d7; color: white; border-radius: 2px;">'+ App.lang.get("yes") +'</button>', function (instance, toast) {
  17. instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
  18. //call service
  19. if(params.callback){params.callback();}
  20. }],
  21. ['<button style="background-color: #333333; color: white; border-radius: 2px;">'+ App.lang.get("no") +'</button>', function (instance, toast) {
  22.  
  23. instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
  24.  
  25. }]
  26. ],
  27. onClosing: function(instance, toast, closedBy){
  28. console.info('Closing | closedBy: ' + closedBy);
  29. },
  30. onClosed: function(instance, toast, closedBy){
  31. console.info('Closed | closedBy: ' + closedBy);
  32. }
  33. });
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment