Site Skeleton
This commit is contained in:
1180
mdb/js/addons/datatables-select.js
Normal file
1180
mdb/js/addons/datatables-select.js
Normal file
File diff suppressed because it is too large
Load Diff
5
mdb/js/addons/datatables-select.min.js
vendored
Normal file
5
mdb/js/addons/datatables-select.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
15500
mdb/js/addons/datatables.js
Normal file
15500
mdb/js/addons/datatables.js
Normal file
File diff suppressed because it is too large
Load Diff
3
mdb/js/addons/datatables.min.js
vendored
Normal file
3
mdb/js/addons/datatables.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
mdb/js/addons/imagesloaded.pkgd.min.js
vendored
Normal file
7
mdb/js/addons/imagesloaded.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
176
mdb/js/addons/jquery.zmd.hierarchical-display.js
Normal file
176
mdb/js/addons/jquery.zmd.hierarchical-display.js
Normal file
@ -0,0 +1,176 @@
|
||||
/* ========================================================================
|
||||
* Zavoloklom Material Design: jquery.zmd.hierarchical-display.js
|
||||
* http://zavoloklom.github.io/material-design-hierarchical-display/
|
||||
* ========================================================================
|
||||
* Copyright 2014 Zavoloklom.
|
||||
* Licensed under MIT (https://github.com/zavoloklom/material-design-hierarchical-display/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
// CLASS DEFINITION
|
||||
// ======================
|
||||
var HDisplay = function (element, options) {
|
||||
this.$element = $(element);
|
||||
this.$children = this.$element.children();
|
||||
this.options = $.extend({}, HDisplay.DEFAULTS, options);
|
||||
this._time = HDisplay.TRANSITION_DURATION * this.options.speed;
|
||||
|
||||
this.init();
|
||||
if (this.options.debug === true) this._debug();
|
||||
};
|
||||
|
||||
HDisplay.VERSION = '1.0.1';
|
||||
|
||||
HDisplay.TRANSITION_DURATION = 300;
|
||||
|
||||
HDisplay.DEFAULTS = {
|
||||
action: 'show',
|
||||
speed: 5,
|
||||
animationIn: 'zoomedIn',
|
||||
animationOut: 'zoomedOut',
|
||||
debug: false
|
||||
};
|
||||
|
||||
HDisplay.prototype.init = function () {
|
||||
var self = this;
|
||||
var parentElement = this.$element;
|
||||
var children = this.$children;
|
||||
var options = this.options;
|
||||
var time = this._time;
|
||||
var elementOffset, calculatedOffset, elemDelay;
|
||||
|
||||
parentElement.addClass('zmd-hierarchical-display');
|
||||
|
||||
children.each(function () {
|
||||
elementOffset = $(this).position();
|
||||
calculatedOffset = elementOffset.left * 0.8 + elementOffset.top;
|
||||
elemDelay = parseFloat(calculatedOffset / time).toFixed(2);
|
||||
$(this)
|
||||
.css("-webkit-animation-delay", elemDelay + 's')
|
||||
.css("animation-delay", elemDelay + 's');
|
||||
});
|
||||
|
||||
this._delay = elemDelay;
|
||||
|
||||
// Call complete function after animation on last children element ends
|
||||
children.last().on('webkitAnimationEnd animationend', function(){
|
||||
if ($(this).hasClass(options.animationOut)) {self._complete('hidden');}
|
||||
if ($(this).hasClass(options.animationIn)) {self._complete('shown');}
|
||||
});
|
||||
};
|
||||
|
||||
HDisplay.prototype.show = function () {
|
||||
var parentElement = this.$element;
|
||||
var children = this.$children;
|
||||
var options = this.options;
|
||||
|
||||
if (parentElement.hasClass('in') || parentElement.hasClass('zmd-hierarchical-displaying')) return;
|
||||
|
||||
this._removeAnimations();
|
||||
|
||||
parentElement.trigger($.Event('show.zmd.hierarchicalDisplay'));
|
||||
|
||||
this._addAnimation(options.animationIn);
|
||||
};
|
||||
|
||||
HDisplay.prototype.hide = function () {
|
||||
var parentElement = this.$element;
|
||||
var children = this.$children;
|
||||
var options = this.options;
|
||||
|
||||
if (parentElement.css('visibility') === 'hidden' || parentElement.hasClass('zmd-hierarchical-displaying')) return;
|
||||
|
||||
this._removeAnimations();
|
||||
|
||||
parentElement.trigger($.Event('hide.zmd.hierarchicalDisplay'));
|
||||
|
||||
this._addAnimation(options.animationOut);
|
||||
};
|
||||
|
||||
HDisplay.prototype.toggle = function () {
|
||||
if (this.$element.hasClass('in')) {return this.hide();}
|
||||
return this.show();
|
||||
};
|
||||
|
||||
HDisplay.prototype._removeAnimations = function () {
|
||||
var options = this.options;
|
||||
this.$children.each(function () {
|
||||
$(this)
|
||||
.removeClass(options.animationIn)
|
||||
.removeClass(options.animationOut);
|
||||
});
|
||||
};
|
||||
|
||||
HDisplay.prototype._addAnimation = function (animation) {
|
||||
this.$element.addClass('zmd-hierarchical-displaying');
|
||||
this.$children.each(function () {
|
||||
$(this)
|
||||
.addClass(animation)
|
||||
.addClass('animation');
|
||||
});
|
||||
};
|
||||
|
||||
HDisplay.prototype._complete = function (eventName) {
|
||||
this.$element
|
||||
.removeClass('zmd-hierarchical-displaying')
|
||||
.toggleClass('in')
|
||||
.trigger($.Event(eventName+'.zmd.hierarchicalDisplay'));
|
||||
};
|
||||
|
||||
HDisplay.prototype._debug = function () {
|
||||
$(document)
|
||||
.on('show.zmd.hierarchicalDisplay', function (e) {
|
||||
console.log('Event "show.zmd.hierarchicalDisplay". For more information see:');
|
||||
console.log(e);
|
||||
})
|
||||
.on('shown.zmd.hierarchicalDisplay', function (e) {
|
||||
console.log('Event "shown.zmd.hierarchicalDisplay". For more information see:');
|
||||
console.log(e);
|
||||
})
|
||||
.on('hide.zmd.hierarchicalDisplay', function (e) {
|
||||
console.log('Event "hide.zmd.hierarchicalDisplay". For more information see:');
|
||||
console.log(e);
|
||||
})
|
||||
.on('hidden.zmd.hierarchicalDisplay', function (e) {
|
||||
console.log('Event "hidden.zmd.hierarchicalDisplay". For more information see:');
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// PLUGIN DEFINITION
|
||||
// =======================
|
||||
function Plugin(settings) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('zmd.hierarchicalDisplay');
|
||||
var options = $.extend({}, HDisplay.DEFAULTS, $this.data(), typeof settings === 'object' && settings);
|
||||
|
||||
if (!data) {$this.data('zmd.hierarchicalDisplay', (data = new HDisplay(this, options)));}
|
||||
if (typeof settings === 'string') {return data[settings]();}
|
||||
if (options.action in data) {return data[options.action]();}
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.hierarchicalDisplay = Plugin;
|
||||
$.fn.hierarchicalDisplay.Constructor = HDisplay;
|
||||
|
||||
// DATA-API
|
||||
// ==============
|
||||
$(document).on('ready', function () {
|
||||
$('[data-animation="hierarchical-display"]').each(function () {
|
||||
Plugin.call($(this));
|
||||
});
|
||||
});
|
||||
$(document).on('click', '[data-toggle="hierarchical-display"]', function (e) {
|
||||
var $this = $(this);
|
||||
var $target = $($this.attr('data-target') || $this.attr('href'));
|
||||
|
||||
if ($this.is('a')) e.preventDefault();
|
||||
|
||||
Plugin.call($target, 'toggle');
|
||||
});
|
||||
|
||||
})(jQuery);
|
1
mdb/js/addons/jquery.zmd.hierarchical-display.min.js
vendored
Normal file
1
mdb/js/addons/jquery.zmd.hierarchical-display.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(i){"use strict";function t(t){return this.each(function(){var a=i(this),e=a.data("zmd.hierarchicalDisplay"),o=i.extend({},n.DEFAULTS,a.data(),"object"==typeof t&&t);return e||a.data("zmd.hierarchicalDisplay",e=new n(this,o)),"string"==typeof t?e[t]():o.action in e?e[o.action]():void 0})}var n=function(t,a){this.$element=i(t),this.$children=this.$element.children(),this.options=i.extend({},n.DEFAULTS,a),this._time=n.TRANSITION_DURATION*this.options.speed,this.init(),!0===this.options.debug&&this._debug()};n.VERSION="1.0.1",n.TRANSITION_DURATION=300,n.DEFAULTS={action:"show",speed:5,animationIn:"zoomedIn",animationOut:"zoomedOut",debug:!1},n.prototype.init=function(){var t,n,a,e=this,o=this.$element,s=this.$children,h=this.options,l=this._time;o.addClass("zmd-hierarchical-display"),s.each(function(){t=i(this).position(),n=.8*t.left+t.top,a=parseFloat(n/l).toFixed(2),i(this).css("-webkit-animation-delay",a+"s").css("animation-delay",a+"s")}),this._delay=a,s.last().on("webkitAnimationEnd animationend",function(){i(this).hasClass(h.animationOut)&&e._complete("hidden"),i(this).hasClass(h.animationIn)&&e._complete("shown")})},n.prototype.show=function(){var t=this.$element,n=(this.$children,this.options);t.hasClass("in")||t.hasClass("zmd-hierarchical-displaying")||(this._removeAnimations(),t.trigger(i.Event("show.zmd.hierarchicalDisplay")),this._addAnimation(n.animationIn))},n.prototype.hide=function(){var t=this.$element,n=(this.$children,this.options);"hidden"===t.css("visibility")||t.hasClass("zmd-hierarchical-displaying")||(this._removeAnimations(),t.trigger(i.Event("hide.zmd.hierarchicalDisplay")),this._addAnimation(n.animationOut))},n.prototype.toggle=function(){return this.$element.hasClass("in")?this.hide():this.show()},n.prototype._removeAnimations=function(){var t=this.options;this.$children.each(function(){i(this).removeClass(t.animationIn).removeClass(t.animationOut)})},n.prototype._addAnimation=function(t){this.$element.addClass("zmd-hierarchical-displaying"),this.$children.each(function(){i(this).addClass(t).addClass("animation")})},n.prototype._complete=function(t){this.$element.removeClass("zmd-hierarchical-displaying").toggleClass("in").trigger(i.Event(t+".zmd.hierarchicalDisplay"))},n.prototype._debug=function(){i(document).on("show.zmd.hierarchicalDisplay",function(i){console.log('Event "show.zmd.hierarchicalDisplay". For more information see:'),console.log(i)}).on("shown.zmd.hierarchicalDisplay",function(i){console.log('Event "shown.zmd.hierarchicalDisplay". For more information see:'),console.log(i)}).on("hide.zmd.hierarchicalDisplay",function(i){console.log('Event "hide.zmd.hierarchicalDisplay". For more information see:'),console.log(i)}).on("hidden.zmd.hierarchicalDisplay",function(i){console.log('Event "hidden.zmd.hierarchicalDisplay". For more information see:'),console.log(i)})},i.fn.hierarchicalDisplay=t,i.fn.hierarchicalDisplay.Constructor=n,i(document).on("ready",function(){i('[data-animation="hierarchical-display"]').each(function(){t.call(i(this))})}),i(document).on("click",'[data-toggle="hierarchical-display"]',function(n){var a=i(this),e=i(a.attr("data-target")||a.attr("href"));a.is("a")&&n.preventDefault(),t.call(e,"toggle")})})(jQuery);
|
9
mdb/js/addons/masonry.pkgd.min.js
vendored
Normal file
9
mdb/js/addons/masonry.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
31
mdb/js/addons/progressBar.js
Normal file
31
mdb/js/addons/progressBar.js
Normal file
@ -0,0 +1,31 @@
|
||||
(function ($) {
|
||||
$.fn.progressBar = function (givenValue) {
|
||||
const $this = $(this);
|
||||
|
||||
function init(selector) {
|
||||
const progressValue = selector.children().attr('aria-valuenow');
|
||||
selector.children().width(`${progressValue}%`);
|
||||
selector.children().html('<span></span>');
|
||||
$this.hasClass('md-progress') ? selector.children().children().addClass('md-progress-bar-text') : selector.children().children().addClass('progress-bar-text');
|
||||
(progressValue !== 100) ? selector.children().children().text(`${progressValue}%`) : selector.children().children().html('<i class="fas fa-check"></i>');
|
||||
}
|
||||
|
||||
function set(selector, value) {
|
||||
selector.children().removeClass('success fail active');
|
||||
selector.children().attr('aria-valuenow', value);
|
||||
init(selector);
|
||||
if (value > 100) {
|
||||
return false;
|
||||
} else if (value === 100) {
|
||||
selector.children().addClass('success');
|
||||
} else if (value < 30) {
|
||||
selector.children().addClass('fail');
|
||||
} else {
|
||||
selector.children().addClass('active');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
set($this, givenValue);
|
||||
};
|
||||
}(jQuery));
|
4
mdb/js/addons/progressBar.min.js
vendored
Normal file
4
mdb/js/addons/progressBar.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
(function($){$.fn.progressBar=function(givenValue){const $this=$(this);function init(selector){const progressValue=selector.children().attr('aria-valuenow');selector.children().width(`${progressValue}%`);selector.children().html('<span></span>');$this.hasClass('md-progress')?selector.children().children().addClass('md-progress-bar-text'):selector.children().children().addClass('progress-bar-text');(progressValue!==100)?selector.children().children().text(`${progressValue}%`):selector.children().children().html('<i class="fas fa-check"></i>')}
|
||||
function set(selector,value){selector.children().removeClass('success fail active');selector.children().attr('aria-valuenow',value);init(selector);if(value>100){return!1}else if(value===100){selector.children().addClass('success')}else if(value<30){selector.children().addClass('fail')}else{selector.children().addClass('active')}
|
||||
return!0}
|
||||
set($this,givenValue)}}(jQuery))
|
121
mdb/js/addons/rating.js
Normal file
121
mdb/js/addons/rating.js
Normal file
@ -0,0 +1,121 @@
|
||||
(function ($) {
|
||||
$.fn.mdbRate = function () {
|
||||
var $stars;
|
||||
// Custom whitelist to allow for using HTML tags in popover content
|
||||
var myDefaultWhiteList = $.fn.tooltip.Constructor.Default.whiteList
|
||||
myDefaultWhiteList.textarea = [];
|
||||
myDefaultWhiteList.button = [];
|
||||
|
||||
var $container = $(this);
|
||||
|
||||
var titles = ['Very bad', 'Poor', 'OK', 'Good', 'Excellent'];
|
||||
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$container.append(`<i class="py-2 px-1 rate-popover" data-index="${i}" data-html="true" data-toggle="popover"
|
||||
data-placement="top" title="${titles[i]}"></i>`);
|
||||
}
|
||||
|
||||
$stars = $container.children();
|
||||
|
||||
if ($container.hasClass('rating-faces')) {
|
||||
$stars.addClass('far fa-meh-blank');
|
||||
} else if ($container.hasClass('empty-stars')) {
|
||||
$stars.addClass('far fa-star');
|
||||
} else {
|
||||
$stars.addClass('fas fa-star');
|
||||
}
|
||||
|
||||
$stars.on('mouseover', function () {
|
||||
var index = $(this).attr('data-index');
|
||||
markStarsAsActive(index);
|
||||
});
|
||||
|
||||
function markStarsAsActive(index) {
|
||||
unmarkActive();
|
||||
|
||||
for (var i = 0; i <= index; i++) {
|
||||
|
||||
if ($container.hasClass('rating-faces')) {
|
||||
$($stars.get(i)).removeClass('fa-meh-blank');
|
||||
$($stars.get(i)).addClass('live');
|
||||
|
||||
switch (index) {
|
||||
case '0':
|
||||
$($stars.get(i)).addClass('fa-angry');
|
||||
break;
|
||||
case '1':
|
||||
$($stars.get(i)).addClass('fa-frown');
|
||||
break;
|
||||
case '2':
|
||||
$($stars.get(i)).addClass('fa-meh');
|
||||
break;
|
||||
case '3':
|
||||
$($stars.get(i)).addClass('fa-smile');
|
||||
break;
|
||||
case '4':
|
||||
$($stars.get(i)).addClass('fa-laugh');
|
||||
break;
|
||||
}
|
||||
|
||||
} else if ($container.hasClass('empty-stars')) {
|
||||
$($stars.get(i)).addClass('fas');
|
||||
switch (index) {
|
||||
case '0':
|
||||
$($stars.get(i)).addClass('oneStar');
|
||||
break;
|
||||
case '1':
|
||||
$($stars.get(i)).addClass('twoStars');
|
||||
break;
|
||||
case '2':
|
||||
$($stars.get(i)).addClass('threeStars');
|
||||
break;
|
||||
case '3':
|
||||
$($stars.get(i)).addClass('fourStars');
|
||||
break;
|
||||
case '4':
|
||||
$($stars.get(i)).addClass('fiveStars');
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$($stars.get(i)).addClass('amber-text');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function unmarkActive() {
|
||||
$stars.parent().hasClass('rating-faces') ? $stars.addClass('fa-meh-blank') : $stars;
|
||||
$container.hasClass('empty-stars') ? $stars.removeClass('fas') : $container;
|
||||
$stars.removeClass('fa-angry fa-frown fa-meh fa-smile fa-laugh live oneStar twoStars threeStars fourStars fiveStars amber-text');
|
||||
}
|
||||
|
||||
$stars.on('click', function () {
|
||||
$stars.popover('hide');
|
||||
});
|
||||
|
||||
// Submit, you can add some extra custom code here
|
||||
// ex. to send the information to the server
|
||||
$container.on('click', '#voteSubmitButton', function () {
|
||||
$stars.popover('hide');
|
||||
});
|
||||
|
||||
// Cancel, just close the popover
|
||||
$container.on('click', '#closePopoverButton', function () {
|
||||
$stars.popover('hide');
|
||||
});
|
||||
|
||||
if ($container.hasClass('feedback')) {
|
||||
|
||||
$(function () {
|
||||
$stars.popover({
|
||||
// Append popover to #rateMe to allow handling form inside the popover
|
||||
container: $container,
|
||||
// Custom content for popover
|
||||
content: `<div class="my-0 py-0"> <textarea type="text" style="font-size: 0.78rem" class="md-textarea form-control py-0" placeholder="Write us what can we improve" rows="3"></textarea> <button id="voteSubmitButton" type="submit" class="btn btn-sm btn-primary">Submit!</button> <button id="closePopoverButton" class="btn btn-flat btn-sm">Close</button> </div>`
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
$stars.tooltip();
|
||||
}
|
||||
})(jQuery);
|
8
mdb/js/addons/rating.min.js
vendored
Normal file
8
mdb/js/addons/rating.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
(function($){$.fn.mdbRate=function(){var $stars;var myDefaultWhiteList=$.fn.tooltip.Constructor.Default.whiteList
|
||||
myDefaultWhiteList.textarea=[];myDefaultWhiteList.button=[];var $container=$(this);var titles=['Very bad','Poor','OK','Good','Excellent'];for(var i=0;i<5;i++){$container.append(`<i class="py-2 px-1 rate-popover" data-index="${i}" data-html="true" data-toggle="popover"
|
||||
data-placement="top" title="${titles[i]}"></i>`)}
|
||||
$stars=$container.children();if($container.hasClass('rating-faces')){$stars.addClass('far fa-meh-blank')}else if($container.hasClass('empty-stars')){$stars.addClass('far fa-star')}else{$stars.addClass('fas fa-star')}
|
||||
$stars.on('mouseover',function(){var index=$(this).attr('data-index');markStarsAsActive(index)});function markStarsAsActive(index){unmarkActive();for(var i=0;i<=index;i++){if($container.hasClass('rating-faces')){$($stars.get(i)).removeClass('fa-meh-blank');$($stars.get(i)).addClass('live');switch(index){case '0':$($stars.get(i)).addClass('fa-angry');break;case '1':$($stars.get(i)).addClass('fa-frown');break;case '2':$($stars.get(i)).addClass('fa-meh');break;case '3':$($stars.get(i)).addClass('fa-smile');break;case '4':$($stars.get(i)).addClass('fa-laugh');break}}else if($container.hasClass('empty-stars')){$($stars.get(i)).addClass('fas');switch(index){case '0':$($stars.get(i)).addClass('oneStar');break;case '1':$($stars.get(i)).addClass('twoStars');break;case '2':$($stars.get(i)).addClass('threeStars');break;case '3':$($stars.get(i)).addClass('fourStars');break;case '4':$($stars.get(i)).addClass('fiveStars');break}}else{$($stars.get(i)).addClass('amber-text')}}}
|
||||
function unmarkActive(){$stars.parent().hasClass('rating-faces')?$stars.addClass('fa-meh-blank'):$stars;$container.hasClass('empty-stars')?$stars.removeClass('fas'):$container;$stars.removeClass('fa-angry fa-frown fa-meh fa-smile fa-laugh live oneStar twoStars threeStars fourStars fiveStars amber-text')}
|
||||
$stars.on('click',function(){$stars.popover('hide')});$container.on('click','#voteSubmitButton',function(){$stars.popover('hide')});$container.on('click','#closePopoverButton',function(){$stars.popover('hide')});if($container.hasClass('feedback')){$(function(){$stars.popover({container:$container,content:`<div class="my-0 py-0"> <textarea type="text" style="font-size: 0.78rem" class="md-textarea form-control py-0" placeholder="Write us what can we improve" rows="3"></textarea> <button id="voteSubmitButton" type="submit" class="btn btn-sm btn-primary">Submit!</button> <button id="closePopoverButton" class="btn btn-flat btn-sm">Close</button> </div>`})})}
|
||||
$stars.tooltip()}})(jQuery)
|
Reference in New Issue
Block a user