material-sass 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/MaterialIcons-Regular.eot +0 -0
  3. data/app/assets/fonts/MaterialIcons-Regular.ijmap +1 -0
  4. data/app/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  5. data/app/assets/fonts/MaterialIcons-Regular.woff +0 -0
  6. data/app/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  7. data/app/assets/images/bg/amber.jpg +0 -0
  8. data/app/assets/images/bg/brand.jpg +0 -0
  9. data/app/assets/images/bg/green.jpg +0 -0
  10. data/app/assets/images/bg/purple.jpg +0 -0
  11. data/app/assets/images/bg/red.jpg +0 -0
  12. data/app/assets/images/bg/teal.jpg +0 -0
  13. data/app/assets/javascripts/material.js +664 -507
  14. data/app/assets/javascripts/material.min.js +2 -0
  15. data/app/assets/javascripts/material/_.js +6 -3
  16. data/app/assets/javascripts/material/bootstrap.js +6 -3
  17. data/app/assets/javascripts/material/datepicker.js +95 -64
  18. data/app/assets/javascripts/material/form-adv-label.js +49 -0
  19. data/app/assets/javascripts/material/form-adv-textarea.js +13 -0
  20. data/app/assets/javascripts/material/header.js +12 -56
  21. data/app/assets/javascripts/material/menu.js +188 -38
  22. data/app/assets/javascripts/material/modal.js +10 -8
  23. data/app/assets/javascripts/material/snackbar.js +116 -0
  24. data/app/assets/javascripts/material/tab.js +47 -27
  25. data/app/assets/javascripts/material/tile.js +169 -74
  26. data/app/assets/javascripts/material/wave.js +12 -7
  27. data/app/assets/stylesheets/material.min.css +13 -0
  28. data/app/assets/stylesheets/material/addons/_material-icons.scss +9 -0
  29. data/app/assets/stylesheets/material/addons/_waves.scss +44 -0
  30. data/app/assets/stylesheets/material/{addon/material-design-icon → addons/material-icons}/_core.scss +8 -8
  31. data/app/assets/stylesheets/material/{addon/material-design-icon → addons/material-icons}/_larger.scss +5 -2
  32. data/app/assets/stylesheets/material/addons/material-icons/_path.scss +11 -0
  33. data/app/assets/stylesheets/material/addons/material-icons/_variables.scss +3 -0
  34. data/app/assets/stylesheets/material/base.scss +39 -40
  35. data/app/assets/stylesheets/material/{_grid.scss → base/_grid.scss} +13 -12
  36. data/app/assets/stylesheets/material/{_reset.scss → base/_reset.scss} +160 -161
  37. data/app/assets/stylesheets/material/components/_avatar.scss +94 -0
  38. data/app/assets/stylesheets/material/{element → components}/_breadcrumb.scss +3 -4
  39. data/app/assets/stylesheets/material/components/_button-flat.scss +35 -0
  40. data/app/assets/stylesheets/material/components/_button-float.scss +187 -0
  41. data/app/assets/stylesheets/material/components/_button.scss +86 -0
  42. data/app/assets/stylesheets/material/components/_card.scss +175 -0
  43. data/app/assets/stylesheets/material/{_code.scss → components/_code.scss} +14 -12
  44. data/app/assets/stylesheets/material/components/_dropdown.scss +103 -0
  45. data/app/assets/stylesheets/material/components/_form-adv-checkbox.scss +161 -0
  46. data/app/assets/stylesheets/material/{element → components}/_form-adv-datepicker.scss +87 -108
  47. data/app/assets/stylesheets/material/{element → components}/_form-adv-label.scss +17 -23
  48. data/app/assets/stylesheets/material/components/_form-adv-switch.scss +96 -0
  49. data/app/assets/stylesheets/material/{element → components}/_form-adv-textarea.scss +1 -1
  50. data/app/assets/stylesheets/material/{element → components}/_form.scss +34 -95
  51. data/app/assets/stylesheets/material/components/_label.scss +23 -0
  52. data/app/assets/stylesheets/material/{element → components}/_modal.scss +43 -18
  53. data/app/assets/stylesheets/material/{element → components}/_nav.scss +15 -8
  54. data/app/assets/stylesheets/material/{element → components}/_progress-circular.scss +36 -32
  55. data/app/assets/stylesheets/material/{element → components}/_progress-loadbar.scss +15 -21
  56. data/app/assets/stylesheets/material/{element → components}/_progress.scss +40 -30
  57. data/app/assets/stylesheets/material/components/_snackbar.scss +60 -0
  58. data/app/assets/stylesheets/material/components/_tab.scss +85 -0
  59. data/app/assets/stylesheets/material/components/_table.scss +82 -0
  60. data/app/assets/stylesheets/material/components/_tile.scss +155 -0
  61. data/app/assets/stylesheets/material/elements/_content.scss +42 -0
  62. data/app/assets/stylesheets/material/elements/_footer.scss +10 -0
  63. data/app/assets/stylesheets/material/elements/_header.scss +145 -0
  64. data/app/assets/stylesheets/material/{theme → elements}/_menu.scss +92 -150
  65. data/app/assets/stylesheets/material/mixin/_grid.scss +1 -9
  66. data/app/assets/stylesheets/material/mixin/_responsive.scss +1 -1
  67. data/app/assets/stylesheets/material/mixin/_utilities.scss +1 -1
  68. data/app/assets/stylesheets/material/{_print.scss → utilities/_print.scss} +4 -4
  69. data/app/assets/stylesheets/material/{_utilities-responsive.scss → utilities/_utilities-responsive.scss} +1 -1
  70. data/app/assets/stylesheets/material/{_utilities.scss → utilities/_utilities.scss} +197 -110
  71. data/app/assets/stylesheets/material/var/_colours.scss +336 -0
  72. data/app/assets/stylesheets/material/var/_variables.scss +78 -0
  73. data/lib/material-sass/version.rb +1 -1
  74. metadata +55 -53
  75. data/app/assets/javascripts/material/content.js +0 -46
  76. data/app/assets/javascripts/material/dropdown.js +0 -18
  77. data/app/assets/javascripts/material/esc.js +0 -10
  78. data/app/assets/javascripts/material/footer.js +0 -6
  79. data/app/assets/javascripts/material/form-adv.js +0 -64
  80. data/app/assets/javascripts/material/get-target.js +0 -8
  81. data/app/assets/javascripts/material/toast.js +0 -79
  82. data/app/assets/javascripts/material/webfont.js +0 -47
  83. data/app/assets/javascripts/material/winresize.js +0 -28
  84. data/app/assets/stylesheets/material/_variable.scss +0 -120
  85. data/app/assets/stylesheets/material/addon/_material-design-icon.scss +0 -9
  86. data/app/assets/stylesheets/material/addon/_waves.scss +0 -45
  87. data/app/assets/stylesheets/material/addon/material-design-icon/_path.scss +0 -11
  88. data/app/assets/stylesheets/material/addon/material-design-icon/_variables.scss +0 -3
  89. data/app/assets/stylesheets/material/element/_avatar.scss +0 -67
  90. data/app/assets/stylesheets/material/element/_button-flat.scss +0 -32
  91. data/app/assets/stylesheets/material/element/_button-float.scss +0 -202
  92. data/app/assets/stylesheets/material/element/_button.scss +0 -95
  93. data/app/assets/stylesheets/material/element/_card.scss +0 -245
  94. data/app/assets/stylesheets/material/element/_dropdown.scss +0 -132
  95. data/app/assets/stylesheets/material/element/_form-adv-checkbox.scss +0 -109
  96. data/app/assets/stylesheets/material/element/_form-adv-switch.scss +0 -102
  97. data/app/assets/stylesheets/material/element/_label.scss +0 -22
  98. data/app/assets/stylesheets/material/element/_sortable.scss +0 -8
  99. data/app/assets/stylesheets/material/element/_tab.scss +0 -107
  100. data/app/assets/stylesheets/material/element/_table.scss +0 -48
  101. data/app/assets/stylesheets/material/element/_tile.scss +0 -193
  102. data/app/assets/stylesheets/material/element/_toast.scss +0 -67
  103. data/app/assets/stylesheets/material/project.scss +0 -8
  104. data/app/assets/stylesheets/material/theme/_content.scss +0 -74
  105. data/app/assets/stylesheets/material/theme/_footer.scss +0 -17
  106. data/app/assets/stylesheets/material/theme/_header.scss +0 -128
