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.

metroui.js 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. $.noty.themes.metroui = {
  2. name : 'metroui',
  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: '0',
  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 : '1.25rem',
  38. width : 'auto',
  39. position : 'relative'
  40. });
  41. this.$closeButton.css({
  42. position : 'absolute',
  43. top : '.25rem', right: '.25rem',
  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. border : 'none',
  73. boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)"
  74. });
  75. break;
  76. case 'topCenter':
  77. case 'center':
  78. case 'bottomCenter':
  79. case 'inline':
  80. this.$bar.css({
  81. border : 'none',
  82. boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)"
  83. });
  84. this.$message.css({textAlign: 'center'});
  85. break;
  86. case 'topLeft':
  87. case 'topRight':
  88. case 'bottomLeft':
  89. case 'bottomRight':
  90. case 'centerLeft':
  91. case 'centerRight':
  92. this.$bar.css({
  93. border : 'none',
  94. boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)"
  95. });
  96. this.$message.css({textAlign: 'left'});
  97. break;
  98. case 'bottom':
  99. this.$bar.css({
  100. border : 'none',
  101. boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)"
  102. });
  103. break;
  104. default:
  105. this.$bar.css({
  106. border : 'none',
  107. boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)"
  108. });
  109. break;
  110. }
  111. switch (this.options.type) {
  112. case 'alert':
  113. case 'notification':
  114. this.$bar.css({backgroundColor: '#fff', border: 'none', color: '#1d1d1d'});
  115. break;
  116. case 'warning':
  117. this.$bar.css({backgroundColor: '#FA6800', border: 'none', color: '#fff'});
  118. this.$buttons.css({borderTop: '1px solid #FA6800'});
  119. break;
  120. case 'error':
  121. this.$bar.css({backgroundColor: '#CE352C', border: 'none', color: '#fff'});
  122. this.$message.css({fontWeight: 'bold'});
  123. this.$buttons.css({borderTop: '1px solid #CE352C'});
  124. break;
  125. case 'information':
  126. this.$bar.css({backgroundColor: '#1BA1E2', border: 'none', color: '#fff'});
  127. this.$buttons.css({borderTop: '1px solid #1BA1E2'});
  128. break;
  129. case 'success':
  130. this.$bar.css({backgroundColor: '#60A917', border: 'none', color: '#fff'});
  131. this.$buttons.css({borderTop: '1px solid #50C24E'});
  132. break;
  133. default:
  134. this.$bar.css({backgroundColor: '#fff', border: 'none', color: '#1d1d1d'});
  135. break;
  136. }
  137. },
  138. callback: {
  139. onShow : function () {
  140. },
  141. onClose: function () {
  142. }
  143. }
  144. };