materialize-sass 0.97.5 → 0.97.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/materialize.js +230 -141
- data/app/assets/javascripts/materialize.min.js +6 -6
- data/app/assets/javascripts/materialize/character_counter.js +20 -7
- data/app/assets/javascripts/materialize/collapsible.js +1 -1
- data/app/assets/javascripts/materialize/date_picker/picker.js +5 -5
- data/app/assets/javascripts/materialize/dropdown.js +12 -3
- data/app/assets/javascripts/materialize/extras/nouislider.js +1 -1
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +0 -5
- data/app/assets/javascripts/materialize/forms.js +6 -5
- data/app/assets/javascripts/materialize/init.js +26 -9
- data/app/assets/javascripts/materialize/initial.js +2 -2
- data/app/assets/javascripts/materialize/leanModal.js +19 -6
- data/app/assets/javascripts/materialize/materialbox.js +9 -9
- data/app/assets/javascripts/materialize/pushpin.js +48 -53
- data/app/assets/javascripts/materialize/scrollFire.js +7 -3
- data/app/assets/javascripts/materialize/scrollspy.js +6 -6
- data/app/assets/javascripts/materialize/sideNav.js +66 -37
- data/app/assets/javascripts/materialize/slider.js +2 -2
- data/app/assets/javascripts/materialize/tabs.js +12 -6
- data/app/assets/stylesheets/materialize.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_buttons.scss +49 -33
- data/app/assets/stylesheets/materialize/components/_cards.scss +9 -5
- data/app/assets/stylesheets/materialize/components/_color.scss +21 -21
- data/app/assets/stylesheets/materialize/components/_global.scss +27 -11
- data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -3258
- data/app/assets/stylesheets/materialize/components/_materialbox.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_navbar.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_normalize.scss +9 -12
- data/app/assets/stylesheets/materialize/components/_sideNav.scss +16 -11
- data/app/assets/stylesheets/materialize/components/_tooltip.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_variables.scss +181 -34
- data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +1 -1
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +2 -2
- data/app/assets/stylesheets/materialize/components/forms/_checkboxes.scss +220 -0
- data/app/assets/stylesheets/materialize/components/forms/_file-input.scss +38 -0
- data/app/assets/stylesheets/materialize/components/forms/_forms.scss +22 -0
- data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +254 -0
- data/app/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +119 -0
- data/app/assets/stylesheets/materialize/components/forms/_range.scss +159 -0
- data/app/assets/stylesheets/materialize/components/forms/_select.scss +116 -0
- data/app/assets/stylesheets/materialize/components/forms/_switches.scss +78 -0
- data/app/assets/stylesheets/materialize/extras/nouislider.css +2 -1
- data/lib/materialize-sass/version.rb +1 -1
- metadata +10 -9
- data/app/assets/fonts/material-design-icons/LICENSE.txt +0 -428
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.eot +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.svg +0 -769
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.ttf +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff2 +0 -0
- data/app/assets/stylesheets/materialize/components/_form.scss +0 -954
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 828befde9288f6ec72f3bcf59ba99e1ba59c6065
|
4
|
+
data.tar.gz: 5a274e29634e4ada065bccd340d44385e8701ef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 694b627deb7d36430a3efc535c122228263797eb4e68c5908bfca860e5059bfe7b9b8ecf04141e20a1e7fa0bf56e0c3e6683d511c5158d81c83263facff8c5f6
|
7
|
+
data.tar.gz: aca2468e981e8a175599c1c3f8de09e37a2f1f2d6399b503347f3bb0ad1e6b6700e474244e589f24a4326ec4cd6745ef186f8b57106c28ce4152c88e398e375b
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Materialize v0.97.
|
2
|
+
* Materialize v0.97.6 (http://materializecss.com)
|
3
3
|
* Copyright 2014-2015 Materialize
|
4
4
|
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
5
|
*/
|
@@ -8,12 +8,13 @@ if (typeof(jQuery) === 'undefined') {
|
|
8
8
|
var jQuery;
|
9
9
|
// Check if require is a defined function.
|
10
10
|
if (typeof(require) === 'function') {
|
11
|
-
jQuery = $ = require('
|
11
|
+
jQuery = $ = require('jquery');
|
12
12
|
// Else use the dollar sign alias.
|
13
13
|
} else {
|
14
14
|
jQuery = $;
|
15
15
|
}
|
16
|
-
}
|
16
|
+
}
|
17
|
+
;/*
|
17
18
|
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
18
19
|
*
|
19
20
|
* Uses the built in easing capabilities added In jQuery 1.1
|
@@ -309,7 +310,7 @@ if ($) {
|
|
309
310
|
} else {
|
310
311
|
Vel = Velocity;
|
311
312
|
}
|
312
|
-
;
|
313
|
+
;(function ($) {
|
313
314
|
$.fn.collapsible = function(options) {
|
314
315
|
var defaults = {
|
315
316
|
accordion: undefined
|
@@ -526,7 +527,8 @@ if ($) {
|
|
526
527
|
var offsetLeft = origin.offset().left;
|
527
528
|
var offsetTop = origin.offset().top - $(window).scrollTop();
|
528
529
|
var currAlignment = options.alignment;
|
529
|
-
var
|
530
|
+
var gutterSpacing = 0;
|
531
|
+
var leftPosition = 0;
|
530
532
|
|
531
533
|
// Below Origin
|
532
534
|
var verticalOffset = 0;
|
@@ -534,6 +536,14 @@ if ($) {
|
|
534
536
|
verticalOffset = originHeight;
|
535
537
|
}
|
536
538
|
|
539
|
+
// Check for scrolling positioned container.
|
540
|
+
var scrollOffset = 0;
|
541
|
+
var wrapper = origin.parent();
|
542
|
+
if (!wrapper.is('body') && wrapper[0].scrollHeight > wrapper[0].clientHeight) {
|
543
|
+
scrollOffset = wrapper[0].scrollTop;
|
544
|
+
}
|
545
|
+
|
546
|
+
|
537
547
|
if (offsetLeft + activates.innerWidth() > $(window).width()) {
|
538
548
|
// Dropdown goes past screen on right, force right alignment
|
539
549
|
currAlignment = 'right';
|
@@ -571,7 +581,7 @@ if ($) {
|
|
571
581
|
// Position dropdown
|
572
582
|
activates.css({
|
573
583
|
position: 'absolute',
|
574
|
-
top: origin.position().top + verticalOffset,
|
584
|
+
top: origin.position().top + verticalOffset + scrollOffset,
|
575
585
|
left: leftPosition
|
576
586
|
});
|
577
587
|
|
@@ -672,7 +682,8 @@ if ($) {
|
|
672
682
|
$(document).ready(function(){
|
673
683
|
$('.dropdown-button').dropdown();
|
674
684
|
});
|
675
|
-
}( jQuery ))
|
685
|
+
}( jQuery ));
|
686
|
+
;(function($) {
|
676
687
|
var _stack = 0,
|
677
688
|
_lastID = 0,
|
678
689
|
_generateID = function() {
|
@@ -683,7 +694,10 @@ if ($) {
|
|
683
694
|
$.fn.extend({
|
684
695
|
openModal: function(options) {
|
685
696
|
|
686
|
-
$('body')
|
697
|
+
var $body = $('body');
|
698
|
+
var oldWidth = $body.innerWidth();
|
699
|
+
$body.css('overflow', 'hidden');
|
700
|
+
$body.width(oldWidth);
|
687
701
|
|
688
702
|
var defaults = {
|
689
703
|
opacity: 0.5,
|
@@ -694,14 +708,20 @@ if ($) {
|
|
694
708
|
dismissible: true,
|
695
709
|
starting_top: '4%'
|
696
710
|
},
|
697
|
-
|
698
|
-
|
699
|
-
|
711
|
+
$modal = $(this);
|
712
|
+
|
713
|
+
if ($modal.hasClass('open')) {
|
714
|
+
return;
|
715
|
+
}
|
716
|
+
|
717
|
+
overlayID = _generateID();
|
718
|
+
$overlay = $('<div class="lean-overlay"></div>');
|
700
719
|
lStack = (++_stack);
|
701
720
|
|
702
721
|
// Store a reference of the overlay
|
703
722
|
$overlay.attr('id', overlayID).css('z-index', 1000 + lStack * 2);
|
704
723
|
$modal.data('overlay-id', overlayID).css('z-index', 1000 + lStack * 2 + 1);
|
724
|
+
$modal.addClass('open');
|
705
725
|
|
706
726
|
$("body").append($overlay);
|
707
727
|
|
@@ -777,11 +797,15 @@ if ($) {
|
|
777
797
|
$modal = $(this),
|
778
798
|
overlayID = $modal.data('overlay-id'),
|
779
799
|
$overlay = $('#' + overlayID);
|
800
|
+
$modal.removeClass('open');
|
780
801
|
|
781
802
|
options = $.extend(defaults, options);
|
782
803
|
|
783
|
-
//
|
784
|
-
$('body').css(
|
804
|
+
// Enable scrolling
|
805
|
+
$('body').css({
|
806
|
+
overflow: '',
|
807
|
+
width: ''
|
808
|
+
});
|
785
809
|
|
786
810
|
$modal.find('.modal-close').off('click.close');
|
787
811
|
$(document).off('keyup.leanModal' + overlayID);
|
@@ -914,7 +938,7 @@ if ($) {
|
|
914
938
|
var count = 0;
|
915
939
|
while (ancestor !== null && !$(ancestor).is(document)) {
|
916
940
|
var curr = $(ancestor);
|
917
|
-
if (curr.css('overflow')
|
941
|
+
if (curr.css('overflow') !== 'visible') {
|
918
942
|
curr.css('overflow', 'visible');
|
919
943
|
if (ancestorsChanged === undefined) {
|
920
944
|
ancestorsChanged = curr;
|
@@ -941,10 +965,10 @@ if ($) {
|
|
941
965
|
returnToOriginal();
|
942
966
|
});
|
943
967
|
// Animate Overlay
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
968
|
+
// Put before in origin image to preserve z-index layering.
|
969
|
+
origin.before(overlay);
|
970
|
+
overlay.velocity({opacity: 1},
|
971
|
+
{duration: inDuration, queue: false, easing: 'easeOutQuad'} );
|
948
972
|
|
949
973
|
// Add and animate caption if it exists
|
950
974
|
if (origin.data('caption') !== "") {
|
@@ -955,8 +979,6 @@ if ($) {
|
|
955
979
|
$photo_caption.velocity({opacity: 1}, {duration: inDuration, queue: false, easing: 'easeOutQuad'});
|
956
980
|
}
|
957
981
|
|
958
|
-
|
959
|
-
|
960
982
|
// Resize Image
|
961
983
|
var ratio = 0;
|
962
984
|
var widthPercent = originalWidth / windowWidth;
|
@@ -1021,7 +1043,7 @@ if ($) {
|
|
1021
1043
|
|
1022
1044
|
// Return on scroll
|
1023
1045
|
$(window).scroll(function() {
|
1024
|
-
if (overlayActive
|
1046
|
+
if (overlayActive) {
|
1025
1047
|
returnToOriginal();
|
1026
1048
|
}
|
1027
1049
|
});
|
@@ -1106,7 +1128,9 @@ if ($) {
|
|
1106
1128
|
$(this).remove();
|
1107
1129
|
|
1108
1130
|
// Remove overflow overrides on ancestors
|
1109
|
-
ancestorsChanged
|
1131
|
+
if (ancestorsChanged) {
|
1132
|
+
ancestorsChanged.css('overflow', '');
|
1133
|
+
}
|
1110
1134
|
}
|
1111
1135
|
});
|
1112
1136
|
|
@@ -1190,7 +1214,7 @@ $(document).ready(function(){
|
|
1190
1214
|
$this.width('100%');
|
1191
1215
|
var $active, $content, $links = $this.find('li.tab a'),
|
1192
1216
|
$tabs_width = $this.width(),
|
1193
|
-
$tab_width = $this.
|
1217
|
+
$tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length,
|
1194
1218
|
$index = 0;
|
1195
1219
|
|
1196
1220
|
// If the location.hash matches one of the links, use that as the active tab.
|
@@ -1210,7 +1234,9 @@ $(document).ready(function(){
|
|
1210
1234
|
$index = 0;
|
1211
1235
|
}
|
1212
1236
|
|
1213
|
-
|
1237
|
+
if ($active[0] !== undefined) {
|
1238
|
+
$content = $($active[0].hash);
|
1239
|
+
}
|
1214
1240
|
|
1215
1241
|
// append indicator then set indicator width to tab width
|
1216
1242
|
$this.append('<div class="indicator"></div>');
|
@@ -1221,7 +1247,7 @@ $(document).ready(function(){
|
|
1221
1247
|
}
|
1222
1248
|
$(window).resize(function () {
|
1223
1249
|
$tabs_width = $this.width();
|
1224
|
-
$tab_width = $this.
|
1250
|
+
$tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length;
|
1225
1251
|
if ($index < 0) {
|
1226
1252
|
$index = 0;
|
1227
1253
|
}
|
@@ -1245,11 +1271,13 @@ $(document).ready(function(){
|
|
1245
1271
|
}
|
1246
1272
|
|
1247
1273
|
$tabs_width = $this.width();
|
1248
|
-
$tab_width = $this.
|
1274
|
+
$tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length;
|
1249
1275
|
|
1250
1276
|
// Make the old tab inactive.
|
1251
1277
|
$active.removeClass('active');
|
1252
|
-
$content
|
1278
|
+
if ($content !== undefined) {
|
1279
|
+
$content.hide();
|
1280
|
+
}
|
1253
1281
|
|
1254
1282
|
// Update the variables with the new link and content
|
1255
1283
|
$active = $(this);
|
@@ -1266,7 +1294,9 @@ $(document).ready(function(){
|
|
1266
1294
|
// Change url to current tab
|
1267
1295
|
// window.location.hash = $active.attr('href');
|
1268
1296
|
|
1269
|
-
$content
|
1297
|
+
if ($content !== undefined) {
|
1298
|
+
$content.show();
|
1299
|
+
}
|
1270
1300
|
|
1271
1301
|
// Update indicator
|
1272
1302
|
if (($index - $prev_index) >= 0) {
|
@@ -2007,20 +2037,19 @@ $(document).ready(function(){
|
|
2007
2037
|
$('body').append(dragTarget);
|
2008
2038
|
|
2009
2039
|
if (options.edge == 'left') {
|
2010
|
-
menu_id.css('
|
2040
|
+
menu_id.css('transform', 'translateX(-100%)');
|
2011
2041
|
dragTarget.css({'left': 0}); // Add Touch Area
|
2012
2042
|
}
|
2013
2043
|
else {
|
2014
2044
|
menu_id.addClass('right-aligned') // Change text-alignment to right
|
2015
|
-
.css('
|
2016
|
-
.css('left', '');
|
2045
|
+
.css('transform', 'translateX(100%)');
|
2017
2046
|
dragTarget.css({'right': 0}); // Add Touch Area
|
2018
2047
|
}
|
2019
2048
|
|
2020
2049
|
// If fixed sidenav, bring menu out
|
2021
2050
|
if (menu_id.hasClass('fixed')) {
|
2022
2051
|
if (window.innerWidth > 992) {
|
2023
|
-
menu_id.css('
|
2052
|
+
menu_id.css('transform', 'translateX(0)');
|
2024
2053
|
}
|
2025
2054
|
}
|
2026
2055
|
|
@@ -2029,19 +2058,22 @@ $(document).ready(function(){
|
|
2029
2058
|
$(window).resize( function() {
|
2030
2059
|
if (window.innerWidth > 992) {
|
2031
2060
|
// Close menu if window is resized bigger than 992 and user has fixed sidenav
|
2032
|
-
if ($('#sidenav-overlay').
|
2061
|
+
if ($('#sidenav-overlay').length != 0 && menuOut) {
|
2033
2062
|
removeMenu(true);
|
2034
2063
|
}
|
2035
2064
|
else {
|
2036
|
-
menu_id.removeAttr('style');
|
2037
|
-
menu_id.css('
|
2065
|
+
// menu_id.removeAttr('style');
|
2066
|
+
menu_id.css('transform', 'translateX(0%)');
|
2067
|
+
// menu_id.css('width', options.menuWidth);
|
2038
2068
|
}
|
2039
2069
|
}
|
2040
2070
|
else if (menuOut === false){
|
2041
|
-
if (options.edge === 'left')
|
2042
|
-
menu_id.css('
|
2043
|
-
else
|
2044
|
-
menu_id.css('
|
2071
|
+
if (options.edge === 'left') {
|
2072
|
+
menu_id.css('transform', 'translateX(-100%)');
|
2073
|
+
} else {
|
2074
|
+
menu_id.css('transform', 'translateX(100%)');
|
2075
|
+
}
|
2076
|
+
|
2045
2077
|
}
|
2046
2078
|
|
2047
2079
|
});
|
@@ -2057,11 +2089,14 @@ $(document).ready(function(){
|
|
2057
2089
|
function removeMenu(restoreNav) {
|
2058
2090
|
panning = false;
|
2059
2091
|
menuOut = false;
|
2060
|
-
|
2061
2092
|
// Reenable scrolling
|
2062
|
-
$('body').css(
|
2093
|
+
$('body').css({
|
2094
|
+
overflow: '',
|
2095
|
+
width: ''
|
2096
|
+
});
|
2063
2097
|
|
2064
|
-
$('#sidenav-overlay').velocity({opacity: 0}, {duration: 200,
|
2098
|
+
$('#sidenav-overlay').velocity({opacity: 0}, {duration: 200,
|
2099
|
+
queue: false, easing: 'easeOutQuad',
|
2065
2100
|
complete: function() {
|
2066
2101
|
$(this).remove();
|
2067
2102
|
} });
|
@@ -2069,7 +2104,7 @@ $(document).ready(function(){
|
|
2069
2104
|
// Reset phantom div
|
2070
2105
|
dragTarget.css({width: '', right: '', left: '0'});
|
2071
2106
|
menu_id.velocity(
|
2072
|
-
{
|
2107
|
+
{'translateX': '-100%'},
|
2073
2108
|
{ duration: 200,
|
2074
2109
|
queue: false,
|
2075
2110
|
easing: 'easeOutCubic',
|
@@ -2087,7 +2122,7 @@ $(document).ready(function(){
|
|
2087
2122
|
// Reset phantom div
|
2088
2123
|
dragTarget.css({width: '', right: '0', left: ''});
|
2089
2124
|
menu_id.velocity(
|
2090
|
-
{
|
2125
|
+
{'translateX': '100%'},
|
2091
2126
|
{ duration: 200,
|
2092
2127
|
queue: false,
|
2093
2128
|
easing: 'easeOutCubic',
|
@@ -2124,7 +2159,10 @@ $(document).ready(function(){
|
|
2124
2159
|
var velocityX = e.gesture.velocityX;
|
2125
2160
|
|
2126
2161
|
// Disable Scrolling
|
2127
|
-
$('body')
|
2162
|
+
var $body = $('body');
|
2163
|
+
var oldWidth = $body.innerWidth();
|
2164
|
+
$body.css('overflow', 'hidden');
|
2165
|
+
$body.width(oldWidth);
|
2128
2166
|
|
2129
2167
|
// If overlay does not exist, create one and if it is clicked, close menu
|
2130
2168
|
if ($('#sidenav-overlay').length === 0) {
|
@@ -2146,8 +2184,7 @@ $(document).ready(function(){
|
|
2146
2184
|
if (x < (options.menuWidth / 2)) { menuOut = false; }
|
2147
2185
|
// Right Direction
|
2148
2186
|
else if (x >= (options.menuWidth / 2)) { menuOut = true; }
|
2149
|
-
|
2150
|
-
menu_id.css('left', (x - options.menuWidth));
|
2187
|
+
menu_id.css('transform', 'translateX(' + (x - options.menuWidth) + 'px)');
|
2151
2188
|
}
|
2152
2189
|
else {
|
2153
2190
|
// Left Direction
|
@@ -2158,26 +2195,24 @@ $(document).ready(function(){
|
|
2158
2195
|
else if (x >= (window.innerWidth - options.menuWidth / 2)) {
|
2159
2196
|
menuOut = false;
|
2160
2197
|
}
|
2161
|
-
var rightPos =
|
2162
|
-
if (rightPos
|
2198
|
+
var rightPos = (x - options.menuWidth / 2);
|
2199
|
+
if (rightPos < 0) {
|
2163
2200
|
rightPos = 0;
|
2164
2201
|
}
|
2165
2202
|
|
2166
|
-
menu_id.css('
|
2203
|
+
menu_id.css('transform', 'translateX(' + rightPos + 'px)');
|
2167
2204
|
}
|
2168
2205
|
|
2169
2206
|
|
2170
|
-
|
2171
|
-
|
2172
2207
|
// Percentage overlay
|
2173
2208
|
var overlayPerc;
|
2174
2209
|
if (options.edge === 'left') {
|
2175
2210
|
overlayPerc = x / options.menuWidth;
|
2176
|
-
$('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration:
|
2211
|
+
$('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration: 10, queue: false, easing: 'easeOutQuad'});
|
2177
2212
|
}
|
2178
2213
|
else {
|
2179
2214
|
overlayPerc = Math.abs((x - window.innerWidth) / options.menuWidth);
|
2180
|
-
$('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration:
|
2215
|
+
$('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration: 10, queue: false, easing: 'easeOutQuad'});
|
2181
2216
|
}
|
2182
2217
|
}
|
2183
2218
|
|
@@ -2185,19 +2220,36 @@ $(document).ready(function(){
|
|
2185
2220
|
|
2186
2221
|
if (e.gesture.pointerType == "touch") {
|
2187
2222
|
var velocityX = e.gesture.velocityX;
|
2223
|
+
var x = e.gesture.center.x;
|
2224
|
+
var leftPos = x - options.menuWidth;
|
2225
|
+
var rightPos = x - options.menuWidth / 2;
|
2226
|
+
if (leftPos > 0 ) {
|
2227
|
+
leftPos = 0;
|
2228
|
+
}
|
2229
|
+
if (rightPos < 0) {
|
2230
|
+
rightPos = 0;
|
2231
|
+
}
|
2188
2232
|
panning = false;
|
2233
|
+
|
2189
2234
|
if (options.edge === 'left') {
|
2190
2235
|
// If velocityX <= 0.3 then the user is flinging the menu closed so ignore menuOut
|
2191
2236
|
if ((menuOut && velocityX <= 0.3) || velocityX < -0.5) {
|
2192
|
-
|
2237
|
+
if (leftPos != 0) {
|
2238
|
+
menu_id.velocity({'translateX': [0, leftPos]}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2239
|
+
}
|
2240
|
+
|
2241
|
+
// menu_id.css({'translateX': 0});
|
2193
2242
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
2194
2243
|
dragTarget.css({width: '50%', right: 0, left: ''});
|
2195
2244
|
}
|
2196
2245
|
else if (!menuOut || velocityX > 0.3) {
|
2197
2246
|
// Enable Scrolling
|
2198
|
-
$('body').css(
|
2247
|
+
$('body').css({
|
2248
|
+
overflow: '',
|
2249
|
+
width: ''
|
2250
|
+
});
|
2199
2251
|
// Slide menu closed
|
2200
|
-
menu_id.velocity({
|
2252
|
+
menu_id.velocity({'translateX': [-1 * options.menuWidth - 10, leftPos]}, {duration: 200, queue: false, easing: 'easeOutQuad'});
|
2201
2253
|
$('#sidenav-overlay').velocity({opacity: 0 }, {duration: 200, queue: false, easing: 'easeOutQuad',
|
2202
2254
|
complete: function () {
|
2203
2255
|
$(this).remove();
|
@@ -2207,15 +2259,19 @@ $(document).ready(function(){
|
|
2207
2259
|
}
|
2208
2260
|
else {
|
2209
2261
|
if ((menuOut && velocityX >= -0.3) || velocityX > 0.5) {
|
2210
|
-
menu_id.velocity({
|
2262
|
+
menu_id.velocity({'translateX': [0, rightPos]}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2211
2263
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
2212
2264
|
dragTarget.css({width: '50%', right: '', left: 0});
|
2213
2265
|
}
|
2214
2266
|
else if (!menuOut || velocityX < -0.3) {
|
2215
2267
|
// Enable Scrolling
|
2216
|
-
$('body').css(
|
2268
|
+
$('body').css({
|
2269
|
+
overflow: '',
|
2270
|
+
width: ''
|
2271
|
+
});
|
2272
|
+
|
2217
2273
|
// Slide menu closed
|
2218
|
-
menu_id.velocity({
|
2274
|
+
menu_id.velocity({'translateX': [options.menuWidth + 10, rightPos]}, {duration: 200, queue: false, easing: 'easeOutQuad'});
|
2219
2275
|
$('#sidenav-overlay').velocity({opacity: 0 }, {duration: 200, queue: false, easing: 'easeOutQuad',
|
2220
2276
|
complete: function () {
|
2221
2277
|
$(this).remove();
|
@@ -2236,18 +2292,21 @@ $(document).ready(function(){
|
|
2236
2292
|
else {
|
2237
2293
|
|
2238
2294
|
// Disable Scrolling
|
2239
|
-
$('body')
|
2295
|
+
var $body = $('body');
|
2296
|
+
var oldWidth = $body.innerWidth();
|
2297
|
+
$body.css('overflow', 'hidden');
|
2298
|
+
$body.width(oldWidth);
|
2299
|
+
|
2240
2300
|
// Push current drag target on top of DOM tree
|
2241
2301
|
$('body').append(dragTarget);
|
2242
|
-
|
2302
|
+
|
2243
2303
|
if (options.edge === 'left') {
|
2244
2304
|
dragTarget.css({width: '50%', right: 0, left: ''});
|
2245
|
-
menu_id.velocity({
|
2305
|
+
menu_id.velocity({'translateX': [0, -1 * options.menuWidth]}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2246
2306
|
}
|
2247
2307
|
else {
|
2248
2308
|
dragTarget.css({width: '50%', right: '', left: 0});
|
2249
|
-
menu_id.velocity({
|
2250
|
-
menu_id.css('left','');
|
2309
|
+
menu_id.velocity({'translateX': [0, options.menuWidth]}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2251
2310
|
}
|
2252
2311
|
|
2253
2312
|
var overlay = $('<div id="sidenav-overlay"></div>');
|
@@ -2475,7 +2534,7 @@ $(document).ready(function(){
|
|
2475
2534
|
elements.push($(element));
|
2476
2535
|
$(element).data("scrollSpy:id", i);
|
2477
2536
|
// Smooth scroll to section
|
2478
|
-
$('a[href
|
2537
|
+
$('a[href="#' + $(element).attr('id') + '"]').click(function(e) {
|
2479
2538
|
e.preventDefault();
|
2480
2539
|
var offset = $(this.hash).offset().top + 1;
|
2481
2540
|
|
@@ -2517,7 +2576,7 @@ $(document).ready(function(){
|
|
2517
2576
|
var $this = $(this);
|
2518
2577
|
|
2519
2578
|
if (visible[0]) {
|
2520
|
-
$('a[href
|
2579
|
+
$('a[href="#' + visible[0].attr('id') + '"]').removeClass('active');
|
2521
2580
|
if ($this.data('scrollSpy:id') < visible[0].data('scrollSpy:id')) {
|
2522
2581
|
visible.unshift($(this));
|
2523
2582
|
}
|
@@ -2530,7 +2589,7 @@ $(document).ready(function(){
|
|
2530
2589
|
}
|
2531
2590
|
|
2532
2591
|
|
2533
|
-
$('a[href
|
2592
|
+
$('a[href="#' + visible[0].attr('id') + '"]').addClass('active');
|
2534
2593
|
});
|
2535
2594
|
selector.on('scrollSpy:exit', function() {
|
2536
2595
|
visible = $.grep(visible, function(value) {
|
@@ -2538,13 +2597,13 @@ $(document).ready(function(){
|
|
2538
2597
|
});
|
2539
2598
|
|
2540
2599
|
if (visible[0]) {
|
2541
|
-
$('a[href
|
2600
|
+
$('a[href="#' + visible[0].attr('id') + '"]').removeClass('active');
|
2542
2601
|
var $this = $(this);
|
2543
2602
|
visible = $.grep(visible, function(value) {
|
2544
2603
|
return value.attr('id') != $this.attr('id');
|
2545
2604
|
});
|
2546
2605
|
if (visible[0]) { // Check if empty
|
2547
|
-
$('a[href
|
2606
|
+
$('a[href="#' + visible[0].attr('id') + '"]').addClass('active');
|
2548
2607
|
}
|
2549
2608
|
}
|
2550
2609
|
});
|
@@ -2580,7 +2639,8 @@ $(document).ready(function(){
|
|
2580
2639
|
return $.scrollSpy($(this), options);
|
2581
2640
|
};
|
2582
2641
|
|
2583
|
-
})(jQuery)
|
2642
|
+
})(jQuery);
|
2643
|
+
;(function ($) {
|
2584
2644
|
$(document).ready(function() {
|
2585
2645
|
|
2586
2646
|
// Function to update labels of text fields
|
@@ -2674,6 +2734,20 @@ $(document).ready(function(){
|
|
2674
2734
|
}
|
2675
2735
|
};
|
2676
2736
|
|
2737
|
+
// Radio and Checkbox focus class
|
2738
|
+
var radio_checkbox = 'input[type=radio], input[type=checkbox]';
|
2739
|
+
$(document).on('keyup.radio', radio_checkbox, function(e) {
|
2740
|
+
// TAB, check if tabbing to radio or checkbox.
|
2741
|
+
if (e.which === 9) {
|
2742
|
+
$(this).addClass('tabbed');
|
2743
|
+
var $this = $(this);
|
2744
|
+
$this.one('blur', function(e) {
|
2745
|
+
|
2746
|
+
$(this).removeClass('tabbed');
|
2747
|
+
});
|
2748
|
+
return;
|
2749
|
+
}
|
2750
|
+
});
|
2677
2751
|
|
2678
2752
|
// Textarea Auto Resize
|
2679
2753
|
var hiddenDiv = $('.hiddendiv').first();
|
@@ -2885,6 +2959,7 @@ $(document).ready(function(){
|
|
2885
2959
|
var appendOptionWithIcon = function(select, option, type) {
|
2886
2960
|
// Add disabled attr if disabled
|
2887
2961
|
var disabledClass = (option.is(':disabled')) ? 'disabled ' : '';
|
2962
|
+
var optgroupClass = (type === 'optgroup-option') ? 'optgroup-option ' : '';
|
2888
2963
|
|
2889
2964
|
// add icons
|
2890
2965
|
var icon_url = option.data('icon');
|
@@ -2897,7 +2972,7 @@ $(document).ready(function(){
|
|
2897
2972
|
if (type === 'multiple') {
|
2898
2973
|
options.append($('<li class="' + disabledClass + '"><img src="' + icon_url + '"' + classString + '><span><input type="checkbox"' + disabledClass + '/><label></label>' + option.html() + '</span></li>'));
|
2899
2974
|
} else {
|
2900
|
-
options.append($('<li class="' + disabledClass + '"><img src="' + icon_url + '"' + classString + '><span>' + option.html() + '</span></li>'));
|
2975
|
+
options.append($('<li class="' + disabledClass + optgroupClass + '"><img src="' + icon_url + '"' + classString + '><span>' + option.html() + '</span></li>'));
|
2901
2976
|
}
|
2902
2977
|
return true;
|
2903
2978
|
}
|
@@ -2906,7 +2981,7 @@ $(document).ready(function(){
|
|
2906
2981
|
if (type === 'multiple') {
|
2907
2982
|
options.append($('<li class="' + disabledClass + '"><span><input type="checkbox"' + disabledClass + '/><label></label>' + option.html() + '</span></li>'));
|
2908
2983
|
} else {
|
2909
|
-
options.append($('<li class="' + disabledClass + '"><span>' + option.html() + '</span></li>'));
|
2984
|
+
options.append($('<li class="' + disabledClass + optgroupClass + '"><span>' + option.html() + '</span></li>'));
|
2910
2985
|
}
|
2911
2986
|
};
|
2912
2987
|
|
@@ -2927,7 +3002,7 @@ $(document).ready(function(){
|
|
2927
3002
|
options.append($('<li class="optgroup"><span>' + $(this).attr('label') + '</span></li>'));
|
2928
3003
|
|
2929
3004
|
selectOptions.each(function() {
|
2930
|
-
appendOptionWithIcon($select, $(this));
|
3005
|
+
appendOptionWithIcon($select, $(this), 'optgroup-option');
|
2931
3006
|
});
|
2932
3007
|
}
|
2933
3008
|
});
|
@@ -3036,7 +3111,7 @@ $(document).ready(function(){
|
|
3036
3111
|
}
|
3037
3112
|
|
3038
3113
|
// Make option as selected and scroll to selected position
|
3039
|
-
activateOption = function(collection, newOption) {
|
3114
|
+
var activateOption = function(collection, newOption) {
|
3040
3115
|
if (newOption) {
|
3041
3116
|
collection.find('li.selected').removeClass('selected');
|
3042
3117
|
var option = $(newOption);
|
@@ -3386,7 +3461,7 @@ $(document).ready(function(){
|
|
3386
3461
|
panning = false;
|
3387
3462
|
curr_index = $slider.find('.active').index();
|
3388
3463
|
|
3389
|
-
if (!swipeRight && !swipeLeft) {
|
3464
|
+
if (!swipeRight && !swipeLeft || $slides.length <=1) {
|
3390
3465
|
// Return to original spot
|
3391
3466
|
$curr_slide.velocity({ translateX: 0
|
3392
3467
|
}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
@@ -3481,7 +3556,8 @@ $(document).ready(function(){
|
|
3481
3556
|
$.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.tooltip' );
|
3482
3557
|
}
|
3483
3558
|
}; // Plugin end
|
3484
|
-
}( jQuery ))
|
3559
|
+
}( jQuery ));
|
3560
|
+
;(function ($) {
|
3485
3561
|
$(document).ready(function() {
|
3486
3562
|
|
3487
3563
|
$(document).on('click.card', '.card', function (e) {
|
@@ -3518,66 +3594,61 @@ $(document).ready(function(){
|
|
3518
3594
|
|
3519
3595
|
});
|
3520
3596
|
}( jQuery ));;(function ($) {
|
3521
|
-
|
3597
|
+
$.fn.pushpin = function (options) {
|
3522
3598
|
|
3523
|
-
|
3599
|
+
var defaults = {
|
3600
|
+
top: 0,
|
3601
|
+
bottom: Infinity,
|
3602
|
+
offset: 0
|
3603
|
+
};
|
3604
|
+
options = $.extend(defaults, options);
|
3524
3605
|
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3606
|
+
$index = 0;
|
3607
|
+
return this.each(function() {
|
3608
|
+
var $uniqueId = Materialize.guid(),
|
3609
|
+
$this = $(this),
|
3610
|
+
$original_offset = $(this).offset().top;
|
3611
|
+
|
3612
|
+
function removePinClasses(object) {
|
3613
|
+
object.removeClass('pin-top');
|
3614
|
+
object.removeClass('pinned');
|
3615
|
+
object.removeClass('pin-bottom');
|
3529
3616
|
}
|
3530
|
-
options = $.extend(defaults, options);
|
3531
3617
|
|
3532
|
-
|
3533
|
-
|
3534
|
-
|
3535
|
-
|
3536
|
-
$
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
object.removeClass('pinned');
|
3541
|
-
object.removeClass('pin-bottom');
|
3542
|
-
}
|
3543
|
-
|
3544
|
-
function updateElements(objects, scrolled) {
|
3545
|
-
objects.each(function () {
|
3546
|
-
// Add position fixed (because its between top and bottom)
|
3547
|
-
if (options.top <= scrolled && options.bottom >= scrolled && !$(this).hasClass('pinned')) {
|
3548
|
-
removePinClasses($(this));
|
3549
|
-
$(this).css('top', options.offset);
|
3550
|
-
$(this).addClass('pinned');
|
3551
|
-
}
|
3552
|
-
|
3553
|
-
// Add pin-top (when scrolled position is above top)
|
3554
|
-
if (scrolled < options.top && !$(this).hasClass('pin-top')) {
|
3555
|
-
removePinClasses($(this));
|
3556
|
-
$(this).css('top', 0);
|
3557
|
-
$(this).addClass('pin-top');
|
3558
|
-
}
|
3618
|
+
function updateElements(objects, scrolled) {
|
3619
|
+
objects.each(function () {
|
3620
|
+
// Add position fixed (because its between top and bottom)
|
3621
|
+
if (options.top <= scrolled && options.bottom >= scrolled && !$(this).hasClass('pinned')) {
|
3622
|
+
removePinClasses($(this));
|
3623
|
+
$(this).css('top', options.offset);
|
3624
|
+
$(this).addClass('pinned');
|
3625
|
+
}
|
3559
3626
|
|
3560
|
-
|
3561
|
-
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
3565
|
-
|
3566
|
-
});
|
3567
|
-
}
|
3627
|
+
// Add pin-top (when scrolled position is above top)
|
3628
|
+
if (scrolled < options.top && !$(this).hasClass('pin-top')) {
|
3629
|
+
removePinClasses($(this));
|
3630
|
+
$(this).css('top', 0);
|
3631
|
+
$(this).addClass('pin-top');
|
3632
|
+
}
|
3568
3633
|
|
3569
|
-
|
3570
|
-
|
3571
|
-
|
3572
|
-
|
3634
|
+
// Add pin-bottom (when scrolled position is below bottom)
|
3635
|
+
if (scrolled > options.bottom && !$(this).hasClass('pin-bottom')) {
|
3636
|
+
removePinClasses($(this));
|
3637
|
+
$(this).addClass('pin-bottom');
|
3638
|
+
$(this).css('top', options.bottom - $original_offset);
|
3639
|
+
}
|
3573
3640
|
});
|
3641
|
+
}
|
3574
3642
|
|
3643
|
+
updateElements($this, $(window).scrollTop());
|
3644
|
+
$(window).on('scroll.' + $uniqueId, function () {
|
3645
|
+
var $scrolled = $(window).scrollTop() + options.offset;
|
3646
|
+
updateElements($this, $scrolled);
|
3575
3647
|
});
|
3576
3648
|
|
3577
|
-
};
|
3578
|
-
|
3649
|
+
});
|
3579
3650
|
|
3580
|
-
}
|
3651
|
+
};
|
3581
3652
|
}( jQuery ));;(function ($) {
|
3582
3653
|
$(document).ready(function() {
|
3583
3654
|
|
@@ -3855,8 +3926,12 @@ $(document).ready(function(){
|
|
3855
3926
|
|
3856
3927
|
if (windowScroll > (elementOffset + offset)) {
|
3857
3928
|
if (value.done !== true) {
|
3858
|
-
|
3859
|
-
|
3929
|
+
if (typeof(callback) === 'function') {
|
3930
|
+
callback.call(this);
|
3931
|
+
} else if (typeof(callback) === 'string') {
|
3932
|
+
var callbackFunc = new Function(callback);
|
3933
|
+
callbackFunc();
|
3934
|
+
}
|
3860
3935
|
value.done = true;
|
3861
3936
|
}
|
3862
3937
|
}
|
@@ -3866,7 +3941,8 @@ $(document).ready(function(){
|
|
3866
3941
|
}, 100);
|
3867
3942
|
};
|
3868
3943
|
|
3869
|
-
})(jQuery)
|
3944
|
+
})(jQuery);
|
3945
|
+
;/*!
|
3870
3946
|
* pickadate.js v3.5.0, 2014/04/13
|
3871
3947
|
* By Amsul, http://amsul.ca
|
3872
3948
|
* Hosted on http://amsul.github.io/pickadate.js
|
@@ -4114,7 +4190,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
4114
4190
|
|
4115
4191
|
// Pass focus to the root element’s jQuery object.
|
4116
4192
|
// * Workaround for iOS8 to bring the picker’s root into view.
|
4117
|
-
P.$root
|
4193
|
+
P.$root.eq(0).focus()
|
4118
4194
|
|
4119
4195
|
// Bind the document events.
|
4120
4196
|
$document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) {
|
@@ -4196,7 +4272,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
4196
4272
|
// ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|
|
4197
4273
|
// The focus is triggered *after* the close has completed - causing it
|
4198
4274
|
// to open again. So unbind and rebind the event at the next tick.
|
4199
|
-
P.$root.off( 'focus.toOpen' )
|
4275
|
+
P.$root.off( 'focus.toOpen' ).eq(0).focus()
|
4200
4276
|
setTimeout( function() {
|
4201
4277
|
P.$root.on( 'focus.toOpen', handleFocusToOpenEvent )
|
4202
4278
|
}, 0 )
|
@@ -4482,7 +4558,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
4482
4558
|
// On focus/click, focus onto the root to open it up.
|
4483
4559
|
on( 'focus.' + STATE.id + ' click.' + STATE.id, function( event ) {
|
4484
4560
|
event.preventDefault()
|
4485
|
-
P.$root
|
4561
|
+
P.$root.eq(0).focus()
|
4486
4562
|
}).
|
4487
4563
|
|
4488
4564
|
// Handle keyboard event based on the picker being opened or not.
|
@@ -4540,7 +4616,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
4540
4616
|
|
4541
4617
|
// Re-focus onto the root so that users can click away
|
4542
4618
|
// from elements focused within the picker.
|
4543
|
-
P.$root
|
4619
|
+
P.$root.eq(0).focus()
|
4544
4620
|
}
|
4545
4621
|
}
|
4546
4622
|
}
|
@@ -4573,7 +4649,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
4573
4649
|
|
4574
4650
|
// If it’s disabled or nothing inside is actively focused, re-focus the element.
|
4575
4651
|
if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) {
|
4576
|
-
P.$root
|
4652
|
+
P.$root.eq(0).focus()
|
4577
4653
|
}
|
4578
4654
|
|
4579
4655
|
// If something is superficially changed, update the `highlight` based on the `nav`.
|
@@ -6423,15 +6499,22 @@ Picker.extend( 'pickadate', DatePicker )
|
|
6423
6499
|
|
6424
6500
|
$.fn.characterCounter = function(){
|
6425
6501
|
return this.each(function(){
|
6502
|
+
var $input = $(this);
|
6503
|
+
var $counterElement = $input.parent().find('span[class="character-counter"]');
|
6504
|
+
|
6505
|
+
// character counter has already been added appended to the parent container
|
6506
|
+
if ($counterElement.length) {
|
6507
|
+
return;
|
6508
|
+
}
|
6426
6509
|
|
6427
|
-
var itHasLengthAttribute = $
|
6510
|
+
var itHasLengthAttribute = $input.attr('length') !== undefined;
|
6428
6511
|
|
6429
6512
|
if(itHasLengthAttribute){
|
6430
|
-
$
|
6431
|
-
$
|
6432
|
-
$
|
6513
|
+
$input.on('input', updateCounter);
|
6514
|
+
$input.on('focus', updateCounter);
|
6515
|
+
$input.on('blur', removeCounterElement);
|
6433
6516
|
|
6434
|
-
addCounterElement($
|
6517
|
+
addCounterElement($input);
|
6435
6518
|
}
|
6436
6519
|
|
6437
6520
|
});
|
@@ -6448,8 +6531,14 @@ Picker.extend( 'pickadate', DatePicker )
|
|
6448
6531
|
addInputStyle(isValidLength, $(this));
|
6449
6532
|
}
|
6450
6533
|
|
6451
|
-
function addCounterElement($input){
|
6452
|
-
var $counterElement = $('
|
6534
|
+
function addCounterElement($input) {
|
6535
|
+
var $counterElement = $input.parent().find('span[class="character-counter"]');
|
6536
|
+
|
6537
|
+
if ($counterElement.length) {
|
6538
|
+
return;
|
6539
|
+
}
|
6540
|
+
|
6541
|
+
$counterElement = $('<span/>')
|
6453
6542
|
.addClass('character-counter')
|
6454
6543
|
.css('float','right')
|
6455
6544
|
.css('font-size','12px')
|