BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

relax.js 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. $.noty.themes.relax = {
  2. name : 'relax',
  3. helpers : {},
  4. modal : {
  5. css: {
  6. position : 'fixed',
  7. width : '100%',
  8. height : '100%',
  9. backgroundColor: '#000',
  10. zIndex : 10000,
  11. opacity : 0.6,
  12. display : 'none',
  13. left : 0,
  14. top : 0
  15. }
  16. },
  17. style : function () {
  18. this.$bar.css({
  19. overflow : 'hidden',
  20. margin : '4px 0',
  21. borderRadius: '2px',
  22. position : 'relative'
  23. });
  24. this.$progressBar.css({
  25. position : 'absolute',
  26. left : 0,
  27. bottom : 0,
  28. height : 4,
  29. width : '100%',
  30. backgroundColor: '#000000',
  31. opacity : 0.2,
  32. '-ms-filter' : 'progid:DXImageTransform.Microsoft.Alpha(Opacity=20)',
  33. filter : 'alpha(opacity=20)'
  34. });
  35. this.$message.css({
  36. textAlign: 'center',
  37. padding : '10px',
  38. width : 'auto',
  39. position : 'relative'
  40. });
  41. this.$closeButton.css({
  42. position : 'absolute',
  43. top : 4, right: 4,
  44. width : 10, height: 10,
  45. background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",
  46. display : 'none',
  47. cursor : 'pointer'
  48. });
  49. this.$buttons.css({
  50. padding : 5,
  51. textAlign : 'right',
  52. borderTop : '1px solid #ccc',
  53. backgroundColor: '#fff'
  54. });
  55. this.$buttons.find('button').css({
  56. marginLeft: 5
  57. });
  58. this.$buttons.find('button:first').css({
  59. marginLeft: 0
  60. });
  61. this.$bar.on({
  62. mouseenter: function () {
  63. $(this).find('.noty_close').stop().fadeTo('normal', 1);
  64. },
  65. mouseleave: function () {
  66. $(this).find('.noty_close').stop().fadeTo('normal', 0);
  67. }
  68. });
  69. switch (this.options.layout.name) {
  70. case 'top':
  71. this.$bar.css({
  72. borderBottom: '2px solid #eee',
  73. borderLeft : '2px solid #eee',
  74. borderRight : '2px solid #eee',
  75. borderTop : '2px solid #eee',
  76. boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
  77. });
  78. break;
  79. case 'topCenter':
  80. case 'center':
  81. case 'bottomCenter':
  82. case 'inline':
  83. this.$bar.css({
  84. border : '1px solid #eee',
  85. boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
  86. });
  87. this.$message.css({textAlign: 'center'});
  88. break;
  89. case 'topLeft':
  90. case 'topRight':
  91. case 'bottomLeft':
  92. case 'bottomRight':
  93. case 'centerLeft':
  94. case 'centerRight':
  95. this.$bar.css({
  96. border : '1px solid #eee',
  97. boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
  98. });
  99. this.$message.css({textAlign: 'left'});
  100. break;
  101. case 'bottom':
  102. this.$bar.css({
  103. borderTop : '2px solid #eee',
  104. borderLeft : '2px solid #eee',
  105. borderRight : '2px solid #eee',
  106. borderBottom: '2px solid #eee',
  107. boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
  108. });
  109. break;
  110. default:
  111. this.$bar.css({
  112. border : '2px solid #eee',
  113. boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
  114. });
  115. break;
  116. }
  117. switch (this.options.type) {
  118. case 'alert':
  119. case 'notification':
  120. this.$bar.css({backgroundColor: '#FFF', borderColor: '#dedede', color: '#444'});
  121. break;
  122. case 'warning':
  123. this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
  124. this.$buttons.css({borderTop: '1px solid #FFC237'});
  125. break;
  126. case 'error':
  127. this.$bar.css({backgroundColor: '#FF8181', borderColor: '#e25353', color: '#FFF'});
  128. this.$message.css({fontWeight: 'bold'});
  129. this.$buttons.css({borderTop: '1px solid darkred'});
  130. break;
  131. case 'information':
  132. this.$bar.css({backgroundColor: '#78C5E7', borderColor: '#3badd6', color: '#FFF'});
  133. this.$buttons.css({borderTop: '1px solid #0B90C4'});
  134. break;
  135. case 'success':
  136. this.$bar.css({backgroundColor: '#BCF5BC', borderColor: '#7cdd77', color: 'darkgreen'});
  137. this.$buttons.css({borderTop: '1px solid #50C24E'});
  138. break;
  139. default:
  140. this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
  141. break;
  142. }
  143. },
  144. callback: {
  145. onShow : function () {
  146. },
  147. onClose: function () {
  148. }
  149. }
  150. };