mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-12-01 14:03:45 +03:00
fix indent
This commit is contained in:
parent
11b439386a
commit
e71af77d2f
32
dist/js/material.js
vendored
32
dist/js/material.js
vendored
|
@ -37,23 +37,24 @@ $(function (){
|
|||
};
|
||||
initInputs();
|
||||
|
||||
// Detect animationend event name.
|
||||
var ANIMATION_END_EVENT = (function() {
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
})();
|
||||
|
||||
// Support for "arrive.js" to dynamically detect creation of elements
|
||||
|
@ -68,8 +69,7 @@ $(function (){
|
|||
$(document).on("change", ".checkbox input", function() {
|
||||
// safari cannot auto focus when click.
|
||||
var $checkbox = $(this).focus();
|
||||
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function () {
|
||||
console.log(ANIMATION_END_EVENT);
|
||||
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function() {
|
||||
$checkbox.blur();
|
||||
});
|
||||
});
|
||||
|
|
2
dist/js/material.min.js
vendored
2
dist/js/material.min.js
vendored
|
@ -1 +1 @@
|
|||
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){console.log(b),a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
|
||||
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
|
|
@ -39,22 +39,22 @@ $(function (){
|
|||
|
||||
// Detect animationend event name.
|
||||
var ANIMATION_END_EVENT = (function() {
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
})();
|
||||
|
||||
// Support for "arrive.js" to dynamically detect creation of elements
|
||||
|
@ -69,7 +69,7 @@ $(function (){
|
|||
$(document).on("change", ".checkbox input", function() {
|
||||
// safari cannot auto focus when click.
|
||||
var $checkbox = $(this).focus();
|
||||
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function () {
|
||||
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function() {
|
||||
$checkbox.blur();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,23 +37,24 @@ $(function (){
|
|||
};
|
||||
initInputs();
|
||||
|
||||
// Detect animationend event name.
|
||||
var ANIMATION_END_EVENT = (function() {
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
var eventName,
|
||||
ANIMATION_END_EVENT_NAMES = {
|
||||
"animation": "animationend",
|
||||
"-o-animation": "oAnimationEnd",
|
||||
"-moz-animation": "animationend",
|
||||
"-webkit-animation": "webkitAnimationEnd",
|
||||
"-ms-animation": "animationend"
|
||||
},
|
||||
animateFakeEl = document.createElement("animatefakeelement");
|
||||
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
for (eventName in ANIMATION_END_EVENT_NAMES) {
|
||||
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
|
||||
return ANIMATION_END_EVENT_NAMES[eventName];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
})();
|
||||
|
||||
// Support for "arrive.js" to dynamically detect creation of elements
|
||||
|
@ -68,8 +69,7 @@ $(function (){
|
|||
$(document).on("change", ".checkbox input", function() {
|
||||
// safari cannot auto focus when click.
|
||||
var $checkbox = $(this).focus();
|
||||
$(":before", this).one(ANIMATION_END_EVENT, function () {
|
||||
console.log(ANIMATION_END_EVENT);
|
||||
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function () {
|
||||
$checkbox.blur();
|
||||
});
|
||||
});
|
||||
|
|
2
template/material/js/material.min.js
vendored
2
template/material/js/material.min.js
vendored
|
@ -1 +1 @@
|
|||
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){console.log(b),a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
|
||||
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
|
Loading…
Reference in New Issue
Block a user