Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

83 righe
2.7 KiB

  1. /**
  2. * Created by Benny on 12.10.2014.
  3. */
  4. "use strict";
  5. var TB = TB || {};
  6. TB.Control = TB.Control || {};
  7. TB.Control.Content = {
  8. help : function() {
  9. TB.GUI.showLoader();
  10. var page = new TB.Page( 'help' );
  11. TB.GUI.hideLoader();
  12. TB.GUI.show(page, {});
  13. },
  14. about : function() {
  15. TB.GUI.showLoader();
  16. var page = new TB.Page( 'about' );
  17. TB.GUI.hideLoader();
  18. TB.GUI.show(page, { version: TB.Client.VERSION });
  19. },
  20. pricing: function() {
  21. if ( TB.Env.isNativeMobile() )
  22. {
  23. TB.Ext.Notification.show( 'Seite nicht verfügbar auf mobilen Endgeräten', TB.Ext.Notification.TYPE_INFO );
  24. return;
  25. }
  26. TB.GUI.showLoader();
  27. TB.Service.request(
  28. 'Team',
  29. 'load',
  30. {} ,
  31. function( data ) {
  32. var page = new TB.Page( 'pricing' );
  33. TB.GUI.hideLoader();
  34. TB.GUI.show( page, {team: data.team, numProfiles : data.profiles.length } );
  35. /*
  36. page.$container.find( '.btn-premium' ).click( function() {
  37. TB.Ext.Alert.infoPremium();
  38. });
  39. */
  40. });
  41. },
  42. support : function( params ) {
  43. var page = new TB.Page( 'support' ),
  44. origin = ( params && params.o ) ? params.o : null;
  45. TB.GUI.show( page, { o : origin } );
  46. page.$container.find( '#btn_support_create_cancel').click( function() {
  47. TB.Controller.do('News', 'index');
  48. });
  49. page.$container.find( '#btn_support_create_submit').click( function() {
  50. TB.Service.request(
  51. 'Content',
  52. 'requestSupport',
  53. {
  54. 'supportcategory' : page.$container.find( 'select[name="support-category"]').val(),
  55. 'supportmessage' : page.$container.find( '#supportmessage').val()
  56. },
  57. function(res) {
  58. TB.Ext.Notification.show( 'Wir haben deine Supportanfrage erhalten und werden uns so bald wie möglich bei dir melden.', TB.Ext.Notification.TYPE_SUCCESS );
  59. TB.Controller.do( 'News', 'index' );
  60. }
  61. );
  62. return false;
  63. });
  64. },
  65. offline : function() {
  66. TB.GUI.hideLoader();
  67. var page = new TB.Page('content'),
  68. content = {
  69. content: '<span class="label label-danger">Du scheinst gerade kein Internet zu haben.</span>',
  70. page_title: 'Offline'
  71. };
  72. TB.GUI.show(page, { content: content });
  73. }
  74. };