materialize-sass 0.97.0 → 0.97.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/materialize-sprockets.js +4 -0
- data/app/assets/javascripts/materialize.js +242 -182
- data/app/assets/javascripts/materialize/cards.js +1 -1
- data/app/assets/javascripts/materialize/chips.js +9 -0
- data/app/assets/javascripts/materialize/dropdown.js +31 -9
- data/app/assets/javascripts/materialize/extras/nouislider.js +1666 -0
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +6 -0
- data/app/assets/javascripts/materialize/forms.js +27 -19
- data/app/assets/javascripts/materialize/global.js +1 -1
- data/app/assets/javascripts/materialize/scrollFire.js +1 -1
- data/app/assets/javascripts/materialize/sideNav.js +17 -14
- data/app/assets/javascripts/materialize/tabs.js +2 -9
- data/app/assets/javascripts/materialize/toasts.js +13 -2
- data/app/assets/javascripts/materialize/tooltip.js +144 -133
- data/app/assets/stylesheets/materialize.scss +2 -1
- data/app/assets/stylesheets/materialize/components/_cards.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_chips.scss +27 -0
- data/app/assets/stylesheets/materialize/components/_collapsible.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_form.scss +4 -2
- data/app/assets/stylesheets/materialize/components/_global.scss +17 -6
- data/app/assets/stylesheets/materialize/components/_materialbox.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_navbar.scss +11 -0
- data/app/assets/stylesheets/materialize/components/_preloader.scss +2 -0
- data/app/assets/stylesheets/materialize/components/_roboto.scss +8 -4
- data/app/assets/stylesheets/materialize/components/_tabs.scss +5 -0
- data/app/assets/stylesheets/materialize/components/_toast.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_typography.scss +4 -1
- data/app/assets/stylesheets/materialize/components/_variables.scss +3 -0
- data/app/assets/stylesheets/materialize/extras/nouislider.css +258 -0
- data/lib/materialize-sass/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f90f51177003756a89e252c13a9c48f3b40375
|
4
|
+
data.tar.gz: 2da4265599a55f4fa778443876676d9d6085f7f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3eb171a15e757e91372ab9725a9359ea32e0e4eb07bf98918201fcba7ed2da89934cac2d82d8935f66a521f33df88f6d4c7606a7457974755c930a12ce9357
|
7
|
+
data.tar.gz: 2c96e799ad3f797578bbbbc8e755bd646403c8184d718fd0480d142b759925ff648d7a57084a8eff1d0e1dffd74e975ce053ae36adaa4bc2aceb624400916fc0
|
@@ -18,6 +18,7 @@
|
|
18
18
|
//= require ./materialize/forms
|
19
19
|
//= require ./materialize/slider
|
20
20
|
//= require ./materialize/cards
|
21
|
+
//= require ./materialize/chips
|
21
22
|
//= require ./materialize/pushpin
|
22
23
|
//= require ./materialize/buttons
|
23
24
|
//= require ./materialize/transitions
|
@@ -25,3 +26,6 @@
|
|
25
26
|
//= require ./materialize/date_picker/picker
|
26
27
|
//= require ./materialize/date_picker/picker.date
|
27
28
|
//= require ./materialize/character_counter
|
29
|
+
|
30
|
+
|
31
|
+
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Materialize v0.97.
|
2
|
+
* Materialize v0.97.1 (http://materializecss.com)
|
3
3
|
* Copyright 2014-2015 Materialize
|
4
4
|
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
5
|
*/
|
@@ -252,7 +252,7 @@ jQuery.extend( jQuery.easing,
|
|
252
252
|
};
|
253
253
|
})(Hammer.Manager.prototype.emit);
|
254
254
|
}));
|
255
|
-
;Materialize = {};
|
255
|
+
;window.Materialize = {};
|
256
256
|
|
257
257
|
// Unique ID
|
258
258
|
Materialize.guid = (function() {
|
@@ -442,7 +442,8 @@ else {
|
|
442
442
|
constrain_width: true, // Constrains width of dropdown to the activator
|
443
443
|
hover: false,
|
444
444
|
gutter: 0, // Spacing from edge
|
445
|
-
belowOrigin: false
|
445
|
+
belowOrigin: false,
|
446
|
+
alignment: 'left'
|
446
447
|
};
|
447
448
|
|
448
449
|
this.each(function(){
|
@@ -465,6 +466,8 @@ else {
|
|
465
466
|
options.gutter = origin.data('gutter');
|
466
467
|
if (origin.data('beloworigin') !== undefined)
|
467
468
|
options.belowOrigin = origin.data('beloworigin');
|
469
|
+
if (origin.data('alignment') !== undefined)
|
470
|
+
options.alignment = origin.data('alignment');
|
468
471
|
}
|
469
472
|
|
470
473
|
updateOptions();
|
@@ -487,27 +490,46 @@ else {
|
|
487
490
|
if (options.constrain_width === true) {
|
488
491
|
activates.css('width', origin.outerWidth());
|
489
492
|
}
|
493
|
+
else {
|
494
|
+
activates.css('white-space', 'nowrap');
|
495
|
+
}
|
490
496
|
var offset = 0;
|
491
497
|
if (options.belowOrigin === true) {
|
492
498
|
offset = origin.height();
|
493
499
|
}
|
494
500
|
|
495
|
-
//
|
501
|
+
// Offscreen detection
|
496
502
|
var offsetLeft = origin.offset().left;
|
497
|
-
var width_difference
|
498
|
-
var gutter_spacing = options.gutter;
|
499
|
-
|
500
|
-
|
503
|
+
var activatesLeft, width_difference, gutter_spacing;
|
501
504
|
if (offsetLeft + activates.innerWidth() > $(window).width()) {
|
502
|
-
|
503
|
-
gutter_spacing = gutter_spacing * -1;
|
505
|
+
options.alignment = 'right';
|
504
506
|
}
|
507
|
+
else if (offsetLeft - activates.innerWidth() + origin.innerWidth() < 0) {
|
508
|
+
options.alignment = 'left';
|
509
|
+
}
|
510
|
+
|
511
|
+
// Handle edge alignment
|
512
|
+
if (options.alignment === 'left') {
|
513
|
+
width_difference = 0;
|
514
|
+
gutter_spacing = options.gutter;
|
515
|
+
activatesLeft = origin.position().left + width_difference + gutter_spacing;
|
505
516
|
|
517
|
+
// Position dropdown
|
518
|
+
activates.css({ left: activatesLeft });
|
519
|
+
}
|
520
|
+
else if (options.alignment === 'right') {
|
521
|
+
var offsetRight = $(window).width() - offsetLeft - origin.innerWidth();
|
522
|
+
width_difference = 0;
|
523
|
+
gutter_spacing = options.gutter;
|
524
|
+
activatesLeft = ( $(window).width() - origin.position().left - origin.innerWidth() ) + gutter_spacing;
|
525
|
+
|
526
|
+
// Position dropdown
|
527
|
+
activates.css({ right: activatesLeft });
|
528
|
+
}
|
506
529
|
// Position dropdown
|
507
530
|
activates.css({
|
508
531
|
position: 'absolute',
|
509
532
|
top: origin.position().top + offset,
|
510
|
-
left: origin.position().left + width_difference + gutter_spacing
|
511
533
|
});
|
512
534
|
|
513
535
|
|
@@ -1100,11 +1122,6 @@ $(document).ready(function(){
|
|
1100
1122
|
window_width = $(window).width();
|
1101
1123
|
|
1102
1124
|
$this.width('100%');
|
1103
|
-
// Set Tab Width for each tab
|
1104
|
-
var $num_tabs = $(this).children('li').length;
|
1105
|
-
$this.children('li').each(function() {
|
1106
|
-
$(this).width((100/$num_tabs)+'%');
|
1107
|
-
});
|
1108
1125
|
var $active, $content, $links = $this.find('li.tab a'),
|
1109
1126
|
$tabs_width = $this.width(),
|
1110
1127
|
$tab_width = $this.find('li').first().outerWidth(),
|
@@ -1234,153 +1251,164 @@ $(document).ready(function(){
|
|
1234
1251
|
var defaults = {
|
1235
1252
|
delay: 350
|
1236
1253
|
};
|
1254
|
+
|
1255
|
+
// Remove tooltip from the activator
|
1256
|
+
if (options === "remove") {
|
1257
|
+
this.each(function(){
|
1258
|
+
$('#' + $(this).attr('data-tooltip-id')).remove();
|
1259
|
+
});
|
1260
|
+
return false;
|
1261
|
+
}
|
1262
|
+
|
1237
1263
|
options = $.extend(defaults, options);
|
1238
1264
|
|
1239
|
-
//Remove previously created html
|
1240
|
-
$('.material-tooltip').remove();
|
1241
1265
|
|
1242
1266
|
return this.each(function(){
|
1267
|
+
var tooltipId = Materialize.guid();
|
1243
1268
|
var origin = $(this);
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
counter
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
1290
|
-
});
|
1291
|
-
tooltipVerticalMovement = '-10px';
|
1292
|
-
backdrop.css({
|
1293
|
-
borderRadius: '14px 14px 0 0',
|
1294
|
-
transformOrigin: '50% 90%',
|
1295
|
-
marginTop: tooltipHeight,
|
1296
|
-
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
1297
|
-
|
1298
|
-
});
|
1299
|
-
}
|
1300
|
-
// Left Position
|
1301
|
-
else if (tooltipPosition === "left") {
|
1269
|
+
origin.attr('data-tooltip-id', tooltipId);
|
1270
|
+
|
1271
|
+
// Create Text span
|
1272
|
+
var tooltip_text = $('<span></span>').text(origin.attr('data-tooltip'));
|
1273
|
+
|
1274
|
+
// Create tooltip
|
1275
|
+
var newTooltip = $('<div></div>');
|
1276
|
+
newTooltip.addClass('material-tooltip').append(tooltip_text)
|
1277
|
+
.appendTo($('body'))
|
1278
|
+
.attr('id', tooltipId);
|
1279
|
+
|
1280
|
+
var backdrop = $('<div></div>').addClass('backdrop');
|
1281
|
+
backdrop.appendTo(newTooltip);
|
1282
|
+
backdrop.css({ top: 0, left:0 });
|
1283
|
+
|
1284
|
+
|
1285
|
+
//Destroy previously binded events
|
1286
|
+
origin.off('mouseenter.tooltip mouseleave.tooltip');
|
1287
|
+
// Mouse In
|
1288
|
+
origin.on({
|
1289
|
+
'mouseenter.tooltip': function(e) {
|
1290
|
+
var tooltip_delay = origin.data("delay");
|
1291
|
+
tooltip_delay = (tooltip_delay === undefined || tooltip_delay === '') ? options.delay : tooltip_delay;
|
1292
|
+
counter = 0;
|
1293
|
+
counterInterval = setInterval(function(){
|
1294
|
+
counter += 10;
|
1295
|
+
if (counter >= tooltip_delay && started === false) {
|
1296
|
+
started = true;
|
1297
|
+
newTooltip.css({ display: 'block', left: '0px', top: '0px' });
|
1298
|
+
|
1299
|
+
// Set Tooltip text
|
1300
|
+
newTooltip.children('span').text(origin.attr('data-tooltip'));
|
1301
|
+
|
1302
|
+
// Tooltip positioning
|
1303
|
+
var originWidth = origin.outerWidth();
|
1304
|
+
var originHeight = origin.outerHeight();
|
1305
|
+
var tooltipPosition = origin.attr('data-position');
|
1306
|
+
var tooltipHeight = newTooltip.outerHeight();
|
1307
|
+
var tooltipWidth = newTooltip.outerWidth();
|
1308
|
+
var tooltipVerticalMovement = '0px';
|
1309
|
+
var tooltipHorizontalMovement = '0px';
|
1310
|
+
var scale_factor = 8;
|
1311
|
+
|
1312
|
+
if (tooltipPosition === "top") {
|
1313
|
+
// Top Position
|
1302
1314
|
newTooltip.css({
|
1303
|
-
top: origin.offset().top
|
1304
|
-
left: origin.offset().left - tooltipWidth - margin
|
1305
|
-
});
|
1306
|
-
tooltipHorizontalMovement = '-10px';
|
1307
|
-
backdrop.css({
|
1308
|
-
width: '14px',
|
1309
|
-
height: '14px',
|
1310
|
-
borderRadius: '14px 0 0 14px',
|
1311
|
-
transformOrigin: '95% 50%',
|
1312
|
-
marginTop: tooltipHeight/2,
|
1313
|
-
marginLeft: tooltipWidth
|
1314
|
-
});
|
1315
|
-
}
|
1316
|
-
// Right Position
|
1317
|
-
else if (tooltipPosition === "right") {
|
1318
|
-
newTooltip.css({
|
1319
|
-
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
1320
|
-
left: origin.offset().left + originWidth + margin
|
1321
|
-
});
|
1322
|
-
tooltipHorizontalMovement = '+10px';
|
1323
|
-
backdrop.css({
|
1324
|
-
width: '14px',
|
1325
|
-
height: '14px',
|
1326
|
-
borderRadius: '0 14px 14px 0',
|
1327
|
-
transformOrigin: '5% 50%',
|
1328
|
-
marginTop: tooltipHeight/2,
|
1329
|
-
marginLeft: '0px'
|
1330
|
-
});
|
1331
|
-
}
|
1332
|
-
else {
|
1333
|
-
// Bottom Position
|
1334
|
-
newTooltip.css({
|
1335
|
-
top: origin.offset().top + origin.outerHeight() + margin,
|
1315
|
+
top: origin.offset().top - tooltipHeight - margin,
|
1336
1316
|
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
1337
1317
|
});
|
1338
|
-
tooltipVerticalMovement = '
|
1318
|
+
tooltipVerticalMovement = '-10px';
|
1339
1319
|
backdrop.css({
|
1320
|
+
borderRadius: '14px 14px 0 0',
|
1321
|
+
transformOrigin: '50% 90%',
|
1322
|
+
marginTop: tooltipHeight,
|
1340
1323
|
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
1324
|
+
|
1341
1325
|
});
|
1342
|
-
|
1326
|
+
}
|
1327
|
+
// Left Position
|
1328
|
+
else if (tooltipPosition === "left") {
|
1329
|
+
newTooltip.css({
|
1330
|
+
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
1331
|
+
left: origin.offset().left - tooltipWidth - margin
|
1332
|
+
});
|
1333
|
+
tooltipHorizontalMovement = '-10px';
|
1334
|
+
backdrop.css({
|
1335
|
+
width: '14px',
|
1336
|
+
height: '14px',
|
1337
|
+
borderRadius: '14px 0 0 14px',
|
1338
|
+
transformOrigin: '95% 50%',
|
1339
|
+
marginTop: tooltipHeight/2,
|
1340
|
+
marginLeft: tooltipWidth
|
1341
|
+
});
|
1342
|
+
}
|
1343
|
+
// Right Position
|
1344
|
+
else if (tooltipPosition === "right") {
|
1345
|
+
newTooltip.css({
|
1346
|
+
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
1347
|
+
left: origin.offset().left + originWidth + margin
|
1348
|
+
});
|
1349
|
+
tooltipHorizontalMovement = '+10px';
|
1350
|
+
backdrop.css({
|
1351
|
+
width: '14px',
|
1352
|
+
height: '14px',
|
1353
|
+
borderRadius: '0 14px 14px 0',
|
1354
|
+
transformOrigin: '5% 50%',
|
1355
|
+
marginTop: tooltipHeight/2,
|
1356
|
+
marginLeft: '0px'
|
1357
|
+
});
|
1358
|
+
}
|
1359
|
+
else {
|
1360
|
+
// Bottom Position
|
1361
|
+
newTooltip.css({
|
1362
|
+
top: origin.offset().top + origin.outerHeight() + margin,
|
1363
|
+
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
1364
|
+
});
|
1365
|
+
tooltipVerticalMovement = '+10px';
|
1366
|
+
backdrop.css({
|
1367
|
+
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
1368
|
+
});
|
1369
|
+
}
|
1343
1370
|
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1371
|
+
// Calculate Scale to fill
|
1372
|
+
scale_factor = tooltipWidth / 8;
|
1373
|
+
if (scale_factor < 8) {
|
1374
|
+
scale_factor = 8;
|
1375
|
+
}
|
1376
|
+
if (tooltipPosition === "right" || tooltipPosition === "left") {
|
1377
|
+
scale_factor = tooltipWidth / 10;
|
1378
|
+
if (scale_factor < 6)
|
1379
|
+
scale_factor = 6;
|
1380
|
+
}
|
1354
1381
|
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1382
|
+
newTooltip.velocity({ marginTop: tooltipVerticalMovement, marginLeft: tooltipHorizontalMovement}, { duration: 350, queue: false })
|
1383
|
+
.velocity({opacity: 1}, {duration: 300, delay: 50, queue: false});
|
1384
|
+
backdrop.css({ display: 'block' })
|
1385
|
+
.velocity({opacity:1},{duration: 55, delay: 0, queue: false})
|
1386
|
+
.velocity({scale: scale_factor}, {duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad'});
|
1359
1387
|
|
1360
|
-
|
1361
|
-
|
1388
|
+
}
|
1389
|
+
}, 10); // End Interval
|
1362
1390
|
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1391
|
+
// Mouse Out
|
1392
|
+
},
|
1393
|
+
'mouseleave.tooltip': function(){
|
1394
|
+
// Reset State
|
1395
|
+
clearInterval(counterInterval);
|
1396
|
+
counter = 0;
|
1397
|
+
|
1398
|
+
// Animate back
|
1399
|
+
newTooltip.velocity({
|
1400
|
+
opacity: 0, marginTop: 0, marginLeft: 0}, { duration: 225, queue: false, delay: 225 }
|
1401
|
+
);
|
1402
|
+
backdrop.velocity({opacity: 0, scale: 1}, {
|
1403
|
+
duration:225,
|
1404
|
+
delay: 275, queue: false,
|
1405
|
+
complete: function(){
|
1406
|
+
backdrop.css('display', 'none');
|
1407
|
+
newTooltip.css('display', 'none');
|
1408
|
+
started = false;}
|
1409
|
+
});
|
1410
|
+
}
|
1381
1411
|
});
|
1382
|
-
}
|
1383
|
-
});
|
1384
1412
|
});
|
1385
1413
|
};
|
1386
1414
|
|
@@ -1799,8 +1827,19 @@ $(document).ready(function(){
|
|
1799
1827
|
toast.classList.add(classes[i]);
|
1800
1828
|
}
|
1801
1829
|
}
|
1802
|
-
|
1803
|
-
|
1830
|
+
// If type of parameter is HTML Element
|
1831
|
+
if ( typeof HTMLElement === "object" ? html instanceof HTMLElement : html && typeof html === "object" && html !== null && html.nodeType === 1 && typeof html.nodeName==="string"
|
1832
|
+
) {
|
1833
|
+
toast.appendChild(html);
|
1834
|
+
}
|
1835
|
+
else if (html instanceof jQuery) {
|
1836
|
+
// Check if it is jQuery object
|
1837
|
+
toast.appendChild(html[0]);
|
1838
|
+
}
|
1839
|
+
else {
|
1840
|
+
// Insert as text;
|
1841
|
+
toast.innerHTML = html;
|
1842
|
+
}
|
1804
1843
|
// Bind hammer
|
1805
1844
|
var hammerHandler = new Hammer(toast, {prevent_default: false});
|
1806
1845
|
hammerHandler.on('pan', function(e) {
|
@@ -1872,17 +1911,18 @@ $(document).ready(function(){
|
|
1872
1911
|
}
|
1873
1912
|
|
1874
1913
|
// Add Touch Area
|
1875
|
-
$('
|
1914
|
+
var dragTarget = $('<div class="drag-target"></div>');
|
1915
|
+
$('body').append(dragTarget);
|
1876
1916
|
|
1877
1917
|
if (options.edge == 'left') {
|
1878
1918
|
menu_id.css('left', -1 * (options.menuWidth + 10));
|
1879
|
-
|
1919
|
+
dragTarget.css({'left': 0}); // Add Touch Area
|
1880
1920
|
}
|
1881
1921
|
else {
|
1882
1922
|
menu_id.addClass('right-aligned') // Change text-alignment to right
|
1883
1923
|
.css('right', -1 * (options.menuWidth + 10))
|
1884
1924
|
.css('left', '');
|
1885
|
-
|
1925
|
+
dragTarget.css({'right': 0}); // Add Touch Area
|
1886
1926
|
}
|
1887
1927
|
|
1888
1928
|
// If fixed sidenav, bring menu out
|
@@ -1935,7 +1975,7 @@ $(document).ready(function(){
|
|
1935
1975
|
} });
|
1936
1976
|
if (options.edge === 'left') {
|
1937
1977
|
// Reset phantom div
|
1938
|
-
|
1978
|
+
dragTarget.css({width: '', right: '', left: '0'});
|
1939
1979
|
menu_id.velocity(
|
1940
1980
|
{left: -1 * (options.menuWidth + 10)},
|
1941
1981
|
{ duration: 200,
|
@@ -1953,7 +1993,7 @@ $(document).ready(function(){
|
|
1953
1993
|
}
|
1954
1994
|
else {
|
1955
1995
|
// Reset phantom div
|
1956
|
-
|
1996
|
+
dragTarget.css({width: '', right: '0', left: ''});
|
1957
1997
|
menu_id.velocity(
|
1958
1998
|
{right: -1 * (options.menuWidth + 10)},
|
1959
1999
|
{ duration: 200,
|
@@ -1976,11 +2016,11 @@ $(document).ready(function(){
|
|
1976
2016
|
var panning = false;
|
1977
2017
|
var menuOut = false;
|
1978
2018
|
|
1979
|
-
|
2019
|
+
dragTarget.on('click', function(){
|
1980
2020
|
removeMenu();
|
1981
2021
|
});
|
1982
2022
|
|
1983
|
-
|
2023
|
+
dragTarget.hammer({
|
1984
2024
|
prevent_default: false
|
1985
2025
|
}).bind('pan', function(e) {
|
1986
2026
|
|
@@ -2059,7 +2099,7 @@ $(document).ready(function(){
|
|
2059
2099
|
if ((menuOut && velocityX <= 0.3) || velocityX < -0.5) {
|
2060
2100
|
menu_id.velocity({left: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2061
2101
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
2062
|
-
|
2102
|
+
dragTarget.css({width: '50%', right: 0, left: ''});
|
2063
2103
|
}
|
2064
2104
|
else if (!menuOut || velocityX > 0.3) {
|
2065
2105
|
// Enable Scrolling
|
@@ -2070,14 +2110,14 @@ $(document).ready(function(){
|
|
2070
2110
|
complete: function () {
|
2071
2111
|
$(this).remove();
|
2072
2112
|
}});
|
2073
|
-
|
2113
|
+
dragTarget.css({width: '10px', right: '', left: 0});
|
2074
2114
|
}
|
2075
2115
|
}
|
2076
2116
|
else {
|
2077
2117
|
if ((menuOut && velocityX >= -0.3) || velocityX > 0.5) {
|
2078
2118
|
menu_id.velocity({right: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2079
2119
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
2080
|
-
|
2120
|
+
dragTarget.css({width: '50%', right: '', left: 0});
|
2081
2121
|
}
|
2082
2122
|
else if (!menuOut || velocityX < -0.3) {
|
2083
2123
|
// Enable Scrolling
|
@@ -2088,7 +2128,7 @@ $(document).ready(function(){
|
|
2088
2128
|
complete: function () {
|
2089
2129
|
$(this).remove();
|
2090
2130
|
}});
|
2091
|
-
|
2131
|
+
dragTarget.css({width: '10px', right: 0, left: ''});
|
2092
2132
|
}
|
2093
2133
|
}
|
2094
2134
|
|
@@ -2105,13 +2145,15 @@ $(document).ready(function(){
|
|
2105
2145
|
|
2106
2146
|
// Disable Scrolling
|
2107
2147
|
$('body').css('overflow', 'hidden');
|
2108
|
-
|
2148
|
+
// Push current drag target on top of DOM tree
|
2149
|
+
$('body').append(dragTarget);
|
2150
|
+
|
2109
2151
|
if (options.edge === 'left') {
|
2110
|
-
|
2152
|
+
dragTarget.css({width: '50%', right: 0, left: ''});
|
2111
2153
|
menu_id.velocity({left: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2112
2154
|
}
|
2113
2155
|
else {
|
2114
|
-
|
2156
|
+
dragTarget.css({width: '50%', right: '', left: 0});
|
2115
2157
|
menu_id.velocity({right: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
2116
2158
|
menu_id.css('left','');
|
2117
2159
|
}
|
@@ -2454,7 +2496,7 @@ $(document).ready(function(){
|
|
2454
2496
|
var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea';
|
2455
2497
|
$(input_selector).each(function(index, element) {
|
2456
2498
|
if ($(element).val().length > 0 || $(this).attr('placeholder') !== undefined || $(element)[0].validity.badInput === true) {
|
2457
|
-
$(this).siblings('label
|
2499
|
+
$(this).siblings('label').addClass('active');
|
2458
2500
|
}
|
2459
2501
|
else {
|
2460
2502
|
$(this).siblings('label, i').removeClass('active');
|
@@ -2471,7 +2513,7 @@ $(document).ready(function(){
|
|
2471
2513
|
// Add active if form auto complete
|
2472
2514
|
$(document).on('change', input_selector, function () {
|
2473
2515
|
if($(this).val().length !== 0 || $(this).attr('placeholder') !== undefined) {
|
2474
|
-
$(this).siblings('label
|
2516
|
+
$(this).siblings('label').addClass('active');
|
2475
2517
|
}
|
2476
2518
|
validate_field($(this));
|
2477
2519
|
});
|
@@ -2510,10 +2552,14 @@ $(document).ready(function(){
|
|
2510
2552
|
if ($inputElement.val().length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === undefined) {
|
2511
2553
|
$inputElement.siblings('label, i').removeClass('active');
|
2512
2554
|
}
|
2555
|
+
|
2556
|
+
if ($inputElement.val().length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') !== undefined) {
|
2557
|
+
$inputElement.siblings('i').removeClass('active');
|
2558
|
+
}
|
2513
2559
|
validate_field($inputElement);
|
2514
2560
|
});
|
2515
2561
|
|
2516
|
-
validate_field = function(object) {
|
2562
|
+
window.validate_field = function(object) {
|
2517
2563
|
var hasLength = object.attr('length') !== undefined;
|
2518
2564
|
var lenAttr = parseInt(object.attr('length'));
|
2519
2565
|
var len = object.val().length;
|
@@ -2527,7 +2573,7 @@ $(document).ready(function(){
|
|
2527
2573
|
else {
|
2528
2574
|
if (object.hasClass('validate')) {
|
2529
2575
|
// Check for character counter attributes
|
2530
|
-
if ((object.is(':valid') && hasLength && (len
|
2576
|
+
if ((object.is(':valid') && hasLength && (len <= lenAttr)) || (object.is(':valid') && !hasLength)) {
|
2531
2577
|
object.removeClass('invalid');
|
2532
2578
|
object.addClass('valid');
|
2533
2579
|
}
|
@@ -2590,20 +2636,24 @@ $(document).ready(function(){
|
|
2590
2636
|
}
|
2591
2637
|
});
|
2592
2638
|
|
2593
|
-
$('body').on('keyup keydown', text_area_selector, function () {
|
2639
|
+
$('body').on('keyup keydown autoresize', text_area_selector, function () {
|
2594
2640
|
textareaAutoResize($(this));
|
2595
2641
|
});
|
2596
2642
|
|
2597
2643
|
|
2598
2644
|
// File Input Path
|
2599
|
-
$('.file-field').each(function() {
|
2600
|
-
var path_input = $(this).find('input.file-path');
|
2601
|
-
$(this).find('input[type="file"]').change(function () {
|
2602
|
-
path_input.val($(this)[0].files[0].name);
|
2603
|
-
path_input.trigger('change');
|
2604
|
-
});
|
2605
|
-
});
|
2606
2645
|
|
2646
|
+
$(document).on('change', '.file-field input[type="file"]', function () {
|
2647
|
+
var file_field = $(this).closest('.file-field');
|
2648
|
+
var path_input = file_field.find('input.file-path');
|
2649
|
+
var files = $(this)[0].files;
|
2650
|
+
var file_names = [];
|
2651
|
+
for (var i = 0; i < files.length; i++) {
|
2652
|
+
file_names.push(files[i].name);
|
2653
|
+
}
|
2654
|
+
path_input.val(file_names.join(", "));
|
2655
|
+
path_input.trigger('change');
|
2656
|
+
});
|
2607
2657
|
|
2608
2658
|
|
2609
2659
|
/****************
|
@@ -2625,7 +2675,7 @@ $(document).ready(function(){
|
|
2625
2675
|
thumb.find('.value').html($(this).val());
|
2626
2676
|
});
|
2627
2677
|
|
2628
|
-
$(document).on('mousedown touchstart', range_type, function(e) {
|
2678
|
+
$(document).on('input mousedown touchstart', range_type, function(e) {
|
2629
2679
|
var thumb = $(this).siblings('.thumb');
|
2630
2680
|
|
2631
2681
|
// If thumb indicator does not exist yet, create it
|
@@ -2691,9 +2741,8 @@ $(document).ready(function(){
|
|
2691
2741
|
left = width;
|
2692
2742
|
}
|
2693
2743
|
thumb.addClass('active').css('left', left);
|
2694
|
-
|
2744
|
+
thumb.find('.value').html(thumb.siblings(range_type).val());
|
2695
2745
|
}
|
2696
|
-
|
2697
2746
|
});
|
2698
2747
|
|
2699
2748
|
$(document).on('mouseout touchleave', range_wrapper, function() {
|
@@ -2725,7 +2774,7 @@ $(document).ready(function(){
|
|
2725
2774
|
// Tear down structure if Select needs to be rebuilt
|
2726
2775
|
var lastID = $select.data('select-id');
|
2727
2776
|
if (lastID) {
|
2728
|
-
$select.parent().find('
|
2777
|
+
$select.parent().find('span.caret').remove();
|
2729
2778
|
$select.parent().find('input').remove();
|
2730
2779
|
|
2731
2780
|
$select.unwrap();
|
@@ -2783,7 +2832,10 @@ $(document).ready(function(){
|
|
2783
2832
|
if ( $select.is(':disabled') )
|
2784
2833
|
dropdownIcon.addClass('disabled');
|
2785
2834
|
|
2786
|
-
|
2835
|
+
// escape double quotes
|
2836
|
+
var sanitizedLabelHtml = label.html().replace(/"/g, '"');
|
2837
|
+
|
2838
|
+
var $newSelect = $('<input type="text" class="select-dropdown" readonly="true" ' + (($select.is(':disabled')) ? 'disabled' : '') + ' data-activates="select-options-' + uniqueID +'" value="'+ sanitizedLabelHtml +'"/>');
|
2787
2839
|
$select.before($newSelect);
|
2788
2840
|
$newSelect.before(dropdownIcon);
|
2789
2841
|
|
@@ -3204,7 +3256,7 @@ $(document).ready(function(){
|
|
3204
3256
|
$(document).ready(function() {
|
3205
3257
|
|
3206
3258
|
$(document).on('click.card', '.card', function (e) {
|
3207
|
-
if ($(this).find('.card-reveal').length) {
|
3259
|
+
if ($(this).find('> .card-reveal').length) {
|
3208
3260
|
if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
|
3209
3261
|
// Make Reveal animate down and display none
|
3210
3262
|
$(this).find('.card-reveal').velocity(
|
@@ -3225,6 +3277,14 @@ $(document).ready(function(){
|
|
3225
3277
|
|
3226
3278
|
});
|
3227
3279
|
|
3280
|
+
});
|
3281
|
+
}( jQuery ));;(function ($) {
|
3282
|
+
$(document).ready(function() {
|
3283
|
+
|
3284
|
+
$(document).on('click.chip', '.chip .material-icons', function (e) {
|
3285
|
+
$(this).parent().remove();
|
3286
|
+
});
|
3287
|
+
|
3228
3288
|
});
|
3229
3289
|
}( jQuery ));;(function ($) {
|
3230
3290
|
$(document).ready(function() {
|
@@ -3530,7 +3590,7 @@ $(document).ready(function(){
|
|
3530
3590
|
|
3531
3591
|
var currentElement = document.querySelector(selector);
|
3532
3592
|
if ( currentElement !== null) {
|
3533
|
-
var elementOffset = currentElement.getBoundingClientRect().top +
|
3593
|
+
var elementOffset = currentElement.getBoundingClientRect().top + window.pageYOffset;
|
3534
3594
|
|
3535
3595
|
if (windowScroll > (elementOffset + offset)) {
|
3536
3596
|
if (value.done !== true) {
|