Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

77 строки
3.2 KiB

  1. /**
  2. * Created by Benny on 14.11.2014.
  3. */
  4. "use strict";
  5. var TB = TB || {};
  6. TB.Ext = TB.Ext || {};
  7. /**
  8. * Currently using http://tristanedwards.me/sweetalert
  9. *
  10. * @type {{show: Function, modal: Function}}
  11. */
  12. TB.Ext.Alert = {
  13. show : function( title, text ) {
  14. swal( title, text );
  15. },
  16. modal : function( opts, onConfirm ) {
  17. swal({
  18. title: (opts.title) ? opts.title : null,
  19. text: ( opts.text ) ? opts.text : null,
  20. html: ( opts.hasOwnProperty( 'html' ) ) ? opts.html : false,
  21. type: ( opts.type ) ? opts.type : "warning",
  22. showCancelButton: ( typeof opts.showCancelButton === "boolean" ) ? opts.showCancelButton : true,
  23. confirmButtonColor: (opts.confirmButtonColor ) ? opts.confirmButtonColor : "#DD6B55",
  24. confirmButtonText: ( opts.confirmButtonText ) ? opts.confirmButtonText : 'Ok'
  25. }, function() {
  26. onConfirm && onConfirm();
  27. });
  28. },
  29. noPremiumBuy : function()
  30. {
  31. swal({
  32. title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
  33. //text : 'Dies ist eine Premium Funktion. Leider hat dein Team keinen Premium Status. Klicke auf den Premium Button um die und andere Funktionen für dein gesamtes Team freizuschalten.',
  34. type: 'warning',
  35. html : true,
  36. text : '<p>Ooops. Wie es aussieht hat dein Team <strong>keinen</strong> Premium Status.</p><p>Um diese und andere Funktionen zu benutzen, klicke auf <strong>"Jetzt Premium"</strong> für weitere Informationen.</p>',
  37. showCancelButton : true,
  38. confirmButtonColor : '#CCAC00',
  39. confirmButtonText : 'Jetzt Premium'
  40. }, function() {
  41. TB.Controller.do( 'Settings', 'order_premium' );
  42. });
  43. },
  44. noPremiumInfo : function()
  45. {
  46. swal({
  47. title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
  48. //text : 'Dies ist eine Premium Funktion. Leider hat dein Team keinen Premium Status. Klicke auf den Premium Button um die und andere Funktionen für dein gesamtes Team freizuschalten.',
  49. type: 'warning',
  50. html : true,
  51. text : '<p>Ooops. Wie es aussieht hat dein Team noch <strong>keinen</strong> Premium Status.</p>',
  52. showCancelButton : true,
  53. confirmButtonColor : '#CCAC00',
  54. confirmButtonText : 'OK'
  55. });
  56. },
  57. infoPremium : function()
  58. {
  59. swal({
  60. title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
  61. //text : 'Dies ist eine Premium Funktion. Leider hat dein Team keinen Premium Status. Klicke auf den Premium Button um die und andere Funktionen für dein gesamtes Team freizuschalten.',
  62. type: 'warning',
  63. html : true,
  64. text : '<p>Hierüber wirst du in Kürze die Premium Funktionen für dein Team freischalten können.</p><p>Bis dahin stehen allen Teams die Premiumfunktionen <b>kostenlos</b> zur Verfügung.</p>',
  65. confirmButtonColor : '#CCAC00',
  66. confirmButtonText : 'Verstanden'
  67. });
  68. }
  69. };