delete extra files and pull into vendor file
This commit is contained in:
6807
public/assets/admin/js/bootstrap-editable.js
vendored
6807
public/assets/admin/js/bootstrap-editable.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,315 +0,0 @@
|
||||
type = ['','info','success','warning','danger'];
|
||||
|
||||
|
||||
demo = {
|
||||
initPickColor: function(){
|
||||
$('.pick-class-label').click(function(){
|
||||
var new_class = $(this).attr('new-class');
|
||||
var old_class = $('#display-buttons').attr('data-class');
|
||||
var display_div = $('#display-buttons');
|
||||
if(display_div.length) {
|
||||
var display_buttons = display_div.find('.btn');
|
||||
display_buttons.removeClass(old_class);
|
||||
display_buttons.addClass(new_class);
|
||||
display_div.attr('data-class', new_class);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
initChartist: function(){
|
||||
|
||||
var dataSales = {
|
||||
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
|
||||
series: [
|
||||
[287, 385, 490, 562, 594, 626, 698, 895, 952],
|
||||
[67, 152, 193, 240, 387, 435, 535, 642, 744],
|
||||
[23, 113, 67, 108, 190, 239, 307, 410, 410]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsSales = {
|
||||
lineSmooth: false,
|
||||
low: 0,
|
||||
high: 1000,
|
||||
showArea: true,
|
||||
height: "245px",
|
||||
axisX: {
|
||||
showGrid: false,
|
||||
},
|
||||
lineSmooth: Chartist.Interpolation.simple({
|
||||
divisor: 3
|
||||
}),
|
||||
showLine: true,
|
||||
showPoint: false,
|
||||
};
|
||||
|
||||
var responsiveSales = [
|
||||
['screen and (max-width: 640px)', {
|
||||
axisX: {
|
||||
labelInterpolationFnc: function (value) {
|
||||
return value[0];
|
||||
}
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
|
||||
|
||||
|
||||
var data = {
|
||||
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
series: [
|
||||
[542, 543, 520, 680, 653, 753, 326, 434, 568, 610, 756, 895],
|
||||
[230, 293, 380, 480, 503, 553, 600, 664, 698, 710, 736, 795]
|
||||
]
|
||||
};
|
||||
|
||||
var options = {
|
||||
seriesBarDistance: 10,
|
||||
axisX: {
|
||||
showGrid: false
|
||||
},
|
||||
height: "245px"
|
||||
};
|
||||
|
||||
var responsiveOptions = [
|
||||
['screen and (max-width: 640px)', {
|
||||
seriesBarDistance: 5,
|
||||
axisX: {
|
||||
labelInterpolationFnc: function (value) {
|
||||
return value[0];
|
||||
}
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
Chartist.Line('#chartActivity', data, options, responsiveOptions);
|
||||
|
||||
var dataPreferences = {
|
||||
series: [
|
||||
[25, 30, 20, 25]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsPreferences = {
|
||||
donut: true,
|
||||
donutWidth: 40,
|
||||
startAngle: 0,
|
||||
total: 100,
|
||||
showLabel: false,
|
||||
axisX: {
|
||||
showGrid: false
|
||||
}
|
||||
};
|
||||
|
||||
Chartist.Pie('#chartPreferences', dataPreferences, optionsPreferences);
|
||||
|
||||
Chartist.Pie('#chartPreferences', {
|
||||
labels: ['62%','32%','6%'],
|
||||
series: [62, 32, 6]
|
||||
});
|
||||
},
|
||||
|
||||
initGoogleMaps: function(){
|
||||
var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
|
||||
var mapOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
|
||||
styles: [{"featureType":"water","stylers":[{"saturation":43},{"lightness":-11},{"hue":"#0088ff"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"hue":"#ff0000"},{"saturation":-100},{"lightness":99}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#808080"},{"lightness":54}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#ece2d9"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#ccdca1"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#767676"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]},{"featureType":"poi","stylers":[{"visibility":"off"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#b8cb93"}]},{"featureType":"poi.park","stylers":[{"visibility":"on"}]},{"featureType":"poi.sports_complex","stylers":[{"visibility":"on"}]},{"featureType":"poi.medical","stylers":[{"visibility":"on"}]},{"featureType":"poi.business","stylers":[{"visibility":"simplified"}]}]
|
||||
|
||||
}
|
||||
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: myLatlng,
|
||||
title:"Hello World!"
|
||||
});
|
||||
|
||||
// To add the marker to the map, call setMap();
|
||||
marker.setMap(map);
|
||||
},
|
||||
|
||||
showNotification: function(from, align){
|
||||
color = Math.floor((Math.random() * 4) + 1);
|
||||
|
||||
$.notify({
|
||||
icon: "ti-gift",
|
||||
message: "Welcome to <b>Paper Dashboard</b> - a beautiful freebie for every web developer."
|
||||
|
||||
},{
|
||||
type: type[color],
|
||||
timer: 4000,
|
||||
placement: {
|
||||
from: from,
|
||||
align: align
|
||||
}
|
||||
});
|
||||
},
|
||||
initDocumentationCharts: function(){
|
||||
// init single simple line chart
|
||||
var dataPerformance = {
|
||||
labels: ['6pm','9pm','11pm', '2am', '4am', '8am', '2pm', '5pm', '8pm', '11pm', '4am'],
|
||||
series: [
|
||||
[1, 6, 8, 7, 4, 7, 8, 12, 16, 17, 14, 13]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsPerformance = {
|
||||
showPoint: false,
|
||||
lineSmooth: true,
|
||||
height: "200px",
|
||||
axisX: {
|
||||
showGrid: false,
|
||||
showLabel: true
|
||||
},
|
||||
axisY: {
|
||||
offset: 40,
|
||||
},
|
||||
low: 0,
|
||||
high: 16,
|
||||
height: "250px"
|
||||
};
|
||||
|
||||
Chartist.Line('#chartPerformance', dataPerformance, optionsPerformance);
|
||||
|
||||
// init single line with points chart
|
||||
var dataStock = {
|
||||
labels: ['\'07','\'08','\'09', '\'10', '\'11', '\'12', '\'13', '\'14', '\'15'],
|
||||
series: [
|
||||
[22.20, 34.90, 42.28, 51.93, 62.21, 80.23, 62.21, 82.12, 102.50, 107.23]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsStock = {
|
||||
lineSmooth: false,
|
||||
height: "200px",
|
||||
axisY: {
|
||||
offset: 40,
|
||||
labelInterpolationFnc: function(value) {
|
||||
return '$' + value;
|
||||
}
|
||||
|
||||
},
|
||||
low: 10,
|
||||
height: "250px",
|
||||
high: 110,
|
||||
classNames: {
|
||||
point: 'ct-point ct-green',
|
||||
line: 'ct-line ct-green'
|
||||
}
|
||||
};
|
||||
|
||||
Chartist.Line('#chartStock', dataStock, optionsStock);
|
||||
|
||||
// init multiple lines chart
|
||||
var dataSales = {
|
||||
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
|
||||
series: [
|
||||
[287, 385, 490, 562, 594, 626, 698, 895, 952],
|
||||
[67, 152, 193, 240, 387, 435, 535, 642, 744],
|
||||
[23, 113, 67, 108, 190, 239, 307, 410, 410]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsSales = {
|
||||
lineSmooth: false,
|
||||
low: 0,
|
||||
high: 1000,
|
||||
showArea: true,
|
||||
height: "245px",
|
||||
axisX: {
|
||||
showGrid: false,
|
||||
},
|
||||
lineSmooth: Chartist.Interpolation.simple({
|
||||
divisor: 3
|
||||
}),
|
||||
showLine: true,
|
||||
showPoint: false,
|
||||
};
|
||||
|
||||
var responsiveSales = [
|
||||
['screen and (max-width: 640px)', {
|
||||
axisX: {
|
||||
labelInterpolationFnc: function (value) {
|
||||
return value[0];
|
||||
}
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
|
||||
|
||||
// pie chart
|
||||
Chartist.Pie('#chartPreferences', {
|
||||
labels: ['62%','32%','6%'],
|
||||
series: [62, 32, 6]
|
||||
});
|
||||
|
||||
// bar chart
|
||||
var dataViews = {
|
||||
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
series: [
|
||||
[542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]
|
||||
]
|
||||
};
|
||||
|
||||
var optionsViews = {
|
||||
seriesBarDistance: 10,
|
||||
classNames: {
|
||||
bar: 'ct-bar'
|
||||
},
|
||||
axisX: {
|
||||
showGrid: false,
|
||||
|
||||
},
|
||||
height: "250px"
|
||||
|
||||
};
|
||||
|
||||
var responsiveOptionsViews = [
|
||||
['screen and (max-width: 640px)', {
|
||||
seriesBarDistance: 5,
|
||||
axisX: {
|
||||
labelInterpolationFnc: function (value) {
|
||||
return value[0];
|
||||
}
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
Chartist.Bar('#chartViews', dataViews, optionsViews, responsiveOptionsViews);
|
||||
|
||||
// multiple bars chart
|
||||
var data = {
|
||||
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
series: [
|
||||
[542, 543, 520, 680, 653, 753, 326, 434, 568, 610, 756, 895],
|
||||
[230, 293, 380, 480, 503, 553, 600, 664, 698, 710, 736, 795]
|
||||
]
|
||||
};
|
||||
|
||||
var options = {
|
||||
seriesBarDistance: 10,
|
||||
axisX: {
|
||||
showGrid: false
|
||||
},
|
||||
height: "245px"
|
||||
};
|
||||
|
||||
var responsiveOptions = [
|
||||
['screen and (max-width: 640px)', {
|
||||
seriesBarDistance: 5,
|
||||
axisX: {
|
||||
labelInterpolationFnc: function (value) {
|
||||
return value[0];
|
||||
}
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
Chartist.Line('#chartActivity', data, options, responsiveOptions);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,509 +0,0 @@
|
||||
/*!
|
||||
* iCheck v1.0.2, http://git.io/arlzeA
|
||||
* ===================================
|
||||
* Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization
|
||||
*
|
||||
* (c) 2013 Damir Sultanov, http://fronteed.com
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
// Cached vars
|
||||
var _iCheck = 'iCheck',
|
||||
_iCheckHelper = _iCheck + '-helper',
|
||||
_checkbox = 'checkbox',
|
||||
_radio = 'radio',
|
||||
_checked = 'checked',
|
||||
_unchecked = 'un' + _checked,
|
||||
_disabled = 'disabled',
|
||||
_determinate = 'determinate',
|
||||
_indeterminate = 'in' + _determinate,
|
||||
_update = 'update',
|
||||
_type = 'type',
|
||||
_click = 'click',
|
||||
_touch = 'touchbegin.i touchend.i',
|
||||
_add = 'addClass',
|
||||
_remove = 'removeClass',
|
||||
_callback = 'trigger',
|
||||
_label = 'label',
|
||||
_cursor = 'cursor',
|
||||
_mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
|
||||
|
||||
// Plugin init
|
||||
$.fn[_iCheck] = function(options, fire) {
|
||||
|
||||
// Walker
|
||||
var handle = 'input[type="' + _checkbox + '"], input[type="' + _radio + '"]',
|
||||
stack = $(),
|
||||
walker = function(object) {
|
||||
object.each(function() {
|
||||
var self = $(this);
|
||||
|
||||
if (self.is(handle)) {
|
||||
stack = stack.add(self);
|
||||
} else {
|
||||
stack = stack.add(self.find(handle));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Check if we should operate with some method
|
||||
if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {
|
||||
|
||||
// Normalize method's name
|
||||
options = options.toLowerCase();
|
||||
|
||||
// Find checkboxes and radio buttons
|
||||
walker(this);
|
||||
|
||||
return stack.each(function() {
|
||||
var self = $(this);
|
||||
|
||||
if (options == 'destroy') {
|
||||
tidy(self, 'ifDestroyed');
|
||||
} else {
|
||||
operate(self, true, options);
|
||||
}
|
||||
|
||||
// Fire method's callback
|
||||
if ($.isFunction(fire)) {
|
||||
fire();
|
||||
}
|
||||
});
|
||||
|
||||
// Customization
|
||||
} else if (typeof options == 'object' || !options) {
|
||||
|
||||
// Check if any options were passed
|
||||
var settings = $.extend({
|
||||
checkedClass: _checked,
|
||||
disabledClass: _disabled,
|
||||
indeterminateClass: _indeterminate,
|
||||
labelHover: true
|
||||
}, options),
|
||||
|
||||
selector = settings.handle,
|
||||
hoverClass = settings.hoverClass || 'hover',
|
||||
focusClass = settings.focusClass || 'focus',
|
||||
activeClass = settings.activeClass || 'active',
|
||||
labelHover = !!settings.labelHover,
|
||||
labelHoverClass = settings.labelHoverClass || 'hover',
|
||||
|
||||
// Setup clickable area
|
||||
area = ('' + settings.increaseArea).replace('%', '') | 0;
|
||||
|
||||
// Selector limit
|
||||
if (selector == _checkbox || selector == _radio) {
|
||||
handle = 'input[type="' + selector + '"]';
|
||||
}
|
||||
|
||||
// Clickable area limit
|
||||
if (area < -50) {
|
||||
area = -50;
|
||||
}
|
||||
|
||||
// Walk around the selector
|
||||
walker(this);
|
||||
|
||||
return stack.each(function() {
|
||||
var self = $(this);
|
||||
|
||||
// If already customized
|
||||
tidy(self);
|
||||
|
||||
var node = this,
|
||||
id = node.id,
|
||||
|
||||
// Layer styles
|
||||
offset = -area + '%',
|
||||
size = 100 + (area * 2) + '%',
|
||||
layer = {
|
||||
position: 'absolute',
|
||||
top: offset,
|
||||
left: offset,
|
||||
display: 'block',
|
||||
width: size,
|
||||
height: size,
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
background: '#fff',
|
||||
border: 0,
|
||||
opacity: 0
|
||||
},
|
||||
|
||||
// Choose how to hide input
|
||||
hide = _mobile ? {
|
||||
position: 'absolute',
|
||||
visibility: 'hidden'
|
||||
} : area ? layer : {
|
||||
position: 'absolute',
|
||||
opacity: 0
|
||||
},
|
||||
|
||||
// Get proper class
|
||||
className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,
|
||||
|
||||
// Find assigned labels
|
||||
label = $(_label + '[for="' + id + '"]').add(self.closest(_label)),
|
||||
|
||||
// Check ARIA option
|
||||
aria = !!settings.aria,
|
||||
|
||||
// Set ARIA placeholder
|
||||
ariaID = _iCheck + '-' + Math.random().toString(36).substr(2,6),
|
||||
|
||||
// Parent & helper
|
||||
parent = '<div class="' + className + '" ' + (aria ? 'role="' + node[_type] + '" ' : ''),
|
||||
helper;
|
||||
|
||||
// Set ARIA "labelledby"
|
||||
if (aria) {
|
||||
label.each(function() {
|
||||
parent += 'aria-labelledby="';
|
||||
|
||||
if (this.id) {
|
||||
parent += this.id;
|
||||
} else {
|
||||
this.id = ariaID;
|
||||
parent += ariaID;
|
||||
}
|
||||
|
||||
parent += '"';
|
||||
});
|
||||
}
|
||||
|
||||
// Wrap input
|
||||
parent = self.wrap(parent + '/>')[_callback]('ifCreated').parent().append(settings.insert);
|
||||
|
||||
// Layer addition
|
||||
helper = $('<ins class="' + _iCheckHelper + '"/>').css(layer).appendTo(parent);
|
||||
|
||||
// Finalize customization
|
||||
self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);
|
||||
!!settings.inheritClass && parent[_add](node.className || '');
|
||||
!!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);
|
||||
parent.css('position') == 'static' && parent.css('position', 'relative');
|
||||
operate(self, true, _update);
|
||||
|
||||
// Label events
|
||||
if (label.length) {
|
||||
label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {
|
||||
var type = event[_type],
|
||||
item = $(this);
|
||||
|
||||
// Do nothing if input is disabled
|
||||
if (!node[_disabled]) {
|
||||
|
||||
// Click
|
||||
if (type == _click) {
|
||||
if ($(event.target).is('a')) {
|
||||
return;
|
||||
}
|
||||
operate(self, false, true);
|
||||
|
||||
// Hover state
|
||||
} else if (labelHover) {
|
||||
|
||||
// mouseout|touchend
|
||||
if (/ut|nd/.test(type)) {
|
||||
parent[_remove](hoverClass);
|
||||
item[_remove](labelHoverClass);
|
||||
} else {
|
||||
parent[_add](hoverClass);
|
||||
item[_add](labelHoverClass);
|
||||
}
|
||||
}
|
||||
|
||||
if (_mobile) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Input events
|
||||
self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {
|
||||
var type = event[_type],
|
||||
key = event.keyCode;
|
||||
|
||||
// Click
|
||||
if (type == _click) {
|
||||
return false;
|
||||
|
||||
// Keydown
|
||||
} else if (type == 'keydown' && key == 32) {
|
||||
if (!(node[_type] == _radio && node[_checked])) {
|
||||
if (node[_checked]) {
|
||||
off(self, _checked);
|
||||
} else {
|
||||
on(self, _checked);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
// Keyup
|
||||
} else if (type == 'keyup' && node[_type] == _radio) {
|
||||
!node[_checked] && on(self, _checked);
|
||||
|
||||
// Focus/blur
|
||||
} else if (/us|ur/.test(type)) {
|
||||
parent[type == 'blur' ? _remove : _add](focusClass);
|
||||
}
|
||||
});
|
||||
|
||||
// Helper events
|
||||
helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {
|
||||
var type = event[_type],
|
||||
|
||||
// mousedown|mouseup
|
||||
toggle = /wn|up/.test(type) ? activeClass : hoverClass;
|
||||
|
||||
// Do nothing if input is disabled
|
||||
if (!node[_disabled]) {
|
||||
|
||||
// Click
|
||||
if (type == _click) {
|
||||
operate(self, false, true);
|
||||
|
||||
// Active and hover states
|
||||
} else {
|
||||
|
||||
// State is on
|
||||
if (/wn|er|in/.test(type)) {
|
||||
|
||||
// mousedown|mouseover|touchbegin
|
||||
parent[_add](toggle);
|
||||
|
||||
// State is off
|
||||
} else {
|
||||
parent[_remove](toggle + ' ' + activeClass);
|
||||
}
|
||||
|
||||
// Label hover
|
||||
if (label.length && labelHover && toggle == hoverClass) {
|
||||
|
||||
// mouseout|touchend
|
||||
label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);
|
||||
}
|
||||
}
|
||||
|
||||
if (_mobile) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
// Do something with inputs
|
||||
function operate(input, direct, method) {
|
||||
var node = input[0],
|
||||
state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
|
||||
active = method == _update ? {
|
||||
checked: node[_checked],
|
||||
disabled: node[_disabled],
|
||||
indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
|
||||
} : node[state];
|
||||
|
||||
// Check, disable or indeterminate
|
||||
if (/^(ch|di|in)/.test(method) && !active) {
|
||||
on(input, state);
|
||||
|
||||
// Uncheck, enable or determinate
|
||||
} else if (/^(un|en|de)/.test(method) && active) {
|
||||
off(input, state);
|
||||
|
||||
// Update
|
||||
} else if (method == _update) {
|
||||
|
||||
// Handle states
|
||||
for (var each in active) {
|
||||
if (active[each]) {
|
||||
on(input, each, true);
|
||||
} else {
|
||||
off(input, each, true);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (!direct || method == 'toggle') {
|
||||
|
||||
// Helper or label was clicked
|
||||
if (!direct) {
|
||||
input[_callback]('ifClicked');
|
||||
}
|
||||
|
||||
// Toggle checked state
|
||||
if (active) {
|
||||
if (node[_type] !== _radio) {
|
||||
off(input, state);
|
||||
}
|
||||
} else {
|
||||
on(input, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add checked, disabled or indeterminate state
|
||||
function on(input, state, keep) {
|
||||
var node = input[0],
|
||||
parent = input.parent(),
|
||||
checked = state == _checked,
|
||||
indeterminate = state == _indeterminate,
|
||||
disabled = state == _disabled,
|
||||
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
|
||||
regular = option(input, callback + capitalize(node[_type])),
|
||||
specific = option(input, state + capitalize(node[_type]));
|
||||
|
||||
// Prevent unnecessary actions
|
||||
if (node[state] !== true) {
|
||||
|
||||
// Toggle assigned radio buttons
|
||||
if (!keep && state == _checked && node[_type] == _radio && node.name) {
|
||||
var form = input.closest('form'),
|
||||
inputs = 'input[name="' + node.name + '"]';
|
||||
|
||||
inputs = form.length ? form.find(inputs) : $(inputs);
|
||||
|
||||
inputs.each(function() {
|
||||
if (this !== node && $(this).data(_iCheck)) {
|
||||
off($(this), state);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Indeterminate state
|
||||
if (indeterminate) {
|
||||
|
||||
// Add indeterminate state
|
||||
node[state] = true;
|
||||
|
||||
// Remove checked state
|
||||
if (node[_checked]) {
|
||||
off(input, _checked, 'force');
|
||||
}
|
||||
|
||||
// Checked or disabled state
|
||||
} else {
|
||||
|
||||
// Add checked or disabled state
|
||||
if (!keep) {
|
||||
node[state] = true;
|
||||
}
|
||||
|
||||
// Remove indeterminate state
|
||||
if (checked && node[_indeterminate]) {
|
||||
off(input, _indeterminate, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger callbacks
|
||||
callbacks(input, checked, state, keep);
|
||||
}
|
||||
|
||||
// Add proper cursor
|
||||
if (node[_disabled] && !!option(input, _cursor, true)) {
|
||||
parent.find('.' + _iCheckHelper).css(_cursor, 'default');
|
||||
}
|
||||
|
||||
// Add state class
|
||||
parent[_add](specific || option(input, state) || '');
|
||||
|
||||
// Set ARIA attribute
|
||||
if (!!parent.attr('role') && !indeterminate) {
|
||||
parent.attr('aria-' + (disabled ? _disabled : _checked), 'true');
|
||||
}
|
||||
|
||||
// Remove regular state class
|
||||
parent[_remove](regular || option(input, callback) || '');
|
||||
}
|
||||
|
||||
// Remove checked, disabled or indeterminate state
|
||||
function off(input, state, keep) {
|
||||
var node = input[0],
|
||||
parent = input.parent(),
|
||||
checked = state == _checked,
|
||||
indeterminate = state == _indeterminate,
|
||||
disabled = state == _disabled,
|
||||
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
|
||||
regular = option(input, callback + capitalize(node[_type])),
|
||||
specific = option(input, state + capitalize(node[_type]));
|
||||
|
||||
// Prevent unnecessary actions
|
||||
if (node[state] !== false) {
|
||||
|
||||
// Toggle state
|
||||
if (indeterminate || !keep || keep == 'force') {
|
||||
node[state] = false;
|
||||
}
|
||||
|
||||
// Trigger callbacks
|
||||
callbacks(input, checked, callback, keep);
|
||||
}
|
||||
|
||||
// Add proper cursor
|
||||
if (!node[_disabled] && !!option(input, _cursor, true)) {
|
||||
parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
|
||||
}
|
||||
|
||||
// Remove state class
|
||||
parent[_remove](specific || option(input, state) || '');
|
||||
|
||||
// Set ARIA attribute
|
||||
if (!!parent.attr('role') && !indeterminate) {
|
||||
parent.attr('aria-' + (disabled ? _disabled : _checked), 'false');
|
||||
}
|
||||
|
||||
// Add regular state class
|
||||
parent[_add](regular || option(input, callback) || '');
|
||||
}
|
||||
|
||||
// Remove all traces
|
||||
function tidy(input, callback) {
|
||||
if (input.data(_iCheck)) {
|
||||
|
||||
// Remove everything except input
|
||||
input.parent().html(input.attr('style', input.data(_iCheck).s || ''));
|
||||
|
||||
// Callback
|
||||
if (callback) {
|
||||
input[_callback](callback);
|
||||
}
|
||||
|
||||
// Unbind events
|
||||
input.off('.i').unwrap();
|
||||
$(_label + '[for="' + input[0].id + '"]').add(input.closest(_label)).off('.i');
|
||||
}
|
||||
}
|
||||
|
||||
// Get some option
|
||||
function option(input, state, regular) {
|
||||
if (input.data(_iCheck)) {
|
||||
return input.data(_iCheck).o[state + (regular ? '' : 'Class')];
|
||||
}
|
||||
}
|
||||
|
||||
// Capitalize some string
|
||||
function capitalize(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
// Executable handlers
|
||||
function callbacks(input, checked, callback, keep) {
|
||||
if (!keep) {
|
||||
if (checked) {
|
||||
input[_callback]('ifToggled');
|
||||
}
|
||||
|
||||
input[_callback]('ifChanged')[_callback]('if' + capitalize(callback));
|
||||
}
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,157 +0,0 @@
|
||||
/*!
|
||||
|
||||
=========================================================
|
||||
* Paper Dashboard - v1.1.2
|
||||
=========================================================
|
||||
|
||||
* Product Page: http://www.creative-tim.com/product/paper-dashboard
|
||||
* Copyright 2017 Creative Tim (http://www.creative-tim.com)
|
||||
* Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE.md)
|
||||
|
||||
=========================================================
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
var fixedTop = false;
|
||||
var transparent = true;
|
||||
var navbar_initialized = false;
|
||||
|
||||
$(document).ready(function(){
|
||||
window_width = $(window).width();
|
||||
|
||||
// Init navigation toggle for small screens
|
||||
if(window_width <= 991){
|
||||
pd.initRightMenu();
|
||||
}
|
||||
|
||||
// Activate the tooltips
|
||||
$('[rel="tooltip"]').tooltip();
|
||||
|
||||
});
|
||||
|
||||
// activate collapse right menu when the windows is resized
|
||||
$(window).resize(function(){
|
||||
if($(window).width() <= 991){
|
||||
pd.initRightMenu();
|
||||
}
|
||||
});
|
||||
|
||||
pd = {
|
||||
misc:{
|
||||
navbar_menu_visible: 0
|
||||
},
|
||||
checkScrollForTransparentNavbar: debounce(function() {
|
||||
if($(document).scrollTop() > 381 ) {
|
||||
if(transparent) {
|
||||
transparent = false;
|
||||
$('.navbar-color-on-scroll').removeClass('navbar-transparent');
|
||||
$('.navbar-title').removeClass('hidden');
|
||||
}
|
||||
} else {
|
||||
if( !transparent ) {
|
||||
transparent = true;
|
||||
$('.navbar-color-on-scroll').addClass('navbar-transparent');
|
||||
$('.navbar-title').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}),
|
||||
initRightMenu: function(){
|
||||
if(!navbar_initialized){
|
||||
$off_canvas_sidebar = $('nav').find('.navbar-collapse').first().clone(true);
|
||||
|
||||
$sidebar = $('.sidebar');
|
||||
sidebar_bg_color = $sidebar.data('background-color');
|
||||
sidebar_active_color = $sidebar.data('active-color');
|
||||
|
||||
$logo = $sidebar.find('.logo').first();
|
||||
logo_content = $logo[0].outerHTML;
|
||||
|
||||
ul_content = '';
|
||||
|
||||
// set the bg color and active color from the default sidebar to the off canvas sidebar;
|
||||
$off_canvas_sidebar.attr('data-background-color',sidebar_bg_color);
|
||||
$off_canvas_sidebar.attr('data-active-color',sidebar_active_color);
|
||||
|
||||
$off_canvas_sidebar.addClass('off-canvas-sidebar');
|
||||
|
||||
//add the content from the regular header to the right menu
|
||||
$off_canvas_sidebar.children('ul').each(function(){
|
||||
content_buff = $(this).html();
|
||||
ul_content = ul_content + content_buff;
|
||||
});
|
||||
|
||||
// add the content from the sidebar to the right menu
|
||||
content_buff = $sidebar.find('.nav').html();
|
||||
ul_content = ul_content + '<li class="divider"></li>'+ content_buff;
|
||||
|
||||
ul_content = '<ul class="nav navbar-nav">' + ul_content + '</ul>';
|
||||
|
||||
navbar_content = logo_content + ul_content;
|
||||
navbar_content = '<div class="sidebar-wrapper">' + navbar_content + '</div>';
|
||||
|
||||
$off_canvas_sidebar.html(navbar_content);
|
||||
|
||||
$('body').append($off_canvas_sidebar);
|
||||
|
||||
$toggle = $('.navbar-toggle');
|
||||
|
||||
$off_canvas_sidebar.find('a').removeClass('btn btn-round btn-default');
|
||||
$off_canvas_sidebar.find('button').removeClass('btn-round btn-fill btn-info btn-primary btn-success btn-danger btn-warning btn-neutral');
|
||||
$off_canvas_sidebar.find('button').addClass('btn-simple btn-block');
|
||||
|
||||
$toggle.click(function (){
|
||||
if(pd.misc.navbar_menu_visible == 1) {
|
||||
$('html').removeClass('nav-open');
|
||||
pd.misc.navbar_menu_visible = 0;
|
||||
$('#bodyClick').remove();
|
||||
setTimeout(function(){
|
||||
$toggle.removeClass('toggled');
|
||||
}, 400);
|
||||
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
$toggle.addClass('toggled');
|
||||
}, 430);
|
||||
|
||||
div = '<div id="bodyClick"></div>';
|
||||
$(div).appendTo("body").click(function() {
|
||||
$('html').removeClass('nav-open');
|
||||
pd.misc.navbar_menu_visible = 0;
|
||||
$('#bodyClick').remove();
|
||||
setTimeout(function(){
|
||||
$toggle.removeClass('toggled');
|
||||
}, 400);
|
||||
});
|
||||
|
||||
$('html').addClass('nav-open');
|
||||
pd.misc.navbar_menu_visible = 1;
|
||||
|
||||
}
|
||||
});
|
||||
navbar_initialized = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Returns a function, that, as long as it continues to be invoked, will not
|
||||
// be triggered. The function will be called after it stops being called for
|
||||
// N milliseconds. If `immediate` is passed, trigger the function on the
|
||||
// leading edge, instead of the trailing.
|
||||
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
var context = this, args = arguments;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(function() {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
}, wait);
|
||||
if (immediate && !timeout) func.apply(context, args);
|
||||
};
|
||||
};
|
||||
@@ -25829,7 +25829,7 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.14.0
|
||||
* @version 1.14.1
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
@@ -28349,7 +28349,7 @@ return Popper;
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.14.0
|
||||
* @version 1.14.1
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user