|
- /**
- * Created by Benny on 14.11.2014.
- */
-
- "use strict";
-
- var TB = TB || {};
- TB.Ext = TB.Ext || {};
-
- /**
- * Currently using http://tristanedwards.me/sweetalert
- *
- * @type {{show: Function, modal: Function}}
- */
- TB.Ext.Alert = {
- show : function( title, text ) {
- swal( title, text );
- },
-
- modal : function( opts, onConfirm ) {
- swal({
- title: (opts.title) ? opts.title : null,
- text: ( opts.text ) ? opts.text : null,
- html: ( opts.hasOwnProperty( 'html' ) ) ? opts.html : false,
- type: ( opts.type ) ? opts.type : "warning",
- showCancelButton: ( typeof opts.showCancelButton === "boolean" ) ? opts.showCancelButton : true,
- confirmButtonColor: (opts.confirmButtonColor ) ? opts.confirmButtonColor : "#DD6B55",
- confirmButtonText: ( opts.confirmButtonText ) ? opts.confirmButtonText : 'Ok'
- }, function() {
- onConfirm && onConfirm();
- });
- },
-
- noPremiumBuy : function()
- {
- swal({
- title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
- //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.',
- type: 'warning',
- html : true,
- 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>',
- showCancelButton : true,
- confirmButtonColor : '#CCAC00',
- confirmButtonText : 'Jetzt Premium'
- }, function() {
- TB.Controller.do( 'Settings', 'order_premium' );
- });
- },
-
- noPremiumInfo : function()
- {
- swal({
- title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
- //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.',
- type: 'warning',
- html : true,
- text : '<p>Ooops. Wie es aussieht hat dein Team noch <strong>keinen</strong> Premium Status.</p>',
- showCancelButton : true,
- confirmButtonColor : '#CCAC00',
- confirmButtonText : 'OK'
- });
- },
-
- infoPremium : function()
- {
- swal({
- title : 'Premium <i class="glyphicon glyphicon-start"></i> Funktion',
- //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.',
- type: 'warning',
- html : true,
- 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>',
- confirmButtonColor : '#CCAC00',
- confirmButtonText : 'Verstanden'
- });
- }
- };
|