material-sass 1.4.1 → 4.0.0.alpha5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +61 -0
- data/app/assets/fonts/{MaterialIcons-Regular.eot → material-icons/MaterialIcons-Regular.eot} +0 -0
- data/app/assets/fonts/{MaterialIcons-Regular.ijmap → material-icons/MaterialIcons-Regular.ijmap} +0 -0
- data/app/assets/fonts/{MaterialIcons-Regular.svg → material-icons/MaterialIcons-Regular.svg} +0 -0
- data/app/assets/fonts/{MaterialIcons-Regular.ttf → material-icons/MaterialIcons-Regular.ttf} +0 -0
- data/app/assets/fonts/{MaterialIcons-Regular.woff → material-icons/MaterialIcons-Regular.woff} +0 -0
- data/app/assets/fonts/{MaterialIcons-Regular.woff2 → material-icons/MaterialIcons-Regular.woff2} +0 -0
- data/app/assets/fonts/{README.md → material-icons/README.md} +0 -0
- data/app/assets/fonts/{codepoints → material-icons/codepoints} +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/app/assets/javascripts/material.js +739 -798
- data/app/assets/javascripts/material/addons-materialise/pickadate.js +139 -0
- data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +9 -0
- data/app/assets/javascripts/material/addons-materialise/wave.js +12 -0
- data/app/assets/javascripts/material/addons/pickadate.js +7 -0
- data/app/assets/javascripts/material/addons/textarea-autosize.js +5 -0
- data/app/assets/javascripts/material/{wave.js → addons/wave.js} +0 -10
- data/app/assets/javascripts/material/src/floating-label.js +91 -0
- data/app/assets/javascripts/material/src/navdrawer.js +352 -0
- data/app/assets/javascripts/material/src/tab-switch.js +136 -0
- data/app/assets/javascripts/material/src/util.js +138 -0
- data/app/assets/stylesheets/material.min.css +2 -2
- data/app/assets/stylesheets/material.scss +1 -1
- data/app/assets/stylesheets/material/_mixins.scss +21 -0
- data/app/assets/stylesheets/material/_utilities.scss +15 -0
- data/app/assets/stylesheets/material/_variables.scss +25 -0
- data/app/assets/stylesheets/material/base/_base.scss +482 -0
- data/app/assets/stylesheets/material/base/_grid.scss +28 -40
- data/app/assets/stylesheets/material/base/_typography.scss +208 -0
- data/app/assets/stylesheets/material/bootstrap/_alert.scss +55 -0
- data/app/assets/stylesheets/material/bootstrap/_animation.scss +26 -0
- data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +39 -0
- data/app/assets/stylesheets/material/bootstrap/_button-group.scss +155 -0
- data/app/assets/stylesheets/material/bootstrap/_carousel.scss +234 -0
- data/app/assets/stylesheets/material/bootstrap/_close.scss +31 -0
- data/app/assets/stylesheets/material/bootstrap/_code.scss +50 -0
- data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +69 -0
- data/app/assets/stylesheets/material/bootstrap/_form.scss +116 -0
- data/app/assets/stylesheets/material/bootstrap/_image.scss +25 -0
- data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +12 -0
- data/app/assets/stylesheets/material/bootstrap/_media.scss +69 -0
- data/app/assets/stylesheets/material/bootstrap/_nav.scss +118 -0
- data/app/assets/stylesheets/material/bootstrap/_pagination.scss +68 -0
- data/app/assets/stylesheets/material/bootstrap/_popover.scss +84 -0
- data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +37 -0
- data/app/assets/stylesheets/material/material.scss +62 -0
- data/app/assets/stylesheets/material/material/_button-flat.scss +53 -0
- data/app/assets/stylesheets/material/material/_button-float.scss +29 -0
- data/app/assets/stylesheets/material/material/_button.scss +241 -0
- data/app/assets/stylesheets/material/material/_card.scss +286 -0
- data/app/assets/stylesheets/material/material/_chip.scss +93 -0
- data/app/assets/stylesheets/material/material/_data-table.scss +138 -0
- data/app/assets/stylesheets/material/material/_dialog.scss +147 -0
- data/app/assets/stylesheets/material/material/_expansion-panel.scss +292 -0
- data/app/assets/stylesheets/material/material/_menu.scss +281 -0
- data/app/assets/stylesheets/material/material/_navdrawer.scss +289 -0
- data/app/assets/stylesheets/material/material/_picker.scss +272 -0
- data/app/assets/stylesheets/material/material/_progress-circular.scss +144 -0
- data/app/assets/stylesheets/material/material/_progress.scss +174 -0
- data/app/assets/stylesheets/material/material/_selection-control.scss +221 -0
- data/app/assets/stylesheets/material/material/_stepper.scss +135 -0
- data/app/assets/stylesheets/material/material/_tab.scss +196 -0
- data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +51 -0
- data/app/assets/stylesheets/material/material/_text-field-input-group.scss +76 -0
- data/app/assets/stylesheets/material/material/_text-field-textarea.scss +31 -0
- data/app/assets/stylesheets/material/material/_text-field.scss +179 -0
- data/app/assets/stylesheets/material/material/_toolbar.scss +516 -0
- data/app/assets/stylesheets/material/material/_tooltip.scss +86 -0
- data/app/assets/stylesheets/material/mixins/_background-variant.scss +14 -0
- data/app/assets/stylesheets/material/mixins/_border-radius.scss +34 -0
- data/app/assets/stylesheets/material/mixins/_breakpoint.scss +38 -0
- data/app/assets/stylesheets/material/mixins/_clearfix.scss +7 -0
- data/app/assets/stylesheets/material/mixins/_form.scss +60 -0
- data/app/assets/stylesheets/material/mixins/_grid.scss +149 -0
- data/app/assets/stylesheets/material/mixins/_hex-to-rgba.scss +3 -0
- data/app/assets/stylesheets/material/mixins/_hover.scss +70 -0
- data/app/assets/stylesheets/material/mixins/_image.scss +4 -0
- data/app/assets/stylesheets/material/mixins/_list.scss +4 -0
- data/app/assets/stylesheets/material/mixins/_nav-divider.scss +6 -0
- data/app/assets/stylesheets/material/mixins/_pull.scss +7 -0
- data/app/assets/stylesheets/material/mixins/_reset-text.scss +35 -0
- data/app/assets/stylesheets/material/mixins/_screenreader.scss +23 -0
- data/app/assets/stylesheets/material/mixins/_strip-unit.scss +3 -0
- data/app/assets/stylesheets/material/mixins/_tab-focus.scss +5 -0
- data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +14 -0
- data/app/assets/stylesheets/material/mixins/_text-hide.scss +7 -0
- data/app/assets/stylesheets/material/mixins/_text-truncate.scss +5 -0
- data/app/assets/stylesheets/material/mixins/_transition.scss +55 -0
- data/app/assets/stylesheets/material/mixins/_typography.scss +69 -0
- data/app/assets/stylesheets/material/utilities/_align.scss +23 -0
- data/app/assets/stylesheets/material/utilities/_background.scss +23 -0
- data/app/assets/stylesheets/material/utilities/_border.scss +27 -0
- data/app/assets/stylesheets/material/utilities/_clearfix.scss +3 -0
- data/app/assets/stylesheets/material/utilities/_display.scss +11 -0
- data/app/assets/stylesheets/material/utilities/_float.scss +15 -0
- data/app/assets/stylesheets/material/utilities/_material-icons.scss +10 -0
- data/app/assets/stylesheets/material/utilities/_screenreader.scss +7 -0
- data/app/assets/stylesheets/material/utilities/_spacing.scss +65 -0
- data/app/assets/stylesheets/material/utilities/_text.scss +95 -0
- data/app/assets/stylesheets/material/utilities/_visibility.scss +50 -0
- data/app/assets/stylesheets/material/utilities/_waves.scss +48 -0
- data/app/assets/stylesheets/material/variables/_animation.scss +22 -0
- data/app/assets/stylesheets/material/variables/_colour.scss +389 -0
- data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +84 -0
- data/app/assets/stylesheets/material/variables/_grid.scss +32 -0
- data/app/assets/stylesheets/material/variables/_spacer.scss +73 -0
- data/app/assets/stylesheets/material/variables/_typography.scss +72 -0
- data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +129 -0
- data/app/assets/stylesheets/material/variables/_variable-material.scss +434 -0
- data/lib/material-sass/engine.rb +3 -2
- data/lib/material-sass/version.rb +1 -1
- metadata +128 -70
- data/app/assets/javascripts/material.min.js +0 -2
- data/app/assets/javascripts/material/_.js +0 -6
- data/app/assets/javascripts/material/bootstrap.js +0 -6
- data/app/assets/javascripts/material/form-floating-label.js +0 -49
- data/app/assets/javascripts/material/form-textarea.js +0 -13
- data/app/assets/javascripts/material/header.js +0 -12
- data/app/assets/javascripts/material/menu.js +0 -200
- data/app/assets/javascripts/material/modal.js +0 -12
- data/app/assets/javascripts/material/picker.js +0 -141
- data/app/assets/javascripts/material/snackbar.js +0 -116
- data/app/assets/javascripts/material/tab.js +0 -51
- data/app/assets/javascripts/material/tile.js +0 -181
- data/app/assets/stylesheets/material/addons/_material-icons.scss +0 -9
- data/app/assets/stylesheets/material/addons/_waves.scss +0 -44
- data/app/assets/stylesheets/material/addons/material-icons/_core.scss +0 -20
- data/app/assets/stylesheets/material/addons/material-icons/_larger.scss +0 -23
- data/app/assets/stylesheets/material/addons/material-icons/_path.scss +0 -11
- data/app/assets/stylesheets/material/addons/material-icons/_variables.scss +0 -3
- data/app/assets/stylesheets/material/base.scss +0 -50
- data/app/assets/stylesheets/material/base/_reset.scss +0 -421
- data/app/assets/stylesheets/material/components/_avatar.scss +0 -59
- data/app/assets/stylesheets/material/components/_breadcrumb.scss +0 -26
- data/app/assets/stylesheets/material/components/_button-flat.scss +0 -22
- data/app/assets/stylesheets/material/components/_button-float.scss +0 -183
- data/app/assets/stylesheets/material/components/_button.scss +0 -81
- data/app/assets/stylesheets/material/components/_card.scss +0 -175
- data/app/assets/stylesheets/material/components/_code.scss +0 -53
- data/app/assets/stylesheets/material/components/_dropdown.scss +0 -99
- data/app/assets/stylesheets/material/components/_form-checkbox.scss +0 -161
- data/app/assets/stylesheets/material/components/_form-floating-label.scss +0 -64
- data/app/assets/stylesheets/material/components/_form-switch.scss +0 -96
- data/app/assets/stylesheets/material/components/_form-textarea.scss +0 -4
- data/app/assets/stylesheets/material/components/_form.scss +0 -217
- data/app/assets/stylesheets/material/components/_label.scss +0 -23
- data/app/assets/stylesheets/material/components/_modal.scss +0 -164
- data/app/assets/stylesheets/material/components/_nav.scss +0 -53
- data/app/assets/stylesheets/material/components/_picker.scss +0 -298
- data/app/assets/stylesheets/material/components/_progress-circular.scss +0 -169
- data/app/assets/stylesheets/material/components/_progress-loadbar.scss +0 -97
- data/app/assets/stylesheets/material/components/_progress.scss +0 -132
- data/app/assets/stylesheets/material/components/_snackbar.scss +0 -59
- data/app/assets/stylesheets/material/components/_stepper.scss +0 -201
- data/app/assets/stylesheets/material/components/_tab.scss +0 -84
- data/app/assets/stylesheets/material/components/_table.scss +0 -82
- data/app/assets/stylesheets/material/components/_tile.scss +0 -156
- data/app/assets/stylesheets/material/elements/_content.scss +0 -42
- data/app/assets/stylesheets/material/elements/_header.scss +0 -141
- data/app/assets/stylesheets/material/elements/_menu.scss +0 -267
- data/app/assets/stylesheets/material/mixin/_grid.scss +0 -78
- data/app/assets/stylesheets/material/mixin/_responsive.scss +0 -32
- data/app/assets/stylesheets/material/mixin/_utilities.scss +0 -69
- data/app/assets/stylesheets/material/utilities/_print.scss +0 -95
- data/app/assets/stylesheets/material/utilities/_utilities-responsive.scss +0 -97
- data/app/assets/stylesheets/material/utilities/_utilities.scss +0 -393
- data/app/assets/stylesheets/material/var/_colours.scss +0 -336
- data/app/assets/stylesheets/material/var/_variables.scss +0 -78
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ea9b6487d68485c36b034314a9222086fa7fffc
|
4
|
+
data.tar.gz: baf020d3d9ede3fa8a1591fe3c3a798f16761c41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e810ba05f48528258c8f0bb972c5213a2538c368f68ff25eb28d5811a97c3a610b6a2c7b0ed001493510457a357baeca31e717114d6ff410e99b75c9aee1f7e
|
7
|
+
data.tar.gz: c93998e1e0f85747b7683d0f8896a4df2dd0fbfc50da7b7bd44b33a9957e81a05089194fe255fded5f075befda9eb4aaece1f4b289e03da599efee5501140f95
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -1,2 +1,63 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
|
3
|
+
source_dir = "material-src"
|
4
|
+
|
5
|
+
namespace :javascripts do
|
6
|
+
|
7
|
+
desc "Cleaning javascripts directory"
|
8
|
+
task :clean do
|
9
|
+
rm_rf "app/assets/javascripts/material"
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Copy #{source_dir}/assets/js/"
|
13
|
+
task :copy do
|
14
|
+
src_dir = "#{source_dir}/assets/js/."
|
15
|
+
tgt_dir = "app/assets/javascripts/material/"
|
16
|
+
mkdir_p tgt_dir
|
17
|
+
cp_r src_dir, tgt_dir
|
18
|
+
mv (tgt_dir+"src.js"), "app/assets/javascripts/material.js"
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
desc "Setup javascript assets"
|
23
|
+
task setup: [:clean, :copy]
|
24
|
+
end
|
25
|
+
|
26
|
+
namespace :stylesheets do
|
27
|
+
desc "Cleaning stylesheets directory"
|
28
|
+
task :clean do
|
29
|
+
rm_rf "app/assets/stylesheets/material"
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Copy #{source_dir}/assets/sass/"
|
33
|
+
task :copy do
|
34
|
+
src_dir = "#{source_dir}/assets/sass/."
|
35
|
+
tgt_dir = "app/assets/stylesheets/material/"
|
36
|
+
mkdir_p tgt_dir
|
37
|
+
cp_r src_dir, tgt_dir
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "Fix font url in stylesheets"
|
41
|
+
task :fix_urls do
|
42
|
+
Dir.glob('app/assets/stylesheet/**/*.scss').each do |tgt_file|
|
43
|
+
content = File.read(tgt_file)
|
44
|
+
fixed_content = content.gsub(/url\(\"\.\.\/Roboto\/([A-Za-z_]*.woff2)\"\)/, 'font-url("\1")')
|
45
|
+
File.open(tgt_file, "w") { |f| f.puts fixed_content}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Setup stylesheet assets"
|
50
|
+
task setup: [:clean, :copy, :fix_urls]
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "Remove minified file .min"
|
54
|
+
task :cleanup do
|
55
|
+
Dir.glob('app/assets/**/*.min.*').each do |file|
|
56
|
+
rm file
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
desc "Setup or update assets files"
|
63
|
+
task setup: ["javascripts:setup", "stylesheets:setup"]
|
data/app/assets/fonts/{MaterialIcons-Regular.eot → material-icons/MaterialIcons-Regular.eot}
RENAMED
File without changes
|
data/app/assets/fonts/{MaterialIcons-Regular.ijmap → material-icons/MaterialIcons-Regular.ijmap}
RENAMED
File without changes
|
data/app/assets/fonts/{MaterialIcons-Regular.svg → material-icons/MaterialIcons-Regular.svg}
RENAMED
File without changes
|
data/app/assets/fonts/{MaterialIcons-Regular.ttf → material-icons/MaterialIcons-Regular.ttf}
RENAMED
File without changes
|
data/app/assets/fonts/{MaterialIcons-Regular.woff → material-icons/MaterialIcons-Regular.woff}
RENAMED
File without changes
|
data/app/assets/fonts/{MaterialIcons-Regular.woff2 → material-icons/MaterialIcons-Regular.woff2}
RENAMED
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,813 +1,754 @@
|
|
1
|
-
/*!
|
2
|
-
* modernizr 3.3.0 (Custom Build) | MIT
|
3
|
-
* http://modernizr.com/download/?-touchevents-setclasses
|
4
|
-
*/
|
5
|
-
|
6
|
-
!function(e,n,t){function o(e,n){return typeof e===n}function s(){var e,n,t,s,a,i,r;for(var l in c)if(c.hasOwnProperty(l)){if(e=[],n=c[l],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(s=o(n.fn,"function")?n.fn():n.fn,a=0;a<e.length;a++)i=e[a],r=i.split("."),1===r.length?Modernizr[r[0]]=s:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=s),f.push((s?"":"no-")+r.join("-"))}}function a(e){var n=u.className,t=Modernizr._config.classPrefix||"";if(p&&(n=n.baseVal),Modernizr._config.enableJSClass){var o=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(o,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),p?u.className.baseVal=n:u.className=n)}function i(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):p?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function r(){var e=n.body;return e||(e=i(p?"svg":"body"),e.fake=!0),e}function l(e,t,o,s){var a,l,f,c,d="modernizr",p=i("div"),h=r();if(parseInt(o,10))for(;o--;)f=i("div"),f.id=s?s[o]:d+(o+1),p.appendChild(f);return a=i("style"),a.type="text/css",a.id="s"+d,(h.fake?h:p).appendChild(a),h.appendChild(p),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(n.createTextNode(e)),p.id=d,h.fake&&(h.style.background="",h.style.overflow="hidden",c=u.style.overflow,u.style.overflow="hidden",u.appendChild(h)),l=t(p,e),h.fake?(h.parentNode.removeChild(h),u.style.overflow=c,u.offsetHeight):p.parentNode.removeChild(p),!!l}var f=[],c=[],d={_version:"3.3.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){c.push({name:e,fn:n,options:t})},addAsyncTest:function(e){c.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=d,Modernizr=new Modernizr;var u=n.documentElement,p="svg"===u.nodeName.toLowerCase(),h=d._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];d._prefixes=h;var m=d.testStyles=l;Modernizr.addTest("touchevents",function(){var t;if("ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch)t=!0;else{var o=["@media (",h.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");m(o,function(e){t=9===e.offsetTop})}return t}),s(),a(f),delete d.addTest,delete d.addAsyncTest;for(var v=0;v<Modernizr._q.length;v++)Modernizr._q[v]();e.Modernizr=Modernizr}(window,document);
|
7
|
-
|
8
|
-
/*!
|
9
|
-
* bootstrap v3.3.5 (http://getbootstrap.com)
|
10
|
-
* affix, collapse, dropdown, modal, tab, transition
|
11
|
-
*/
|
12
|
-
|
13
|
-
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(s).each(function(){var n=t(this),o=e(n),s={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger("hidden.bs.dropdown",s))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new a(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5",a.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var s=e(o),a=s.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(s.trigger(n=t.Event("show.bs.dropdown",r)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",r)}return!1}},a.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),a=o.hasClass("open");if(!a&&27!=i.which||a&&27==i.which)return 27==i.which&&o.find(s).trigger("focus"),n.trigger("click");var r=" li:not(.disabled):visible a",d=o.find(".dropdown-menu"+r);if(d.length){var l=d.index(i.target);38==i.which&&l>0&&l--,40==i.which&&l<d.length-1&&l++,~l||(l=0),d.eq(l).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),s=o.data("bs.modal"),a=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);s||o.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](n):a.show&&s.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),o&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});o?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),o=n.attr("href"),s=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),n.data());n.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(s,a,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tab");o||n.data("bs.tab",o=new i(this)),"string"==typeof e&&o[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(n);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},i.prototype.activate=function(e,n,o){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var a=n.find("> .active"),r=o&&t.support.transition&&(a.length&&a.hasClass("fade")||!!n.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),s="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return i>o?"top":!1;if("bottom"==this.affixed)return null!=i?o+this.unpin<=s.top?!1:"bottom":t-n>=o+a?!1:"bottom";var r=null==this.affixed,d=r?o:s.top,l=r?a:e;return null!=i&&i>=o?"top":null!=n&&d+l>=t-n?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,s=n.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(s=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof s&&(s=n.bottom(this.$element));var r=this.getState(a,e,o,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var d="affix"+(r?"-"+r:""),l=t.Event(d+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(d).trigger(d.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),o||i.data("bs.collapse",o=new n(this,s)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var d=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[a](this.$element[0][d])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var s=e(o),a=s.data("bs.collapse"),r=a?"toggle":o.data();i.call(s,r)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
|
14
|
-
|
15
|
-
// floating label
|
16
|
-
(function ($) {
|
17
|
-
'use strict';
|
18
|
-
|
19
|
-
$.fn.floatingLabel = function (option) {
|
20
|
-
var parent = this.closest('.form-group-label');
|
21
|
-
|
22
|
-
if (parent.length) {
|
23
|
-
switch (option) {
|
24
|
-
case 'focusin':
|
25
|
-
parent.addClass('control-focus');
|
26
|
-
break;
|
27
|
-
case 'focusout':
|
28
|
-
parent.removeClass('control-focus');
|
29
|
-
break;
|
30
|
-
default:
|
31
|
-
if (this.val()) {
|
32
|
-
parent.addClass('control-highlight');
|
33
|
-
} else if (this.is('select') && $('option:first-child', this).html().replace(' ', '') !== '') {
|
34
|
-
parent.addClass('control-highlight');
|
35
|
-
} else {
|
36
|
-
parent.removeClass('control-highlight');
|
37
|
-
};
|
38
|
-
};
|
39
|
-
};
|
40
|
-
|
41
|
-
return this;
|
42
|
-
};
|
43
|
-
}(jQuery));
|
44
|
-
|
45
|
-
$(function () {
|
46
|
-
'use strict';
|
47
|
-
|
48
|
-
$('.form-group-label .form-control').each(function () {
|
49
|
-
$(this).floatingLabel('change');
|
50
|
-
});
|
51
|
-
|
52
|
-
$(document).on('change', '.form-group-label .form-control', function () {
|
53
|
-
$(this).floatingLabel('change');
|
54
|
-
});
|
55
|
-
|
56
|
-
$(document).on('focusin', '.form-group-label .form-control', function () {
|
57
|
-
$(this).floatingLabel('focusin');
|
58
|
-
});
|
59
|
-
|
60
|
-
$(document).on('focusout', '.form-group-label .form-control', function () {
|
61
|
-
$(this).floatingLabel('focusout');
|
62
|
-
});
|
63
|
-
});
|
64
|
-
|
65
1
|
/*!
|
66
|
-
*
|
67
|
-
* https://github.com/javierjulio/textarea-autosize
|
2
|
+
* Material
|
68
3
|
*/
|
4
|
+
if (typeof jQuery === 'undefined') {
|
5
|
+
throw new Error('Material\'s JavaScript requires jQuery')
|
6
|
+
}
|
69
7
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
$('.textarea-autosize').textareaAutoSize();
|
77
|
-
});
|
78
|
-
|
79
|
-
// header waterfall
|
80
|
-
$(function () {
|
81
|
-
'use strict';
|
82
|
-
|
83
|
-
$('.header-waterfall').each(function () {
|
84
|
-
$(this).affix({
|
85
|
-
offset: {
|
86
|
-
top: 1
|
87
|
-
}
|
88
|
-
});
|
89
|
-
});
|
90
|
-
});
|
91
|
-
|
92
|
-
// menu
|
93
|
-
(function ($) {
|
94
|
-
'use strict';
|
95
|
-
|
96
|
-
var Menu = function (element, options) {
|
97
|
-
this.ignoreBackdropClick = false;
|
98
|
-
this.isShown = null;
|
99
|
-
this.options = options;
|
100
|
-
this.originalBodyPad = null;
|
101
|
-
this.scrollbarWidth = 0;
|
102
|
-
this.$backdrop = null;
|
103
|
-
this.$body = $(document.body);
|
104
|
-
this.$element = $(element);
|
105
|
-
this.$dialog = this.$element.find('.menu-scroll');
|
106
|
-
};
|
107
|
-
|
108
|
-
if (!$.fn.modal) {
|
109
|
-
throw new Error('Menu requires Bootstrap modal.js');
|
110
|
-
};
|
111
|
-
|
112
|
-
Menu.DEFAULTS = $.extend({}, $.fn.modal.Constructor.DEFAULTS, {});
|
113
|
-
Menu.TRANSITION_DURATION = 300;
|
114
|
-
Menu.TRANSITION_DURATION_BACKDROP = 150;
|
115
|
-
|
116
|
-
Menu.prototype = $.extend({}, $.fn.modal.Constructor.prototype);
|
117
|
-
|
118
|
-
Menu.prototype.backdrop = function (callback) {
|
119
|
-
var that = this;
|
120
|
-
|
121
|
-
if (this.isShown && this.options.backdrop) {
|
122
|
-
var doAnimate = $.support.transition;
|
123
|
-
|
124
|
-
this.$backdrop = $(document.createElement('div')).addClass('menu-backdrop').appendTo(this.$body);
|
125
|
-
|
126
|
-
this.$element.on('click.dismiss.bs.menu', $.proxy(function (e) {
|
127
|
-
if (this.ignoreBackdropClick) {
|
128
|
-
this.ignoreBackdropClick = false;
|
129
|
-
return;
|
130
|
-
};
|
131
|
-
|
132
|
-
if (e.target !== e.currentTarget) {
|
133
|
-
return;
|
134
|
-
};
|
135
|
-
|
136
|
-
this.options.backdrop == 'static' ? this.$element[0].focus() : this.hide();
|
137
|
-
}, this));
|
138
|
-
|
139
|
-
if (doAnimate) {
|
140
|
-
this.$backdrop[0].offsetWidth;
|
141
|
-
};
|
142
|
-
|
143
|
-
this.$backdrop.addClass('in');
|
144
|
-
|
145
|
-
if (!callback) {
|
146
|
-
return;
|
147
|
-
};
|
148
|
-
|
149
|
-
doAnimate ? this.$backdrop.one('bsTransitionEnd', callback).emulateTransitionEnd(Menu.TRANSITION_DURATION_BACKDROP) : callback();
|
150
|
-
} else if (!this.isShown && this.$backdrop) {
|
151
|
-
this.$backdrop.removeClass('in');
|
152
|
-
|
153
|
-
var callbackRemove = function () {
|
154
|
-
that.removeBackdrop();
|
155
|
-
callback && callback();
|
156
|
-
};
|
157
|
-
|
158
|
-
$.support.transition ? this.$backdrop.one('bsTransitionEnd', callbackRemove).emulateTransitionEnd(Menu.TRANSITION_DURATION_BACKDROP) : callbackRemove();
|
159
|
-
} else if (callback) {
|
160
|
-
callback();
|
161
|
-
};
|
162
|
-
};
|
163
|
-
|
164
|
-
Menu.prototype.hide = function (e) {
|
165
|
-
if (e) e.preventDefault();
|
166
|
-
|
167
|
-
e = $.Event('hide.bs.menu');
|
168
|
-
|
169
|
-
this.$element.trigger(e);
|
170
|
-
|
171
|
-
if (!this.isShown || e.isDefaultPrevented()) {
|
172
|
-
return;
|
173
|
-
};
|
174
|
-
|
175
|
-
this.isShown = false;
|
176
|
-
|
177
|
-
this.escape();
|
178
|
-
|
179
|
-
$(document).off('focusin.bs.modal');
|
180
|
-
|
181
|
-
this.$element.removeClass('in').off('click.dismiss.bs.menu').off('mouseup.dismiss.bs.menu');
|
182
|
-
|
183
|
-
this.$dialog.off('mousedown.dismiss.bs.menu');
|
184
|
-
|
185
|
-
$.support.transition ? this.$element.one('bsTransitionEnd', $.proxy(this.hideModal, this)).emulateTransitionEnd(Menu.TRANSITION_DURATION) : this.hideModal();
|
186
|
-
};
|
187
|
-
|
188
|
-
Menu.prototype.hideModal = function () {
|
189
|
-
var that = this;
|
190
|
-
|
191
|
-
this.$element.hide();
|
192
|
-
|
193
|
-
this.backdrop(function () {
|
194
|
-
that.$element.trigger('hidden.bs.menu');
|
195
|
-
});
|
196
|
-
};
|
197
|
-
|
198
|
-
Menu.prototype.show = function (_relatedTarget) {
|
199
|
-
var that = this;
|
200
|
-
var e = $.Event('show.bs.menu', { relatedTarget: _relatedTarget });
|
201
|
-
|
202
|
-
this.$element.trigger(e);
|
203
|
-
|
204
|
-
if (this.isShown || e.isDefaultPrevented()) {
|
205
|
-
return;
|
206
|
-
};
|
207
|
-
|
208
|
-
this.isShown = true;
|
209
|
-
|
210
|
-
this.escape();
|
211
|
-
|
212
|
-
this.$element.on('click.dismiss.bs.menu', '[data-dismiss="menu"]', $.proxy(this.hide, this));
|
213
|
-
|
214
|
-
this.$dialog.on('mousedown.dismiss.bs.menu', function () {
|
215
|
-
that.$element.one('mouseup.dismiss.bs.menu', function (e) {
|
216
|
-
if ($(e.target).is(that.$element)) {
|
217
|
-
that.ignoreBackdropClick = true;
|
218
|
-
};
|
219
|
-
});
|
220
|
-
});
|
221
|
-
|
222
|
-
this.backdrop(function () {
|
223
|
-
var transition = $.support.transition;
|
224
|
-
|
225
|
-
if (!that.$element.parent().length) {
|
226
|
-
that.$element.appendTo(that.$body);
|
227
|
-
};
|
228
|
-
|
229
|
-
that.$element.show();
|
230
|
-
|
231
|
-
if (transition) {
|
232
|
-
that.$element[0].offsetWidth;
|
233
|
-
};
|
234
|
-
|
235
|
-
that.$element.addClass('in');
|
236
|
-
|
237
|
-
that.enforceFocus();
|
238
|
-
|
239
|
-
var e = $.Event('shown.bs.menu', { relatedTarget: _relatedTarget });
|
240
|
-
|
241
|
-
transition ? that.$dialog.one('bsTransitionEnd', function () {
|
242
|
-
that.$element.trigger('focus').trigger(e);
|
243
|
-
}).emulateTransitionEnd(Menu.TRANSITION_DURATION) : that.$element.trigger('focus').trigger(e);
|
244
|
-
});
|
245
|
-
};
|
8
|
+
+function ($) {
|
9
|
+
var version = $.fn.jquery.split(' ')[0].split('.')
|
10
|
+
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
11
|
+
throw new Error('Material\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
12
|
+
}
|
13
|
+
}(jQuery);
|
246
14
|
|
247
|
-
|
248
|
-
|
249
|
-
var $this = $(this);
|
250
|
-
var data = $this.data('bs.menu');
|
251
|
-
var options = $.extend({}, Menu.DEFAULTS, $this.data(), typeof option == 'object' && option);
|
15
|
+
+function ($) {
|
16
|
+
'use strict';
|
252
17
|
|
253
|
-
|
254
|
-
if (typeof option == 'string') data[option](_relatedTarget);
|
255
|
-
else if (options.show) data.show(_relatedTarget);
|
256
|
-
});
|
257
|
-
};
|
18
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
|
258
19
|
|
259
|
-
|
20
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
260
21
|
|
261
|
-
|
262
|
-
$.fn.menu.Constructor = Menu;
|
263
|
-
|
264
|
-
$.fn.menu.noConflict = function () {
|
265
|
-
$.fn.menu = old;
|
266
|
-
return this;
|
267
|
-
};
|
268
|
-
|
269
|
-
$(document).on('click.bs.menu.data-api', '[data-toggle="menu"]', function (e) {
|
270
|
-
var $this = $(this);
|
271
|
-
var href = $this.attr('href');
|
272
|
-
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, '')));
|
273
|
-
var option = $target.data('bs.menu') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data());
|
274
|
-
|
275
|
-
if ($this.is('a')) e.preventDefault();
|
276
|
-
|
277
|
-
$target.one('show.bs.menu', function (showEvent) {
|
278
|
-
if (showEvent.isDefaultPrevented()) {
|
279
|
-
return;
|
280
|
-
} else {
|
281
|
-
$target.attr('tabindex', '-1');
|
282
|
-
};
|
283
|
-
|
284
|
-
$target.one('hidden.bs.menu', function () {
|
285
|
-
$this.is(':visible') && $this.trigger('focus');
|
286
|
-
});
|
287
|
-
});
|
288
|
-
|
289
|
-
Plugin.call($target, option, this);
|
290
|
-
});
|
291
|
-
}(jQuery));
|
292
|
-
|
293
|
-
// modale dialog vertical alignment
|
294
|
-
$(function () {
|
295
|
-
'use strict';
|
296
|
-
|
297
|
-
$(document).on('hidden.bs.modal', '.modal-va-middle', function () {
|
298
|
-
$(this).removeClass('modal-va-middle-show');
|
299
|
-
});
|
300
|
-
|
301
|
-
$(document).on('show.bs.modal', '.modal-va-middle', function () {
|
302
|
-
$(this).addClass('modal-va-middle-show');
|
303
|
-
});
|
304
|
-
});
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
305
23
|
|
306
24
|
/*!
|
307
|
-
*
|
308
|
-
*
|
25
|
+
* floating label:
|
26
|
+
* when a user engages with the text input field,
|
27
|
+
* the floating inline labels move to float above the field
|
309
28
|
*/
|
310
|
-
|
311
|
-
|
312
|
-
!function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0],e=d.value,f=a.$node.data("value"),g=f||e,h=f?b.formatSubmit:b.format,i=function(){return d.currentStyle?"rtl"==d.currentStyle.direction:"rtl"==getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),g?c.set("select",g,{format:h,defaultValue:!0}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return i()?-1:1},37:function(){return i()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",d,{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})},1).on("open",function(){var d="";c.disabled(c.get("now"))&&(d=":not(."+b.klass.buttonToday+")"),a.$root.find("button"+d+", select").attr("disabled",!1)},1).on("close",function(){a.$root.find("button, select").attr("disabled",!0)},1)}var d=7,e=6,f=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var e,g=this;return c=void 0===c?a:c,c==-(1/0)||c==1/0?e=c:b.isPlainObject(c)&&f.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=f.isDate(c)?c:g.create().obj):c=f.isInteger(c)||f.isDate(c)?g.normalize(new Date(c),d):g.now(a,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return a===!0||b.isArray(a)||f.isDate(a)?d.create(a):a};return f.isInteger(a)||(a=e(a)),f.isInteger(c)||(c=e(c)),f.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:f.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?"string"==typeof b?b=c.parse(a,b):f.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-(1/0):1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var e,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;d<c.pick?e=!0:d>c.pick&&(g=!0)}return f.isInteger(a)}).length;if((!d||!d.nav&&!d.defaultValue)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||e||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!e&&0>l)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.month<k.month||c.month>k.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return f.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||f.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pick<c.item.min.pick||a.pick>c.item.max.pick},c.prototype.parse=function(a,b,c){var d=this,e={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=d.settings.format),d.formats.toArray(c.format).map(function(a){var c=d.formats[a],g=c?f.trigger(c,d,[b,e]):a.replace(/^!/,"").length;c&&(e[a]=b.substr(0,g)),b=b.substr(g)}),[e.yyyy||e.yy,+(e.mm||e.m)-1,e.dd||e.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/[^\x00-\x7F]+|\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?f.digits(a):b.date},dd:function(a,b){return a?2:f.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?f.digits(a):b.month+1},mm:function(a,b){return a?2:f.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return f.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return f.isInteger(a)&&f.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(f.isDate(a)||b.isArray(a))&&(f.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to):!1},c.prototype.isDateOverlap=function(a,c){var d=this,e=d.settings.firstDay?1:0;return f.isInteger(a)&&(f.isDate(c)||b.isArray(c))?(a=a%7+e,a===d.create(c).day+1):f.isInteger(c)&&(f.isDate(a)||b.isArray(a))?(c=c%7+e,c===d.create(a).day+1):b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,g=0;g<e.length;g+=1)if(d.isDateExact(a,e[g])){c=!0;break}c||(f.isInteger(a)||f.isDate(a)||b.isArray(a)||b.isPlainObject(a)&&a.from&&a.to)&&e.push(a)}),e},c.prototype.activate=function(a,c){var d=this,e=d.item.disable,g=e.length;return"flip"==c?d.flipEnable():c===!0?(d.flipEnable(1),e=[]):c===!1?(d.flipEnable(-1),e=[]):c.map(function(a){var c,h,i,j;for(i=0;g>i;i+=1){if(h=e[i],d.isDateExact(h,a)){c=e[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):f.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;g>i;i+=1)if(d.isDateExact(e[i],a)){e[i]=null;break}if(j)for(i=0;g>i;i+=1)if(d.isDateOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,g=b.item,h=g.now,i=g.select,j=g.highlight,k=g.view,l=g.disable,m=g.min,n=g.max,o=function(a,b){return c.firstDay&&(a.push(a.shift()),b.push(b.shift())),f.node("thead",f.node("tr",f.group({min:0,max:d-1,i:1,node:"th",item:function(d){return[a[d],c.klass.weekdays,'scope=col title="'+b[d]+'"']}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0),c.weekdaysFull.slice(0)),p=function(a){return f.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&k.year>=n.year&&k.month>=n.month||!a&&k.year<=m.year&&k.month<=m.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+f.ariaAttr({role:"button",controls:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},q=function(){var d=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?f.node("select",f.group({min:0,max:11,i:1,node:"option",item:function(a){return[d[a],0,"value="+a+(k.month==a?" selected":"")+(k.year==m.year&&a<m.month||k.year==n.year&&a>n.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):f.node("div",d[k.month],c.klass.month)},r=function(){var d=k.year,e=c.selectYears===!0?5:~~(c.selectYears/2);if(e){var g=m.year,h=n.year,i=d-e,j=d+e;if(g>i&&(j+=g-i,i=g),j>h){var l=i-g,o=j-h;i-=l>o?o:l,j=h}return f.node("select",f.group({min:i,max:j,i:1,node:"option",item:function(a){return[a,0,"value="+a+(d==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return f.node("div",d,c.klass.year)};return f.node("div",(c.selectYears?r()+q():q()+r())+p()+p(1),c.klass.header)+f.node("table",o+f.node("tbody",f.group({min:0,max:e-1,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([k.year,k.month,1]).day?-7:0;return[f.group({min:d*a-k.day+e+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([k.year,k.month,a+(c.firstDay?1:0)]);var d=i&&i.pick==a.pick,e=j&&j.pick==a.pick,g=l&&b.disabled(a)||a.pick<m.pick||a.pick>n.pick,o=f.trigger(b.formats.toString,b,[c.format,a]);return[f.node("div",a.date,function(b){return b.push(k.month==a.month?c.klass.infocus:c.klass.outfocus),h.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),e&&b.push(c.klass.highlighted),g&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+f.ariaAttr({role:"gridcell",label:o,selected:d&&b.$node.val()===o?!0:null,activedescendant:e?!0:null,disabled:g?!0:null})),"",f.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+f.ariaAttr({role:"grid",controls:b.$node[0].id,readonly:!0}))+f.node("div",f.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+h.pick+(a&&!b.disabled(h)?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id}))+f.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id}))+f.node("button",c.close,c.klass.buttonClose,"type=button data-close=true "+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",closeOnSelect:!0,closeOnClear:!0,format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today",buttonClose:a+"button--close"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)});
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
var datepickerApi = this.$element.pickadate('picker'),
|
403
|
-
datepickerNode = datepickerApi.$node,
|
404
|
-
datepickerRoot = datepickerApi.$root;
|
405
|
-
|
406
|
-
datepickerApi.on({
|
407
|
-
close: function () {
|
408
|
-
$(document.activeElement).blur();
|
409
|
-
},
|
410
|
-
open: function () {
|
411
|
-
if (!$('.picker__date-display', datepickerRoot).length) {
|
412
|
-
that.display(datepickerApi, datepickerRoot, 'highlight');
|
413
|
-
};
|
414
|
-
},
|
415
|
-
set: function () {
|
416
|
-
if (datepickerApi.get('select') !== null) {
|
417
|
-
that.display(datepickerApi, datepickerRoot, 'select');
|
418
|
-
};
|
419
|
-
}
|
420
|
-
});
|
421
|
-
};
|
422
|
-
|
423
|
-
function Plugin (option) {
|
424
|
-
return this.each(function () {
|
425
|
-
var $this = $(this);
|
426
|
-
var data = $this.data('bs.pickdate');
|
427
|
-
var options = $.extend({}, Datepicker.DEFAULTS, $this.data(), typeof option == 'object' && option);
|
428
|
-
|
429
|
-
if (!data) {
|
430
|
-
$this.data('bs.pickdate', (data = new Datepicker(this, options)));
|
431
|
-
};
|
432
|
-
|
433
|
-
data.show();
|
434
|
-
});
|
435
|
-
};
|
436
|
-
|
437
|
-
var old = $.fn.pickdate;
|
438
|
-
|
439
|
-
$.fn.pickdate = Plugin;
|
440
|
-
$.fn.pickdate.Constructor = Datepicker;
|
441
|
-
|
442
|
-
$.fn.pickdate.noConflict = function () {
|
443
|
-
$.fn.pickdate = old;
|
444
|
-
return this;
|
445
|
-
};
|
446
|
-
}(jQuery));
|
447
|
-
|
448
|
-
// snackbar
|
449
|
-
(function ($) {
|
450
|
-
'use strict';
|
451
|
-
|
452
|
-
var Snackbar = function (options) {
|
453
|
-
this.options = options;
|
454
|
-
this.$element = $('<div class="snackbar-inner">' + this.options.content + '</div>');
|
455
|
-
};
|
456
|
-
|
457
|
-
Snackbar.DEFAULTS = {
|
458
|
-
alive: 6000,
|
459
|
-
content: ' ',
|
460
|
-
hide: function () {},
|
461
|
-
show: function () {}
|
462
|
-
};
|
463
|
-
|
464
|
-
Snackbar.prototype.fbtn = function (margin) {
|
465
|
-
if ($(window).width() < 768 && $('.fbtn-container').length) {
|
466
|
-
var str = 'translateY(-' + margin + 'px)';
|
467
|
-
$('.fbtn-container').css({
|
468
|
-
'-webkit-transform': str,
|
469
|
-
'transform': str
|
470
|
-
});
|
471
|
-
};
|
472
|
-
};
|
473
|
-
|
474
|
-
Snackbar.prototype.hide = function () {
|
475
|
-
var that = this;
|
476
|
-
|
477
|
-
this.$element.removeClass('in');
|
478
|
-
|
479
|
-
clearTimeout(this.$element.data('timer'));
|
480
|
-
|
481
|
-
if ($.support.transition) {
|
482
|
-
this.$element.one('bsTransitionEnd', function () {
|
483
|
-
that.options.hide(that.options);
|
484
|
-
that.$element.remove();
|
485
|
-
});
|
486
|
-
} else {
|
487
|
-
that.options.hide(that.options);
|
488
|
-
that.$element.remove();
|
489
|
-
}
|
490
|
-
|
491
|
-
this.fbtn('0');
|
492
|
-
};
|
493
|
-
|
494
|
-
Snackbar.prototype.show = function () {
|
495
|
-
var that = this;
|
496
|
-
|
497
|
-
if (!$('.snackbar').length) {
|
498
|
-
$(document.body).append('<div class="snackbar"></div>');
|
499
|
-
};
|
500
|
-
|
501
|
-
this.$element.appendTo('.snackbar').show().addClass(function () {
|
502
|
-
that.$element.on('click', '[data-dismiss="snackbar"]', function () {
|
503
|
-
that.hide();
|
504
|
-
});
|
505
|
-
|
506
|
-
that.$element.data('timer', setTimeout(function () {
|
507
|
-
that.hide();
|
508
|
-
}, that.options.alive));
|
509
|
-
|
510
|
-
that.$element.on('mouseenter', function () {
|
511
|
-
clearTimeout(that.$element.data('timer'));
|
512
|
-
}).on('mouseleave', function () {
|
513
|
-
that.$element.data('timer', setTimeout(function () {
|
514
|
-
that.hide();
|
515
|
-
}, that.options.alive));
|
516
|
-
});
|
517
|
-
|
518
|
-
that.options.show(that.options);
|
519
|
-
|
520
|
-
return 'in';
|
521
|
-
});
|
522
|
-
|
523
|
-
this.fbtn(this.$element.outerHeight());
|
524
|
-
};
|
525
|
-
|
526
|
-
function Plugin (option) {
|
527
|
-
return this.each(function () {
|
528
|
-
var $this = $(document.body);
|
529
|
-
var data = $this.data('bs.snackbar');
|
530
|
-
var options = $.extend({}, Snackbar.DEFAULTS, option);
|
531
|
-
|
532
|
-
if (!data) {
|
533
|
-
$this.data('bs.snackbar', (data = new Snackbar(options)));
|
534
|
-
data.show();
|
535
|
-
} else if ($('.snackbar-inner').length && !$('.snackbar-inner.old').length) {
|
536
|
-
$('.snackbar-inner.in').addClass('old')
|
537
|
-
data.hide();
|
538
|
-
if ($.support.transition) {
|
539
|
-
$(document).one('bsTransitionEnd', '.snackbar-inner.old', function () {
|
540
|
-
$this.data('bs.snackbar', (data = new Snackbar(options)));
|
541
|
-
data.show();
|
542
|
-
});
|
543
|
-
} else {
|
544
|
-
$this.data('bs.snackbar', (data = new Snackbar(options)));
|
545
|
-
data.show();
|
546
|
-
};
|
547
|
-
} else if (!$('.snackbar-inner').length) {
|
548
|
-
$this.data('bs.snackbar', (data = new Snackbar(options)));
|
549
|
-
data.show();
|
550
|
-
};
|
551
|
-
});
|
552
|
-
};
|
553
|
-
|
554
|
-
var old = $.fn.snackbar;
|
555
|
-
|
556
|
-
$.fn.snackbar = Plugin;
|
557
|
-
$.fn.snackbar.Constructor = Snackbar;
|
558
|
-
|
559
|
-
$.fn.snackbar.noConflict = function () {
|
560
|
-
$.fn.snackbar = old;
|
561
|
-
return this;
|
562
|
-
};
|
563
|
-
}(jQuery));
|
564
|
-
|
565
|
-
// tab switch
|
566
|
-
(function ($) {
|
567
|
-
'use strict';
|
568
|
-
|
569
|
-
$.fn.tabSwitch = function (oldTab) {
|
570
|
-
var $this = $(this),
|
571
|
-
$thisNav = $this.closest('.tab-nav'),
|
572
|
-
$thisNavIndicator = $('.tab-nav-indicator', $thisNav),
|
573
|
-
thisLeft = $this.offset().left,
|
574
|
-
thisNavLeft = $thisNav.offset().left,
|
575
|
-
thisNavWidth = $thisNav.outerWidth();
|
576
|
-
|
577
|
-
if (oldTab !== undefined && oldTab[0] !== undefined) {
|
578
|
-
var oldTabLeft = oldTab.offset().left;
|
579
|
-
|
580
|
-
$thisNavIndicator.css({
|
581
|
-
left: (oldTabLeft - thisNavLeft),
|
582
|
-
right: (thisNavLeft + thisNavWidth - oldTabLeft - oldTab.outerWidth())
|
583
|
-
});
|
584
|
-
|
585
|
-
if (oldTab.offset().left > thisLeft) {
|
586
|
-
$thisNavIndicator.addClass('reverse');
|
587
|
-
|
588
|
-
$thisNavIndicator.one('webkitTransitionEnd oTransitionEnd msTransitionEnd transitionend', function () {
|
589
|
-
$thisNavIndicator.removeClass('reverse');
|
590
|
-
});
|
591
|
-
};
|
592
|
-
};
|
593
|
-
|
594
|
-
$thisNavIndicator.addClass('animate').css({
|
595
|
-
left: (thisLeft - thisNavLeft),
|
596
|
-
right: (thisNavLeft + thisNavWidth - thisLeft - $this.outerWidth())
|
597
|
-
}).one('webkitTransitionEnd oTransitionEnd msTransitionEnd transitionend', function () {
|
598
|
-
$thisNavIndicator.removeClass('animate');
|
599
|
-
});
|
600
|
-
|
601
|
-
return this;
|
602
|
-
}
|
603
|
-
})(jQuery);
|
604
|
-
|
605
|
-
$(function () {
|
606
|
-
'use strict';
|
607
|
-
|
608
|
-
$('.tab-nav').each(function () {
|
609
|
-
$(this).append('<div class="tab-nav-indicator"></div>');
|
610
|
-
});
|
611
|
-
|
612
|
-
$(document).on('show.bs.tab', '.tab-nav a[data-toggle="tab"]', function (e) {
|
613
|
-
$(e.target).tabSwitch($(e.relatedTarget));
|
614
|
-
});
|
615
|
-
});
|
616
|
-
|
617
|
-
// tile
|
618
|
-
(function ($) {
|
619
|
-
'use strict';
|
620
|
-
|
621
|
-
var Tile = function (element, options) {
|
622
|
-
this.options = $.extend({}, Tile.DEFAULTS, options);
|
623
|
-
this.transitioning = null;
|
624
|
-
this.$element = $(element);
|
625
|
-
|
626
|
-
if (this.options.parent) {
|
627
|
-
this.$parent = this.getParent();
|
628
|
-
};
|
629
|
-
|
630
|
-
if (this.options.toggle) {
|
631
|
-
this.toggle();
|
632
|
-
};
|
633
|
-
};
|
634
|
-
|
635
|
-
if (!$.fn.collapse) {
|
636
|
-
throw new Error('Menu requires Bootstrap collapse.js');
|
637
|
-
};
|
638
|
-
|
639
|
-
Tile.DEFAULTS = {
|
640
|
-
keyboard: true,
|
641
|
-
toggle: true
|
642
|
-
};
|
643
|
-
Tile.TRANSITION_DURATION = 150;
|
644
|
-
|
645
|
-
Tile.prototype = $.extend({}, $.fn.collapse.Constructor.prototype);
|
646
|
-
|
647
|
-
Tile.prototype.escape = function () {
|
648
|
-
if (this.$element.hasClass('in') && this.options.keyboard) {
|
649
|
-
$(document).on('keydown.dismiss.bs.tile', $.proxy(function (e) {
|
650
|
-
e.which == 27 && this.hide();
|
651
|
-
}, this));
|
652
|
-
} else if (!this.$element.hasClass('in')) {
|
653
|
-
this.$element.off('keydown.dismiss.bs.tile');
|
654
|
-
};
|
655
|
-
};
|
656
|
-
|
657
|
-
Tile.prototype.hide = function () {
|
658
|
-
if (this.transitioning || !this.$element.hasClass('in')) {
|
659
|
-
return;
|
660
|
-
};
|
661
|
-
|
662
|
-
var startEvent = $.Event('hide.bs.tile');
|
663
|
-
|
664
|
-
this.$element.trigger(startEvent);
|
665
|
-
|
666
|
-
if (startEvent.isDefaultPrevented()) {
|
667
|
-
return;
|
668
|
-
};
|
669
|
-
|
670
|
-
var dimension = this.dimension();
|
671
|
-
|
672
|
-
this.$element[dimension](this.$element[dimension]())[0].offsetHeight;
|
673
|
-
|
674
|
-
this.$element.addClass('collapsing').removeClass('collapse in');
|
675
|
-
|
676
|
-
this.$element.closest('.tile-collapse').removeClass('active');
|
677
|
-
|
678
|
-
this.transitioning = 1
|
679
|
-
|
680
|
-
var complete = function () {
|
681
|
-
this.transitioning = 0;
|
682
|
-
this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.tile');
|
683
|
-
this.escape();
|
684
|
-
};
|
685
|
-
|
686
|
-
if (!$.support.transition) {
|
687
|
-
return complete.call(this);
|
688
|
-
};
|
689
|
-
|
690
|
-
this.$element[dimension](0).one('bsTransitionEnd', $.proxy(complete, this)).emulateTransitionEnd(Tile.TRANSITION_DURATION);
|
691
|
-
};
|
692
|
-
|
693
|
-
Tile.prototype.show = function () {
|
694
|
-
if (this.transitioning || this.$element.hasClass('in')) {
|
695
|
-
return;
|
696
|
-
};
|
697
|
-
|
698
|
-
var actives = this.$parent && this.$parent.find('.tile-collapse').children('.in, .collapsing');
|
699
|
-
var activesData;
|
700
|
-
|
701
|
-
if (actives && actives.length) {
|
702
|
-
activesData = actives.data('bs.tile');
|
703
|
-
if (activesData && activesData.transitioning) {
|
704
|
-
return;
|
705
|
-
};
|
706
|
-
};
|
707
|
-
|
708
|
-
var startEvent = $.Event('show.bs.tile');
|
709
|
-
|
710
|
-
this.$element.trigger(startEvent);
|
711
|
-
|
712
|
-
if (startEvent.isDefaultPrevented()) {
|
713
|
-
return;
|
714
|
-
};
|
715
|
-
|
716
|
-
if (actives && actives.length) {
|
717
|
-
Plugin.call(actives, 'hide');
|
718
|
-
activesData || actives.data('bs.tile', null);
|
719
|
-
};
|
720
|
-
|
721
|
-
var dimension = this.dimension();
|
722
|
-
|
723
|
-
this.$element.removeClass('collapse').addClass('collapsing')[dimension](0);
|
724
|
-
|
725
|
-
this.$element.closest('.tile-collapse').addClass('active');
|
726
|
-
|
727
|
-
this.transitioning = 1;
|
728
|
-
|
729
|
-
var complete = function () {
|
730
|
-
this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('');
|
731
|
-
this.transitioning = 0;
|
732
|
-
this.$element.trigger('shown.bs.tile');
|
733
|
-
this.escape();
|
734
|
-
};
|
735
|
-
|
736
|
-
if (!$.support.transition) {
|
737
|
-
return complete.call(this);
|
738
|
-
};
|
739
|
-
|
740
|
-
var scrollSize = $.camelCase(['scroll', dimension].join('-'));
|
741
|
-
|
742
|
-
this.$element.one('bsTransitionEnd', $.proxy(complete, this)).emulateTransitionEnd(Tile.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]);
|
743
|
-
};
|
744
|
-
|
745
|
-
function getTargetFromTrigger($trigger) {
|
746
|
-
var href;
|
747
|
-
var target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '');
|
748
|
-
|
749
|
-
return $(target);
|
750
|
-
};
|
751
|
-
|
752
|
-
function Plugin(option) {
|
753
|
-
return this.each(function () {
|
754
|
-
var $this = $(this);
|
755
|
-
var data = $this.data('bs.tile');
|
756
|
-
var options = $.extend({}, Tile.DEFAULTS, $this.data(), typeof option == 'object' && option);
|
757
|
-
|
758
|
-
if (!data && options.toggle && /show|hide/.test(option)) {
|
759
|
-
options.toggle = false;
|
760
|
-
};
|
761
|
-
|
762
|
-
if (!data) {
|
763
|
-
$this.data('bs.tile', (data = new Tile(this, options)));
|
764
|
-
};
|
765
|
-
|
766
|
-
if (typeof option == 'string') {
|
767
|
-
data[option]();
|
768
|
-
};
|
769
|
-
})
|
770
|
-
};
|
771
|
-
|
772
|
-
var old = $.fn.tile;
|
773
|
-
|
774
|
-
$.fn.tile = Plugin;
|
775
|
-
$.fn.tile.Constructor = Tile;
|
776
|
-
|
777
|
-
$.fn.tile.noConflict = function () {
|
778
|
-
$.fn.tile = old;
|
779
|
-
return this;
|
780
|
-
};
|
781
|
-
|
782
|
-
$(document).on('click.bs.tile.data-api', '[data-toggle="tile"]', function (e) {
|
783
|
-
var $this = $(this);
|
784
|
-
|
785
|
-
if (!$(e.target).is('[data-ignore="tile"], [data-ignore="tile"] *')) {
|
786
|
-
if (!$this.attr('data-target')) {
|
787
|
-
e.preventDefault();
|
788
|
-
};
|
789
|
-
|
790
|
-
var $target = getTargetFromTrigger($this);
|
791
|
-
var data = $target.data('bs.tile');
|
792
|
-
var option = data ? 'toggle' : $this.data();
|
793
|
-
|
794
|
-
Plugin.call($target, option);
|
795
|
-
};
|
796
|
-
});
|
797
|
-
}(jQuery));
|
29
|
+
var FloatingLabel = function ($) {
|
30
|
+
// constants >>>
|
31
|
+
var DATA_API_KEY = '.data-api';
|
32
|
+
var DATA_KEY = 'md.floatinglabel';
|
33
|
+
var EVENT_KEY = '.' + DATA_KEY;
|
34
|
+
var NAME = 'floatinglabel';
|
35
|
+
var NO_CONFLICT = $.fn[NAME];
|
36
|
+
|
37
|
+
var ClassName = {
|
38
|
+
IS_FOCUSED: 'is-focused',
|
39
|
+
HAS_VALUE: 'has-value'
|
40
|
+
};
|
41
|
+
|
42
|
+
var Event = {
|
43
|
+
CHANGE: 'change' + EVENT_KEY,
|
44
|
+
FOCUSIN: 'focusin' + EVENT_KEY,
|
45
|
+
FOCUSOUT: 'focusout' + EVENT_KEY
|
46
|
+
};
|
47
|
+
|
48
|
+
var Selector = {
|
49
|
+
DATA_PARENT: '.floating-label',
|
50
|
+
DATA_TOGGLE: '.floating-label .form-control'
|
51
|
+
};
|
52
|
+
// <<< constants
|
53
|
+
|
54
|
+
var FloatingLabel = function () {
|
55
|
+
function FloatingLabel(element) {
|
56
|
+
_classCallCheck(this, FloatingLabel);
|
57
|
+
|
58
|
+
this._element = element;
|
59
|
+
}
|
60
|
+
|
61
|
+
_createClass(FloatingLabel, [{
|
62
|
+
key: 'change',
|
63
|
+
value: function change(relatedTarget) {
|
64
|
+
if ($(this._element).val() || $(this._element).is('select') && $('option:first-child', $(this._element)).html().replace(' ', '') !== '') {
|
65
|
+
$(relatedTarget).addClass(ClassName.HAS_VALUE);
|
66
|
+
} else {
|
67
|
+
$(relatedTarget).removeClass(ClassName.HAS_VALUE);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}, {
|
71
|
+
key: 'focusin',
|
72
|
+
value: function focusin(relatedTarget) {
|
73
|
+
$(relatedTarget).addClass(ClassName.IS_FOCUSED);
|
74
|
+
}
|
75
|
+
}, {
|
76
|
+
key: 'focusout',
|
77
|
+
value: function focusout(relatedTarget) {
|
78
|
+
$(relatedTarget).removeClass(ClassName.IS_FOCUSED);
|
79
|
+
}
|
80
|
+
}], [{
|
81
|
+
key: '_jQueryInterface',
|
82
|
+
value: function _jQueryInterface(event) {
|
83
|
+
return this.each(function () {
|
84
|
+
var data = $(this).data(DATA_KEY);
|
85
|
+
var _event = event ? event : 'change';
|
86
|
+
|
87
|
+
if (!data) {
|
88
|
+
data = new FloatingLabel(this);
|
89
|
+
$(this).data(DATA_KEY, data);
|
90
|
+
}
|
91
|
+
|
92
|
+
if (typeof _event === 'string') {
|
93
|
+
if (data[_event] === undefined) {
|
94
|
+
throw new Error('No method named "' + _event + '"');
|
95
|
+
}
|
96
|
+
|
97
|
+
data[_event]($(this).closest(Selector.DATA_PARENT));
|
98
|
+
}
|
99
|
+
});
|
100
|
+
}
|
101
|
+
}]);
|
102
|
+
|
103
|
+
return FloatingLabel;
|
104
|
+
}();
|
105
|
+
|
106
|
+
$(document).on(Event.CHANGE + ' ' + Event.FOCUSIN + ' ' + Event.FOCUSOUT, Selector.DATA_TOGGLE, function (event) {
|
107
|
+
var data = $(this).data(DATA_KEY);
|
108
|
+
|
109
|
+
FloatingLabel._jQueryInterface.call($(this), event.type);
|
110
|
+
});
|
111
|
+
|
112
|
+
$.fn[NAME] = FloatingLabel._jQueryInterface;
|
113
|
+
$.fn[NAME].Constructor = FloatingLabel;
|
114
|
+
$.fn[NAME].noConflict = function () {
|
115
|
+
$.fn[NAME] = NO_CONFLICT;
|
116
|
+
return FloatingLabel._jQueryInterface;
|
117
|
+
};
|
118
|
+
|
119
|
+
return FloatingLabel;
|
120
|
+
}(jQuery);
|
798
121
|
|
799
122
|
/*!
|
800
|
-
*
|
801
|
-
*
|
123
|
+
* navigation drawer
|
124
|
+
* based on bootstrap's (v4.0.0-alpha.5) modal.js
|
802
125
|
*/
|
126
|
+
var NavDrawer = function ($) {
|
127
|
+
// constants >>>
|
128
|
+
var DATA_API_KEY = '.data-api';
|
129
|
+
var DATA_KEY = 'md.navdrawer';
|
130
|
+
var EVENT_KEY = '.' + DATA_KEY;
|
131
|
+
var NAME = 'navdrawer';
|
132
|
+
var NO_CONFLICT = $.fn[NAME];
|
133
|
+
var TRANSITION_DURATION = 375;
|
134
|
+
var TRANSITION_DURATION_BACKDROP = 225;
|
135
|
+
|
136
|
+
var ClassName = {
|
137
|
+
BACKDROP: 'navdrawer-backdrop',
|
138
|
+
IN: 'in',
|
139
|
+
OPEN: 'navdrawer-open'
|
140
|
+
};
|
141
|
+
|
142
|
+
var Default = {
|
143
|
+
breakpoint: 1280,
|
144
|
+
keyboard: true,
|
145
|
+
show: true,
|
146
|
+
type: 'default'
|
147
|
+
};
|
148
|
+
|
149
|
+
var DefaultType = {
|
150
|
+
keyboard: 'boolean',
|
151
|
+
show: 'boolean',
|
152
|
+
type: 'string'
|
153
|
+
};
|
154
|
+
|
155
|
+
var Event = {
|
156
|
+
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
|
157
|
+
CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,
|
158
|
+
FOCUSIN: 'focusin' + EVENT_KEY,
|
159
|
+
HIDDEN: 'hidden' + EVENT_KEY,
|
160
|
+
HIDE: 'hide' + EVENT_KEY,
|
161
|
+
KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,
|
162
|
+
MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,
|
163
|
+
MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,
|
164
|
+
SHOW: 'show' + EVENT_KEY,
|
165
|
+
SHOWN: 'shown' + EVENT_KEY
|
166
|
+
};
|
167
|
+
|
168
|
+
var Selector = {
|
169
|
+
CONTENT: '.navdrawer-content',
|
170
|
+
DATA_DISMISS: '[data-dismiss="navdrawer"]',
|
171
|
+
DATA_TOGGLE: '[data-toggle="navdrawer"]'
|
172
|
+
};
|
173
|
+
// <<< constants
|
174
|
+
|
175
|
+
var NavDrawer = function () {
|
176
|
+
function NavDrawer(element, config) {
|
177
|
+
_classCallCheck(this, NavDrawer);
|
178
|
+
|
179
|
+
this._backdrop = null;
|
180
|
+
this._config = this._getConfig(config);
|
181
|
+
this._content = $(element).find(Selector.CONTENT)[0];
|
182
|
+
this._element = element;
|
183
|
+
this._ignoreBackdropClick = false;
|
184
|
+
this._isShown = false;
|
185
|
+
}
|
186
|
+
|
187
|
+
_createClass(NavDrawer, [{
|
188
|
+
key: 'hide',
|
189
|
+
value: function hide(event) {
|
190
|
+
if (event) {
|
191
|
+
event.preventDefault();
|
192
|
+
}
|
193
|
+
|
194
|
+
var hideClassName = ClassName.OPEN + '-' + this._config.type;
|
195
|
+
var hideEvent = $.Event(Event.HIDE);
|
196
|
+
|
197
|
+
$(this._element).trigger(hideEvent);
|
198
|
+
|
199
|
+
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
|
203
|
+
this._isShown = false;
|
204
|
+
this._setEscapeEvent();
|
205
|
+
$(document).off(Event.FOCUSIN);
|
206
|
+
$(this._content).off(Event.MOUSEDOWN_DISMISS);
|
207
|
+
|
208
|
+
$(this._element).off(Event.CLICK_DISMISS).removeClass(ClassName.IN);
|
209
|
+
|
210
|
+
if (Util.supportsTransitionEnd()) {
|
211
|
+
$(this._element).one(Util.TRANSITION_END, $.proxy(this._hideNavdrawer, this, hideClassName)).emulateTransitionEnd(TRANSITION_DURATION);
|
212
|
+
} else {
|
213
|
+
this._hideNavdrawer();
|
214
|
+
}
|
215
|
+
}
|
216
|
+
}, {
|
217
|
+
key: 'show',
|
218
|
+
value: function show(relatedTarget) {
|
219
|
+
var _this = this;
|
220
|
+
|
221
|
+
var showEvent = $.Event(Event.SHOW, {
|
222
|
+
relatedTarget: relatedTarget
|
223
|
+
});
|
224
|
+
|
225
|
+
$(this._element).trigger(showEvent);
|
226
|
+
|
227
|
+
if (this._isShown || showEvent.isDefaultPrevented()) {
|
228
|
+
return;
|
229
|
+
}
|
230
|
+
|
231
|
+
this._isShown = true;
|
232
|
+
$(document.body).addClass(ClassName.OPEN + '-' + this._config.type);
|
233
|
+
this._setEscapeEvent();
|
234
|
+
$(this._element).addClass(NAME + '-' + this._config.type);
|
235
|
+
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
|
236
|
+
|
237
|
+
$(this._content).on(Event.MOUSEDOWN_DISMISS, function () {
|
238
|
+
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
239
|
+
if ($(event.target).is(_this._element)) {
|
240
|
+
_this._ignoreBackdropClick = true;
|
241
|
+
}
|
242
|
+
});
|
243
|
+
});
|
244
|
+
|
245
|
+
this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
|
246
|
+
}
|
247
|
+
}, {
|
248
|
+
key: 'toggle',
|
249
|
+
value: function toggle(relatedTarget) {
|
250
|
+
return this._isShown ? this.hide() : this.show(relatedTarget);
|
251
|
+
}
|
252
|
+
}, {
|
253
|
+
key: '_enforceFocus',
|
254
|
+
value: function _enforceFocus() {
|
255
|
+
var _this2 = this;
|
256
|
+
|
257
|
+
$(document).off(Event.FOCUSIN).on(Event.FOCUSIN, function (event) {
|
258
|
+
if (_this2._config.type === 'default' || $(window).width() <= _this2._config.breakpoint) {
|
259
|
+
if (_this2._element !== event.target && !$(_this2._element).has(event.target).length) {
|
260
|
+
_this2._element.focus();
|
261
|
+
}
|
262
|
+
}
|
263
|
+
});
|
264
|
+
}
|
265
|
+
}, {
|
266
|
+
key: '_getConfig',
|
267
|
+
value: function _getConfig(config) {
|
268
|
+
config = $.extend({}, Default, config);
|
269
|
+
Util.typeCheckConfig(NAME, config, DefaultType);
|
270
|
+
return config;
|
271
|
+
}
|
272
|
+
}, {
|
273
|
+
key: '_hideNavdrawer',
|
274
|
+
value: function _hideNavdrawer(className) {
|
275
|
+
var _this3 = this;
|
276
|
+
|
277
|
+
this._element.style.display = 'none';
|
278
|
+
|
279
|
+
this._showBackdrop(function () {
|
280
|
+
$(document.body).removeClass(className);
|
281
|
+
$(_this3._element).trigger(Event.HIDDEN);
|
282
|
+
});
|
283
|
+
}
|
284
|
+
}, {
|
285
|
+
key: '_removeBackdrop',
|
286
|
+
value: function _removeBackdrop() {
|
287
|
+
if (this._backdrop) {
|
288
|
+
$(this._backdrop).remove();
|
289
|
+
this._backdrop = null;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}, {
|
293
|
+
key: '_setEscapeEvent',
|
294
|
+
value: function _setEscapeEvent() {
|
295
|
+
var _this4 = this;
|
296
|
+
|
297
|
+
if (this._isShown && this._config.keyboard) {
|
298
|
+
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
299
|
+
if (event.which === 27) {
|
300
|
+
_this4.hide();
|
301
|
+
}
|
302
|
+
});
|
303
|
+
} else if (!this._isShown) {
|
304
|
+
$(this._element).off(Event.KEYDOWN_DISMISS);
|
305
|
+
}
|
306
|
+
}
|
307
|
+
}, {
|
308
|
+
key: '_showBackdrop',
|
309
|
+
value: function _showBackdrop(callback) {
|
310
|
+
var _this5 = this;
|
311
|
+
|
312
|
+
var supportsTransition = Util.supportsTransitionEnd();
|
313
|
+
|
314
|
+
if (this._isShown) {
|
315
|
+
this._backdrop = document.createElement('div');
|
316
|
+
|
317
|
+
$(this._backdrop).addClass(ClassName.BACKDROP).addClass(ClassName.BACKDROP + '-' + this._config.type).appendTo(document.body);
|
318
|
+
|
319
|
+
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
320
|
+
if (_this5._ignoreBackdropClick) {
|
321
|
+
_this5._ignoreBackdropClick = false;
|
322
|
+
return;
|
323
|
+
}
|
324
|
+
|
325
|
+
if (event.target !== event.currentTarget) {
|
326
|
+
return;
|
327
|
+
}
|
328
|
+
|
329
|
+
_this5.hide();
|
330
|
+
});
|
331
|
+
|
332
|
+
if (supportsTransition) {
|
333
|
+
Util.reflow(this._backdrop);
|
334
|
+
}
|
335
|
+
|
336
|
+
$(this._backdrop).addClass(ClassName.IN);
|
337
|
+
|
338
|
+
if (!callback) {
|
339
|
+
return;
|
340
|
+
}
|
341
|
+
|
342
|
+
if (!supportsTransition) {
|
343
|
+
callback();
|
344
|
+
return;
|
345
|
+
}
|
346
|
+
|
347
|
+
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(TRANSITION_DURATION_BACKDROP);
|
348
|
+
} else if (this._backdrop && !this._isShown) {
|
349
|
+
$(this._backdrop).removeClass(ClassName.IN);
|
350
|
+
|
351
|
+
var callbackRemove = function callbackRemove() {
|
352
|
+
_this5._removeBackdrop();
|
353
|
+
|
354
|
+
if (callback) {
|
355
|
+
callback();
|
356
|
+
}
|
357
|
+
};
|
358
|
+
|
359
|
+
if (supportsTransition) {
|
360
|
+
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(TRANSITION_DURATION_BACKDROP);
|
361
|
+
} else {
|
362
|
+
callbackRemove();
|
363
|
+
}
|
364
|
+
} else if (callback) {
|
365
|
+
callback();
|
366
|
+
}
|
367
|
+
}
|
368
|
+
}, {
|
369
|
+
key: '_showElement',
|
370
|
+
value: function _showElement(relatedTarget) {
|
371
|
+
var _this6 = this;
|
372
|
+
|
373
|
+
var supportsTransition = Util.supportsTransitionEnd();
|
374
|
+
|
375
|
+
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
376
|
+
document.body.appendChild(this._element);
|
377
|
+
}
|
378
|
+
|
379
|
+
this._element.style.display = 'block';
|
380
|
+
|
381
|
+
if (supportsTransition) {
|
382
|
+
Util.reflow(this._element);
|
383
|
+
}
|
384
|
+
|
385
|
+
$(this._element).addClass(ClassName.IN);
|
386
|
+
this._enforceFocus();
|
387
|
+
|
388
|
+
var shownEvent = $.Event(Event.SHOWN, {
|
389
|
+
relatedTarget: relatedTarget
|
390
|
+
});
|
391
|
+
|
392
|
+
var transitionComplete = function transitionComplete() {
|
393
|
+
_this6._element.focus();
|
394
|
+
$(_this6._element).trigger(shownEvent);
|
395
|
+
};
|
396
|
+
|
397
|
+
if (supportsTransition) {
|
398
|
+
$(this._content).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
|
399
|
+
} else {
|
400
|
+
transitionComplete();
|
401
|
+
}
|
402
|
+
}
|
403
|
+
}], [{
|
404
|
+
key: '_jQueryInterface',
|
405
|
+
value: function _jQueryInterface(config, relatedTarget) {
|
406
|
+
return this.each(function () {
|
407
|
+
var data = $(this).data(DATA_KEY);
|
408
|
+
var _config = $.extend({}, NavDrawer.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
|
409
|
+
|
410
|
+
if (!data) {
|
411
|
+
data = new NavDrawer(this, _config);
|
412
|
+
$(this).data(DATA_KEY, data);
|
413
|
+
}
|
414
|
+
|
415
|
+
if (typeof config === 'string') {
|
416
|
+
if (data[config] === undefined) {
|
417
|
+
throw new Error('No method named "' + config + '"');
|
418
|
+
}
|
419
|
+
|
420
|
+
data[config](relatedTarget);
|
421
|
+
} else if (_config.show) {
|
422
|
+
data.show(relatedTarget);
|
423
|
+
}
|
424
|
+
});
|
425
|
+
}
|
426
|
+
}, {
|
427
|
+
key: 'Default',
|
428
|
+
get: function get() {
|
429
|
+
return Default;
|
430
|
+
}
|
431
|
+
}]);
|
432
|
+
|
433
|
+
return NavDrawer;
|
434
|
+
}();
|
435
|
+
|
436
|
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
437
|
+
var _this7 = this;
|
438
|
+
|
439
|
+
var selector = Util.getSelectorFromElement(this);
|
440
|
+
var target = void 0;
|
441
|
+
|
442
|
+
if (selector) {
|
443
|
+
target = $(selector)[0];
|
444
|
+
}
|
445
|
+
|
446
|
+
var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
|
447
|
+
|
448
|
+
if (this.tagName === 'A') {
|
449
|
+
event.preventDefault();
|
450
|
+
}
|
451
|
+
|
452
|
+
var $target = $(target).one(Event.SHOW, function (showEvent) {
|
453
|
+
if (showEvent.isDefaultPrevented()) {
|
454
|
+
return;
|
455
|
+
}
|
456
|
+
|
457
|
+
$target.one(Event.HIDDEN, function () {
|
458
|
+
if ($(_this7).is(':visible')) {
|
459
|
+
_this7.focus();
|
460
|
+
}
|
461
|
+
});
|
462
|
+
});
|
463
|
+
|
464
|
+
NavDrawer._jQueryInterface.call($(target), config, this);
|
465
|
+
});
|
466
|
+
|
467
|
+
$.fn[NAME] = NavDrawer._jQueryInterface;
|
468
|
+
$.fn[NAME].Constructor = NavDrawer;
|
469
|
+
$.fn[NAME].noConflict = function () {
|
470
|
+
$.fn[NAME] = NO_CONFLICT;
|
471
|
+
return NavDrawer._jQueryInterface;
|
472
|
+
};
|
473
|
+
|
474
|
+
return NavDrawer;
|
475
|
+
}(jQuery);
|
803
476
|
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
477
|
+
/*!
|
478
|
+
* tab indicator animation
|
479
|
+
* requires bootstrap's (v4.0.0-alpha.5) tab.js
|
480
|
+
*/
|
481
|
+
var TabSwitch = function ($) {
|
482
|
+
// constants >>>
|
483
|
+
var DATA_KEY = 'md.tabswitch';
|
484
|
+
var NAME = 'tabswitch';
|
485
|
+
var NO_CONFLICT = $.fn[NAME];
|
486
|
+
var TRANSITION_DURATION = 450;
|
487
|
+
|
488
|
+
var ClassName = {
|
489
|
+
ANIMATE: 'animate',
|
490
|
+
IN: 'in',
|
491
|
+
INDICATOR: 'nav-tabs-indicator',
|
492
|
+
MATERIAL: 'nav-tabs-material',
|
493
|
+
REVERSE: 'reverse',
|
494
|
+
SCROLLABLE: 'nav-tabs-scrollable'
|
495
|
+
};
|
496
|
+
|
497
|
+
var Event = {
|
498
|
+
SHOW_BS_TAB: 'show.bs.tab'
|
499
|
+
};
|
500
|
+
|
501
|
+
var Selector = {
|
502
|
+
DATA_TOGGLE: '.nav-tabs [data-toggle="tab"]',
|
503
|
+
TAB_NAV: '.nav-tabs'
|
504
|
+
};
|
505
|
+
// <<< constants
|
506
|
+
|
507
|
+
var TabSwitch = function () {
|
508
|
+
function TabSwitch(nav) {
|
509
|
+
_classCallCheck(this, TabSwitch);
|
510
|
+
|
511
|
+
if (typeof $.fn.tab === 'undefined') {
|
512
|
+
throw new Error('Material\'s JavaScript requires Bootstrap\'s tab.js');
|
513
|
+
};
|
514
|
+
|
515
|
+
this._nav = nav;
|
516
|
+
this._navindicator = null;
|
517
|
+
}
|
518
|
+
|
519
|
+
_createClass(TabSwitch, [{
|
520
|
+
key: 'switch',
|
521
|
+
value: function _switch(element, relatedTarget) {
|
522
|
+
var _this8 = this;
|
523
|
+
|
524
|
+
var supportsTransition = Util.supportsTransitionEnd();
|
525
|
+
|
526
|
+
if (!this._navindicator) {
|
527
|
+
this._createIndicator();
|
528
|
+
}
|
529
|
+
|
530
|
+
var elLeft = $(element).offset().left;
|
531
|
+
var elWidth = $(element).outerWidth();
|
532
|
+
var navLeft = $(this._nav).offset().left;
|
533
|
+
var navScrollLeft = $(this._nav).scrollLeft();
|
534
|
+
var navWidth = $(this._nav).outerWidth();
|
535
|
+
|
536
|
+
if (relatedTarget !== undefined) {
|
537
|
+
var relatedLeft = $(relatedTarget).offset().left;
|
538
|
+
var relatedWidth = $(relatedTarget).outerWidth();
|
539
|
+
|
540
|
+
$(this._navindicator).css({
|
541
|
+
left: relatedLeft + navScrollLeft - navLeft,
|
542
|
+
right: navWidth - (relatedLeft + navScrollLeft - navLeft + relatedWidth)
|
543
|
+
});
|
544
|
+
|
545
|
+
$(this._navindicator).addClass(ClassName.IN);
|
546
|
+
Util.reflow(this._navindicator);
|
547
|
+
|
548
|
+
if (supportsTransition) {
|
549
|
+
$(this._navindicator).addClass(ClassName.ANIMATE);
|
550
|
+
|
551
|
+
if (relatedLeft > elLeft) {
|
552
|
+
$(this._navindicator).addClass(ClassName.REVERSE);
|
553
|
+
}
|
554
|
+
}
|
555
|
+
}
|
556
|
+
|
557
|
+
$(this._navindicator).css({
|
558
|
+
left: elLeft + navScrollLeft - navLeft,
|
559
|
+
right: navWidth - (elLeft + navScrollLeft - navLeft + elWidth)
|
560
|
+
});
|
561
|
+
|
562
|
+
var complete = function complete() {
|
563
|
+
$(_this8._navindicator).removeClass(ClassName.ANIMATE).removeClass(ClassName.IN).removeClass(ClassName.REVERSE);
|
564
|
+
};
|
565
|
+
|
566
|
+
if (!supportsTransition) {
|
567
|
+
complete();
|
568
|
+
return;
|
569
|
+
}
|
570
|
+
|
571
|
+
$(this._navindicator).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
572
|
+
}
|
573
|
+
}, {
|
574
|
+
key: '_createIndicator',
|
575
|
+
value: function _createIndicator() {
|
576
|
+
this._navindicator = document.createElement('div');
|
577
|
+
|
578
|
+
$(this._navindicator).addClass(ClassName.INDICATOR).appendTo(this._nav);
|
579
|
+
|
580
|
+
$(this._nav).addClass(ClassName.MATERIAL);
|
581
|
+
}
|
582
|
+
}], [{
|
583
|
+
key: '_jQueryInterface',
|
584
|
+
value: function _jQueryInterface(relatedTarget) {
|
585
|
+
return this.each(function () {
|
586
|
+
var nav = $(this).closest(Selector.TAB_NAV)[0];
|
587
|
+
|
588
|
+
if (!nav) {
|
589
|
+
return;
|
590
|
+
}
|
591
|
+
|
592
|
+
var data = $(nav).data(DATA_KEY);
|
593
|
+
|
594
|
+
if (!data) {
|
595
|
+
data = new TabSwitch(nav);
|
596
|
+
$(nav).data(DATA_KEY, data);
|
597
|
+
}
|
598
|
+
|
599
|
+
data.switch(this, relatedTarget);
|
600
|
+
});
|
601
|
+
}
|
602
|
+
}]);
|
603
|
+
|
604
|
+
return TabSwitch;
|
605
|
+
}();
|
606
|
+
|
607
|
+
$(document).on(Event.SHOW_BS_TAB, Selector.DATA_TOGGLE, function (event) {
|
608
|
+
TabSwitch._jQueryInterface.call($(event.target), event.relatedTarget);
|
609
|
+
});
|
610
|
+
|
611
|
+
$.fn[NAME] = TabSwitch._jQueryInterface;
|
612
|
+
$.fn[NAME].Constructor = TabSwitch;
|
613
|
+
$.fn[NAME].noConflict = function () {
|
614
|
+
$.fn[NAME] = NO_CONFLICT;
|
615
|
+
return TabSwitch._jQueryInterface;
|
616
|
+
};
|
617
|
+
|
618
|
+
return TabSwitch;
|
619
|
+
}(jQuery);
|
809
620
|
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
621
|
+
/*!
|
622
|
+
* global util js
|
623
|
+
* based on bootstrap's (v4.0.0-alpha.5) util.js
|
624
|
+
*/
|
625
|
+
var Util = function ($) {
|
626
|
+
var transition = false;
|
627
|
+
|
628
|
+
var TransitionEndEvent = {
|
629
|
+
WebkitTransition: 'webkitTransitionEnd',
|
630
|
+
MozTransition: 'transitionend',
|
631
|
+
OTransition: 'oTransitionEnd otransitionend',
|
632
|
+
transition: 'transitionend'
|
633
|
+
};
|
634
|
+
|
635
|
+
function getSpecialTransitionEndEvent() {
|
636
|
+
return {
|
637
|
+
bindType: transition.end,
|
638
|
+
delegateType: transition.end,
|
639
|
+
handle: function handle(event) {
|
640
|
+
if ($(event.target).is(this)) {
|
641
|
+
return event.handleObj.handler.apply(this, arguments);
|
642
|
+
}
|
643
|
+
return undefined;
|
644
|
+
}
|
645
|
+
};
|
646
|
+
}
|
647
|
+
|
648
|
+
function isElement(obj) {
|
649
|
+
return (obj[0] || obj).nodeType;
|
650
|
+
}
|
651
|
+
|
652
|
+
function setTransitionEndSupport() {
|
653
|
+
transition = transitionEndTest();
|
654
|
+
|
655
|
+
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
656
|
+
|
657
|
+
if (Util.supportsTransitionEnd()) {
|
658
|
+
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
659
|
+
}
|
660
|
+
}
|
661
|
+
|
662
|
+
function toType(obj) {
|
663
|
+
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
664
|
+
}
|
665
|
+
|
666
|
+
function transitionEndEmulator(duration) {
|
667
|
+
var _this9 = this;
|
668
|
+
|
669
|
+
var called = false;
|
670
|
+
|
671
|
+
$(this).one(Util.TRANSITION_END, function () {
|
672
|
+
called = true;
|
673
|
+
});
|
674
|
+
|
675
|
+
setTimeout(function () {
|
676
|
+
if (!called) {
|
677
|
+
Util.triggerTransitionEnd(_this9);
|
678
|
+
}
|
679
|
+
}, duration);
|
680
|
+
|
681
|
+
return this;
|
682
|
+
}
|
683
|
+
|
684
|
+
function transitionEndTest() {
|
685
|
+
if (window.QUnit) {
|
686
|
+
return false;
|
687
|
+
}
|
688
|
+
|
689
|
+
var el = document.createElement('material');
|
690
|
+
|
691
|
+
for (var name in TransitionEndEvent) {
|
692
|
+
if (el.style[name] !== undefined) {
|
693
|
+
return { end: TransitionEndEvent[name] };
|
694
|
+
}
|
695
|
+
};
|
696
|
+
|
697
|
+
return false;
|
698
|
+
}
|
699
|
+
|
700
|
+
var Util = {
|
701
|
+
TRANSITION_END: 'mdTransitionEnd',
|
702
|
+
|
703
|
+
getSelectorFromElement: function getSelectorFromElement(element) {
|
704
|
+
var selector = element.getAttribute('data-target');
|
705
|
+
|
706
|
+
if (!selector) {
|
707
|
+
selector = element.getAttribute('href') || '';
|
708
|
+
selector = /^#[a-z]/i.test(selector) ? selector : null;
|
709
|
+
}
|
710
|
+
|
711
|
+
return selector;
|
712
|
+
},
|
713
|
+
getUID: function getUID(prefix) {
|
714
|
+
do {
|
715
|
+
prefix += ~~(Math.random() * 1000000);
|
716
|
+
} while (document.getElementById(prefix));
|
717
|
+
return prefix;
|
718
|
+
},
|
719
|
+
reflow: function reflow(element) {
|
720
|
+
new Function('md', 'return md')(element.offsetHeight);
|
721
|
+
},
|
722
|
+
supportsTransitionEnd: function supportsTransitionEnd() {
|
723
|
+
return Boolean(transition);
|
724
|
+
},
|
725
|
+
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
726
|
+
$(element).trigger(transition.end);
|
727
|
+
},
|
728
|
+
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
729
|
+
for (var property in configTypes) {
|
730
|
+
if (configTypes.hasOwnProperty(property)) {
|
731
|
+
var expectedTypes = configTypes[property];
|
732
|
+
var value = config[property];
|
733
|
+
var valueType = void 0;
|
734
|
+
|
735
|
+
if (value && isElement(value)) {
|
736
|
+
valueType = 'element';
|
737
|
+
} else {
|
738
|
+
valueType = toType(value);
|
739
|
+
}
|
740
|
+
|
741
|
+
if (!new RegExp(expectedTypes).test(valueType)) {
|
742
|
+
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
|
743
|
+
}
|
744
|
+
}
|
745
|
+
};
|
746
|
+
}
|
747
|
+
};
|
748
|
+
|
749
|
+
setTransitionEndSupport();
|
750
|
+
|
751
|
+
return Util;
|
752
|
+
}(jQuery);
|
753
|
+
|
754
|
+
}(jQuery);
|