@@ -0,0 +1,78 @@
1
+ // base
2
+ $base: 8px;
3
+ $css-path: ".";
4
+
5
+ // colour
6
+ @import "colours";
7
+
8
+ // font
9
+ @import url(https://fonts.googleapis.com/css?family=Roboto:300,300italic,400,400italic,500,500italic);
10
+
11
+ $font-fam: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
12
+ $font-fam-mono: Monaco, Menlo, Consolas, "Courier New", monospace;
13
+ $font-fam-serif: Georgia, serif;
14
+
15
+ $font-weight-medium: 500;
16
+ $font-weight-normal: 400;
17
+ $font-weight-light: 300;
18
+
19
+ // font size
20
+ $font-size: ($base * 1.75); // 14px
21
+ $font-size-h1: ($base * 5.5); // 44px
22
+ $font-size-h2: ($base * 4.25); // 34px
23
+ $font-size-h3: ($base * 3); // 24px
24
+ $font-size-h4: ($base * 2.5); // 20px
25
+ $font-size-h5: ($base * 2); // 16px
26
+ $font-size-h6: ($base * 1.5); // 12px
27
+
28
+ $font-size-display-4: ($base * 14); // 112px
29
+ $font-size-display-3: ($base * 7); // 56px
30
+
31
+ // line height
32
+ $line-height: ($base * 2.5); // 20px
33
+ $line-height-h1: ($base * 6); // 48px
34
+ $line-height-h2: ($base * 5); // 40px
35
+ $line-height-h3: ($base * 4); // 32px
36
+ $line-height-h4: ($base * 3.5); // 28px
37
+ $line-height-h5: ($base * 3); // 24px
38
+ $line-height-h6: ($base * 2.5); // 20px
39
+
40
+ $line-height-display-4: 1.1; // missing in google material design guideline
41
+ $line-height-display-3: 1.1; // missing in google material design guideline
42
+
43
+ // margin
44
+ $margin-base: ($base * 1); // 8px
45
+ $margin-lg: ($base * 6); // 48px
46
+ $margin-md: ($base * 3); // 24px
47
+ $margin-sm: ($base * 1.5); // 12px
48
+
49
+ // other
50
+ $avatar-height: ($base * 5); // 40px
51
+ $btn-height: ($base * 4.5); // 36px
52
+ $header-height: ($base * 7); // 56px
53
+ $nav-height: ($base * 6); // 48px
54
+
55
+ $cell-height: $nav-height; // 48px
56
+ $fbtn-height: $avatar-height; // 40px
57
+ $input-height: $btn-height; // 36px
58
+ $pcircular-height: $avatar-height; // 40px
59
+ $tile-height: $nav-height; // 48px
60
+
61
+ // grid
62
+ $grid-cols: 12;
63
+ $grid-gutter: ($base * 2);
64
+
65
+ // responsive
66
+ $screen-lg: 1440px;
67
+ $screen-md: 992px;
68
+ $screen-sm: 768px;
69
+ $screen-xs: 480px;
70
+
71
+ // timing
72
+ $timing: cubic-bezier(0.4, 0, 0.2, 1);
73
+
74
+ // z-index
75
+ $bottom-base: 10;
76
+ $content-base: 20;
77
+ $header-base: 30;
78
+ $top-base: 40;
@@ -1,5 +1,5 @@
1
1
  module Material
2
2
  module Sass
3
- VERSION = "0.0.4"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,78 +51,80 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - app/assets/fonts/MaterialIcons-Regular.eot
54
+ - app/assets/fonts/MaterialIcons-Regular.ijmap
54
55
  - app/assets/fonts/MaterialIcons-Regular.ttf
55
56
  - app/assets/fonts/MaterialIcons-Regular.woff
56
57
  - app/assets/fonts/MaterialIcons-Regular.woff2
58
+ - app/assets/images/bg/amber.jpg
59
+ - app/assets/images/bg/brand.jpg
60
+ - app/assets/images/bg/green.jpg
61
+ - app/assets/images/bg/purple.jpg
62
+ - app/assets/images/bg/red.jpg
63
+ - app/assets/images/bg/teal.jpg
57
64
  - app/assets/javascripts/init.js
58
65
  - app/assets/javascripts/material-sprockets.js
59
66
  - app/assets/javascripts/material.js
67
+ - app/assets/javascripts/material.min.js
60
68
  - app/assets/javascripts/material/_.js
61
69
  - app/assets/javascripts/material/bootstrap.js
62
- - app/assets/javascripts/material/content.js
63
70
  - app/assets/javascripts/material/datepicker.js
64
- - app/assets/javascripts/material/dropdown.js
65
- - app/assets/javascripts/material/esc.js
66
- - app/assets/javascripts/material/footer.js
67
- - app/assets/javascripts/material/form-adv.js
68
- - app/assets/javascripts/material/get-target.js
71
+ - app/assets/javascripts/material/form-adv-label.js
72
+ - app/assets/javascripts/material/form-adv-textarea.js
69
73
  - app/assets/javascripts/material/header.js
70
74
  - app/assets/javascripts/material/menu.js
71
75
  - app/assets/javascripts/material/modal.js
76
+ - app/assets/javascripts/material/snackbar.js
72
77
  - app/assets/javascripts/material/tab.js
73
78
  - app/assets/javascripts/material/tile.js
74
- - app/assets/javascripts/material/toast.js
75
79
  - app/assets/javascripts/material/wave.js
76
- - app/assets/javascripts/material/webfont.js
77
- - app/assets/javascripts/material/winresize.js
80
+ - app/assets/stylesheets/material.min.css
78
81
  - app/assets/stylesheets/material.scss
79
- - app/assets/stylesheets/material/_code.scss
80
- - app/assets/stylesheets/material/_grid.scss
81
- - app/assets/stylesheets/material/_print.scss
82
- - app/assets/stylesheets/material/_reset.scss
83
- - app/assets/stylesheets/material/_utilities-responsive.scss
84
- - app/assets/stylesheets/material/_utilities.scss
85
- - app/assets/stylesheets/material/_variable.scss
86
- - app/assets/stylesheets/material/addon/_material-design-icon.scss
87
- - app/assets/stylesheets/material/addon/_waves.scss
88
- - app/assets/stylesheets/material/addon/material-design-icon/_core.scss
89
- - app/assets/stylesheets/material/addon/material-design-icon/_larger.scss
90
- - app/assets/stylesheets/material/addon/material-design-icon/_path.scss
91
- - app/assets/stylesheets/material/addon/material-design-icon/_variables.scss
82
+ - app/assets/stylesheets/material/addons/_material-icons.scss
83
+ - app/assets/stylesheets/material/addons/_waves.scss
84
+ - app/assets/stylesheets/material/addons/material-icons/_core.scss
85
+ - app/assets/stylesheets/material/addons/material-icons/_larger.scss
86
+ - app/assets/stylesheets/material/addons/material-icons/_path.scss
87
+ - app/assets/stylesheets/material/addons/material-icons/_variables.scss
92
88
  - app/assets/stylesheets/material/base.scss
93
- - app/assets/stylesheets/material/element/_avatar.scss
94
- - app/assets/stylesheets/material/element/_breadcrumb.scss
95
- - app/assets/stylesheets/material/element/_button-flat.scss
96
- - app/assets/stylesheets/material/element/_button-float.scss
97
- - app/assets/stylesheets/material/element/_button.scss
98
- - app/assets/stylesheets/material/element/_card.scss
99
- - app/assets/stylesheets/material/element/_dropdown.scss
100
- - app/assets/stylesheets/material/element/_form-adv-checkbox.scss
101
- - app/assets/stylesheets/material/element/_form-adv-datepicker.scss
102
- - app/assets/stylesheets/material/element/_form-adv-label.scss
103
- - app/assets/stylesheets/material/element/_form-adv-switch.scss
104
- - app/assets/stylesheets/material/element/_form-adv-textarea.scss
105
- - app/assets/stylesheets/material/element/_form.scss
106
- - app/assets/stylesheets/material/element/_label.scss
107
- - app/assets/stylesheets/material/element/_modal.scss
108
- - app/assets/stylesheets/material/element/_nav.scss
109
- - app/assets/stylesheets/material/element/_progress-circular.scss
110
- - app/assets/stylesheets/material/element/_progress-loadbar.scss
111
- - app/assets/stylesheets/material/element/_progress.scss
112
- - app/assets/stylesheets/material/element/_sortable.scss
113
- - app/assets/stylesheets/material/element/_tab.scss
114
- - app/assets/stylesheets/material/element/_table.scss
115
- - app/assets/stylesheets/material/element/_tile.scss
116
- - app/assets/stylesheets/material/element/_toast.scss
89
+ - app/assets/stylesheets/material/base/_grid.scss
90
+ - app/assets/stylesheets/material/base/_reset.scss
91
+ - app/assets/stylesheets/material/components/_avatar.scss
92
+ - app/assets/stylesheets/material/components/_breadcrumb.scss
93
+ - app/assets/stylesheets/material/components/_button-flat.scss
94
+ - app/assets/stylesheets/material/components/_button-float.scss
95
+ - app/assets/stylesheets/material/components/_button.scss
96
+ - app/assets/stylesheets/material/components/_card.scss
97
+ - app/assets/stylesheets/material/components/_code.scss
98
+ - app/assets/stylesheets/material/components/_dropdown.scss
99
+ - app/assets/stylesheets/material/components/_form-adv-checkbox.scss
100
+ - app/assets/stylesheets/material/components/_form-adv-datepicker.scss
101
+ - app/assets/stylesheets/material/components/_form-adv-label.scss
102
+ - app/assets/stylesheets/material/components/_form-adv-switch.scss
103
+ - app/assets/stylesheets/material/components/_form-adv-textarea.scss
104
+ - app/assets/stylesheets/material/components/_form.scss
105
+ - app/assets/stylesheets/material/components/_label.scss
106
+ - app/assets/stylesheets/material/components/_modal.scss
107
+ - app/assets/stylesheets/material/components/_nav.scss
108
+ - app/assets/stylesheets/material/components/_progress-circular.scss
109
+ - app/assets/stylesheets/material/components/_progress-loadbar.scss
110
+ - app/assets/stylesheets/material/components/_progress.scss
111
+ - app/assets/stylesheets/material/components/_snackbar.scss
112
+ - app/assets/stylesheets/material/components/_tab.scss
113
+ - app/assets/stylesheets/material/components/_table.scss
114
+ - app/assets/stylesheets/material/components/_tile.scss
115
+ - app/assets/stylesheets/material/elements/_content.scss
116
+ - app/assets/stylesheets/material/elements/_footer.scss
117
+ - app/assets/stylesheets/material/elements/_header.scss
118
+ - app/assets/stylesheets/material/elements/_menu.scss
117
119
  - app/assets/stylesheets/material/mixin/_css3.scss
118
120
  - app/assets/stylesheets/material/mixin/_grid.scss
119
121
  - app/assets/stylesheets/material/mixin/_responsive.scss
120
122
  - app/assets/stylesheets/material/mixin/_utilities.scss
121
- - app/assets/stylesheets/material/project.scss
122
- - app/assets/stylesheets/material/theme/_content.scss
123
- - app/assets/stylesheets/material/theme/_footer.scss
124
- - app/assets/stylesheets/material/theme/_header.scss
125
- - app/assets/stylesheets/material/theme/_menu.scss
123
+ - app/assets/stylesheets/material/utilities/_print.scss
124
+ - app/assets/stylesheets/material/utilities/_utilities-responsive.scss
125
+ - app/assets/stylesheets/material/utilities/_utilities.scss
126
+ - app/assets/stylesheets/material/var/_colours.scss
127
+ - app/assets/stylesheets/material/var/_variables.scss
126
128
  - lib/material-sass.rb
127
129
  - lib/material-sass/engine.rb
128
130
  - lib/material-sass/version.rb
@@ -1,46 +0,0 @@
1
- // fixed left/right hand side column affix
2
- var contentPadding = 0,
3
- footerOffset = 0;
4
-
5
- if ($('.content').length) {
6
- contentPadding = parseInt($('.content').css('padding-bottom').replace('px', ''));
7
- };
8
-
9
- $(window).on('scroll', function() {
10
- $('.content-fix').each(function(index) {
11
- if ($(this).outerHeight() < $(this).closest('.row-fix').outerHeight()) {
12
- contentFix($(this));
13
- }
14
- });
15
- });
16
-
17
- contentFix = function (content) {
18
- var scrolled = window.innerHeight + window.pageYOffset;
19
-
20
- if (window.pageYOffset >= (content.offset().top - headerHeight)) {
21
- if ((content.is('[class*="col-xx"]')) || (content.is('[class*="col-xs"]') && $(window).width() >= 480) || (content.is('[class*="col-sm"]') && $(window).width() >= 768) || (content.is('[class*="col-md"]') && $(window).width() >= 992) || (content.is('[class*="col-lg"]') && $(window).width() >= 1440)) {
22
- if (!content.hasClass('fixed')) {
23
- content.addClass('fixed');
24
- $('.content-fix-wrap', content).scrollTop(0);
25
- };
26
- if (footerOffset != 0 && footerOffset <= scrolled) {
27
- $('.content-fix-inner', content).css('padding-bottom', (scrolled - footerOffset + contentPadding));
28
- };
29
- };
30
- } else {
31
- content.removeClass('fixed');
32
- $('.content-fix-inner', content).css('padding-bottom', '');
33
- }
34
- }
35
-
36
- // fixed left/right hand side column padding bottom and width
37
- contentFixPushCal = function () {
38
- $('.content-fix-scroll').each(function(index) {
39
- $(this).css('width', $(this).closest('.content-fix').outerWidth());
40
- $('.content-fix-inner', $(this)).css('width', $(this).closest('.content-fix').width());
41
- });
42
-
43
- if ($('.footer').length) {
44
- footerOffset = $('.footer').offset().top;
45
- };
46
- }
@@ -1,18 +0,0 @@
1
- // dropdown menu show
2
- $(document).on('show.bs.dropdown', '.dropdown', function() {
3
- var $dropdownMenu = $('.dropdown-menu', $(this)),
4
- $dropdownToggle = $('[class*="dropdown-toggle"]', $(this)),
5
- dropdownPadding = $('a', $dropdownMenu).css('padding-left').replace('px', ''),
6
- dropdownWidth;
7
-
8
- if ($dropdownMenu.length && $dropdownToggle.length) {
9
- // dropdown menu max width
10
- if ($dropdownMenu.hasClass('dropdown-menu-right') || $dropdownMenu.parents('.nav.pull-right').length) {
11
- dropdownWidth = $dropdownToggle.offset().left + $dropdownToggle.outerWidth() - dropdownPadding;
12
- } else {
13
- dropdownWidth = window.innerWidth - $dropdownToggle.offset().left - dropdownPadding;
14
- }
15
-
16
- $dropdownMenu.css('max-width', dropdownWidth);
17
- };
18
- });
@@ -1,10 +0,0 @@
1
- // close menu and/or tile if esc key is pressed
2
- $(document).keyup(function(e) {
3
- if (e.which == '27') {
4
- if ($('.menu.open').length) {
5
- mReset();
6
- } else if (!$('body').hasClass('modal-open')) {
7
- tReset();
8
- }
9
- };
10
- });
@@ -1,6 +0,0 @@
1
- // footer push
2
- footerPush = function () {
3
- if ($('.footer').length) {
4
- $('body').css('margin-bottom', $('.footer').outerHeight());
5
- };
6
- }
@@ -1,64 +0,0 @@
1
- // checkbox & radio
2
- $('.checkbox-adv').each(function() {
3
- $('label', $(this)).append('<span class="circle"></span><span class="circle-check"></span><span class="circle-icon icon">done</span>');
4
- });
5
-
6
- $('.radio-adv').each(function() {
7
- $('label', $(this)).append('<span class="circle"></span><span class="circle-check"></span>');
8
- });
9
-
10
- // floating label
11
- if($('.form-group-label').length) {
12
- $('.form-group-label .form-control').each(function() {
13
- floatingLabel($(this));
14
- });
15
- };
16
-
17
- $(document).on('change', '.form-group-label .form-control', function() {
18
- floatingLabel($(this));
19
- });
20
-
21
- $(document).on('focusin', '.form-group-label .form-control', function() {
22
- $(this).closest('.form-group-label').addClass('control-focus');
23
- });
24
-
25
- $(document).on('focusout', '.form-group-label .form-control', function() {
26
- $(this).closest('.form-group-label').removeClass('control-focus');
27
- });
28
-
29
- function floatingLabel(input) {
30
- var parent = input.closest('.form-group-label');
31
-
32
- if(input.val()) {
33
- parent.addClass('control-highlight');
34
- } else {
35
- parent.removeClass('control-highlight');
36
- }
37
- }
38
-
39
- // icon label
40
- $(document).on('focusin', '.form-group-icon .form-control', function() {
41
- $(this).closest('.form-group-icon').addClass('control-focus');
42
- });
43
-
44
- $(document).on('focusout', '.form-group-icon .form-control', function() {
45
- $(this).closest('.form-group-icon').removeClass('control-focus');
46
- });
47
-
48
- // switch
49
- $(document).on('click', '.switch-toggle', function() {
50
- var $this = $(this);
51
-
52
- if (!$this.hasClass('switch-toggle-on')) {
53
- $this.addClass('switch-toggle-on');
54
- setTimeout(function() {
55
- $this.removeClass('switch-toggle-on');
56
- }, 300);
57
- };
58
- });
59
-
60
- // textarea autosize v0.4.0
61
- // Javier Julio: https://github.com/javierjulio/textarea-autosize
62
- !function(t,e){function i(e){this.element=e,this.$element=t(e),this.init()}var n="textareaAutoSize",h="plugin_"+n,s=function(t){return t.replace(/\s/g,"").length>0};i.prototype={init:function(){var i=(this.$element.outerHeight(),parseInt(this.$element.css("paddingBottom"))+parseInt(this.$element.css("paddingTop")));s(this.element.value)&&this.$element.height(this.element.scrollHeight-i),this.$element.on("input keyup",function(){var n=t(e),h=n.scrollTop();t(this).height(0).height(this.scrollHeight-i),n.scrollTop(h)})}},t.fn[n]=function(e){return this.each(function(){t.data(this,h)||t.data(this,h,new i(this,e))}),this}}(jQuery,window,document);
63
-
64
- $('.textarea-autosize').textareaAutoSize();
@@ -1,8 +0,0 @@
1
- // get target from trigger
2
- getTargetFromTrigger = function(trigger) {
3
- var href;
4
- var target = trigger.attr('data-target')
5
- || (href = trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '');
6
-
7
- return target;
8
- }
@@ -1,79 +0,0 @@
1
- // toast
2
- var toastTimeout;
3
-
4
- $('[data-toggle="toast"]').tooltip({
5
- animation: false,
6
- container: '.toast',
7
- html: true,
8
- placement: 'bottom',
9
- template: '<div class="tooltip"><div class="toast-inner tooltip-inner"></div></div>',
10
- trigger: 'manual'
11
- });
12
-
13
- // toast dismiss
14
- $(document).on('click', '[data-dismiss="toast"]', function(e) {
15
- e.preventDefault();
16
- toastHide(0);
17
- });
18
-
19
- toastHide = function (timer, toast) {
20
- clearTimeout(toastTimeout);
21
-
22
- toastTimeout = setTimeout(function() {
23
- $('.toast').removeClass('toast-show');
24
-
25
- if ($('.fbtn-container').length) {
26
- $('.fbtn-container').css('margin-bottom', '');
27
- };
28
-
29
- $('.toast-inner').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
30
- $('.toast-toggled').tooltip('hide').removeClass('toast-toggled');
31
-
32
- if (toast !== null && toast !== undefined) {
33
- toast.tooltip('show').addClass('toast-toggled');
34
- } else {
35
- $('.toast').remove();
36
- }
37
- });
38
- }, timer);
39
- }
40
-
41
- // toast hover
42
- $(document).on('mouseenter', '.toast', function() {
43
- clearTimeout(toastTimeout);
44
- });
45
-
46
- $(document).on('mouseleave', '.toast', function() {
47
- toastHide(6000);
48
- });
49
-
50
- // toast show
51
- $(document).on('click', '[data-toggle="toast"]', function() {
52
- var $this = $(this);
53
-
54
- if (!$('.toast').length) {
55
- $('body').append('<div class="toast"></div>');
56
- };
57
-
58
- if (!$this.hasClass('toast-toggled')) {
59
- if ($('.toast').hasClass('toast-show')) {
60
- toastHide(0, $this);
61
- } else {
62
- $this.tooltip('show').addClass('toast-toggled');
63
- }
64
- };
65
- });
66
-
67
- $(document).on('shown.bs.tooltip', '[data-toggle="toast"]', function() {
68
- var $this = $(this);
69
-
70
- $('.toast').addClass('toast-show');
71
-
72
- if ($(window).width() < 768 && $('.fbtn-container').length) {
73
- $('.fbtn-container').css('margin-bottom', $('.toast').outerHeight());
74
- };
75
-
76
- $('.toast-inner').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
77
- toastHide(6000);
78
- });
79
- });